CP2K
CP2K is a quantum chemistry and solid state physics software package that can perform atomistic simulations of solid state, liquid, molecular, periodic, material, crystal, and biological systems.
Table of Contents
Following executables are available: cp2k.* cp2k_shell.* graph.*
Following versions are available:
*.popt
- MPI-parallelised version*.psmp
- MPI- and OpenMP-parallelised (hybrid) version
That means, for MPI version of CP2K you call cp2k.popt
binary, and for hybrid (MPI+OpenMP) cp2k.psmp
The Data directory path has been set using $CP2K_DATA_DIR
environment variable. Change/unset if needed.
You have to load additional modules until you can load CP2K
module load GCC/11.3.0
module load OpenMPI/4.1.4
module load CP2K/2022.1
Available CP2K versions can be listed with module spider CP2K
. Specifying a version will list the needed modules: module spider CP2K/2022.1
MPI parallel job:
#!/usr/bin/zsh
### 12 processes, all on one node
#SBATCH --nodes=1
#SBATCH --ntasks=12
### The time limit for the job in minutes (reaching this time limit, the process is signaled and killed)
#SBATCH --time=80
### load the necessary module files
module load GCC/11.3.0
module load OpenMPI/4.1.4
module load CP2K/2022.1
### start the MPI binary
$MPIEXEC $FLAGS_MPI_BATCH cp2k.popt U.inp
Hybrid (MPI+OpenMP) parallel job (two nodes, no BCS)
#!/usr/bin/zsh
### Hybrid Job with 4 MPI Processes in groups to 24 threads per process
#SBATCH --ntasks=4
#SBATCH --cpus-per-task=24
### The time limit for the job in minutes (reaching this time limit, the process is signaled and killed)
#SBATCH --time=80
### load the necessary module files
module load GCC/11.3.0
module load OpenMPI/4.1.4
module load CP2K/2022.1
### start the hybrid binary
$MPIEXEC $FLAGS_MPI_BATCH cp2k.psmp U.inp
- https://www.cp2k.org/
- CP2K is a Fortran program and Fortran programs (especially OpenMP programs) are known to consume a lot of stack space. As now the default stack limit is set to 'unlimited' you do not need to issue any additional command.