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

Switching from quartz to ruby in gitlab CI #205

Merged
merged 2 commits into from
Dec 20, 2021
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
14 changes: 7 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Tells Gitlab to recursively update the submodules when cloning the project
#
# ALLOC_NAME:
# On LLNL's quartz, this pipeline creates only one allocation shared among jobs
# On LLNL's ruby, this pipeline creates only one allocation shared among jobs
# in order to save time and resources. This allocation has to be uniquely named
# so that we are sure to retrieve it.
#
Expand All @@ -36,12 +36,12 @@ variables:
# Normally, stages are blocking in Gitlab. However, using the keyword "needs" we
# can express dependencies between job that break the ordering of stages, in
# favor of a DAG.
# In practice q_*, l_* and b_* stages are independently run and start immediately.
# In practice r_*, l_* and b_* stages are independently run and start immediately.

stages:
- q_allocate_resources
- q_build_and_test
- q_release_resources
- r_allocate_resources
- r_build_and_test
- r_release_resources
- l_build_and_test
- b_build_and_test

Expand Down Expand Up @@ -74,8 +74,8 @@ stages:

# This is where jobs are included.
include:
- local: .gitlab/quartz-templates.yml
- local: .gitlab/quartz-jobs.yml
- local: .gitlab/ruby-templates.yml
- local: .gitlab/ruby-jobs.yml
- local: .gitlab/lassen-templates.yml
- local: .gitlab/lassen-jobs.yml
- local: .gitlab/butte-templates.yml
Expand Down
20 changes: 10 additions & 10 deletions .gitlab/quartz-jobs.yml → .gitlab/ruby-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@
clang_10:
variables:
SPEC: " %clang@10.0.1"
extends: .build_and_test_on_quartz
extends: .build_and_test_on_ruby

clang_9:
variables:
SPEC: " %clang@9.0.0"
extends: .build_and_test_on_quartz
extends: .build_and_test_on_ruby

gcc_8_1_0:
variables:
SPEC: "%gcc@8.1.0"
extends: .build_and_test_on_quartz
extends: .build_and_test_on_ruby

# icpc_18_0_2:
# variables:
# SPEC: " tests=none %intel@18.0.2"
# extends: .build_and_test_on_quartz
# extends: .build_and_test_on_ruby

icpc_19_1_0:
variables:
SPEC: "%intel@19.1.0"
extends: .build_and_test_on_quartz
extends: .build_and_test_on_ruby

# EXTRAS

gcc_4_9_3:
variables:
SPEC: "%gcc@4.9.3"
extends: .build_and_test_on_quartz
extends: .build_and_test_on_ruby

clang_10_develop_tpls:
variables:
SPEC: " %clang@10.0.1 ^umpire@develop ^raja@develop ^camp@main"
extends: .build_and_test_on_quartz
#clang_10_develop_tpls:
# variables:
# SPEC: " %clang@10.0.1 ^umpire@develop ^raja@develop ^camp@main"
# extends: .build_and_test_on_ruby
32 changes: 16 additions & 16 deletions .gitlab/quartz-templates.yml → .gitlab/ruby-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,49 @@
##############################################################################

####
# This is the share configuration of jobs for quartz
# This is the share configuration of jobs for ruby

####
# In pre-build phase, allocate a node for builds
.on_quartz:
.on_ruby:
tags:
- shell
- quartz
- ruby
rules:
- if: '$CI_COMMIT_BRANCH =~ /_qnone/ || $ON_QUARTZ == "OFF"' #run except if ...
- if: '$CI_COMMIT_BRANCH =~ /_qnone/ || $ON_RUBY == "OFF"' #run except if ...
when: never
- if: '$CI_JOB_NAME =~ /release_resources/'
when: always
- when: on_success

####
# In pre-build phase, allocate a node for builds
allocate_resources (on quartz):
allocate_resources (on ruby):
variables:
GIT_STRATEGY: none
extends: .on_quartz
stage: q_allocate_resources
extends: .on_ruby
stage: r_allocate_resources
script:
- salloc -N 1 -c 36 -p pdebug -t 20 --no-shell --job-name=${ALLOC_NAME}

####
# In post-build phase, deallocate resources
# Note : make sure this is run even on build phase failure
release_resources (on quartz):
release_resources (on ruby):
variables:
GIT_STRATEGY: none
extends: .on_quartz
stage: q_release_resources
extends: .on_ruby
stage: r_release_resources
script:
- export JOBID=$(squeue -h --name=${ALLOC_NAME} --format=%A)
- ([[ -n "${JOBID}" ]] && scancel ${JOBID})

####
# Generic quartz build job, extending build script
.build_and_test_on_quartz:
extends: [.build_toss_3_x86_64_ib_script, .on_quartz]
stage: q_build_and_test
# Generic ruby build job, extending build script
.build_and_test_on_ruby:
extends: [.build_toss_3_x86_64_ib_script, .on_ruby]
stage: r_build_and_test

.build_and_test_on_quartz_advanced:
extends: [.build_and_test_on_quartz, .advanced_pipeline]
.build_and_test_on_ruby_advanced:
extends: [.build_and_test_on_ruby, .advanced_pipeline]

12 changes: 6 additions & 6 deletions docs/sphinx/developer/uberenv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ Vetted specs

$ ls -c1 .gitlab/*jobs.yml
.gitlab/lassen-jobs.yml
.gitlab/quartz-jobs.yml
.gitlab/ruby-jobs.yml

CI contains jobs for quartz.
CI contains jobs for ruby.

.. code-block:: bash

$ git grep -h "SPEC" .gitlab/quartz-jobs.yml | grep "gcc"
$ git grep -h "SPEC" .gitlab/ruby-jobs.yml | grep "gcc"
SPEC: "%gcc@4.9.3"
SPEC: "%gcc@6.1.0"
SPEC: "%gcc@7.1.0"
SPEC: "%gcc@7.3.0"
SPEC: "%gcc@8.1.0"

We now have a list of the specs vetted on ``quartz``/``toss_3_x86_64_ib``.
We now have a list of the specs vetted on ``ruby``/``toss_3_x86_64_ib``.

.. note::
In practice, one should check if the job is not *allowed to fail*, or even deactivated.
Expand All @@ -60,7 +60,7 @@ In CHAI, the Spack configuration for MacOS contains the default compilers depend
Using Uberenv to generate the host-config file
----------------------------------------------

We have seen that we can safely use `gcc@8.1.0` on quartz. Let us ask for the default configuration first, and then ask for RAJA support and link to develop version of RAJA:
We have seen that we can safely use `gcc@8.1.0` on ruby. Let us ask for the default configuration first, and then ask for RAJA support and link to develop version of RAJA:

.. code-block:: bash

Expand All @@ -71,7 +71,7 @@ Each will generate a CMake cache file, e.g.:

.. code-block:: bash

hc-quartz-toss_3_x86_64_ib-clang@9.0.0-fjcjwd6ec3uen5rh6msdqujydsj74ubf.cmake
hc-ruby-toss_3_x86_64_ib-clang@9.0.0-fjcjwd6ec3uen5rh6msdqujydsj74ubf.cmake

Using host-config files to build CHAI
-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion scripts/spack_packages/umpire/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Umpire(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on('camp cuda_arch={0}'.format(sm_),
when='cuda_arch={0}'.format(sm_))

depends_on('camp@main')
depends_on('camp@0.2.2')

conflicts('+numa', when='@:0.3.2')
conflicts('~c', when='+fortran', msg='Fortran API requires C API')
Expand Down