diff --git a/.gitlab/cscs-ci-default.yaml b/.gitlab/cscs-ci-default.yaml index 565ca6a22..f9baeb206 100644 --- a/.gitlab/cscs-ci-default.yaml +++ b/.gitlab/cscs-ci-default.yaml @@ -9,5 +9,4 @@ include: #- local: '.gitlab/includes/epic7742.yaml' stages: - - build - test diff --git a/.gitlab/includes/common.yaml b/.gitlab/includes/common.yaml index 3dad36f5a..f919a158d 100644 --- a/.gitlab/includes/common.yaml +++ b/.gitlab/includes/common.yaml @@ -42,46 +42,38 @@ variables: .uenv_activate: &uenv_activate - . /user-environment/env/${UENV_VIEW}/activate.sh -##################### -# Common Build Job # -##################### -.build_template: - extends: .uenv_image - stage: build - script: - - *uenv_activate - - mkdir -p $BUILD_DIR $INSTALL_DIR - - | - CXX=`which g++` CC=`which gcc` cmake \ - -S $CI_PROJECT_DIR \ - -B $BUILD_DIR \ - -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \ - -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \ - -DBUILD_TESTING=ON \ - -DARB_WITH_ASSERTIONS=ON \ - -DARB_WITH_PROFILING=ON \ - -DARB_VECTORIZE=ON \ - -DARB_WITH_PYTHON=ON \ - -DARB_WITH_MPI=ON \ - -DARB_GPU=${ARB_GPU} \ - -DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCH} \ - -DARB_USE_GPU_RNG=ON \ - -DPYTHON_EXECUTABLE=/user-environment/env/${UENV_VIEW}/bin/python - - | - if [ -z "$SLURM_CPUS_PER_TASK" ]; then - echo "SLURM_CPUS_PER_TASK is not set, using 32 cores for building" - cmake --build $BUILD_DIR -- -j32 - else - echo "Building with $SLURM_CPUS_PER_TASK cores" - cmake --build $BUILD_DIR -- -j${SLURM_CPUS_PER_TASK} - fi - - cmake --install $BUILD_DIR - variables: - <<: *default_slurm_vars - artifacts: - paths: - - $INSTALL_DIR - - $INSTALL_DIR +###################### +# Common Build Steps # +###################### +.common_build_steps: &common_build_steps + - *uenv_activate + - mkdir -p $BUILD_DIR $INSTALL_DIR + - | + CXX=`which gcc` CC=`which gcc` cmake \ + -S $CI_PROJECT_DIR \ + -B $BUILD_DIR \ + -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \ + -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \ + -DBUILD_TESTING=ON \ + -DARB_WITH_ASSERTIONS=ON \ + -DARB_WITH_PROFILING=ON \ + -DARB_VECTORIZE=ON \ + -DARB_WITH_PYTHON=ON \ + -DARB_USE_HWLOC=ON \ + -DARB_WITH_MPI=ON \ + -DARB_GPU=${ARB_GPU} \ + -DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCH} \ + -DARB_USE_GPU_RNG=ON \ + -DPYTHON_EXECUTABLE=/user-environment/env/${UENV_VIEW}/bin/python + - | + if [ -z "$SLURM_CPUS_PER_TASK" ]; then + echo "SLURM_CPUS_PER_TASK is not set, using 32 cores for building" + cmake --build $BUILD_DIR -- -j32 + else + echo "Building with $SLURM_CPUS_PER_TASK cores" + cmake --build $BUILD_DIR -- -j${SLURM_CPUS_PER_TASK} + fi + - cmake --install $BUILD_DIR ##################### # Common Test Jobs # @@ -90,17 +82,19 @@ variables: extends: .uenv_image stage: test script: - - *uenv_activate - - ${BUILD_DIR}/bin/unit-modcc - - ${BUILD_DIR}/bin/unit-local - - ${BUILD_DIR}/bin/unit - - scripts/run_cpp_examples.sh - - python -m venv --system-site-packages ${INSTALL_DIR} - - source ${INSTALL_DIR}/bin/activate - - python -m unittest discover -v -s python - - scripts/run_python_examples.sh - - scripts/test_executables.sh - - deactivate + <<: *common_build_steps + - | + # Run unit tests + ${BUILD_DIR}/bin/unit-modcc + ${BUILD_DIR}/bin/unit-local + ${BUILD_DIR}/bin/unit + scripts/run_cpp_examples.sh + python -m venv --system-site-packages ${INSTALL_DIR} + source ${INSTALL_DIR}/bin/activate + python -m unittest discover -v -s python + scripts/run_python_examples.sh + scripts/test_executables.sh + deactivate variables: <<: *default_slurm_vars SLURM_TIMELIMIT: "00:30:00" @@ -109,9 +103,11 @@ variables: extends: .uenv_image stage: test script: - - ${BUILD_DIR}/bin/unit-mpi - - scripts/run_cpp_examples.sh -d + <<: *common_build_steps + - | + # Run distributed tests + ${BUILD_DIR}/bin/unit-mpi + scripts/run_cpp_examples.sh -d variables: <<: *distributed_slurm_vars SLURM_TIMELIMIT: "00:15:00" - diff --git a/.gitlab/includes/epic7742.yaml b/.gitlab/includes/epic7742.yaml index 9f2003077..87f75ef93 100644 --- a/.gitlab/includes/epic7742.yaml +++ b/.gitlab/includes/epic7742.yaml @@ -5,14 +5,7 @@ extends: .uenv-runner-eiger-mc variables: SLURM_CONSTRAINT: mc - -################# -# Build Project # -################# -build_x86_64: - extends: [.eiger, .build_template] - variables: - ARB_GPU: "none" # No GPU for x86_64 + ARB_GPU: "none" ##################### # Single Node Tests # diff --git a/.gitlab/includes/gh200.yaml b/.gitlab/includes/gh200.yaml index 275febe50..7a2c69076 100644 --- a/.gitlab/includes/gh200.yaml +++ b/.gitlab/includes/gh200.yaml @@ -6,13 +6,6 @@ variables: SLURM_ACCOUNT: g154 SLURM_RESERVATION: daint - -################# -# Build Project # -################# -build_aarch64: - extends: [.todi, .build_template] - variables: ARB_GPU: "cuda" CUDA_ARCH: "90"