This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubmit.yml.erb
61 lines (59 loc) · 1.59 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
52
53
54
55
56
57
58
59
60
61
<%-
cores = num_cores.to_i
hours = num_hours.to_i
if node_type == "regular"
if hours <= 8
partition = 'regularshort'
elsif hours > 8 and hours <= 72
partition = 'regularmedium'
else
partition = 'regularlong'
end
elsif node_type == 'himem'
if hours <= 8
partition = 'himemshort'
elsif hours > 8 and hours <= 72
partition = 'himemmedium'
else
partition = 'himemlong'
end
elsif node_type == 'gpua100' || node_type == 'gpuv100'
gpu_type_match = /^gpu(.*)/.match(node_type)
gpu_type = gpu_type_match[1]
if hours <= 4
partition = 'gpushort'
elsif hours > 4 and hours <= 24
partition = 'gpumedium'
else
partition = 'gpulong'
end
elsif node_type == 'visualization'
if hours <= 1
partition = 'visualizationshort'
elsif hours > 1 and hours <= 4
partition = 'visualizationmedium'
else
partition = 'visualizationlong'
end
end
-%>
---
batch_connect:
template: "vnc"
script:
queue_name: <%= partition %>
wall_time: "<%= hours * 3600 %>"
native:
# Hardcode the number of nodes to 1
- "-N 1"
<% if node_type == 'visualization' %>
- "--gres=gpu:quadro_rtx_8000:2"
- "--mem=0"
- "--cpus-per-task=40"
<% else %>
- "--mem"
- "<%= (memory.nil? || memory.empty?) ? 2000 : memory.to_i * 1000 %>"
- "-c"
- "<%= (num_cores.nil? || num_cores.empty?) ? 1 : num_cores.to_i %>"
- "--gres=gpu:<%= gpu_type %>:1"
<% end %>