diff --git a/test/fc_mpi/src/CMakeLists.txt b/test/fc_mpi/src/CMakeLists.txt index 00b794f..693f675 100644 --- a/test/fc_mpi/src/CMakeLists.txt +++ b/test/fc_mpi/src/CMakeLists.txt @@ -1,5 +1,5 @@ if (MPI_FOUND) - add_executable(example example.f90) + add_executable(example example.F90) else() message(FATAL "MPI not found!") endif() diff --git a/test/fc_mpi/src/example.f90 b/test/fc_mpi/src/example.F90 similarity index 85% rename from test/fc_mpi/src/example.f90 rename to test/fc_mpi/src/example.F90 index 0f636ca..5c5d6f3 100644 --- a/test/fc_mpi/src/example.f90 +++ b/test/fc_mpi/src/example.F90 @@ -1,8 +1,12 @@ program example +#if defined USE_MPI_MODULE use mpi - implicit none +#else + implicit none +#include "mpif.h" +#endif integer :: ierr, rank, num_ranks logical :: test_ok diff --git a/test/test.py b/test/test.py index 526bb39..9fe97fd 100644 --- a/test/test.py +++ b/test/test.py @@ -158,7 +158,12 @@ def test_fc_int64(): @skip_on_windows -def test_fc_mpi(): +def test_fc_mpi_module(): + configure_build_and_exe('fc_mpi', 'python setup.py --mpi --fc=mpif90 --extra-fc-flags="-D USE_MPI_MODULE"', 'mpirun -np 2') + + +@skip_on_windows +def test_fc_mpi_include(): configure_build_and_exe('fc_mpi', 'python setup.py --mpi --fc=mpif90', 'mpirun -np 2') # ------------------------------------------------------------------------------