Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

begin to migrate owens to slurm by adding owens-slurm cluster #3

Merged
merged 3 commits into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
variables:
# older versions of git have issues fetching.
GIT_STRATEGY: clone


before_script:
- docker info
- '[ -d tmp ] || mkdir tmp'
Expand All @@ -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/*
8 changes: 5 additions & 3 deletions form.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
cluster: "owens"
cluster:
- "owens"
- "owens-slurm"
form:
- version
- bc_account
Expand Down Expand Up @@ -37,8 +39,8 @@ attributes:
available RAM as well as 48 cores. There are 16 of these nodes on
Owens. Requesting hugemem nodes allocates entire nodes.
options:
- [ "any", "" ]
- [ "hugemem", ":hugemem" ]
- "any"
- "hugemem"
version:
widget: select
label: "Stata version"
Expand Down
28 changes: 22 additions & 6 deletions submit.yml.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
<%-
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'
partition = []

if node_type == 'hugemem'
ppn = 48
partition_str = bc_num_slots.to_i > 1 ? "hugemem-parallel" : "hugemem"
partition = [ "--partition", partition_str ]
end

slurm_args = partition + [ "--nodes", "#{nodes}", "--ntasks-per-node", "#{ppn}", "--licenses", "stata@osc" ]
torque_args = node_type == 'any' ? "#{nodes}:ppn=#{ppn}" : "#{nodes}:ppn=#{ppn}:#{node_type}"
%>
---
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 %>"
software: 'stata'
nodes: "<%= torque_args %>"
software: "stata"
<%- else %>
<%- slurm_args.each do |arg| %>
- "<%= arg %>"
<%- end %>
<%- end %>