From 47ccd25a3d331e9c9aa7f6846bf921f98411dd57 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Wed, 17 Apr 2024 13:44:12 -0400 Subject: [PATCH] use auto attributes (#26) --- form.yml.erb => form.yml | 55 ++-------------------------------------- submit.yml.erb | 1 - template/script.sh.erb | 2 +- 3 files changed, 3 insertions(+), 55 deletions(-) rename form.yml.erb => form.yml (73%) diff --git a/form.yml.erb b/form.yml similarity index 73% rename from form.yml.erb rename to form.yml index 2983af5..afa259d 100644 --- a/form.yml.erb +++ b/form.yml @@ -1,15 +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" - "pitzer" form: - - version - - account + - auto_modules_matlab + - auto_accounts - bc_num_hours - bc_num_slots - num_cores @@ -30,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" @@ -110,42 +98,3 @@ attributes: data-option-for-cluster-owens: false, data-option-for-cluster-pitzer: false, ] - version: - widget: select - label: "MATLAB version" - help: "This defines the version of MATLAB you want to load." - options: - - [ - "R2023a", "matlab/r2023a", - ] - - [ - "R2022a", "matlab/r2022a", - ] - - [ - "R2020a", "matlab/r2020a", - ] - - [ - "R2019b", "matlab/r2019b", - ] - - [ - "R2019a", "matlab/r2019a", - data-option-for-cluster-owens: false, - ] - - [ - "R2018b", "matlab/r2018b" - ] - - [ - "R2018a", "matlab/r2018a" - ] - - [ - "R2017a", "matlab/r2017a", - data-option-for-cluster-pitzer: false, - ] - - [ - "R2016b", "matlab/r2016b", - data-option-for-cluster-pitzer: false, - ] - - [ - "R2015b", "matlab/r2015b" , - data-option-for-cluster-pitzer: false, - ] diff --git a/submit.yml.erb b/submit.yml.erb index 19f526d..e580fe2 100644 --- a/submit.yml.erb +++ b/submit.yml.erb @@ -41,7 +41,6 @@ batch_connect: template: vnc script: - accounting_id: "<%= account %>" native: <%- slurm_args.each do |arg| %> - "<%= arg %>" diff --git a/template/script.sh.erb b/template/script.sh.erb index 7839c1b..75a09de 100755 --- a/template/script.sh.erb +++ b/template/script.sh.erb @@ -32,7 +32,7 @@ cd "${HOME}" # # Load the required environment -module load xalt/latest <%= context.version %> +module load xalt/latest <%= context.auto_modules_matlab %> # Launch MATLAB <%- if gpu -%>