Drop support for GCC 8 (#5290)

This commit is contained in:
Ole Schütt 2026-05-26 10:44:04 +02:00 committed by GitHub
parent cd7394cb51
commit a7cc81a68e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 161 deletions

View file

@ -158,13 +158,6 @@ name: Ubuntu, GCC 9 (ssmp)
host: GCP
report_url: https://storage.googleapis.com/cp2k-ci/dashboard_gcc9_report.txt
[gcc8]
sortkey: 499
name: Ubuntu, GCC 8 (ssmp)
host: GCP
report_url: https://storage.googleapis.com/cp2k-ci/dashboard_gcc8_report.txt
# ==============================================================================
[minimal]
@ -398,50 +391,52 @@ timeout: 170
host: GCP
report_url: https://storage.googleapis.com/cp2k-ci/dashboard_spack-psmp-opensuse_report.txt
# ==============================================================================
[spack-psmp-gcc10]
sortkey: 1045
sortkey: 2010
name: Spack (psmp, GCC 10)
timeout: 170
host: GCP
report_url: https://storage.googleapis.com/cp2k-ci/dashboard_spack-psmp-gcc10_report.txt
[spack-psmp-gcc11]
sortkey: 1046
sortkey: 2011
name: Spack (psmp, GCC 11)
timeout: 170
host: GCP
report_url: https://storage.googleapis.com/cp2k-ci/dashboard_spack-psmp-gcc11_report.txt
[spack-psmp-gcc12]
sortkey: 1047
sortkey: 2012
name: Spack (psmp, GCC 12)
timeout: 170
host: GCP
report_url: https://storage.googleapis.com/cp2k-ci/dashboard_spack-psmp-gcc12_report.txt
[spack-psmp-gcc13]
sortkey: 1048
sortkey: 2013
name: Spack (psmp, GCC 13)
timeout: 170
host: GCP
report_url: https://storage.googleapis.com/cp2k-ci/dashboard_spack-psmp-gcc13_report.txt
[spack-psmp-gcc14]
sortkey: 1049
sortkey: 2014
name: Spack (psmp, GCC 14)
timeout: 170
host: GCP
report_url: https://storage.googleapis.com/cp2k-ci/dashboard_spack-psmp-gcc14_report.txt
[spack-psmp-gcc15]
sortkey: 1050
sortkey: 2015
name: Spack (psmp, GCC 15)
timeout: 170
host: GCP
report_url: https://storage.googleapis.com/cp2k-ci/dashboard_spack-psmp-gcc15_report.txt
[spack-psmp-gcc16]
sortkey: 1052
sortkey: 2016
name: Spack (psmp, GCC 16)
timeout: 170
host: GCP
@ -450,7 +445,7 @@ report_url: https://storage.googleapis.com/cp2k-ci/dashboard_spack-psmp-gcc16_r
# ==============================================================================
[asan-psmp]
sortkey: 1051
sortkey: 3000
name: Address Sanitizer
timeout: 170
host: GCP

View file

@ -1,124 +0,0 @@
#
# This file was created by generate_dockerfiles.py.
# Usage: podman build --shm-size=1g -f ./Dockerfile.test_gcc8 ../../
#
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 \
cmake \
less \
nano \
make \
ninja-build \
wget \
python3 \
ca-certificates \
gcc-8 \
g++-8 \
gfortran-8 \
libfftw3-dev \
libopenblas-dev \
libint2-dev \
libxc-dev \
libhdf5-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-8 /usr/local/bin/gcc && \
ln -sf /usr/bin/g++-8 /usr/local/bin/g++ && \
ln -sf /usr/bin/gfortran-8 /usr/local/bin/gfortran
# Use toolchain to install DBCSR and CMake.
# Install requirements for the toolchain.
WORKDIR /opt/cp2k-toolchain
COPY ./tools/toolchain/install_requirements*.sh ./
RUN ./install_requirements.sh ubuntu:20.04
# 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-dbcsr \
--with-gcc=system \
--with-cmake \
--with-ninja=system \
--with-openblas=system \
--with-libxc=no \
--with-libint=no \
--with-fftw=no \
--with-libxsmm=no \
--with-spglib=no \
--with-libvori=no \
--dry-run
# Dry-run leaves behind config files for the followup install scripts.
# This breaks up the lengthy installation into smaller 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/stage9/ ./scripts/stage9/
RUN ./scripts/stage9/install_stage9.sh && rm -rf ./build
# Install CP2K sources.
WORKDIR /opt/cp2k
COPY ./src ./src
COPY ./data ./data
COPY ./tools/build_utils ./tools/build_utils
COPY ./cmake ./cmake
COPY ./CMakeLists.txt .
# Compile CP2K.
COPY ./tools/docker/scripts/build_cp2k.sh .
RUN ./build_cp2k.sh ubuntu ssmp
# Run regression tests.
ARG TESTOPTS="--skipdir=QS/regtest-rs-dhft"
COPY ./tests ./tests
COPY ./tools/docker/scripts/test_regtest.sh ./
RUN /bin/bash -o pipefail -c " \
TESTOPTS='${TESTOPTS}' \
./test_regtest.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

@ -213,14 +213,6 @@ dockerfile: /tools/docker/Dockerfile.test_coverage
#-------------------------------------------------------------------------------
[gcc8]
display_name: Ubuntu, GCC 8 (ssmp)
tags: daily
cpu: 32
nodepools: pool-main
build_path: /
dockerfile: /tools/docker/Dockerfile.test_gcc8
[gcc9]
display_name: Ubuntu, GCC 9 (ssmp)
tags: daily

View file

@ -245,12 +245,10 @@ def main() -> None:
f.write(install_deps_toolchain())
f.write(coverage())
for gcc_version in 8, 9, 10, 11, 12, 13, 14, 15, 16:
for gcc_version in 9, 10, 11, 12, 13, 14, 15, 16:
with OutputFile(f"Dockerfile.test_gcc{gcc_version}", args.check) as f:
# Skip some tests due to bug in LDA_C_PMGB06 functional in libxc <5.2.0.
testopts = "--skipdir=QS/regtest-rs-dhft" if gcc_version == 8 else ""
f.write(install_deps_ubuntu(gcc_version=gcc_version))
f.write(regtest("ubuntu", "ssmp", testopts=testopts))
f.write(regtest("ubuntu", "ssmp"))
with OutputFile("Dockerfile.test_arm64-psmp", args.check) as f:
base_img = "arm64v8/ubuntu:26.04"
@ -489,12 +487,8 @@ def install_deps_toolchain(
# ======================================================================================
def install_deps_ubuntu(gcc_version: int = 15) -> str:
if gcc_version > 14:
base_image = "ubuntu:26.04"
elif gcc_version > 8:
base_image = "ubuntu:24.04"
else:
base_image = "ubuntu:20.04"
assert gcc_version > 8
base_image = "ubuntu:26.04" if gcc_version > 14 else "ubuntu:24.04"
output = f"\nFROM {base_image}\n"
if gcc_version > 13:
@ -524,8 +518,8 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
libint2-dev \
libxc-dev \
libhdf5-dev \
{"libxsmm-dev" if gcc_version > 8 else ""} \
{"libspglib-f08-dev" if gcc_version > 8 else ""} \
libxsmm-dev \
libspglib-f08-dev \
&& rm -rf /var/lib/apt/lists/*
# Create links in /usr/local/bin to overrule links in /usr/bin.
@ -533,13 +527,13 @@ 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
# Use toolchain to install DBCSR{"" if gcc_version > 8 else " and CMake"}.
# Use toolchain to install DBCSR.
""" + install_toolchain(
base_image=base_image,
mpi_mode="no",
with_dbcsr="",
with_gcc="system",
with_cmake="system" if gcc_version > 8 else "",
with_cmake="system",
with_ninja="system",
with_openblas="system",
with_libxc="no",