Advanced MPI scheduling: Difference between revisions

Jump to navigation Jump to search
improve formatting
No edit summary
(improve formatting)
Line 24: Line 24:


  <!--T:5-->
  <!--T:5-->
--ntasks=15
{{File
--mem-per-cpu=3G
  |name=basic_mpi_job.sh
srun application.exe
  |lang="sh"
  |contents=
#!/bin/bash
#SBATCH --ntasks=15
#SBATCH --mem-per-cpu=3G
srun application.exe
}}
This will run 15 MPI processes. The cores could be allocated on one node, on 15 nodes, or on any number in between.
This will run 15 MPI processes. The cores could be allocated on one node, on 15 nodes, or on any number in between.


Line 118: Line 124:
==== Few cores, single node ==== <!--T:6-->
==== Few cores, single node ==== <!--T:6-->
If you need less than a full node but need all the cores to be on the same node, then you can request, for example,
If you need less than a full node but need all the cores to be on the same node, then you can request, for example,
--nodes=1
{{File
--ntasks-per-node=15
  |name=less_than_whole_node.sh
--mem=45G
  |lang="sh"
srun application.exe
  |contents=
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=15
#SBATCH --mem=45G
srun application.exe
}}
In this case you could also say <code>--mem-per-cpu=3G</code>. The advantage of <code>--mem=45G</code> is that the memory consumed by each individual process doesn't matter, as long as all of them together don’t use more than 45GB. With <code>--mem-per-cpu=3G</code>, the job will be canceled if any of the processes exceeds 3GB.
In this case you could also say <code>--mem-per-cpu=3G</code>. The advantage of <code>--mem=45G</code> is that the memory consumed by each individual process doesn't matter, as long as all of them together don’t use more than 45GB. With <code>--mem-per-cpu=3G</code>, the job will be canceled if any of the processes exceeds 3GB.


Bureaucrats, cc_docs_admin, cc_staff
2,879

edits

Navigation menu