Commit 4d48599c authored by Soheil Soltani's avatar Soheil Soltani
Browse files

Merge branch 'master_pre_stage' of https://gitlab.mpcdf.mpg.de/elpa/elpa into master_pre_stage

parents 2c1523d7 6130a998
......@@ -308,6 +308,7 @@ if test x"${FC_does_infer_interfaces}" = x"yes"; then
# argument checking or fail
# 2. no MPI case: switch of PACK_REAL_TO_COMPLEX
if test x"${with_mpi}" = x"yes"; then
CHECKING(whether MPI module defines all interfaces )
# check whether MPI module defines all interfaces; not the case for Intel MPI!
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
program test_mpi_interfaces
......@@ -316,6 +317,8 @@ if test x"${FC_does_infer_interfaces}" = x"yes"; then
integer :: rank
integer :: buf(10)
integer :: ierr
real*8 :: a(2)
complex*16 :: b(2)
call MPI_Init(ierr)
call MPI_Comm_rank(MPI_COMM_WORLD, rank, ierr)
......@@ -324,19 +327,27 @@ if test x"${FC_does_infer_interfaces}" = x"yes"; then
buf(:) = 42;
end if
! this is OK
call MPI_Bcast(buf, 10, MPI_INT, 0, MPI_COMM_WORLD, ierr)
!! this is OK
!call MPI_Bcast(buf, 10, MPI_INT, 0, MPI_COMM_WORLD, ierr)
! Oops, wrong order here:
call MPI_Bcast(10, buf, MPI_INT, 0, MPI_COMM_WORLD, ierr)
!! Oops, wrong order here:
!call MPI_Bcast(10, buf, MPI_INT, 0, MPI_COMM_WORLD, ierr)
! if the correct interfaces exists in the MPI module
! this must work. If not and the compiler infers interfaces
! this will fail
call MPI_Bcast(a, 2, MPI_REAL8, 0, MPI_COMM_WORLD, ierr)
call MPI_Bcast(b, 2, MPI_DOUBLE_COMPLEX, 0, MPI_COMM_WORLD, ierr)
call MPI_Finalize(ierr)
end program
])],
[MPImodule_has_interfaces=no],
[MPImodule_has_interfaces=yes]
[MPImodule_has_interfaces=yes],
[MPImodule_has_interfaces=no]
)
AC_MSG_RESULT([${MPImodule_has_interfaces}])
if test x"${MPImodule_has_interfaces}" = x"no"; then
AC_MSG_CHECKING(whether we can cure missing interfaces by allowing argument mismatch )
#check whether we can cure this by disabling argument checking
FCFLAGS_SAVE2="$FCFLAGS"
FCFLAGS="$FCFLAGS -fallow-argument-mismatch"
......@@ -353,10 +364,11 @@ if test x"${FC_does_infer_interfaces}" = x"yes"; then
end program
])],
[FC_does_still_infer_interfaces=no],
[FC_does_still_infer_interfaces=yes]
[FC_infer_interfaces_cured=yes],
[FC_infer_interfaces_cured=no]
)
if test x"${FC_does_still_infer_interfaces}" = x"yes"; then
AC_MSG_RESULT([${FC_infer_interfaces_cured}])
if test x"${FC_infer_interfaces_cured}" = x"no"; then
FCFLAGS = "$FCFLAGS_SAVE2"
AC_MSG_ERROR([Fortran compiler infers interfaces; but MPI module does not supply all of them])
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment