Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • rc/bc_uab_relion
  • louistw/bc_uab_relion
2 results
Show changes
Commits on Source (18)
const table = {
"interactive": { "max_cpu": 48, "max_hour": 2, "max_gpu": 0 },
"express": { "max_cpu": 48, "max_hour": 2, "max_gpu": 0 },
"short": { "max_cpu": 48, "max_hour": 12, "max_gpu": 0 },
"pascalnodes": { "max_cpu": 28, "max_hour": 12, "max_gpu": 4 },
"pascalnodes-medium": { "max_cpu": 28, "max_hour": 48, "max_gpu": 4 },
"medium": { "max_cpu": 48, "max_hour": 50, "max_gpu": 0 },
"long": { "max_cpu": 48, "max_hour": 150, "max_gpu": 0 },
"intel-dcb": { "max_cpu": 24, "max_hour": 150, "max_gpu": 0 },
"amd-hdr100": { "max_cpu": 128, "max_hour": 150, "max_gpu": 0 },
"largemem": { "max_cpu": 24, "max_hour": 50, "max_gpu": 0 },
"largemem-long": { "max_cpu": 24, "max_hour": 150, "max_gpu": 0 },
"amperenodes": { "max_cpu": 128, "max_hour": 12, "max_gpu": 2 },
"amperenodes-medium": { "max_cpu": 128, "max_hour": 48, "max_gpu": 2 },
}
const gpu_part_regex = /pascal|ampere/;
function set_max_value(form_id, value) {
const form_element = $(form_id);
form_element.attr({'max': value});
if (form_element.val() > value)
form_element.val(value)
}
function set_partition_change_handler() { function set_partition_change_handler() {
let partition_select = $("#batch_connect_session_context_bc_partition"); let partition_select = $("#batch_connect_session_context_bc_partition");
partition_select.change( function(e) { partition_select.change( function(e) {
...@@ -6,9 +31,15 @@ function set_partition_change_handler() { ...@@ -6,9 +31,15 @@ function set_partition_change_handler() {
} }
function toggle_gpu_visibility(event) { function toggle_gpu_visibility(event) {
const show = /pascal|ampere/.test(event.target.value); const partition = event.target.value;
const selector = '#batch_connect_session_context_bc_num_gpus'; const cpu_selector = '#batch_connect_session_context_bc_num_slots';
toggle_visibilty_of_form_group(selector, show); const gpu_selector = '#batch_connect_session_context_bc_num_gpus';
const hour_selector = '#batch_connect_session_context_bc_num_hours';
toggle_visibilty_of_form_group(gpu_selector, gpu_part_regex.test(partition));
set_max_value(cpu_selector, table[partition]["max_cpu"]);
set_max_value(gpu_selector, table[partition]["max_gpu"]);
set_max_value(hour_selector, table[partition]["max_hour"]);
} }
function toggle_visibilty_of_form_group(form_id, show) { function toggle_visibilty_of_form_group(form_id, show) {
......
<%-
partitions = OodAppkit.clusters[:SLURM_CLUSTER].custom_config[:partitions]
-%>
--- ---
cluster: "SLURM_CLUSTER" cluster: "SLURM_CLUSTER"
attributes: attributes:
...@@ -5,6 +8,7 @@ attributes: ...@@ -5,6 +8,7 @@ attributes:
value: 1 value: 1
bc_num_slots: bc_num_slots:
widget: "number_field"
label: Number of CPU label: Number of CPU
value: 1 value: 1
min: 1 min: 1
...@@ -20,9 +24,10 @@ attributes: ...@@ -20,9 +24,10 @@ attributes:
step: 1 step: 1
bc_num_gpus: bc_num_gpus:
widget: "number_field"
label: Number of GPUs label: Number of GPUs
value: 1 value: 1
min: 1 min: 0
max: 4 max: 4
step: 1 step: 1
...@@ -30,20 +35,9 @@ attributes: ...@@ -30,20 +35,9 @@ attributes:
widget: select widget: select
label: Partition label: Partition
options: options:
- [ "express", "express" ] <%- partitions.each do |p| -%>
- [ "short", "short" ] - [ "<%= p %>", "<%= p %>" ]
- [ "medium", "medium" ] <%- end -%>
- [ "long", "long" ]
- [ "interactive", "interactive" ]
- [ "pascalnodes", "pascalnodes" ]
- [ "pascalnodes-medium", "pascalnodes-medium" ]
- [ "largemem", "largemem" ]
- [ "largemem-long", "largemem-long" ]
- [ "amd-hdr100", "amd-hdr100" ]
- [ "intel-dcb", "intel-dcb" ]
- [ "amperenodes-debug", "amperenodes-debug" ]
- [ "amperenodes", "amperenodes" ]
- [ "amperenodes-medium", "amperenodes-medium" ]
version: version:
widget: select widget: select
...@@ -56,7 +50,7 @@ attributes: ...@@ -56,7 +50,7 @@ attributes:
reserve_node: reserve_node:
widget: check_box widget: check_box
label: "Reserve the entire node" label: "Reserve the entire node"
form: form:
- version - version
- bc_num_hours - bc_num_hours
......