Disable SIRIUS build with Intel for the time being

This commit is contained in:
Matthias Krack 2023-03-01 14:42:19 +01:00
parent c61313dab1
commit fe7e60cc4b
16 changed files with 159 additions and 32 deletions

View file

@ -13,7 +13,7 @@
# Optionally, the Intel compiler version can be specified as argument.
# Replace or adapt the "module add" commands below if needed.
#
# Author: Matthias Krack (03.02.2023)
# Author: Matthias Krack (01.03.2023)
#
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
@ -55,7 +55,7 @@ USE_LIBVORI := 220621
USE_LIBXC := 6.1.0
USE_LIBXSMM := 1.17
USE_PLUMED := 2.8.1
USE_SIRIUS := 7.4.3
#USE_SIRIUS := 7.4.3
USE_SPGLIB := 1.16.2
# Only needed for SIRIUS
LIBVDWXC_VER := 0.4.0

View file

@ -91,6 +91,9 @@ RUN /bin/bash -c " \
make -j ARCH=local_cuda VERSION=psmp && \
ln -sf ./cp2k.psmp ./exe/local_cuda/cp2k && \
ln -sf ./cp2k_shell.psmp ./exe/local_cuda/cp2k_shell && \
ln -sf ./graph.psmp ./exe/local_cuda/graph && \
ln -sf ./dumpdcd.psmp ./exe/local_cuda/dumpdcd && \
ln -sf ./xyz2dcd.psmp ./exe/local_cuda/xyz2dcd && \
rm -rf lib obj exe/local_cuda/libcp2k_unittest.psmp && \
( [ ! -f ./exe/local_cuda/cp2k.psmp ] || ldd ./exe/local_cuda/cp2k.psmp | grep -q libmpi )"
COPY ./data ./data

View file

@ -91,6 +91,9 @@ RUN /bin/bash -c " \
make -j ARCH=local_cuda VERSION=psmp && \
ln -sf ./cp2k.psmp ./exe/local_cuda/cp2k && \
ln -sf ./cp2k_shell.psmp ./exe/local_cuda/cp2k_shell && \
ln -sf ./graph.psmp ./exe/local_cuda/graph && \
ln -sf ./dumpdcd.psmp ./exe/local_cuda/dumpdcd && \
ln -sf ./xyz2dcd.psmp ./exe/local_cuda/xyz2dcd && \
rm -rf lib obj exe/local_cuda/libcp2k_unittest.psmp && \
( [ ! -f ./exe/local_cuda/cp2k.psmp ] || ldd ./exe/local_cuda/cp2k.psmp | grep -q libmpi )"
COPY ./data ./data

View file

@ -91,6 +91,9 @@ RUN /bin/bash -c " \
make -j ARCH=local_cuda VERSION=psmp && \
ln -sf ./cp2k.psmp ./exe/local_cuda/cp2k && \
ln -sf ./cp2k_shell.psmp ./exe/local_cuda/cp2k_shell && \
ln -sf ./graph.psmp ./exe/local_cuda/graph && \
ln -sf ./dumpdcd.psmp ./exe/local_cuda/dumpdcd && \
ln -sf ./xyz2dcd.psmp ./exe/local_cuda/xyz2dcd && \
rm -rf lib obj exe/local_cuda/libcp2k_unittest.psmp && \
( [ ! -f ./exe/local_cuda/cp2k.psmp ] || ldd ./exe/local_cuda/cp2k.psmp | grep -q libmpi )"
COPY ./data ./data

View file

@ -76,6 +76,9 @@ RUN /bin/bash -c " \
make -j ARCH=local VERSION=pdbg && \
ln -sf ./cp2k.pdbg ./exe/local/cp2k && \
ln -sf ./cp2k_shell.pdbg ./exe/local/cp2k_shell && \
ln -sf ./graph.pdbg ./exe/local/graph && \
ln -sf ./dumpdcd.pdbg ./exe/local/dumpdcd && \
ln -sf ./xyz2dcd.pdbg ./exe/local/xyz2dcd && \
rm -rf lib obj exe/local/libcp2k_unittest.pdbg && \
( [ ! -f ./exe/local/cp2k.pdbg ] || ldd ./exe/local/cp2k.pdbg | grep -q libmpi )"
COPY ./data ./data

