Product specifications

Table Of Contents
C–Integration with a Batch Queuing System
Using SLURM for Batch Queuing
C-2 IB6054601-00 H
S
For more usage information, see the OSC mpiexec documentation.
For more information on PBS, go to: http://www.pbsgridworks.com/
Using SLURM for Batch Queuing
The following is an example of the some of the functions that a batch queuing
script might perform. The example is in the context of the Simple Linux Utility
Resource Manager (SLURM) developed at Lawrence Livermore National
Laboratory. These functions assume the use of the bash shell. The following
script is called batch_mpirun:
#! /bin/sh
# Very simple example batch script for QLogic MPI, using slurm
# (http://www.llnl.gov/linux/slurm/)
# Invoked as:
#batch_mpirun #cpus mpi_program_name mpi_program_args ...
#
np=$1 mpi_prog="$2" # assume arguments to script are correct
shift 2 # program args are now $@
eval ‘srun --allocate --ntasks=$np --no-shell‘
mpihosts_file=‘mktemp -p /tmp mpihosts_file.XXXXXX‘
srun --jobid=${SLURM_JOBID} hostname -s | sort | uniq -c \
| awk ’{printf "%s:%s\n", $2, $1}’ > $mpihosts_file
mpirun -np $np -m $mpihosts_file "$mpi_prog" $@
exit_code=$?
scancel ${SLURM_JOBID}
rm -f $mpihosts_file
exit $exit_code
In the following sections, the setup and the various script functions are discussed
in more detail.
NOTE:
This level of support is specific to QLogic MPI, and not to other MPIs that
currently support InfiniPath.