Child pages
  • Hyak intel-impi.sh
Skip to end of metadata
Go to start of metadata

Important Instructions

You will need to change parameters for your job.

Job Script

 #!/bin/bash
 ##  _NEVER_ remove # signs from in front of PBS or from the line above 
 ##
 ## RENAME FOR YOUR JOB
 #PBS -N gcc-impi
 ## EDIT FOR YOUR JOB
 ## Request 16 CPUs (cores) on 2 nodes, 32 total cores
 #PBS -l nodes=2:ppn=16,mem=22gb,feature=16core
 ## WALLTIME DEFAULTS TO ONE HOUR - ALWAYS SPECIFY FOR LONGER JOBS
 ## If the job doesn't finish in 10 minutes, cancel it
 #PBS -l walltime=00:10:00
 ## EDIT FOR YOUR JOB
 ## Put the output from jobs into the below directory
 #PBS -o /gscratch/GROUPNAME/USERNAME/JOB_DIR
 ## Put both the stderr and stdout into a single file
 #PBS -j oe
 ## EDIT FOR YOUR JOB
 ## Specify the working directory for this job
 #PBS -d /gscratch/GROUPNAME/USERNAME/JOB_DIR
 ## 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 appropriate environment module which you used to compile the code.
 module load <latest module># gcc_<version>-impi_<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  ./test
 echo "ENVIRONMENT VARIABLES"
 set
 echo "**********************************************"
 ### End Debugging information
  ### Specify the app to run here                           ###
 ###                                                       ###
 # EDIT FOR YOUR JOB
 #
 mpiexec.hydra -bootstrap rsh -rmk pbs ./test
 ### You can use mpirun as well, but it's not preferred.
 #mpirun -n $HYAK_NPE -r rsh ./test
 ### include any post processing here                      ###
 ###                                                       ###