View file

@ -76,6 +76,9 @@ RUN /bin/bash -c " \
make -j ARCH=local VERSION=psmp && \
ln -sf ./cp2k.psmp ./exe/local/cp2k && \
ln -sf ./cp2k_shell.psmp ./exe/local/cp2k_shell && \
ln -sf ./graph.psmp ./exe/local/graph && \
ln -sf ./dumpdcd.psmp ./exe/local/dumpdcd && \
ln -sf ./xyz2dcd.psmp ./exe/local/xyz2dcd && \
rm -rf lib obj exe/local/libcp2k_unittest.psmp && \
( [ ! -f ./exe/local/cp2k.psmp ] || ldd ./exe/local/cp2k.psmp | grep -q libmpi )"
COPY ./data ./data

View file

@ -76,6 +76,9 @@ RUN /bin/bash -c " \
make -j ARCH=local VERSION=sdbg && \
ln -sf ./cp2k.sdbg ./exe/local/cp2k && \
ln -sf ./cp2k_shell.sdbg ./exe/local/cp2k_shell && \
ln -sf ./graph.sdbg ./exe/local/graph && \
ln -sf ./dumpdcd.sdbg ./exe/local/dumpdcd && \
ln -sf ./xyz2dcd.sdbg ./exe/local/xyz2dcd && \
rm -rf lib obj exe/local/libcp2k_unittest.sdbg"
COPY ./data ./data
COPY ./tests ./tests

View file

@ -76,6 +76,9 @@ RUN /bin/bash -c " \
make -j ARCH=local VERSION=ssmp && \
ln -sf ./cp2k.ssmp ./exe/local/cp2k && \
ln -sf ./cp2k_shell.ssmp ./exe/local/cp2k_shell && \
ln -sf ./graph.ssmp ./exe/local/graph && \
ln -sf ./dumpdcd.ssmp ./exe/local/dumpdcd && \
ln -sf ./xyz2dcd.ssmp ./exe/local/xyz2dcd && \
rm -rf lib obj exe/local/libcp2k_unittest.ssmp"
COPY ./data ./data
COPY ./tests ./tests

View file

