Skip to content
Snippets Groups Projects
Commit 81239830 authored by Alex Wiens's avatar Alex Wiens
Browse files

03-hpc-tuning: Hands-on B: Add example jobscript

parent 803e3fc0
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,37 @@ Use the OpenMP environment variables and/or `numactl` to configure the pinning o
* What is the inter-socket memory-bandwidth in GB/s?
Here is an example jobscript for the fourth case with pinning 8 threads to the first socket and data placement on the second socket.
Note that `numactl` expects "NUMA nodes" of which there are 4 per socket on the compute nodes.
```bash
#!/usr/bin/env bash
#SBATCH --job-name=stream
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=00:30:00
#SBATCH --account=hpc-lco-usrtr
#SBATCH --exclusive
module reset
module load toolchain/intel/2022a
export OMP_DISPLAY_AFFINITY=true
# set OPENMP to
# - use 8 worker threads
# - spread threads over allowed cores
# - pin threads to single cores
export OMP_NUM_THREADS=8
export OMP_PROC_BIND=spread
export OMP_PLACES=cores
# mask threads to use NUMA domains on first socket (0,1,2,3) and
# mask memory allocation to use NUMA domains on second socket (4,5,6,7)
numactl --cpunodebind=0,1,2,3 --membind=4,5,6,7 ./stream_c.exe
```
---
Find the solution to these exercises [in the solution branch](/../solution/03-hpc-tuning).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment