diff --git a/docs/software-packages/cp2k.md b/docs/software-packages/cp2k.md index 82ac82b..c4b5527 100644 --- a/docs/software-packages/cp2k.md +++ b/docs/software-packages/cp2k.md @@ -57,11 +57,14 @@ with 2 OpenMP threads per MPI process: module load cp2k # Source the environment setup script generated by CP2K's install toolchain - source $CP2K/tools/toolchain/install/setup + source $CP2K_DIR/tools/toolchain/install/setup - # Set the number of threads to the value specified for --cpus-per-task above + # Set the number of OpenMP threads to the Slurm value specified for --cpus-per-task above export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK + # Ensure srun launches CP2K respecting --cpus-per-task + export SRUN_CPUS_PER_TASK=$SLURM_CPUS_PER_TASK + # Run using input in test.inp - srun cp2k.psmp -i test.inp + srun --distribution=block:block --cpu-bind=cores cp2k.psmp -i test.inp