--- src/tests/CMakeLists.txt.orig 2022-05-09 10:53:57.000000000 +0700 +++ src/tests/CMakeLists.txt 2022-09-11 01:15:32.000000000 +0700 @@ -15,6 +15,10 @@ ) endif() +if (APPLE AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc|ppc64") + add_compile_definitions(DARWIN_PPC) +endif() + set( directory_list utilities integration # Changing extension from f90 to F90 is intended. See: https://stackoverflow.com/questions/31649691/stringify-macro-with-gnu-gfortran --- src/tests/integration/pde_solvers/coarrayHeatSimplified/CMakeLists.txt.orig 2022-05-09 10:53:57.000000000 +0700 +++ src/tests/integration/pde_solvers/coarrayHeatSimplified/CMakeLists.txt 2022-09-11 02:03:18.000000000 +0700 @@ -4,7 +4,7 @@ add_dependencies(local_field caf_mpi_static) add_dependencies(global_field local_field caf_mpi_static) add_executable(co_heat - main.f90 + main.F90 $ $ ) --- src/tests/integration/pde_solvers/coarrayHeatSimplified/main.F90.orig 2022-05-09 10:53:57.000000000 +0700 +++ src/tests/integration/pde_solvers/coarrayHeatSimplified/main.F90 2022-09-11 01:29:09.000000000 +0700 @@ -26,7 +26,10 @@ ! program main +#ifndef DARWIN_PPC use IEEE_arithmetic, only : IEEE_is_NaN +#endif + use global_field_module, only : global_field implicit none type(global_field) :: T,laplacian_T,T_half @@ -44,7 +47,11 @@ block real, allocatable :: residual(:) residual = laplacian_T%state() +#ifdef DARWIN_PPC + if ( any(residual>tolerance) .or. any(isNaN(residual)) .or. any(residual<0) ) error stop "Test failed." +#else if ( any(residual>tolerance) .or. any(IEEE_is_NaN(residual)) .or. any(residual<0) ) error stop "Test failed." +#endif end block if (this_image()==1) print *,"Test passed." end program --- src/tests/integration/pde_solvers/coarrayBurgers/main.F90.orig 2022-05-09 10:53:57.000000000 +0700 +++ src/tests/integration/pde_solvers/coarrayBurgers/main.F90 2022-09-11 01:28:08.000000000 +0700 @@ -1,6 +1,8 @@ program main use iso_fortran_env, only : real64,int64,compiler_version,compiler_options +#ifndef DARWIN_PPC use ieee_arithmetic, only : ieee_is_nan +#endif use global_field_module, only : global_field,initial_condition use ForTrilinos_assertion_utility, only : assert,error_message implicit none @@ -39,7 +41,11 @@ contains subroutine test(burgers_solution) type(global_field), intent(in) :: burgers_solution +#ifdef DARWIN_PPC + call assert(.not.any(isnan(u%state())),error_message("Test failed: u is not a number.")) +#else call assert(.not.any(ieee_is_nan(u%state())),error_message("Test failed: u is not a number.")) +#endif call assert(sinusoid(u),error_message("Test failed: improper shape.")) end subroutine