📄 configure.in
字号:
else AC_MSG_RESULT(no) fi else AC_MSG_RESULT(no) fi fielsednl MPICH2 has MPI_Init_thread(). if test "$MPI_IMPL" = "MPICH2" ; then AC_DEFINE(HAVE_MPI_INIT_THREAD, 1, [Define if MPI_Init_thread available]) fifidnl Check MPI-IOif test "$MPI_IMPL" != "MPICH" -a "$MPI_IMPL" != "MPICH2" ; then if test "$enable_checkMPI" = "yes" -a "$enable_checkMPIO" = "yes" ; then AC_MSG_CHECKING( [for the C version of MPI_File_open()] ) PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ int itmp; MPI_File fh ], [ itmp=MPI_File_open( MPI_COMM_WORLD, "mpiiotest", MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh ) ], [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) if test "$mpe_link_ok" = "yes" ; then AC_MSG_RESULT(yes) AC_MSG_CHECKING( [for the C version of PMPI_File_open()] ) PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ int itmp; MPI_File fh ], [ itmp=PMPI_File_open( MPI_COMM_WORLD, "mpiiotest", MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh ) ], [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) if test "$mpe_link_ok" = "yes" ; then AC_MSG_RESULT(yes) AC_DEFINE( HAVE_MPI_IO, 1, [Define if MPI-IO available] ) AC_MSG_CHECKING( [for ROMIO's MPIO_Request] ) PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ MPIO_Request io_request], , [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) if test "$mpe_link_ok" = "yes" ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_DEFINE( HAVE_NO_MPIO_REQUEST, 1, [Define if no MPIO_Request] ) fi else AC_MSG_RESULT([no, assumed No MPI-IO routines]) fi else AC_MSG_RESULT([no, assumed No MPI-IO routines]) fi fielsednl When built with MPICHx, MPE configure observes --with-mpiio & --enable-romiodnl if test \( "$MPI_IMPL" = "MPICH" -o "$MPI_IMPL" = "MPICH2" \) \ if test "$with_mpiio" = "yes" ; then AC_DEFINE( HAVE_MPI_IO, 1, [Define if MPI-IO available] ) fifidnl Check MPI-RMAif test "$MPI_IMPL" != "MPICH" -a "$MPI_IMPL" != "MPICH2" ; then if test "$enable_checkMPI" = "yes" ; then AC_MSG_CHECKING( [for the C version of MPI_Win_create] ) PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ int itmp; MPI_Win win ], [ itmp=MPI_Win_create( NULL, 0, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win ) ], [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) if test "$mpe_link_ok" = "yes" ; then AC_MSG_RESULT(yes) AC_MSG_CHECKING( [for the C version of PMPI_Win_create] ) PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ int itmp; MPI_Win win ], [ itmp=PMPI_Win_create( NULL, 0, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win ) ], [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) if test "$mpe_link_ok" = "yes" ; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_MPI_RMA, 1, [Define if MPI-RMA available]) dnl Start Test of MPI_Win_lock/unlock AC_MSG_CHECKING([for the C version of MPI_Win_lock/unlock]) PAC_MPI_LINK_CC_FUNC($MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ int itmp; MPI_Win win ], [ itmp=MPI_Win_create( NULL, 0, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win ); itmp=MPI_Win_lock( MPI_LOCK_EXCLUSIVE, 0, 0, win ); itmp=MPI_Win_unlock( 0, win ) ], [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) if test "$mpe_link_ok" = "yes" ; then AC_MSG_RESULT(yes) AC_MSG_CHECKING([for the C version of PMPI_Win_lock/unlock]) PAC_MPI_LINK_CC_FUNC($MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ int itmp; MPI_Win win ], [ itmp=PMPI_Win_create( NULL, 0, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win ); itmp=PMPI_Win_lock( MPI_LOCK_EXCLUSIVE, 0, 0, win ); itmp=PMPI_Win_unlock( 0, win ) ], [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) if test "$mpe_link_ok" = "yes" ; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_MPI_RMA_LOCK, 1, [Define if MPI_Win_lock/unlock are available]) else AC_MSG_RESULT(no) fi else AC_MSG_RESULT(no) fi dnl End Test of MPI_Win_lock/unlock dnl Start Test of MPI_Win_test AC_MSG_CHECKING([for the C version of MPI_Win_test]) PAC_MPI_LINK_CC_FUNC($MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ int itmp, flag; MPI_Win win ], [ itmp=MPI_Win_create( NULL, 0, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win ); itmp=MPI_Win_test( win, &flag ) ], [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) if test "$mpe_link_ok" = "yes" ; then AC_MSG_RESULT(yes) AC_MSG_CHECKING([for the C version of PMPI_Win_test]) PAC_MPI_LINK_CC_FUNC($MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ int itmp, flag; MPI_Win win ], [ itmp=PMPI_Win_create( NULL, 0, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win ); itmp=PMPI_Win_test( win, &flag ) ], [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) if test "$mpe_link_ok" = "yes" ; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_MPI_RMA_TEST, 1, [Define if MPI_Win_test is available]) else AC_MSG_RESULT(no) fi else AC_MSG_RESULT(no) fi dnl End Test of MPI_Win_test else AC_MSG_RESULT([no, assumed No MPI-RMA routines]) fi else AC_MSG_RESULT([no, assumed No MPI-RMA routines]) fi fielsednl if MPICH2, assume MPI-RMA is available. if test "$MPI_IMPL" = "MPICH2" ; then AC_DEFINE( HAVE_MPI_RMA, 1, [Define if MPI-RMA is available] ) AC_DEFINE( HAVE_MPI_RMA_LOCK, 1, [Define if MPI_Win_lock/unlock are available] ) AC_DEFINE(HAVE_MPI_RMA_TEST, 1, [Define if MPI_Win_test is available]) fifidnl Check MPI-2 communicator functionsif test "$MPI_IMPL" != "MPICH" -a "$MPI_IMPL" != "MPICH2" ; then if test "$enable_checkMPI" = "yes" ; then AC_MSG_CHECKING( [for the C version of MPI_Comm_connect/accept()] ) PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ MPI_Comm intercomm; char *port ], [ MPI_Comm_connect( port, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &intercomm ); MPI_Comm_accept( port, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &intercomm ) ], [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) if test "$mpe_link_ok" = "yes" ; then AC_MSG_RESULT(yes) AC_MSG_CHECKING( [for the C version of PMPI_Comm_connect/accept()] ) PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ MPI_Comm intercomm; char *port ], [ PMPI_Comm_connect( port, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &intercomm ); PMPI_Comm_accept( port, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &intercomm ) ], [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) if test "$mpe_link_ok" = "yes" ; then AC_MSG_RESULT(yes) AC_DEFINE( HAVE_MPI_SPAWN, 1, [Define if MPI-SPAWN is available] ) dnl Start of Checking of MPI2 Naming Service AC_MSG_CHECKING( [for the C version of MPI_Publish/Lookup_name()] ) PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ char *port ], [ MPI_Publish_name( "mpe_port_name", MPI_INFO_NULL, port ); MPI_Lookup_name( "mpe_port_name", MPI_INFO_NULL, port ); MPI_Unpublish_name( "mpe_port_name", MPI_INFO_NULL, port ); ], [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) if test "$mpe_link_ok" = "yes" ; then AC_MSG_RESULT(yes) AC_MSG_CHECKING( [for the C version of PMPI_Publish/Lookup_name()] ) PAC_MPI_LINK_CC_FUNC($MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ char *port ], [ PMPI_Publish_name( "mpe_port_name", MPI_INFO_NULL, port ); PMPI_Lookup_name( "mpe_port_name", MPI_INFO_NULL, port ); PMPI_Unpublish_name( "mpe_port_name", MPI_INFO_NULL, port ); ], [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) if test "$mpe_link_ok" = "yes" ; then AC_MSG_RESULT(yes) AC_DEFINE( HAVE_MPI_NAMING, 1, [Define if MPI Naming Service is available] ) else AC_MSG_RESULT(no) fi else AC_MSG_RESULT(no) fi dnl End of Checking of MPI2 Naming Service else AC_MSG_RESULT(no) fi else AC_MSG_RESULT(no) fi fielsednl if MPICH2 assume all MPI-2 communicator functions are available. if test "$MPI_IMPL" = "MPICH2" ; then AC_DEFINE( HAVE_MPI_SPAWN, 1, [Define if MPI-SPAWN is available] ) fifidnl Determine if MPI_STATUS_IGNORE existsif test "$MPI_IMPL" != "MPICH" -a "$MPI_IMPL" != "MPICH2" ; then AC_MSG_CHECKING( [for MPI_STATUS_IGNORE] ) PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ MPI_Status* tmp_status; tmp_status = MPI_STATUS_IGNORE; ], , [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) AC_MSG_RESULT($mpe_link_ok)else # All known impls, including MPICH, support STATUS_IGNORE # (The MPICH support may have a few bugs, but it is close enough # for our needs) mpe_link_ok=yesfiif test "$mpe_link_ok" = "yes" ; then AC_DEFINE( HAVE_MPI_STATUS_IGNORE, 1, [Define if MPI_STATUS_IGNORE available] )fidnl Determine if MPI_STATUSES_IGNORE existsif test "$MPI_IMPL" != "MPICH" -a "$MPI_IMPL" != "MPICH2" ; then AC_MSG_CHECKING( [for MPI_STATUSES_IGNORE] ) PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, , [ MPI_Status* tmp_status; tmp_status = MPI_STATUSES_IGNORE; ], , [ mpe_link_ok=yes ], [ mpe_link_ok=no ] ) AC_MSG_RESULT($mpe_link_ok)else # All known impls, including MPICH, support STATUS_IGNORE # (The MPICH support may have a few bugs, but it is close enough # for our needs) mpe_link_ok=yesfiif test "$mpe_link_ok" = "yes" ; then AC_DEFINE( HAVE_MPI_STATUSES_IGNORE, 1, [Define if MPI_STATUSES_IGNORE available] )fidnl This is temporary! Eventually MPICH-2 will have its own f2c MPI wrappers.dnl When MPICH-2 has the wrappers ready, the following block should be removedif test "${F2CMPI_LIBS}" = "-l${F2CMPI_LIBNAME}" \ -a "$MPI_IMPL" = "MPICH2" ; then# FIXME: MPICH2 include MPI_Fint, Need to fetch the value somehow.# Obtain MPICH2's MPI_STATUS_SIZE from environmental variable AC_MSG_CHECKING( [for the value of MPI_STATUS_SIZE] ) if test -n "$SIZEOF_MPI_STATUS" ; then # FIXME: Get true value of MPI_Fint instead of 4 CROSS_MPI_STATUS_SIZE=`expr $SIZEOF_MPI_STATUS / 4` MPI_STATUS_SIZE=$CROSS_MPI_STATUS_SIZE AC_MSG_RESULT($MPI_STATUS_SIZE) AC_DEFINE_UNQUOTED( MPI_STATUS_SIZE, $MPI_STATUS_SIZE, [Define as the size of MPI_STATUS_SIZE] ) elsednl For MPICH2, when SIZEOF_MPI_STATUS is not defined, enable_f77=no.dnl Set MPE_BUILD_FORTRAN2C=no and F2CMPI_LIBS="" so liblmpe.adnl won't be built and fortran link/run tests won't executed.dnl If F2CMPI_LIBS="-lfmpich", disable building of libmpe_f2cmpi.adnl by setting F2CMPI_LIBS="". Leave MPE_BUILD_FORTRAN2C=yes, sodnl fortran link/run tests can be performed. AC_MSG_RESULT("undefined -- disabling fortran features.") MPE_BUILD_FORTRAN2C=no F2CMPI_LIBS="" fi# MPICH2 after 1.0.2 release has MPI_F_STATUS_IGNORE, MPI_F_STATUSES_IGNORE AC_DEFINE( HAVE_MPI_F_STATUS_IGNORE, 1, [Define if MPI_F_STATUS_IGNORE available] ) AC_DEFINE( HAVE_MPI_F_STATUSES_IGNORE, 1, [Define if MPI_F_STATUSES_IGNORE available] )# MPICH2 has MPI_Comm_f2c()/c2f() AC_DEFINE( HAVE_MPI_COMM_F2C, 1, [Define if MPI_Comm_f2c and c2f available] )# MPICH2 has MPI_Status_f2c()/c2f() AC_DEFINE( HAVE_MPI_STATUS_F2C, 1, [Define if MPI_Status_f2c and c2f available] )# MPICH2 has MPI_TYPE_f2c()/c2f() AC_DEFINE( HAVE_MPI_TYPE_F2C, 1, [Define if MPI_Type_F2c and c2f available] )# MPICH2 has MPI_Group_f2c()/c2f() AC_DEFINE( HAVE_MPI_GROUP_F2C, 1, [Define if MPI_Group_f2c and c2f available] )# MPICH2 has MPI_Request_f2c()/c2f() AC_DEFINE( HAVE_MPI_REQUEST_F2C, 1, [Define if MPI_Request_f2c and c2f available] )# MPICH2 has MPI_Op_f2c()/c2f() AC_DEFINE( HAVE_MPI_OP_F2C, 1, [Define if MPI_Op_f2c and c2f available] )# MPICH2 has MPI_Errhandler_f2c()/c2f() AC_DEFINE( HAVE_MPI_ERRHANDLER_F2C, 1,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -