Grid Engine Job Script Example MPICH Ethernet

Grid Engine Job Script Example MPICH Ethernet

#!/bin/bash
#
# Script to submit an mpi job
 
# ----------------------------
# Replace these with the name of the executable 
# and the parameters it needs
#$ -S /bin/bash
 
export MYAPP=./test_mpich
export MYAPP_FLAGS='' 
 
# ---------------------------
# set the name of the job
#$ -N TEST_MPICH 
 
# request between 2 and 8 slots
#$ -pe mpich 2
 
 
#################################################################
#################################################################
# there shouldn't be a need to change anything below this line
 
export MPICH_PROCESS_GROUP=no
 
 
# ---------------------------
# set up the mpich version to use
# ---------------------------
# load the module
. /etc/profile.d/modules.sh
module add default-ethernet
 
 
#----------------------------
# set up the parameters for qsub
# ---------------------------
 
#  Mail to user at beginning/end/abort/on suspension
#$ -m beas
#  By default, mail is sent to the submitting user 
#  Use  $ -M username    to direct mail to another userid 
 
# Execute the job from the current working directory
# Job output will appear in this directory
#$ -cwd
#   can use -o dirname to redirect stdout 
#   can use -e dirname to redirect stderr
 
#  Export these environment variables
#$ -v MPI_HOME
 
 
# Gridengine allocates the max number of free slots and sets the
# variable $NSLOTS.
echo "Got $NSLOTS slots."
 
# ---------------------------
# run the job
# ---------------------------
echo "Will run command: $MPI_HOME/bin/mpirun -np $NSLOTS -machinefile $TMPDIR/machines  $MYAPP $MYAPP_FLAGS" 
 
$MPI_HOME/bin/mpirun -np $NSLOTS -machinefile $TMPDIR/machines  $MYAPP $MYAPP_FLAGS

Copyright 2002-2014 ClusterVision BV