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

📄 configure.in

📁 fortran并行计算包
💻 IN
📖 第 1 页 / 共 5 页
字号:
   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)        AC_MSG_CHECKING([that the compiler correctly implements weak symbols])        # The gcc 3.4.x compiler accepts the pragma weak, but does not        # correctly implement it on systems where the loader doesn't         # support weak symbols (e.g., cygwin).  This is a bug in gcc, but it        # it is one that *we* have to detect.        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 Foo(int);int PFoo(int a) { return a+1;}int main(int argc, char **argv) {return Foo(0);}EOF        if eval $ac_link2 ; then            AC_MSG_RESULT(yes)            has_pragma_weak=1        else             AC_MSG_RESULT(no)            echo "$ac_link2" >> config.log	    echo "Failed program was" >> config.log            cat conftest1.c >>config.log            cat conftest2.c >>config.log            if test -s conftest.out ; then cat conftest.out >> config.log ; fi            has_pragma_weak=0        fi    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"# An attempt to "do the right thing" with as little help from the end-user as# possible:# - if 'with-pvfs2' given, use that to find pvfs2-config.  complain if we#   cannot find it, as this is probably what the user would expect# - if we can find 'pvfs2-config' in our path, we can use it to set CFLAGS,#   LIBS, and LDFLAGS accordingly# - as a fallback, use CFLAGS, LIBS, and LDFLAGS passed in by the user# - don't do any of this if --with-file-system was given and did not include#   'pvfs2': i.e. don't surprise the user with pvfs support.AC_PATH_PROG(PVFS2_CONFIG, pvfs2-config, notfound, [${with_pvfs2}/bin:$PATH])if test $PVFS2_CONFIG != "notfound" ; then	if test -n "${with_pvfs2}" -o -n "${file_system_pvfs2}" ; then		# the user either told us where pvfs is or asked for it in		# --with-file-system (or both)		CFLAGS="$CFLAGS $( $PVFS2_CONFIG --cflags)"		LIBS="$LIBS $( $PVFS2_CONFIG --libs)"		ROMIO_LIBLIST="$ROMIO_LIBLIST $LIBS"		FILE_SYSTEM="pvfs2 $FILE_SYSTEM"		file_system_pvfs2=1	fifiif test "$PVFS2_CONFIG" = "notfound" -a -n "$with_pvfs2" ; then	AC_MSG_ERROR([pvfs2-config not found in $with_pvfs2])fi## Print list of configured file systems## TODO: REMOVE BAD ONES FROM THE LIST SOMEHOW?#AC_MSG_CHECKING([configured file systems])AC_MSG_RESULT([$FILE_SYSTEM])if test -n "$file_system_nfs" ; then    AC_DEFINE(ROMIO_NFS,1,[Define for ROMIO with NFS])    AC_MSG_WARN([File locks may not work with NFS.  See the Installation andusers manual for instructions on testing and if necessary fixing this])fiif test -n "$file_system_panfs"; then    AC_DEFINE(ROMIO_PANFS,1,[Define for ROMIO with PANFS])fiif test -n "$file_system_ufs"; then    AC_DEFINE(ROMIO_UFS,1,[Define for ROMIO with UFS])fiif test -n "$file_system_bgl"; then	    AC_DEFINE(ROMIO_BGL,1,[Define for ROMIO with BGL])fiif test -n "$file_system_bglockless"; then    if test x"$file_system_bgl" = x ; then	    AC_MSG_ERROR("bglockless requested without bgl")    fi    AC_DEFINE(ROMIO_BGLOCKLESS,1,[Define for lock-free ROMIO with BGL])fiif test -n "$file_system_hfs"; then    AC_DEFINE(ROMIO_HFS,1,[Define for ROMIO with HFS])fiif test -n "$file_system_sfs"; then    AC_DEFINE(ROMIO_SFS,1,[Define for ROMIO with SFS])fiif test -n "$file_system_pfs"; then    AC_DEFINE(ROMIO_PFS,1,[Define for ROMIO with PFS])fiif test -n "$file_system_testfs"; then    AC_DEFINE(ROMIO_TESTFS,1,[Define for ROMIO with TESTFS])fiif test -n "$file_system_lustre"; then    AC_DEFINE(ROMIO_LUSTRE,1,[Define for ROMIO with LUSTRE])fiif test -n "$file_system_xfs"; then    AC_DEFINE(ROMIO_XFS,1,[Define for ROMIO with XFS])    # Check for memalign value    AC_CACHE_CHECK([for memory alignment needed for direct I/O],    pac_cv_memalignval,    [    rm -f confmemalignval    rm -f /tmp/romio_tmp.bin    AC_TRY_RUN([#include <stdio.h>#include <unistd.h>#include <fcntl.h>#include <stdio.h>int main(int argc, char **argv) { 	struct dioattr st;	int fd = open("/tmp/romio_tmp.bin", O_RDWR | O_CREAT, 0644);	FILE *f=fopen("confmemalignval","w");	if (fd == -1) exit(1);	if (!f) exit(1);	fcntl(fd, F_DIOINFO, &st);	fprintf( f, "%u\n", st.d_mem);	exit(0);	}	],	pac_cv_memalignval=`cat confmemalignval`,	pac_cv_memalignval="unknown",pac_cv_memalignval="unknown"    )    rm -f confmemalignval    rm -f /tmp/romio_tmp.bin    ])    if test -n "$pac_cv_memalignval" -a "$pac_cv_memalignval" != 0 -a \	"$pac_cv_memalignval" != "unknown" ; then        CFLAGS="$CFLAGS -DXFS_MEMALIGN=$pac_cv_memalignval"    else        AC_MSG_RESULT(assuming 128 for memory alignment)        CFLAGS="$CFLAGS -DXFS_MEMALIGN=128"    fifi## Verify presence of pvfs.h, issue with int64#if test -n "$file_system_pvfs"; then    CPPFLAGS="$CPPFLAGS $CFLAGS"    AC_CHECK_HEADERS(pvfs.h,    	AC_DEFINE(ROMIO_PVFS,1,[Define for ROMIO with PVFS]),	AC_MSG_ERROR([PVFS support requested but cannot find pvfs.h header file])	)    # Check for missing int64_t (intel version 8 compiler and -no-gcc    # selected)    AC_MSG_CHECKING([that pvfs.h can be compiled])    AC_TRY_COMPILE([#include <pvfs.h>        ],[        ],pvfs_header_ok=yes,pvfs_header_ok=no    )    AC_MSG_RESULT($pvfs_header_ok)    if test "$pvfs_header_ok" = no -a "$ac_cv_sizeof_long_long" = 8 ; then        AC_MSG_CHECKING([if pvfs.h can be compiled if we define int64_t])        # Try again, but with int64_t        AC_TRY_COMPILE([            typedef long long int int64_t;#include <pvfs.h>            ],[            ],            pvfs_header_ok="yes with int64 definition"        )        AC_MSG_RESULT($pvfs_header_ok)    fi    if test "$pvfs_header_ok" = "yes with int64 definition" ; then        AC_DEFINE(ROMIO_PVFS_NEEDS_INT64_DEFINITION,1,[Define if int64_t must be defined for PVFS])    fi    if test "$pvfs_header_ok" != "no" ; then        AC_DEFINE(ROMIO_PVFS,1,[Define for ROMIO with PVFS])	AC_DEFINE(HAVE_PVFS_SUPER_MAGIC, 1, [Define if PVFS_SUPER_MAGIC defined.])    else	AC_MSG_WARN(missing or broken pvfs.h header file; disabling ROMIO PVFS support)    fifi## Verify presence of pvfs2.h#if test -n "$file_system_pvfs2"; then    CPPFLAGS="$CPPFLAGS $CFLAGS"    AC_CHECK_HEADERS(pvfs2.h,	AC_DEFINE(ROMIO_PVFS2,1,[Define for ROMIO with PVFS2])	AC_DEFINE(HAVE_PVFS2_SUPER_MAGIC, 1, [Define if PVFS2_SUPER_MAGIC defined.]),        AC_MSG_ERROR([PVFS2 support requested but cannot find pvfs2.h header file])                                            )fi# layout change after pvfs-2.6.3:if test -n "$file_system_pvfs2"; then    AC_COMPILE_IFELSE(       [  #include <stdlib.h>#include "pvfs2.h"          int main(int argc, char **argv) { 	      PVFS_object_ref ref;	      PVFS_sys_attr attr;	      PVFS_sys_create(NULL, ref, attr, NULL, NULL, NULL, NULL); 	  return 0; }       ],       , AC_DEFINE(HAVE_PVFS2_CREATE_WITHOUT_LAYOUT, 1,        		[Define if PVFS_sys_create does not have layout parameter])       )fiif test -n "$file_system_gridftp"; then	AC_DEFINE(ROMIO_GRIDFTP, 1, [Define for ROMIO with gridftp])fiif test -n "$file_system_bgl"; then    SYSDEP_INC=-I${prefix}/includeelse    SYSDEP_INC=## Check for presence and characteristics of async. I/O calls if# not disabled.## Q: Do we need to list some "other libs" to get things to link?#save_libs=$LIBSLIBS=## Some systems need pthreads to get AIO to work.  However, we don't want# to add pthreads just because it is there, as that can cause problems# with some implementations of pthreads and compilers (e.g., gcc version 3# would fail if there was an int a[100000] on the stack if the application# was *linked* with pthreads, but would succeed if the application was# *not linked* with pthreads.#if test "x$disable_aio" = "xno" ; then    foundPTHREAD=no    # Do we have aio_write in aio or rt?    saveLIBS=$LIBS    LIBS=    AC_SEARCH_LIBS(aio_write,aio rt,foundAIO=yes,foundAIO=no)    if test "$foundAIO" = yes ; then        AIOLIBS=$LIBS        LIBS="$saveLIBS $LIBS"    else        LIBS="$saveLIBS"    fi    # If not, try finding pthread_create first, and if found, try the    # test again.    if test "$foundAIO" = no ; then         saveLIBS=$LIBS	LIBS=        AC_SEARCH_LIBS(pthread_create,pthread,foundPTHREAD=yes,	foundPTHREAD=no)        if test "$foundPTHREAD" = yes ; then            AC_SEARCH_LIBS(aio_write,aio rt,foundAIO=yes,foundAIO=no)	    	    if test "$foundAIO" = yes ; then	        AIO_LIBS=$LIBS		LIBS="$saveLIBS $LIBS"	    else                LIBS=$saveLIBS            fi        else	    LIBS=$saveLIBS        fi    fi    if test "$foundAIO" = yes ; then        ROMIO_LIBLIST="$ROMIO_LIBLIST $AIOLIBS"        MPI_LIB="$MPI_LIB $AIOLIBS"	aio_write_found=yes

⌨️ 快捷键说明

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