-
Notifications
You must be signed in to change notification settings - Fork 24
Add CSCS CI #1818
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
Merged
Add CSCS CI #1818
Changes from all commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
9d29aae
Add CSCS CI
havogt 0cf96ed
set timelimit
havogt 07fe6ed
Update cscs.yml
havogt 99faef3
add build step
havogt 32a7854
Merge branch 'cscsci' of https://github.com/GridTools/gridtools into …
havogt 889c8af
fix stage name
havogt 9673248
fix base image
havogt 975f8bc
add python to base
havogt 2d9f7cc
fix build_type
havogt 900b057
add pip
havogt 4ff2ffe
path to requirements
havogt fddd70d
why default no working?
havogt 6dd126b
???
havogt 2979f05
...
havogt 955944f
...
havogt 9962d26
...
havogt bf98eb4
cleanup
havogt 27ef834
set build command
havogt b73a78f
update gcc
havogt e0a680a
update ubuntu
havogt 68fd8e0
use uv
havogt fb5bf00
...
havogt 19c6461
path
havogt 7a0faf1
cuda 12.5.1
havogt 2a1e4f8
disable test
havogt e0cf0fe
add test step
havogt d3d6fe2
.
havogt 32228b7
fix condition
havogt dcd4e84
fix name
havogt c055054
fix dir
havogt ee12f6c
explicit run
havogt 5b1262c
use test runscript with no slurm option
havogt 2244e10
fix run_with_slurm check
havogt 4d17119
test that ci fails on failure
havogt 437ad45
set more env vars
havogt 4763e00
remove c_bindings example
havogt 069fed0
add mpich
havogt 8a3612a
mpich-dev
havogt ba59aac
...
havogt 977a1ef
other mpich...
havogt 3d61ceb
other mpich...
havogt c9155da
use compiler wrappers as compilers
havogt 2712068
change mpi location
havogt e916a25
fix path
havogt ad28349
play with mpi options
havogt dcf3cad
separate mpi job
havogt f33a0ca
try direct ctest
havogt 9d61cb9
try stuff
havogt 9d9f762
remove mpi runner
havogt 4b9c53a
gpus per task
havogt 78c28ba
add some debug prints
havogt 432a0a4
another debug print
havogt 47de3d2
more debug
havogt 7a3c6cd
debug mpi
havogt e93158d
compiler...
havogt e57518f
try again
havogt 53440c8
fix mpich path
havogt a03a141
gpu aware mpi
havogt 112b875
cleanup
havogt 29a8de3
no mpi executable
havogt 3cc6954
cleanup, re-enable github actions
havogt df91cec
fix no mpi exec
havogt 3d0ab85
remove match for old python versions
havogt b80856a
address review comments
havogt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ __pycache__ | |
| /* | ||
|
|
||
| # except | ||
| !ci | ||
| !cmake | ||
| !docs | ||
| !docs_src | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,4 @@ dist/ | |
| setup.cfg | ||
| *.egg-info/ | ||
| src/gridtools_cpp/data | ||
| build/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| ARG UBUNTU_VERSION=24.04 | ||
| ARG CUDA_VERSION | ||
| FROM docker.io/nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION} | ||
| ENV LANG C.UTF-8 | ||
| ENV LC_ALL C.UTF-8 | ||
|
|
||
| ARG DEBIAN_FRONTEND=noninteractive | ||
| RUN apt-get update -qq && \ | ||
| apt-get install -qq -y --no-install-recommends \ | ||
| gfortran \ | ||
| g++ \ | ||
| gcc \ | ||
| strace \ | ||
| build-essential \ | ||
| tar \ | ||
| wget \ | ||
| curl \ | ||
| cmake \ | ||
| ca-certificates \ | ||
| zlib1g-dev \ | ||
| libssl-dev \ | ||
| libbz2-dev \ | ||
| libsqlite3-dev \ | ||
| llvm \ | ||
| libncurses5-dev \ | ||
| libncursesw5-dev \ | ||
| xz-utils \ | ||
| tk-dev \ | ||
| libffi-dev \ | ||
| liblzma-dev \ | ||
| libreadline-dev \ | ||
| python3-dev \ | ||
| python3-pip \ | ||
| git \ | ||
| rustc \ | ||
| htop && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| ARG MPICH_VERSION=3.3.2 | ||
| ARG MPICH_PATH=/usr/local | ||
| RUN wget -q https://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz && \ | ||
| tar -xzf mpich-${MPICH_VERSION}.tar.gz && \ | ||
| cd mpich-${MPICH_VERSION} && \ | ||
| ./configure \ | ||
| --disable-fortran \ | ||
| --prefix=$MPICH_PATH && \ | ||
| make install -j32 && \ | ||
| rm -rf /root/mpich-${MPICH_VERSION}.tar.gz /root/mpich-${MPICH_VERSION} | ||
| RUN echo "${MPICH_PATH}/lib" >> /etc/ld.so.conf.d/cscs.conf && ldconfig | ||
|
|
||
| ENV CXX=${MPICH_PATH}/bin/mpicxx | ||
| ENV CC=${MPICH_PATH}/bin/mpicc | ||
|
|
||
| RUN wget --quiet https://archives.boost.io/release/1.85.0/source/boost_1_85_0.tar.gz && \ | ||
| echo be0d91732d5b0cc6fbb275c7939974457e79b54d6f07ce2e3dfdd68bef883b0b boost_1_85_0.tar.gz > boost_hash.txt && \ | ||
| sha256sum -c boost_hash.txt && \ | ||
| tar xzf boost_1_85_0.tar.gz && \ | ||
| mv boost_1_85_0/boost /usr/local/include/ && \ | ||
| rm boost_1_85_0.tar.gz boost_hash.txt | ||
| ENV BOOST_ROOT /usr/local/ | ||
|
|
||
| ENV CUDA_HOME /usr/local/cuda | ||
| ENV CUDA_ARCH=${CUDA_ARCH} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| ARG BASE_IMAGE | ||
| FROM $BASE_IMAGE | ||
|
|
||
| COPY . /gridtools | ||
|
|
||
| ARG BUILD_TYPE | ||
|
|
||
| ENV GTRUN_BUILD_COMMAND='make -j 32' | ||
| ENV GTCMAKE_Boost_NO_BOOST_CMAKE=ON | ||
| ENV GTCMAKE_Boost_NO_SYSTEM_PATHS=ON | ||
| ENV GTCMAKE_GT_TESTS_REQUIRE_FORTRAN_COMPILER=ON | ||
| ENV GTCMAKE_GT_TESTS_REQUIRE_C_COMPILER=ON | ||
| ENV GTCMAKE_GT_TESTS_REQUIRE_OpenMP=ON | ||
| ENV GTCMAKE_GT_TESTS_REQUIRE_GPU=ON | ||
| ENV GTCMAKE_GT_TESTS_MPI_WITH_MPI_EXECUTABLE=OFF | ||
| ENV GTCMAKE_GT_TESTS_REQUIRE_Python=ON | ||
| ENV GT_ENABLE_STENCIL_DUMP=ON | ||
| ENV GTCMAKE_CMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON | ||
|
|
||
| RUN curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| ENV PATH="/root/.local/bin:${PATH}" | ||
|
|
||
| RUN uv run /gridtools/pyutils/driver.py -v build -b ${BUILD_TYPE} -o build -i install -t install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| include: | ||
| - remote: "https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.ci-ext.yml" | ||
|
|
||
| stages: | ||
| - baseimage | ||
| - build | ||
| - test | ||
|
|
||
| .build_baseimage: | ||
| stage: baseimage | ||
| # we create a tag that depends on the SHA value of ci/base.Dockerfile, this way | ||
| # a new base image is only built when the SHA of this file changes | ||
| # If there are more dependency files that should change the tag-name of the base container | ||
| # image, they can be added too. | ||
| # Since the base image name is runtime dependent, we need to carry the value of it to | ||
| # the following jobs via a dotenv file. | ||
| before_script: | ||
| # include build arguments in hash since we use a parameterized Docker file | ||
| - DOCKER_TAG=`echo "$(cat $DOCKERFILE) $DOCKER_BUILD_ARGS" | sha256sum | head -c 16` | ||
| - export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/public/$ARCH/base/gridtools-ci:$DOCKER_TAG | ||
| - echo "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> build.env | ||
| artifacts: | ||
| reports: | ||
| dotenv: build.env | ||
| variables: | ||
| DOCKERFILE: ci/base.Dockerfile | ||
| # change to 'always' if you want to rebuild, even if target tag exists already (if-not-exists is the default, i.e. we could also skip the variable) | ||
| CSCS_REBUILD_POLICY: if-not-exists | ||
| DOCKER_BUILD_ARGS: '["CUDA_VERSION=$CUDA_VERSION", "UBUNTU_VERSION=$UBUNTU_VERSION"]' | ||
| build_baseimage_aarch64: | ||
| extends: [.container-builder-cscs-gh200, .build_baseimage] | ||
| variables: | ||
| CUDA_VERSION: 12.6.2 | ||
| CUDA_ARCH: sm_90 | ||
| UBUNTU_VERSION: 24.04 | ||
| SLURM_TIMELIMIT: 10 | ||
|
|
||
|
|
||
| .build_image: | ||
| stage: build | ||
| variables: | ||
| # make sure we use a unique name here, otherwise we could create a race condition, when multiple pipelines | ||
| # are running. | ||
| PERSIST_IMAGE_NAME: $CSCS_REGISTRY_PATH/public/$ARCH/gridtools/gridtools-ci:$CI_COMMIT_SHA | ||
| DOCKERFILE: ci/build.Dockerfile | ||
| DOCKER_BUILD_ARGS: '["BASE_IMAGE=${BASE_IMAGE}", "BUILD_TYPE=release"]' | ||
| build_image_aarch64: | ||
| extends: [.container-builder-cscs-gh200, .build_image] | ||
| variables: | ||
| SLURM_TIMELIMIT: 10 | ||
|
|
||
| .test_helper: | ||
| stage: test | ||
| image: $CSCS_REGISTRY_PATH/public/$ARCH/gridtools/gridtools-ci:$CI_COMMIT_SHA | ||
| variables: | ||
| GTRUN_WITH_SLURM: False # since we are already in a SLURM job | ||
| SLURM_JOB_NUM_NODES: 1 | ||
| SLURM_TIMELIMIT: 10 | ||
| CSCS_CUDA_MPS: 0 | ||
|
|
||
| test_aarch64: | ||
| extends: [.container-runner-daint-gh200, .test_helper] | ||
| script: | ||
| - cd /build && ctest -LE mpi --output-on-failure | ||
| variables: | ||
| SLURM_NTASKS: 1 | ||
|
|
||
| test_aarch64_mpi: | ||
| extends: [.container-runner-daint-gh200, .test_helper] | ||
| script: | ||
| - export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH | ||
| - export LD_PRELOAD=/usr/lib64/libmpi_gtl_cuda.so | ||
| - cd /build && ctest -L mpi --output-on-failure | ||
| variables: | ||
| NVIDIA_VISIBLE_DEVICES: all | ||
| SLURM_NTASKS: 4 | ||
| SLURM_GPUS_PER_TASK: 1 | ||
| MPICH_GPU_SUPPORT_ENABLED: 1 | ||
| USE_MPI: "YES" | ||
| SLURM_MPI_TYPE: cray_shasta | ||
| CSCS_ADDITIONAL_MOUNTS: '["/opt/cray/pe/mpich/8.1.28/ofi/gnu/12.3/lib/libmpi.so:/usr/local/lib/libmpi.so.12.1.8", "/opt/cray/pe/lib64/libpmi.so.0:/usr/lib64/libpmi.so.0", "/opt/cray/pe/lib64/libpmi2.so.0:/usr/lib64/libpmi2.so.0", "/opt/cray/pals/1.4/lib/libpals.so.0:/usr/lib64/libpals.so.0", "/usr/lib64/libgfortran.so.5:/usr/lib64/libgfortran.so.5", "/opt/cray/pe/mpich/8.1.28/gtl/lib/libmpi_gtl_cuda.so:/usr/lib64/libmpi_gtl_cuda.so"]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: just as a shortcut you can also do this:
? (Also minor: I much prefer the long versions of options like
--checksince there's less guessing whatchappens to stand for in this particular case).Then again, I guess this will be removed soon enough anyway...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll not touch it, because I want to delete it later today.