#!/bin/bash # # Script to submit an mpi job # ---------------------------- # Replace these with the name of the executable # and the parameters it needs export MYAPP=/home/fherwig/PPN/mppnp/CODE/mppnp.exe #export MYAPP_FLAGS='sbm07.input' # if you don't use the pgi module (SEE BELOW) you need to specify here where # your mpi is #export MPI_HOME=/usr/local/Cluster-Apps/mpich/ge/pgi/64/1.2.7 export MPI_HOME=/home/fherwig/openmpi . ~/.intelmpi #export RUNDIR=/data/fherwig/LAHYDRO/sbm07/RUNS # --------------------------- # set the name of the job #$ -N mppnp # request between 2 and 8 slots #$ -pe mpi 32-32 #$ -q high.q # The job is located in the current # working directory. #$ -cwd ################################################################# ################################################################# # 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 mpich/ge/gcc/64/1.2.7 #module add mpich/ge/pgi/64/1.2.7 #module add pgi/7.1-2 #module add pgi # you need to uncomment the previous line to load the # pgi compiler #---------------------------- # 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