@ -0,0 +1,101 @@
#
# This file was created by generate_dockerfiles.py.
# Usage: docker build -f ./Dockerfile.prod_intel_psmp ../../
#
FROM intel/oneapi-hpckit:2023.0.0-devel-ubuntu22.04
# Install requirements for the toolchain.
WORKDIR /opt/cp2k-toolchain
COPY ./tools/toolchain/install_requirements*.sh ./
RUN ./install_requirements.sh ubuntu
# Install the toolchain.
RUN mkdir scripts
COPY ./tools/toolchain/scripts/VERSION \
./tools/toolchain/scripts/parse_if.py \
./tools/toolchain/scripts/tool_kit.sh \
./tools/toolchain/scripts/common_vars.sh \
./tools/toolchain/scripts/signal_trap.sh \
./tools/toolchain/scripts/get_openblas_arch.sh \
./scripts/
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
RUN ./install_cp2k_toolchain.sh \
--install-all \
--with-intelmpi \
--with-mkl \
--with-sirius=no \
--dry-run
# Dry-run leaves behind config files for the followup install scripts.
# This breaks up the lengthy installation into smaller docker build steps.
COPY ./tools/toolchain/scripts/stage0/ ./scripts/stage0/
RUN ./scripts/stage0/install_stage0.sh && rm -rf ./build
COPY ./tools/toolchain/scripts/stage1/ ./scripts/stage1/
RUN ./scripts/stage1/install_stage1.sh && rm -rf ./build
COPY ./tools/toolchain/scripts/stage2/ ./scripts/stage2/
RUN ./scripts/stage2/install_stage2.sh && rm -rf ./build
COPY ./tools/toolchain/scripts/stage3/ ./scripts/stage3/
RUN ./scripts/stage3/install_stage3.sh && rm -rf ./build
COPY ./tools/toolchain/scripts/stage4/ ./scripts/stage4/
RUN ./scripts/stage4/install_stage4.sh && rm -rf ./build
COPY ./tools/toolchain/scripts/stage5/ ./scripts/stage5/
RUN ./scripts/stage5/install_stage5.sh && rm -rf ./build
COPY ./tools/toolchain/scripts/stage6/ ./scripts/stage6/
RUN ./scripts/stage6/install_stage6.sh && rm -rf ./build
COPY ./tools/toolchain/scripts/stage7/ ./scripts/stage7/
RUN ./scripts/stage7/install_stage7.sh && rm -rf ./build
COPY ./tools/toolchain/scripts/stage8/ ./scripts/stage8/
RUN ./scripts/stage8/install_stage8.sh && rm -rf ./build
COPY ./tools/toolchain/scripts/arch_base.tmpl \
./tools/toolchain/scripts/generate_arch_files.sh \
./scripts/
RUN ./scripts/generate_arch_files.sh && rm -rf ./build
# Install CP2K using Linux-intel-x86_64.psmp.
WORKDIR /opt/cp2k
ARG GIT_COMMIT_SHA
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
COPY ./arch/Linux-intel-x86_64.psmp /opt/cp2k/arch/
RUN /bin/bash -c " \
if [ -n "${GIT_COMMIT_SHA}" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi && \
ln -s /opt/cp2k-toolchain /opt/cp2k/tools/toolchain && \
echo 'Compiling cp2k...' && \
source /opt/cp2k-toolchain/install/setup && \
make -j ARCH=Linux-intel-x86_64 VERSION=psmp && \
ln -sf ./cp2k.psmp ./exe/Linux-intel-x86_64/cp2k && \
ln -sf ./cp2k_shell.psmp ./exe/Linux-intel-x86_64/cp2k_shell && \
ln -sf ./graph.psmp ./exe/Linux-intel-x86_64/graph && \
ln -sf ./dumpdcd.psmp ./exe/Linux-intel-x86_64/dumpdcd && \
ln -sf ./xyz2dcd.psmp ./exe/Linux-intel-x86_64/xyz2dcd && \
rm -rf lib obj exe/Linux-intel-x86_64/libcp2k_unittest.psmp"
COPY ./data ./data
COPY ./tests ./tests
COPY ./tools/regtesting ./tools/regtesting
# Run regression tests.
ARG TESTOPTS
RUN /bin/bash -c " \
source /opt/cp2k-toolchain/install/setup && \
./tools/regtesting/do_regtest.py 'Linux-intel-x86_64' 'psmp' "${TESTOPTS}" |& tee regtests.log && \
rm -rf regtesting"
# Setup entry point for production.
COPY ./tools/docker/scripts/prod_entrypoint.sh ./
WORKDIR /mnt
ENTRYPOINT ["/opt/cp2k/prod_entrypoint.sh", "Linux-intel-x86_64", "psmp"]
CMD ["cp2k", "--help"]
#EOF

View file

@ -75,6 +75,9 @@ RUN /bin/bash -c " \
make -j ARCH=local VERSION=pdbg && \
ln -sf ./cp2k.pdbg ./exe/local/cp2k && \
ln -sf ./cp2k_shell.pdbg ./exe/local/cp2k_shell && \
ln -sf ./graph.pdbg ./exe/local/graph && \
ln -sf ./dumpdcd.pdbg ./exe/local/dumpdcd && \
ln -sf ./xyz2dcd.pdbg ./exe/local/xyz2dcd && \
rm -rf lib obj exe/local/libcp2k_unittest.pdbg && \
( [ ! -f ./exe/local/cp2k.pdbg ] || ldd ./exe/local/cp2k.pdbg | grep -q libmpi )"
COPY ./data ./data

View file

