Commit e8411010 authored by Lukas Riedel's avatar Lukas Riedel

Enable parallel grid creation and mapping test

* Add target 'unit_tests_parallel'
* Add two new tests executing two grid creation tests in parallel
* Update names of grid creation ini files
* Fix bug in test-grid-creation.cc that prevented parallel execution
* Add parallel unit tests to existing parallel test job
    and rename it to 'test:parallel'
parent 346b9af9
......@@ -148,12 +148,16 @@ test:st:ode:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_ode
test:st:parallel:
test:parallel:
<<: *test
dependencies:
- build:system-tests
- build:unit-tests
tags:
- multicore
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make unit_tests_parallel
- $DUNECONTROL --only=dorie make test_run_parallel
test:st:reference:
......
......@@ -3,6 +3,9 @@ add_custom_target(build_unit_tests)
add_custom_target(unit_tests
COMMAND ctest --output-on-failure --tests-regex ^ut.+$
)
add_custom_target(unit_tests_parallel
COMMAND ctest --output-on-failure --tests-regex ^par-ut.+$
)
# Add the system test build target and test command
add_custom_target(build_system_tests)
......
......@@ -27,14 +27,24 @@ dune_add_system_test(
INIFILE ${CMAKE_CURRENT_BINARY_DIR}/test-grid-creation-global.mini
)
# run one test in parallel
# dune_add_test(
# TARGET ${gc_target}
# MPI_RANKS 2
# TIMEOUT 30
# CMD_ARGS ${CMAKE_CURRENT_BINARY_DIR}/gc_0000.ini --allow-run-as-root
# )
add_custom_target(test_grid_creator
COMMAND ctest --output-on-failure --tests-regex ^.+test-grid-.+$
)
\ No newline at end of file
)
# run two tests in parallel
dune_add_test(
NAME par-ut-test-grid-creation-1
TARGET ${gc_target}
COMMAND ${gc_target}
MPI_RANKS 2
TIMEOUT 30
CMD_ARGS ${CMAKE_CURRENT_BINARY_DIR}/gc_files_0002.ini --allow-run-as-root
)
dune_add_test(
NAME par-ut-test-grid-creation-2
TARGET ${gc_target}
COMMAND ${gc_target}
MPI_RANKS 2
TIMEOUT 30
CMD_ARGS ${CMAKE_CURRENT_BINARY_DIR}/gc_files_0003.ini --allow-run-as-root
)
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
__name = global
__name = gc_global
_asset_path = "${PROJECT_SOURCE_DIR}/test"
[output]
......
......@@ -22,7 +22,7 @@ int main(int argc, char** argv)
//Initialize Mpi
Dune::MPIHelper& helper = Dune::MPIHelper::instance(argc, argv);
if (argc!=2)
if (argc < 2)
DUNE_THROW(Dune::IOError,"No parameter file specified!");
const std::string inifilename = argv[1];
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
__name = files
__name = gc_files
_asset_path = "${PROJECT_SOURCE_DIR}/test"
[output]
......
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