Commit 09479776 authored by Helen He's avatar Helen He

Merge branch 'bc/clarifications' into 'master'

add second example for hybrid and clarifications

See merge request !447
parents 42a25ec2 2b144050
#!/bin/bash
#SBATCH --qos=debug
#SBATCH --time=5
#SBATCH --nodes=7
#SBATCH --ntasks=28
#SBATCH --cpus-per-task=16
#SBATCH --constraint=haswell
export OMP_PROC_BIND=true
export OMP_PLACES=threads
export OMP_NUM_THREADS=8
srun --cpu-bind=cores check-hybrid.intel.cori
#!/bin/bash
#SBATCH --qos=debug
#SBATCH --time=5
#SBATCH --nodes=4
#SBATCH --ntasks=28
#SBATCH --cpus-per-task=32
#SBATCH --constraint=haswell
export OMP_PROC_BIND=true
export OMP_PLACES=threads
export OMP_NUM_THREADS=8
srun --cpu-bind=cores check-hybrid.intel.cori
# Example job scripts
For details of terminology used one this page please see
our
[jobs overview](../index.md). Correct
[affinity settings](../affinity/index.md) are essential for good
performance.
## Basic MPI batch script
One MPI process per physical core.
......@@ -21,14 +27,16 @@ One MPI process per physical core.
## Hybrid MPI+OpenMP jobs
One MPI process per socket and 1 OpenMP thread per
physical core
!!! warning
!!! warning
In Slurm each hyper thread is considered a "cpu" so the
`--cpus-per-task` option must be adjusted accordingly. Generally
best performance is obtained with 1 OpenMP thread per physical
core.
core. [Additional details about affinity settings](../affinity/index.md).
### Example 1
One MPI process per socket and 1 OpenMP thread per
physical core
??? example "Edison"
```slurm
......@@ -45,6 +53,25 @@ physical core
--8<-- "docs/jobs/examples/hybrid-mpi-openmp/cori-knl/hybrid-mpi-openmp.sh"
```
### Example 2
28 MPI processes with 8 OpenMP threads per process, each OpenMP thread
has 1 physical core
!!! note
The addition of `--cpu-bind=cores` is useful for getting correct
[affinity settings](../affinity/index.md).
??? example "Cori Haswell"
```slurm
--8<-- "docs/jobs/examples/hybrid-mpi-openmp/cori-haswell/example2.sh"
```
??? example "Cori KNL"
```slurm
--8<-- "docs/jobs/examples/hybrid-mpi-openmp/cori-knl/example2.sh"
```
## Interactive
Interactive jobs are launched with the `salloc` command.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment