@@ -465,7 +465,7 @@ function(add_mpi_test name num_mpi_proc path)
465
465
set_property (TEST ${name} PROPERTY PASS_REGULAR_EXPRESSION "Test passed." )
466
466
endfunction (add_mpi_test )
467
467
468
- function (add_mpi_failable_test name num_mpi_proc path )
468
+ function (add_fault_tolerant_mpi_test name num_mpi_proc path )
469
469
if ( ((N LESS num_mpi_proc ) OR (N EQUAL 0 )) )
470
470
message (STATUS "Test ${name} is oversubscribed: ${num_mpi_proc} ranks requested with ${N} system processor available." )
471
471
if ( openmpi )
@@ -481,7 +481,7 @@ function(add_mpi_failable_test name num_mpi_proc path)
481
481
set (test_parameters ${test_parameters} ${MPIEXEC_NUMPROC_FLAG} ${num_mpi_proc} -disable-auto-cleanup )
482
482
add_test (NAME ${name} COMMAND ${MPIEXEC} ${test_parameters} "${path} " )
483
483
set_property (TEST ${name} PROPERTY PASS_REGULAR_EXPRESSION "Test passed." )
484
- endfunction (add_mpi_failable_test )
484
+ endfunction (add_fault_tolerant_mpi_test )
485
485
486
486
set (tests_root ${CMAKE_CURRENT_BINARY_DIR} /src/tests )
487
487
@@ -551,20 +551,22 @@ if(opencoarrays_aware_compiler)
551
551
add_mpi_test (co_reduce_string 4 ${tests_root} /unit/collectives/co_reduce_string )
552
552
553
553
# IMAGE FAIL tests
554
- add_mpi_test (image_status_test_1 4 ${tests_root} /unit/fail_images/image_status_test_1 )
555
- #ifdef WITH_FAIL_IMAGES
556
- # No other way to check that image_fail_test_1 passes.
557
- add_mpi_failable_test (image_fail_test_1 4 ${tests_root} /unit/fail_images/image_fail_test_1 )
558
- set_property (TEST image_fail_test_1 PROPERTY FAIL_REGULAR_EXPRESSION "Test failed" )
559
- set_property (TEST image_fail_test_1 PROPERTY PASS_REGULAR_EXPRESSION "Test passed" )
560
- add_mpi_failable_test (image_fail_and_sync_test_1 4 ${tests_root} /unit/fail_images/image_fail_and_sync_test_1 )
561
- add_mpi_failable_test (image_fail_and_sync_test_2 4 ${tests_root} /unit/fail_images/image_fail_and_sync_test_2 )
562
- add_mpi_failable_test (image_fail_and_sync_test_3 4 ${tests_root} /unit/fail_images/image_fail_and_sync_test_3 )
563
- add_mpi_failable_test (image_fail_and_status_test_1 4 ${tests_root} /unit/fail_images/image_fail_and_status_test_1 )
564
- add_mpi_failable_test (image_fail_and_failed_images_test_1 4 ${tests_root} /unit/fail_images/image_fail_and_failed_images_test_1 )
565
- add_mpi_failable_test (image_fail_and_stopped_images_test_1 4 ${tests_root} /unit/fail_images/image_fail_and_stopped_images_test_1 )
566
- add_mpi_failable_test (image_fail_and_get_test_1 4 ${tests_root} /unit/fail_images/image_fail_and_get_test_1 )
567
- #endif
554
+ if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7 )
555
+ add_mpi_test (image_status_test_1 4 ${tests_root} /unit/fail_images/image_status_test_1 )
556
+ if (CAF_ENABLE_FAILED_IMAGES )
557
+ # No other way to check that image_fail_test_1 passes.
558
+ add_fault_tolerant_mpi_test (image_fail_test_1 4 ${tests_root} /unit/fail_images/image_fail_test_1 )
559
+ set_property (TEST image_fail_test_1 PROPERTY FAIL_REGULAR_EXPRESSION "Test failed" )
560
+ set_property (TEST image_fail_test_1 PROPERTY PASS_REGULAR_EXPRESSION "Test passed" )
561
+ add_fault_tolerant_mpi_test (image_fail_and_sync_test_1 4 ${tests_root} /unit/fail_images/image_fail_and_sync_test_1 )
562
+ add_fault_tolerant_mpi_test (image_fail_and_sync_test_2 4 ${tests_root} /unit/fail_images/image_fail_and_sync_test_2 )
563
+ add_fault_tolerant_mpi_test (image_fail_and_sync_test_3 4 ${tests_root} /unit/fail_images/image_fail_and_sync_test_3 )
564
+ add_fault_tolerant_mpi_test (image_fail_and_status_test_1 4 ${tests_root} /unit/fail_images/image_fail_and_status_test_1 )
565
+ add_fault_tolerant_mpi_test (image_fail_and_failed_images_test_1 4 ${tests_root} /unit/fail_images/image_fail_and_failed_images_test_1 )
566
+ add_fault_tolerant_mpi_test (image_fail_and_stopped_images_test_1 4 ${tests_root} /unit/fail_images/image_fail_and_stopped_images_test_1 )
567
+ add_fault_tolerant_mpi_test (image_fail_and_get_test_1 4 ${tests_root} /unit/fail_images/image_fail_and_get_test_1 )
568
+ endif ()
569
+ endif ()
568
570
else ()
569
571
add_test (co_sum_extension ${tests_root} /unit/extensions/test-co_sum-extension.sh )
570
572
set_property (TEST co_sum_extension PROPERTY PASS_REGULAR_EXPRESSION "Test passed." )
0 commit comments