Skip to content

Commit

Permalink
Add Cardinal support (#16)
Browse files Browse the repository at this point in the history
* use auto_accounts

* use auto_modules

* support el 9 on cardinal

* rm el7 support
  • Loading branch information
johrstrom authored Oct 9, 2024
1 parent c5968a6 commit e86de63
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rpm-build:
- ./tmp/ondemand-packaging/bin/ood_packaging -w $CI_PROJECT_DIR/tmp/work -o $CI_PROJECT_DIR/tmp/output -V $CI_COMMIT_TAG -T $CI_PROJECT_DIR
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8]
- OOD_PACKAGING_DIST: [el8]
artifacts:
paths:
- tmp/output
Expand Down
26 changes: 5 additions & 21 deletions form.yml.erb → form.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<%-
groups = OodSupport::User.new.groups.sort_by(&:id).tap { |groups|
groups.unshift(groups.delete(OodSupport::Process.group))
}.map(&:name).grep(/^P./)
-%>
---
cluster:
- "owens"
- "cardinal"
form:
- version
- account
- auto_modules_stata
- auto_accounts
- bc_num_hours
- bc_num_slots
- num_cores
Expand All @@ -29,13 +25,6 @@ attributes:
bc_num_slots: "1"
bc_vnc_resolution:
required: true
account:
label: "Project"
widget: select
options:
<%- groups.each do |group| %>
- "<%= group %>"
<%- end %>
node_type:
widget: select
label: "Node type"
Expand All @@ -49,16 +38,11 @@ attributes:
- [
"any", "any",
data-max-num-cores: 28,
data-min-num-cores: 1,
]
- [
"hugemem", "hugemem",
data-min-num-cores: 4,
data-max-num-cores: 48,
data-option-for-cluster-cardinal: false,
]
version:
widget: select
label: "Stata version"
help: "This defines the version of Stata you want to load."
options:
- [ "15", "stata/15" ]
- [ "17", "stata/17" ]
1 change: 0 additions & 1 deletion submit.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
batch_connect:
template: vnc
script:
accounting_id: "<%= account %>"
native:
<%- slurm_args.each do |arg| %>
- "<%= arg %>"
Expand Down
29 changes: 18 additions & 11 deletions template/script.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,35 @@ cd "${HOME}"
#
# 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)

(
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)
module restore
set -x

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
) &
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 Stata
#

# Load the required enviornment
module load <%= context.version %>
module load <%= context.auto_modules_stata %>
# For reference:
#
# whatis("loads stata")
Expand Down

0 comments on commit e86de63

Please sign in to comment.