|
Wait! If you're breaking your job up into 100 pieces and running each one as a totally separate job (aka "embarrassingly parallel") you don't need the information on this page. Just run 100 sbatch commands. If you would like advice on writing a script to do those 100 sbatch, or information on job arrays - one sbatch command that submits 100 separate jobs - contact Research Computing.
...
Many standard applications now have flags to run multithreaded. Threaded applications can use multiple cores on a node, but each multithreaded process/job requires access to the same physical memory on the node and it is therefore limited to run on a single node (i.e. shared memory). The most common type of multithread application uses the OpenMP application programming interface http://www.openmp.org
To submit a job that uses multiple cores, you must specify the number of job cores you want to use with the sbatch flag -c Ncores. The maximum number of cores that can be requested with this approach is 20
...
Code Block |
---|
module load gcc/6.2.0 ### OR ### module load openmpigcc/9.2.0.1 module load openmpi/<desired_version> or module load openmpi/3.1.0 ### to load the latest version. |
Similarly to the previous case to submit a multitask job you must specify the number of required tasks (i.e. cores) you want by using the flags sbatch -n Ntasks -p mpi ... . The maximum number of cores that can be requested with this approach is 640.
...
would submit a job requesting 40 tasks (CPU cores) with a minimum of 4 CPUs per node.
Note: It is now recommended to add the command ulimit -l unlimited before the actual MPI command in order to fully enable IB connectivity.
Combining Distributed and Shared Memory Parallelization
...
Code Block |
---|
$ sbatch -n 10 -c 4 -p mpi -t 3-00:00:00 --wrap="ulimit -l unlimited; mpirun -np 10 your_mpi+openmpi_application" |
Note |
---|
Note: Users with more than one Lab association (multiple Slurm account associations) will need to either replace |