Skip to content

Commit df3df84

Browse files
committed
Improve logic & warnings for tests w/ known issues
1 parent 7096bc3 commit df3df84

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

CMakeLists.txt

+13-5
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ endif()
151151
set(opencoarrays_aware_compiler false)
152152
add_definitions(-DPREFIX_NAME=_caf_extensions_)
153153
endif()
154-
if(gfortran_compiler AND (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5.4))
154+
if(gfortran_compiler AND (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5.4.0))
155155
# GCC patch to fix issue accepted for 5.4 release
156156
# See https://github.com/sourceryinstitute/opencoarrays/issues/28 and
157157
# https://groups.google.com/forum/#!msg/opencoarrays/RZOwwYTqG80/46S9eL696dgJ
@@ -537,7 +537,12 @@ if(opencoarrays_aware_compiler)
537537
add_mpi_test(register_alloc_vector 2 ${tests_root}/unit/init_register/register_alloc_vector)
538538
add_mpi_test(allocate_as_barrier 2 ${tests_root}/unit/init_register/allocate_as_barrier)
539539
add_mpi_test(allocate_as_barrier_proc 8 ${tests_root}/unit/init_register/allocate_as_barrier_proc)
540-
if (gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7))
540+
if (gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0) OR (CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER}))
541+
message( STATUS "Allocatable components of coarray derived types only supported in GFortran >= 7 with OpenCoarrays > 1.8.4" )
542+
message( STATUS "(but full support not anticipated until OpenCoarrays 2.0 release)" )
543+
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0)
544+
message( WARNING "Allocatable components of coarray derived type developer tests enabled, despite lack of support in GFortran < 7\n These tests should fail." )
545+
endif()
541546
add_mpi_test(register_alloc_comp_1 2 ${tests_root}/unit/init_register/register_alloc_comp_1)
542547
add_mpi_test(register_alloc_comp_2 2 ${tests_root}/unit/init_register/register_alloc_comp_2)
543548
add_mpi_test(register_alloc_comp_3 2 ${tests_root}/unit/init_register/register_alloc_comp_3)
@@ -575,8 +580,11 @@ if(opencoarrays_aware_compiler)
575580
add_mpi_test(asynchronous_hello_world 3 ${tests_root}/integration/events/asynchronous_hello_world)
576581

577582
# Regression tests based on reported issues
578-
if(gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0))
579-
# GFortran PR 78505 only fixed on trunk/gcc 7
583+
if((gfortran_compiler AND (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0)) OR (CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER}))
584+
# GFortran PR 78505 only fixed on trunk/gcc 7, issue #243
585+
if( CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0 )
586+
message( WARNING "Developer tests requested and GFortran < 7: test source-alloc-no-sync may fail" )
587+
endif()
580588
add_mpi_test(source-alloc-no-sync 8 ${tests_root}/regression/reported/source-alloc-sync)
581589
endif()
582590

@@ -592,7 +600,7 @@ if(opencoarrays_aware_compiler)
592600
add_mpi_test(co_reduce-factorial-int64 4 ${tests_root}/regression/reported/co_reduce-factorial-int64)
593601

594602
# IMAGE FAIL tests
595-
if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7)
603+
if(NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0.0)
596604
add_mpi_test(image_status_test_1 4 ${tests_root}/unit/fail_images/image_status_test_1)
597605
if(CAF_ENABLE_FAILED_IMAGES)
598606
# No other way to check that image_fail_test_1 passes.

0 commit comments

Comments
 (0)