Docker: Add test for GCC 14

This commit is contained in:
Ole Schütt 2024-08-12 14:04:14 +02:00 committed by Ole Schütt
parent 28e608160b
commit 6ef57a97c0
3 changed files with 82 additions and 1 deletions

View file

@ -0,0 +1,64 @@
#
# This file was created by generate_dockerfiles.py.
# Usage: docker build -f ./Dockerfile.test_gcc14 ../../
#
FROM ubuntu:24.04
# Add Ubuntu universe repository.
RUN apt-get update -qq && apt-get install -qq --no-install-recommends software-properties-common
RUN add-apt-repository universe
# Install Ubuntu packages.
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
apt-get update -qq && apt-get install -qq --no-install-recommends \
cmake \
less \
nano \
make \
ninja-build \
wget \
python3 \
ca-certificates \
gcc-14 \
g++-14 \
gfortran-14 \
libfftw3-dev \
libopenblas-dev \
libint2-dev \
libxc-dev \
libxsmm-dev \
libspglib-f08-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-14 /usr/local/bin/gcc && \
ln -sf /usr/bin/g++-14 /usr/local/bin/g++ && \
ln -sf /usr/bin/gfortran-14 /usr/local/bin/gfortran
# Install DBCSR
COPY ./tools/docker/scripts/install_dbcsr.sh ./
RUN ./install_dbcsr.sh
# Install CP2K sources.
WORKDIR /opt/cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tests ./tests
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
# Build CP2K with CMake and run regression tests.
ARG TESTOPTS=""
COPY ./tools/docker/scripts/build_cp2k_cmake.sh ./tools/docker/scripts/test_regtest_cmake.sh ./
RUN /bin/bash -o pipefail -c " \
TESTOPTS='${TESTOPTS}' \
./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.
CMD cat $(find ./report.log -mmin +10) | sed '/^Summary:/ s/$/ (cached)/'
ENTRYPOINT []
#EOF

View file

@ -202,6 +202,14 @@ nodepools: pool-t2d-32
build_path: /
dockerfile: /tools/docker/Dockerfile.test_gcc13
[gcc14]
display_name: Ubuntu, GCC 14 (ssmp)
tags: daily
cpu: 32
nodepools: pool-t2d-32
build_path: /
dockerfile: /tools/docker/Dockerfile.test_gcc14
#-------------------------------------------------------------------------------
[perf-cuda-volta]

View file

@ -56,7 +56,7 @@ def main() -> None:
with OutputFile(f"Dockerfile.test_coverage-{version}", args.check) as f:
f.write(toolchain_full() + coverage(version))
for gcc_version in 8, 9, 10, 11, 12, 13:
for gcc_version in 8, 9, 10, 11, 12, 13, 14:
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))
@ -426,7 +426,16 @@ def toolchain_ubuntu_nompi(
assert gcc_version > 8
output = rf"""
FROM {base_image}
"""
if gcc_version > 13:
output += rf"""
# Add Ubuntu universe repository.
RUN apt-get update -qq && apt-get install -qq --no-install-recommends software-properties-common
RUN add-apt-repository universe
"""
output += rf"""
# Install Ubuntu packages.
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
apt-get update -qq && apt-get install -qq --no-install-recommends \