diff --git a/ci/ci-common.yml b/ci/ci-common.yml index e78738af..aa1b1268 100644 --- a/ci/ci-common.yml +++ b/ci/ci-common.yml @@ -15,32 +15,30 @@ stages: - TAG_IMAGE=`echo ${BASE_IMAGE##*/} | sed 's/[:]//g'` - TAG_APTGET=`echo ${EXTRA_APTGET} | sha256sum - | head -c 6` - TAG_COMPILER=`echo ${COMPILER}_CXX${CXXSTD} | sed 's/[@]//g'` - - TAG_DOCKERFILE=`sha256sum $DOCKERFILE | head -c 16` + - TAG_DOCKERFILE=`sha256sum $DOCKERFILE | head -c 12` - TAG_SPACK=`echo $SPACK_COMMIT | tail -c 11` - TAG_SPACK_PACKAGES=`echo $SPACK_PACKAGES_COMMIT | tail -c 11` - - TAG_SPACK_BUILDCACHE=`echo $SPACK_BUILDCACHE | tail -c 11` - - TAG_REPO=`find $SPACK_DLAF_FORTRAN_REPO -type f -exec sha256sum {} \; | sha256sum - | head -c 16` - - TAG_ENVIRONMENT=`cat $SPACK_ENVIRONMENT $COMMON_SPACK_ENVIRONMENT | sha256sum | head -c 16` - - TAG=${TAG_IMAGE}-${TAG_APTGET}-${TAG_COMPILER}-MKL${USE_MKL}-${TAG_DOCKERFILE}-${TAG_SPACK}-${TAG_SPACK_PACKAGES}-${TAG_SPACK_BUILDCACHE}-${TAG_REPO}-${TAG_ENVIRONMENT} - - export PERSIST_IMAGE_NAME=$BUILD_IMAGE:$TAG - - echo "BUILD_IMAGE=$PERSIST_IMAGE_NAME" > build.env - - echo "USE_MKL=$USE_MKL" >> build.env + - TAG_ALPS_CLUSTER_CONFIG=`echo $ALPS_CLUSTER_CONFIG_COMMIT | head -c 8` + - TAG_REPO=`find $SPACK_DLAF_FORTRAN_REPO -type f -exec sha256sum {} \; | sha256sum - | head -c 12` + - TAG_ENVIRONMENT=`cat $SPACK_ENVIRONMENT $COMMON_SPACK_ENVIRONMENT | sha256sum | head -c 12` + - TAG=${TAG_IMAGE}-${TAG_APTGET}-${TAG_COMPILER}-MKL${USE_MKL}-${TAG_DOCKERFILE}-${TAG_SPACK}-${TAG_SPACK_PACKAGES}-${TAG_ALPS_CLUSTER_CONFIG}-${TAG_REPO}-${TAG_ENVIRONMENT} + - export PERSIST_IMAGE_NAME=$DEPS_IMAGE:$TAG + - echo "DEPS_IMAGE=$PERSIST_IMAGE_NAME" > build.env - 'echo "INFO: Building image $PERSIST_IMAGE_NAME"' - 'echo "INFO: Using NUM_CORES_BUILD_DEPS=$NUM_CORES_BUILD_DEPS"' artifacts: reports: dotenv: build.env variables: - SPACK_COMMIT: 2e7168b4cfe9222a94becf0c2c5b401f513181ec - SPACK_PACKAGES_COMMIT: 629e6f0ba34621177de7bc7f8e35dca8e780e7cc - SPACK_BUILDCACHE: develop-2025-06-01 + SPACK_COMMIT: 73eaea13f381e3495299284856fd02a64e1d154c # v1.0.0 + SPACK_PACKAGES_COMMIT: 7aff9dd7017886ac70d2f565516bc78124b3d30d # 2025-08-07 + ALPS_CLUSTER_CONFIG_COMMIT: 57d5c2f39e4f0cf6acc8779dcaedc1e90264d639 SPACK_DLAF_FORTRAN_REPO: ./spack DOCKER_BUILD_ARGS: '[ "BASE_IMAGE", - "BUILDKIT_INLINE_CACHE=1", "SPACK_COMMIT", "SPACK_PACKAGES_COMMIT", - "SPACK_BUILDCACHE", + "ALPS_CLUSTER_CONFIG_COMMIT", "EXTRA_APTGET", "COMPILER", "SPACK_ENVIRONMENT", @@ -48,11 +46,11 @@ stages: "SPACK_DLAF_FORTRAN_REPO", "NUM_PROCS=$NUM_CORES_BUILD_DEPS" ]' - DOCKERFILE: ci/docker/build.Dockerfile - BASE_IMAGE: docker.io/ubuntu:22.04 + DOCKERFILE: ci/containers/build.Containerfile + BASE_IMAGE: docker.io/ubuntu:24.04 EXTRA_APTGET: "" USE_MKL: "OFF" - COMMON_SPACK_ENVIRONMENT: ci/docker/common.yaml + COMMON_SPACK_ENVIRONMENT: ci/containers/common.yaml .build_common: extends: .container-builder @@ -62,19 +60,14 @@ 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_MAX_PER_TASK" "$THREADS_PER_NODE" "$SLURM_CONSTRAINT" "$RUNNER" > pipeline.yml + - podman run -v $PWD/ci/ctest_to_gitlab.sh:/ctest_to_gitlab.sh $DLAFF_IMAGE /ctest_to_gitlab.sh "$DLAFF_IMAGE" "$THREADS_MAX_PER_TASK" "$THREADS_PER_NODE" "$SLURM_CONSTRAINT" "$RUNNER" > pipeline.yml variables: - PERSIST_IMAGE_NAME: $DEPLOY_IMAGE + PERSIST_IMAGE_NAME: $DLAFF_IMAGE DOCKER_BUILD_ARGS: '[ - "BUILD_IMAGE", - "DEPLOY_BASE_IMAGE", - "EXTRA_APTGET_DEPLOY", - "USE_MKL", + "DEPS_IMAGE", "NUM_PROCS=$NUM_CORES_BUILD_DLAF_FORTRAN" ]' - DOCKERFILE: ci/docker/deploy.Dockerfile - DEPLOY_BASE_IMAGE: docker.io/ubuntu:22.04 - EXTRA_APTGET_DEPLOY: "" + DOCKERFILE: ci/containers/deploy.Containerfile artifacts: paths: - pipeline.yml @@ -92,3 +85,7 @@ stages: strategy: depend forward: pipeline_variables: true + # FIXME: Workaround until CE provides a full MPI replacement + # Default is PMI2, but we use Cray-MPICH from the base image + variables: + SLURM_MPI_TYPE: cray_shasta diff --git a/ci/docker/build.Dockerfile b/ci/containers/build.Containerfile similarity index 60% rename from ci/docker/build.Dockerfile rename to ci/containers/build.Containerfile index de08a7d9..589763c7 100644 --- a/ci/docker/build.Dockerfile +++ b/ci/containers/build.Containerfile @@ -1,12 +1,15 @@ -ARG BASE_IMAGE=ubuntu:22.04 +ARG BASE_IMAGE=ubuntu:24.04 FROM $BASE_IMAGE # Set JFrog autoclean policy LABEL com.jfrog.artifactory.retention.maxDays="21" ENV DEBIAN_FRONTEND=noninteractive \ - PATH="$PATH:/opt/spack/bin:/opt/libtree" \ + PATH="$PATH:/opt/spack/bin" \ SPACK_COLOR=always +ENTRYPOINT [] + +CMD [ "/bin/bash" ] SHELL ["/bin/bash", "-c"] ARG EXTRA_APTGET @@ -15,18 +18,14 @@ RUN apt-get -yqq update && \ software-properties-common \ build-essential gfortran \ autoconf automake libssl-dev ninja-build pkg-config \ - ${EXTRA_APTGET} \ - gawk \ - python3 python3-distutils \ - git tar wget curl ca-certificates gpg-agent jq tzdata \ - patchelf unzip file gnupg2 libncurses-dev && \ + gawk git tar \ + wget curl ca-certificates gpg-agent tzdata \ + python3 python3-setuptools \ + glibc-tools jq strace \ + patchelf unzip file gnupg2 libncurses-dev \ + ${EXTRA_APTGET} && \ rm -rf /var/lib/apt/lists/* -# Install libtree for packaging -RUN mkdir -p /opt/libtree && \ - curl -Lfso /opt/libtree/libtree https://github.com/haampie/libtree/releases/download/v2.0.0/libtree_x86_64 && \ - chmod +x /opt/libtree/libtree - # Install Spack ARG SPACK_REPO=https://github.com/spack/spack ARG SPACK_COMMIT @@ -34,17 +33,23 @@ ENV SPACK_ROOT=/opt/spack-$SPACK_COMMIT ARG SPACK_PACKAGES_REPO=https://github.com/spack/spack-packages ARG SPACK_PACKAGES_COMMIT ENV SPACK_PACKAGES_ROOT=/opt/spack-packages-$SPACK_PACKAGES_COMMIT -RUN mkdir -p $SPACK_ROOT \ - && curl -OL $SPACK_REPO/archive/$SPACK_COMMIT.tar.gz \ - && tar -xzvf $SPACK_COMMIT.tar.gz -C /opt && rm -f $SPACK_COMMIT.tar.gz \ - && mkdir -p $SPACK_PACKAGES_ROOT \ - && curl -OL $SPACK_PACKAGES_REPO/archive/$SPACK_PACKAGES_COMMIT.tar.gz \ - && tar -xzvf $SPACK_PACKAGES_COMMIT.tar.gz -C /opt && rm -f $SPACK_PACKAGES_COMMIT.tar.gz +RUN mkdir -p $SPACK_ROOT && \ + curl -Ls "https://api.github.com/repos/spack/spack/tarball/$SPACK_COMMIT" | tar --strip-components=1 -xz -C ${SPACK_ROOT} && \ + mkdir -p $SPACK_PACKAGES_ROOT && \ + curl -Ls "https://api.github.com/repos/spack/spack-packages/tarball/$SPACK_PACKAGES_COMMIT" | tar --strip-components=1 -xz -C ${SPACK_PACKAGES_ROOT} ENV PATH $SPACK_ROOT/bin:/root/.local/bin:$PATH RUN spack repo add --scope site $SPACK_PACKAGES_ROOT/repos/spack_repo/builtin +# FIXME: Workaround until CE provides full MPI replacement +ARG ALPS_CLUSTER_CONFIG_COMMIT +ENV ALPS_CLUSTER_CONFIG_COMMIT=$ALPS_CLUSTER_CONFIG_COMMIT +RUN mkdir -p /opt/alps-cluster-config && \ + curl -Ls "https://api.github.com/repos/eth-cscs/alps-cluster-config/tarball/$ALPS_CLUSTER_CONFIG_COMMIT" | \ + tar --strip-components=1 -xz -C /opt/alps-cluster-config && \ + spack repo add --scope site /opt/alps-cluster-config/site/spack_repo/alps + # Find compilers and define which compiler we want to use ARG COMPILER RUN spack external find gcc && \ @@ -68,13 +73,6 @@ RUN spack external find \ pkg-config \ xz -# Enable Spack build cache -ARG SPACK_BUILDCACHE -RUN spack mirror add ${SPACK_BUILDCACHE} https://binaries.spack.io/${SPACK_BUILDCACHE} -RUN spack mirror add develop https://binaries.spack.io/develop && \ - spack buildcache keys --install --trust --force && \ - spack mirror rm develop - # Add custom Spack repo ARG SPACK_DLAF_FORTRAN_REPO COPY $SPACK_DLAF_FORTRAN_REPO /user_repo @@ -82,11 +80,12 @@ RUN spack repo add --scope site /user_repo ARG SPACK_ENVIRONMENT ARG COMMON_SPACK_ENVIRONMENT +ARG ENV_VIEW=/view # Create Spack environment named `ci` COPY $SPACK_ENVIRONMENT /spack_environment/spack.yaml COPY $COMMON_SPACK_ENVIRONMENT /spack_environment/ -RUN spack env create --without-view ci /spack_environment/spack.yaml +RUN spack env create --with-view ${ENV_VIEW} ci /spack_environment/spack.yaml RUN spack -e ci concretize RUN spack -e ci spec -lI --cover edges @@ -96,3 +95,5 @@ RUN spack -e ci install --jobs ${NUM_PROCS} --fail-fast --only=dependencies # Make CTest executable available RUN ln -s `spack -e ci location -i cmake`/bin/ctest /usr/bin/ctest + +RUN echo ${ENV_VIEW}/lib/ > /etc/ld.so.conf.d/dlaff.conf && ldconfig diff --git a/ci/docker/common.yaml b/ci/containers/common.yaml similarity index 63% rename from ci/docker/common.yaml rename to ci/containers/common.yaml index 6cc80206..1c7b94a6 100644 --- a/ci/docker/common.yaml +++ b/ci/containers/common.yaml @@ -13,15 +13,13 @@ packages: target: [x86_64] require: - "platform=linux" - - "os=ubuntu22.04" + - "os=ubuntu24.04" blas: require: 'intel-oneapi-mkl' lapack: require: 'intel-oneapi-mkl' scalapack: require: 'intel-oneapi-mkl' - mpi: - require: 'mpich' intel-oneapi-mkl: require: - 'threads=none' @@ -30,12 +28,6 @@ packages: openblas: variants: - 'threads=openmp' - mpich: - # Requirement for ABI compatibility on the test system - require: - - '@3.4.2' - variants: - - '~libxml2' hwloc: variants: - '~libxml2' @@ -46,3 +38,21 @@ packages: # Force git as non-buildable to allow deprecated versions in environments # https://github.com/spack/spack/pull/30040 buildable: false + # FIXME: Workaround until CE provides a full MPI replacement (as SARUS did) + mpi: + require: 'cray-mpich' + # FIXME: Workaround until CE provides a full MPI replacement (as SARUS did) + libfabric: + # Specify libfabric version to match the system version + require: '@1.22.0' + xpmem: + require: + - '~kernel-module' + cray-gtl: + buildable: True + cray-mpich: + buildable: True + cray-pals: + buildable: True + cray-pmi: + buildable: True diff --git a/ci/containers/deploy.Containerfile b/ci/containers/deploy.Containerfile new file mode 100644 index 00000000..6686a55d --- /dev/null +++ b/ci/containers/deploy.Containerfile @@ -0,0 +1,32 @@ +ARG DEPS_IMAGE +FROM $DEPS_IMAGE + +# Set JFrog autoclean policy +LABEL com.jfrog.artifactory.retention.maxDays="7" +LABEL com.jfrog.artifactory.retention.maxCount="10" + +ARG BUILD=/DLAF-Fortran-build +ARG SOURCE=/DLAF-Fortran +ARG BIN=${BUILD}/bin/ + +# Build DLA-Fortran +COPY . ${SOURCE} + +SHELL ["/bin/bash", "-c"] + +ARG NUM_PROCS +# Note: we force spack to build in ${BUILD} creating a link to it +RUN spack repo rm --scope site dla-future-fortran-repo && \ + spack repo add ${SOURCE}/spack && \ + spack -e ci develop --no-clone --path ${SOURCE} --build-directory ${BUILD} dla-future-fortran@main build_type=Debug && \ + spack -e ci concretize -f && \ + spack -e ci --config "config:flags:keep_werror:all" install --jobs ${NUM_PROCS} --keep-stage --verbose && \ + find ${BUILD} -name CMakeFiles -exec rm -rf {} + + +RUN mkdir -p ${BIN} && cp -L ${SOURCE}/ci/mpi-ctest ${BIN} +ENV PATH="${BIN}:$PATH" + +# Automatically print stacktraces on segfault +ENV LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so + +WORKDIR ${BUILD} diff --git a/ci/docker/mkl.yaml b/ci/containers/mkl.yaml similarity index 100% rename from ci/docker/mkl.yaml rename to ci/containers/mkl.yaml diff --git a/ci/docker/openblas.yaml b/ci/containers/openblas.yaml similarity index 100% rename from ci/docker/openblas.yaml rename to ci/containers/openblas.yaml diff --git a/ci/cpu/gcc11_mkl.yml b/ci/cpu/gcc11_mkl.yml deleted file mode 100644 index c5499f94..00000000 --- a/ci/cpu/gcc11_mkl.yml +++ /dev/null @@ -1,29 +0,0 @@ -include: - - local: 'ci/ci-common.yml' - -cpu gcc11 mkl deps: - extends: .deps_common - variables: - COMPILER: gcc@11 - SPACK_ENVIRONMENT: ci/docker/mkl.yaml - USE_MKL: "ON" - BUILD_IMAGE: $CSCS_REGISTRY_PATH/cpu-gcc11-mkl/build - -cpu gcc11 mkl build: - extends: - - .build_common - - .build_for_eiger - needs: - - cpu gcc11 mkl deps - variables: - DEPLOY_IMAGE: $CSCS_REGISTRY_PATH/cpu-gcc11-mkl/deploy:$CI_COMMIT_SHA - -cpu gcc11 mkl test: - extends: .run_common - needs: - - cpu gcc11 mkl build - trigger: - include: - - artifact: pipeline.yml - job: cpu gcc11 mkl build - diff --git a/ci/cpu/gcc11_openblas.yml b/ci/cpu/gcc11_openblas.yml deleted file mode 100644 index fa1e3398..00000000 --- a/ci/cpu/gcc11_openblas.yml +++ /dev/null @@ -1,29 +0,0 @@ -include: - - local: 'ci/ci-common.yml' - -cpu gcc11 openblas deps: - extends: .deps_common - variables: - COMPILER: gcc@11 - SPACK_ENVIRONMENT: ci/docker/openblas.yaml - USE_MKL: "OFF" - BUILD_IMAGE: $CSCS_REGISTRY_PATH/cpu-gcc11-openblas/build - -cpu gcc11 openblas build: - extends: - - .build_common - - .build_for_eiger - needs: - - cpu gcc11 openblas deps - variables: - DEPLOY_IMAGE: $CSCS_REGISTRY_PATH/cpu-gcc11-openblas/deploy:$CI_COMMIT_SHA - -cpu gcc11 openblas test: - extends: .run_common - needs: - - cpu gcc11 openblas build - trigger: - include: - - artifact: pipeline.yml - job: cpu gcc11 openblas build - diff --git a/ci/cpu/gcc13_mkl.yml b/ci/cpu/gcc13_mkl.yml new file mode 100644 index 00000000..1b2045fa --- /dev/null +++ b/ci/cpu/gcc13_mkl.yml @@ -0,0 +1,29 @@ +include: + - local: 'ci/ci-common.yml' + +cpu gcc13 mkl deps: + extends: .deps_common + variables: + COMPILER: gcc@13 + SPACK_ENVIRONMENT: ci/containers/mkl.yaml + USE_MKL: "ON" + DEPS_IMAGE: $CSCS_REGISTRY_PATH/cpu-gcc13-mkl/deps + +cpu gcc13 mkl build: + extends: + - .build_common + - .build_for_eiger + needs: + - cpu gcc13 mkl deps + variables: + DLAFF_IMAGE: $CSCS_REGISTRY_PATH/cpu-gcc13-mkl/dlaff:$CI_COMMIT_SHA + +cpu gcc13 mkl test: + extends: .run_common + needs: + - cpu gcc13 mkl build + trigger: + include: + - artifact: pipeline.yml + job: cpu gcc13 mkl build + diff --git a/ci/cpu/gcc13_openblas.yml b/ci/cpu/gcc13_openblas.yml new file mode 100644 index 00000000..3b69ee4f --- /dev/null +++ b/ci/cpu/gcc13_openblas.yml @@ -0,0 +1,29 @@ +include: + - local: 'ci/ci-common.yml' + +cpu gcc13 openblas deps: + extends: .deps_common + variables: + COMPILER: gcc@13 + SPACK_ENVIRONMENT: ci/containers/openblas.yaml + USE_MKL: "OFF" + DEPS_IMAGE: $CSCS_REGISTRY_PATH/cpu-gcc13-openblas/deps + +cpu gcc13 openblas build: + extends: + - .build_common + - .build_for_eiger + needs: + - cpu gcc13 openblas deps + variables: + DLAFF_IMAGE: $CSCS_REGISTRY_PATH/cpu-gcc13-openblas/dlaff:$CI_COMMIT_SHA + +cpu gcc13 openblas test: + extends: .run_common + needs: + - cpu gcc13 openblas build + trigger: + include: + - artifact: pipeline.yml + job: cpu gcc13 openblas build + diff --git a/ci/cscs-ci.yml b/ci/cscs-ci.yml index f067dac5..d0f5400b 100644 --- a/ci/cscs-ci.yml +++ b/ci/cscs-ci.yml @@ -1,3 +1,3 @@ include: - - local: 'ci/cpu/gcc11_openblas.yml' - - local: 'ci/cpu/gcc11_mkl.yml' + - local: 'ci/cpu/gcc13_openblas.yml' + - local: 'ci/cpu/gcc13_mkl.yml' diff --git a/ci/ctest_to_gitlab.sh b/ci/ctest_to_gitlab.sh index 9cd81547..bbbcb85f 100755 --- a/ci/ctest_to_gitlab.sh +++ b/ci/ctest_to_gitlab.sh @@ -58,8 +58,9 @@ tests: PULL_IMAGE: 'YES' USE_MPI: 'YES' DISABLE_AFTER_SCRIPT: 'YES' - script: mpi-ctest" + script: mpi-ctest $ARTIFACTS +" JOBS="" diff --git a/ci/docker/deploy.Dockerfile b/ci/docker/deploy.Dockerfile deleted file mode 100644 index bfa22259..00000000 --- a/ci/docker/deploy.Dockerfile +++ /dev/null @@ -1,93 +0,0 @@ -ARG BUILD_IMAGE -ARG DEPLOY_BASE_IMAGE - -ARG BUILD=/DLAF-Fortran-build -ARG SOURCE=/DLAF-Fortran -ARG DEPLOY=/root/DLAF-Fortran.bundle - -FROM $BUILD_IMAGE as builder - -ARG BUILD -ARG SOURCE -ARG DEPLOY - -# Build DLA-Fortran -COPY . ${SOURCE} - -SHELL ["/bin/bash", "-c"] - -ARG NUM_PROCS -# Note: we force spack to build in ${BUILD} creating a link to it -RUN spack repo rm --scope site dla-future-fortran-repo && \ - spack repo add ${SOURCE}/spack && \ - spack -e ci develop --no-clone --path ${SOURCE} --build-directory ${BUILD} dla-future-fortran@main build_type=Debug && \ - spack -e ci concretize -f && \ - spack -e ci --config "config:flags:keep_werror:all" install --jobs ${NUM_PROCS} --keep-stage --verbose - -# Prune and bundle binaries -RUN mkdir ${BUILD}-tmp && cd ${BUILD} && \ - export TEST_BINARIES=`PATH=${SOURCE}/ci:$PATH ctest --show-only=json-v1 | jq '.tests | .[] | select(has("command")) | .command | .[-1]' | tr -d \"` && \ - echo "Binary sizes:" && \ - ls -lh ${TEST_BINARIES} && \ - ls -lh src/lib* && \ - libtree -d ${DEPLOY} ${TEST_BINARIES} && \ - rm -rf ${DEPLOY}/usr/bin && \ - libtree -d ${DEPLOY} $(which ctest addr2line) && \ - cp -L ${SOURCE}/ci/mpi-ctest ${DEPLOY}/usr/bin && \ - echo "$TEST_BINARIES" | xargs -I{file} find -samefile {file} -exec cp --parents '{}' ${BUILD}-tmp ';' && \ - find -name CTestTestfile.cmake -exec cp --parents '{}' ${BUILD}-tmp ';' && \ - rm -rf ${BUILD} && \ - mv ${BUILD}-tmp ${BUILD} - -# Deploy MKL separately, since it dlopen's some libs -ARG USE_MKL -RUN if [ "$USE_MKL" = "ON" ]; then \ - export MKL_LIB=$(dirname $(find $(spack location -i intel-oneapi-mkl) -name libmkl_core.so)) && \ - libtree -d ${DEPLOY} \ - ${MKL_LIB}/libmkl_avx2.so.2 \ - ${MKL_LIB}/libmkl_avx512.so.2 \ - ${MKL_LIB}/libmkl_core.so \ - ${MKL_LIB}/libmkl_def.so.2 \ - ${MKL_LIB}/libmkl_intel_thread.so \ - ${MKL_LIB}/libmkl_mc3.so.2 \ - ${MKL_LIB}/libmkl_sequential.so \ - ${MKL_LIB}/libmkl_tbb_thread.so \ - ${MKL_LIB}/libmkl_vml_avx2.so.2 \ - ${MKL_LIB}/libmkl_vml_avx512.so.2 \ - ${MKL_LIB}/libmkl_vml_cmpt.so.2 \ - ${MKL_LIB}/libmkl_vml_def.so.2 \ - ${MKL_LIB}/libmkl_vml_mc3.so.2 ; \ - fi - -FROM $DEPLOY_BASE_IMAGE - -# Set JFrog autoclean policy -LABEL com.jfrog.artifactory.retention.maxDays="7" -LABEL com.jfrog.artifactory.retention.maxCount="10" - -ENV DEBIAN_FRONTEND noninteractive - -ARG BUILD -ARG DEPLOY - -ARG EXTRA_APTGET_DEPLOY -# glibc-tools is needed for libSegFault on ubuntu:22.04 -# tzdata is needed to print correct time -RUN apt-get update -qq && \ - apt-get install -qq -y --no-install-recommends \ - ${EXTRA_APTGET_DEPLOY} \ - glibc-tools \ - tzdata && \ - rm -rf /var/lib/apt/lists/* - -COPY --from=builder ${BUILD} ${BUILD} -COPY --from=builder ${DEPLOY} ${DEPLOY} - -ENV PATH="${DEPLOY}/usr/bin:$PATH" - -# Automatically print stacktraces on segfault -ENV LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so - -RUN echo "${DEPLOY}/usr/lib/" > /etc/ld.so.conf.d/dlaf.conf && ldconfig - -WORKDIR ${BUILD} diff --git a/ci/mpi-ctest b/ci/mpi-ctest index c38a0db4..04599865 100755 --- a/ci/mpi-ctest +++ b/ci/mpi-ctest @@ -1,14 +1,25 @@ #!/bin/bash -e +set -o pipefail +CTEST_OUTPUT="$CI_PROJECT_DIR/output/ctest.$SLURM_PROCID.txt" + pushd /DLAF-Fortran-build > /dev/null +# Solves container squashfs hang problems +# See https://github.com/eth-cscs/DLA-Future/issues/1305 +if [[ $SLURM_LOCALID == "0" ]]; then + rm -rf Testing + ln -s /dev/shm Testing +fi +sleep 1 + # Run the tests, only output on the first rank if [[ $SLURM_PROCID == "0" ]]; then TZ=CET date +"Run started at: %H:%M:%S %z" - ctest -V $@ + ctest --output-log "$CTEST_OUTPUT" -V $@ TZ=CET date +"Run finished at: %H:%M:%S %z" else - ctest -Q $@ + ctest --output-log "$CTEST_OUTPUT" -Q $@ fi popd > /dev/null diff --git a/test/helpers/pxheevd.fypp b/test/helpers/pxheevd.fypp index 988b0159..13276fa7 100644 --- a/test/helpers/pxheevd.fypp +++ b/test/helpers/pxheevd.fypp @@ -236,7 +236,7 @@ contains write (error_unit, *) "ERROR: DLAF_PS != ScaLAPACK (eigenvectors [begin,end])" end if - ! Something is off if the lastt eigenvectors are the same as ScaLAPACK + ! Something is off if the last eigenvectors are the same as ScaLAPACK if ( & allclose( & abs(Z_dlaf_partial_spectrum(:,eval_idx_end+1:n)), & diff --git a/test/helpers/pxpotri.fypp b/test/helpers/pxpotri.fypp index 5f3a02e5..42f94576 100644 --- a/test/helpers/pxpotri.fypp +++ b/test/helpers/pxpotri.fypp @@ -153,18 +153,14 @@ contains failed = .false. if (rank == 0) then - write(*, *) "DLAF=", R_dlaf - write(*, *) "ScaLAPACK=", R_scalapack if (.not. allclose(R_dlaf, R_scalapack, uplo=uplo)) then failed = .true. write (error_unit, *) "ERROR: DLAF != ScaLAPACK" end if ! Check against LAPACK too - write(*, *) "A=", A call ${name}$potrf(uplo, n, A, n, info) call ${name}$potri(uplo, n, A, n, info) - write(*, *) "A=", A if (.not. allclose(R_dlaf, A, uplo=uplo)) then failed = .true. write (error_unit, *) "ERROR: DLAF != LAPACK" diff --git a/test/utils/testutils.fypp b/test/utils/testutils.fypp index 319785cc..f26cc310 100644 --- a/test/utils/testutils.fypp +++ b/test/utils/testutils.fypp @@ -64,7 +64,7 @@ contains #:for dtype in precision #:for type in types #:set symbol = symbols[(dtype, type)] - function allclose_${symbol}$_mat(x, y, rtol, atol, uplo) result(aclose) + pure function allclose_${symbol}$_mat(x, y, rtol, atol, uplo) result(aclose) ${type}$ (kind=${dtype}$), intent(in), dimension(:, :) :: x, y real(kind=${dtype}$), intent(in), optional :: rtol, atol character, intent(in), optional :: uplo @@ -103,7 +103,6 @@ contains do j = 1, i if (.not. close (x(i, j), y(i, j), rtol_l, atol_l)) then aclose = .false. - write (error_unit, *) i, j, x(i, j), y(i, j) end if end do end do @@ -112,7 +111,6 @@ contains do j = i + 1, n if (.not. close (x(i, j), y(i, j), rtol_l, atol_l)) then aclose = .false. - write (error_unit, *) i, j, x(i, j), y(i, j) end if end do end do @@ -122,7 +120,6 @@ contains do i = 1, m if (.not. close (x(i, j), y(i, j), rtol_l, atol_l)) then aclose = .false. - write (error_unit, *) i, j, x(i, j), y(i, j) end if end do end do @@ -199,7 +196,7 @@ contains if (present(ictxt)) call blacs_gridexit(ictxt) call mpi_finalize(ierr) - stop - 1 + stop -1 end subroutine terminate subroutine setup_mpi(nprow, npcol, rank, nprocs)