⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 fortran并行计算包
💻 IN
📖 第 1 页 / 共 3 页
字号:
               [Define if MPI_Errhandler_f2c and c2f available] )#   Define MPICH2's Fortran TRUE/FALSE value    # FIXME: Use the values from the Fortran configure    true_val=1    AC_DEFINE_UNQUOTED( MPE_F77_TRUE_VALUE, $true_val,                        [Define as the value for Fortran logical true] )    false_val=0    AC_DEFINE_UNQUOTED( MPE_F77_FALSE_VALUE, $false_val,                        [Define as the value for Fortran logical false] )dnl  endif test "${F2CMPI_LIBS}" = "-l${F2CMPI_LIBNAME}" dnl          -a "$MPI_IMPL" = "MPICH2" ; thenfidnldnl  Test Non-MPICH platform's Fortran to C capabilitydnlif test "${F2CMPI_LIBS}" = "-l${F2CMPI_LIBNAME}" \     -a "$MPI_IMPL" != "MPICH2" ; thendnl Determine MPI_Fintdnl (same test done in graphics's configure.in)    AC_MSG_CHECKING( [for MPI_Fint] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, ,                          [ MPI_Fint aa=1 ], ,                          [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    if test "$mpe_link_ok" = "yes" ; then        AC_MSG_RESULT(yes)        MPI_FINT_TYPE=MPI_Fint    else        AC_MSG_RESULT([no, assumed MPI_Fint to be int])        MPI_FINT_TYPE=int        AC_DEFINE( MPI_Fint, int, [Define MPI_Fint as int] )    fidnl Determine if MPI_F_STATUS_IGNORE exists    AC_MSG_CHECKING( [for MPI_F_STATUS_IGNORE] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, ,                          [              ${MPI_FINT_TYPE}  *f_status;              f_status = MPI_F_STATUS_IGNORE;                          ], ,                          [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    AC_MSG_RESULT($mpe_link_ok)if test "$mpe_link_ok" = "yes" ; then    AC_DEFINE( HAVE_MPI_F_STATUS_IGNORE, 1,               [Define if MPI_F_STATUS_IGNORE available] )fidnl Determine if MPI_F_STATUSES_IGNORE exists    AC_MSG_CHECKING( [for MPI_F_STATUSES_IGNORE] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, ,                          [              ${MPI_FINT_TYPE}  *f_statuses;              f_statuses = MPI_F_STATUSES_IGNORE;                          ], ,                          [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    AC_MSG_RESULT($mpe_link_ok)if test "$mpe_link_ok" = "yes" ; then    AC_DEFINE( HAVE_MPI_F_STATUSES_IGNORE, 1,               [Define if MPI_F_STATUSES_IGNORE available] )fidnl Determmine if MPI_Comm_f2c() and MPI_Comm_c2f() are therednl (same test done in graphics's configure.in)    AC_MSG_CHECKING( [for MPI_Comm_c2f() and MPI_Comm_f2c()] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, ,                          [ MPI_Comm comm; ${MPI_FINT_TYPE} aa; ],                          [                          aa=MPI_Comm_c2f(comm) ;                          comm=MPI_Comm_f2c(aa) ;                          ],                          [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    AC_MSG_RESULT($mpe_link_ok)    if test "$mpe_link_ok" = "yes" ; then        AC_DEFINE( HAVE_MPI_COMM_F2C, 1,                   [Define if MPI_Comm_f2c and c2f available] )    fi#   Determine MPI_STATUS_SIZE (this is the INTEGER status size for Fortran)    mpe_tmpfile=mpe_mpistatusvalue    AC_MSG_CHECKING( [for the value of MPI_STATUS_SIZE] )    if test "$cross_compiling" = "yes" -o "$cross_compiling" = 1 ; then        if test "X$CROSS_MPI_STATUS_SIZE" != "X" ; then            mpe_MPI_STATUS_SIZE="$CROSS_MPI_STATUS_SIZE"            AC_DEFINE_UNQUOTED( MPI_STATUS_SIZE, $mpe_MPI_STATUS_SIZE,                                [Define as the size of MPI_STATUS_SIZE] )            AC_MSG_RESULT( [${mpe_MPI_STATUS_SIZE}] )        else            PAC_MSG_ERROR( $enable_softerror,                           [Undefined CROSS_MPI_STATUS_SIZE! Exiting...] )        fi    elsednl    PAC_MPI_RUN_F77_PGM( $MPI_F77, [$MPI_FFLAGS],dnl                         $F77, $FFLAGS, $LIBS, [dnl      program get_mpi_status_sizednl      include 'mpif.h'dnl      open(10, file="$mpe_tmpfile", status='unknown')dnl      rewind(10)dnl      write(10,*) MPI_STATUS_SIZEdnl      close(10)dnl      enddnl                         ], [ mpe_run_ok=yes ], [ mpe_run_ok=no ] )        PAC_MPI_RUN_CC_PGM( $MPI_CC, [$MPI_CFLAGS],                            $CC, $CFLAGS, $LIBS, [#include <stdio.h>#include "mpi.h"main(){    FILE *mpe_file = fopen( "$mpe_tmpfile", "w" );    if ( ! mpe_file ) exit( 1 );    fprintf( mpe_file, "%d\n",             sizeof( MPI_Status )/sizeof( ${MPI_FINT_TYPE} ) );    fclose( mpe_file );    exit( 0 );}                            ], [ mpe_run_ok=yes ], [ mpe_run_ok=no ] )        if test "$mpe_run_ok" = "yes" ; then            mpe_MPI_STATUS_SIZE="`cat ${mpe_tmpfile} | sed -e 's/ //g'`"            AC_DEFINE_UNQUOTED( MPI_STATUS_SIZE, $mpe_MPI_STATUS_SIZE,                                [Define as the size of MPI_STATUS_SIZE] )            AC_MSG_RESULT( [${mpe_MPI_STATUS_SIZE}] )            rm -f ${mpe_tmpfile}        else            if test "X$CROSS_MPI_STATUS_SIZE" != "X" ; then                mpe_MPI_STATUS_SIZE="$CROSS_MPI_STATUS_SIZE"                AC_DEFINE_UNQUOTED( MPI_STATUS_SIZE, $mpe_MPI_STATUS_SIZE,                                    [Define as the size of MPI_STATUS_SIZE] )                AC_MSG_RESULT( [use supplied value: ${mpe_MPI_STATUS_SIZE}] )            else                PAC_MSG_ERROR( $enable_softerror, [could NOT determine!] )            fi        fi    fi#   Determmine if MPI_Status_f2c() and MPI_Status_c2f() are there    AC_MSG_CHECKING( [for MPI_Status_c2f() and MPI_Status_f2c()] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, ,                          [[                          MPI_Status        c_status;                          ${MPI_FINT_TYPE}  f_status[ ${mpe_MPI_STATUS_SIZE} ];                          int ierr;                          ]],                          [                          ierr=MPI_Status_c2f( &c_status, f_status ) ;                          ierr=MPI_Status_f2c( f_status, &c_status ) ;                          ],                          [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    AC_MSG_RESULT($mpe_link_ok)    if test "$mpe_link_ok" = "yes" ; then        AC_DEFINE( HAVE_MPI_STATUS_F2C, 1,                   [Define if MPI_Status_f2c and c2f available] )    fi#   Determmine if MPI_Type_f2c() and MPI_Type_c2f() are there    AC_MSG_CHECKING( [for MPI_Type_c2f() and MPI_Type_f2c()] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, ,                          [ MPI_Datatype type; ${MPI_FINT_TYPE} aa; ],                          [                           aa=MPI_Type_c2f(type) ;                          type=MPI_Type_f2c(aa) ;                          ],                          [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    AC_MSG_RESULT($mpe_link_ok)    if test "$mpe_link_ok" = "yes" ; then        AC_DEFINE( HAVE_MPI_TYPE_F2C, 1,                   [Define if MPI_Type_F2c and c2f available] )    fi#   Determmine if MPI_Group_f2c() and MPI_Group_c2f() are there    AC_MSG_CHECKING( [for MPI_Group_c2f() and MPI_Group_f2c()] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, ,                          [ MPI_Group group; ${MPI_FINT_TYPE} aa; ],                          [                           aa=MPI_Group_c2f(group) ;                          group=MPI_Group_f2c(aa) ;                          ],                          [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    AC_MSG_RESULT($mpe_link_ok)    if test "$mpe_link_ok" = "yes" ; then        AC_DEFINE( HAVE_MPI_GROUP_F2C, 1,                   [Define if MPI_Group_f2c and c2f available] )    fi#   Determmine if MPI_Request_f2c() and MPI_Request_c2f() are there    AC_MSG_CHECKING( [for MPI_Request_c2f() and MPI_Request_f2c()] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, ,                          [ MPI_Request request; ${MPI_FINT_TYPE} aa; ],                          [                           aa=MPI_Request_c2f(request) ;                          request=MPI_Request_f2c(aa) ;                          ],                          [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    AC_MSG_RESULT($mpe_link_ok)    if test "$mpe_link_ok" = "yes" ; then        AC_DEFINE( HAVE_MPI_REQUEST_F2C, 1,                   [Define if MPI_Request_f2c and c2f available] )    fi#   Determmine if MPI_Op_f2c() and MPI_Op_c2f() are there    AC_MSG_CHECKING( [for MPI_Op_c2f() and MPI_Op_f2c()] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, ,                          [ MPI_Op op; ${MPI_FINT_TYPE} aa; ],                          [                           aa=MPI_Op_c2f(op) ;                          op=MPI_Op_f2c(aa) ;                          ],                          [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    AC_MSG_RESULT($mpe_link_ok)    if test "$mpe_link_ok" = "yes" ; then        AC_DEFINE( HAVE_MPI_OP_F2C, 1,                   [Define if MPI_Op_f2c and c2f available] )    fi#   Determmine if MPI_Errhandler_f2c() and MPI_Errhandler_c2f() are there    AC_MSG_CHECKING( [for MPI_Errhandler_c2f() and MPI_Errhandler_f2c()] )    PAC_MPI_LINK_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], $MPI_LIBS, ,                          [ MPI_Errhandler errhandler; ${MPI_FINT_TYPE} aa; ],                          [                           aa=MPI_Errhandler_c2f(errhandler) ;                          errhandler=MPI_Errhandler_f2c(aa) ;                          ],                          [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )    AC_MSG_RESULT($mpe_link_ok)    if test "$mpe_link_ok" = "yes" ; then        AC_DEFINE( HAVE_MPI_ERRHANDLER_F2C, 1,                   [Define if MPI_Errhandler_f2c and c2f available] )    fi#   Determine the Fortran logical values, .TRUE. & .FALSE. in MPI C program    if test "$cross_compiling" = "yes" -o "$cross_compiling" = 1 ; then        AC_MSG_CHECKING( [for the Fortran .TRUE. values in MPI C program] )        if test "X$CROSS_FORTRAN2C_TRUE" != "X" ; then            AC_DEFINE_UNQUOTED( MPE_F77_TRUE_VALUE, $CROSS_FORTRAN2C_TRUE,                                [Define as the value for Fortran logical true] )            AC_MSG_RESULT( [${CROSS_FORTRAN2C_TRUE}] )        else            PAC_MSG_ERROR( $enable_softerror,                           [Undefined CROSS_FORTRAN2C_TRUE! Exiting...] )        fi        AC_MSG_CHECKING( [for the Fortran .FALSE. values in MPI C program] )        if test "X$CROSS_FORTRAN2C_FALSE" != "X" ; then            AC_DEFINE_UNQUOTED( MPE_F77_FALSE_VALUE, $CROSS_FORTRAN2C_FALSE,                               [Define as the value for Fortran logical false] )            AC_MSG_RESULT( [${CROSS_FORTRAN2C_FALSE}] )        else            PAC_MSG_ERROR( $enable_softerror,                           [Undefined CROSS_FORTRAN2C_FALSE! Exiting...] )        fi    else        AC_MSG_CHECKING( [for the Fortran logical values in MPI C program] )        mpe_tmpfile=mpe_f77logicals        PAC_MPI_RUN_F77_FUNC_FROM_C( $F77, $FFLAGS,                                     $MPI_CC, [-I../.. $MPI_CFLAGS],                                     $CC, [$CFLAGS], $LIBS, [      subroutine ftest( itrue, ifalse )      logical itrue, ifalse      itrue  = .TRUE.      ifalse = .FALSE.      return      end                                 ], [/* mpe_conf.h defines the needed F77_NAME_XXX, and is located in -I../.. */#include "mpe_conf.h"#ifdef F77_NAME_UPPER#define ftest_ FTEST#elif defined(F77_NAME_LOWER) || defined(F77_NAME_MIXED)#define ftest_ ftest#endif#include <stdio.h>#include "mpi.h"int main(){    ${MPI_FINT_TYPE} itrue, ifalse;    FILE *mpe_file = fopen( "$mpe_tmpfile", "w" );    if ( ! mpe_file ) exit( 1 );    ftest_( &itrue, &ifalse );    fprintf( mpe_file, "%d %d\n", itrue, ifalse );    fclose( mpe_file );    exit( 0 );}                                     ],                                     [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )        if test "$mpe_run_ok" = "yes" ; then            mpe_f77logicals="`cat ${mpe_tmpfile}`"            true_val="`echo ${mpe_f77logicals} | sed -e 's/ .*//g'`"            false_val="`echo ${mpe_f77logicals} | sed -e 's/.*  *//g'`"            if test -n "$true_val" -a -n "$false_val" ; then                AC_DEFINE_UNQUOTED( MPE_F77_TRUE_VALUE, $true_val,                          [Define as the value for Fortran logical true] )                AC_DEFINE_UNQUOTED( MPE_F77_FALSE_VALUE, $false_val,                          [Define as the value for Fortran logical false] )                AC_MSG_RESULT( [True=$true_val and False=$false_val] )            else                PAC_MSG_ERROR( $enable_softerror, [could NOT determine!] )            fi            rm -f ${mpe_tmpfile}        else            if test "X$CROSS_FORTRAN2C_TRUE" != "X" \                 -a "X$CROSS_FORTRAN2C_FALSE" != "X" ; then                AC_DEFINE_UNQUOTED( MPE_F77_TRUE_VALUE, $CROSS_FORTRAN2C_TRUE,                          [Define as the value for Fortran logical true] )                AC_DEFINE_UNQUOTED( MPE_F77_FALSE_VALUE, $CROSS_FORTRAN2C_FALSE,                          [Define as the value for Fortran logical false] )                AC_MSG_RESULT( [use supplied values: True=$CROSS_FORTRAN2C_TRUE and False=$CROSS_FORTRAN2C_FALSE] )            else                PAC_MSG_ERROR( $enable_softerror, [could NOT determine!] )            fi        fi    fidnl endif test "${F2CMPI_LIBS}" = "-l${F2CMPI_LIBNAME}"dnl         -a "$MPI_IMPL" != "MPICH2" ; thenfiAC_SUBST(MPI_IMPL)AC_SUBST(MPE_BUILD_FORTRAN2C)AC_SUBST(CC)AC_SUBST(CLINKER)AC_SUBST(CFLAGS)AC_SUBST(MPI_CC)AC_SUBST(MPE_CLINKER)AC_SUBST(F77)AC_SUBST(FLINKER)AC_SUBST(FFLAGS)AC_SUBST(MPI_F77)AC_SUBST(MPE_FLINKER)AC_SUBST(FINC_PATH_LEADER)AC_SUBST(FLIB_PATH_LEADER)AC_SUBST(MPI_CFLAGS)AC_SUBST(MPI_FFLAGS)AC_SUBST(MPI_LIBS)AC_SUBST(LOG_LIBNAME)AC_SUBST(TRACE_LIBNAME)AC_SUBST(F2CMPI_LIBNAME)AC_SUBST(PROF_LIBS)AC_SUBST(LOG_LIBS)AC_SUBST(TRACE_LIBS)AC_SUBST(F2CMPI_LIBS)AC_OUTPUT( Makefile src/Makefile test/Makefile \           etc/mpe_f77env.conf etc/mpe_mpilog.conf etc/mpe_mpitrace.conf )

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -