Skip to content
Snippets Groups Projects
Commit f2d87e17 authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

feat add version v1 for cod cluster

parent d71d2041
No related branches found
No related tags found
No related merge requests found
form.yml 0 → 100644
---
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
......@@ -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
#!/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
<%-
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 -%>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment