Commit 3f6232c3 authored by William Gropp's avatar William Gropp
Browse files

[svn-r7004] Add support to check for 2COMPLEX and 2DOUBLE_COMPLEX, which only...

[svn-r7004] Add support to check for 2COMPLEX and 2DOUBLE_COMPLEX, which only existed in MPI 1.0 (and was removed in 1.1)
parent 541123f2
......@@ -429,15 +429,13 @@ dnl Check for MPI_REALx
AC_MSG_RESULT(no)
fi
dnl Check for MPI_COMPLEXx and MPI_2COMPLEXxxx
AC_MSG_CHECKING( [for Fortran MPI_Datatype, COMPLEX related, in C] )
dnl Check for MPI_COMPLEXx
AC_MSG_CHECKING( [for Fortran MPI_Datatype, COMPLEXn related, in C] )
PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, ,
[ MPI_Datatype type1, type2, type3, type4 ],
[ MPI_Datatype type1, type2 ],
[
type1 = MPI_COMPLEX8;
type2 = MPI_COMPLEX16;
type3 = MPI_2COMPLEX;
type4 = MPI_2DOUBLE_COMPLEX;
],
[ mpe_link_ok=yes ], [ mpe_link_ok=no ] )
if test "$mpe_link_ok" = "yes" ; then
......@@ -448,6 +446,23 @@ dnl Check for MPI_COMPLEXx and MPI_2COMPLEXxxx
AC_MSG_RESULT(no)
fi
dnl Check for MPI_2COMPLEXxxx
AC_MSG_CHECKING( [for Fortran MPI_Datatype, 2COMPLEX related, in C] )
PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, ,
[ MPI_Datatype type1, type2 ],
[
type1 = MPI_2COMPLEX;
type2 = MPI_2DOUBLE_COMPLEX;
],
[ mpe_link_ok=yes ], [ mpe_link_ok=no ] )
if test "$mpe_link_ok" = "yes" ; then
AC_MSG_RESULT(yes)
AC_DEFINE( HAVE_FORTRAN_MPI_DATATYPE_2COMPLEX_IN_C, 1,
[Define if Fortran MPI_Datatype, 2COMPLEX, exist in C] )
else
AC_MSG_RESULT(no)
fi
else
dnl if HAVE_FORTRAN_MPI_DATATYPE_IN_C is false
......@@ -478,6 +493,7 @@ dnl if HAVE_FORTRAN_MPI_DATATYPE_IN_C is false
else
dnl if MPICH2, assume all Fortran MPI_Datatypes are available in C
dnl if MPICH1, assume only basic Fortran MPI_Datatypes are available in C
dnl if MPICH2, assume 2COMPLEX is *not* available (default as of 1.3x)
if test "$MPI_IMPL" = "MPICH2" ; then
AC_DEFINE( HAVE_FORTRAN_MPI_DATATYPE_IN_C, 1,
[Define if Fortran MPI_Datatype exists in C] )
......
......@@ -140,7 +140,7 @@ unsigned int CollChk_basic_value(MPI_Datatype type)
return 0x329; /* (0x107,1)@(0x107,1) */
else if ( type == MPI_2DOUBLE_PRECISION )
return 0x33a; /* (0x109,1)@(0x109,1) */
#if defined( HAVE_FORTRAN_MPI_DATATYPE_COMPLEXX_IN_C )
#if defined( HAVE_FORTRAN_MPI_DATATYPE_2COMPLEX_IN_C )
else if ( type == MPI_2COMPLEX )
return 0x323; /* (0x101,1)@(0x101,1) */
else if ( type == MPI_2DOUBLE_COMPLEX )
......@@ -248,7 +248,7 @@ unsigned int CollChk_basic_count(MPI_Datatype type)
else if ( type == MPI_2INTEGER
|| type == MPI_2REAL
|| type == MPI_2DOUBLE_PRECISION
#if defined( HAVE_FORTRAN_MPI_DATATYPE_COMPLEXX_IN_C )
#if defined( HAVE_FORTRAN_MPI_DATATYPE_2COMPLEX_IN_C )
|| type == MPI_2COMPLEX
|| type == MPI_2DOUBLE_COMPLEX
#endif
......
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