summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1999-11-03 03:16:41 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1999-11-03 03:16:41 (GMT)
commit8685a7fa7c5ba30a7467ed486132150f349bd7ab (patch)
tree26edd5227db8ae0975e74d7d457b6f83965ef78a /configure.in
parent0c6c14d08f23df8509a15e1c645051c6fe016213 (diff)
downloadhdf5-8685a7fa7c5ba30a7467ed486132150f349bd7ab.zip
hdf5-8685a7fa7c5ba30a7467ed486132150f349bd7ab.tar.gz
hdf5-8685a7fa7c5ba30a7467ed486132150f349bd7ab.tar.bz2
[svn-r1811] Purpose:
New feature configure.in: When just --enable-parallel is used, will try to test if MPI and MPI-IO library codes are linkable. If not, try -lmpi and -lmpio as the most commonly used library names for them. Also, set default value for RUNPARALLEL if not set. Now, for systems, like SGI Crays where there are the system supported MPI libraries, "./configure --enable-parallel" would configure correctly. Configure: Derived from configure.in via autoconf. Platform tested: SGI O2K.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in27
1 files changed, 21 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 4fabac4..1c1489e 100644
--- a/configure.in
+++ b/configure.in
@@ -857,9 +857,24 @@ case "X-$enable_parallel" in
X-yes)
# We want to compile a parallel library with a compiler that
- # already knows how to link with MPI and MPI-IO.
+ # may already know how to link with MPI and MPI-IO.
AC_MSG_RESULT(provided by compiler)
PARALLEL=yes
+
+ # Try link a simple MPI program. If fail, try again with -lmpi.
+ AC_TRY_LINK(,MPI_Init(),,AC_CHECK_LIB(mpi,MPI_Init,,PARALLEL=no))
+
+ # Then try link a simple MPI-IO program. If fail, try again with
+ # -lmpio.
+ if test "yes" = "$PARALLEL"; then
+ AC_TRY_LINK(,MPI_File_open(),,
+ AC_CHECK_LIB(mpio,MPI_File_open,,PARALLEL=no))
+ fi
+
+ # Set RUNPARALLEL to mpirun if not set yet.
+ if test "yes" = "$PARALLEL" -a "X-" = "X-$RUNPARALLEL"; then
+ RUNPARALLEL="mpirun -np \$\${NPROCS:=2}"
+ fi
;;
X-mpich)
@@ -906,11 +921,11 @@ if test "X-" != "X-$PARALLEL"; then
AC_MSG_RESULT($RUNPARALLEL)
# Check that we can link a simple MPI and MPI-IO application
-dnl AC_MSG_CHECKING(whether a simple MPI-IO program can be linked)
-dnl AC_TRY_LINK(,[MPI_Init();MPI_File_open();],
-dnl AC_MSG_RESULT(yes),
-dnl AC_MSG_RESULT(no)
-dnl AC_MSG_ERROR('unable to link a simple MPI-IO application'))
+ AC_MSG_CHECKING(whether a simple MPI-IO program can be linked)
+ AC_TRY_LINK(,[MPI_Init();MPI_File_open();],
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR('unable to link a simple MPI-IO application'))
# There *must* be some way to run in parallel even if it's just the