7.9) MPI Job Batch Submission Example: Node Syntax
A simple MPI job submission script, mpi_example.sh, can take the form:
[bash]
#!/bin/bash
# Use current working directory and environment
#$ -cwd –V
# request 128 cores
#$ -l np=128
# Request 4 hours of runtime
#$ -l h_rt=4:00:00
mpirun ./mpi_prog
[/bash]
This can then be submitted via:
[bash]
$ qsub mpi_example.sh
[/bash]
Using the node syntax, -l np=128, will allocate exclusive use of nodes, with all available memory. In this case the job will be allocated 8 nodes, each with 16 cores and 32GB of memory, or 2GB/core. On ARC2 this is the preferred syntax for requesting resources for large MPI jobs. Please note that this is not standard SGE syntax, but is rather a locally developed and implemented patch to SGE.