#!/bin/bash -f # #---------------- SHORT COMMENT ---------------------------------------- # '-f' means don't source .bashrc # Template script for parallel MPI jobs to run on mphase Grid Engine cluster. # Modify it for your case and submit to Grid Engine with # command "qsub mpi_run.sh". # ------Attention: #$ is a special SGE symbol, not a comment ----- # # The name, which will identify your job in the queue system #$ -N MPI_Job # # Parallel environment and CPU number #$ -pe mpich 2-4 # --------------------------- # Start the job in the current working directory #$ -cwd # Specify files for the standart output and error #$ -o MPI-stdo.output #$ -e MPI-stderr.output # Specify MPIR_HOME from submitting environment. #$ -v MPIR_HOME=/usr/lib/mpich # --------------------------- export MPICH_PROCESS_GROUP=no echo "Got $NSLOTS slots." # Put the name of your compiled MPI file, for example, "cpi" myjob=cpi.x # Don't modify the line below if you don't know what it is $MPIR_HOME/bin/mpirun -np $NSLOTS -machinefile $TMPDIR/machines $myjob |