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
### Limit for maximum memory per slot (in MB)
#SBATCH --mem-per-cpu=3900
### 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
#################
# ATTENTION !!! #
#################
# Divide the needed memory per task through the cpus-per-task, as slurm requests memory per cpu, not per task !
# Example:
# You need 24 GB memory per task, you have 24 cpus per task ordered
# order 24GB/24 -> 1G memory per cpu (i.e., per thread)
#SBATCH --mem-per-cpu=1850
### 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.