You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -378,7 +378,10 @@ However, this workflow is more involved and intended for advanced Spack users.
378
378
379
379
1. The `--uenv` option is used to specify the uenv to use for the job.
380
380
The `--view=default` option is used to load all the packages provided by the uenv.
381
-
2. Only set `OMP_NUM_THREADS` if you are using OpenMP in your code.
381
+
2. Set `OMP_NUM_THREADS` if you are using OpenMP in your code.
382
+
The number of threads should be not greater than the number of cores per task (`$SLURM_CPUS_PER_TASK`).
383
+
The optimal number depends on the workload and should be determined by testing.
384
+
Consider for example that typical workloads using PyTorch may fork the processes, so the number of threads should be around the number of cores per task divided by the number of processes.
382
385
3. These variables are used by PyTorch to initialize the distributed backend.
383
386
The `MASTER_ADDR` and `MASTER_PORT` variables are used to determine the address and port of the master node.
384
387
Additionally we also need `RANK` and `LOCAL_RANK` but these must be set per-process, see below.
0 commit comments