Download High Performance Beowulf Cluster Environment User Manual
Transcript
# Tell PBS to reserve a maximum of 12 hours and 15 minutes #PBS -l walltime=12:15:00 ############################################################## ############### Config script for using MPICH-GM ############# ############################################################## # Set the following entries: # Run dir: set RUNDIR = "/home/mpi" # Application name: set APPLICATION = "PMB-MPI1" # Extra flags for Application set RUNFLAGS = "" # Extra flags for mpich: set EXTRAMPI = "" ############################################################## # Below this nothing should have to be changed # ############################################################## echo Running from MPI $MPI_HOME echo echo Changing to $RUNDIR cd $RUNDIR set nodes = `cat $PBS_NODEFILE` echo $nodes > /tmp/$PBS_JOBID.conf set nnodes = $#nodes set confile = /tmp/$PBS_JOBID.conf cat $confile echo "Will run command: mpirun.ch_gm -np $nnodes -machinefile $confile $EXTRAMPI $APPLICATION $RUNFLAGS" echo Starting job... time mpirun.ch_gm -np $nnodes -machinefile $confile $EXTRAMPI $APPLICATION $RUNFLAGS rm -rf $confile As can be seen in the script, a configuration file for Myrinet is built using the $PBS_NODEFILE variable. This variable is supplied by the queuing system and contains the node names that are reserved by the queuing system for running the job. The configuration file is given a unique name (/tmp/$PBS_JOBID.conf) in order to make sure that users can run multiple programs concurrently. Submitting the job to the queuing system The command qsub is used to submit jobs. The command will return a unique job identifier, which is used to query and control the job and to identify output. See the respective man- page for more options. qsub scriptname -a datetime -l list submits a script for execution run the job at a certain time request certain resource(s)