Skip to content

Commit

Permalink
fix gpu/vis mixup and add 40core machines back (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom authored May 22, 2023
1 parent fee6600 commit b101109
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
10 changes: 10 additions & 0 deletions form.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,21 @@ attributes:
data-max-num-cores-for-cluster-pitzer: 48,
data-option-for-cluster-owens: false,
]
- [
"40 core", "any-40core",
data-max-num-cores-for-cluster-pitzer: 40,
data-option-for-cluster-owens: false,
]
- [
"any gpu", "gpu",
data-max-num-cores-for-cluster-owens: 28,
data-max-num-cores-for-cluster-pitzer: 48,
]
- [
"40 core gpu", "gpu-40core",
data-max-num-cores-for-cluster-pitzer: 40,
data-option-for-cluster-owens: false,
]
- [
"48 core gpu", "gpu-48core",
data-max-num-cores-for-cluster-pitzer: 48,
Expand Down
33 changes: 29 additions & 4 deletions submit.yml.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
<%-
ppn = num_cores.blank? ? 28 : num_cores.to_i
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 "vis"
slurm_args = ["--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}", "--gpus-per-node", "1", "--gres", "vis" ]
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}" ]
slurm_args = [ "--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}" ]
end
%>
---
Expand Down

0 comments on commit b101109

Please sign in to comment.