From 4f602879911dda0cb637dbecb3f7d395ec9488bd Mon Sep 17 00:00:00 2001 From: Travis Ravert Date: Fri, 25 Aug 2023 12:46:43 -0400 Subject: [PATCH] Add time settings, adjust submit for time in hours, update groups in form --- form.yml.erb | 26 ++++++++++++++++---------- submit.yml.erb | 13 ++----------- template/script.sh.erb | 19 +++++++++++++++++++ 3 files changed, 37 insertions(+), 21 deletions(-) diff --git a/form.yml.erb b/form.yml.erb index a6a38fb..5627f4e 100644 --- a/form.yml.erb +++ b/form.yml.erb @@ -1,3 +1,9 @@ +<%- + groups = OodSupport::User.new.groups.sort_by(&:id).tap { |groups| + groups.unshift(groups.delete(OodSupport::Process.group)) + }.map(&:name).grep(/^P./) +-%> + --- cluster: - "pitzer" @@ -5,23 +11,23 @@ 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" \ No newline at end of file + widget: "number_field" + value: 1 + min: 1 + max: 8 + \ No newline at end of file diff --git a/submit.yml.erb b/submit.yml.erb index 89035b2..5ac87eb 100644 --- a/submit.yml.erb +++ b/submit.yml.erb @@ -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: diff --git a/template/script.sh.erb b/template/script.sh.erb index 782e259..0ae067f 100755 --- a/template/script.sh.erb +++ b/template/script.sh.erb @@ -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