From 8dcb5a9e169ebe085d50f205816c3df8218dd5d7 Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Thu, 3 Dec 2026 16:07:21 +0100 Subject: [PATCH 1/5] ci: run MPI tests with CUDA-aware Open MPI from a single Slurm task The MPI test job no longer works on daint: the Cray PE is not available under /opt/cray/pe anymore, so the host MPICH/PMI libraries can no longer be mounted into the container and the container fails to start. - Build CUDA-aware Open MPI 5.0.10 in the base image instead of MPICH 3.3.2, which is not GPU-aware (GPU MPI tests segfault) and also failed a CPU halo exchange test. CUDA support lives in run-time loadable components, so libmpi does not depend on the CUDA driver, which is not available at image build time; the build fails if this is not the case. - Run ctest from a single Slurm task and launch each MPI test with the container's 'mpiexec -n 4' (GT_TESTS_MPI_WITH_MPI_EXECUTABLE=ON). Running ctest concurrently in 4 Slurm tasks hangs before starting any test. PRRTE is told to ignore Slurm so that all ranks run locally. - Check Open MPI's CUDA support with ompi_info on the GPU node. Co-Authored-By: Claude Opus 5.5 --- ci/base.Dockerfile | 51 ++++++++++++++++++++++++++++++++++----------- ci/build.Dockerfile | 2 +- ci/cscs.yml | 23 +++++++++++++------- 3 files changed, 55 insertions(+), 21 deletions(-) diff --git a/ci/base.Dockerfile b/ci/base.Dockerfile index b3e015784..b790cf622 100644 --- a/ci/base.Dockerfile +++ b/ci/base.Dockerfile @@ -27,6 +27,8 @@ RUN apt-get update -qq && \ xz-utils \ tk-dev \ libffi-dev \ + libevent-dev \ + libhwloc-dev \ liblzma-dev \ libreadline-dev \ python3-dev \ @@ -36,20 +38,45 @@ RUN apt-get update -qq && \ 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} && \ +# CUDA-aware Open MPI, without the Slingshot stack (libfabric/cxi, xpmem, gdrcopy): the MPI +# tests run on a single node, launched with the container's own mpiexec, so the shared-memory +# transport is enough. +# CUDA support lives in run-time loadable components (accelerator-cuda, btl-smcuda, ...), +# so libmpi does not depend on the CUDA driver, which is not available at image build time +# (the driver stubs are only used to build those components). +ARG OMPI_VERSION=5.0.10 +ARG MPI_PATH=/usr/local +RUN set -eux; \ + curl -fsSL "https://download.open-mpi.org/release/open-mpi/v${OMPI_VERSION%.*}/openmpi-${OMPI_VERSION}.tar.gz" -o /tmp/ompi.tar.gz; \ + tar -C /tmp -xzf /tmp/ompi.tar.gz; \ + cd "/tmp/openmpi-${OMPI_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 + --prefix=${MPI_PATH} \ + --disable-mpi-fortran \ + --with-libevent=external \ + --with-hwloc=external \ + --with-pmix=internal \ + --with-prrte=internal \ + --with-cuda=/usr/local/cuda \ + --with-cuda-libdir=/usr/local/cuda/lib64/stubs; \ + make -j"$(nproc)" install; \ + cd /; \ + rm -rf "/tmp/openmpi-${OMPI_VERSION}" /tmp/ompi.tar.gz; \ + ldconfig; \ + # fail the image build if the CUDA component was not built (it is only loadable on + # GPU nodes, so the run-time check with ompi_info is done in the test job) + test -f ${MPI_PATH}/lib/openmpi/mca_accelerator_cuda.so; \ + # libmpi must not depend on driver libraries that only exist as stubs at build time + if readelf -d ${MPI_PATH}/lib/libmpi.so | grep -E 'libcuda|libnvidia-ml'; then \ + echo "libmpi depends on NVIDIA driver libraries" >&2; exit 1; \ + fi; \ + ompi_info --version -ENV CXX=${MPICH_PATH}/bin/mpicxx -ENV CC=${MPICH_PATH}/bin/mpicc +ENV NVIDIA_VISIBLE_DEVICES=all +ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility + +ENV CXX=${MPI_PATH}/bin/mpicxx +ENV CC=${MPI_PATH}/bin/mpicc ENV CUDA_HOME /usr/local/cuda ENV CUDA_ARCH=${CUDA_ARCH} diff --git a/ci/build.Dockerfile b/ci/build.Dockerfile index 624441968..88de8b3c0 100644 --- a/ci/build.Dockerfile +++ b/ci/build.Dockerfile @@ -10,7 +10,7 @@ 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_MPI_WITH_MPI_EXECUTABLE=ON ENV GTCMAKE_GT_TESTS_REQUIRE_Python=ON ENV GT_ENABLE_STENCIL_DUMP=ON ENV GTCMAKE_CMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON diff --git a/ci/cscs.yml b/ci/cscs.yml index 8e01c9efa..ecc2ce90d 100644 --- a/ci/cscs.yml +++ b/ci/cscs.yml @@ -33,7 +33,8 @@ build_baseimage_aarch64: CUDA_VERSION: 12.6.2 CUDA_ARCH: sm_90 UBUNTU_VERSION: 24.04 - SLURM_TIMELIMIT: 10 + # building Open MPI from source does not fit in 10 minutes + SLURM_TIMELIMIT: 60 .build_image: @@ -68,14 +69,20 @@ test_aarch64: 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 + # fail early if Open MPI's CUDA support is not usable on the GPU node + - ompi_info --parsable --all | grep 'mpi_built_with_cuda_support:value:true' - cd /build && ctest -L mpi --output-on-failure variables: + # a single Slurm task runs ctest, each MPI test is launched with `mpiexec -n 4` + # (GT_TESTS_MPI_WITH_MPI_EXECUTABLE=ON) on the local node + SLURM_NTASKS: 1 + SLURM_GPUS_PER_NODE: 4 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"]' + # PRRTE detects Slurm (SLURM_JOBID) and would take the allocation (1 task => 1 slot) + # from it and try to use srun, which is not available inside the container: ignore + # Slurm and run all ranks on the local node, without binding (the task's cpuset is + # managed by Slurm) + PRTE_MCA_ras: ^slurm + PRTE_MCA_plm: ^slurm + PRTE_MCA_hwloc_default_binding_policy: none From 61aa0b535e09f6077210bcfc0cc8f41b430c1b48 Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Thu, 3 Dec 2026 18:40:15 +0100 Subject: [PATCH 2/5] ci: pin Python package workflow container jobs to ubuntu-24.04 ubuntu-latest is now Ubuntu 26.04, where setup-python picks the runner's preinstalled Python 3.11 built for 26.04; inside the gridtools-base container its ssl module is unusable and pip cannot reach PyPI, so the test-wheel (3.11) job fails. Pin the runner until the base images are rebuilt on a newer Ubuntu. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/python-package-tests-and-deploy.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package-tests-and-deploy.yml b/.github/workflows/python-package-tests-and-deploy.yml index 497f9758e..1bff47318 100644 --- a/.github/workflows/python-package-tests-and-deploy.yml +++ b/.github/workflows/python-package-tests-and-deploy.yml @@ -11,7 +11,10 @@ on: jobs: build: - runs-on: ubuntu-latest + # TODO: go back to ubuntu-latest once the gridtools-base images are rebuilt on a newer + # Ubuntu. On ubuntu-latest (26.04) setup-python uses the runner's preinstalled Python + # (3.11), built for 26.04, whose ssl module does not work inside the older container. + runs-on: ubuntu-24.04 container: ghcr.io/gridtools/gridtools-base:${{ matrix.compiler }} strategy: matrix: @@ -83,7 +86,10 @@ jobs: test-wheel: needs: build - runs-on: ubuntu-latest + # TODO: go back to ubuntu-latest once the gridtools-base images are rebuilt on a newer + # Ubuntu. On ubuntu-latest (26.04) setup-python uses the runner's preinstalled Python + # (3.11), built for 26.04, whose ssl module does not work inside the older container. + runs-on: ubuntu-24.04 container: ghcr.io/gridtools/gridtools-base:${{ matrix.compiler }} strategy: matrix: From e5c48abfc09de1cc4d6e374a84c546b0f4ece741 Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Fri, 4 Dec 2026 07:58:21 +0100 Subject: [PATCH 3/5] tests: select the GPU from the MPI launcher's local rank The MPI test driver picked the GPU from MV2_COMM_WORLD_LOCAL_RANK or SLURM_LOCALID. When the ranks are started by mpiexec inside a single Slurm task (as in CI now), all of them inherit SLURM_LOCALID=0 and use the same GPU. Read Open MPI's and MPICH's local rank variables first. Log the rank, local rank source, and GPU (with PCI ID) for each rank, and print it in CI for one GPU MPI test. Co-Authored-By: Claude Opus 5.5 --- ci/cscs.yml | 2 ++ tests/src/mpi_test_driver.cpp | 43 +++++++++++++++++++++++++++++++---- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/ci/cscs.yml b/ci/cscs.yml index ecc2ce90d..c9b52cfcc 100644 --- a/ci/cscs.yml +++ b/ci/cscs.yml @@ -71,6 +71,8 @@ test_aarch64_mpi: script: # fail early if Open MPI's CUDA support is not usable on the GPU node - ompi_info --parsable --all | grep 'mpi_built_with_cuda_support:value:true' + # show the GPU used by each rank (logged by tests/src/mpi_test_driver.cpp) + - cd /build && ctest -R '^test_distributed_boundaries_gpu$' -V | grep '\[mpi_test_driver\]' - cd /build && ctest -L mpi --output-on-failure variables: # a single Slurm task runs ctest, each MPI test is launched with `mpiexec -n 4` diff --git a/tests/src/mpi_test_driver.cpp b/tests/src/mpi_test_driver.cpp index af5363b12..a14f0f8b0 100644 --- a/tests/src/mpi_test_driver.cpp +++ b/tests/src/mpi_test_driver.cpp @@ -16,17 +16,27 @@ #ifdef GT_HAS_CUDA +#include #include #include #include namespace { + // name of the environment variable providing the node-local rank, nullptr if none is set + char const *local_rank_var() { + // Open MPI, MPICH (hydra), MVAPICH2, Slurm (ranks started by srun). The MPI launchers' + // variables come first: when the ranks are started by mpiexec inside a single Slurm task, + // all of them inherit the same SLURM_LOCALID. + for (auto var : {"OMPI_COMM_WORLD_LOCAL_RANK", "MPI_LOCALRANKID", "MV2_COMM_WORLD_LOCAL_RANK", "SLURM_LOCALID"}) + if (std::getenv(var)) + return var; + return nullptr; + } + int get_local_rank() { - for (auto var : {"MV2_COMM_WORLD_LOCAL_RANK", "SLURM_LOCALID"}) - if (auto *str = std::getenv(var)) - return std::atoi(str); - return 0; + auto *var = local_rank_var(); + return var ? std::atoi(std::getenv(var)) : 0; } int dev_device_count() { @@ -48,6 +58,31 @@ int main(int argc, char **argv) { gridtools::gcl::init(argc, argv); +#ifdef GT_HAS_CUDA + { + // log the GPU used by each rank, to check that the ranks are spread over the GPUs + int rank, size, device, count; + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Comm_size(MPI_COMM_WORLD, &size); + GT_CUDA_CHECK(cudaGetDevice(&device)); + GT_CUDA_CHECK(cudaGetDeviceCount(&count)); + cudaDeviceProp prop; + GT_CUDA_CHECK(cudaGetDeviceProperties(&prop, device)); + auto *var = local_rank_var(); + std::fprintf(stderr, + "[mpi_test_driver] rank %d/%d: local rank %d (%s), GPU %d of %d, PCI %04x:%02x:%02x\n", + rank, + size, + get_local_rank(), + var ? var : "unset", + device, + count, + prop.pciDomainID, + prop.pciBusID, + prop.pciDeviceID); + } +#endif + // initialize google test environment testing::InitGoogleTest(&argc, argv); From 62d5daf0935bc8d2cf0c7cc6f95006c9d5d43821 Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Fri, 4 Dec 2026 19:16:55 +0100 Subject: [PATCH 4/5] ci: address review comments on the MPI GPU test job - check Open MPI's CUDA support at run time (MPIX_Query_cuda_support) instead of the configure-time ompi_info flag - drop the separate logging run of test_distributed_boundaries_gpu, whose pipe to grep could hide or swallow test failures - allow PRRTE to oversubscribe, so mpiexec -n 4 starts even if the Slurm task's cpuset has fewer than 4 cores - pass CUDA_ARCH to the base image build, so ENV CUDA_ARCH is no longer empty and the GPU tests are built for sm_90 - verify the SHA-256 of the Open MPI tarball - abort with a message instead of dividing by zero when no GPU devices are found, and print the PCI ids as unsigned - fix the TODO comment on the Python package build job Co-Authored-By: Claude Opus 5.5 --- .../python-package-tests-and-deploy.yml | 4 +-- ci/base.Dockerfile | 6 +++- ci/check_mpi_cuda.c | 32 +++++++++++++++++++ ci/cscs.yml | 12 ++++--- tests/src/mpi_test_driver.cpp | 20 +++++++++--- 5 files changed, 61 insertions(+), 13 deletions(-) create mode 100644 ci/check_mpi_cuda.c diff --git a/.github/workflows/python-package-tests-and-deploy.yml b/.github/workflows/python-package-tests-and-deploy.yml index 1bff47318..5ea518bb2 100644 --- a/.github/workflows/python-package-tests-and-deploy.yml +++ b/.github/workflows/python-package-tests-and-deploy.yml @@ -12,8 +12,8 @@ on: jobs: build: # TODO: go back to ubuntu-latest once the gridtools-base images are rebuilt on a newer - # Ubuntu. On ubuntu-latest (26.04) setup-python uses the runner's preinstalled Python - # (3.11), built for 26.04, whose ssl module does not work inside the older container. + # Ubuntu. On ubuntu-latest (26.04) setup-python uses the runner's preinstalled Pythons, + # built for 26.04, whose ssl module does not work inside the older container. runs-on: ubuntu-24.04 container: ghcr.io/gridtools/gridtools-base:${{ matrix.compiler }} strategy: diff --git a/ci/base.Dockerfile b/ci/base.Dockerfile index b790cf622..927ae6ca9 100644 --- a/ci/base.Dockerfile +++ b/ci/base.Dockerfile @@ -45,9 +45,12 @@ RUN apt-get update -qq && \ # so libmpi does not depend on the CUDA driver, which is not available at image build time # (the driver stubs are only used to build those components). ARG OMPI_VERSION=5.0.10 +# SHA-256 published on https://www.open-mpi.org/software/ompi/v5.0/ (update with OMPI_VERSION) +ARG OMPI_SHA256=5692cc80554a7117c99eaa725d35100edd8bbf73423a5e265ff867979192df7d ARG MPI_PATH=/usr/local RUN set -eux; \ curl -fsSL "https://download.open-mpi.org/release/open-mpi/v${OMPI_VERSION%.*}/openmpi-${OMPI_VERSION}.tar.gz" -o /tmp/ompi.tar.gz; \ + echo "${OMPI_SHA256} /tmp/ompi.tar.gz" | sha256sum -c -; \ tar -C /tmp -xzf /tmp/ompi.tar.gz; \ cd "/tmp/openmpi-${OMPI_VERSION}"; \ ./configure \ @@ -64,7 +67,7 @@ RUN set -eux; \ rm -rf "/tmp/openmpi-${OMPI_VERSION}" /tmp/ompi.tar.gz; \ ldconfig; \ # fail the image build if the CUDA component was not built (it is only loadable on - # GPU nodes, so the run-time check with ompi_info is done in the test job) + # GPU nodes, so the run-time check with ci/check_mpi_cuda.c is done in the test job) test -f ${MPI_PATH}/lib/openmpi/mca_accelerator_cuda.so; \ # libmpi must not depend on driver libraries that only exist as stubs at build time if readelf -d ${MPI_PATH}/lib/libmpi.so | grep -E 'libcuda|libnvidia-ml'; then \ @@ -79,4 +82,5 @@ ENV CXX=${MPI_PATH}/bin/mpicxx ENV CC=${MPI_PATH}/bin/mpicc ENV CUDA_HOME /usr/local/cuda +ARG CUDA_ARCH ENV CUDA_ARCH=${CUDA_ARCH} diff --git a/ci/check_mpi_cuda.c b/ci/check_mpi_cuda.c new file mode 100644 index 000000000..16871d71c --- /dev/null +++ b/ci/check_mpi_cuda.c @@ -0,0 +1,32 @@ +/* + * GridTools + * + * Copyright (c) 2014-2023, ETH Zurich + * All rights reserved. + * + * Please, refer to the LICENSE file in the root directory. + * SPDX-License-Identifier: BSD-3-Clause + */ + +/* + * Checks that Open MPI's CUDA support is usable at run time, i.e. that the CUDA accelerator + * component was loaded and selected (this needs the CUDA driver, only available on GPU nodes). + * `ompi_info`'s mpi_built_with_cuda_support only reflects the configure-time setting. + */ +#include +#include +#if defined(OPEN_MPI) && OPEN_MPI +#include +#endif + +#if !defined(MPIX_CUDA_AWARE_SUPPORT) || !MPIX_CUDA_AWARE_SUPPORT +#error "MPI was not built with CUDA support" +#endif + +int main(int argc, char **argv) { + MPI_Init(&argc, &argv); + int supported = MPIX_Query_cuda_support(); + printf("MPI run-time CUDA support: %s\n", supported ? "yes" : "no"); + MPI_Finalize(); + return supported ? 0 : 1; +} diff --git a/ci/cscs.yml b/ci/cscs.yml index c9b52cfcc..22ccf0b33 100644 --- a/ci/cscs.yml +++ b/ci/cscs.yml @@ -26,7 +26,7 @@ stages: 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"]' + DOCKER_BUILD_ARGS: '["CUDA_VERSION=$CUDA_VERSION", "CUDA_ARCH=$CUDA_ARCH", "UBUNTU_VERSION=$UBUNTU_VERSION"]' build_baseimage_aarch64: extends: [.container-builder-cscs-gh200, .build_baseimage] variables: @@ -69,10 +69,9 @@ test_aarch64: test_aarch64_mpi: extends: [.container-runner-daint-gh200, .test_helper] script: - # fail early if Open MPI's CUDA support is not usable on the GPU node - - ompi_info --parsable --all | grep 'mpi_built_with_cuda_support:value:true' - # show the GPU used by each rank (logged by tests/src/mpi_test_driver.cpp) - - cd /build && ctest -R '^test_distributed_boundaries_gpu$' -V | grep '\[mpi_test_driver\]' + # fail early if Open MPI's CUDA support is not usable on the GPU node (run-time check: the + # CUDA accelerator component must be loadable, which needs the CUDA driver) + - mpicc /gridtools/ci/check_mpi_cuda.c -o /tmp/check_mpi_cuda && mpiexec -n 1 /tmp/check_mpi_cuda - cd /build && ctest -L mpi --output-on-failure variables: # a single Slurm task runs ctest, each MPI test is launched with `mpiexec -n 4` @@ -88,3 +87,6 @@ test_aarch64_mpi: PRTE_MCA_ras: ^slurm PRTE_MCA_plm: ^slurm PRTE_MCA_hwloc_default_binding_policy: none + # without a Slurm allocation, the slots are the cores in the task's cpuset, which may be + # fewer than the 4 ranks: allow oversubscription + PRTE_MCA_rmaps_default_mapping_policy: ":oversubscribe" diff --git a/tests/src/mpi_test_driver.cpp b/tests/src/mpi_test_driver.cpp index a14f0f8b0..619be548a 100644 --- a/tests/src/mpi_test_driver.cpp +++ b/tests/src/mpi_test_driver.cpp @@ -40,10 +40,20 @@ namespace { } int dev_device_count() { - if (auto *str = std::getenv("NUM_GPU_DEVICES")) - return std::atoi(str); int res; + if (auto *str = std::getenv("NUM_GPU_DEVICES")) { + res = std::atoi(str); + if (res <= 0) { + std::fprintf(stderr, "[mpi_test_driver] invalid NUM_GPU_DEVICES=\"%s\"\n", str); + std::abort(); + } + return res; + } GT_CUDA_CHECK(cudaGetDeviceCount(&res)); + if (res <= 0) { + std::fprintf(stderr, "[mpi_test_driver] no GPU devices found\n"); + std::abort(); + } return res; } } // namespace @@ -77,9 +87,9 @@ int main(int argc, char **argv) { var ? var : "unset", device, count, - prop.pciDomainID, - prop.pciBusID, - prop.pciDeviceID); + static_cast(prop.pciDomainID), + static_cast(prop.pciBusID), + static_cast(prop.pciDeviceID)); } #endif From 6afde50d608445cd971ab1e6507682718fd7951a Mon Sep 17 00:00:00 2001 From: Edoardo Paone Date: Fri, 4 Dec 2026 19:23:22 +0100 Subject: [PATCH 5/5] move ci-config folder to .cscs-ci --- {ci => .cscs-ci}/base.Dockerfile | 0 {ci => .cscs-ci}/build.Dockerfile | 0 {ci => .cscs-ci}/check_mpi_cuda.c | 0 ci/cscs.yml => .cscs-ci/default.yml | 6 +++--- .gitignore | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename {ci => .cscs-ci}/base.Dockerfile (100%) rename {ci => .cscs-ci}/build.Dockerfile (100%) rename {ci => .cscs-ci}/check_mpi_cuda.c (100%) rename ci/cscs.yml => .cscs-ci/default.yml (95%) diff --git a/ci/base.Dockerfile b/.cscs-ci/base.Dockerfile similarity index 100% rename from ci/base.Dockerfile rename to .cscs-ci/base.Dockerfile diff --git a/ci/build.Dockerfile b/.cscs-ci/build.Dockerfile similarity index 100% rename from ci/build.Dockerfile rename to .cscs-ci/build.Dockerfile diff --git a/ci/check_mpi_cuda.c b/.cscs-ci/check_mpi_cuda.c similarity index 100% rename from ci/check_mpi_cuda.c rename to .cscs-ci/check_mpi_cuda.c diff --git a/ci/cscs.yml b/.cscs-ci/default.yml similarity index 95% rename from ci/cscs.yml rename to .cscs-ci/default.yml index 22ccf0b33..031cc509f 100644 --- a/ci/cscs.yml +++ b/.cscs-ci/default.yml @@ -8,7 +8,7 @@ stages: .build_baseimage: stage: baseimage - # we create a tag that depends on the SHA value of ci/base.Dockerfile, this way + # we create a tag that depends on the SHA value of .cscs-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. @@ -23,7 +23,7 @@ stages: reports: dotenv: build.env variables: - DOCKERFILE: ci/base.Dockerfile + DOCKERFILE: .cscs-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", "CUDA_ARCH=$CUDA_ARCH", "UBUNTU_VERSION=$UBUNTU_VERSION"]' @@ -43,7 +43,7 @@ build_baseimage_aarch64: # 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 + DOCKERFILE: .cscs-ci/build.Dockerfile DOCKER_BUILD_ARGS: '["BASE_IMAGE=${BASE_IMAGE}", "BUILD_TYPE=release"]' build_image_aarch64: extends: [.container-builder-cscs-gh200, .build_image] diff --git a/.gitignore b/.gitignore index 50d1f64c6..9c4e4eed2 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,6 @@ __pycache__ /* # except -!ci !cmake !docs !docs_src @@ -38,6 +37,7 @@ __pycache__ !tools !tests !.clang-format +!.cscs-ci !.gitignore !CMakeLists.txt !Doxyfile.in