Child pages
  • Hyak gnu-mpich.sh
Skip to end of metadata
Go to start of metadata

THIS MPI LIBRARY IS NO LONGER SUPPORTED.

Important Instructions

You will need to change parameters which are bold and red for your job. Depending on your application, you may need to change parameters which are bold and blue. In most cases, you should not change any text that is not colored.

Job Script

 #\!/bin/bash
 ##
 ## \!\! _NEVER_ remove # signs from in front of PBS or from the line above \!\!
 ##
 ## RENAME FOR YOUR JOB
 #PBS -N {color:red}*gnu-mpich*{color}
 ## EDIT FOR YOUR JOB
 ## Request 16 CPUs (cores) on 2 nodes, 32 total cores
 #PBS -l nodes={color:red}*2*{color}:ppn={color:red}*16*{color},mem={color:red}*22gb*{color},feature={color:red}*16*{color}core
 ## WALLTIME DEFAULTS TO ONE HOUR - ALWAYS SPECIFY FOR LONGER JOBS
 ## If the job doesn't finish in 10 minutes, cancel it
 #PBS -l walltime={color:red}*00:10:00*{color}
 ## EDIT FOR YOUR JOB
 ## Put the output from jobs into the below directory
 #PBS -o {color:red}*/gscratch/GROUPNAME/USERNAME/JOB_DIR*{color}
 ## Put both the stderr and stdout into a single file
 #PBS -j oe
 ## EDIT FOR YOUR JOB
 ## Sepcify the working directory for this job
 #PBS -d {color:red}*/gscratch/GROUPNAME/USERNAME/JOB_DIR*{color}
 ## Some applications, particularly FORTRAN applications require
 ##  a larger than usual data stack size. Uncomment if your
 ##  application is exiting unexpectedly.
 #ulimit -s unlimited
   
 ## Disable regcache
 export MX_RCACHE=0
   
 ## Load the proper environment variables 
 module load *{color:red}<latest module>{color}* # gcc_<version>-mpich2_mx_<version>
 ### Debugging information
 ### Include your job logs which contain output from the below commands
 ###  in any job-related help requests.
 # Total Number of processors (cores) to be used by the job
 HYAK_NPE=$(wc -l < $PBS_NODEFILE)
 # Number of nodes used
 HYAK_NNODES=$(uniq $PBS_NODEFILE | wc -l )
 echo "**** Job Debugging Information ****"
 echo "This job will run on $HYAK_NPE total CPUs on $HYAK_NNODES different nodes"
 echo ""
 echo "Node:CPUs Used"
 uniq -c $PBS_NODEFILE | awk '\{print $2 ":" $1\}'
 echo "SHARED LIBRARY CHECK"
 ldd {color:red}*./test*{color}
 echo "ENVIRONMENT VARIABLES"
 set
 echo "**********************************************"
 ### End Debugging information
  
 ### Specify the app to run here                           ###
 ###                                                       ###
 # EDIT FOR YOUR JOB
 # ALWAYS use mpiexec.hydra NOT mpiexec
 # ALWAYS include the "-rmk pbs" directive
 # run YOURJOB, it's in the working directory specified above, /gscratch/GROUPNAME/USERNAME/JOB_DIR
 mpiexec.hydra -bootstrap rsh -rmk pbs {color:red}*./test*{color}
 ### include any post processing here                      ###
 ###                                                       ###