#!/bin/sh
# 
# EXAMPLE MPICH SCRIPT FOR SGE
# Modified by Basement Supercomputing  8/3/2006 DJE
# To use, change "MPICH_JOB", "NUMBER_OF_CPUS" 
# and "MPICH_PROGRAM_NAME" to real values. 
#
# Your job name 
#$ -N MPICH_JOB
#
# Use current working directory
#$ -cwd
#
# Join stdout and stderr
#$ -j y
#
# pe request for MPICH. Set your number of processors here. 
# Make sure you use the "mpich" parallel environemnt.
#$ -pe mpichgm NUMBER_OF_CPUS 
#
# Run job through bash shell
#$ -S /bin/bash
#
# The following is for reporting only. It is not really needed
# to run the job. It will show up in your output file.
echo "Got $NSLOTS processors."
echo "Machines:"
cat $TMPDIR/machines
#
#turn of process group for better control
export MPICH_PROCESS_GROUP=no
# Use full pathname to make sure we are using the right mpirun
/opt/mpi/myrinet/mpichgm-gnu3/bin/mpirun.ch_gm -np $NSLOTS -machinefile $TMPDIR/machines MPICH_PROGRAM_NAME


