diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c9d51866af7472b060a9b4a3063a866a52a94d87..cd1996e4638549c3bc5d3023d7d08d0c7effe291 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,8 @@ +variables: + # older versions of git have issues fetching. + GIT_STRATEGY: clone + + before_script: - docker info - '[ -d tmp ] || mkdir tmp' @@ -20,15 +25,18 @@ rpm-build: name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG" +rpm-deploy-ci: + stage: deploy + only: + - tags + script: + - ./tmp/ondemand-packaging/release.py --debug --pkey /systems/osc_certs/ssh/ondemand-packaging/id_rsa -c ci ./tmp/output/* rpm-deploy: - variables: - RLS_SCRIPT: "./tmp/ondemand-packaging/release.py" - RLS_KEY: "/systems/osc_certs/ssh/ondemand-packaging/id_rsa" - RLS_OUTPUT: "./tmp/output/*" - SECTION: "main" stage: deploy only: - tags + except: + variables: + - $CI_COMMIT_TAG =~ /.*_.*/ script: - - if [[ "$CI_COMMIT_TAG" =~ .*_.* ]]; then export SECTION=ci; fi - - $RLS_SCRIPT --debug --pkey $RLS_KEY -c $SECTION $RLS_OUTPUT + - ./tmp/ondemand-packaging/release.py --debug --pkey /systems/osc_certs/ssh/ondemand-packaging/id_rsa -c main ./tmp/output/* diff --git a/form.yml b/form.yml index b40739a501ea45402d82954138ecac3c82a86b25..b3d3aad1dfcde5d7868a1359e8a7d01b48f7e831 100644 --- a/form.yml +++ b/form.yml @@ -1,5 +1,7 @@ --- -cluster: "owens" +cluster: + - "owens" + - "owens-slurm" form: - version - bc_account @@ -41,9 +43,9 @@ attributes: running in the background. This utilizes the GPU for hardware accelerated 3D visualization. There are 160 of these nodes on Owens. options: - - [ "any", "" ] - - [ "hugemem", ":hugemem" ] - - [ "vis", ":vis:gpus=1" ] + - "any" + - "hugemem" + - "vis" version: widget: select label: "MATLAB version" diff --git a/submit.yml.erb b/submit.yml.erb index 1ced8356be63afee9bc6a62e6bdf2f47f620fc13..4adeaa3f7a5d4119cd647fb800b7cbda81ad419f 100644 --- a/submit.yml.erb +++ b/submit.yml.erb @@ -1,13 +1,32 @@ <%- -ppn = num_cores.blank? ? 28 : num_cores.to_i -if node_type == ':hugemem' - ppn = 48 -end + ppn = num_cores.blank? ? 28 : num_cores.to_i + nodes = bc_num_slots.blank? ? 1 : bc_num_slots.to_i + torque_cluster = OodAppkit.clusters[cluster].job_config[:adapter] == 'torque' + + case node_type + when "hugemem" + ppn = 48 + partition = bc_num_slots.to_i > 1 ? "hugemem-parallel" : "hugemem" + slurm_args = [ "--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}", "--partition", partition ] + torque_args = "#{nodes}:ppn=#{ppn}:#{node_type}" + when "vis" + slurm_args = ["--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}", "--gpus-per-node", "1", "--gres", "vis" ] + torque_args = "#{nodes}:ppn=#{ppn}:#{node_type}:gpus=1" + else + slurm_args = ["--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}" ] + torque_args = "#{nodes}:ppn=#{ppn}" + end %> --- batch_connect: template: vnc script: native: + <%- if torque_cluster %> resources: - nodes: "<%= bc_num_slots.blank? ? "1" : bc_num_slots.to_i %>:ppn=<%= ppn %><%= node_type %>" + nodes: "<%= torque_args %>" + <%- else %> + <%- slurm_args.each do |arg| %> + - "<%= arg %>" + <%- end %> + <%- end %>