forked from aws/aws-graviton-getting-started
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsbatch-openfoam-acfl.sh
49 lines (42 loc) · 1.98 KB
/
sbatch-openfoam-acfl.sh
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
42
43
44
45
46
47
48
#!/bin/bash
#SBATCH --wait-all-nodes=1
#SBATCH --ntasks-per-node=64
#SBATCH --ntasks=64
#SBATCH --cpus-per-task=1
#SBATCH --ntasks-per-core=1
#SBATCH --export=ALL
#SBATCH --partition=compute
#SBATCH --exclusive
# load OpenFOAM environment settings
export FI_EFA_FORK_SAFE=1
export WM_PROJECT_DIR=/shared/tools/openfoam-root/openfoam
source $WM_PROJECT_DIR/bin/tools/RunFunctions
source $WM_PROJECT_DIR/etc/bashrc
export PATH=/shared/openmpi-4.1.4-acfl/bin:$PATH
export LD_LIBRARY_PATH=/shared/openmpi-4.1.4-acfl/lib:$LD_LIBRARY_PATH
module use /shared/arm/modulefiles
module load acfl armpl
workdir=/shared/data-openfoam/motorBike-70M
mkdir -p $workdir && cd $workdir
cp -rp ${WM_PROJECT_DIR}/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/ .
cp -rp ${WM_PROJECT_DIR}/tutorials/incompressible/pisoFoam/LES/motorBike/lesFiles/ .
cd motorBike
mkdir constant/triSurface
cp -f \
"$FOAM_TUTORIALS"/resources/geometry/motorBike.obj.gz \
constant/triSurface/
mkdir log
# use 64 processes for the simulation and domain decomposition is 4 subdomains in x, y and z direction
sed -i 's/numberOfSubdomains 8;/numberOfSubdomains 64;/' system/decomposeParDict
sed -i 's/(4 2 1);/(4 4 4);/' system/decomposeParDict
blockMesh > ./log/blockMesh.log
decomposePar -decomposeParDict system/decomposeParDict > log/decomposePar.log
mkdir -p 0
sed -i 's/mergeTolerance 1E-6/mergeTolerance 1E-5/' system/snappyHexMeshDict
mpirun -np 64 snappyHexMesh -parallel -decomposeParDict system/decomposeParDict.ptscotch -profiling -overwrite > log/snappyHexMesh.log
find . -iname '*level*' -type f -delete
restore0Dir -processor
cp 0.orig/* 0 -rp
mpirun -np 64 renumberMesh -parallel -decomposeParDict system/decomposeParDict.ptscotch -overwrite -constant > ./log/renumberMesh.log
mpirun -np 64 potentialFoam -parallel -decomposeParDict system/decomposeParDict.ptscotch -noFunctionObjects -initialiseUBCs > ./log/potentialFoam.log
mpirun -np 64 simpleFoam -parallel -decomposeParDict system/decomposeParDict.ptscotch > ./log/simpleFoam.log