tweak the fc_mpi test to use both the module mpi.F90 and include mpif.h

This commit is contained in:
Miro ILIAS 2015-08-27 12:56:28 +02:00
parent 4c0a938426
commit 43b577583e
3 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,5 @@
if (MPI_FOUND) if (MPI_FOUND)
add_executable(example example.f90) add_executable(example example.F90)
else() else()
message(FATAL "MPI not found!") message(FATAL "MPI not found!")
endif() endif()

View File

@ -1,8 +1,12 @@
program example program example
#if defined USE_MPI_MODULE
use mpi use mpi
implicit none implicit none
#else
implicit none
#include "mpif.h"
#endif
integer :: ierr, rank, num_ranks integer :: ierr, rank, num_ranks
logical :: test_ok logical :: test_ok

View File

@ -158,7 +158,12 @@ def test_fc_int64():
@skip_on_windows @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') configure_build_and_exe('fc_mpi', 'python setup.py --mpi --fc=mpif90', 'mpirun -np 2')
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------