Step-by-step guide
...
Related articles
Nach Stichwort filtern (Inhalt nach Stichwort) |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | PUB |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label = "kb-how-to-article" and type = "page" and space = "PUB" |
---|
labels | kb-how-to-article |
---|
|
...
...
Execute MPI parallel code
When using OpenMPI, binding is controlled using the –-bind-to
parameter. To bind processes to cores, use --bind-to core
. Possible other values can be found in the man page.
Codeblock |
---|
mpirun --bind-to core ./yourprogram |
Our hardware supports hyperthreading, allowing you start 192 processes on Cascade Lake machines (*96 partitions) and 80 on Skylake machines.
If no specific requests regarding the number of tasks has been done, mpirun
defaults to hyperthreading and starts cores*2
processes. If a number of tasks has been specified (either with -n
or --tasks-per-node
), mpirun
honors this. For example:
Codeblock |
---|
language | bash |
---|
title | Hyperthreading active, 80/192 Processes per Node will be started |
---|
collapse | true |
---|
|
#!/bin/bash
#SBATCH -N 4
module load gcc/9.2.0 openmpi/gcc.9/3.1.5
mpirun ./yourexe |
Codeblock |
---|
language | bash |
---|
title | Hyperthreading disabled, 96 processes per node are started. |
---|
collapse | true |
---|
|
#!/bin/bash
#SBATCH -N 4
#SBATCH --tasks-per-node 96
module load gcc/9.2.0 openmpi/gcc.9/3.1.5
mpirun ./yourexe |