- How to allocate resources?
Suppose you need 16 cores. Here are some use cases:
- you use mpi and do not care about where those cores are distributed: --ntasks=16
- you want to launch 16 independent processes (no communication): --ntasks=16
- you want those cores to spread across distinct nodes: --ntasks=16 and --ntasks-per-node=1 or --ntasks=16 and --nodes=16
- you want those cores to spread across distinct nodes and no interference from other jobs:--ntasks=16 --nodes=16 --exclusive
- you want 16 processes to spread across 8 nodes to have two processes per node: --ntasks=16 --ntasks-per-node=2
- you want 16 processes to stay on the same node: --ntasks=16 --ntasks-per-node=16
- you want one process that can use 16 cores for multithreadingi: --ntasks=1 --cpus-per-task=16