From e2f66ccb43b7df8e982361552033d073a0d2c824 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Thu, 28 Sep 2023 14:35:39 -0400 Subject: [PATCH] allow pitzer desktop to choose # of GPUs (#246) --- apps.awesim.org/apps/bc_desktop/pitzer.yml.erb | 15 ++++++++++++++- .../apps/bc_desktop/submit/slurm.yml.erb | 2 +- ondemand.osc.edu/apps/bc_desktop/pitzer.yml.erb | 15 ++++++++++++++- .../apps/bc_desktop/submit/slurm.yml.erb | 2 +- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/apps.awesim.org/apps/bc_desktop/pitzer.yml.erb b/apps.awesim.org/apps/bc_desktop/pitzer.yml.erb index bb1392a..628795f 100644 --- a/apps.awesim.org/apps/bc_desktop/pitzer.yml.erb +++ b/apps.awesim.org/apps/bc_desktop/pitzer.yml.erb @@ -56,7 +56,10 @@ attributes: min: 1 max: 48 step: 1 - gpus: "" + gpus: + widget: number_field + min: 0 + max: 4 licenses: help: | Licenses are comma separeated in the format '\@osc:\<# of licenses\>' like @@ -91,50 +94,60 @@ attributes: "any", "any", data-min-cores: 1, data-max-cores: 80, + data-set-gpus: 0, ] - [ "40 core", "any-40core", data-min-cores: 1, data-max-cores: 40, + data-set-gpus: 0, ] - [ "48 core", "any-48core", data-min-cores: 1, data-max-cores: 48, + data-set-gpus: 0, ] - [ "any gpu", "gpu-any", data-min-cores: 1, data-max-cores: 48, + data-set-gpus: 1, ] - [ "40 core with gpu", "gpu-40core", data-min-cores: 1, data-max-cores: 40, + data-set-gpus: 1, ] - [ "48 core with gpu", "gpu-48core", data-min-cores: 1, data-max-cores: 48, + data-set-gpus: 1, ] - [ "densegpu", "densegpu", data-min-cores: 1, data-max-cores: 48, + data-set-gpus: 4, ] - [ "visualization node", "vis", data-min-cores: 1, data-max-cores: 48, + data-set-gpus: 1, ] - [ "largemem", "largemem", data-min-cores: 24, data-max-cores: 48, + data-set-gpus: 0, ] - [ "hugemem", "hugemem", data-min-cores: 20, data-max-cores: 80, + data-set-gpus: 0, ] submit: submit/slurm.yml.erb \ No newline at end of file diff --git a/apps.awesim.org/apps/bc_desktop/submit/slurm.yml.erb b/apps.awesim.org/apps/bc_desktop/submit/slurm.yml.erb index d9c9a7e..82488fe 100644 --- a/apps.awesim.org/apps/bc_desktop/submit/slurm.yml.erb +++ b/apps.awesim.org/apps/bc_desktop/submit/slurm.yml.erb @@ -22,7 +22,7 @@ end def gpu_count - if !gpus.nil? && !gpus.empty? + if !gpus.nil? && !gpus.empty? && gpus.to_i.positive? gpus else 1 diff --git a/ondemand.osc.edu/apps/bc_desktop/pitzer.yml.erb b/ondemand.osc.edu/apps/bc_desktop/pitzer.yml.erb index bb1392a..628795f 100644 --- a/ondemand.osc.edu/apps/bc_desktop/pitzer.yml.erb +++ b/ondemand.osc.edu/apps/bc_desktop/pitzer.yml.erb @@ -56,7 +56,10 @@ attributes: min: 1 max: 48 step: 1 - gpus: "" + gpus: + widget: number_field + min: 0 + max: 4 licenses: help: | Licenses are comma separeated in the format '\@osc:\<# of licenses\>' like @@ -91,50 +94,60 @@ attributes: "any", "any", data-min-cores: 1, data-max-cores: 80, + data-set-gpus: 0, ] - [ "40 core", "any-40core", data-min-cores: 1, data-max-cores: 40, + data-set-gpus: 0, ] - [ "48 core", "any-48core", data-min-cores: 1, data-max-cores: 48, + data-set-gpus: 0, ] - [ "any gpu", "gpu-any", data-min-cores: 1, data-max-cores: 48, + data-set-gpus: 1, ] - [ "40 core with gpu", "gpu-40core", data-min-cores: 1, data-max-cores: 40, + data-set-gpus: 1, ] - [ "48 core with gpu", "gpu-48core", data-min-cores: 1, data-max-cores: 48, + data-set-gpus: 1, ] - [ "densegpu", "densegpu", data-min-cores: 1, data-max-cores: 48, + data-set-gpus: 4, ] - [ "visualization node", "vis", data-min-cores: 1, data-max-cores: 48, + data-set-gpus: 1, ] - [ "largemem", "largemem", data-min-cores: 24, data-max-cores: 48, + data-set-gpus: 0, ] - [ "hugemem", "hugemem", data-min-cores: 20, data-max-cores: 80, + data-set-gpus: 0, ] submit: submit/slurm.yml.erb \ No newline at end of file diff --git a/ondemand.osc.edu/apps/bc_desktop/submit/slurm.yml.erb b/ondemand.osc.edu/apps/bc_desktop/submit/slurm.yml.erb index d9c9a7e..82488fe 100644 --- a/ondemand.osc.edu/apps/bc_desktop/submit/slurm.yml.erb +++ b/ondemand.osc.edu/apps/bc_desktop/submit/slurm.yml.erb @@ -22,7 +22,7 @@ end def gpu_count - if !gpus.nil? && !gpus.empty? + if !gpus.nil? && !gpus.empty? && gpus.to_i.positive? gpus else 1