-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathopenfoam.pbs
42 lines (30 loc) · 902 Bytes
/
openfoam.pbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
## Center for Advanced Research Computing
## at The University of New Mexico
##
## This is an example script
## used to submit OpenFOAM
## jobs on CARC machines.
##
# #PBS -lnodes=2:ppn=4
#PBS -lwalltime=04:00:00
#PBS -S /bin/bash
# Specify a name for this job
#PBS -N myOFjob
#PBS -j oe
# Switch to working directory
cd "$PBS_O_WORKDIR"
# Get number of processors and nodes
NPROCS=$(cat $PBS_NODEFILE | wc -l)
# Load the environment modules system
#source /etc/profile.d/modules.sh
#Load OpenFOAM module
#module load openfoam/2.3.0
#module load openfoam/3.0/openmpi/1.10.2/intel/16.0.0
# Source OpenFOAM run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication decomposePar
runParallel $(getApplication) ${NPROCS}
runApplication reconstructPar -latestTime
# ----------------------------------------------------------------- end-of-file