adapt fc_mpi test for MS Windows by utilizing ms-mpi package

- 2 msmpi files are modified according to the tutorial
This commit is contained in:
Miro ILIAS
2015-08-24 21:56:43 +02:00
parent ea650eace1
commit 102e891278
4 changed files with 33 additions and 9 deletions

View File

@ -8,11 +8,11 @@ source: ../../../modules/fc.cmake
[mpi]
source: ../../../modules/mpi.cmake
[int64]
source: ../../../modules/int64.cmake
[default_build_paths]
source: ../../../modules/default_build_paths.cmake
[src]
source: ../../../modules/src.cmake
[definitions]
source: ../../../modules/definitions.cmake

View File

@ -1,5 +1,9 @@
if (MPI_FOUND)
add_executable(example example.F90)
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
# respect paths in appveyor.yml
target_link_libraries(example "C:/software/msmpi/libmsmpi64.a")
endif()
else()
message(FATAL "MPI not found!")
endif()

View File

@ -157,14 +157,18 @@ def test_fc_int64():
# ------------------------------------------------------------------------------
@skip_on_windows
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')
def test_fc_mpi():
if sys.platform == 'win32':
configure_build_and_exe('fc_mpi', 'python setup.py --mpi --fc=gfortran --extra-fc-flags="-D_WIN64 -D INT_PTR_KIND()=8 -fno-range-check" --add-definitions="-D USE_MPI_MODULE"', 'mpiexec -n 2')
else:
configure_build_and_exe('fc_mpi', 'python setup.py --mpi --fc=mpif90 --add-definitions="-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')
if sys.platform == 'win32':
configure_build_and_exe('fc_mpi', 'python setup.py --mpi --fc=gfortran --extra-fc-flags="-D_WIN64 -D INT_PTR_KIND()=8 -fno-range-check"', 'mpiexec -np 2')
else:
configure_build_and_exe('fc_mpi', 'python setup.py --mpi --fc=mpif90', 'mpirun -np 2')
# ------------------------------------------------------------------------------