[CP2K-user] [CP2K:19384] Help with running cp2k in parallel with Slurm
Krack Matthias
matthias.krack at psi.ch
Wed Oct 18 17:21:10 UTC 2023
Hi Ava
Do you run the “srun” command as part of a SLURM batch job file with a #SBATCH header section or interactively?
Your guess is right, the –ntasks flag defines the number of MPI ranks.
Best
Matthias
From: cp2k at googlegroups.com <cp2k at googlegroups.com> on behalf of Ava Rajh <ava.rajh at gmail.com>
Date: Wednesday, 18 October 2023 at 14:17
To: cp2k <cp2k at googlegroups.com>
Subject: [CP2K:19379] Help with running cp2k in parallel with Slurm
Dear all,
I am trying to run cp2k on our HPC cluster and I am new in doing any kind of parallel computing and work on a cluster, so I would appreciate if some help and I apologize if I am missing something obvious.
I am trying to use Cp2k in combination with apptainer and I followed instructions at https://github.com/cp2k/cp2k/tree/master/tools/apptainer
I have a .sif file in my work directory and if I work within it (Running MPI within the container), everything works perfectly and I can set the number of MPI threads.
But when trying to run it through slurm, I can't seem to be able to set the number of MPI processes per node. If i start a command like:
srun --ntasks=2 apptainer run -B $PWD cp2k-2023.2_mpich_generic_psmp.sif cp2k -i H2O-32.in
it just starts 2 instances of the program that run at the same time, and for each, the total number of message passing processes is 1. I am able to set and change the number of OpenMP threads though.
So my question would be first, am I wrongly assuming that --ntasks X should correspond to the number of MPI threads? And if I am, how would I set it.
Please let me know if I need to provide any more information to diagnose the issue.
Thank you very much for the help and kind regards,
Ava Rajh
--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com<mailto:cp2k+unsubscribe at googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/2393b350-7de0-4599-97e0-4f52ffec0c5en%40googlegroups.com<https://groups.google.com/d/msgid/cp2k/2393b350-7de0-4599-97e0-4f52ffec0c5en%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/ZRAP278MB08271B144134317851F2DE6FF4D5A%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20231018/5a52b739/attachment.htm>
More information about the CP2K-user
mailing list