-
Notifications
You must be signed in to change notification settings - Fork 23
/
submit.yml.erb
51 lines (42 loc) · 1.85 KB
/
submit.yml.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<%-
err_msg = "You are not a member of the matlab group. Please email [email protected] to request access to MATLAB."
raise(StandardError, err_msg) unless CurrentUser.group_names.include?('matlab')
nodes = bc_num_slots.blank? ? 1 : bc_num_slots.to_i
cores_lookup = {
"hugemem" => {"pitzer" => "80", "owens" => "48"},
"largemem" => {"pitzer" => "48", "owens" => "28"},
"any" => {"pitzer" => "40", "owens" => "28"},
"gpu" => {"pitzer" => "48", "owens" => "28"},
"any-48core" => {"pitzer" => "48", "owens" => "28"},
"gpu-48core" => {"pitzer" => "48", "owens" => "28"},
"any-40core" => {"pitzer" => "40", "owens" => "28"},
"gpu-40core" => {"pitzer" => "40", "owens" => "28"},
}
max_cores = cores_lookup[node_type][cluster]
ppn = num_cores.blank? ? max_cores : num_cores.to_i
case node_type
when "hugemem"
partition = bc_num_slots.to_i > 1 ? "hugemem-parallel" : "hugemem"
slurm_args = [ "--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}", "--partition", partition ]
when "gpu"
slurm_args = [ "--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}", "--gpus-per-node", "1" ]
when "any40-core"
slurm_args = [ "--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}", "--contstraint", "48core" ]
when "any48-core"
slurm_args = [ "--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}", "--contstraint", "48core" ]
when "gpu-48core"
slurm_args = [ "--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}", "--gpus-per-node", "1", "--constraint", "48core" ]
when "gpu-40core"
slurm_args = [ "--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}", "--gpus-per-node", "1", "--constraint", "40core" ]
else
slurm_args = [ "--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}" ]
end
%>
---
batch_connect:
template: vnc
script:
native:
<%- slurm_args.each do |arg| %>
- "<%= arg %>"
<%- end %>