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

📄 configure.in

📁 mpi并行计算的c++代码 可用vc或gcc编译通过 可以用来搭建并行计算试验环境
💻 IN
📖 第 1 页 / 共 4 页
字号:
        mpi_mpich=1    fifi    #if test -n "$arch_SX4" ; then    have_aio=no    AC_DEFINE(SX4,1,[Define for NEC SX4])    if test -z "$MPI" ; then        MPI=mpich        mpi_mpich=1    fi    if test -z "$FILE_SYSTEM" ; then        file_system_sfs=1        file_system_nfs=1        FILE_SYSTEM="sfs nfs"    fi    MPI_OFFSET_KIND1="      INTEGER MPI_OFFSET_KIND"    MPI_OFFSET_KIND2="      PARAMETER (MPI_OFFSET_KIND=8)"fi#if test -n "$arch_hpux" || test -n "$arch_sppux" ; then    have_aio=no    RANLIB=":"    if test -z "$MPI"; then        if test -f "/opt/mpi/include/mpi.h" ; then            echo "assuming that you want to use ROMIO with HP MPI"            MPI=hp        else             echo "assuming that you want to use ROMIO with MPICH"            MPI=mpich        fi                fi    if test $MPI = "mpich" ; then        mpi_mpich=1        MPI_LIB="$MPI_LIB -lV3"        CC=${CC:-cc -Ae}        F77=${FC:-f77 +U77}    fi    if test $MPI = "hp" ; then        mpi_hp=1        CC=${CC:-mpicc -Ae}        F77=${FC:-mpif77 +U77}    fi    if test $MPI = "lam" && test "$FC" != ""; then        F77="$F77 +U77"    fi    FTESTDEFINE="external iargc, getarg"    if test -n "$arch_hpux" ; then        CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"        AC_DEFINE(HPUX,1,[Define for HPUX])        if test $MPI = "hp" ; then           F77=${FC:-mpif90 +U77}        else           F77=${FC:-f90 +U77}        fi    else        AC_DEFINE(SPPUX,1,[Define for SPPUX (Convex)])    fi    MPI_OFFSET_KIND1="      INTEGER MPI_OFFSET_KIND"    MPI_OFFSET_KIND2="      PARAMETER (MPI_OFFSET_KIND=8)"    if test "$CC" != "gcc" ; then        ROMIO_TCFLAGS="-Ae"    fi    if test "$F77" != "g77" ; then        ROMIO_TFFLAGS="+U77"    fifi#if test -n "$arch_alpha" || test -n "$arch_ALPHA" ; then    if test -z "$MPI" ; then        MPI=mpich        mpi_mpich=1    fi    MPI_OFFSET_KIND1="      INTEGER MPI_OFFSET_KIND"    MPI_OFFSET_KIND2="      PARAMETER (MPI_OFFSET_KIND=8)"    ROMIO_LIBLIST="$ROMIO_LIBLIST -laio"fi    #if test -n "$arch_CRAY" ; then    NOF77=1    FTESTDEFINE="integer ilen"    F77GETARG="call pxfgetarg(i, str, ilen, ierr)"    have_aio=no    RANLIB=":"    AC_DEFINE(CRAY,1,[Define if Cray])    if test -z "$MPI" || test -n "$mpi_sgi" ; then        MPI=cray        mpi_cray=1        mpi_sgi=""# above is to disable configure tests specific to SGI MPI        AC_DEFINE(MPISGI,1,[Define if SGI MPI])        AC_DEFINE(HAVE_MPI_COMBINERS,1,[Define if MPI supports datatype combiners])        AC_DEFINE(NO_MPI_SGI_type_is_contig,1,[Define if no types show contig])    fi#       MPISGI needed because of error in Cray's and SGI's #       MPI_Type_get_contents (does not increment reference count).#       Others needed because MPISGI needed.    MPI_OFFSET_KIND1="      INTEGER MPI_OFFSET_KIND"    MPI_OFFSET_KIND2="      PARAMETER (MPI_OFFSET_KIND=8)"fi#if test -n "$arch_sgi" ; then    arch_IRIX=1    ARCH=IRIXfiif test -n "$arch_IRIX64" || test -n "$arch_IRIX32" || test -n "$arch_IRIXN32" ; then    arch_IRIX=1fiif test -n "$arch_sgi5" ; then    arch_IRIX5=1    ARCH=IRIXfi#PAC_GET_SPECIAL_SYSTEM_INFO## special case 'sgi5' for use on MESHINE which is much like an SGI running# irix 5 with r4400 chips, but does not have 'hinv', so above code doesn't# workif test -n "$arch_sgi5"; then   osversion=5   cputype=4400   IRIXARCH="$ARCH_$osversion"   IRIXARCH="$IRIXARCH_$cputype"# now set arch_IRIX to 1   arch_IRIX=1   echo "IRIX-specific architecture is $IRIXARCH"   AC_DEFINE(IRIX,1,[Define if IRIX])fi#if test -n "$arch_IRIX"; then   if test $osversion = 4 ; then	RANLIB="ar ts"        if test -n "$mpi_sgi"; then            AC_MSG_ERROR([SGI\'s MPI does not work with IRIX 4.x])        fi   elif test $osversion = 5 ; then        if test -n "$mpi_sgi"; then            AC_MSG_ERROR([SGI\'s MPI does not work with IRIX 5.x])        fi   elif test $osversion = 6 ; then	if test -z "$MPI"; then	    if test "$FROM_MPICH2" = "yes" ; then	        # Building with MPICH2.  Distinguish from MPICH-1		MPI=mpich2		mpi_mpich2=1            elif test -f "/usr/include/mpi.h" ; then                AC_MSG_WARN([assuming that you want to use ROMIO with SGI\'s MPI])                MPI=sgi                mpi_sgi=1            else 	        AC_MSG_WARN([assuming that you want to use ROMIO with MPICH])                MPI=mpich                mpi_mpich=1            fi            	fi        RANLIB=":"        AC_DEFINE(AIO_SIGNOTIFY_NONE,1,[Define if no signotify])	if test $cputype -ge 5000 ; then            MIPS=4        else             MIPS=3        fi   fi   if test -n "$mpi_sgi" && test -z "$MPI_LIB" ; then       MPI_LIB="-lmpi"   fi#  check if pread64 is defined   PAC_HAVE_PREAD64#   if test -z "$FILE_SYSTEM" ; then       file_system_nfs=1       FILE_SYSTEM="nfs"       AC_MSG_CHECKING(for xfs)       AC_TRY_COMPILE([#include <aio.h>],[aiocb64_t *t1;],file_system_xfs=1;FILE_SYSTEM="xfs $FILE_SYSTEM";)       if test "$file_system_xfs" = 1 ; then           AC_MSG_RESULT(yes)       else          AC_MSG_RESULT(no)          file_system_ufs=1          FILE_SYSTEM="ufs $FILE_SYSTEM"       fi   fi   AC_DEFINE(IRIX,1,[Define if IRIX])   MPI_OFFSET_KIND1="      INTEGER MPI_OFFSET_KIND"   MPI_OFFSET_KIND2="      PARAMETER (MPI_OFFSET_KIND=8)"fiAC_HAVE_FUNCS(memalign)## Question: Should ROMIO under MPICH2 ignore the Fortran tests, since # MPICH2 provides all of the Fortran interface routines?#if test $NOF77 = 0 ; then    echo "checking Fortran external names"    PAC_GET_FORTNAMES    if test -n "$WDEF" ; then        CFLAGS="$CFLAGS $WDEF"    fi    dnl PAC_PROG_F77_NAME_MANGLE    dnl (need to set the new name format)    rm -f test/mpif.h    if test "$MPI_INCLUDE_DIR" != "." && test $WITHIN_KNOWN_MPI_IMPL = no ; then        if test ! -d test ; then mkdir test ; fi        ln -s $MPI_INCLUDE_DIR/mpif.h test    fielse     F77=":"fi#AC_C_INLINE# Header files# Find the CPP before the header checkAC_PROG_CPPAC_CHECK_HEADERS(unistd.h fcntl.h malloc.h stddef.h)#CROSS_SIZEOF_INT=${CROSS_SIZEOF_INT:-0}CROSS_SIZEOF_VOID_P=${CROSS_SIZEOF_VOID_P:-0}AC_CHECK_SIZEOF(int,$CROSS_SIZEOF_INT)AC_CHECK_SIZEOF(void*,$CROSS_SIZEOF_VOID_P)AC_CACHE_CHECK([for int large enough for pointers],pac_cv_int_hold_pointer,[if test "$ac_cv_sizeof_int" = "0" -o \	"$ac_cv_sizeof_voidp" = "0" ; then    pac_cv_int_hold_pointer=unknownelif test "$ac_cv_sizeof_int" -lt "$ac_cv_sizeof_voidp" ; then    pac_cv_int_hold_pointer=noelse    pac_cv_int_hold_pointer=yesfi])if test "$pac_cv_int_hold_pointer" != yes ; then    AC_DEFINE(INT_LT_POINTER,1,[Define if int smaller than pointer])fi#dnl The original ROMIO configure used a set of complex tests here; thisdnl is a partial reworking using the autoconf2 sizeof macros, and allowingdnl for the standardized CROSS_xxx varaibles for cross-compilation environments# LL is the printf-style format name for output of a MPI_Offset.# We have to match this to the type that we use for MPI_Offset.CROSS_SIZEOF_LONG_LONG=${CROSS_SIZEOF_LONG_LONG:-0}AC_CHECK_SIZEOF(long long,$CROSS_SIZEOF_LONG_LONG)if test "$ac_cv_sizeof_long_long" != 0 ; then    if test "$ac_cv_sizeof_long_long" = "8" ; then       AC_DEFINE(HAVE_LONG_LONG_64,1,[Define if long long is 64 bits])       MPI_OFFSET_TYPE="long long"       DEFINE_MPI_OFFSET="typedef long long MPI_Offset;"       FORTRAN_MPI_OFFSET="integer*8"       LL="lld"    elif test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_int" ; then       MPI_OFFSET_TYPE="int"       DEFINE_MPI_OFFSET="typedef int MPI_Offset;"       FORTRAN_MPI_OFFSET="integer"       AC_DEFINE(MPI_OFFSET_IS_INT,1,[Define if MPI_Offset is int])       LL="d"       MPI_OFFSET_KIND1="!"       MPI_OFFSET_KIND2="!"    else       echo "defining MPI_Offset as long in C and integer in Fortran"        MPI_OFFSET_TYPE="long"       DEFINE_MPI_OFFSET="typedef long MPI_Offset;"       FORTRAN_MPI_OFFSET="integer"       LL="ld"       MPI_OFFSET_KIND1="!"       MPI_OFFSET_KIND2="!"    fielse    echo "defining MPI_Offset as long in C and integer in Fortran"     MPI_OFFSET_TYPE="long"    DEFINE_MPI_OFFSET="typedef long MPI_Offset;"    FORTRAN_MPI_OFFSET="integer"    LL="ld"    MPI_OFFSET_KIND1="!"    MPI_OFFSET_KIND2="!"fi#if test -n "$longlongsize"; then   if test $WITHIN_KNOWN_MPI_IMPL = no ; then       PAC_MPI_LONG_LONG_INT   else       AC_DEFINE(HAVE_MPI_LONG_LONG_INT,1,[Define if supports long long int])   fifi#if test -n "$OFFSET_KIND" -a "A$MPI_OFFSET_KIND1" = "A!" ; then   MPI_OFFSET_KIND1="        INTEGER MPI_OFFSET_KIND"  MPI_OFFSET_KIND2="        PARAMETER (MPI_OFFSET_KIND=$OFFSET_KIND)"else if test "$FORTRAN_MPI_OFFSET" = "integer*8" && test "A$MPI_OFFSET_KIND2" = "A!" && test $NOF77 = 0 && test $NOF90 = 0 ; then   PAC_MPI_OFFSET_KIND fi #  if test "$FORTRAN_MPI_OFFSET" = "integer" && test "A$MPI_OFFSET_KIND2" = "A!" && test $NOF77 = 0 && test $NOF90 = 0 ; then   PAC_MPI_OFFSET_KIND_4BYTE  fifi## check if MPI_Info functions are defined in the MPI implementationif test $WITHIN_KNOWN_MPI_IMPL = no ; then   PAC_MPI_INFOelse   AC_DEFINE(HAVE_MPI_INFO,1,[Define if MPI Info is available])   HAVE_MPI_INFO="#define HAVE_MPI_INFO"   MPI_FINFO1="!"   MPI_FINFO2="!"   MPI_FINFO3="!"   MPI_FINFO4="!"fi   #if test -n "$mpi_sgi"; thendnl   if test -z "$HAVE_MPI_INFO" ; thendnl      PAC_CHECK_MPI_SGI_INFO_NULL  # is MPI_INFO_NULL defined in mpi.h?dnl   fi   PAC_TEST_MPI_SGI_type_is_contig   PAC_TEST_MPI_COMBINERS   PAC_TEST_MPI_HAVE_OFFSET_KINDfi## check if darray and subarray constructors are defined in the MPI # implementation if test $WITHIN_KNOWN_MPI_IMPL = no ; then   PAC_MPI_DARRAY_SUBARRAYfiif test $FROM_MPICH2 = yes ; then   dnl Made this a message instead of a warning because the warning is   dnl likely to confuse users.   AC_MSG_RESULT([Overriding Array test for MPICH2])   unset BUILD_MPI_ARRAY   AC_DEFINE(HAVE_MPI_DARRAY_SUBARRAY,1,[Define if Darray is available])   HAVE_MPI_DARRAY_SUBARRAY="#define HAVE_MPI_DARRAY_SUBARRAY"   MPI_FARRAY1="!"   MPI_FARRAY2="!"   MPI_FARRAY3="!"   MPI_FARRAY4="!"   MPI_FARRAY5="!"   MPI_FARRAY6="!"   MPI_FARRAY7="!"fi   ### Test for weak symbol support...# We can't put # in the message because it causes autoconf to generate# incorrect codeHAVE_WEAK_SYMBOLS=0if test -n "$arch_hpux" || test -n "$arch_sppux" ; then# multiple secondary definitions not allowed by HP compilers# Fortran interface for HP already uses one secondary defn. # therefore, do not use this method for profiling interface.# build profiling interface explicitly.   TRY_WEAK_SYMBOLS=0fiif test $TRY_WEAK_SYMBOLS = 1 ; then  AC_MSG_CHECKING([for weak symbol support])  AC_TRY_LINK([extern int PFoo(int);#pragma weak PFoo = Fooint Foo(int a) { return a; }],[return PFoo(1);],has_pragma_weak=1)  #  # Some systems (Linux ia64 and ecc, for example), support weak symbols  # only within a single object file!  This tests that case.  # Note that there is an extern int PFoo declaration before the  # pragma.  Some compilers require this in order to make the weak symbol  # extenally visible.  if test "$has_pragma_weak" = 1 ; then    AC_MSG_RESULT([pragma weak])    AC_MSG_CHECKING([that weak symbols are visible to other files])    rm -f conftest*    cat >>conftest1.c <<EOFextern int PFoo(int);#pragma weak PFoo = Fooint Foo(int);int Foo(int a) { return a; }EOF    cat >>conftest2.c <<EOFextern int PFoo(int);int main(int argc, char **argv) {return PFoo(0);}EOF    ac_link2='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest1.c conftest2.c $LIBS >conftest.out 2>&1'    if eval $ac_link2 ; then        AC_MSG_RESULT(yes)    else      echo "$ac_link2" 1>&AC_FD_CC      echo "Failed program was" 1>&AC_FD_CC      cat conftest1.c 1>&AC_FD_CC      cat conftest2.c 1>&AC_FD_CC      if test -s conftest.out ; then cat conftest.out 1>&AC_FD_CC ; fi      AC_MSG_RESULT(no)      has_pragma_weak=0    fi    rm -f conftest*  fi  if test "$has_pragma_weak" = 1 ; then    HAVE_WEAK_SYMBOLS=1    AC_DEFINE(HAVE_PRAGMA_WEAK,1,[Define if pragma weak available])  else    AC_TRY_LINK([extern int PFoo(int);#pragma _HP_SECONDARY_DEF Foo PFooint Foo(int a) { return a; }],[return PFoo(1);],has_pragma_hp_secondary=1)    if test "$has_pragma_hp_secondary" = 1 ; then         AC_MSG_RESULT([pragma _HP_SECONDARY_DEF])        HAVE_WEAK_SYMBOLS=1        AC_DEFINE(HAVE_PRAGMA_HP_SEC_DEF,1,[Define for HP weak pragma])    else        AC_TRY_LINK([extern int PFoo(int);#pragma _CRI duplicate PFoo as Fooint Foo(int a) { return a; }],[return PFoo(1);],has_pragma_cri_duplicate=1)        if test "$has_pragma_cri_duplicate" = 1 ; then	    AC_MSG_RESULT([pragma _CRI duplicate x as y])	    HAVE_WEAK_SYMBOLS=1	    AC_DEFINE(HAVE_PRAGMA_CRI_DUP,1,[Define for CRAY weak dup])        else                AC_MSG_RESULT(no)        fi    fi  fifiif test "$HAVE_WEAK_SYMBOLS" = 1 ; then    AC_DEFINE(HAVE_WEAK_SYMBOLS,1,[Define if weak symbols available])fiAC_SUBST(HAVE_WEAK_SYMBOLS)## Check whether the MPI Offset type is compatible with struct flockAC_MSG_CHECKING([whether struct flock compatible with MPI_Offset])AC_TRY_COMPILE([#include <fcntl.h>],[struct flock l; $MPI_OFFSET_TYPE a=1; l.l_start = a;  l.l_len   = a;],pac_cv_struct_flock_and_mpi_offset=yes,pac_cv_struct_flock_and_mpi_offset=no)AC_MSG_RESULT($pac_cv_struct_flock_and_mpi_offset)# FIXME: We should look for struct flock64 and the F_SETLK64/F_GETLK64# ADIOI_Set_lock could use these instead.if test "$pac_cv_struct_flock_and_mpi_offset" = no ; then    AC_MSG_CHECKING([whether struct flock compatible with int])    AC_TRY_COMPILE([#include <fcntl.h>],[struct flock l; int a=1; l.l_start = a;  l.l_len   = a;],pac_cv_struct_flock_and_int=yes,pac_cv_struct_flock_and_int=no)    AC_MSG_RESULT($pac_cv_struct_flock_and_int)    if test "$pac_cv_struct_flock_and_int" = yes ; then        AC_DEFINE(NEEDS_INT_CAST_WITH_FLOCK,1,[Define if l_start and l_len data should be cast as int])    fi    # FIXME.  Solaris header files define off_t as a UNION if 64bit file    # sizes are selected.  Gah!fi## if FILE_SYSTEM is not set above, use ufs and nfs as default#if test -z "$FILE_SYSTEM" ; then    file_system_ufs=1    file_system_nfs=1    FILE_SYSTEM="ufs nfs"fi# no matter what, always build testfsfile_system_testfs=1FILE_SYSTEM="testfs $FILE_SYSTEM"## Print list of configured file systems#

⌨️ 快捷键说明

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