Skip to content

Commit

Permalink
Add cardinal (#25)
Browse files Browse the repository at this point in the history
* use XFCE instead of flexbox

* add support for the cardinal cluster
  • Loading branch information
johrstrom authored Oct 9, 2024
1 parent dd73ba1 commit f8a0af4
Show file tree
Hide file tree
Showing 9 changed files with 105 additions and 59 deletions.
18 changes: 12 additions & 6 deletions form.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
cluster:
- "owens"
- "cardinal"
form:
- auto_modules_abaqus
- auto_accounts
Expand Down Expand Up @@ -38,16 +39,21 @@ attributes:
options:
- [
'any', 'any',
data-max-num-cores: 28,
data-min-num-cores: 1,
data-max-num-cores-for-cluster-owens: 28,
data-min-num-cores-for-cluster-owens: 1,
data-max-num-cores-for-cluster-cardinal: 48,
data-min-num-cores-for-cluster-cardinal: 1,
]
- [
'vis', 'vis',
data-max-num-cores: 28,
data-min-num-cores: 1,
data-max-num-cores-for-cluster-owens: 28,
data-min-num-cores-for-cluster-owens: 1,
data-max-num-cores-for-cluster-cardinal: 48,
data-min-num-cores-for-cluster-cardinal: 1,
]
- [
'hugemem', 'hugemem',
data-max-num-cores: 48,
data-min-num-cores: 4,
data-max-num-cores-for-cluster-owens: 48,
data-min-num-cores-for-cluster-owens: 4,
data-option-for-cluster-cardinal: false,
]
20 changes: 20 additions & 0 deletions template/config/menus/xfce-applications.menu
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">

<Menu>
<Name>Xfce</Name>

<DefaultAppDirs/>
<DefaultDirectoryDirs/>
<DefaultMergeDirs/>

<Include>
<All/>
</Include>

<Layout>
<Filename>firefox.desktop</Filename>
<Filename>xfce4-terminal.desktop</Filename>
<Filename>Thunar.desktop</Filename>
</Layout>
</Menu>
3 changes: 3 additions & 0 deletions template/config/xfce4/terminal/terminalrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Configuration]
CommandLoginShell=TRUE
FontName=DejaVu Sans Mono 11
44 changes: 44 additions & 0 deletions template/config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>

<channel name="xfce4-panel" version="1.0">
<property name="configver" type="int" value="2"/>
<property name="panels" type="array">
<value type="int" value="1"/>
<property name="panel-1" type="empty">
<property name="position" type="string" value="p=6;x=99;y=24"/>
<property name="position-locked" type="bool" value="true"/>
<property name="size" type="uint" value="48"/>
<property name="length" type="uint" value="100"/>
<property name="length-adjust" type="bool" value="false"/>
<property name="plugin-ids" type="array">
<value type="int" value="1"/>
<value type="int" value="3"/>
<value type="int" value="8"/>
<value type="int" value="4"/>
<value type="int" value="5"/>
</property>
<property name="mode" type="uint" value="0"/>
</property>
</property>
<property name="plugins" type="empty">
<property name="plugin-3" type="string" value="tasklist">
<property name="flat-buttons" type="bool" value="false"/>
<property name="show-handle" type="bool" value="true"/>
</property>
<property name="plugin-4" type="string" value="pager"/>
<property name="plugin-5" type="string" value="clock">
<property name="digital-format" type="string" value="%r"/>
<property name="mode" type="uint" value="2"/>
</property>
<property name="plugin-8" type="string" value="separator">
<property name="expand" type="bool" value="true"/>
<property name="style" type="uint" value="2"/>
</property>
<property name="plugin-1" type="string" value="applicationsmenu">
<property name="show-generic-names" type="bool" value="true"/>
<property name="show-menu-icons" type="bool" value="true"/>
<property name="button-icon" type="string" value="fedora-logo-icon"/>
<property name="show-tooltips" type="bool" value="true"/>
</property>
</property>
</channel>
6 changes: 0 additions & 6 deletions template/fluxbox.rc.erb

This file was deleted.

18 changes: 0 additions & 18 deletions template/fluxbox/keys

This file was deleted.

6 changes: 0 additions & 6 deletions template/fluxbox/menu

This file was deleted.

8 changes: 0 additions & 8 deletions template/fluxbox/overlay

This file was deleted.

41 changes: 26 additions & 15 deletions template/script.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,41 @@ module purge
cd "${HOME}"

#
# Launch Fluxbox
# Launch Xfce Window Manager and Panel
#
export SEND_256_COLORS_TO_REMOTE=1
export XDG_CONFIG_HOME="<%= session.staged_root.join("config") %>"
export XDG_DATA_HOME="<%= session.staged_root.join("share") %>"
export XDG_CACHE_HOME="$(mktemp -d)"
export $(dbus-launch)

# Create Fluxbox root or it will override the below init file
(
umask 077
mkdir -p "${HOME}/.fluxbox"
)

# Start the Fluxbox window manager (it likes to crash on occassion, make it
# persistent)
(
until fluxbox -display "${DISPLAY}.0" -rc "<%= session.staged_root.join("fluxbox.rc") %>"; do
echo "Fluxbox crashed with exit code $?. Respawning..." >&2
sleep 1
done
) &
module restore
set -x

source /etc/os-release

if [[ "$VERSION_ID" < "9" ]]; then
xfwm4 --compositor=off --daemon --sm-client-disable
xsetroot -solid "#D3D3D3"
xfsettingsd --sm-client-disable
xfce4-panel --sm-client-disable &
else
xfwm4 --compositor=off --sm-client-disable &
xsetroot -solid "#D3D3D3"
xfsettingsd --sm-client-disable &
xfce4-panel --sm-client-disable &
fi

#
# Start Abaqus
#

# Load the required environment
<%- if context.cluster == 'cardinal' -%>
module load xalt/latest <%= context.auto_modules_abaqus %>
<%- else -%>
module load xalt/latest intel/18.0.3 <%= context.auto_modules_abaqus %>
<%- end -%>

# Output debug information
module list
Expand Down

0 comments on commit f8a0af4

Please sign in to comment.