How to use cp2k¶
Software
|
Version
|
Cluster
|
---|---|---|
cp2k
|
2024.1
|
Dardel-GPU
|
The CP2K installation contained in this module was built with support for the programs and libraries ELPA, Libint-CP2K, libvori, libxc, libxsmm, PLUMED, and spglib. The executables have been built with backend for AMD GPUs, with linking to GPU builds of the libraries COSMA, SpFFT, and SPLA.
To display info on which environment variables are set when loading the module, use
ml PDC/23.12
ml show cp2k/2024.1-cpeGNU-23.12-gpu
To load the CP2K module
ml PDC/23.12
ml cp2k/2024.1-cpeGNU-23.12-gpu
Below follows an example job script for CP2K, for running on a single Dardel GPU node using 8 MPI ranks and 7 OpenMP threads. You need to replace pdc.staff with an active project that you belong to. Note: This script is a simple template. For efficient calculation the script needs to be augmented with settings to pin appropriately the computation threads to the CCDs and GCD.
#!/bin/bash -l
#SBATCH -J cp2k-test
#SBATCH -A pdc.staff
#SBATCH -p gpu
#SBATCH -t 02:00:00
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=8
#SBATCH --cpus-per-task=16
ml PDC/23.12
ml cp2k/2024.1-cpeGNU-23.12-gpu
export MPICH_GPU_SUPPORT_ENABLED=1
export SRUN_CPUS_PER_TASK=$SLURM_CPUS_PER_TASK
export OMP_NUM_THREADS=8
export OMP_PLACES=cores
# Add settings to pin threads to CCDs and GCDs
srun cp2k.psmp -i inputfile.inp -o logfile.log
Assuming the script is named jobscriptCP2K.sh, it can be submitted using:
sbatch jobscriptCP2K.sh
Disclaimer¶
PDC takes no responsibility for the correctness of results produced with the binaries. Always evaluate the binaries against known results for the systems and properties you are investigating before using the binaries for production jobs.