diff --git a/form.yml b/form.yml new file mode 100644 index 0000000000000000000000000000000000000000..07ca419c82693f29fe0ba16a649b4e8202eb98e0 --- /dev/null +++ b/form.yml @@ -0,0 +1,55 @@ +--- +cluster: "SLURM_CLUSTER" +attributes: + bc_num_hours: + value: 1 + + 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_partition: + widget: select + label: Partition + options: + - [ "express", "express" ] + - [ "short", "short" ] + - [ "medium", "medium" ] + - [ "long", "long" ] + - [ "interactive", "interactive" ] + - [ "pascalnodes", "pascalnodes" ] + - [ "pascalnodes-medium", "pascalnodes-medium" ] + - [ "largemem", "largemem" ] + - [ "largemem-long", "largemem-long" ] + - [ "amd-hdr100", "amd-hdr100" ] + + version: + widget: select + label: "MATLAB version" + help: "This defines the version of MATLAB you want to load." + options: +{% for ver in matlab_vers %} + - [ "{{ ver }}", "{{ matlab_module_name }}/{{ ver }}"] +{% endfor %} + + cuda_toolkit: "{{ cuda_toolkit_module }}" + +form: + - version + - bc_num_hours + - bc_partition + - bc_num_slots + - bc_num_mems + - bc_email_on_started + - cuda_toolkit diff --git a/manifest.yml b/manifest.yml index 0841d1e2cfbebde315166da5104dfa6a36413e92..c2232c524eaab373cdc3f4a5428717081c8e52a6 100644 --- a/manifest.yml +++ b/manifest.yml @@ -4,8 +4,8 @@ category: Interactive Apps subcategory: GUIs role: batch_connect description: | - This app will launch a [MATLAB] GUI on the [Owens cluster]. You will be able + This app will launch a [MATLAB] GUI on the [Cheaha cluster]. You will be able to interact with the MATLAB GUI through a VNC session. [MATLAB]: https://www.mathworks.com/products/matlab.html - [Owens cluster]: https://www.osc.edu/resources/technical_support/supercomputers/owens + [Cheaha cluster]: https://uabrc.github.io diff --git a/script.sh.erb b/script.sh.erb new file mode 100644 index 0000000000000000000000000000000000000000..8884fa8a339c8c45a136935c94d1d03887bffa11 --- /dev/null +++ b/script.sh.erb @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +# Set working directory to home directory +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)" + module reset + set -x + xfwm4 --compositor=off --daemon --sm-client-disable + xsetroot -solid "#D3D3D3" + xfsettingsd --sm-client-disable + xfce4-panel --sm-client-disable +) & + +# +# Start MATLAB +# + +<%- if context.bc_partition == "pascalnodes" -%> +# Load CUDA toolkit +module load <%= context.cuda_toolkit %> +<%- end -%> +# Load the required environment +module load <%= context.version %> +# Launch MATLAB +module list +set -x +matlab -desktop diff --git a/submit.yml.erb b/submit.yml.erb index e89017d8891b8cf42b243d773d4d3e7079d41cc1..2521f4a5e8aa7530badeaa009f5378a2f38e6d27 100644 --- a/submit.yml.erb +++ b/submit.yml.erb @@ -1,24 +1,14 @@ -<%- - ppn = num_cores.blank? ? 28 : num_cores.to_i - nodes = bc_num_slots.blank? ? 1 : bc_num_slots.to_i - - case node_type - when "hugemem" - ppn = 48 - partition = bc_num_slots.to_i > 1 ? "hugemem-parallel" : "hugemem" - slurm_args = [ "--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}", "--partition", partition ] - when "vis" - slurm_args = ["--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}", "--gpus-per-node", "1", "--gres", "vis" ] - else - slurm_args = ["--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}" ] - end -%> --- batch_connect: - template: vnc + template: "vnc" script: - accounting_id: "<%= account %>" native: - <%- slurm_args.each do |arg| %> - - "<%= arg %>" - <%- end %> + - "-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-matlab-<%= version.split("/")[-1] %>" +<%- if bc_partition.include? "pascalnodes" -%> + - "--gres=gpu:1" +<%- end -%>