cc_staff
290
edits
No edit summary |
No edit summary |
||
Line 401: | Line 401: | ||
<!--T:91--> | <!--T:91--> | ||
Submit this script with the command: | Submit this script with the command: | ||
<source lang="bash">nia-login07:~$ sbatch | <source lang="bash">nia-login07:~$ sbatch mpi_job.sh</source> | ||
<ul> | <ul> | ||
<li | <li>First line indicates that this is a bash script.</li> | ||
<li | <li>Lines starting with <code>#SBATCH</code> go to SLURM.</li> | ||
<li | <li>sbatch reads these lines as a job request (which it gives the name <code>mpi_job</code>)</li> | ||
<li | <li>In this case, SLURM looks for 2 nodes (each of which will have 40 cores) on which to run a total of 80 tasks, for 1 hour.<br>(Instead of specifying <tt>--ntasks=80</tt>, you can also ask for <tt>--ntasks-per-node=40</tt>, which amounts to the same.)</li> | ||
<li>< | <li>Note that the mpifun flag "--ppn" (processors per node) is ignored.</li> | ||
<li>Once it found such a node, it runs the script: | |||
<ul> | <ul> | ||
<li>Change to the submission directory;</li> | <li>Change to the submission directory;</li> | ||
Line 413: | Line 415: | ||
<li>Runs the <code>mpi_example</code> application (SLURM will inform mpirun or srun on how many processes to run). | <li>Runs the <code>mpi_example</code> application (SLURM will inform mpirun or srun on how many processes to run). | ||
</li> | </li> | ||
</ul> | </ul> | ||
<li>To use hyperthreading, just change --ntasks=80 to --ntasks=160, and add --bind-to none to the mpirun command (the latter | |||
== Example submission script (OpenMP) == <!--T:87--> | == Example submission script (OpenMP) == <!--T:87--> |