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: stages:
- build_libmesh_stage - build_libmesh
- configure_giraffe_stage - configure_giraffe
- build_giraffe_stage - build_giraffe
- run_giraffe_stage - run_giraffe_serial
- verify_giraffe_stage - verify_giraffe_serial
- run_giraffe_parallel
- verify_giraffe_parallel
before_script: before_script:
- . /opt/moose/environments/moose_profile - . /opt/moose/environments/moose_profile
build_libmesh: build_libmesh_job:
stage: build_libmesh_stage stage: build_libmesh
script: script:
- pwd - pwd
- git clone -b master https://github.com/idaholab/moose.git - git clone -b master https://github.com/idaholab/moose.git
- cd moose - cd moose
- scripts/update_and_rebuild_libmesh.sh - scripts/update_and_rebuild_libmesh.sh
configure_giraffe: configure_giraffe_job:
stage: configure_giraffe_stage stage: configure_giraffe
dependencies: dependencies:
- build_libmesh - build_libmesh_job
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
MOOSE_DIR: "$CI_PROJECT_DIR/moose" MOOSE_DIR: "$CI_PROJECT_DIR/moose"
...@@ -29,10 +31,10 @@ configure_giraffe: ...@@ -29,10 +31,10 @@ configure_giraffe:
- cd examples/integration_example/ - cd examples/integration_example/
- ../../configure - ../../configure
build_giraffe: build_giraffe_job:
stage: build_giraffe_stage stage: build_giraffe
dependencies: dependencies:
- configure_giraffe - configure_giraffe_job
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
MOOSE_DIR: "$CI_PROJECT_DIR/moose" MOOSE_DIR: "$CI_PROJECT_DIR/moose"
...@@ -41,10 +43,10 @@ build_giraffe: ...@@ -41,10 +43,10 @@ build_giraffe:
- cd examples/integration_example/ - cd examples/integration_example/
- make -j8 - make -j8
run_giraffe: run_giraffe_serial_job:
stage: run_giraffe_stage stage: run_giraffe_serial
dependencies: dependencies:
- build_giraffe - build_giraffe_job
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
MOOSE_DIR: "$CI_PROJECT_DIR/moose" MOOSE_DIR: "$CI_PROJECT_DIR/moose"
...@@ -52,19 +54,52 @@ run_giraffe: ...@@ -52,19 +54,52 @@ run_giraffe:
script: script:
- set -o pipefail - set -o pipefail
- cd examples/integration_example - 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 $? - exit $?
verify_giraffe: verify_giraffe_serial_job:
stage: verify_giraffe_stage stage: verify_giraffe_serial
dependencies: dependencies:
- run_giraffe - run_giraffe_serial_job
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
script: script:
- cd examples/integration_example - cd examples/integration_example
- v1=$(grep "Heat balance" integration_example.stdout | tail -1 | tr -s ' ' | cut -d ' ' -f 5) - grep -n "Heat balance" integration_example_serial.stdout
- v2=$(grep "Heat balance" integration_example.stdout | tail -1 | tr -s ' ' | cut -d ' ' -f 6) - 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: # We want to test this statement:
# (0.78529 < $v1 < 0.78549) && (0.78203 < $v2 < 0.78203) # (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 # 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