tyw7
Subscriber
#!/bin/bashn##n## Workbench submission script for PBS on CRESCENTn## -----------------------------------------------n##n## Follow the 6 steps below to configure your jobn## n## STEP 1:n##n## Enter a job name after the -N on the line below:n##n#PBS -N workbench-examplen##n## STEP 2:n##n## Select the number of cpus/cores required by modifying the #PBS -l select line belown##n## Normally you select cpus in chunks of 16 cpusn## The Maximum value for ncpus is 16 and mpiprocs MUST be the same value as ncpus.n##n## If more than 16 cpus are required then select multiple chunks of 16n## e.g.t16 CPUs: select=1:ncpus=16:mpiprocs=16n##t32 CPUs: select=2:ncpus=16:mpiprocs=16n##t48 CPUs: select=3:ncpus=16:mpiprocs=16n##t..etc..n##n#PBS -l select=1:ncpus=16:mpiprocs=16n##n## STEP 3:n##n## Select the correct queue by modifying the #PBS -q line belown##n## half_hourt- 30 minutesn## one_hourt-  1 hourn## half_dayt- 12 hoursn## three_hour  -  3 hoursn## six_hour   -  6 hoursn## one_dayt- 24 hoursn## two_dayt- 48 hoursn## five_dayt- 120 hoursn## ten_dayt- 240 hours (by special arrangement)n##n#PBS -q half_hourn##n## STEP 4:n##n## Replace the hpc@cranfield.ac.uk email addressn## with your Cranfield email address on the #PBS -M line below:n## Your email address is NOT your usernamen##n#PBS -m abe n#PBS -M hpc@cranfield.ac.ukn##n## ====================================n## DO NOT CHANGE THE LINES BETWEEN HEREn## ====================================n#PBS -l application=ansysn#PBS -j oen#PBS -W sandbox=PRIVATEn#PBS -kln -s $PWD $PBS_O_WORKDIR/$PBS_JOBIDn## Change to working directoryncd $PBS_O_WORKDIRn## Calculate number of CPUsnexport cpus= cat $PBS_NODEFILE | wc -l n# Get node list from PBS and format for ANSYSnANSYS_NODES= uniq -c ${PBS_NODEFILE} | awk -F. '{ print $1 }' | awk '{print $2 : $1}' | paste -s -d ":" n## load module required by ANSYSnmodule load libXt libxcbn## Set dummy Displaynexport DISPLAY=hpcxserv-1.central.cranfield.ac.uk:0.0n## ========n## AND HEREn## ========n##n## STEP 5: n## n## Load the default application environmentn## For a specific version add the version number, e.g.n## module load ANSYS/17.1n##nmodule load ANSYSn##n## STEP 6: n## n## Put correct parameters in workbench execution linen## below (i.e. replace wbsimulation.wbjn with your journal filename):n## see wbsimulation.wbjn in /apps/example/pbs for format of workbench journal filen##nnrunwb2 -b -r wbsimulation.wbjnnn## Tidy up the log directoryn## DO NOT CHANGE THE LINE BELOWn## ============================nrm $PBS_O_WORKDIR/$PBS_JOBIDn#nn