CP2K 2026.1
Web Page
Version
2026.1
Build Environment
- GCC 13.1.1 (gcc-toolset-13)
- Open MPI 4.1.8
Files Required for Build
- cp2k-2026.1.tar.bz2
Build Procedure
#!/bin/sh
set -eVERSION=2026.1
INSTDIR=/apl/cp2k/${VERSION}
SOURCE_ROOT=/home/users/${USER}/Software/CP2K/${VERSION}
TARBALL=${SOURCE_ROOT}/cp2k-${VERSION}.tar.bz2
PARALLEL=32
CLEAN=${CLEAN:-true}umask 0022
export LANG=C
export LC_ALL=C
ulimit -s unlimitedmodule purge
module load gcc-toolset/13
module load openmpi/4.1.8/gcc13
module load cmake/4.2.3command -v gcc || { echo "ERROR: gcc not found"; exit 1; }
command -v mpicc || { echo "ERROR: mpicc not found"; exit 1; }
command -v cmake || { echo "ERROR: cmake not found"; exit 1; }if "${CLEAN}"; then
rm -rf "${INSTDIR:?}/"*
cd "${INSTDIR}"
tar jxf "${TARBALL}" --strip-components=1
else
echo "Skipping clean and extraction (CLEAN=false)"
ficd "${INSTDIR}/tools/toolchain"
export CC=gcc
export CXX=g++
export FC=gfortran
export MPICC=mpicc
export MPICXX=mpicxx
export MPIFC=mpif90export CMAKE_POLICY_VERSION_MINIMUM=3.5
./install_cp2k_toolchain.sh \
--mpi-mode=openmpi \
--math-mode=openblas \
--with-gcc=system \
--with-cmake=system \
--with-openmpi=system \
--with-mpich=no \
--with-intelmpi=no \
--with-libxc=install \
--with-libint=install \
--with-fftw=install \
--with-acml=no \
--with-mkl=no \
--with-openblas=install \
--with-scalapack=install \
--with-libxsmm=install \
--with-elpa=install \
--with-deepmd=no \
--with-plumed=install \
--with-sirius=install \
--with-gsl=install \
--with-libvdwxc=install \
--with-spglib=install \
--with-hdf5=install \
--with-spfft=install \
--with-spla=install \
--with-cosma=install \
--with-libvori=install \
--with-libtorch=no \
--with-libsmeagol=install \
--with-dftd4=install \
--with-tblite=install \
--with-trexio=install \
--with-greenx=install \
--with-gmp=install \
--with-ace=no \
--with-mcl=install \
-j ${PARALLEL}source "${INSTDIR}/tools/toolchain/install/setup"
cd "${INSTDIR}"
rm -rf build
mkdir buildcd build
cmake -S "${INSTDIR}" -B "${INSTDIR}/build" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${INSTDIR}" \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_SHARED_LIBS=OFF \
-DCP2K_USE_ACCEL=OFF \
-DCP2K_WITH_CUDA_PROFILING=OFF \
-DCP2K_ENABLE_DBM_GPU=OFF \
-DCP2K_ENABLE_GRID_GPU=OFF \
-DCP2K_ENABLE_PW_GPU=OFF \
-DCP2K_USE_SPLA_GEMM_OFFLOADING=OFF \
-DCP2K_USE_MPI=ON \
-DCP2K_USE_MPI_F08=ON \
-DCP2K_USE_COSMA=ON \
-DCP2K_USE_ELPA=ON \
-DCP2K_ENABLE_ELPA_OPENMP_SUPPORT=ON \
-DCP2K_USE_SPLA=ON \
-DCP2K_USE_LIBXSMM=ON \
-DCP2K_USE_FFTW3=ON \
-DCP2K_ENABLE_FFTW3_OPENMP_SUPPORT=ON \
-DCP2K_USE_LIBXC=ON \
-DCP2K_USE_LIBINT2=ON \
-DCP2K_USE_LIBVDWXC=ON \
-DCP2K_USE_DFTD4=ON \
-DCP2K_USE_TBLITE=ON \
-DCP2K_USE_VORI=ON \
-DCP2K_USE_SIRIUS=ON \
-DCP2K_USE_SIRIUS_DFTD4=ON \
-DCP2K_USE_SIRIUS_VCSQNM=ON \
-DCP2K_USE_SIRIUS_NLCG=ON \
-DCP2K_USE_PLUMED=ON \
-DCP2K_USE_LIBSMEAGOL=ON \
-DCP2K_USE_GREENX=ON \
-DCP2K_USE_HDF5=ON \
-DCP2K_USE_SPGLIB=ON \
-DCP2K_USE_TREXIO=ON \
-DCP2K_USE_MIMIC=ON \
-DCP2K_USE_ACE=OFF \
-DCP2K_USE_DEEPMD=OFF \
-DCP2K_USE_PEXSI=OFF# Build and install
cmake --build "${INSTDIR}/build" -j "${PARALLEL}"
cmake --install "${INSTDIR}/build"
Testing
Run using the following job script. All tests passed.
#!/bin/sh
#PBS -l select=1:ncpus=64:mpiprocs=2:ompthreads=1
#PBS -l walltime=72:00:00VERSION=2026.1
INSTDIR=/apl/cp2k/${VERSION}
WORKDIR=${PBS_O_WORKDIR}module purge
module load openmpi/4.1.8/gcc13cd ${INSTDIR}
source tools/toolchain/install/setup
export LD_LIBRARY_PATH="${INSTDIR}/tools/toolchain/install/mcl-3.0.0/lib64/MiMiC:${LD_LIBRARY_PATH}"export CP2K_DATA_DIR=${INSTDIR}/data/
python3.11 ./tests/do_regtest.py ${INSTDIR}/bin psmp --mpiranks=1 --ompthreads=1 --timeout=4000 > ${WORKDIR}/mpi1_omp1.logpython3.11 ./tests/do_regtest.py ${INSTDIR}/bin psmp --mpiranks=2 --ompthreads=1 --timeout=4000 > ${WORKDIR}/mpi2_omp1.log
python3.11 ./tests/do_regtest.py ${INSTDIR}/bin psmp --mpiranks=1 --ompthreads=2 --timeout=4000 > ${WORKDIR}/mpi1_omp2.log