-
Notifications
You must be signed in to change notification settings - Fork 0
/
submit.yml.erb
28 lines (23 loc) · 892 Bytes
/
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
---
<%# Takes user input from form.yml and sets variables for the script arguments. %>
<%# base is not yet working. The user will have to specify a working path.%>
<%-
ppn = num_tasks_per_node.blank? ? 1 : num_tasks_per_node.to_i
nodes = num_nodes.blank? ? 1 : num_nodes.to_i
mem = gbs_of_mem.blank? ? (2*ppn) : gbs_of_mem.to_i
base = work_dir.blank? ? ENV['HOME'] : work_dir
slurm_args = [ "--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}", "--mem", "#{mem}G",]
if defined?(reservation) && reservation != "None"
slurm_args = slurm_args + [ "--reservation", reservation ]
end
-%>
batch_connect:
template: "basic"
conn_params:
- working_path # necessary for the destination URL so the user can view their working directory through ood.
script:
accounting_id: <%= bc_account %>
native:
<%- slurm_args.each do |arg| %>
- "<%= arg %>"
<%- end %>