Commit fd3a5de9 authored by Ron Rahaman's avatar Ron Rahaman

Added MPI CI tests

parent 1f283676
Pipeline #2771 failed with stages
in 102 minutes and 27 seconds
stages:
- build_libmesh_stage
- configure_giraffe_stage
- build_giraffe_stage
- run_giraffe_stage
- verify_giraffe_stage
- build_libmesh
- configure_giraffe
- build_giraffe
- run_giraffe_serial
- verify_giraffe_serial
- run_giraffe_parallel
- verify_giraffe_parallel
before_script:
- . /opt/moose/environments/moose_profile
build_libmesh:
stage: build_libmesh_stage
build_libmesh_job:
stage: build_libmesh
script:
- pwd
- git clone -b master https://github.com/idaholab/moose.git
- cd moose
- scripts/update_and_rebuild_libmesh.sh
configure_giraffe:
stage: configure_giraffe_stage
configure_giraffe_job:
stage: configure_giraffe
dependencies:
- build_libmesh
- build_libmesh_job
variables:
GIT_STRATEGY: none
MOOSE_DIR: "$CI_PROJECT_DIR/moose"
......@@ -29,10 +31,10 @@ configure_giraffe:
- cd examples/integration_example/
- ../../configure
build_giraffe:
stage: build_giraffe_stage
build_giraffe_job:
stage: build_giraffe
dependencies:
- configure_giraffe
- configure_giraffe_job
variables:
GIT_STRATEGY: none
MOOSE_DIR: "$CI_PROJECT_DIR/moose"
......@@ -41,10 +43,10 @@ build_giraffe:
- cd examples/integration_example/
- make -j8
run_giraffe:
stage: run_giraffe_stage
run_giraffe_serial_job:
stage: run_giraffe_serial
dependencies:
- build_giraffe
- build_giraffe_job
variables:
GIT_STRATEGY: none
MOOSE_DIR: "$CI_PROJECT_DIR/moose"
......@@ -52,19 +54,52 @@ run_giraffe:
script:
- set -o pipefail
- cd examples/integration_example
- ../../giraffe-opt -i coefficient_integration.i | tee integration_example.stdout
- ../../giraffe-opt -i coefficient_integration.i | tee integration_example_serial.stdout
- exit $?
verify_giraffe:
stage: verify_giraffe_stage
verify_giraffe_serial_job:
stage: verify_giraffe_serial
dependencies:
- run_giraffe
- run_giraffe_serial_job
variables:
GIT_STRATEGY: none
script:
- cd examples/integration_example
- v1=$(grep "Heat balance" integration_example.stdout | tail -1 | tr -s ' ' | cut -d ' ' -f 5)
- v2=$(grep "Heat balance" integration_example.stdout | tail -1 | tr -s ' ' | cut -d ' ' -f 6)
- grep -n "Heat balance" integration_example_serial.stdout
- v1=$(grep "Heat balance" integration_example_serial.stdout | tail -1 | tr -s ' ' | cut -d ' ' -f 5)
- v2=$(grep "Heat balance" integration_example_serial.stdout | tail -1 | tr -s ' ' | cut -d ' ' -f 6)
# We want to test this statement:
# (0.78529 < $v1 < 0.78549) && (0.78203 < $v2 < 0.78203)
# However, bc will return 1 if true, and we want the script to return 0 if successful
# Hence, we test the inverse of that statement. The inverse statement will
# return 0 if the *desired* condition is true.
- echo "$v1 < 0.78529825617157133 || $v1 > 0.78549825617157133 || $v2 < 0.78203376069904283 || $v2 > 0.78223376069904283" | bc
run_giraffe_parallel_job:
stage: run_giraffe_parallel
dependencies:
- build_giraffe_job
variables:
GIT_STRATEGY: none
MOOSE_DIR: "$CI_PROJECT_DIR/moose"
LIBMESH_DIR: "$CI_PROJECT_DIR/moose/libmesh/installed"
script:
- set -o pipefail
- cd examples/integration_example
- mpirun -np 4 ../../giraffe-opt -i coefficient_integration.i | tee integration_example_parallel.stdout
- exit $?
verify_giraffe_parallel_job:
stage: verify_giraffe_parallel
dependencies:
- run_giraffe_parallel_job
variables:
GIT_STRATEGY: none
script:
- cd examples/integration_example
- grep -n "Heat balance" integration_example_parallel.stdout
- v1=$(grep "Heat balance" integration_example_parallel.stdout | tail -1 | tr -s ' ' | cut -d ' ' -f 5)
- v2=$(grep "Heat balance" integration_example_parallel.stdout | tail -1 | tr -s ' ' | cut -d ' ' -f 6)
# We want to test this statement:
# (0.78529 < $v1 < 0.78549) && (0.78203 < $v2 < 0.78203)
# However, bc will return 1 if true, and we want the script to return 0 if successful
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment