Grid Engine Job Script Example MPICH Myrinet

Grid Engine Job Script Example MPICH Myrinet

#!/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=/home/myname/codes/mycode
export MYAPP_FLAGS='1 2 3' 
 
# ---------------------------
# set the name of the job
#$ -N example_job
 
# request between 2 and 8 slots
#$ -pe mpich_mx 2-8
 
 
#################################################################
#################################################################
# 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-myrinet 
 
 
 
 
#----------------------------
# 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."
 
# Gridengine sets also $TMPDIR and writes to $TMPDIR/machines the
# corresponding list of nodes. It also generates some special scripts in
# $TMPDIR. Therefore, the next two lines are practically canonical:
#
#
export PATH=$TMPDIR:$PATH
 
 
# ---------------------------
# run the job
# ---------------------------
echo "Will run command: /cm/shared/apps/sge/mpi/myrinet/sge_mpirun $MYAPP $MYAPP_FLAGS" 
/cm/shared/apps/sge/mpi/myrinet/sge_mpirun $MYAPP $MYAPP_FLAGS

Copyright 2002-2014 ClusterVision BV