I am trying to understand how to correctly write SLURM scripts to maximize parallelism.
For example, let's propose the following escenario: I have a program written in OpenMPI and OpenMP has the following characteristics:
- The program has 6 MPI processes
- Each process uses 4 threads
The program has to run in a cluster that has 6 nodes; each node has 2 CPUs and each CPU has 8 cores.
What values should be set in my SLURM script so that the program is executed using the adequate number of resources AND the maximum number of instances of the program can be executed simultaneously?
By looking at the internet, I have found that there are many options such as:
- --ntasks
- --nodes
- --tasks-per-node
- --cpus-per-task
- --ntasks-per-core
- --ntasks-per-node
- --ntasks-per-socket
- --threads-per-core
- --cores-per-socket
- --sockets-per-node
I would say:
-- ntasks → 6 # Number of MPI processes
-- nodes→ 6 # Number of nodes
-- tasks-per-node → 1 # Number of MPI processes per node
-- cpus-per-task → 4 # Number of threads per MPI process
But I am not sure since I have no experience.
Any help will be appreciated! :)