Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following is a simple submission script of a parallel psana batch job run with mpi.  It can be submitted with the command "sbatch submit.sh". The commands specified in the script file will be ran on the first available compute node that fits the resources requested.  There are two ideas: "nodes" and "tasks per node".  A "node" is a physical computer but they typical have multiple-cpu-cores per node (see this page for specific numbers:  Batch System Analysis Jobs).  Typically the tasks-per-node parameter is set to utilize all the cores on each node.

Code Block
> cat submit.sh
#!/bin/bash

#SBATCH --partition=anagpu
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=3
#SBATCH --output=%j.log

# "-u" flushes print statements which can otherwise be hidden if mpi hangs
# "-m mpi4py.run" allows mpi to exit if one rank has an exception
mpirun python -u -m mpi4py.run /reg/g/psdm/tutorials/examplePython/mpiDataSource.py

...