Skip to content

Commit

Permalink
Add time settings, adjust submit for time in hours, update groups in …
Browse files Browse the repository at this point in the history
…form
  • Loading branch information
Oglopf committed Aug 25, 2023
1 parent 88321c6 commit 4f60287
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 21 deletions.
26 changes: 16 additions & 10 deletions form.yml.erb
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
<%-
groups = OodSupport::User.new.groups.sort_by(&:id).tap { |groups|
groups.unshift(groups.delete(OodSupport::Process.group))
}.map(&:name).grep(/^P./)
-%>

---
cluster:
- "pitzer"
form:
- account
- compute_cluster
- time
- size
attributes:
size:
widget: "hidden_field"
value: "standard"
account:
label: "Project"
widget: "select"
options:
- [
"PZS0714", "PZS0714"
]
<%- groups.each do |group| %>
- "<%= group %>"
<%- end %>
compute_cluster:
widget: "select"
widget: "hidden_field"
options:
- [
"pitzer", "pitzer"
]
time:
widget: "hidden_field"
value: "1.5"
widget: "number_field"
value: 1
min: 1
max: 8

13 changes: 2 additions & 11 deletions submit.yml.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
<%-
container_sizes = {
'standard': {
'cpu': 1,
'memory': 4,
},
'test': {
'cpu': 1,
'memory': 2,
},
}

slurm_args = [ "--nodes", "1", "--ntasks-per-node", "4", "--mem", "4096", "--cpus-per-task", "1", "--time", "10" ]
hours = time.to_i*60
slurm_args = [ "--nodes", "1", "--ntasks-per-node", "1", "--mem", "4096", "--cpus-per-task", "1", "--time", "#{hours}" ]
%>
---
batch_connect:
Expand Down
19 changes: 19 additions & 0 deletions template/script.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@ module load mathematica/$VERSION
# Launch Sever
echo "Starting Mathematica..."

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

module restore
set -x
xfwm4 --compositor=off --daemon --sm-client-disable
xsetroot -solid "#D3D3D3"
xfsettingsd --sm-client-disable
xfce4-panel --sm-client-disable
) &

module list
set -x
mathematica

0 comments on commit 4f60287

Please sign in to comment.