From 8ed6e885439d7acd4f68e078b1f3dc221e15fc0b Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 16 Feb 1999 18:07:36 -0500 Subject: [svn-r1070] Updated to do auto-configuration for parallel tests (testpar) too. Also used mpi function calls to test mpi libraries. Tested on O2K platform. --- Makefile.in | 2 +- configure | 43 ++++++++++++++++++++++++++++++------------- configure.in | 10 ++++++++-- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/Makefile.in b/Makefile.in index bb94c74..b063926 100644 --- a/Makefile.in +++ b/Makefile.in @@ -11,7 +11,7 @@ @COMMENCE@ # Subdirectories in build-order -SUBDIRS=src test tools +SUBDIRS=src test tools @TESTPARALLEL@ ############################################################################## # T A R G E T S diff --git a/configure b/configure index dc71978..02eb0ee 100755 --- a/configure +++ b/configure @@ -4091,6 +4091,7 @@ echo "configure:4091: checking for parallel support" >&5; + if test "mpicc" = "$CC_BASENAME" -a "X-" = "X-$PARALLEL"; then PARALLEL=mpio fi @@ -4113,23 +4114,27 @@ case "X-$PARALLEL" in #define HAVE_PARALLEL 1 EOF - echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:4118: checking for main in -lmpi" >&5 -ac_lib_var=`echo mpi'_'main | sed 'y%./+-%__p_%'` + echo $ac_n "checking for MPI_Init in -lmpi""... $ac_c" 1>&6 +echo "configure:4119: checking for MPI_Init in -lmpi" >&5 +ac_lib_var=`echo mpi'_'MPI_Init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lmpi $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4155,23 +4160,28 @@ EOF else echo "$ac_t""no" 1>&6 fi - echo $ac_n "checking for main in -lmpio""... $ac_c" 1>&6 -echo "configure:4160: checking for main in -lmpio" >&5 -ac_lib_var=`echo mpio'_'main | sed 'y%./+-%__p_%'` + + echo $ac_n "checking for MPI_File_open in -lmpio""... $ac_c" 1>&6 +echo "configure:4166: checking for MPI_File_open in -lmpio" >&5 +ac_lib_var=`echo mpio'_'MPI_File_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lmpio $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4197,7 +4207,8 @@ EOF else echo "$ac_t""no" 1>&6 fi - if test "X-" = "X-$RUNSERIAL" -o "X-none" = "X-$RUNSERIAL"; then + + if test "X-" = "X-$RUNSERIAL" -o "X-none" = "X-$RUNSERIAL"; then RUNSERIAL= fi if test "X-" = "X-$RUNPARALLEL"; then @@ -4205,6 +4216,11 @@ fi elif test "X-none" = "X-$RUNPARALLEL"; then RUNPARALLEL= fi + if test "X-" = "X-$TESTPARALLEL"; then + TESTPARALLEL="testpar" + elif test "X-none" = "X-$TESTPARALLEL"; then + TESTPARALLEL= + fi ;; *) @@ -4389,6 +4405,7 @@ s%@H5TOH4@%$H5TOH4%g s%@TESTH5TOH4@%$TESTH5TOH4%g s%@RUNSERIAL@%$RUNSERIAL%g s%@RUNPARALLEL@%$RUNPARALLEL%g +s%@TESTPARALLEL@%$TESTPARALLEL%g /@COMMENCE@/r $COMMENCE s%@COMMENCE@%%g /@CONCLUDE@/r $CONCLUDE diff --git a/configure.in b/configure.in index 7ad5f34..daa070f 100644 --- a/configure.in +++ b/configure.in @@ -488,6 +488,7 @@ AC_ARG_ENABLE(parallel, AC_MSG_CHECKING(for parallel support); AC_SUBST(RUNSERIAL) AC_SUBST(RUNPARALLEL) +AC_SUBST(TESTPARALLEL) if test "mpicc" = "$CC_BASENAME" -a "X-" = "X-$PARALLEL"; then PARALLEL=mpio @@ -508,8 +509,8 @@ case "X-$PARALLEL" in # list also so we don't have to ifdef out the whole file. AC_MSG_RESULT(mpio) AC_DEFINE(HAVE_PARALLEL) - AC_CHECK_LIB(mpi,main) dnl Replace `main' with some function - AC_CHECK_LIB(mpio,main) dnl Replace `main' with some function + AC_CHECK_LIB(mpi,MPI_Init) + AC_CHECK_LIB(mpio,MPI_File_open) if test "X-" = "X-$RUNSERIAL" -o "X-none" = "X-$RUNSERIAL"; then RUNSERIAL= fi @@ -518,6 +519,11 @@ case "X-$PARALLEL" in elif test "X-none" = "X-$RUNPARALLEL"; then RUNPARALLEL= fi + if test "X-" = "X-$TESTPARALLEL"; then + TESTPARALLEL="testpar" + elif test "X-none" = "X-$TESTPARALLEL"; then + TESTPARALLEL= + fi ;; *) -- cgit v0.12