From dfb8f2827c72794e4bd153e8c598a0c3c5c12f17 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Sat, 12 May 2007 17:40:50 -0500 Subject: [svn-r13749] Description: Changed it to turn off shared lib optoin if parallel is enabled. It can be turned on explicitly by --enable-shared. Tested platform: kagiso (serial and PP) and smirom (PP). --- configure | 208 +++++++++++++++++++----------------- configure.in | 273 +++++++++++++++++++++++++---------------------- fortran/configure | 147 +++++++++++++------------ fortran/configure.in | 208 +++++++++++++++++++----------------- release_docs/RELEASE.txt | 5 + 5 files changed, 451 insertions(+), 390 deletions(-) diff --git a/configure b/configure index 352ab9c..9ec33de 100755 --- a/configure +++ b/configure @@ -841,6 +841,12 @@ SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA +PARALLEL +RUNSERIAL +RUNPARALLEL +TESTPARALLEL +BUILD_PARALLEL_CONDITIONAL_TRUE +BUILD_PARALLEL_CONDITIONAL_FALSE LN_S ECHO RANLIB @@ -860,12 +866,6 @@ PTHREAD DEBUG_PKG TRACE_API INSTRUMENT_LIBRARY -PARALLEL -RUNSERIAL -RUNPARALLEL -TESTPARALLEL -BUILD_PARALLEL_CONDITIONAL_TRUE -BUILD_PARALLEL_CONDITIONAL_FALSE MPE FILTERS USE_FILTER_SHUFFLE @@ -3453,6 +3453,98 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + + + + + +case "$CC_BASENAME" in + mpicc) + PARALLEL=mpicc + { echo "$as_me:$LINENO: checking for mpirun" >&5 +echo $ECHO_N "checking for mpirun... $ECHO_C" >&6; } + + cmd="`echo $CC | cut -f1 -d' '`" + if (echo $cmd | grep / >/dev/null); then + path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`" + else + for path in `echo $PATH | tr : ' '`; do + if test -x $path/$cmd; then + break + fi + done + fi + + if test -x $path/mpirun; then + { echo "$as_me:$LINENO: result: $path/mpirun" >&5 +echo "${ECHO_T}$path/mpirun" >&6; } + RUNSERIAL="${RUNSERIAL:-none}" + + if test -z "$RUNPARALLEL"; then + RUNPARALLEL="$path/mpirun -np \$\${NPROCS:=3}" + fi + else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } + fi + ;; + + hcc) + PARALLEL=hcc + { echo "$as_me:$LINENO: checking for mpirun_lam or mpirun" >&5 +echo $ECHO_N "checking for mpirun_lam or mpirun... $ECHO_C" >&6; } + + cmd="`echo $CC | cut -f1 -d' '`" + if (echo $cmd | grep / >/dev/null); then + path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`" + else + for path in `echo $PATH | tr : ' '`; do + if test -x $path/$cmd; then + break + fi + done + fi + + if test -x $path/mpirun_lam -o -x $path/mpirun; then + if test -x $path/mpirun_lam; then + cmd=mpirun_lam + else + cmd=mpirun + fi + { echo "$as_me:$LINENO: result: $path/$cmd" >&5 +echo "${ECHO_T}$path/$cmd" >&6; } + RUNSERIAL="${RUNSERIAL:-none}" + if test -z "$RUNPARALLEL"; then + RUNPARALLEL="$path/$cmd -np \$\${NPROCS:=3}" + fi + else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } + fi + ;; + + mpcc|mpcc_r) + PARALLEL="$CC_BASENAME" + ;; + + *) + ;; +esac + +if test "X${enable_shared}" = "X" -a "X${enable_parallel}" = "Xyes"; then + echo ' shared libraries disabled in parallel' + enable_shared="no" +elif test "X${enable_shared}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then + echo ' shared libraries explicitly enabled by user' +elif test "X${enable_shared}" = "X" -a "X${PARALLEL}" != "X"; then + echo ' shared libraries disabled when a parallel compiler is being used' + enable_shared="no" +elif test "X${enable_shared}" = "Xyes" -a "X${PARALLEL}" != "X"; then + echo ' shared libraries explicitly enabled by user' +fi + + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} @@ -5209,7 +5301,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 5212 "configure"' > conftest.$ac_ext + echo '#line 5304 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5766,7 +5858,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:5769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:5861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -7641,7 +7733,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&6;} fi rm -f confcache - - - - - - - -case "$CC_BASENAME" in - mpicc) - PARALLEL=mpicc - { echo "$as_me:$LINENO: checking for mpirun" >&5 -echo $ECHO_N "checking for mpirun... $ECHO_C" >&6; } - - cmd="`echo $CC | cut -f1 -d' '`" - if (echo $cmd | grep / >/dev/null); then - path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`" - else - for path in `echo $PATH | tr : ' '`; do - if test -x $path/$cmd; then - break - fi - done - fi - - if test -x $path/mpirun; then - { echo "$as_me:$LINENO: result: $path/mpirun" >&5 -echo "${ECHO_T}$path/mpirun" >&6; } - RUNSERIAL="${RUNSERIAL:-none}" - - if test -z "$RUNPARALLEL"; then - RUNPARALLEL="$path/mpirun -np \$\${NPROCS:=3}" - fi - else - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } - fi - ;; - - hcc) - PARALLEL=hcc - { echo "$as_me:$LINENO: checking for mpirun_lam or mpirun" >&5 -echo $ECHO_N "checking for mpirun_lam or mpirun... $ECHO_C" >&6; } - - cmd="`echo $CC | cut -f1 -d' '`" - if (echo $cmd | grep / >/dev/null); then - path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`" - else - for path in `echo $PATH | tr : ' '`; do - if test -x $path/$cmd; then - break - fi - done - fi - - if test -x $path/mpirun_lam -o -x $path/mpirun; then - if test -x $path/mpirun_lam; then - cmd=mpirun_lam - else - cmd=mpirun - fi - { echo "$as_me:$LINENO: result: $path/$cmd" >&5 -echo "${ECHO_T}$path/$cmd" >&6; } - RUNSERIAL="${RUNSERIAL:-none}" - if test -z "$RUNPARALLEL"; then - RUNPARALLEL="$path/$cmd -np \$\${NPROCS:=3}" - fi - else - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } - fi - ;; - - mpcc|mpcc_r) - PARALLEL="$CC_BASENAME" - ;; - - *) - ;; -esac - # Check whether --enable-parallel was given. if test "${enable_parallel+set}" = set; then enableval=$enable_parallel; @@ -37504,6 +37516,12 @@ SET_MAKE!$SET_MAKE$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim +PARALLEL!$PARALLEL$ac_delim +RUNSERIAL!$RUNSERIAL$ac_delim +RUNPARALLEL!$RUNPARALLEL$ac_delim +TESTPARALLEL!$TESTPARALLEL$ac_delim +BUILD_PARALLEL_CONDITIONAL_TRUE!$BUILD_PARALLEL_CONDITIONAL_TRUE$ac_delim +BUILD_PARALLEL_CONDITIONAL_FALSE!$BUILD_PARALLEL_CONDITIONAL_FALSE$ac_delim LN_S!$LN_S$ac_delim ECHO!$ECHO$ac_delim RANLIB!$RANLIB$ac_delim @@ -37521,12 +37539,6 @@ SRB!$SRB$ac_delim TESTSRB!$TESTSRB$ac_delim PTHREAD!$PTHREAD$ac_delim DEBUG_PKG!$DEBUG_PKG$ac_delim -TRACE_API!$TRACE_API$ac_delim -INSTRUMENT_LIBRARY!$INSTRUMENT_LIBRARY$ac_delim -PARALLEL!$PARALLEL$ac_delim -RUNSERIAL!$RUNSERIAL$ac_delim -RUNPARALLEL!$RUNPARALLEL$ac_delim -TESTPARALLEL!$TESTPARALLEL$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 88; then @@ -37580,8 +37592,8 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF -BUILD_PARALLEL_CONDITIONAL_TRUE!$BUILD_PARALLEL_CONDITIONAL_TRUE$ac_delim -BUILD_PARALLEL_CONDITIONAL_FALSE!$BUILD_PARALLEL_CONDITIONAL_FALSE$ac_delim +TRACE_API!$TRACE_API$ac_delim +INSTRUMENT_LIBRARY!$INSTRUMENT_LIBRARY$ac_delim MPE!$MPE$ac_delim FILTERS!$FILTERS$ac_delim USE_FILTER_SHUFFLE!$USE_FILTER_SHUFFLE$ac_delim diff --git a/configure.in b/configure.in index ab9edbd..c9ddb39 100644 --- a/configure.in +++ b/configure.in @@ -329,6 +329,150 @@ export AR AC_PROG_MAKE_SET AC_PROG_INSTALL +dnl ---------------------------------------------------------------------- +dnl The following variables are used to distinguish between building a +dnl serial and parallel library. +dnl +dnl HAVE_PARALLEL -- defined in H5config.h if we are building +dnl a parallel library even if configure wasn't +dnl able to find some header file or library that +dnl might be required. This is defined if the +dnl compiler looks like a parallel compiler (e.g., +dnl mpicc or mpcc) or if the user explicitly states +dnl that a parallel library is being built by supplying +dnl the `--enable-parallel' configure switch. +dnl +dnl PARALLEL -- This variable is set to a non-null value if +dnl configure thinks we're compiling a parallel +dnl version of the library. +dnl +dnl RUNSERIAL -- This is a command which will be prepended to +dnl the executable name to run the executable using +dnl a single process. For serial versions of the +dnl library this will normally be empty. For parallel +dnl versions it might be something like `mpirun -np 1'. +dnl The value of this variable is substituted in *.in +dnl files. +dnl +dnl RUNPARALLEL -- This is a command which will be prepended to +dnl the executable name to run the executable on +dnl multiple processors. For the serial library the +dnl value will normally be the empty string. For +dnl parallel library it should be something like +dnl `mpi -np $$NPROCS' where NPROCS will eventually +dnl contain the number of processors on which to run +dnl the executable (the double dollarsigns are to +dnl protect the expansion until make executes the +dnl command). The value of this variable is +dnl substituted in *.in files. +dnl +AC_SUBST([PARALLEL]) +AC_SUBST([RUNSERIAL]) +AC_SUBST([RUNPARALLEL]) +AC_SUBST([TESTPARALLEL]) +AC_SUBST([BUILD_PARALLEL_CONDITIONAL_TRUE]) +AC_SUBST([BUILD_PARALLEL_CONDITIONAL_FALSE]) + +dnl ---------------------------------------------------------------------- +dnl If the compiler is obviously a parallel compiler then we're building +dnl a parallel version of hdf5 and should define HAVE_PARALLEL. Furthermore, +dnl the name of the compiler might tell us how to run the resulting +dnl executable. For `mpicc' the executable should be run with `mpirun' from +dnl the same directory as mpicc if it exists. +dnl +case "$CC_BASENAME" in + mpicc) + dnl The mpich compiler. Use mpirun from the same directory if it + dnl exists. + PARALLEL=mpicc + AC_MSG_CHECKING([for mpirun]) + + dnl Find the path where mpicc is located. + cmd="`echo $CC | cut -f1 -d' '`" + if (echo $cmd | grep / >/dev/null); then + path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`" + else + for path in `echo $PATH | tr : ' '`; do + if test -x $path/$cmd; then + break + fi + done + fi + + dnl Is there an mpirun at that path? + if test -x $path/mpirun; then + AC_MSG_RESULT([$path/mpirun]) + RUNSERIAL="${RUNSERIAL:-none}" + + if test -z "$RUNPARALLEL"; then + RUNPARALLEL="$path/mpirun -np \$\${NPROCS:=3}" + fi + else + AC_MSG_RESULT([none]) + fi + ;; + + hcc) + dnl The LAM compiler. Use mpirun_lam or mpirun from the same directory + dnl if it exists. + PARALLEL=hcc + AC_MSG_CHECKING([for mpirun_lam or mpirun]) + + dnl Find the path where hcc is located + cmd="`echo $CC | cut -f1 -d' '`" + if (echo $cmd | grep / >/dev/null); then + path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`" + else + for path in `echo $PATH | tr : ' '`; do + if test -x $path/$cmd; then + break + fi + done + fi + + dnl Is there an mpirun_lam or mpirun at that path? + if test -x $path/mpirun_lam -o -x $path/mpirun; then + if test -x $path/mpirun_lam; then + cmd=mpirun_lam + else + cmd=mpirun + fi + AC_MSG_RESULT([$path/$cmd]) + RUNSERIAL="${RUNSERIAL:-none}" + if test -z "$RUNPARALLEL"; then + RUNPARALLEL="$path/$cmd -np \$\${NPROCS:=3}" + fi + else + AC_MSG_RESULT([none]) + fi + ;; + + mpcc|mpcc_r) + dnl The IBM compiler + PARALLEL="$CC_BASENAME" + ;; + + *) + dnl Probably not a parallel compiler, but if `--enable-parallel' + dnl is defined below then we're still building a parallel hdf5. + ;; +esac + +dnl ---------------------------------------------------------------------------- +dnl If shared libraries are being used with parallel, disable them, unless the +dnl user explicity enables them via the '--enable-shared' option. +if test "X${enable_shared}" = "X" -a "X${enable_parallel}" = "Xyes"; then + echo ' shared libraries disabled in parallel' + enable_shared="no" +elif test "X${enable_shared}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then + echo ' shared libraries explicitly enabled by user' +elif test "X${enable_shared}" = "X" -a "X${PARALLEL}" != "X"; then + echo ' shared libraries disabled when a parallel compiler is being used' + enable_shared="no" +elif test "X${enable_shared}" = "Xyes" -a "X${PARALLEL}" != "X"; then + echo ' shared libraries explicitly enabled by user' +fi + AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL @@ -1764,135 +1908,6 @@ dnl Checkpoint the cache AC_CACHE_SAVE dnl ---------------------------------------------------------------------- -dnl The following variables are used to distinguish between building a -dnl serial and parallel library. -dnl -dnl HAVE_PARALLEL -- defined in H5config.h if we are building -dnl a parallel library even if configure wasn't -dnl able to find some header file or library that -dnl might be required. This is defined if the -dnl compiler looks like a parallel compiler (e.g., -dnl mpicc or mpcc) or if the user explicitly states -dnl that a parallel library is being built by supplying -dnl the `--enable-parallel' configure switch. -dnl -dnl PARALLEL -- This variable is set to a non-null value if -dnl configure thinks we're compiling a parallel -dnl version of the library. -dnl -dnl RUNSERIAL -- This is a command which will be prepended to -dnl the executable name to run the executable using -dnl a single process. For serial versions of the -dnl library this will normally be empty. For parallel -dnl versions it might be something like `mpirun -np 1'. -dnl The value of this variable is substituted in *.in -dnl files. -dnl -dnl RUNPARALLEL -- This is a command which will be prepended to -dnl the executable name to run the executable on -dnl multiple processors. For the serial library the -dnl value will normally be the empty string. For -dnl parallel library it should be something like -dnl `mpi -np $$NPROCS' where NPROCS will eventually -dnl contain the number of processors on which to run -dnl the executable (the double dollarsigns are to -dnl protect the expansion until make executes the -dnl command). The value of this variable is -dnl substituted in *.in files. -dnl -AC_SUBST([PARALLEL]) -AC_SUBST([RUNSERIAL]) -AC_SUBST([RUNPARALLEL]) -AC_SUBST([TESTPARALLEL]) -AC_SUBST([BUILD_PARALLEL_CONDITIONAL_TRUE]) -AC_SUBST([BUILD_PARALLEL_CONDITIONAL_FALSE]) - -dnl ---------------------------------------------------------------------- -dnl If the compiler is obviously a parallel compiler then we're building -dnl a parallel version of hdf5 and should define HAVE_PARALLEL. Furthermore, -dnl the name of the compiler might tell us how to run the resulting -dnl executable. For `mpicc' the executable should be run with `mpirun' from -dnl the same directory as mpicc if it exists. -dnl -case "$CC_BASENAME" in - mpicc) - dnl The mpich compiler. Use mpirun from the same directory if it - dnl exists. - PARALLEL=mpicc - AC_MSG_CHECKING([for mpirun]) - - dnl Find the path where mpicc is located. - cmd="`echo $CC | cut -f1 -d' '`" - if (echo $cmd | grep / >/dev/null); then - path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`" - else - for path in `echo $PATH | tr : ' '`; do - if test -x $path/$cmd; then - break - fi - done - fi - - dnl Is there an mpirun at that path? - if test -x $path/mpirun; then - AC_MSG_RESULT([$path/mpirun]) - RUNSERIAL="${RUNSERIAL:-none}" - - if test -z "$RUNPARALLEL"; then - RUNPARALLEL="$path/mpirun -np \$\${NPROCS:=3}" - fi - else - AC_MSG_RESULT([none]) - fi - ;; - - hcc) - dnl The LAM compiler. Use mpirun_lam or mpirun from the same directory - dnl if it exists. - PARALLEL=hcc - AC_MSG_CHECKING([for mpirun_lam or mpirun]) - - dnl Find the path where hcc is located - cmd="`echo $CC | cut -f1 -d' '`" - if (echo $cmd | grep / >/dev/null); then - path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`" - else - for path in `echo $PATH | tr : ' '`; do - if test -x $path/$cmd; then - break - fi - done - fi - - dnl Is there an mpirun_lam or mpirun at that path? - if test -x $path/mpirun_lam -o -x $path/mpirun; then - if test -x $path/mpirun_lam; then - cmd=mpirun_lam - else - cmd=mpirun - fi - AC_MSG_RESULT([$path/$cmd]) - RUNSERIAL="${RUNSERIAL:-none}" - if test -z "$RUNPARALLEL"; then - RUNPARALLEL="$path/$cmd -np \$\${NPROCS:=3}" - fi - else - AC_MSG_RESULT([none]) - fi - ;; - - mpcc|mpcc_r) - dnl The IBM compiler - PARALLEL="$CC_BASENAME" - ;; - - *) - dnl Probably not a parallel compiler, but if `--enable-parallel' - dnl is defined below then we're still building a parallel hdf5. - ;; -esac - -dnl ---------------------------------------------------------------------- dnl What header files and libraries do we have to look for for parallel dnl support? For the most part, search paths are already specified with dnl CPPFLAGS and LDFLAGS or are known to the compiler. If the user says diff --git a/fortran/configure b/fortran/configure index e798ffa..a74155b 100755 --- a/fortran/configure +++ b/fortran/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From fortran/configure.in Id: configure.in 13739 2007-05-09 15:54:29Z acheng . +# From fortran/configure.in Id: configure.in 13740 2007-05-09 20:55:58Z acheng . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for HDF5 Fortran 1.6.6-snap21. # @@ -847,6 +847,12 @@ SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA +PARALLEL +RUNSERIAL +RUNPARALLEL +TESTPARALLEL +BUILD_PARALLEL_CONDITIONAL_TRUE +BUILD_PARALLEL_CONDITIONAL_FALSE LN_S ECHO RANLIB @@ -860,12 +866,6 @@ LT_STATIC_EXEC F9X F9XMODFLAG F9XMODEXT -PARALLEL -RUNSERIAL -RUNPARALLEL -TESTPARALLEL -BUILD_PARALLEL_CONDITIONAL_TRUE -BUILD_PARALLEL_CONDITIONAL_FALSE FILTERS MPE ADD_PARALLEL_FILES @@ -3430,6 +3430,66 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + + + + + + + + +case "$F9X" in + *mpif90*) + PARALLEL=mpif90 + { echo "$as_me:$LINENO: checking for mpirun" >&5 +echo $ECHO_N "checking for mpirun... $ECHO_C" >&6; } + + cmd=`echo $F9X |cut -f1 -d' '` + if (echo $cmd |grep / >/dev/null); then + path="`echo $cmd |sed 's/\(.*\)\/.*$/\1/'`" + else + for path in `echo $PATH |tr : ' '`; do + if test -x $path/$cmd; then + break; + fi + done + fi + + if test -x $path/mpirun; then + { echo "$as_me:$LINENO: result: $path/mpirun" >&5 +echo "${ECHO_T}$path/mpirun" >&6; } + RUNSERIAL="${RUNSERIAL:-none}" + + if test -z "$RUNPARALLEL"; then + RUNPARALLEL="$path/mpirun -np \$\${NPROCS:=2}" + fi + else + { echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6; } + fi + ;; + + *mpxlf* | *mpxlf_r* | *mpxlf90* | *mpxlf90_r* | *mpxlf95* | *mpxlf95_r*) + PARALLEL="$F9X" + ;; + + *) + ;; +esac + +if test "X${enable_shared}" = "X" -a "X${enable_parallel}" = "Xyes"; then + echo ' shared libraries disabled in parallel' + enable_shared="no" +elif test "X${enable_shared}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then + echo ' shared libraries explicitly enabled by user' +elif test "X${enable_shared}" = "X" -a "X${PARALLEL}" != "X"; then + echo ' shared libraries disabled when a parallel compiler is being used' + enable_shared="no" +elif test "X${enable_shared}" = "Xyes" -a "X${PARALLEL}" != "X"; then + echo ' shared libraries explicitly enabled by user' +fi + # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} @@ -4956,7 +5016,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4959 "configure"' > conftest.$ac_ext + echo '#line 5019 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5513,7 +5573,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:5516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:5576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -7388,7 +7448,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 -echo $ECHO_N "checking for mpirun... $ECHO_C" >&6; } - - cmd=`echo $F9X |cut -f1 -d' '` - if (echo $cmd |grep / >/dev/null); then - path="`echo $cmd |sed 's/\(.*\)\/.*$/\1/'`" - else - for path in `echo $PATH |tr : ' '`; do - if test -x $path/$cmd; then - break; - fi - done - fi - - if test -x $path/mpirun; then - { echo "$as_me:$LINENO: result: $path/mpirun" >&5 -echo "${ECHO_T}$path/mpirun" >&6; } - RUNSERIAL="${RUNSERIAL:-none}" - - if test -z "$RUNPARALLEL"; then - RUNPARALLEL="$path/mpirun -np \$\${NPROCS:=2}" - fi - else - { echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6; } - fi - ;; - - *mpxlf* | *mpxlf_r* | *mpxlf90* | *mpxlf90_r* | *mpxlf95* | *mpxlf95_r*) - PARALLEL="$F9X" - ;; - - *) - ;; -esac - { echo "$as_me:$LINENO: checking for I/O filters" >&5 echo $ECHO_N "checking for I/O filters... $ECHO_C" >&6; } # Check whether --enable-filters was given. @@ -13083,6 +13096,12 @@ SET_MAKE!$SET_MAKE$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim +PARALLEL!$PARALLEL$ac_delim +RUNSERIAL!$RUNSERIAL$ac_delim +RUNPARALLEL!$RUNPARALLEL$ac_delim +TESTPARALLEL!$TESTPARALLEL$ac_delim +BUILD_PARALLEL_CONDITIONAL_TRUE!$BUILD_PARALLEL_CONDITIONAL_TRUE$ac_delim +BUILD_PARALLEL_CONDITIONAL_FALSE!$BUILD_PARALLEL_CONDITIONAL_FALSE$ac_delim LN_S!$LN_S$ac_delim ECHO!$ECHO$ac_delim RANLIB!$RANLIB$ac_delim @@ -13093,12 +13112,6 @@ LIBTOOL!$LIBTOOL$ac_delim PERL!$PERL$ac_delim AR!$AR$ac_delim LT_STATIC_EXEC!$LT_STATIC_EXEC$ac_delim -F9X!$F9X$ac_delim -F9XMODFLAG!$F9XMODFLAG$ac_delim -F9XMODEXT!$F9XMODEXT$ac_delim -PARALLEL!$PARALLEL$ac_delim -RUNSERIAL!$RUNSERIAL$ac_delim -RUNPARALLEL!$RUNPARALLEL$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 88; then @@ -13152,9 +13165,9 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF -TESTPARALLEL!$TESTPARALLEL$ac_delim -BUILD_PARALLEL_CONDITIONAL_TRUE!$BUILD_PARALLEL_CONDITIONAL_TRUE$ac_delim -BUILD_PARALLEL_CONDITIONAL_FALSE!$BUILD_PARALLEL_CONDITIONAL_FALSE$ac_delim +F9X!$F9X$ac_delim +F9XMODFLAG!$F9XMODFLAG$ac_delim +F9XMODEXT!$F9XMODEXT$ac_delim FILTERS!$FILTERS$ac_delim MPE!$MPE$ac_delim ADD_PARALLEL_FILES!$ADD_PARALLEL_FILES$ac_delim diff --git a/fortran/configure.in b/fortran/configure.in index de6a6ab..e0ca688 100644 --- a/fortran/configure.in +++ b/fortran/configure.in @@ -190,6 +190,118 @@ AC_PROG_CPP dnl this is checked for when AC_HEADER_STDC is done CC_BASENAME="`echo $CC |cut -f1 -d' ' |xargs basename 2>/dev/null`" AC_PROG_MAKE_SET AC_PROG_INSTALL + +dnl ---------------------------------------------------------------------- +dnl The following variables are used to distinguish between building a +dnl serial and parallel library. +dnl +dnl HAVE_PARALLEL -- defined in H5config.h if we are building +dnl a parallel library even if configure wasn't +dnl able to find some header file or library that +dnl might be required. This is defined if the +dnl compiler looks like a parallel compiler (e.g., +dnl mpif90 or mpf90) or if the user explicitly states +dnl that a parallel library is being built by supplying +dnl the `--enable-parallel' configure switch. +dnl +dnl PARALLEL -- This variable is set to a non-null value if +dnl configure thinks we're compiling a parallel +dnl version of the library. +dnl +dnl RUNSERIAL -- This is a command which will be prepended to +dnl the executable name to run the executable using +dnl a single process. For serial versions of the +dnl library this will normally be empty. For parallel +dnl versions it might be something like `mpirun -np 1'. +dnl The value of this variable is substituted in *.in +dnl files. +dnl +dnl RUNPARALLEL -- This is a command which will be prepended to +dnl the executable name to run the executable on +dnl multiple processors. For the serial library the +dnl value will normally be the empty string. For +dnl parallel library it should be something like +dnl `mpi -np $$NPROCS' where NPROCS will eventually +dnl contain the number of processors on which to run +dnl the executable (the double dollarsigns are to +dnl protect the expansion until make executes the +dnl command). The value of this variable is +dnl substituted in *.in files. +dnl +AC_SUBST(PARALLEL) +AC_SUBST(RUNSERIAL) +AC_SUBST(RUNPARALLEL) +AC_SUBST(TESTPARALLEL) +AC_SUBST(BUILD_PARALLEL_CONDITIONAL_TRUE) +AC_SUBST(BUILD_PARALLEL_CONDITIONAL_FALSE) + +dnl variables related to conditions of parallel build. + +dnl ---------------------------------------------------------------------- +dnl If the compiler is obviously a parallel compiler then we're building +dnl a parallel version of hdf5 and should define HAVE_PARALLEL. Furthermore, +dnl the name of the compiler might tell us how to run the resulting +dnl executable. For `mpif90' the executable should be run with `mpirun' +dnl from the same directory as mpif90 if it exists. +dnl +case "$F9X" in + *mpif90*) + dnl The mpich compiler. Use mpirun from the same directory if it + dnl exists. + PARALLEL=mpif90 + AC_MSG_CHECKING(for mpirun) + + dnl Find the path where mpif90 is located. + cmd=`echo $F9X |cut -f1 -d' '` + if (echo $cmd |grep / >/dev/null); then + path="`echo $cmd |sed 's/\(.*\)\/.*$/\1/'`" + else + for path in `echo $PATH |tr : ' '`; do + if test -x $path/$cmd; then + break; + fi + done + fi + + dnl Is there an mpirun at that path? + if test -x $path/mpirun; then + AC_MSG_RESULT($path/mpirun) + RUNSERIAL="${RUNSERIAL:-none}" + + if test -z "$RUNPARALLEL"; then + RUNPARALLEL="$path/mpirun -np \$\${NPROCS:=2}" + fi + else + AC_MSG_RESULT(none) + fi + ;; + + *mpxlf* | *mpxlf_r* | *mpxlf90* | *mpxlf90_r* | *mpxlf95* | *mpxlf95_r*) + dnl The IBM compiler + PARALLEL="$F9X" + ;; + + *) + dnl Probably not a parallel compiler, but if `--enable-parallel' + dnl is defined below then we're still building a parallel hdf5. + ;; +esac + +dnl ---------------------------------------------------------------------------- +dnl If shared libraries are being used with parallel, disable them, unless the +dnl user explicity enables them via the '--enable-shared' option. +if test "X${enable_shared}" = "X" -a "X${enable_parallel}" = "Xyes"; then + echo ' shared libraries disabled in parallel' + enable_shared="no" +elif test "X${enable_shared}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then + echo ' shared libraries explicitly enabled by user' +elif test "X${enable_shared}" = "X" -a "X${PARALLEL}" != "X"; then + echo ' shared libraries disabled when a parallel compiler is being used' + enable_shared="no" +elif test "X${enable_shared}" = "Xyes" -a "X${PARALLEL}" != "X"; then + echo ' shared libraries explicitly enabled by user' +fi + AM_PROG_LIBTOOL dnl ---------------------------------------------------------------------- @@ -625,102 +737,6 @@ AC_TRY_FCOMPILE([ FFLAGS="$FFLAGS_saved") dnl ---------------------------------------------------------------------- -dnl The following variables are used to distinguish between building a -dnl serial and parallel library. -dnl -dnl HAVE_PARALLEL -- defined in H5config.h if we are building -dnl a parallel library even if configure wasn't -dnl able to find some header file or library that -dnl might be required. This is defined if the -dnl compiler looks like a parallel compiler (e.g., -dnl mpif90 or mpf90) or if the user explicitly states -dnl that a parallel library is being built by supplying -dnl the `--enable-parallel' configure switch. -dnl -dnl PARALLEL -- This variable is set to a non-null value if -dnl configure thinks we're compiling a parallel -dnl version of the library. -dnl -dnl RUNSERIAL -- This is a command which will be prepended to -dnl the executable name to run the executable using -dnl a single process. For serial versions of the -dnl library this will normally be empty. For parallel -dnl versions it might be something like `mpirun -np 1'. -dnl The value of this variable is substituted in *.in -dnl files. -dnl -dnl RUNPARALLEL -- This is a command which will be prepended to -dnl the executable name to run the executable on -dnl multiple processors. For the serial library the -dnl value will normally be the empty string. For -dnl parallel library it should be something like -dnl `mpi -np $$NPROCS' where NPROCS will eventually -dnl contain the number of processors on which to run -dnl the executable (the double dollarsigns are to -dnl protect the expansion until make executes the -dnl command). The value of this variable is -dnl substituted in *.in files. -dnl -AC_SUBST(PARALLEL) -AC_SUBST(RUNSERIAL) -AC_SUBST(RUNPARALLEL) -AC_SUBST(TESTPARALLEL) -AC_SUBST(BUILD_PARALLEL_CONDITIONAL_TRUE) -AC_SUBST(BUILD_PARALLEL_CONDITIONAL_FALSE) - -dnl variables related to conditions of parallel build. - -dnl ---------------------------------------------------------------------- -dnl If the compiler is obviously a parallel compiler then we're building -dnl a parallel version of hdf5 and should define HAVE_PARALLEL. Furthermore, -dnl the name of the compiler might tell us how to run the resulting -dnl executable. For `mpif90' the executable should be run with `mpirun' -dnl from the same directory as mpif90 if it exists. -dnl -case "$F9X" in - *mpif90*) - dnl The mpich compiler. Use mpirun from the same directory if it - dnl exists. - PARALLEL=mpif90 - AC_MSG_CHECKING(for mpirun) - - dnl Find the path where mpif90 is located. - cmd=`echo $F9X |cut -f1 -d' '` - if (echo $cmd |grep / >/dev/null); then - path="`echo $cmd |sed 's/\(.*\)\/.*$/\1/'`" - else - for path in `echo $PATH |tr : ' '`; do - if test -x $path/$cmd; then - break; - fi - done - fi - - dnl Is there an mpirun at that path? - if test -x $path/mpirun; then - AC_MSG_RESULT($path/mpirun) - RUNSERIAL="${RUNSERIAL:-none}" - - if test -z "$RUNPARALLEL"; then - RUNPARALLEL="$path/mpirun -np \$\${NPROCS:=2}" - fi - else - AC_MSG_RESULT(none) - fi - ;; - - *mpxlf* | *mpxlf_r* | *mpxlf90* | *mpxlf90_r* | *mpxlf95* | *mpxlf95_r*) - dnl The IBM compiler - PARALLEL="$F9X" - ;; - - *) - dnl Probably not a parallel compiler, but if `--enable-parallel' - dnl is defined below then we're still building a parallel hdf5. - ;; -esac - -dnl ---------------------------------------------------------------------- dnl Turn on internal I/O filters by setting macros in header files dnl Internal I/O filters are contained entirely within the library and do dnl not depend on external headers or libraries. The shuffle filter is diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 034b1a4..341e7f5 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -151,6 +151,11 @@ Bug Fixes since HDF5-1.6.5 Release Configuration ------------- + - Changed to default to --disable-shared if parallel is enabled. - AKC + 2007/5/12 + - Correct an coding error in configure when it tries to locate the + needed MPI and MPI-IO library for the fortran interface. - AKC + 2007/5/9. - Changed default fortran compiler to g95 when gcc is used. - AKC 2007/2/17. - Configure can now use any tr command. No more need for -- cgit v0.12