#!/bin/bash ## Lines starting with the # symbol are comments, unless followed by ! or PBS, ## in which case they are directives ## The following PBS directive requests two 24 core compute nodes ## The $PBS_NODEFILE file will contain the hostnames for 16 MPI processes (2 X 8, as per mpiprocs) ## This is only meaningful if your model contains 16 grids ## The number of grids must match the number of MPI processes #PBS -l select=2:ncpus=24:mpiprocs=8 -q normal ## Specify your own project shortcode here #PBS -P MECH1234 ## The walltime should be a small overestimate of the expected run time ## Requesting a very long walltime may delay the start of your job ## If the requested walltime is too short, the job will be killed before it is finished #PBS -l walltime=6:00:00 ## Obviously use your own paths here #PBS -e /mnt/lustre/users/jblogs/FDS_Runs/stderr.txt #PBS -o /mnt/lustre/users/jblogs/FDS_Runs/stdout.txt export PBS_JOBDIR=/mnt/lustre/users/jblogs/FDS_Runs cd $PBS_JOBDIR module load chpc/compmech/FDS/6.7.0 ## Assign a sensible value for OMP_NUM_THREADS ## If your number of MPI processes is a multiple of ## 24, it will be best to set it to 1, ## and not use OpenMP at all ## A value greater than 3 does not help export OMP_NUM_THREADS=3 ## The number of MPI processes is extracted from the length of the machinefile $PBS_NODEFILE nproc=`cat $PBS_NODEFILE | wc -l` mpirun -np $nproc fds FDS_inputFile.fds > fds.out