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

📄 configure.in

📁 mpi并行计算的c++代码 可用vc或gcc编译通过 可以用来搭建并行计算试验环境
💻 IN
📖 第 1 页 / 共 4 页
字号:
AC_CHECK_HEADERS(sys/types.h sys/statvfs.h sys/vfs.h)AC_CHECK_FUNCS(statvfs,    AC_DEFINE(HAVE_STATVFS, 1, Define if statvfs function is present)    AC_MSG_CHECKING([for f_basetype member of statvfs structure])    AC_TRY_COMPILE([	#ifdef HAVE_SYS_TYPES_H	#include <sys/types.h>	#endif        #ifdef HAVE_SYS_VFS_H        #include <sys/vfs.h>        #endif	#ifdef HAVE_SYS_STATVFS_H	#include <sys/statvfs.h>	#endif	], [	struct statvfs foo;	foo.f_basetype = NULL;	],	AC_MSG_RESULT(yes)	AC_DEFINE(ROMIO_HAVE_STRUCT_STATVFS_WITH_F_BASETYPE, 1, defined if struct statvfs has a f_basetype member),	AC_MSG_RESULT(no)    ))## Check for large file support.  Make sure that we can use the off64_t # type (in some cases, it is an array, and the ROMIO code isn't prepared for# that).#AC_CHECK_HEADERS(unistd.h)if test "$ac_cv_header_unistd_h" = "yes" ; then    AC_CACHE_CHECK([for large file defines],ac_cv_has_large_file_defines,[    AC_TRY_COMPILE([#include <unistd.h>        ], [        #ifndef _LFS64_LARGEFILE        #error no largefile defines        #endif        ],ac_cv_has_large_file_defines=yes,ac_cv_has_large_file_defines=no)])    if test "$ac_cv_has_large_file_defines" = "yes" ; then        # See if we can use them    AC_CACHE_CHECK([whether off64_t is an scalar type],ac_cv_off64_t_scalar,[    AC_TRY_COMPILE([#define _LARGEFILE64_SOURCE#define _FILE_OFFSET_BITS 64#include <sys/types.h>#include <unistd.h>],[off64_t a = 3;],ac_cv_off64_t_scalar=yes,ac_cv_off64_t_scalar=no)])        if test "$ac_cv_off64_t_scalar" = "yes" ; then            CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"        fi    fifi##################################################################### We're about to mess with CC etc.  No more feature tests past here,# because we may set CC to something that does not yet exist!####################################################################if test -n "$mpi_mpich"; then   if test -z "$arch_SX4" ; then      MPIOF_H_INCLUDED=1   fi   if test "$FROM_MPICH2" = no; then      AC_DEFINE(NEEDS_MPI_TEST,1,[Define if mpi_test needed])      AC_DEFINE(MPICH,1,[Define if using MPICH])   fifiif test -n "$mpi_sgi"; then   AC_DEFINE(MPISGI,1,[Define if SGI MPI])fiif test -n "$mpi_lam"; then   AC_DEFINE(MPILAM,1,[Define if using LAM/MPI])fiif test -n "$mpi_hp"; then   AC_DEFINE(MPIHP,1,[Define if using HP MPI])   if test "$NOF77" = 0; then      PAC_CHECK_MPIOF_H   fifi#AC_CHECK_FUNCS(strerror)if test -z "$srcdir" -o "$srcdir" = "." ; then srcdir="$ROMIO_HOME" ; fiAC_SUBST(srcdir)# The master_top_srcdir is the location of the source for the building# package.  This is used only as part of the MPICH2 build, including # the documentation targets mandoc, htmldoc, and latexdocif test -z "$master_top_srcdir" ; then    if test "$FROM_MPICH2" = yes ; then        AC_MSG_WARN([Could not determine master_top_srcdir])    fifiAC_SUBST(master_top_srcdir)## Get the master builddir (which may be imported from above)if test -z "$master_top_builddir" ; then    master_top_builddir=`pwd`fiexport master_top_builddirAC_SUBST(master_top_builddir)# Make sure the alternate spelling is used until we clean up all of the codemaster_topbuild_dir=$master_top_builddirexport master_topbuild_dirAC_SUBST(master_topbuild_dir)# The following definitions are needed within adio/common/status_setb.cif test "$FROM_MPICH" = yes ; then   AC_DEFINE(MPICH,1,[Define if compiling within MPICH])elif test "$FROM_MPICH2" = yes ; then    AC_DEFINE(ROMIO_INSIDE_MPICH2,1,[Define if compiling within MPICH2])elif test "$FROM_MPILAM" = yes ; then   AC_DEFINE(MPILAM,1,[Define if compiling within LAM/MPI])fiif test "$FROM_MPICH2" = no -a "$FROM_MPICH" = no ; then     if test -z "$LIBNAME"; then        LIBNAME="$top_build_dir/lib/libmpio.a"    fi    #    if test ! -d $top_build_dir/lib ; then         mkdir $top_build_dir/lib    fielse    MPILIBNAME=${MPILIBNAME:-mpich}    if test -z "$LIBNAME" ; then        if test -d "$master_top_builddir/lib" ; then            LIBNAME=$master_top_builddir/lib/lib${MPILIBNAME}.a        else            LIBNAME="$ROMIO_HOME/lib${MPILIBNAME}.a"	fi    fifiif test "$FROM_MPICH2" != no ; then    # use the error handlers from MPICH2    MPIO_EXTRA_OBJECTS=    MPIO_EXTRA_TMP_POBJECTS=    MPIO_EXTRA_REAL_POBJECTS=    # Use generalized request to get the multiple-completion routines    MPIO_REQOBJECTS=    MPIO_REQ_TMP_POBJECTS=    MPIO_REQ_REAL_POBJECTS=fiAC_SUBST(MPIO_EXTRA_OBJECTS)AC_SUBST(MPIO_EXTRA_TMP_POBJECTS)AC_SUBST(MPIO_EXTRA_REAL_POBJECTS)AC_SUBST(MPIO_REQOBJECTS)AC_SUBST(MPIO_REQ_TMP_POBJECTS)AC_SUBST(MPIO_REQ_REAL_POBJECTS)## Use DOCTEXT instead of doctextAC_CHECK_PROGS(DOCTEXT,doctext,true)AC_SUBST(DOCTEXT)#if test $NOF77 = 1 ; then   F77=":"else   FORTRAN_TEST="fperf fcoll_test fmisc pfcoll_test" fi#if test $WITHIN_KNOWN_MPI_IMPL = no ; then   PAC_TEST_MPI   PAC_NEEDS_FINTelse   NEEDS_MPI_FINT=""fi#if test "$MPI_INCLUDE_DIR" = "." ; then   ROMIO_INCLUDE="-I../include"else    ROMIO_INCLUDE="-I../include -I$MPI_INCLUDE_DIR"fi#TEST_LIBNAME=$LIBNAMEMPIRUN=mpirun## if MPICH, use mpicc in test programs#if test "$FROM_MPICH" = yes ; then   MPICH_HOME=`dirname $ROMIO_HOME`   if test -z "$MPI_BIN_DIR" ; then MPI_BIN_DIR=$MPICH_HOME/bin ; fi   TEST_CC=$MPI_BIN_DIR/mpicc   MPI_LIB=""   ROMIO_INCLUDE=""   USER_CFLAGS=""   USER_FFLAGS=""   TEST_LIBNAME=""   MPIRUN=$MPI_BIN_DIR/mpirun   if test -n "$arch_SX4" || test -n "$arch_hpux" ; then      TEST_F77=$MPI_BIN_DIR/mpif90   else      TEST_F77=$MPI_BIN_DIR/mpif77   fi   CC=$MPI_BIN_DIR/mpicc   # A later test will insert the mpi2-other/info and array directories based   # on the value of BUILD_MPI_xxxx.  This lets MPICH2 turn these off,   # since MPICH2 provides these routines elsewhere   EXTRA_DIRS="mpi-io/fortran"   # Some older implementations of the ADI do not include the    # MPID_Status_set_bytes routine.   This uses either the    # environment variable ADI3_WITHOUT_SET_BYTES or the   # with arg --without-setbytes   if test "$ADI2_WITHOUT_SET_BYTES" != yes -a \           "$with_setbytes" != no ; then       AC_DEFINE(HAVE_STATUS_SET_BYTES,1,[Define if have MPIR_Status_set_bytes])   fielif test $FROM_LAM = yes ; then   # LAM does have the status set bytes functionality   AC_DEFINE(HAVE_STATUS_SET_BYTES,1,[Define if have MPIR_Status_set_bytes])           # Used in the tests/ subdirectory for after ROMIO is built   TEST_CC=mpicc   TEST_F77=mpif77   MPIRUN=mpirun    MPI_LIB=   ROMIO_INCLUDE=   USER_CFLAGS=   USER_FFLAGS=   TEST_LIBNAME=   EXTRA_DIRS="mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran"elif test $FROM_MPICH2 = yes ; then   # For now, separate the mpich2 from mpich cases   MPICH_HOME=`dirname $ROMIO_HOME`   MPICH_HOME=`dirname $MPICH_HOME`   MPICH_HOME=`dirname $MPICH_HOME`   if test -z "$MPI_BIN_DIR" ; then MPI_BIN_DIR=$MPICH_HOME/bin ; fi   # No special compiler script.   # BUT we need the include paths   # CC="$CC -I${use_top_srcdir}/src/include -I${top_build_dir}/src/include"   # TEST_CC="$CC"   # MPI_LIB="$LIBNAME"   # To allow ROMIO to work with the LIBTOOL scripts, we want to    # work directly with the CC, not the mpicc, compiler.   # Note that in the "FROM_MPICH2" case, the CPPFLAGS and INCLUDES are already   # properly set   #CC=${top_build_dir}/bin/mpicc   #   # set the compilers to the ones in MPICH2 bin directory (master_top_builddir/bin)   TEST_CC=${master_top_builddir}/bin/mpicc   TEST_F77=${master_top_builddir}/bin/mpif77   ROMIO_INCLUDE=""   USER_CFLAGS=""   USER_FFLAGS=""   TEST_LIBNAME=""   MPIRUN=${master_top_builddir}/bin/mpiexec   #   # Turn off the building of the Fortran interface and the Info routines   EXTRA_DIRS=""   AC_DEFINE(HAVE_STATUS_SET_BYTES,1,[Define if status_set_bytes available])   DEFINE_HAVE_MPI_GREQUEST="#define HAVE_MPI_GREQUEST"fi### feature tests:  we can't test features if building as part of MPICH because# we don't yet have an implementation against which we can test#if test $WITHIN_KNOWN_MPI_IMPL = no ; then   PAC_TEST_MPIR_STATUS_SET_BYTES   PAC_TEST_MPI_GREQUEST   AC_DEFINE(PRINT_ERR_MSG,1,[Define for printing error messages])fi#if test -z "$TEST_CC" ; then   TEST_CC="$CC"fiif test -z "$TEST_F77" ; then   TEST_F77="$F77"fi#AC_CHECK_FUNCS(strdup)if test "$ac_cv_func_strdup" = "yes" ; then    # Do we need to declare strdup?    PAC_FUNC_NEEDS_DECL([#include <string.h>],strdup)fiAC_CHECK_FUNCS(snprintf)if test "$ac_cv_func_snprintf" = "yes" ; then    # Do we need to declare snprintf?    PAC_FUNC_NEEDS_DECL([#include <stdio.h>],snprintf)fiAC_CHECK_FUNCS(lstat)if test "$ac_cv_func_lstat" = "yes" ; then    # Do we need to declare lstat?    PAC_FUNC_NEEDS_DECL([#include <unistd.h>],lstat)fiAC_CHECK_FUNCS(readlink)if test "$ac_cv_func_readlink" = "yes" ; then    # Do we need to declare readlink?    PAC_FUNC_NEEDS_DECL([#include <unistd.h>],readlink)fiAC_CHECK_FUNCS(fsync)if test "$ac_cv_func_fsync" = "yes" ; then    # Do we need to declare fsync?    PAC_FUNC_NEEDS_DECL([#include <unistd.h>],fsync)fiAC_CHECK_FUNCS(ftruncate)if test "$ac_cv_func_ftruncate" = "yes" ; then    # Do we need to declare ftruncate?    PAC_FUNC_NEEDS_DECL([#include <unistd.h>],ftruncate)fi## Create the directory lists for the MakefileFILE_SYS_DIRS=""for dir in $FILE_SYSTEM ; do    FILE_SYS_DIRS="$FILE_SYS_DIRS adio/ad_$dir"doneEXTRA_SRC_DIRS=""GLUE_DIR=""if test "$FROM_MPICH2" = yes -o "${MPI}_mpi" = "mpich2_mpi"; then    GLUE_DIR="mpi-io/glue/mpich2"elif test "$FROM_MPICH" = yes -o "${MPI}_mpi" = "mpich_mpi"; then    GLUE_DIR="mpi-io/glue/mpich1"else    GLUE_DIR="mpi-io/glue/default"fiif test "$BUILD_MPI_INFO" = 1 ; then    EXTRA_SRC_DIRS="$EXTRA_SRC_DIRS mpi2-other/info"    if test "$NOF77" = 0 -a "$FROM_MPICH2" != yes ; then        EXTRA_SRC_DIRS="$EXTRA_SRC_DIRS mpi2-other/info/fortran"    fifiif test "$BUILD_MPI_ARRAY" = 1 ; then    EXTRA_SRC_DIRS="$EXTRA_SRC_DIRS mpi2-other/array"    if test "$NOF77" = 0 -a "$FROM_MPICH2" != yes ; then        EXTRA_SRC_DIRS="$EXTRA_SRC_DIRS mpi2-other/array/fortran"    fifiif test "$NOF77" = 0 -a "$FROM_MPICH2" != yes ; then   EXTRA_SRC_DIRS="$EXTRA_SRC_DIRS mpi-io/fortran"fiAC_SUBST(EXTRA_SRC_DIRS)AC_SUBST(FILE_SYS_DIRS)AC_SUBST(GLUE_DIR)#CFLAGS="$CFLAGS -DHAVE_ROMIOCONF_H"#if test -n "$MPIOF_H_INCLUDED"; then   F77MPIOINC=""else    F77MPIOINC="include 'mpiof.h'"fiPAC_C_RESTRICTPAC_C_GNU_ATTRIBUTEecho "setting CC to $CC"echo "setting F77 to $F77"echo "setting TEST_CC to $TEST_CC"echo "setting TEST_F77 to $TEST_F77"echo "setting CFLAGS to $CFLAGS"echo "setting USER_CFLAGS to $USER_CFLAGS"echo "setting USER_FFLAGS to $USER_FFLAGS"#VPATH='VPATH = .:${srcdir}'AC_SUBST(VPATH)AC_SUBST(ARCH)AC_SUBST(FILE_SYSTEM)AC_SUBST(CC)AC_SUBST(CPPFLAGS)AC_SUBST(CFLAGS)AC_SUBST(USER_CFLAGS)AC_SUBST(USER_FFLAGS)AC_SUBST(MIPS)AC_SUBST(BITS)AC_SUBST(MPI)AC_SUBST(AR)AC_SUBST(RANLIB)AC_SUBST(MPI_INCLUDE_DIR)AC_SUBST(MPI_LIB)AC_SUBST(F77)AC_SUBST(NOF77)AC_SUBST(NOPROFILE)AC_SUBST(MAKE)AC_SUBST(arch_IRIX)AC_SUBST(ROMIO_HOME)AC_SUBST(LIBNAME)AC_SUBST(TEST_LIBNAME)AC_SUBST(LL)AC_SUBST(F77GETARG)AC_SUBST(F77IARGC)AC_SUBST(F77MPIOINC)AC_SUBST(FTESTDEFINE)AC_SUBST(FORTRAN_MPI_OFFSET)AC_SUBST(FROM_MPICH)AC_SUBST(FROM_MPICH2)AC_SUBST(FROM_LAM)AC_SUBST(WITHIN_KNOWN_MPI_IMPL)AC_SUBST(NEEDS_MPI_FINT)AC_SUBST(HAVE_MPI_INFO)AC_SUBST(BUILD_MPI_INFO)AC_SUBST(HAVE_MPI_DARRAY_SUBARRAY)AC_SUBST(BUILD_MPI_ARRAY)AC_SUBST(DEFINE_MPI_OFFSET)AC_SUBST(DEFINE_HAVE_MPI_GREQUEST)AC_SUBST(MPI_OFFSET_TYPE)AC_SUBST(MPI_FINFO1)AC_SUBST(MPI_FINFO2)AC_SUBST(MPI_FINFO3)AC_SUBST(MPI_FINFO4)AC_SUBST(MPI_FARRAY1)AC_SUBST(MPI_FARRAY2)AC_SUBST(MPI_FARRAY3)AC_SUBST(MPI_FARRAY4)AC_SUBST(MPI_FARRAY5)AC_SUBST(MPI_FARRAY6)AC_SUBST(MPI_FARRAY7)AC_SUBST(MPI_OFFSET_KIND1)AC_SUBST(MPI_OFFSET_KIND2)AC_SUBST(MPIO_REQOBJECTS)AC_SUBST(TEST_CC)AC_SUBST(TEST_F77)AC_SUBST(ROMIO_INCLUDE)AC_SUBST(ROMIO_LFLAGS)AC_SUBST(ROMIO_LIBLIST)AC_SUBST(ROMIO_TCFLAGS)AC_SUBST(ROMIO_TCPPFLAGS)AC_SUBST(ROMIO_TFFLAGS)AC_SUBST(MPIRUN)AC_SUBST(FORTRAN_TEST)dnldnl Dependency handlingAC_SUBST(MAKE_DEPEND_C)dnldnl Support shared librariesif test -z "$ENABLE_SHLIB" ; then   ENABLE_SHLIB=nonefiAC_SUBST(ENABLE_SHLIB)AC_SUBST(CC_SHL)AC_SUBST(LIBTOOL)# Remove the .a from the library file name (so that we can use .so or# other appropriate suffix)SHLIBNAME=`echo $LIBNAME | sed 's/\.a//'`AC_SUBST(SHLIBNAME)dnlif test ! -d adio ; then mkdir adio ; fiif test ! -d adio/include ; then mkdir adio/include ; fiif test ! -d mpi2-other ; then mkdir mpi2-other ; fiif test ! -d mpi-io ; then mkdir mpi-io ; fiif test ! -d mpi-io/glue ; then mkdir mpi-io/glue ; fi# # Make sure we remove any configuration file incase there is out-of-date data.# We remove the version in include in case this is a vpath buildrm -f adio/include/romioconf.h ${use_top_srcdir}/src/mpi/romio/adio/include/romioconf.h ${use_top_srcdir}/adio/include/romioconf.h## Create makefiles for all of the adio devices.  Only the ones that # are active will be called by the top level ROMIO makeAC_OUTPUT_COMMANDS([chmod 755 util/romioinstall test/runtests])AC_OUTPUT(Makefile localdefs mpi-io/Makefile mpi2-other/info/Makefile \		   mpi2-other/array/Makefile adio/common/Makefile \		   test/Makefile test/misc.c test/large_file.c \		   test/runtests util/romioinstall include/mpio.h \		   include/mpiof.h \		   adio/ad_nfs/Makefile adio/ad_ufs/Makefile \		   adio/ad_panfs/Makefile \		   adio/ad_xfs/Makefile \		   adio/ad_sfs/Makefile adio/ad_pfs/Makefile \		   adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \		   adio/ad_pvfs2/Makefile \		   adio/ad_gridftp/Makefile \                   mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \                   mpi2-other/array/fortran/Makefile test/fmisc.f \                   test/fcoll_test.f test/pfcoll_test.f test/fperf.f \		   mpi-io/glue/mpich2/Makefile \		   mpi-io/glue/mpich1/Makefile \		   mpi-io/glue/default/Makefile )#rm -f *.oif test $FROM_MPICH = no -a $FROM_MPICH2 = no ; then   AC_MSG_RESULT([Configure done. Now type make.])fidnl PAC_SUBDIR_CACHE_CLEANUPexit 0

⌨️ 快捷键说明

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