Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/software-packages/cp2k.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the --cpu-bind=cores preferred to the --hint=nomultithread option that we usually recommend to get correct placement (I have not compared the difference)?