mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 22:25:32 -04:00
Docker: Migrate GCC tests to CMake
This commit is contained in:
parent
b1f098bdf7
commit
db03bd36ce
10 changed files with 210 additions and 529 deletions
|
|
@ -73,7 +73,7 @@ ARG TESTOPTS=""
|
|||
COPY ./tools/docker/scripts/test_regtest_cmake.sh ./
|
||||
RUN /bin/bash -o pipefail -c " \
|
||||
TESTOPTS='${TESTOPTS}' \
|
||||
./test_regtest_cmake.sh |& tee report.log && \
|
||||
./test_regtest_cmake.sh spack psmp |& tee report.log && \
|
||||
rm -rf regtesting"
|
||||
|
||||
# Output the report if the image is old and was therefore pulled from the build cache.
|
||||
|
|
|
|||
|
|
@ -9,13 +9,16 @@ FROM ubuntu:24.04
|
|||
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
apt-get update -qq && apt-get install -qq --no-install-recommends \
|
||||
cmake \
|
||||
make \
|
||||
ninja-build \
|
||||
wget \
|
||||
python3 \
|
||||
ca-certificates \
|
||||
gcc-10 \
|
||||
g++-10 \
|
||||
gfortran-10 \
|
||||
libfftw3-dev \
|
||||
libopenblas-dev \
|
||||
libgsl-dev \
|
||||
libhdf5-dev \
|
||||
libint2-dev \
|
||||
libxc-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
|
@ -25,90 +28,25 @@ RUN ln -sf /usr/bin/gcc-10 /usr/local/bin/gcc && \
|
|||
ln -sf /usr/bin/g++-10 /usr/local/bin/g++ && \
|
||||
ln -sf /usr/bin/gfortran-10 /usr/local/bin/gfortran
|
||||
|
||||
# Install requirements for the toolchain.
|
||||
WORKDIR /opt/cp2k-toolchain
|
||||
COPY ./tools/toolchain/install_requirements*.sh ./
|
||||
RUN ./install_requirements.sh ubuntu
|
||||
# Install DBCSR
|
||||
COPY ./tools/docker/scripts/install_dbcsr.sh ./
|
||||
RUN ./install_dbcsr.sh
|
||||
|
||||
# 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 \
|
||||
--mpi-mode=no \
|
||||
--with-gcc=system \
|
||||
--with-cmake=system \
|
||||
--with-fftw=system \
|
||||
--with-openblas=system \
|
||||
--with-gsl=system \
|
||||
--with-hdf5=system \
|
||||
--with-libgrpp=install \
|
||||
--with-libint=system \
|
||||
--with-libxc=system \
|
||||
--with-libxsmm=install \
|
||||
--with-libvori=install \
|
||||
--with-spglib=install \
|
||||
--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 local.ssmp.
|
||||
# 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.ssmp ./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 .
|
||||
|
||||
# Run regression tests.
|
||||
ARG TESTOPTS="--skipdir=QS/regtest-rs-dhft"
|
||||
COPY ./tools/docker/scripts/test_regtest.sh ./
|
||||
# Build CP2K with CMake and run regression tests.
|
||||
ARG TESTOPTS=""
|
||||
COPY ./tools/docker/scripts/test_regtest_cmake.sh ./
|
||||
RUN /bin/bash -o pipefail -c " \
|
||||
TESTOPTS='${TESTOPTS}' \
|
||||
./test_regtest.sh 'local' 'ssmp' |& tee report.log && \
|
||||
./test_regtest_cmake.sh ubuntu ssmp |& tee report.log && \
|
||||
rm -rf regtesting"
|
||||
|
||||
# Output the report if the image is old and was therefore pulled from the build cache.
|
||||
|
|
|
|||
|
|
@ -9,13 +9,16 @@ FROM ubuntu:24.04
|
|||
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
apt-get update -qq && apt-get install -qq --no-install-recommends \
|
||||
cmake \
|
||||
make \
|
||||
ninja-build \
|
||||
wget \
|
||||
python3 \
|
||||
ca-certificates \
|
||||
gcc-11 \
|
||||
g++-11 \
|
||||
gfortran-11 \
|
||||
libfftw3-dev \
|
||||
libopenblas-dev \
|
||||
libgsl-dev \
|
||||
libhdf5-dev \
|
||||
libint2-dev \
|
||||
libxc-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
|
@ -25,90 +28,25 @@ RUN ln -sf /usr/bin/gcc-11 /usr/local/bin/gcc && \
|
|||
ln -sf /usr/bin/g++-11 /usr/local/bin/g++ && \
|
||||
ln -sf /usr/bin/gfortran-11 /usr/local/bin/gfortran
|
||||
|
||||
# Install requirements for the toolchain.
|
||||
WORKDIR /opt/cp2k-toolchain
|
||||
COPY ./tools/toolchain/install_requirements*.sh ./
|
||||
RUN ./install_requirements.sh ubuntu
|
||||
# Install DBCSR
|
||||
COPY ./tools/docker/scripts/install_dbcsr.sh ./
|
||||
RUN ./install_dbcsr.sh
|
||||
|
||||
# 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 \
|
||||
--mpi-mode=no \
|
||||
--with-gcc=system \
|
||||
--with-cmake=system \
|
||||
--with-fftw=system \
|
||||
--with-openblas=system \
|
||||
--with-gsl=system \
|
||||
--with-hdf5=system \
|
||||
--with-libgrpp=install \
|
||||
--with-libint=system \
|
||||
--with-libxc=system \
|
||||
--with-libxsmm=install \
|
||||
--with-libvori=install \
|
||||
--with-spglib=install \
|
||||
--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 local.ssmp.
|
||||
# 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.ssmp ./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 .
|
||||
|
||||
# Run regression tests.
|
||||
ARG TESTOPTS="--skipdir=QS/regtest-rs-dhft"
|
||||
COPY ./tools/docker/scripts/test_regtest.sh ./
|
||||
# Build CP2K with CMake and run regression tests.
|
||||
ARG TESTOPTS=""
|
||||
COPY ./tools/docker/scripts/test_regtest_cmake.sh ./
|
||||
RUN /bin/bash -o pipefail -c " \
|
||||
TESTOPTS='${TESTOPTS}' \
|
||||
./test_regtest.sh 'local' 'ssmp' |& tee report.log && \
|
||||
./test_regtest_cmake.sh ubuntu ssmp |& tee report.log && \
|
||||
rm -rf regtesting"
|
||||
|
||||
# Output the report if the image is old and was therefore pulled from the build cache.
|
||||
|
|
|
|||
|
|
@ -9,13 +9,16 @@ FROM ubuntu:24.04
|
|||
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
apt-get update -qq && apt-get install -qq --no-install-recommends \
|
||||
cmake \
|
||||
make \
|
||||
ninja-build \
|
||||
wget \
|
||||
python3 \
|
||||
ca-certificates \
|
||||
gcc-12 \
|
||||
g++-12 \
|
||||
gfortran-12 \
|
||||
libfftw3-dev \
|
||||
libopenblas-dev \
|
||||
libgsl-dev \
|
||||
libhdf5-dev \
|
||||
libint2-dev \
|
||||
libxc-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
|
@ -25,90 +28,25 @@ RUN ln -sf /usr/bin/gcc-12 /usr/local/bin/gcc && \
|
|||
ln -sf /usr/bin/g++-12 /usr/local/bin/g++ && \
|
||||
ln -sf /usr/bin/gfortran-12 /usr/local/bin/gfortran
|
||||
|
||||
# Install requirements for the toolchain.
|
||||
WORKDIR /opt/cp2k-toolchain
|
||||
COPY ./tools/toolchain/install_requirements*.sh ./
|
||||
RUN ./install_requirements.sh ubuntu
|
||||
# Install DBCSR
|
||||
COPY ./tools/docker/scripts/install_dbcsr.sh ./
|
||||
RUN ./install_dbcsr.sh
|
||||
|
||||
# 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 \
|
||||
--mpi-mode=no \
|
||||
--with-gcc=system \
|
||||
--with-cmake=system \
|
||||
--with-fftw=system \
|
||||
--with-openblas=system \
|
||||
--with-gsl=system \
|
||||
--with-hdf5=system \
|
||||
--with-libgrpp=install \
|
||||
--with-libint=system \
|
||||
--with-libxc=system \
|
||||
--with-libxsmm=install \
|
||||
--with-libvori=install \
|
||||
--with-spglib=install \
|
||||
--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 local.ssmp.
|
||||
# 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.ssmp ./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 .
|
||||
|
||||
# Run regression tests.
|
||||
ARG TESTOPTS="--skipdir=QS/regtest-rs-dhft"
|
||||
COPY ./tools/docker/scripts/test_regtest.sh ./
|
||||
# Build CP2K with CMake and run regression tests.
|
||||
ARG TESTOPTS=""
|
||||
COPY ./tools/docker/scripts/test_regtest_cmake.sh ./
|
||||
RUN /bin/bash -o pipefail -c " \
|
||||
TESTOPTS='${TESTOPTS}' \
|
||||
./test_regtest.sh 'local' 'ssmp' |& tee report.log && \
|
||||
./test_regtest_cmake.sh ubuntu ssmp |& tee report.log && \
|
||||
rm -rf regtesting"
|
||||
|
||||
# Output the report if the image is old and was therefore pulled from the build cache.
|
||||
|
|
|
|||
|
|
@ -9,13 +9,16 @@ FROM ubuntu:24.04
|
|||
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
apt-get update -qq && apt-get install -qq --no-install-recommends \
|
||||
cmake \
|
||||
make \
|
||||
ninja-build \
|
||||
wget \
|
||||
python3 \
|
||||
ca-certificates \
|
||||
gcc-13 \
|
||||
g++-13 \
|
||||
gfortran-13 \
|
||||
libfftw3-dev \
|
||||
libopenblas-dev \
|
||||
libgsl-dev \
|
||||
libhdf5-dev \
|
||||
libint2-dev \
|
||||
libxc-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
|
@ -25,90 +28,25 @@ RUN ln -sf /usr/bin/gcc-13 /usr/local/bin/gcc && \
|
|||
ln -sf /usr/bin/g++-13 /usr/local/bin/g++ && \
|
||||
ln -sf /usr/bin/gfortran-13 /usr/local/bin/gfortran
|
||||
|
||||
# Install requirements for the toolchain.
|
||||
WORKDIR /opt/cp2k-toolchain
|
||||
COPY ./tools/toolchain/install_requirements*.sh ./
|
||||
RUN ./install_requirements.sh ubuntu
|
||||
# Install DBCSR
|
||||
COPY ./tools/docker/scripts/install_dbcsr.sh ./
|
||||
RUN ./install_dbcsr.sh
|
||||
|
||||
# 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 \
|
||||
--mpi-mode=no \
|
||||
--with-gcc=system \
|
||||
--with-cmake=system \
|
||||
--with-fftw=system \
|
||||
--with-openblas=system \
|
||||
--with-gsl=system \
|
||||
--with-hdf5=system \
|
||||
--with-libgrpp=install \
|
||||
--with-libint=system \
|
||||
--with-libxc=system \
|
||||
--with-libxsmm=install \
|
||||
--with-libvori=install \
|
||||
--with-spglib=install \
|
||||
--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 local.ssmp.
|
||||
# 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.ssmp ./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 .
|
||||
|
||||
# Run regression tests.
|
||||
ARG TESTOPTS="--skipdir=QS/regtest-rs-dhft"
|
||||
COPY ./tools/docker/scripts/test_regtest.sh ./
|
||||
# Build CP2K with CMake and run regression tests.
|
||||
ARG TESTOPTS=""
|
||||
COPY ./tools/docker/scripts/test_regtest_cmake.sh ./
|
||||
RUN /bin/bash -o pipefail -c " \
|
||||
TESTOPTS='${TESTOPTS}' \
|
||||
./test_regtest.sh 'local' 'ssmp' |& tee report.log && \
|
||||
./test_regtest_cmake.sh ubuntu ssmp |& tee report.log && \
|
||||
rm -rf regtesting"
|
||||
|
||||
# Output the report if the image is old and was therefore pulled from the build cache.
|
||||
|
|
|
|||
|
|
@ -9,13 +9,16 @@ FROM ubuntu:24.04
|
|||
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
apt-get update -qq && apt-get install -qq --no-install-recommends \
|
||||
cmake \
|
||||
make \
|
||||
ninja-build \
|
||||
wget \
|
||||
python3 \
|
||||
ca-certificates \
|
||||
gcc-9 \
|
||||
g++-9 \
|
||||
gfortran-9 \
|
||||
libfftw3-dev \
|
||||
libopenblas-dev \
|
||||
libgsl-dev \
|
||||
libhdf5-dev \
|
||||
libint2-dev \
|
||||
libxc-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
|
@ -25,90 +28,25 @@ RUN ln -sf /usr/bin/gcc-9 /usr/local/bin/gcc && \
|
|||
ln -sf /usr/bin/g++-9 /usr/local/bin/g++ && \
|
||||
ln -sf /usr/bin/gfortran-9 /usr/local/bin/gfortran
|
||||
|
||||
# Install requirements for the toolchain.
|
||||
WORKDIR /opt/cp2k-toolchain
|
||||
COPY ./tools/toolchain/install_requirements*.sh ./
|
||||
RUN ./install_requirements.sh ubuntu
|
||||
# Install DBCSR
|
||||
COPY ./tools/docker/scripts/install_dbcsr.sh ./
|
||||
RUN ./install_dbcsr.sh
|
||||
|
||||
# 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 \
|
||||
--mpi-mode=no \
|
||||
--with-gcc=system \
|
||||
--with-cmake=system \
|
||||
--with-fftw=system \
|
||||
--with-openblas=system \
|
||||
--with-gsl=system \
|
||||
--with-hdf5=system \
|
||||
--with-libgrpp=install \
|
||||
--with-libint=system \
|
||||
--with-libxc=system \
|
||||
--with-libxsmm=install \
|
||||
--with-libvori=install \
|
||||
--with-spglib=install \
|
||||
--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 local.ssmp.
|
||||
# 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.ssmp ./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 .
|
||||
|
||||
# Run regression tests.
|
||||
ARG TESTOPTS="--skipdir=QS/regtest-rs-dhft"
|
||||
COPY ./tools/docker/scripts/test_regtest.sh ./
|
||||
# Build CP2K with CMake and run regression tests.
|
||||
ARG TESTOPTS=""
|
||||
COPY ./tools/docker/scripts/test_regtest_cmake.sh ./
|
||||
RUN /bin/bash -o pipefail -c " \
|
||||
TESTOPTS='${TESTOPTS}' \
|
||||
./test_regtest.sh 'local' 'ssmp' |& tee report.log && \
|
||||
./test_regtest_cmake.sh ubuntu ssmp |& tee report.log && \
|
||||
rm -rf regtesting"
|
||||
|
||||
# Output the report if the image is old and was therefore pulled from the build cache.
|
||||
|
|
|
|||
|
|
@ -9,13 +9,16 @@ FROM i386/debian:12.5
|
|||
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
apt-get update -qq && apt-get install -qq --no-install-recommends \
|
||||
cmake \
|
||||
make \
|
||||
ninja-build \
|
||||
wget \
|
||||
python3 \
|
||||
ca-certificates \
|
||||
gcc-12 \
|
||||
g++-12 \
|
||||
gfortran-12 \
|
||||
libfftw3-dev \
|
||||
libopenblas-dev \
|
||||
libgsl-dev \
|
||||
libhdf5-dev \
|
||||
libint2-dev \
|
||||
libxc-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
|
@ -25,90 +28,25 @@ RUN ln -sf /usr/bin/gcc-12 /usr/local/bin/gcc && \
|
|||
ln -sf /usr/bin/g++-12 /usr/local/bin/g++ && \
|
||||
ln -sf /usr/bin/gfortran-12 /usr/local/bin/gfortran
|
||||
|
||||
# Install requirements for the toolchain.
|
||||
WORKDIR /opt/cp2k-toolchain
|
||||
COPY ./tools/toolchain/install_requirements*.sh ./
|
||||
RUN ./install_requirements.sh ubuntu
|
||||
# Install DBCSR
|
||||
COPY ./tools/docker/scripts/install_dbcsr.sh ./
|
||||
RUN ./install_dbcsr.sh
|
||||
|
||||
# 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 \
|
||||
--mpi-mode=no \
|
||||
--with-gcc=system \
|
||||
--with-cmake=system \
|
||||
--with-fftw=system \
|
||||
--with-openblas=system \
|
||||
--with-gsl=system \
|
||||
--with-hdf5=system \
|
||||
--with-libgrpp=install \
|
||||
--with-libint=system \
|
||||
--with-libxc=system \
|
||||
--with-libxsmm=install \
|
||||
--with-libvori=no \
|
||||
--with-spglib=install \
|
||||
--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 local.ssmp.
|
||||
# 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.ssmp ./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 .
|
||||
|
||||
# Run regression tests.
|
||||
# Build CP2K with CMake and 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' 'ssmp' |& tee report.log && \
|
||||
./test_regtest_cmake.sh ubuntu ssmp |& tee report.log && \
|
||||
rm -rf regtesting"
|
||||
|
||||
# Output the report if the image is old and was therefore pulled from the build cache.
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ def main() -> None:
|
|||
f.write(toolchain_full() + regtest("sdbg", "minimal"))
|
||||
|
||||
with OutputFile(f"Dockerfile.test_cmake", args.check) as f:
|
||||
f.write(spack_env_toolchain() + regtest_cmake())
|
||||
f.write(spack_env_toolchain() + regtest_cmake("spack", "psmp"))
|
||||
|
||||
for version in "ssmp", "psmp":
|
||||
with OutputFile(f"Dockerfile.test_asan-{version}", args.check) as f:
|
||||
|
|
@ -53,25 +53,15 @@ def main() -> None:
|
|||
with OutputFile(f"Dockerfile.test_gcc{gcc_version}", args.check) as f:
|
||||
if gcc_version > 8:
|
||||
f.write(toolchain_ubuntu_nompi(gcc_version=gcc_version))
|
||||
f.write(regtest_cmake("ubuntu", "ssmp"))
|
||||
else:
|
||||
f.write(
|
||||
toolchain_ubuntu_nompi(
|
||||
base_image="ubuntu:20.04",
|
||||
gcc_version=gcc_version,
|
||||
libgrpp=False,
|
||||
spglib=False,
|
||||
)
|
||||
)
|
||||
# Skip some tests because of bug in LDA_C_PMGB06 functional in libxc <5.2.0.
|
||||
f.write(regtest("ssmp", testopts="--skipdir=QS/regtest-rs-dhft"))
|
||||
f.write(toolchain_ubuntu2040_nompi(gcc_version=gcc_version))
|
||||
# Skip some tests due to bug in LDA_C_PMGB06 functional in libxc <5.2.0.
|
||||
f.write(regtest("ssmp", testopts="--skipdir=QS/regtest-rs-dhft"))
|
||||
|
||||
with OutputFile("Dockerfile.test_i386", args.check) as f:
|
||||
f.write(
|
||||
toolchain_ubuntu_nompi(
|
||||
base_image="i386/debian:12.5", gcc_version=12, libvori=False
|
||||
)
|
||||
)
|
||||
f.write(regtest("ssmp"))
|
||||
f.write(toolchain_ubuntu_nompi(base_image="i386/debian:12.5", gcc_version=12))
|
||||
f.write(regtest_cmake("ubuntu", "ssmp"))
|
||||
|
||||
with OutputFile("Dockerfile.test_arm64-psmp", args.check) as f:
|
||||
f.write(
|
||||
|
|
@ -145,7 +135,7 @@ RUN /bin/bash -o pipefail -c " \
|
|||
|
||||
|
||||
# ======================================================================================
|
||||
def regtest_cmake(testopts: str = "") -> str:
|
||||
def regtest_cmake(arch: str, version: str, testopts: str = "") -> str:
|
||||
return (
|
||||
rf"""
|
||||
# Install CP2K sources.
|
||||
|
|
@ -162,7 +152,7 @@ ARG TESTOPTS="{testopts}"
|
|||
COPY ./tools/docker/scripts/test_regtest_cmake.sh ./
|
||||
RUN /bin/bash -o pipefail -c " \
|
||||
TESTOPTS='${{TESTOPTS}}' \
|
||||
./test_regtest_cmake.sh |& tee report.log && \
|
||||
./test_regtest_cmake.sh {arch} {version} |& tee report.log && \
|
||||
rm -rf regtesting"
|
||||
"""
|
||||
+ print_cached_report()
|
||||
|
|
@ -401,15 +391,47 @@ def toolchain_full(
|
|||
|
||||
# ======================================================================================
|
||||
def toolchain_ubuntu_nompi(
|
||||
base_image: str = "ubuntu:24.04",
|
||||
gcc_version: int = 13,
|
||||
libgrpp: bool = True,
|
||||
libvori: bool = True,
|
||||
spglib: bool = True,
|
||||
base_image: str = "ubuntu:24.04", gcc_version: int = 13
|
||||
) -> str:
|
||||
assert gcc_version > 8
|
||||
output = rf"""
|
||||
FROM {base_image}
|
||||
|
||||
# Install Ubuntu packages.
|
||||
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
apt-get update -qq && apt-get install -qq --no-install-recommends \
|
||||
cmake \
|
||||
make \
|
||||
ninja-build \
|
||||
wget \
|
||||
python3 \
|
||||
ca-certificates \
|
||||
gcc-{gcc_version} \
|
||||
g++-{gcc_version} \
|
||||
gfortran-{gcc_version} \
|
||||
libfftw3-dev \
|
||||
libopenblas-dev \
|
||||
libint2-dev \
|
||||
libxc-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create links in /usr/local/bin to overrule links in /usr/bin.
|
||||
RUN ln -sf /usr/bin/gcc-{gcc_version} /usr/local/bin/gcc && \
|
||||
ln -sf /usr/bin/g++-{gcc_version} /usr/local/bin/g++ && \
|
||||
ln -sf /usr/bin/gfortran-{gcc_version} /usr/local/bin/gfortran
|
||||
|
||||
# Install DBCSR
|
||||
COPY ./tools/docker/scripts/install_dbcsr.sh ./
|
||||
RUN ./install_dbcsr.sh
|
||||
"""
|
||||
return output
|
||||
|
||||
|
||||
# ======================================================================================
|
||||
def toolchain_ubuntu2040_nompi(gcc_version: int = 8) -> str:
|
||||
output = rf"""
|
||||
FROM ubuntu:20.04
|
||||
|
||||
# Install Ubuntu packages.
|
||||
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
apt-get update -qq && apt-get install -qq --no-install-recommends \
|
||||
|
|
@ -421,12 +443,7 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
|
|||
libopenblas-dev \
|
||||
libgsl-dev \
|
||||
libhdf5-dev \
|
||||
"""
|
||||
if gcc_version > 8:
|
||||
output += " libint2-dev \\\n"
|
||||
output += " libxc-dev \\\n"
|
||||
|
||||
output += rf""" && rm -rf /var/lib/apt/lists/*
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create links in /usr/local/bin to overrule links in /usr/bin.
|
||||
RUN ln -sf /usr/bin/gcc-{gcc_version} /usr/local/bin/gcc && \
|
||||
|
|
@ -443,12 +460,12 @@ RUN ln -sf /usr/bin/gcc-{gcc_version} /usr/local/bin/gcc && \
|
|||
with_openblas="system",
|
||||
with_gsl="system",
|
||||
with_hdf5="system",
|
||||
with_libgrpp=("install" if libgrpp else "no"),
|
||||
with_libint=("system" if gcc_version > 8 else "install"),
|
||||
with_libxc=("system" if gcc_version > 8 else "install"),
|
||||
with_libgrpp="no",
|
||||
with_libint="install",
|
||||
with_libxc="install",
|
||||
with_libxsmm="install",
|
||||
with_libvori=("install" if libvori else "no"),
|
||||
with_spglib=("install" if spglib else "no"),
|
||||
with_libvori="install",
|
||||
with_spglib="no",
|
||||
)
|
||||
return output
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source /opt/cp2k-toolchain/install/setup
|
||||
|
||||
DBCSR_ver="2.6.0"
|
||||
DBCSR_sha256="c67b02ff9abc7c1f529af446a9f01f3ef9e5b0574f220259128da8d5ca7e9dc6"
|
||||
|
||||
|
|
@ -17,7 +14,7 @@ cd dbcsr-${DBCSR_ver}
|
|||
mkdir build
|
||||
cd build
|
||||
|
||||
if ! cmake -DCMAKE_INSTALL_PREFIX=/opt/dbcsr -DUSE_MPI=ON -DUSE_OPENMP=ON -DUSE_SMM=blas .. &> cmake.log; then
|
||||
if ! cmake -DCMAKE_INSTALL_PREFIX=/opt/dbcsr -DUSE_MPI=OFF -DUSE_OPENMP=ON -DUSE_SMM=blas .. &> cmake.log; then
|
||||
cat cmake.log
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -2,6 +2,14 @@
|
|||
|
||||
# author: Ole Schuett
|
||||
|
||||
if (($# != 2)); then
|
||||
echo "Usage: test_regtest_cmake.sh <PROFILE> <VERSION>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PROFILE=$1
|
||||
VERSION=$2
|
||||
|
||||
ulimit -c 0 # Disable core dumps as they can take a very long time to write.
|
||||
|
||||
# Check available shared memory - needed for MPI inter-process communication.
|
||||
|
|
@ -11,32 +19,63 @@ if ((SHM_AVAIL < 1024)); then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Activate Spack environment.
|
||||
eval "$(spack env activate myenv --sh)"
|
||||
|
||||
# Using Ninja because of https://gitlab.kitware.com/cmake/cmake/issues/18188
|
||||
|
||||
# Run CMake.
|
||||
mkdir build
|
||||
cd build || exit 1
|
||||
if ! cmake \
|
||||
-GNinja \
|
||||
-DCMAKE_C_FLAGS="-fno-lto" \
|
||||
-DCMAKE_Fortran_FLAGS="-fno-lto" \
|
||||
-DCMAKE_INSTALL_PREFIX=/opt/cp2k \
|
||||
-Werror=dev \
|
||||
-DCP2K_USE_VORI=OFF \
|
||||
-DCP2K_USE_COSMA=OFF \
|
||||
-DCP2K_USE_DLAF=ON \
|
||||
-DCP2K_BLAS_VENDOR=OpenBLAS \
|
||||
-DCP2K_USE_SPGLIB=ON \
|
||||
-DCP2K_USE_LIBINT2=OFF \
|
||||
-DCP2K_USE_LIBXC=ON \
|
||||
-DCP2K_USE_LIBTORCH=OFF \
|
||||
-DCP2K_USE_MPI=ON \
|
||||
-DCP2K_USE_MPI_F08=ON \
|
||||
-DCP2K_ENABLE_REGTESTS=ON \
|
||||
.. |& tee ./cmake.log; then
|
||||
|
||||
# TODO: Reconcile PROFILE with CP2K_BUILD_OPTIONS in CMakeLists.txt.
|
||||
case ${PROFILE} in
|
||||
spack)
|
||||
eval "$(spack env activate myenv --sh)"
|
||||
cmake \
|
||||
-GNinja \
|
||||
-DCMAKE_C_FLAGS="-fno-lto" \
|
||||
-DCMAKE_Fortran_FLAGS="-fno-lto" \
|
||||
-DCMAKE_INSTALL_PREFIX=/opt/cp2k \
|
||||
-Werror=dev \
|
||||
-DCP2K_USE_VORI=OFF \
|
||||
-DCP2K_USE_COSMA=OFF \
|
||||
-DCP2K_USE_DLAF=ON \
|
||||
-DCP2K_BLAS_VENDOR=OpenBLAS \
|
||||
-DCP2K_USE_SPGLIB=ON \
|
||||
-DCP2K_USE_LIBINT2=OFF \
|
||||
-DCP2K_USE_LIBXC=ON \
|
||||
-DCP2K_USE_LIBTORCH=OFF \
|
||||
-DCP2K_USE_MPI=ON \
|
||||
-DCP2K_USE_MPI_F08=ON \
|
||||
-DCP2K_ENABLE_REGTESTS=ON \
|
||||
.. |& tee ./cmake.log
|
||||
CMAKE_EXIT_CODE=$?
|
||||
;;
|
||||
ubuntu)
|
||||
cmake \
|
||||
-GNinja \
|
||||
-DCMAKE_INSTALL_PREFIX=/opt/cp2k \
|
||||
-Werror=dev \
|
||||
-DCP2K_ENABLE_REGTESTS=ON \
|
||||
-DCP2K_BLAS_VENDOR=OpenBLAS \
|
||||
-DCP2K_USE_LIBINT2=ON \
|
||||
-DCP2K_USE_LIBXC=ON \
|
||||
-DCP2K_USE_FFTW3=ON \
|
||||
-DCP2K_USE_MPI=OFF \
|
||||
-DCP2K_USE_MPI_F08=OFF \
|
||||
-DCP2K_USE_VORI=OFF \
|
||||
-DCP2K_USE_COSMA=OFF \
|
||||
-DCP2K_USE_DLAF=OFF \
|
||||
-DCP2K_USE_SPGLIB=OFF \
|
||||
-DCP2K_USE_LIBTORCH=OFF \
|
||||
.. |& tee ./cmake.log
|
||||
CMAKE_EXIT_CODE=$?
|
||||
;;
|
||||
*)
|
||||
echo "Unknown profile ${PROFILE}."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ $CMAKE_EXIT_CODE -ne 0 ]; then
|
||||
echo -e "\nSummary: CMake failed."
|
||||
echo -e "Status: FAILED\n"
|
||||
exit 0
|
||||
|
|
@ -82,7 +121,7 @@ export PIKA_PROCESS_MASK="0x3"
|
|||
echo -e "\n========== Running Regtests =========="
|
||||
set -x
|
||||
# shellcheck disable=SC2086
|
||||
./tests/do_regtest.py local psmp ${TESTOPTS}
|
||||
./tests/do_regtest.py local ${VERSION} ${TESTOPTS}
|
||||
|
||||
exit 0 # Prevent CI from overwriting do_regtest's summary message.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue