forked from predsci/POT3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
validate.sh
executable file
·33 lines (24 loc) · 931 Bytes
/
validate.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
#!/bin/bash
POT3D_HOME=$PWD
TEST="validation"
cp ${POT3D_HOME}/testsuite/${TEST}/input/* ${POT3D_HOME}/testsuite/${TEST}/run/
cd ${POT3D_HOME}/testsuite/${TEST}/run
echo "Running POT3D with 1 MPI rank..."
mpiexec -np 1 ${POT3D_HOME}/bin/pot3d 1> pot3d.log 2>pot3d.err
echo "Done!"
runtime=($(tail -n 5 timing.out | head -n 1))
echo "Wall clock time: ${runtime[6]} seconds"
echo " "
#Validate run:
${POT3D_HOME}/scripts/pot3d_validation.sh pot3d.out ${POT3D_HOME}/testsuite/${TEST}/validation/pot3d.out
rm pot3d.log pot3d.out timing.out
echo " "
echo "Running POT3D with 2 MPI ranks..."
mpiexec -np 2 ${POT3D_HOME}/bin/pot3d 1> pot3d.log 2>pot3d.err
echo "Done!"
runtime=($(tail -n 5 timing.out | head -n 1))
echo "Wall clock time: ${runtime[6]} seconds"
echo " "
#Validate run:
${POT3D_HOME}/scripts/pot3d_validation.sh pot3d.out ${POT3D_HOME}/testsuite/${TEST}/validation/pot3d.out
echo " "