27.12.2014 Views

QLogic OFED+ Host Software User Guide, Rev. B

QLogic OFED+ Host Software User Guide, Rev. B

QLogic OFED+ Host Software User Guide, Rev. B

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

E–Integration with a Batch Queuing System<br />

Using SLURM for Batch Queuing<br />

NOTE:<br />

This level of support is specific to <strong>QLogic</strong> MPI, and not to other MPIs that<br />

currently support InfiniPath.<br />

For more usage information, see the OSC mpiexec documentation.<br />

For more information on PBS, go to: http://www.pbsgridworks.com/<br />

Using SLURM for Batch Queuing<br />

The following is an example of the some of the functions that a batch queuing<br />

script might perform. The example is in the context of the Simple Linux Utility<br />

Resource Manager (SLURM) developed at Lawrence Livermore National<br />

Laboratory. These functions assume the use of the bash shell. The following<br />

script is called batch_mpirun:<br />

#! /bin/sh<br />

# Very simple example batch script for <strong>QLogic</strong> MPI, using slurm<br />

# (http://www.llnl.gov/linux/slurm/)<br />

# Invoked as:<br />

#batch_mpirun #cpus mpi_program_name mpi_program_args ...<br />

#<br />

np=$1 mpi_prog="$2" # assume arguments to script are correct<br />

shift 2 # program args are now $@<br />

eval ‘srun --allocate --ntasks=$np --no-shell‘<br />

mpihosts_file=‘mktemp -p /tmp mpihosts_file.XXXXXX‘<br />

srun --jobid=${SLURM_JOBID} hostname -s | sort | uniq -c \<br />

| awk ’{printf "%s:%s\n", $2, $1}’ > $mpihosts_file<br />

mpirun -np $np -m $mpihosts_file "$mpi_prog" $@<br />

exit_code=$<br />

scancel ${SLURM_JOBID}<br />

rm -f $mpihosts_file<br />

exit $exit_code<br />

In the following sections, the setup and the various script functions are discussed<br />

in more detail.<br />

E-2 D000046-005 B

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!