Docker: Migrate arm64 test to CMake

This commit is contained in:
Ole Schütt 2025-07-24 15:50:29 +02:00 committed by Ole Schütt
parent fa01f37413
commit 8e43b5cd4d
4 changed files with 27 additions and 20 deletions

View file

@ -110,6 +110,20 @@ elif [[ "${PROFILE}" == "toolchain_all" ]] && [[ "${VERSION}" == "ssmp" ]]; then
.. |& tee ./cmake.log
CMAKE_EXIT_CODE=$?
elif [[ "${PROFILE}" == "toolchain_arm64" ]] && [[ "${VERSION}" == "psmp" ]]; then
cmake \
-GNinja \
-DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \
-DCP2K_USE_EVERYTHING=ON \
-DCP2K_USE_DLAF=OFF \
-DCP2K_USE_PEXSI=OFF \
-DCP2K_USE_ACE=OFF \
-DCP2K_USE_DEEPMD=OFF \
-DCP2K_USE_LIBTORCH=OFF \
-Werror=dev \
.. |& tee ./cmake.log
CMAKE_EXIT_CODE=$?
elif [[ "${PROFILE}" == "toolchain_generic" ]] && [[ "${VERSION}" == "psmp" ]]; then
cmake \
-GNinja \

View file

@ -23,7 +23,7 @@ COPY ./tools/toolchain/install_cp2k_toolchain.sh .
RUN ./install_cp2k_toolchain.sh \
--install-all \
--mpi-mode=mpich \
--with-dbcsr=no \
--with-dbcsr \
--with-gcc=system \
--with-libtorch=no \
--with-deepmd=no \
@ -66,25 +66,25 @@ COPY ./tools/toolchain/scripts/arch_base.tmpl \
./scripts/
RUN ./scripts/generate_arch_files.sh && rm -rf ./build
# Install CP2K using local.psmp.
# Install CP2K sources.
WORKDIR /opt/cp2k
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
RUN /bin/bash -c " \
mkdir -p arch && \
ln -vs /opt/cp2k-toolchain/install/arch/local.psmp ./arch/"
COPY ./data ./data
COPY ./tests ./tests
COPY ./tools/regtesting ./tools/regtesting
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
# Compile CP2K.
COPY ./tools/docker/scripts/build_cp2k_cmake.sh .
RUN ./build_cp2k_cmake.sh toolchain_arm64 psmp
# Run regression tests.
ARG TESTOPTS=""
COPY ./tools/docker/scripts/test_regtest.sh ./
COPY ./tools/docker/scripts/test_regtest_cmake.sh ./
RUN /bin/bash -o pipefail -c " \
TESTOPTS='${TESTOPTS}' \
./test_regtest.sh 'local' 'psmp' |& tee report.log && \
./test_regtest_cmake.sh toolchain_arm64 psmp |& tee report.log && \
rm -rf regtesting"
# Output the report if the image is old and was therefore pulled from the build cache.

View file

@ -74,12 +74,8 @@ def main() -> None:
with OutputFile("Dockerfile.test_arm64-psmp", args.check) as f:
base_img = "arm64v8/ubuntu:24.04"
f.write(
install_deps_toolchain(
base_img, with_libtorch="no", with_deepmd="no", with_dbcsr="no"
)
)
f.write(regtest("psmp"))
f.write(install_deps_toolchain(base_img, with_libtorch="no", with_deepmd="no"))
f.write(regtest_cmake("toolchain_arm64", "psmp"))
with OutputFile(f"Dockerfile.test_performance", args.check) as f:
f.write(install_deps_toolchain(with_dbcsr="no"))

View file

@ -19,9 +19,6 @@ if ((SHM_AVAIL < 1024)); then
exit 1
fi
# Compile CP2K.
./build_cp2k_cmake.sh "${PROFILE}" "${VERSION}" || exit 0
# Extend stack size only for Intel compilers.
if "./build/bin/cp2k.${VERSION}" --version | grep -q "compiler: Intel"; then
ulimit -s unlimited # breaks address sanitizer