Filter invalid combinations

This commit is contained in:
Matthias Krack 2023-10-18 09:51:16 +02:00
parent d53834fba4
commit 305ec3327c
11 changed files with 23 additions and 1101 deletions

View file

@ -1,114 +0,0 @@
#
# This file was created by generate_docker_files.py
#
# Usage: docker build -f ./Dockerfile.2023.2_mpich_generic_cuda_A100_psmp -t cp2k/cp2k:2023.2_mpich_generic_cuda_A100_psmp .
# Stage 1: build step
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS build
# Setup CUDA environment
ENV CUDA_PATH /usr/local/cuda
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64
# Disable JIT cache as there seems to be an issue with file locking on overlayfs
# See also https://github.com/cp2k/cp2k/pull/2337
ENV CUDA_CACHE_DISABLE 1
# Install packages required for the CP2K toolchain build
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran libmpich-dev mpich openssh-client python3 libtool libtool-bin \
bzip2 ca-certificates git make patch pkg-config unzip wget zlib1g-dev
# Download CP2K
RUN git clone --recursive -b support/v2023.2 https://github.com/cp2k/cp2k.git /opt/cp2k
# Build CP2K toolchain for target CPU generic
WORKDIR /opt/cp2k/tools/toolchain
RUN /bin/bash -c -o pipefail \
"./install_cp2k_toolchain.sh -j 8 \
--install-all \
--enable-cuda=yes --gpu-ver=A100 --with-libtorch=no \
--target-cpu=generic \
--with-cusolvermp=no \
--with-gcc=system \
--with-mpich=system"
# Build CP2K for target CPU generic
WORKDIR /opt/cp2k
RUN /bin/bash -c -o pipefail \
"cp ./tools/toolchain/install/arch/local_cuda.psmp ./arch/; \
source ./tools/toolchain/install/setup; \
make -j 8 ARCH=local_cuda VERSION=psmp"
# Collect components for installation and remove symbolic links
RUN /bin/bash -c -o pipefail \
"mkdir -p /toolchain/install /toolchain/scripts; \
for libdir in \$(ldd ./exe/local_cuda/cp2k.psmp | \
grep /opt/cp2k/tools/toolchain/install | \
awk '{print \$3}' | cut -d/ -f7 | \
sort | uniq) setup; do \
cp -ar /opt/cp2k/tools/toolchain/install/\${libdir} /toolchain/install; \
done; \
cp /opt/cp2k/tools/toolchain/scripts/tool_kit.sh /toolchain/scripts; \
unlink ./exe/local_cuda/cp2k.popt; \
unlink ./exe/local_cuda/cp2k_shell.psmp"
# Stage 2: install step
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS install
# Install required packages
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran libmpich-dev mpich openssh-client python3 && rm -rf /var/lib/apt/lists/*
# Install CP2K binaries
COPY --from=build /opt/cp2k/exe/local_cuda/ /opt/cp2k/exe/local_cuda/
# Install CP2K regression tests
COPY --from=build /opt/cp2k/tests/ /opt/cp2k/tests/
COPY --from=build /opt/cp2k/tools/regtesting/ /opt/cp2k/tools/regtesting/
COPY --from=build /opt/cp2k/src/grid/sample_tasks/ /opt/cp2k/src/grid/sample_tasks/
# Install CP2K database files
COPY --from=build /opt/cp2k/data/ /opt/cp2k/data/
# Install shared libraries required by the CP2K binaries
COPY --from=build /toolchain/ /opt/cp2k/tools/toolchain/
# Create links to CP2K binaries
RUN /bin/bash -c -o pipefail \
"for binary in cp2k dumpdcd graph xyz2dcd; do \
ln -sf /opt/cp2k/exe/local_cuda/\${binary}.psmp \
/usr/local/bin/\${binary}; \
done; \
ln -sf /opt/cp2k/exe/local_cuda/cp2k.psmp \
/usr/local/bin/cp2k_shell; \
ln -sf /opt/cp2k/exe/local_cuda/cp2k.psmp \
/usr/local/bin/cp2k.popt"
# Create entrypoint script file
RUN printf "#!/bin/bash\n\
ulimit -c 0 -s unlimited\n\
export CUDA_CACHE_DISABLE=1\n\
export CUDA_PATH=/usr/local/cuda\n\
export LD_LIBRARY_PATH=\${LD_LIBRARY_PATH}:\${CUDA_PATH}/lib64\n\
export OMP_STACKSIZE=16M\n\
export PATH=/opt/cp2k/exe/local_cuda:\${PATH}\n\
source /opt/cp2k/tools/toolchain/install/setup\n\
\"\$@\"" \
>/usr/local/bin/entrypoint.sh && chmod 755 /usr/local/bin/entrypoint.sh
# Create shortcut for regression test
RUN printf "/opt/cp2k/tools/regtesting/do_regtest.py --maxtasks 8 --workbasedir /mnt \$* local_cuda psmp" \
>/usr/local/bin/run_tests && chmod 755 /usr/local/bin/run_tests
# Define entrypoint
WORKDIR /mnt
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["cp2k", "--help"]
# Label docker image
LABEL author="CP2K Developers" \
cp2k_version="2023.2" \
dockerfile_generator_version="0.2"
# EOF

View file

@ -1,114 +0,0 @@
#
# This file was created by generate_docker_files.py
#
# Usage: docker build -f ./Dockerfile.2023.2_mpich_native_cuda_A100_psmp -t cp2k/cp2k:2023.2_mpich_native_cuda_A100_psmp .
# Stage 1: build step
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS build
# Setup CUDA environment
ENV CUDA_PATH /usr/local/cuda
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64
# Disable JIT cache as there seems to be an issue with file locking on overlayfs
# See also https://github.com/cp2k/cp2k/pull/2337
ENV CUDA_CACHE_DISABLE 1
# Install packages required for the CP2K toolchain build
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran libmpich-dev mpich openssh-client python3 libtool libtool-bin \
bzip2 ca-certificates git make patch pkg-config unzip wget zlib1g-dev
# Download CP2K
RUN git clone --recursive -b support/v2023.2 https://github.com/cp2k/cp2k.git /opt/cp2k
# Build CP2K toolchain for target CPU native
WORKDIR /opt/cp2k/tools/toolchain
RUN /bin/bash -c -o pipefail \
"./install_cp2k_toolchain.sh -j 8 \
--install-all \
--enable-cuda=yes --gpu-ver=A100 --with-libtorch=no \
--target-cpu=native \
--with-cusolvermp=no \
--with-gcc=system \
--with-mpich=system"
# Build CP2K for target CPU native
WORKDIR /opt/cp2k
RUN /bin/bash -c -o pipefail \
"cp ./tools/toolchain/install/arch/local_cuda.psmp ./arch/; \
source ./tools/toolchain/install/setup; \
make -j 8 ARCH=local_cuda VERSION=psmp"
# Collect components for installation and remove symbolic links
RUN /bin/bash -c -o pipefail \
"mkdir -p /toolchain/install /toolchain/scripts; \
for libdir in \$(ldd ./exe/local_cuda/cp2k.psmp | \
grep /opt/cp2k/tools/toolchain/install | \
awk '{print \$3}' | cut -d/ -f7 | \
sort | uniq) setup; do \
cp -ar /opt/cp2k/tools/toolchain/install/\${libdir} /toolchain/install; \
done; \
cp /opt/cp2k/tools/toolchain/scripts/tool_kit.sh /toolchain/scripts; \
unlink ./exe/local_cuda/cp2k.popt; \
unlink ./exe/local_cuda/cp2k_shell.psmp"
# Stage 2: install step
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS install
# Install required packages
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran libmpich-dev mpich openssh-client python3 && rm -rf /var/lib/apt/lists/*
# Install CP2K binaries
COPY --from=build /opt/cp2k/exe/local_cuda/ /opt/cp2k/exe/local_cuda/
# Install CP2K regression tests
COPY --from=build /opt/cp2k/tests/ /opt/cp2k/tests/
COPY --from=build /opt/cp2k/tools/regtesting/ /opt/cp2k/tools/regtesting/
COPY --from=build /opt/cp2k/src/grid/sample_tasks/ /opt/cp2k/src/grid/sample_tasks/
# Install CP2K database files
COPY --from=build /opt/cp2k/data/ /opt/cp2k/data/
# Install shared libraries required by the CP2K binaries
COPY --from=build /toolchain/ /opt/cp2k/tools/toolchain/
# Create links to CP2K binaries
RUN /bin/bash -c -o pipefail \
"for binary in cp2k dumpdcd graph xyz2dcd; do \
ln -sf /opt/cp2k/exe/local_cuda/\${binary}.psmp \
/usr/local/bin/\${binary}; \
done; \
ln -sf /opt/cp2k/exe/local_cuda/cp2k.psmp \
/usr/local/bin/cp2k_shell; \
ln -sf /opt/cp2k/exe/local_cuda/cp2k.psmp \
/usr/local/bin/cp2k.popt"
# Create entrypoint script file
RUN printf "#!/bin/bash\n\
ulimit -c 0 -s unlimited\n\
export CUDA_CACHE_DISABLE=1\n\
export CUDA_PATH=/usr/local/cuda\n\
export LD_LIBRARY_PATH=\${LD_LIBRARY_PATH}:\${CUDA_PATH}/lib64\n\
export OMP_STACKSIZE=16M\n\
export PATH=/opt/cp2k/exe/local_cuda:\${PATH}\n\
source /opt/cp2k/tools/toolchain/install/setup\n\
\"\$@\"" \
>/usr/local/bin/entrypoint.sh && chmod 755 /usr/local/bin/entrypoint.sh
# Create shortcut for regression test
RUN printf "/opt/cp2k/tools/regtesting/do_regtest.py --maxtasks 8 --workbasedir /mnt \$* local_cuda psmp" \
>/usr/local/bin/run_tests && chmod 755 /usr/local/bin/run_tests
# Define entrypoint
WORKDIR /mnt
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["cp2k", "--help"]
# Label docker image
LABEL author="CP2K Developers" \
cp2k_version="2023.2" \
dockerfile_generator_version="0.2"
# EOF

View file

@ -1,105 +0,0 @@
#
# This file was created by generate_docker_files.py
#
# Usage: docker build -f ./Dockerfile.2023.2_mpich_znver2_psmp -t cp2k/cp2k:2023.2_mpich_znver2_psmp .
# Stage 1: build step
FROM ubuntu:22.04 AS build
# Install packages required for the CP2K toolchain build
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran libmpich-dev mpich openssh-client python3 \
bzip2 ca-certificates git make patch pkg-config unzip wget zlib1g-dev
# Download CP2K
RUN git clone --recursive -b support/v2023.2 https://github.com/cp2k/cp2k.git /opt/cp2k
# Build CP2K toolchain for target CPU znver2
WORKDIR /opt/cp2k/tools/toolchain
RUN /bin/bash -c -o pipefail \
"./install_cp2k_toolchain.sh -j 8 \
--install-all \
--enable-cuda=no \
--target-cpu=znver2 \
--with-cusolvermp=no \
--with-gcc=system \
--with-mpich=system"
# Build CP2K for target CPU znver2
WORKDIR /opt/cp2k
RUN /bin/bash -c -o pipefail \
"cp ./tools/toolchain/install/arch/local.psmp ./arch/; \
source ./tools/toolchain/install/setup; \
make -j 8 ARCH=local VERSION=psmp"
# Collect components for installation and remove symbolic links
RUN /bin/bash -c -o pipefail \
"mkdir -p /toolchain/install /toolchain/scripts; \
for libdir in \$(ldd ./exe/local/cp2k.psmp | \
grep /opt/cp2k/tools/toolchain/install | \
awk '{print \$3}' | cut -d/ -f7 | \
sort | uniq) setup; do \
cp -ar /opt/cp2k/tools/toolchain/install/\${libdir} /toolchain/install; \
done; \
cp /opt/cp2k/tools/toolchain/scripts/tool_kit.sh /toolchain/scripts; \
unlink ./exe/local/cp2k.popt; \
unlink ./exe/local/cp2k_shell.psmp"
# Stage 2: install step
FROM ubuntu:22.04 AS install
# Install required packages
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran libmpich-dev mpich openssh-client python3 && rm -rf /var/lib/apt/lists/*
# Install CP2K binaries
COPY --from=build /opt/cp2k/exe/local/ /opt/cp2k/exe/local/
# Install CP2K regression tests
COPY --from=build /opt/cp2k/tests/ /opt/cp2k/tests/
COPY --from=build /opt/cp2k/tools/regtesting/ /opt/cp2k/tools/regtesting/
COPY --from=build /opt/cp2k/src/grid/sample_tasks/ /opt/cp2k/src/grid/sample_tasks/
# Install CP2K database files
COPY --from=build /opt/cp2k/data/ /opt/cp2k/data/
# Install shared libraries required by the CP2K binaries
COPY --from=build /toolchain/ /opt/cp2k/tools/toolchain/
# Create links to CP2K binaries
RUN /bin/bash -c -o pipefail \
"for binary in cp2k dumpdcd graph xyz2dcd; do \
ln -sf /opt/cp2k/exe/local/\${binary}.psmp \
/usr/local/bin/\${binary}; \
done; \
ln -sf /opt/cp2k/exe/local/cp2k.psmp \
/usr/local/bin/cp2k_shell; \
ln -sf /opt/cp2k/exe/local/cp2k.psmp \
/usr/local/bin/cp2k.popt"
# Create entrypoint script file
RUN printf "#!/bin/bash\n\
ulimit -c 0 -s unlimited\n\
\
export OMP_STACKSIZE=16M\n\
export PATH=/opt/cp2k/exe/local:\${PATH}\n\
source /opt/cp2k/tools/toolchain/install/setup\n\
\"\$@\"" \
>/usr/local/bin/entrypoint.sh && chmod 755 /usr/local/bin/entrypoint.sh
# Create shortcut for regression test
RUN printf "/opt/cp2k/tools/regtesting/do_regtest.py --maxtasks 8 --workbasedir /mnt \$* local psmp" \
>/usr/local/bin/run_tests && chmod 755 /usr/local/bin/run_tests
# Define entrypoint
WORKDIR /mnt
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["cp2k", "--help"]
# Label docker image
LABEL author="CP2K Developers" \
cp2k_version="2023.2" \
dockerfile_generator_version="0.2"
# EOF

View file

@ -1,105 +0,0 @@
#
# This file was created by generate_docker_files.py
#
# Usage: docker build -f ./Dockerfile.2023.2_mpich_znver3_psmp -t cp2k/cp2k:2023.2_mpich_znver3_psmp .
# Stage 1: build step
FROM ubuntu:22.04 AS build
# Install packages required for the CP2K toolchain build
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran libmpich-dev mpich openssh-client python3 \
bzip2 ca-certificates git make patch pkg-config unzip wget zlib1g-dev
# Download CP2K
RUN git clone --recursive -b support/v2023.2 https://github.com/cp2k/cp2k.git /opt/cp2k
# Build CP2K toolchain for target CPU znver3
WORKDIR /opt/cp2k/tools/toolchain
RUN /bin/bash -c -o pipefail \
"./install_cp2k_toolchain.sh -j 8 \
--install-all \
--enable-cuda=no \
--target-cpu=znver3 \
--with-cusolvermp=no \
--with-gcc=system \
--with-mpich=system"
# Build CP2K for target CPU znver3
WORKDIR /opt/cp2k
RUN /bin/bash -c -o pipefail \
"cp ./tools/toolchain/install/arch/local.psmp ./arch/; \
source ./tools/toolchain/install/setup; \
make -j 8 ARCH=local VERSION=psmp"
# Collect components for installation and remove symbolic links
RUN /bin/bash -c -o pipefail \
"mkdir -p /toolchain/install /toolchain/scripts; \
for libdir in \$(ldd ./exe/local/cp2k.psmp | \
grep /opt/cp2k/tools/toolchain/install | \
awk '{print \$3}' | cut -d/ -f7 | \
sort | uniq) setup; do \
cp -ar /opt/cp2k/tools/toolchain/install/\${libdir} /toolchain/install; \
done; \
cp /opt/cp2k/tools/toolchain/scripts/tool_kit.sh /toolchain/scripts; \
unlink ./exe/local/cp2k.popt; \
unlink ./exe/local/cp2k_shell.psmp"
# Stage 2: install step
FROM ubuntu:22.04 AS install
# Install required packages
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran libmpich-dev mpich openssh-client python3 && rm -rf /var/lib/apt/lists/*
# Install CP2K binaries
COPY --from=build /opt/cp2k/exe/local/ /opt/cp2k/exe/local/
# Install CP2K regression tests
COPY --from=build /opt/cp2k/tests/ /opt/cp2k/tests/
COPY --from=build /opt/cp2k/tools/regtesting/ /opt/cp2k/tools/regtesting/
COPY --from=build /opt/cp2k/src/grid/sample_tasks/ /opt/cp2k/src/grid/sample_tasks/
# Install CP2K database files
COPY --from=build /opt/cp2k/data/ /opt/cp2k/data/
# Install shared libraries required by the CP2K binaries
COPY --from=build /toolchain/ /opt/cp2k/tools/toolchain/
# Create links to CP2K binaries
RUN /bin/bash -c -o pipefail \
"for binary in cp2k dumpdcd graph xyz2dcd; do \
ln -sf /opt/cp2k/exe/local/\${binary}.psmp \
/usr/local/bin/\${binary}; \
done; \
ln -sf /opt/cp2k/exe/local/cp2k.psmp \
/usr/local/bin/cp2k_shell; \
ln -sf /opt/cp2k/exe/local/cp2k.psmp \
/usr/local/bin/cp2k.popt"
# Create entrypoint script file
RUN printf "#!/bin/bash\n\
ulimit -c 0 -s unlimited\n\
\
export OMP_STACKSIZE=16M\n\
export PATH=/opt/cp2k/exe/local:\${PATH}\n\
source /opt/cp2k/tools/toolchain/install/setup\n\
\"\$@\"" \
>/usr/local/bin/entrypoint.sh && chmod 755 /usr/local/bin/entrypoint.sh
# Create shortcut for regression test
RUN printf "/opt/cp2k/tools/regtesting/do_regtest.py --maxtasks 8 --workbasedir /mnt \$* local psmp" \
>/usr/local/bin/run_tests && chmod 755 /usr/local/bin/run_tests
# Define entrypoint
WORKDIR /mnt
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["cp2k", "--help"]
# Label docker image
LABEL author="CP2K Developers" \
cp2k_version="2023.2" \
dockerfile_generator_version="0.2"
# EOF

View file

@ -1,117 +0,0 @@
#
# This file was created by generate_docker_files.py
#
# Usage: docker build -f ./Dockerfile.2023.2_openmpi_generic_cuda_A100_psmp -t cp2k/cp2k:2023.2_openmpi_generic_cuda_A100_psmp .
# Stage 1: build step
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS build
# Setup CUDA environment
ENV CUDA_PATH /usr/local/cuda
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64
# Disable JIT cache as there seems to be an issue with file locking on overlayfs
# See also https://github.com/cp2k/cp2k/pull/2337
ENV CUDA_CACHE_DISABLE 1
# Install packages required for the CP2K toolchain build
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran openssh-client python3 libtool libtool-bin \
bzip2 ca-certificates git make patch pkg-config unzip wget zlib1g-dev
# Download CP2K
RUN git clone --recursive -b support/v2023.2 https://github.com/cp2k/cp2k.git /opt/cp2k
# Build CP2K toolchain for target CPU generic
WORKDIR /opt/cp2k/tools/toolchain
RUN /bin/bash -c -o pipefail \
"./install_cp2k_toolchain.sh -j 8 \
--install-all \
--enable-cuda=yes --gpu-ver=A100 --with-libtorch=no \
--target-cpu=generic \
--with-cusolvermp=no \
--with-gcc=system \
--with-openmpi=install"
# Build CP2K for target CPU generic
WORKDIR /opt/cp2k
RUN /bin/bash -c -o pipefail \
"cp ./tools/toolchain/install/arch/local_cuda.psmp ./arch/; \
source ./tools/toolchain/install/setup; \
make -j 8 ARCH=local_cuda VERSION=psmp"
# Collect components for installation and remove symbolic links
RUN /bin/bash -c -o pipefail \
"mkdir -p /toolchain/install /toolchain/scripts; \
for libdir in \$(ldd ./exe/local_cuda/cp2k.psmp | \
grep /opt/cp2k/tools/toolchain/install | \
awk '{print \$3}' | cut -d/ -f7 | \
sort | uniq) setup; do \
cp -ar /opt/cp2k/tools/toolchain/install/\${libdir} /toolchain/install; \
done; \
cp /opt/cp2k/tools/toolchain/scripts/tool_kit.sh /toolchain/scripts; \
unlink ./exe/local_cuda/cp2k.popt; \
unlink ./exe/local_cuda/cp2k_shell.psmp"
# Stage 2: install step
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS install
# Install required packages
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran openssh-client python3 && rm -rf /var/lib/apt/lists/*
# Install CP2K binaries
COPY --from=build /opt/cp2k/exe/local_cuda/ /opt/cp2k/exe/local_cuda/
# Install CP2K regression tests
COPY --from=build /opt/cp2k/tests/ /opt/cp2k/tests/
COPY --from=build /opt/cp2k/tools/regtesting/ /opt/cp2k/tools/regtesting/
COPY --from=build /opt/cp2k/src/grid/sample_tasks/ /opt/cp2k/src/grid/sample_tasks/
# Install CP2K database files
COPY --from=build /opt/cp2k/data/ /opt/cp2k/data/
# Install shared libraries required by the CP2K binaries
COPY --from=build /toolchain/ /opt/cp2k/tools/toolchain/
# Create links to CP2K binaries
RUN /bin/bash -c -o pipefail \
"for binary in cp2k dumpdcd graph xyz2dcd; do \
ln -sf /opt/cp2k/exe/local_cuda/\${binary}.psmp \
/usr/local/bin/\${binary}; \
done; \
ln -sf /opt/cp2k/exe/local_cuda/cp2k.psmp \
/usr/local/bin/cp2k_shell; \
ln -sf /opt/cp2k/exe/local_cuda/cp2k.psmp \
/usr/local/bin/cp2k.popt"
# Create entrypoint script file
RUN printf "#!/bin/bash\n\
ulimit -c 0 -s unlimited\n\
export CUDA_CACHE_DISABLE=1\n\
export CUDA_PATH=/usr/local/cuda\n\
export LD_LIBRARY_PATH=\${LD_LIBRARY_PATH}:\${CUDA_PATH}/lib64\n\
export OMPI_ALLOW_RUN_AS_ROOT=1\n\
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1\n\
export OMPI_MCA_btl_vader_single_copy_mechanism=none\n\
export OMP_STACKSIZE=16M\n\
export PATH=/opt/cp2k/exe/local_cuda:\${PATH}\n\
source /opt/cp2k/tools/toolchain/install/setup\n\
\"\$@\"" \
>/usr/local/bin/entrypoint.sh && chmod 755 /usr/local/bin/entrypoint.sh
# Create shortcut for regression test
RUN printf "/opt/cp2k/tools/regtesting/do_regtest.py --mpiexec \"mpiexec --bind-to none\" --maxtasks 8 --workbasedir /mnt \$* local_cuda psmp" \
>/usr/local/bin/run_tests && chmod 755 /usr/local/bin/run_tests
# Define entrypoint
WORKDIR /mnt
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["cp2k", "--help"]
# Label docker image
LABEL author="CP2K Developers" \
cp2k_version="2023.2" \
dockerfile_generator_version="0.2"
# EOF

View file

@ -1,117 +0,0 @@
#
# This file was created by generate_docker_files.py
#
# Usage: docker build -f ./Dockerfile.2023.2_openmpi_native_cuda_A100_psmp -t cp2k/cp2k:2023.2_openmpi_native_cuda_A100_psmp .
# Stage 1: build step
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS build
# Setup CUDA environment
ENV CUDA_PATH /usr/local/cuda
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64
# Disable JIT cache as there seems to be an issue with file locking on overlayfs
# See also https://github.com/cp2k/cp2k/pull/2337
ENV CUDA_CACHE_DISABLE 1
# Install packages required for the CP2K toolchain build
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran openssh-client python3 libtool libtool-bin \
bzip2 ca-certificates git make patch pkg-config unzip wget zlib1g-dev
# Download CP2K
RUN git clone --recursive -b support/v2023.2 https://github.com/cp2k/cp2k.git /opt/cp2k
# Build CP2K toolchain for target CPU native
WORKDIR /opt/cp2k/tools/toolchain
RUN /bin/bash -c -o pipefail \
"./install_cp2k_toolchain.sh -j 8 \
--install-all \
--enable-cuda=yes --gpu-ver=A100 --with-libtorch=no \
--target-cpu=native \
--with-cusolvermp=no \
--with-gcc=system \
--with-openmpi=install"
# Build CP2K for target CPU native
WORKDIR /opt/cp2k
RUN /bin/bash -c -o pipefail \
"cp ./tools/toolchain/install/arch/local_cuda.psmp ./arch/; \
source ./tools/toolchain/install/setup; \
make -j 8 ARCH=local_cuda VERSION=psmp"
# Collect components for installation and remove symbolic links
RUN /bin/bash -c -o pipefail \
"mkdir -p /toolchain/install /toolchain/scripts; \
for libdir in \$(ldd ./exe/local_cuda/cp2k.psmp | \
grep /opt/cp2k/tools/toolchain/install | \
awk '{print \$3}' | cut -d/ -f7 | \
sort | uniq) setup; do \
cp -ar /opt/cp2k/tools/toolchain/install/\${libdir} /toolchain/install; \
done; \
cp /opt/cp2k/tools/toolchain/scripts/tool_kit.sh /toolchain/scripts; \
unlink ./exe/local_cuda/cp2k.popt; \
unlink ./exe/local_cuda/cp2k_shell.psmp"
# Stage 2: install step
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS install
# Install required packages
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran openssh-client python3 && rm -rf /var/lib/apt/lists/*
# Install CP2K binaries
COPY --from=build /opt/cp2k/exe/local_cuda/ /opt/cp2k/exe/local_cuda/
# Install CP2K regression tests
COPY --from=build /opt/cp2k/tests/ /opt/cp2k/tests/
COPY --from=build /opt/cp2k/tools/regtesting/ /opt/cp2k/tools/regtesting/
COPY --from=build /opt/cp2k/src/grid/sample_tasks/ /opt/cp2k/src/grid/sample_tasks/
# Install CP2K database files
COPY --from=build /opt/cp2k/data/ /opt/cp2k/data/
# Install shared libraries required by the CP2K binaries
COPY --from=build /toolchain/ /opt/cp2k/tools/toolchain/
# Create links to CP2K binaries
RUN /bin/bash -c -o pipefail \
"for binary in cp2k dumpdcd graph xyz2dcd; do \
ln -sf /opt/cp2k/exe/local_cuda/\${binary}.psmp \
/usr/local/bin/\${binary}; \
done; \
ln -sf /opt/cp2k/exe/local_cuda/cp2k.psmp \
/usr/local/bin/cp2k_shell; \
ln -sf /opt/cp2k/exe/local_cuda/cp2k.psmp \
/usr/local/bin/cp2k.popt"
# Create entrypoint script file
RUN printf "#!/bin/bash\n\
ulimit -c 0 -s unlimited\n\
export CUDA_CACHE_DISABLE=1\n\
export CUDA_PATH=/usr/local/cuda\n\
export LD_LIBRARY_PATH=\${LD_LIBRARY_PATH}:\${CUDA_PATH}/lib64\n\
export OMPI_ALLOW_RUN_AS_ROOT=1\n\
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1\n\
export OMPI_MCA_btl_vader_single_copy_mechanism=none\n\
export OMP_STACKSIZE=16M\n\
export PATH=/opt/cp2k/exe/local_cuda:\${PATH}\n\
source /opt/cp2k/tools/toolchain/install/setup\n\
\"\$@\"" \
>/usr/local/bin/entrypoint.sh && chmod 755 /usr/local/bin/entrypoint.sh
# Create shortcut for regression test
RUN printf "/opt/cp2k/tools/regtesting/do_regtest.py --mpiexec \"mpiexec --bind-to none\" --maxtasks 8 --workbasedir /mnt \$* local_cuda psmp" \
>/usr/local/bin/run_tests && chmod 755 /usr/local/bin/run_tests
# Define entrypoint
WORKDIR /mnt
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["cp2k", "--help"]
# Label docker image
LABEL author="CP2K Developers" \
cp2k_version="2023.2" \
dockerfile_generator_version="0.2"
# EOF

View file

@ -1,108 +0,0 @@
#
# This file was created by generate_docker_files.py
#
# Usage: docker build -f ./Dockerfile.2023.2_openmpi_znver2_psmp -t cp2k/cp2k:2023.2_openmpi_znver2_psmp .
# Stage 1: build step
FROM ubuntu:22.04 AS build
# Install packages required for the CP2K toolchain build
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran openssh-client python3 \
bzip2 ca-certificates git make patch pkg-config unzip wget zlib1g-dev
# Download CP2K
RUN git clone --recursive -b support/v2023.2 https://github.com/cp2k/cp2k.git /opt/cp2k
# Build CP2K toolchain for target CPU znver2
WORKDIR /opt/cp2k/tools/toolchain
RUN /bin/bash -c -o pipefail \
"./install_cp2k_toolchain.sh -j 8 \
--install-all \
--enable-cuda=no \
--target-cpu=znver2 \
--with-cusolvermp=no \
--with-gcc=system \
--with-openmpi=install"
# Build CP2K for target CPU znver2
WORKDIR /opt/cp2k
RUN /bin/bash -c -o pipefail \
"cp ./tools/toolchain/install/arch/local.psmp ./arch/; \
source ./tools/toolchain/install/setup; \
make -j 8 ARCH=local VERSION=psmp"
# Collect components for installation and remove symbolic links
RUN /bin/bash -c -o pipefail \
"mkdir -p /toolchain/install /toolchain/scripts; \
for libdir in \$(ldd ./exe/local/cp2k.psmp | \
grep /opt/cp2k/tools/toolchain/install | \
awk '{print \$3}' | cut -d/ -f7 | \
sort | uniq) setup; do \
cp -ar /opt/cp2k/tools/toolchain/install/\${libdir} /toolchain/install; \
done; \
cp /opt/cp2k/tools/toolchain/scripts/tool_kit.sh /toolchain/scripts; \
unlink ./exe/local/cp2k.popt; \
unlink ./exe/local/cp2k_shell.psmp"
# Stage 2: install step
FROM ubuntu:22.04 AS install
# Install required packages
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran openssh-client python3 && rm -rf /var/lib/apt/lists/*
# Install CP2K binaries
COPY --from=build /opt/cp2k/exe/local/ /opt/cp2k/exe/local/
# Install CP2K regression tests
COPY --from=build /opt/cp2k/tests/ /opt/cp2k/tests/
COPY --from=build /opt/cp2k/tools/regtesting/ /opt/cp2k/tools/regtesting/
COPY --from=build /opt/cp2k/src/grid/sample_tasks/ /opt/cp2k/src/grid/sample_tasks/
# Install CP2K database files
COPY --from=build /opt/cp2k/data/ /opt/cp2k/data/
# Install shared libraries required by the CP2K binaries
COPY --from=build /toolchain/ /opt/cp2k/tools/toolchain/
# Create links to CP2K binaries
RUN /bin/bash -c -o pipefail \
"for binary in cp2k dumpdcd graph xyz2dcd; do \
ln -sf /opt/cp2k/exe/local/\${binary}.psmp \
/usr/local/bin/\${binary}; \
done; \
ln -sf /opt/cp2k/exe/local/cp2k.psmp \
/usr/local/bin/cp2k_shell; \
ln -sf /opt/cp2k/exe/local/cp2k.psmp \
/usr/local/bin/cp2k.popt"
# Create entrypoint script file
RUN printf "#!/bin/bash\n\
ulimit -c 0 -s unlimited\n\
\
export OMPI_ALLOW_RUN_AS_ROOT=1\n\
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1\n\
export OMPI_MCA_btl_vader_single_copy_mechanism=none\n\
export OMP_STACKSIZE=16M\n\
export PATH=/opt/cp2k/exe/local:\${PATH}\n\
source /opt/cp2k/tools/toolchain/install/setup\n\
\"\$@\"" \
>/usr/local/bin/entrypoint.sh && chmod 755 /usr/local/bin/entrypoint.sh
# Create shortcut for regression test
RUN printf "/opt/cp2k/tools/regtesting/do_regtest.py --mpiexec \"mpiexec --bind-to none\" --maxtasks 8 --workbasedir /mnt \$* local psmp" \
>/usr/local/bin/run_tests && chmod 755 /usr/local/bin/run_tests
# Define entrypoint
WORKDIR /mnt
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["cp2k", "--help"]
# Label docker image
LABEL author="CP2K Developers" \
cp2k_version="2023.2" \
dockerfile_generator_version="0.2"
# EOF

View file

@ -1,108 +0,0 @@
#
# This file was created by generate_docker_files.py
#
# Usage: docker build -f ./Dockerfile.2023.2_openmpi_znver3_psmp -t cp2k/cp2k:2023.2_openmpi_znver3_psmp .
# Stage 1: build step
FROM ubuntu:22.04 AS build
# Install packages required for the CP2K toolchain build
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran openssh-client python3 \
bzip2 ca-certificates git make patch pkg-config unzip wget zlib1g-dev
# Download CP2K
RUN git clone --recursive -b support/v2023.2 https://github.com/cp2k/cp2k.git /opt/cp2k
# Build CP2K toolchain for target CPU znver3
WORKDIR /opt/cp2k/tools/toolchain
RUN /bin/bash -c -o pipefail \
"./install_cp2k_toolchain.sh -j 8 \
--install-all \
--enable-cuda=no \
--target-cpu=znver3 \
--with-cusolvermp=no \
--with-gcc=system \
--with-openmpi=install"
# Build CP2K for target CPU znver3
WORKDIR /opt/cp2k
RUN /bin/bash -c -o pipefail \
"cp ./tools/toolchain/install/arch/local.psmp ./arch/; \
source ./tools/toolchain/install/setup; \
make -j 8 ARCH=local VERSION=psmp"
# Collect components for installation and remove symbolic links
RUN /bin/bash -c -o pipefail \
"mkdir -p /toolchain/install /toolchain/scripts; \
for libdir in \$(ldd ./exe/local/cp2k.psmp | \
grep /opt/cp2k/tools/toolchain/install | \
awk '{print \$3}' | cut -d/ -f7 | \
sort | uniq) setup; do \
cp -ar /opt/cp2k/tools/toolchain/install/\${libdir} /toolchain/install; \
done; \
cp /opt/cp2k/tools/toolchain/scripts/tool_kit.sh /toolchain/scripts; \
unlink ./exe/local/cp2k.popt; \
unlink ./exe/local/cp2k_shell.psmp"
# Stage 2: install step
FROM ubuntu:22.04 AS install
# Install required packages
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
g++ gcc gfortran openssh-client python3 && rm -rf /var/lib/apt/lists/*
# Install CP2K binaries
COPY --from=build /opt/cp2k/exe/local/ /opt/cp2k/exe/local/
# Install CP2K regression tests
COPY --from=build /opt/cp2k/tests/ /opt/cp2k/tests/
COPY --from=build /opt/cp2k/tools/regtesting/ /opt/cp2k/tools/regtesting/
COPY --from=build /opt/cp2k/src/grid/sample_tasks/ /opt/cp2k/src/grid/sample_tasks/
# Install CP2K database files
COPY --from=build /opt/cp2k/data/ /opt/cp2k/data/
# Install shared libraries required by the CP2K binaries
COPY --from=build /toolchain/ /opt/cp2k/tools/toolchain/
# Create links to CP2K binaries
RUN /bin/bash -c -o pipefail \
"for binary in cp2k dumpdcd graph xyz2dcd; do \
ln -sf /opt/cp2k/exe/local/\${binary}.psmp \
/usr/local/bin/\${binary}; \
done; \
ln -sf /opt/cp2k/exe/local/cp2k.psmp \
/usr/local/bin/cp2k_shell; \
ln -sf /opt/cp2k/exe/local/cp2k.psmp \
/usr/local/bin/cp2k.popt"
# Create entrypoint script file
RUN printf "#!/bin/bash\n\
ulimit -c 0 -s unlimited\n\
\
export OMPI_ALLOW_RUN_AS_ROOT=1\n\
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1\n\
export OMPI_MCA_btl_vader_single_copy_mechanism=none\n\
export OMP_STACKSIZE=16M\n\
export PATH=/opt/cp2k/exe/local:\${PATH}\n\
source /opt/cp2k/tools/toolchain/install/setup\n\
\"\$@\"" \
>/usr/local/bin/entrypoint.sh && chmod 755 /usr/local/bin/entrypoint.sh
# Create shortcut for regression test
RUN printf "/opt/cp2k/tools/regtesting/do_regtest.py --mpiexec \"mpiexec --bind-to none\" --maxtasks 8 --workbasedir /mnt \$* local psmp" \
>/usr/local/bin/run_tests && chmod 755 /usr/local/bin/run_tests
# Define entrypoint
WORKDIR /mnt
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["cp2k", "--help"]
# Label docker image
LABEL author="CP2K Developers" \
cp2k_version="2023.2" \
dockerfile_generator_version="0.2"
# EOF

View file

@ -1,105 +0,0 @@
#
# This file was created by generate_docker_files.py
#
# Usage: docker build -f ./Dockerfile.master_intelmpi_znver2_psmp -t cp2k/cp2k:master$(date +%Y%m%d)_intelmpi_znver2_psmp .
# Stage 1: build step
FROM intel/oneapi-hpckit:2023.2.1-devel-ubuntu22.04 AS build
# Install packages required for the CP2K toolchain build
RUN apt-get update -qq; true && apt-get install -qq --no-install-recommends \
g++ gcc gfortran python3 \
bzip2 ca-certificates git make patch pkg-config unzip wget zlib1g-dev
# Download CP2K
RUN git clone --recursive https://github.com/cp2k/cp2k.git /opt/cp2k
# Build CP2K toolchain for target CPU znver2
WORKDIR /opt/cp2k/tools/toolchain
RUN /bin/bash -c -o pipefail \
"./install_cp2k_toolchain.sh -j 8 \
--install-all \
--enable-cuda=no \
--target-cpu=znver2 \
--with-cusolvermp=no \
--with-intel=system --with-intelmpi=system --with-libtorch=no --with-mkl=system \
--with-intelmpi=system"
# Build CP2K for target CPU znver2
WORKDIR /opt/cp2k
RUN /bin/bash -c -o pipefail \
"cp ./tools/toolchain/install/arch/local.psmp ./arch/; \
source ./tools/toolchain/install/setup; \
make -j 8 ARCH=local VERSION=psmp"
# Collect components for installation and remove symbolic links
RUN /bin/bash -c -o pipefail \
"mkdir -p /toolchain/install /toolchain/scripts; \
for libdir in \$(ldd ./exe/local/cp2k.psmp | \
grep /opt/cp2k/tools/toolchain/install | \
awk '{print \$3}' | cut -d/ -f7 | \
sort | uniq) setup; do \
cp -ar /opt/cp2k/tools/toolchain/install/\${libdir} /toolchain/install; \
done; \
cp /opt/cp2k/tools/toolchain/scripts/tool_kit.sh /toolchain/scripts; \
unlink ./exe/local/cp2k.popt; \
unlink ./exe/local/cp2k_shell.psmp"
# Stage 2: install step
FROM intel/oneapi-hpckit:2023.2.1-devel-ubuntu22.04 AS install
# Install required packages
RUN apt-get update -qq; true && apt-get install -qq --no-install-recommends \
g++ gcc gfortran python3 && rm -rf /var/lib/apt/lists/*
# Install CP2K binaries
COPY --from=build /opt/cp2k/exe/local/ /opt/cp2k/exe/local/
# Install CP2K regression tests
COPY --from=build /opt/cp2k/tests/ /opt/cp2k/tests/
COPY --from=build /opt/cp2k/tools/regtesting/ /opt/cp2k/tools/regtesting/
COPY --from=build /opt/cp2k/src/grid/sample_tasks/ /opt/cp2k/src/grid/sample_tasks/
# Install CP2K database files
COPY --from=build /opt/cp2k/data/ /opt/cp2k/data/
# Install shared libraries required by the CP2K binaries
COPY --from=build /toolchain/ /opt/cp2k/tools/toolchain/
# Create links to CP2K binaries
RUN /bin/bash -c -o pipefail \
"for binary in cp2k dumpdcd graph xyz2dcd; do \
ln -sf /opt/cp2k/exe/local/\${binary}.psmp \
/usr/local/bin/\${binary}; \
done; \
ln -sf /opt/cp2k/exe/local/cp2k.psmp \
/usr/local/bin/cp2k_shell; \
ln -sf /opt/cp2k/exe/local/cp2k.psmp \
/usr/local/bin/cp2k.popt"
# Create entrypoint script file
RUN printf "#!/bin/bash\n\
ulimit -c 0 -s unlimited\n\
\
export OMP_STACKSIZE=16M\n\
export PATH=/opt/cp2k/exe/local:\${PATH}\n\
source /opt/cp2k/tools/toolchain/install/setup\n\
\"\$@\"" \
>/usr/local/bin/entrypoint.sh && chmod 755 /usr/local/bin/entrypoint.sh
# Create shortcut for regression test
RUN printf "/opt/cp2k/tests/do_regtest.py --maxtasks 8 --workbasedir /mnt \$* local psmp" \
>/usr/local/bin/run_tests && chmod 755 /usr/local/bin/run_tests
# Define entrypoint
WORKDIR /mnt
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["cp2k", "--help"]
# Label docker image
LABEL author="CP2K Developers" \
cp2k_version="master" \
dockerfile_generator_version="0.2"
# EOF

View file

@ -1,105 +0,0 @@
#
# This file was created by generate_docker_files.py
#
# Usage: docker build -f ./Dockerfile.master_intelmpi_znver3_psmp -t cp2k/cp2k:master$(date +%Y%m%d)_intelmpi_znver3_psmp .
# Stage 1: build step
FROM intel/oneapi-hpckit:2023.2.1-devel-ubuntu22.04 AS build
# Install packages required for the CP2K toolchain build
RUN apt-get update -qq; true && apt-get install -qq --no-install-recommends \
g++ gcc gfortran python3 \
bzip2 ca-certificates git make patch pkg-config unzip wget zlib1g-dev
# Download CP2K
RUN git clone --recursive https://github.com/cp2k/cp2k.git /opt/cp2k
# Build CP2K toolchain for target CPU znver3
WORKDIR /opt/cp2k/tools/toolchain
RUN /bin/bash -c -o pipefail \
"./install_cp2k_toolchain.sh -j 8 \
--install-all \
--enable-cuda=no \
--target-cpu=znver3 \
--with-cusolvermp=no \
--with-intel=system --with-intelmpi=system --with-libtorch=no --with-mkl=system \
--with-intelmpi=system"
# Build CP2K for target CPU znver3
WORKDIR /opt/cp2k
RUN /bin/bash -c -o pipefail \
"cp ./tools/toolchain/install/arch/local.psmp ./arch/; \
source ./tools/toolchain/install/setup; \
make -j 8 ARCH=local VERSION=psmp"
# Collect components for installation and remove symbolic links
RUN /bin/bash -c -o pipefail \
"mkdir -p /toolchain/install /toolchain/scripts; \
for libdir in \$(ldd ./exe/local/cp2k.psmp | \
grep /opt/cp2k/tools/toolchain/install | \
awk '{print \$3}' | cut -d/ -f7 | \
sort | uniq) setup; do \
cp -ar /opt/cp2k/tools/toolchain/install/\${libdir} /toolchain/install; \
done; \
cp /opt/cp2k/tools/toolchain/scripts/tool_kit.sh /toolchain/scripts; \
unlink ./exe/local/cp2k.popt; \
unlink ./exe/local/cp2k_shell.psmp"
# Stage 2: install step
FROM intel/oneapi-hpckit:2023.2.1-devel-ubuntu22.04 AS install
# Install required packages
RUN apt-get update -qq; true && apt-get install -qq --no-install-recommends \
g++ gcc gfortran python3 && rm -rf /var/lib/apt/lists/*
# Install CP2K binaries
COPY --from=build /opt/cp2k/exe/local/ /opt/cp2k/exe/local/
# Install CP2K regression tests
COPY --from=build /opt/cp2k/tests/ /opt/cp2k/tests/
COPY --from=build /opt/cp2k/tools/regtesting/ /opt/cp2k/tools/regtesting/
COPY --from=build /opt/cp2k/src/grid/sample_tasks/ /opt/cp2k/src/grid/sample_tasks/
# Install CP2K database files
COPY --from=build /opt/cp2k/data/ /opt/cp2k/data/
# Install shared libraries required by the CP2K binaries
COPY --from=build /toolchain/ /opt/cp2k/tools/toolchain/
# Create links to CP2K binaries
RUN /bin/bash -c -o pipefail \
"for binary in cp2k dumpdcd graph xyz2dcd; do \
ln -sf /opt/cp2k/exe/local/\${binary}.psmp \
/usr/local/bin/\${binary}; \
done; \
ln -sf /opt/cp2k/exe/local/cp2k.psmp \
/usr/local/bin/cp2k_shell; \
ln -sf /opt/cp2k/exe/local/cp2k.psmp \
/usr/local/bin/cp2k.popt"
# Create entrypoint script file
RUN printf "#!/bin/bash\n\
ulimit -c 0 -s unlimited\n\
\
export OMP_STACKSIZE=16M\n\
export PATH=/opt/cp2k/exe/local:\${PATH}\n\
source /opt/cp2k/tools/toolchain/install/setup\n\
\"\$@\"" \
>/usr/local/bin/entrypoint.sh && chmod 755 /usr/local/bin/entrypoint.sh
# Create shortcut for regression test
RUN printf "/opt/cp2k/tests/do_regtest.py --maxtasks 8 --workbasedir /mnt \$* local psmp" \
>/usr/local/bin/run_tests && chmod 755 /usr/local/bin/run_tests
# Define entrypoint
WORKDIR /mnt
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["cp2k", "--help"]
# Label docker image
LABEL author="CP2K Developers" \
cp2k_version="master" \
dockerfile_generator_version="0.2"
# EOF

View file

@ -13,7 +13,7 @@ import os
cp2k_release_list = ["master", "2023.2"] # append new releases to list
mpi_implementation_list = ["intelmpi", "mpich", "openmpi"]
target_cpu_list = ["generic", "haswell", "native", "skylake-avx512", "znver2", "znver3"]
target_gpu_list = ["A100", "P100", "V100"] # append new GPUs to list
target_gpu_list = ["P100", "V100", "A100"] # append new GPUs to list
# ------------------------------------------------------------------------------
@ -23,6 +23,7 @@ def main() -> None:
release_choices = ["all"] + cp2k_release_list
target_cpu_choices = ["all"] + target_cpu_list
target_gpu_choices = ["all"] + target_gpu_list
version_choices = ["psmp", "ssmp", "pdbg", "sdbg"]
parser = argparse.ArgumentParser()
parser.add_argument(
@ -99,9 +100,20 @@ def main() -> None:
dest="test_build",
help="Run a full regression test during the build step",
)
parser.add_argument(
"--version",
choices=version_choices,
default=version_choices[0],
dest="version",
help=(
"Specify the version type of the CP2K binary "
f"(default is {version_choices[0]})"
),
type=str,
)
args = parser.parse_args()
version = "psmp"
version = args.version
ncores = args.ncores
no_tests = args.no_tests
omp_stacksize = "16M"
@ -135,6 +147,11 @@ def main() -> None:
for target_cpu in target_cpu_list:
if args.target_cpu != "all" and args.target_cpu != target_cpu:
continue
if "znver" in target_cpu and mpi_implementation == "intelmpi":
continue
if release != "master":
if float(release) <= 2023.2 and "znver" in target_cpu:
continue
name = f"{release}_{mpi_implementation}_{target_cpu}_{version}"
with OutputFile(f"Dockerfile.{name}", args.check) as f:
f.write(
@ -170,9 +187,12 @@ def main() -> None:
# Restrict docker file generation for CUDA
if target_cpu not in ["generic", "native", args.target_cpu]:
continue
for target_gpu in target_gpu_list:
for igpu, target_gpu in enumerate(target_gpu_list):
if args.target_gpu != "all" and args.target_gpu != target_gpu:
continue
if release != "master":
if float(release) <= 2023.2 and igpu > 1:
continue
name = (
f"{release}_{mpi_implementation}_{target_cpu}"
f"_cuda_{target_gpu}_{version}"