#!/bin/ksh # $Id: mpirun.lsf.ibmpjl.batch,v 1.3 2008/07/23 04:51:56 theurich Exp $ ################################################################################ # This script abides to the ESMF script rules for executing the bundled test # and example applications. # # 1) -np N prog # runs N copies of executable "prog" in parallel. The script must hide all # of the system specific details, such as going through a queueing system # and/or calling a system specific mpirun script with modified arguments. # # 2) The output of the script must be written to a file named "prog".stdout and # it must contain the combination of stdout and stderr output of the # execution. # # 3) The script must block, i.e. _not_ return, until the output described in #2 # has become accessible. # # To access this script set environment variable ESMF_MPIRUN= in # your shell before executing any of the ESMF run targets or targets that # call run targets indirectly, such as the all_tests. ################################################################################ # # This script submits a job through LSF and then interfaces with # IBM's mpirun.lsf which is IBM's unified PJL (parallel job launcher) # out of an LSF session for lammpi, mpich_gm, poe, and mpichp4 # AIX and IBM/Linux clusters. # This script runs jobs on the batch queue not the interactive queue. if [ "$1" != "-np" ] then echo "Usage: mpirun -np # prog" exit 1 fi num_procs=$2 shift 2 prog=$* echo executing: bsub $ESMF_MPIBATCHOPTIONS -n $num_procs -oo outfile \"mpirun.lsf ${prog}\" bsub $ESMF_MPIBATCHOPTIONS -n $num_procs -oo outfile "mpirun.lsf ${prog}" # Wait for the outfile to be available. sleep 30 mv -f outfile ${prog}.stdout