Description
CP2K is a freely available (GPL) program, written in Fortran 95, to perform atomistic and molecular simulations of solid state, liquid, molecular and biological systems. It provides a general framework for different methods such as e.g. density functional theory (DFT) using a mixed Gaussian and plane waves approach (GPW), and classical pair and many-body potentials.
More information
- Homepage: https://www.cp2k.org/
Available Versions of CP2K
Version | Module | Available on |
---|
c415b5d-foss-2023b-gcc-openmpi-openblas
chem/CP2K/c415b5d-foss-2023b-gcc-openmpi-openblas
Noctua 2
c0268df-foss-2023b-gcc-openmpi-openblas
chem/CP2K/c0268df-foss-2023b-gcc-openmpi-openblas
Noctua 2
9.1-foss-2021b | chem/CP2K/9.1-foss-2021b | Noctua 1, Noctua 2, Noctua 2 |
8.2-foss-2021a | chem/CP2K/8.2-foss-2021a | Noctua 1, Noctua 2 |
47e307d-foss-2023b-gcc-openmpi-openblas | chem/CP2K/47e307d-foss-2023b-gcc-openmpi-openblas | Noctua 2 |
26e5994-foss-2023b-gcc-openmpi-openblas | chem/CP2K/26e5994-foss-2023b-gcc-openmpi-openblas | Noctua 2 |
2024.3-foss-2023b-gcc-openmpi-openblas | chem/CP2K/2024.3-foss-2023b-gcc-openmpi-openblas | Noctua 2 |
2024. |
1-foss-2023b-gcc-openmpi- |
openblas2 | chem/CP2K/2024. |
1-foss-2023b-gcc-openmpi-openblas | Noctua 2, Noctua 2 |
26e5994-foss-2023b-gcc-openmpi-openblas |
chem/CP2K/ |
26e5994-foss-2023b-gcc-openmpi- |
openblas2 | Noctua 2 |
2024.1-foss-2023b-gcc-openmpi-openblas- |
cuda | chem/CP2K/2024.1-foss-2023b-gcc-openmpi-openblas- |
cuda | Noctua 2 |
2023.1-foss- |
2022b-gcc-openmpi-openblas-cuda | chem/CP2K/ |
2023.1-foss- |
2022b-gcc-openmpi-openblas-cuda | Noctua 1, Noctua 2 |
2023.1-foss-2022b-gcc-openmpi-openblas |
chem/CP2K/2023.1-foss-2022b-gcc-openmpi-openblas |
Noctua |
2, Noctua 2 | ||
2023.1-foss-2022b-gcc-openmpi-openblas | chem/CP2K/2023.1-foss-2022b-gcc-openmpi-openblas | Noctua 2 |
This table is generated automatically. If you need other versions please click pc2-support@uni-paderborn.de.
...
Module | Binary | Arch file | cp2kflags | libint lmax | Test run/Test successful |
---|---|---|---|---|---|
2023.1-foss-2022b-gcc-openmpi-openblas | cp2k.psmp | $EBROOTCP2K/arch/local.psmp | omp libint fftw3 libxc elpa parallel scalapack cosma xsmm plumed2 spglib sirius libvori libbqb libvdwxc | 7 | 3921/3921 |
2023.1-foss-2022b-gcc-openmpi-openblas-cuda | cp2k.psmp | $EBROOTCP2K/arch/local_cuda.psmp | omp libint fftw3 libxc elpa elpa_nvidia_gpu parallel scalapack cosma xsmm dbcsr_acc plumed2 spglib sirius libvori libbqb offload_cuda spla_gemm_offloading libvdwxc | 7 | 3863/3863 |
2024.1-foss-2023b-gcc-openmpi-openblas | cp2k.psmp | $EBROOTCP2K/arch/local.psmp | omp libint fftw3 libxc libgrpp elpa parallel mpi_f08 scalapack cosma xsmm plumed2 spglib sirius libvori libbqb libvdwxc hdf5 | 7 | 4171/4171 |
26e5994-foss-2023b-gcc-openmpi-openblas | cp2k.psmp | $EBROOTCP2K/arch/local.psmp | omp libint fftw3 libxc libgrpp elpa parallel mpi_f08 scalapack cosma deepmd xsmm plumed2 spglib sirius libvori libbqb libvdwxc hdf5 | 7 | 4180/4180 |
Building Custom CP2K Versions
If you are a CP2K developer or have another reason for not using one of the installed versions above like a required code change, then we provide two variants for easily building your own CP2K version.
Using Provided Arch-Files
Let’s say that you for example want to build the current development version or any other special version of CP2K on Noctua 2. Then you can use the arch-file and all dependencies from an installed CP2K module above. The steps are
clone the source of the cp2k version you want. For example for the current development version from github:
Code Block git clone --recursive https://github.com/cp2k/cp2k.git cp2k
change into the cp2k source tree
Code Block cd cp2k
load one of the available modules like 2024.3-foss-2022b-gcc-openmpi-openblas
Code Block module load 2024.3-foss-2022b-gcc-openmpi-openblas
copy the arch file from the module to your local cp2k arch directory. The path to the arch-files is in the environment variable EBROOTCP2K
Code Block cp -v $EBROOTCP2K/arch/* arch/
Build cp2k, for example for cp2k.psmp
Code Block make ARCH=local VERSION=psmp -j
You can now use your custom cp2k version in job scripts like
Code Block module reset module load 2024.3-foss-2022b-gcc-openmpi-openblas [path tzo your custom cp2k source tree]/exe/local/cp2k.psmp ...
Remember to load the module that you used to build cp2k because it holds all the dependencies (xsmm, ELPA, …)
Using Spack
Another variant is to use Spack to build a custom version of CP2K. The steps are for example for the development version of cp2k with the development version of SIRIUS in a new spack environment in the current directory.
Install Spack:
Code Block |
---|
module reset
wget https://github.com/spack/spack/releases/download/v0.22.1/spack-0.22.1.tar.gz
tar -xf spack-0.22.1.tar.gz
. spack-0.22.1/share/spack/setup-env.sh
module load toolchain/foss/2023b
spack compiler find |
Create a spack virtual environment:
Code Block |
---|
spack env create -d spack_cp2k
spack env activate spack_cp2k |
Compile dependencies and CP2K (this takes a while):
Code Block |
---|
module load toolchain/foss/2023b
spack install --add cmake
spack install --add --only=dependencies cp2k@master build_type=Release %gcc +sirius ^openblas threads=openmp ^openmpi ^scalapack ^elpa ^libint ^fftw ^libxsmm ^libxc ^gsl ^hdf5 ^plumed ^cosma ^libvori ^spfft ^sirius@develop |
Using the dependencies built with Spack to build a custom cp2k version:
Code Block |
---|
. spack-0.22.1/share/spack/setup-env.sh
spack env activate spack_cp2k
spack build-env cp2k@master build_type=Release %gcc +sirius ^openblas threads=openmp ^openmpi ^scalapack ^elpa ^libint ^fftw ^libxsmm ^libxc ^gsl ^hdf5 ^plumed ^cosma ^libvori ^spfft ^sirius@develop -- bash
git clone --recursive https://github.com/cp2k/cp2k.git cp2k
cd cp2k
mkdir build
cmake -S . -B build -DCP2K_USE_LIBXC=ON -DCP2K_USE_LIBINT2=ON -DCP2K_USE_SPGLIB=ON -DCP2K_USE_ELPA=ON -DCP2K_USE_SPLA=ON -DCP2K_USE_SIRIUS=ON -DCP2K_USE_COSMA=ON -DCP2K_USE_LIBXSMM=ON -DCP2K_USE_PLUMED=ON
cmake --build build -- -j 32 |
If you have any problems, please let us know at pc2-support@uni-paderborn.de.