diff --git a/jenkins/README.md b/jenkins/README.md index cdc15cf2a..578bc22c5 100644 --- a/jenkins/README.md +++ b/jenkins/README.md @@ -34,3 +34,8 @@ of the two build scripts above. This script will execute the Norne case, and generate a document with plots of the results. It is meant to be executed after either of the two build scripts above. + +**run-polymer.sh**: +This script will execute the simple2D polymer case, then compare against +Eclipse reference results. It is meant to be executed after either +of the two build scripts above. diff --git a/jenkins/run-polymer.sh b/jenkins/run-polymer.sh new file mode 100755 index 000000000..bf9b76057 --- /dev/null +++ b/jenkins/run-polymer.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Build flow_polymer binary +pushd . +cd serial/build-opm-autodiff +cmake --build . --target flow_polymer +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 simple2D polymer case +cd polymer_test_suite/simple2D +$WORKSPACE/serial/build-opm-autodiff/bin/flow_polymer run.param +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 polymer_test_suite/simple2D/eclipse-simulation/ polymer_test_suite/simple2D/opm-simulation/ 2D_THREEPHASE_POLY_HETER 0.0006 0.004 +test $? -eq 0 || exit 1 + +popd