@ -75,6 +75,9 @@ RUN /bin/bash -c " \
make -j ARCH=local VERSION=psmp && \
ln -sf ./cp2k.psmp ./exe/local/cp2k && \
ln -sf ./cp2k_shell.psmp ./exe/local/cp2k_shell && \
ln -sf ./graph.psmp ./exe/local/graph && \
ln -sf ./dumpdcd.psmp ./exe/local/dumpdcd && \
ln -sf ./xyz2dcd.psmp ./exe/local/xyz2dcd && \
rm -rf lib obj exe/local/libcp2k_unittest.psmp && \
( [ ! -f ./exe/local/cp2k.psmp ] || ldd ./exe/local/cp2k.psmp | grep -q libmpi )"
COPY ./data ./data

View file

@ -75,6 +75,9 @@ RUN /bin/bash -c " \
make -j ARCH=local VERSION=sdbg && \
ln -sf ./cp2k.sdbg ./exe/local/cp2k && \
ln -sf ./cp2k_shell.sdbg ./exe/local/cp2k_shell && \
ln -sf ./graph.sdbg ./exe/local/graph && \
ln -sf ./dumpdcd.sdbg ./exe/local/dumpdcd && \
ln -sf ./xyz2dcd.sdbg ./exe/local/xyz2dcd && \
rm -rf lib obj exe/local/libcp2k_unittest.sdbg"
COPY ./data ./data
COPY ./tests ./tests

View file

@ -75,6 +75,9 @@ RUN /bin/bash -c " \
make -j ARCH=local VERSION=ssmp && \
ln -sf ./cp2k.ssmp ./exe/local/cp2k && \
ln -sf ./cp2k_shell.ssmp ./exe/local/cp2k_shell && \
ln -sf ./graph.ssmp ./exe/local/graph && \
ln -sf ./dumpdcd.ssmp ./exe/local/dumpdcd && \
ln -sf ./xyz2dcd.ssmp ./exe/local/xyz2dcd && \
rm -rf lib obj exe/local/libcp2k_unittest.ssmp"
COPY ./data ./data
COPY ./tests ./tests

View file

@ -3,11 +3,7 @@
# Usage: docker build -f ./Dockerfile.test_intel-psmp ../../
#
FROM intel/oneapi-hpckit:2022.2-devel-ubuntu20.04
# Without this cp2k segfaults right after startup.
# See https://github.com/cp2k/cp2k/issues/1936
ENV I_MPI_FABRICS='shm'
FROM intel/oneapi-hpckit:2023.0.0-devel-ubuntu22.04
# Install requirements for the toolchain.
WORKDIR /opt/cp2k-toolchain
@ -25,12 +21,9 @@ COPY ./tools/toolchain/scripts/VERSION \
./scripts/
COPY ./tools/toolchain/install_cp2k_toolchain.sh .
RUN ./install_cp2k_toolchain.sh \
--with-intel \
--install-all \
--with-intelmpi \
--with-libint=no \
--with-elpa=no \
--with-quip=no \
--with-spfft=no \
--with-mkl \
--with-sirius=no \
--dry-run
@ -68,20 +61,19 @@ COPY ./tools/toolchain/scripts/arch_base.tmpl \
./scripts/
RUN ./scripts/generate_arch_files.sh && rm -rf ./build
# Install CP2K using local.psmp.
# Install CP2K using Linux-intel-x86_64.psmp.
WORKDIR /opt/cp2k
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
COPY ./arch/Linux-intel-x86_64.psmp /opt/cp2k/arch/
RUN /bin/bash -c " \
mkdir -p arch && \
ln -vs /opt/cp2k-toolchain/install/arch/local.psmp ./arch/ && \
ln -s /opt/cp2k-toolchain /opt/cp2k/tools/toolchain && \
echo 'Compiling cp2k...' && \
source /opt/cp2k-toolchain/install/setup && \
( make -j ARCH=local VERSION=psmp &> /dev/null || true ) && \
rm -rf lib obj && \
( [ ! -f ./exe/local/cp2k.psmp ] || ldd ./exe/local/cp2k.psmp | grep -q libmpi )"
( make -j ARCH=Linux-intel-x86_64 VERSION=psmp &> /dev/null || true ) && \
rm -rf lib obj"
COPY ./data ./data
COPY ./tests ./tests
COPY ./tools/regtesting ./tools/regtesting
@ -91,7 +83,7 @@ ARG TESTOPTS=""
COPY ./tools/docker/scripts/test_regtest.sh ./
RUN /bin/bash -o pipefail -c " \
TESTOPTS="${TESTOPTS}" \
./test_regtest.sh 'local' 'psmp' |& tee report.log && \
./test_regtest.sh 'Linux-intel-x86_64' '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

