Skip to content

Commit

Permalink
ci to eiger
Browse files Browse the repository at this point in the history
  • Loading branch information
RMeli committed Jan 27, 2025
1 parent 5072378 commit 418dab1
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
11 changes: 10 additions & 1 deletion ci/ci-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ stages:
- 'echo $DOCKERHUB_TOKEN | podman login docker.io -u $DOCKERHUB_USERNAME --password-stdin'
- 'echo "INFO: Using NUM_CORES_BUILD_DLAF_FORTRAN=$NUM_CORES_BUILD_DLAF_FORTRAN"'
after_script:
- podman run -v $PWD/ci/ctest_to_gitlab.sh:/ctest_to_gitlab.sh $DEPLOY_IMAGE /ctest_to_gitlab.sh "$DEPLOY_IMAGE" "$THREADS_PER_NODE" "$SLURM_CONSTRAINT" > pipeline.yml
- podman run -v $PWD/ci/ctest_to_gitlab.sh:/ctest_to_gitlab.sh $DEPLOY_IMAGE /ctest_to_gitlab.sh "$DEPLOY_IMAGE" "$THREADS_MAX_PER_TASK" "$THREADS_PER_NODE" "$SLURM_CONSTRAINT" "$RUNNER" > pipeline.yml
variables:
PERSIST_IMAGE_NAME: $DEPLOY_IMAGE
DOCKER_BUILD_ARGS: '[
Expand All @@ -81,7 +81,16 @@ stages:
SLURM_CONSTRAINT: mc
THREADS_PER_NODE: 72

.build_for_eiger:
variables:
RUNNER: ".container-runner-eiger"
SLURM_CONSTRAINT: mc
THREADS_MAX_PER_TASK: 32
THREADS_PER_NODE: 256

.run_common:
stage: test
trigger:
strategy: depend
forward:
pipeline_variables: true
2 changes: 1 addition & 1 deletion ci/cpu/gcc11_mkl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cpu gcc11 mkl deps:
cpu gcc11 mkl build:
extends:
- .build_common
- .build_for_daint-mc
- .build_for_eiger
needs:
- cpu gcc11 mkl deps
variables:
Expand Down
2 changes: 1 addition & 1 deletion ci/cpu/gcc11_openblas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cpu gcc11 openblas deps:
cpu gcc11 openblas build:
extends:
- .build_common
- .build_for_daint-mc
- .build_for_eiger
needs:
- cpu gcc11 openblas deps
variables:
Expand Down
30 changes: 24 additions & 6 deletions ci/ctest_to_gitlab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,30 @@
#

IMAGE="$1"
THREADS_PER_NODE="$2"
SLURM_CONSTRAINT="$3"
THREADS_MAX_PER_TASK="$2"
THREADS_PER_NODE="$3"
SLURM_CONSTRAINT="$4"
RUNNER="$5"

STAGES="
- test
"
TIMELIMIT="15:00"
ARTIFACTS="
artifacts:
when: always
patsh:
- output/
"

BASE_TEMPLATE="
include:
- remote: 'https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.cscs.yml'
- remote: 'https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.ci-ext.yml'
image: $IMAGE
stages:
- test
$STAGES
variables:
SLURM_EXCLUSIVE: ''
Expand All @@ -35,23 +48,28 @@ variables:
JOB_TEMPLATE="
tests:
stage: test
extends: .daint
extends: $RUNNER
variables:
SLURM_CPUS_PER_TASK: {{CPUS_PER_TASK}}
SLURM_NTASKS: {{NTASKS}}
SLURM_TIMELIMIT: '15:00'
SLURM_TIMELIMIT: '$TIMELIMIT'
SLURM_UNBUFFEREDIO: 1
SLURM_WAIT: 0
PULL_IMAGE: 'YES'
USE_MPI: 'YES'
DISABLE_AFTER_SCRIPT: 'YES'
script: mpi-ctest"
$ARTIFACTS

JOBS=""

N=6
C=$(( THREADS_PER_NODE / N ))

if [ $C -gt $THREADS_MAX_PER_TASK ]; then
C=$THREADS_MAX_PER_TASK
fi

JOB=`echo "$JOB_TEMPLATE" | sed "s|{{LABEL}}|$label|g" \
| sed "s|{{NTASKS}}|$N|g" \
| sed "s|{{CPUS_PER_TASK}}|$C|g"`
Expand Down

0 comments on commit 418dab1

Please sign in to comment.