From eaf3c0e1f70a79dfe9fc092c57822c8431ec35f3 Mon Sep 17 00:00:00 2001 From: Nicolas Chan Date: Tue, 27 Apr 2021 15:21:22 -0700 Subject: [PATCH 1/4] Fix GPU options --- brc_jupyter-compute/form.js | 4 ++-- brc_jupyter-compute/form.yml.erb | 12 +++--------- brc_jupyter-compute/submit.yml.erb | 8 +++----- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/brc_jupyter-compute/form.js b/brc_jupyter-compute/form.js index 56b242c..afda306 100644 --- a/brc_jupyter-compute/form.js +++ b/brc_jupyter-compute/form.js @@ -113,7 +113,7 @@ function set_slurm_partition_change_handler() { let slurm_partition = $("#batch_connect_session_context_slurm_partition"); slurm_partition.change(() => { toggle_gres_value_field_visibility(); - toggle_cpu_cores_field_visibility(); + // toggle_cpu_cores_field_visibility(); toggle_slurm_account_qos_fields_visibility(); update_available_options(); }); @@ -145,7 +145,7 @@ $(document).ready(function() { set_available_partitions(); // Ensure that fields are shown or hidden based on what was set in the last session toggle_gres_value_field_visibility(); - toggle_cpu_cores_field_visibility(); + // toggle_cpu_cores_field_visibility(); toggle_slurm_account_qos_fields_visibility(); // Update available options appropriately update_available_options(); diff --git a/brc_jupyter-compute/form.yml.erb b/brc_jupyter-compute/form.yml.erb index e83e48f..a5c9c27 100644 --- a/brc_jupyter-compute/form.yml.erb +++ b/brc_jupyter-compute/form.yml.erb @@ -29,7 +29,6 @@ form: - slurm_account - qos_name - num_nodes - - num_cores - gres_value - bc_num_hours - user_email @@ -60,7 +59,7 @@ attributes: qos_name: label: "SLURM QoS Name" - help: "Most users can leave it black for default assignment, Savio Condo users want to specify their condo QoS name" + help: "Most users can leave it blank for default assignment, Savio Condo users want to specify their condo QoS name" widget: select num_nodes: @@ -68,14 +67,9 @@ attributes: help: "Please specify the number of nodes you want for this Jupyter Server" value: 1 - num_cores: - label: "Number of CPU cores per Node" - help: "Please specify the number of CPU cores you want per node for this Jupyter Server" - value: 1 - gres_value: - label: "Number and type of GPUs" - help: "You choose to run in a partition with GPUs. Please specify the GRES value i.e the number and type of GPUs you want for this Jupyter Server" + label: "Number of GPUs" + help: "You choose to run in a partition with GPUs. Please specify the number and type of GPUs you want for this Jupyter Server." user_email: label: "Email address (optional)" diff --git a/brc_jupyter-compute/submit.yml.erb b/brc_jupyter-compute/submit.yml.erb index 3b245f6..6476bf2 100644 --- a/brc_jupyter-compute/submit.yml.erb +++ b/brc_jupyter-compute/submit.yml.erb @@ -51,11 +51,9 @@ script: <%- end %> <%- if gres_value != "" %> - "--gres" - - "<%= gres_value %>" - <%- end %> - <%- if num_cores != "" %> - - "--ntasks-per-core" - - "<%= num_cores %>" + - "gpu:<%= gres_value %>" + - "--cpus-per-task" + - "<%= gres_value.to_i() * 2 %>" <%- end %> - "--nodes" - "<%= num_nodes %>" From bd6a13ce2efc9b89fc7a9837b8f58f3662420f2e Mon Sep 17 00:00:00 2001 From: Nicolas Chan Date: Tue, 27 Apr 2021 16:29:56 -0700 Subject: [PATCH 2/4] Remove type of GPUs in help text --- brc_jupyter-compute/form.yml.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brc_jupyter-compute/form.yml.erb b/brc_jupyter-compute/form.yml.erb index a5c9c27..586264a 100644 --- a/brc_jupyter-compute/form.yml.erb +++ b/brc_jupyter-compute/form.yml.erb @@ -69,7 +69,7 @@ attributes: gres_value: label: "Number of GPUs" - help: "You choose to run in a partition with GPUs. Please specify the number and type of GPUs you want for this Jupyter Server." + help: "You choose to run in a partition with GPUs. Please specify the number of GPUs you want for this Jupyter Server." user_email: label: "Email address (optional)" From b0848ba03a96c78ffc8ac8a05bcf902d2be6eacd Mon Sep 17 00:00:00 2001 From: Nicolas Chan Date: Thu, 6 May 2021 10:32:33 -0700 Subject: [PATCH 3/4] Reinstate ntasks-per-node for htc/knl partitions --- brc_jupyter-compute/form.js | 6 +++--- brc_jupyter-compute/form.yml.erb | 5 +++++ brc_jupyter-compute/submit.yml.erb | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/brc_jupyter-compute/form.js b/brc_jupyter-compute/form.js index afda306..62c933a 100644 --- a/brc_jupyter-compute/form.js +++ b/brc_jupyter-compute/form.js @@ -57,7 +57,7 @@ function toggle_gres_value_field_visibility() { function toggle_cpu_cores_field_visibility() { let slurm_partition = $("#batch_connect_session_context_slurm_partition"); let per_core_partitions = [ - 'savio2_gpu', 'savio2_1080ti', 'savio3_gpu', 'savio2_htc', 'savio2_knl', 'savio3_htc', 'savio3_2080ti' + 'savio2_htc', 'savio2_knl', 'savio3_htc' ]; toggle_visibility_of_form_group( @@ -113,7 +113,7 @@ function set_slurm_partition_change_handler() { let slurm_partition = $("#batch_connect_session_context_slurm_partition"); slurm_partition.change(() => { toggle_gres_value_field_visibility(); - // toggle_cpu_cores_field_visibility(); + toggle_cpu_cores_field_visibility(); toggle_slurm_account_qos_fields_visibility(); update_available_options(); }); @@ -145,7 +145,7 @@ $(document).ready(function() { set_available_partitions(); // Ensure that fields are shown or hidden based on what was set in the last session toggle_gres_value_field_visibility(); - // toggle_cpu_cores_field_visibility(); + toggle_cpu_cores_field_visibility(); toggle_slurm_account_qos_fields_visibility(); // Update available options appropriately update_available_options(); diff --git a/brc_jupyter-compute/form.yml.erb b/brc_jupyter-compute/form.yml.erb index 586264a..d39bcfe 100644 --- a/brc_jupyter-compute/form.yml.erb +++ b/brc_jupyter-compute/form.yml.erb @@ -29,6 +29,7 @@ form: - slurm_account - qos_name - num_nodes + - num_cores - gres_value - bc_num_hours - user_email @@ -67,6 +68,10 @@ attributes: help: "Please specify the number of nodes you want for this Jupyter Server" value: 1 + num_cores: + label: "Number of CPU cores per Node" + help: "Please specify the number of CPU cores you want per node for this Jupyter Server" + gres_value: label: "Number of GPUs" help: "You choose to run in a partition with GPUs. Please specify the number of GPUs you want for this Jupyter Server." diff --git a/brc_jupyter-compute/submit.yml.erb b/brc_jupyter-compute/submit.yml.erb index 6476bf2..390c766 100644 --- a/brc_jupyter-compute/submit.yml.erb +++ b/brc_jupyter-compute/submit.yml.erb @@ -55,5 +55,9 @@ script: - "--cpus-per-task" - "<%= gres_value.to_i() * 2 %>" <%- end %> + <%- if num_cores != "" %> + - "--ntasks-per-node" + - "<%= num_cores %>" + <%- end %> - "--nodes" - "<%= num_nodes %>" From 8cf58e202315638966a3f6478cfcaf1cc711c7fc Mon Sep 17 00:00:00 2001 From: Nicolas Chan Date: Thu, 6 May 2021 11:04:59 -0700 Subject: [PATCH 4/4] Add CPU option to GPU partitions --- brc_jupyter-compute/form.js | 2 +- brc_jupyter-compute/form.yml.erb | 2 +- brc_jupyter-compute/submit.yml.erb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/brc_jupyter-compute/form.js b/brc_jupyter-compute/form.js index 62c933a..56b242c 100644 --- a/brc_jupyter-compute/form.js +++ b/brc_jupyter-compute/form.js @@ -57,7 +57,7 @@ function toggle_gres_value_field_visibility() { function toggle_cpu_cores_field_visibility() { let slurm_partition = $("#batch_connect_session_context_slurm_partition"); let per_core_partitions = [ - 'savio2_htc', 'savio2_knl', 'savio3_htc' + 'savio2_gpu', 'savio2_1080ti', 'savio3_gpu', 'savio2_htc', 'savio2_knl', 'savio3_htc', 'savio3_2080ti' ]; toggle_visibility_of_form_group( diff --git a/brc_jupyter-compute/form.yml.erb b/brc_jupyter-compute/form.yml.erb index d39bcfe..81accee 100644 --- a/brc_jupyter-compute/form.yml.erb +++ b/brc_jupyter-compute/form.yml.erb @@ -70,7 +70,7 @@ attributes: num_cores: label: "Number of CPU cores per Node" - help: "Please specify the number of CPU cores you want per node for this Jupyter Server" + help: "Please specify the number of CPU cores per node. If using a GPU, the total number of CPUs in the job must be 2 times the number of GPUs." gres_value: label: "Number of GPUs" diff --git a/brc_jupyter-compute/submit.yml.erb b/brc_jupyter-compute/submit.yml.erb index 390c766..0747fac 100644 --- a/brc_jupyter-compute/submit.yml.erb +++ b/brc_jupyter-compute/submit.yml.erb @@ -52,10 +52,10 @@ script: <%- if gres_value != "" %> - "--gres" - "gpu:<%= gres_value %>" - - "--cpus-per-task" - - "<%= gres_value.to_i() * 2 %>" <%- end %> <%- if num_cores != "" %> + - "--cpus-per-task" + - "1" - "--ntasks-per-node" - "<%= num_cores %>" <%- end %>