@ -67,6 +67,7 @@ COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
COPY ./arch/minimal.sdbg /opt/cp2k/arch/
RUN /bin/bash -c " \
ln -s /opt/cp2k-toolchain /opt/cp2k/tools/toolchain && \
echo 'Compiling cp2k...' && \
source /opt/cp2k-toolchain/install/setup && \
( make -j ARCH=minimal VERSION=sdbg &> /dev/null || true ) && \

View file

@ -32,7 +32,10 @@ def main() -> None:
f.write(regtest("psmp"))
with OutputFile(f"Dockerfile.test_intel-psmp", args.check) as f:
f.write(toolchain_intel() + regtest("psmp"))
f.write(toolchain_intel() + regtest("psmp", "Linux-intel-x86_64"))
with OutputFile(f"Dockerfile.prod_intel_psmp", args.check) as f:
f.write(toolchain_intel() + production("psmp", "Linux-intel-x86_64"))
with OutputFile(f"Dockerfile.test_nvhpc", args.check) as f:
f.write(toolchain_nvhpc())
@ -351,6 +354,7 @@ def install_cp2k(
run_lines.append(f"ln -vs {arch_file} ./arch/")
else:
input_lines.append(f"COPY ./arch/{arch}.{version} /opt/cp2k/arch/")
run_lines.append(f"ln -s /opt/cp2k-toolchain /opt/cp2k/tools/toolchain")
run_lines.append("echo 'Compiling cp2k...'")
run_lines.append("source /opt/cp2k-toolchain/install/setup")
@ -360,13 +364,16 @@ def install_cp2k(
run_lines.append(build_command)
run_lines.append(f"ln -sf ./cp2k.{version} ./exe/{arch}/cp2k")
run_lines.append(f"ln -sf ./cp2k_shell.{version} ./exe/{arch}/cp2k_shell")
run_lines.append(f"ln -sf ./graph.{version} ./exe/{arch}/graph")
run_lines.append(f"ln -sf ./dumpdcd.{version} ./exe/{arch}/dumpdcd")
run_lines.append(f"ln -sf ./xyz2dcd.{version} ./exe/{arch}/xyz2dcd")
run_lines.append(f"rm -rf lib obj exe/{arch}/libcp2k_unittest.{version}")
else:
run_lines.append(f"( {build_command} &> /dev/null || true )")
run_lines.append(f"rm -rf lib obj")
# Ensure MPI is dynamically linked, which is needed e.g. for Shifter.
if version.startswith("p"):
if version.startswith("p") and not "intel" in arch:
binary = f"./exe/{arch}/cp2k.{version}"
run_lines.append(f"( [ ! -f {binary} ] || ldd {binary} | grep -q libmpi )")
@ -476,21 +483,14 @@ RUN ln -sf /usr/bin/gcc-{gcc_version} /usr/local/bin/gcc && \
# ======================================================================================
def toolchain_intel() -> str:
return rf"""
FROM intel/oneapi-hpckit:2022.2-devel-ubuntu20.04
# Without this cp2k segfaults right after startup.
# See https://github.com/cp2k/cp2k/issues/1936
ENV I_MPI_FABRICS='shm'
FROM intel/oneapi-hpckit:2023.0.0-devel-ubuntu22.04
""" + install_toolchain(
base_image="ubuntu",
with_intel="",
install_all="",
with_intelmpi="",
with_libint="no", # https://github.com/cp2k/cp2k/issues/1999
with_elpa="no", # MPI does not provide a sufficient threading level for OpenMP.
with_quip="no", # Intel compiler is currently not supported.
with_spfft="no", # Spawns infinite chain of mpiicpc sub-processes.
with_sirius="no", # Requires spfft.
with_mkl="",
with_sirius="no",
)