From 565e00f97f2827a3c86cc0e938519d7273ffcc0a Mon Sep 17 00:00:00 2001 From: Matthias Krack Date: Wed, 6 May 2026 09:56:12 +0200 Subject: [PATCH] Fix Cray tester (#5135) --- ci/cscs_daint_spack_psmp.yaml | 2 +- ci/cscs_daint_spack_psmp_h100.yaml | 2 +- ci/cscs_eiger_spack_psmp.yaml | 2 +- ci/cscs_eiger_spack_ssmp.yaml | 2 +- ci/docker/build_cp2k_spack.Dockerfile | 6 +++++- make_cp2k.sh | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ci/cscs_daint_spack_psmp.yaml b/ci/cscs_daint_spack_psmp.yaml index f9e7375bb9..fd776497b4 100644 --- a/ci/cscs_daint_spack_psmp.yaml +++ b/ci/cscs_daint_spack_psmp.yaml @@ -21,7 +21,7 @@ build deps daint: stage: deps timeout: 2h before_script: - - DEPS_IMAGE_TAG=`cat make_cp2k.sh ci/cscs_daint_${TAG}.yaml ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile $(find tools/spack -type f) $(find cmake -type f) | sha256sum - | head -c 16` + - DEPS_IMAGE_TAG=`cat make_cp2k.sh ci/cscs_daint_${TAG}.yaml ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile $(find tools/spack -type f) | sha256sum - | head -c 16` - export PERSIST_IMAGE_NAME=${CSCS_REGISTRY_PATH}/base/${REPOSITORY}:${TAG}_${DEPS_IMAGE_TAG} - echo "DEPS_IMAGE_NAME=${PERSIST_IMAGE_NAME}" | tee build.env artifacts: diff --git a/ci/cscs_daint_spack_psmp_h100.yaml b/ci/cscs_daint_spack_psmp_h100.yaml index 57920c06f6..c5b577dd8c 100644 --- a/ci/cscs_daint_spack_psmp_h100.yaml +++ b/ci/cscs_daint_spack_psmp_h100.yaml @@ -21,7 +21,7 @@ build deps daint: stage: deps timeout: 2h before_script: - - DEPS_IMAGE_TAG=`cat make_cp2k.sh ci/cscs_daint_${TAG}.yaml ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile $(find tools/spack -type f) $(find cmake -type f) | sha256sum - | head -c 16` + - DEPS_IMAGE_TAG=`cat make_cp2k.sh ci/cscs_daint_${TAG}.yaml ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile $(find tools/spack -type f) | sha256sum - | head -c 16` - export PERSIST_IMAGE_NAME=${CSCS_REGISTRY_PATH}/base/${REPOSITORY}:${TAG}_${DEPS_IMAGE_TAG} - echo "DEPS_IMAGE_NAME=${PERSIST_IMAGE_NAME}" | tee build.env artifacts: diff --git a/ci/cscs_eiger_spack_psmp.yaml b/ci/cscs_eiger_spack_psmp.yaml index d11d47fa6e..1670129cf9 100644 --- a/ci/cscs_eiger_spack_psmp.yaml +++ b/ci/cscs_eiger_spack_psmp.yaml @@ -21,7 +21,7 @@ build deps eiger: stage: deps timeout: 2h before_script: - - DEPS_IMAGE_TAG=`cat make_cp2k.sh ci/cscs_eiger_${TAG}.yaml ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile $(find tools/spack -type f) $(find cmake -type f) | sha256sum - | head -c 16` + - DEPS_IMAGE_TAG=`cat make_cp2k.sh ci/cscs_eiger_${TAG}.yaml ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile $(find tools/spack -type f) | sha256sum - | head -c 16` - export PERSIST_IMAGE_NAME=${CSCS_REGISTRY_PATH}/base/${REPOSITORY}:${TAG}_${DEPS_IMAGE_TAG} - echo "DEPS_IMAGE_NAME=${PERSIST_IMAGE_NAME}" | tee build.env artifacts: diff --git a/ci/cscs_eiger_spack_ssmp.yaml b/ci/cscs_eiger_spack_ssmp.yaml index 307cc8c75e..15069577eb 100644 --- a/ci/cscs_eiger_spack_ssmp.yaml +++ b/ci/cscs_eiger_spack_ssmp.yaml @@ -20,7 +20,7 @@ build deps eiger: stage: deps timeout: 2h before_script: - - DEPS_IMAGE_TAG=`cat make_cp2k.sh ci/cscs_eiger_${TAG}.yaml ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile $(find tools/spack -type f) $(find cmake -type f) | sha256sum - | head -c 16` + - DEPS_IMAGE_TAG=`cat make_cp2k.sh ci/cscs_eiger_${TAG}.yaml ci/docker/build_${CI_JOB_STAGE}_${BUILDER}.Dockerfile $(find tools/spack -type f) | sha256sum - | head -c 16` - export PERSIST_IMAGE_NAME=${CSCS_REGISTRY_PATH}/base/${REPOSITORY}:${TAG}_${DEPS_IMAGE_TAG} - echo "DEPS_IMAGE_NAME=${PERSIST_IMAGE_NAME}" | tee build.env artifacts: diff --git a/ci/docker/build_cp2k_spack.Dockerfile b/ci/docker/build_cp2k_spack.Dockerfile index cfca05621d..64e2647dc3 100644 --- a/ci/docker/build_cp2k_spack.Dockerfile +++ b/ci/docker/build_cp2k_spack.Dockerfile @@ -24,8 +24,12 @@ ENV NUM_PROCS=${NUM_PROCS:-32} ARG FEATURE_FLAGS ENV FEATURE_FLAGS=${FEATURE_FLAGS:-} -# Build CP2K +# Update CP2K files WORKDIR /opt/cp2k +RUN rm -rf benchmarks cmake data src tests tools +COPY . . + +# Build CP2K RUN ./make_cp2k.sh -cray -cv ${CP2K_VERSION} -dlc -j${NUM_PROCS} ${FEATURE_FLAGS} ###### Stage 3: Install CP2K ###### diff --git a/make_cp2k.sh b/make_cp2k.sh index 04ef05de64..78f47d8370 100755 --- a/make_cp2k.sh +++ b/make_cp2k.sh @@ -1504,7 +1504,7 @@ else echo " podman run -it${DEVICE_FLAG} --rm ${IMAGE_TAG} run_tests" echo "" if [[ "${VERSION}" == @(sdbg|ssmp) ]]; then - echo "*** A CP2K run using 8 OpenMP threads (default) can be launched with" + echo "*** A CP2K run using 2 OpenMP threads (default) can be launched with" echo " podman run -it${DEVICE_FLAG} --rm ${IMAGE_TAG} cp2k ${CP2K_ROOT}/benchmarks/CI/H2O-32_md.inp" else echo "*** An MPI-parallel CP2K run using 2 OpenMP threads for each of the 4 MPI ranks can be launched with"