Skip to content

Commit

Permalink
single stage
Browse files Browse the repository at this point in the history
  • Loading branch information
boeschf committed Oct 3, 2024
1 parent 562745d commit 702a490
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 70 deletions.
1 change: 0 additions & 1 deletion .gitlab/cscs-ci-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ include:
#- local: '.gitlab/includes/epic7742.yaml'

stages:
- build
- test
104 changes: 50 additions & 54 deletions .gitlab/includes/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
Expand All @@ -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"
Expand All @@ -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"

9 changes: 1 addition & 8 deletions .gitlab/includes/epic7742.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
Expand Down
7 changes: 0 additions & 7 deletions .gitlab/includes/gh200.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 702a490

Please sign in to comment.