diff --git a/jenkins/README.md b/jenkins/README.md index 3fbfdf096..c7b4a92df 100644 --- a/jenkins/README.md +++ b/jenkins/README.md @@ -24,3 +24,8 @@ and/or opm-material=<pull request number> and/or opm-core=<pull request number> and/or dune-cornerpoint=<pull request number> and/or opm-output=<pull request number>. + +**run-spe.sh**: +This script will execute the SPE1, SPE3 and SPE9 cases, then compare against +OPM and Eclipse reference results. It is meant to be executed after either +of the two build scripts above. diff --git a/jenkins/run-spe.sh b/jenkins/run-spe.sh new file mode 100755 index 000000000..85153f60a --- /dev/null +++ b/jenkins/run-spe.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# Build flow binary +pushd . +cd serial/build-opm-autodiff +cmake --build . --target flow +popd + +# Clone opm-data if necessary +pushd . +cd deps +if ! test -d opm-data +then + git clone --depth 1 --single-branch -b master https://github.com/OPM/opm-data +fi +cd opm-data + +# Run the SPE1/3/9 cases +cd spe1 +$WORKSPACE/serial/build-opm-autodiff/bin/flow deck_filename=SPE1CASE2.DATA +test $? -eq 0 || exit 1 +cd .. +cd spe3 +$WORKSPACE/serial/build-opm-autodiff/bin/flow max_iter=50 deck_filename=SPE3CASE1.DATA +test $? -eq 0 || exit 1 +cd .. +cd spe9 +$WORKSPACE/serial/build-opm-autodiff/bin/flow max_iter=50 deck_filename=SPE9_CP.DATA +test $? -eq 0 || exit 1 +cd .. + +# Compare OPM with eclipse reference +PYTHONPATH=$WORKSPACE/serial/install/lib/python2.7/dist-packages/ python output_comparator/src/compare_eclipse.py spe1/eclipse-simulation/ spe1/ SPE1CASE2 0.01 0.01 +test $? -eq 0 || exit 1 +PYTHONPATH=$WORKSPACE/serial/install/lib/python2.7/dist-packages/ python output_comparator/src/compare_eclipse.py spe3/eclipse-simulation/ spe3/ SPE3CASE1 0.02 0.02 +test $? -eq 0 || exit 1 +PYTHONPATH=$WORKSPACE/serial/install/lib/python2.7/dist-packages/ python output_comparator/src/compare_eclipse.py spe9/eclipse-simulation/ spe9/ SPE9_CP 0.002 0.001 +test $? -eq 0 || exit 1 + +# Compare OPM with OPM reference +PYTHONPATH=$WORKSPACE/serial/install/lib/python2.7/dist-packages/ python output_comparator/src/compare_eclipse.py spe1/opm-simulation-reference/ spe1/ SPE1CASE2 0.001 0.001 +test $? -eq 0 || exit 1 +PYTHONPATH=$WORKSPACE/serial/install/lib/python2.7/dist-packages/ python output_comparator/src/compare_eclipse.py spe3/opm-simulation-reference/ spe3/ SPE3CASE1 0.001 0.001 +test $? -eq 0 || exit 1 +PYTHONPATH=$WORKSPACE/serial/install/lib/python2.7/dist-packages/ python output_comparator/src/compare_eclipse.py spe9/opm-simulation-reference/ spe9/ SPE9_CP 0.002 0.007 +test $? -eq 0 || exit 1 + +popd