After reading the very informative post, HPC cluster: select the number of CPUs and threads in SLURM sbatch, I understand the difference b/w the --ntasks, --cpus-per-task and --ntasks-per-node flags for sbatch.
My multi-threaded 'shared-memory' application is main command for my job execution. Sample script below,
#!/bin/bash
#SBATCH -J test_job
#SBATCH -t 01:00:00
#SBATCH -A project
#SBATCH -D /opt/
#SBATCH --ntasks=16
#SBATCH --nodes=1
cd model/
./a.out -parasol 16 -f input.dat
My question is
- Whats the difference b/w the following combinations w.r.t.
sbatch?
--ntasks 1 --cpus-per-task 16
--ntasks 16 --nodes 1
- Which of the above is the best/correct way to allocate resources for a multi-threaded (shared-memory) application ?