diff --git a/SLURM_CLUSTER.yml.erb b/SLURM_CLUSTER.yml.erb new file mode 100644 index 0000000000000000000000000000000000000000..f42401b02a764f4b49d0ceed83ea5be09bca11b4 --- /dev/null +++ b/SLURM_CLUSTER.yml.erb @@ -0,0 +1,48 @@ +<%- + partitions = OodAppkit.clusters[:SLURM_CLUSTER].custom_config[:partitions] +-%> +--- +title: "HPC Desktop" +cluster: SLURM_CLUSTER +submit: "submit/submit.yml.erb" +attributes: + desktop: "xfce" + bc_num_slots: + label: Number of CPU + value: 1 + min: 1 + max: 24 + step: 1 + + bc_num_mems: + widget: "number_field" + label: Memory per CPU (GB) + value: 4 + min: 1 + max: 128 + step: 1 + + bc_num_gpus: + widget: "number_field" + label: Number of GPUs + value: 1 + min: 0 + max: 4 + step: 1 + + bc_partition: + widget: select + label: Partition + options: + <%- partitions.each do |p| -%> + - [ "<%= p %>", "<%= p %>" ] + <%- end -%> + +form: + - desktop + - bc_num_hours + - bc_partition + - bc_num_gpus + - bc_num_slots + - bc_num_mems + - bc_email_on_started diff --git a/submit/submit.yml.erb b/submit/submit.yml.erb new file mode 100644 index 0000000000000000000000000000000000000000..9aeca517210c765db8078e2daadd08238297d4ad --- /dev/null +++ b/submit/submit.yml.erb @@ -0,0 +1,28 @@ +<%- + email = ENV['USER'] + if !email.include? '@' + email = email + '@uab.edu' + end +-%> +--- +script: + job_environment: + USER: "<%= ENV['USER'] %>" + native: + - "-N 1" + - "-n <%= bc_num_slots.blank? ? 1 : bc_num_slots.to_i %>" + - "--mem-per-cpu=<%= bc_num_mems.blank? ? 4 : bc_num_mems.to_i %>G" + - "--partition=<%= bc_partition %>" + - "--time=<%= bc_num_hours.blank? ? 1 : bc_num_hours.to_i %>:00:00" + - "--job-name=ood-vnc" +<%- if bc_partition.include? "pascalnodes" or bc_partition.include? "amperenodes" -%> + - "--gres=gpu:<%= bc_num_gpus.blank? ? 1 : bc_num_gpus.to_i %>" +<%- end -%> +<%- if bc_email_on_started == "1" -%> + - "--mail-type=BEGIN" + - "--mail-user=<%= email %>" +<%- end -%> +<%- if bc_email_on_started == "1" -%> + - "--mail-type=BEGIN" + - "--mail-user=<%= email %>" +<%- end -%>