diff options
author | Robb Matzke <matzke@llnl.gov> | 1999-03-03 23:17:48 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1999-03-03 23:17:48 (GMT) |
commit | ea3624e133ef35ec9c2c3f816a3afdbfb6b83156 (patch) | |
tree | 8d13c1c600a8ab25da627a64aa61818f00695098 /configure | |
parent | 2925631a496cbd9890e967946b46c974998b13cd (diff) | |
download | hdf5-ea3624e133ef35ec9c2c3f816a3afdbfb6b83156.zip hdf5-ea3624e133ef35ec9c2c3f816a3afdbfb6b83156.tar.gz hdf5-ea3624e133ef35ec9c2c3f816a3afdbfb6b83156.tar.bz2 |
[svn-r1115] Changes since 19990302
----------------------
./INSTALL
./configure.in
./configure [REGENERATED]
./src/H5config.h.in [REGENERATED]
Improvements for parallel library. If you have a properly
working mpicc you should be able to just say:
$ CC=mpicc ./configure
and you will see
checking for mpirun... /usr/local/mpi/bin/mpirun
checking for parallel support files... skipped
checking how to run on one processor...
/usr/local/mpi/bin/mpirun -np 1
checking how to run in parallel...
/usr/local/mpi/bin/mpirun -np $$NPROCS
To quote from the INSTALL file....
*** Parallel vs. serial library
The HDF5 library can be configured to use MPI and MPI-IO for
parallelizm on a distributed multi-processor system. The easy
way to do this is to have a properly installed parallel
compiler (e.g., MPICH's mpicc or IBM's mpcc) and supply that
executable as the value of the CC environment variable:
[NOTE: mpcc is not tested yet]
$ CC=mpcc ./configure
$ CC=/usr/local/mpi/bin/mpicc ./configure
If no such wrapper script is available then you must specify
your normal C compiler along with the distribution of
MPI/MPI-IO which is to be used (values other than `mpich' will
be added at a later date):
$ ./configure --enable-parallel=mpich
If the MPI/MPI-IO include files and/or libraries cannot be
found by the compiler then their directories must be given as
arguments to CPPFLAGS and/or LDFLAGS:
$ CPPFLAGS=-I/usr/local/mpi/include \
LDFLAGS=-L/usr/local/mpi/lib/LINUX/ch_p4 \
./configure --enable-parallel=mpich
If a parallel library is being built then configure attempts
to determine how to run a parallel application on one
processor and on many processors. If the compiler is mpicc
and the user hasn't specified values for RUNSERIAL and
RUNPARALLEL then configure chooses `mpirun' from the same
directory as `mpicc':
RUNSERIAL: /usr/local/mpi/bin/mpirun -np 1
RUNPARALLEL: /usr/local/mpi/bin/mpirun -np $${NPROCS:=2}
The `$${NPROCS:=2}' will be substituted with the value of the
NPROCS environment variable at the time `make check' is run
(or the value 2).
./testpar/Makefile.in
Saying `make check' (or `make test') will run the tests on two
processors by default. If you define NPROCS then that many
processors are used instead:
$ NPROCS=4 make check
./configure.in
Fixed (hopefully) bugs with detecting whether __attribute__
and __FUNCTION__ are special keywords for the compiler.
./Makefile.in
Saying `make install' from the top level directory shows
instructions for using shared libraries.
./config/commence.in
./src/Makefile.in
./test/Makefile.in
./testpar/Makefile.in
./tools/Makefile.in
Moved the @top_srcdir@ into the makefiles because it was
expanded too early and had the wrong value.
./INSTALL
Added a warning that if the wrong version of hdf4 tools are
installed then `make check' will fail in the tools directory.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 201 |
1 files changed, 105 insertions, 96 deletions
@@ -95,7 +95,7 @@ ac_help="$ac_help ac_help="$ac_help --disable-trace Disable API tracing capability" ac_help="$ac_help - --enable-parallel=mpio Enable parallel support with MPIO" + --enable-parallel=TYPE Search for MPI-IO and MPI support files" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -4387,7 +4387,7 @@ cat > conftest.$ac_ext <<EOF #include "confdefs.h" int main() { -int __attribute__((unused)) f(void){return 1;} +int __attribute__((unused)) x ; return 0; } EOF if { (eval echo configure:4394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then @@ -4412,7 +4412,7 @@ cat > conftest.$ac_ext <<EOF #include "confdefs.h" int main() { -int f(void){return __FUNCTION__;} +(void)__FUNCTION__ ; return 0; } EOF if { (eval echo configure:4419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then @@ -4519,50 +4519,84 @@ else CPPFLAGS="$CPPFLAGS -UH5_DEBUG_API" fi -# Check whether --enable-parallel or --disable-parallel was given. -if test "${enable_parallel+set}" = set; then - enableval="$enable_parallel" - PARALLEL=$enableval -fi -echo $ac_n "checking for parallel support""... $ac_c" 1>&6 -echo "configure:4530: checking for parallel support" >&5; +case "$CC_BASENAME" in + mpicc) + # The mpich compiler. Use mpirun from the same directory if it + # exists. + PARALLEL=yes + echo $ac_n "checking for mpirun""... $ac_c" 1>&6 +echo "configure:4533: checking for mpirun" >&5 + CC_path=`type -path $CC` + CC_path=`echo $CC_path |sed -e 's/\/mpicc$//'` + if test -x $CC_path/mpirun; then + echo "$ac_t""$CC_path/mpirun" 1>&6 + if test "X-" = "X-$RUNSERIAL"; then + RUNSERIAL="$CC_path/mpirun -np 1" + fi + if test "X-" = "X-$RUNPARALLEL"; then + RUNPARALLEL="$CC_path/mpirun -np \$\${NPROCS:=2}" + fi + else + echo "$ac_t""none" 1>&6 + fi + ;; -if test "mpicc" = "$CC_BASENAME" -a "X-" = "X-$PARALLEL"; then - PARALLEL=mpio -fi + mpcc) + # The IBM compiler + PARALLEL=yes + ;; -case "X-$PARALLEL" in + *) + # Probably not a parallel compiler, but if `--enable-parallel' + # is defined below then we're still building a parallel hdf5. + ;; +esac - X-|X-no) - # Parallel support is not enabled - echo "$ac_t""disabled" 1>&6 - ;; +# Check whether --enable-parallel or --disable-parallel was given. +if test "${enable_parallel+set}" = set; then + enableval="$enable_parallel" + : +fi - X-mpio|X-yes) - # Use MPIO. Define HAVE_PARALLEL in src/H5config.h (comes from - # ./acconfig.h) and augment the include and library search paths - # (it doesn't hurt to have extra paths). Then check for header - # files and libraries. Some extra source files are added to the - # list also so we don't have to ifdef out the whole file. - echo "$ac_t""mpio" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_PARALLEL 1 -EOF - echo $ac_n "checking for MPI_Init in -lmpi""... $ac_c" 1>&6 -echo "configure:4558: checking for MPI_Init in -lmpi" >&5 -ac_lib_var=`echo mpi'_'MPI_Init | sed 'y%./+-%__p_%'` +echo $ac_n "checking for parallel support files""... $ac_c" 1>&6 +echo "configure:4568: checking for parallel support files" >&5 +case "X-$enable_parallel" in + X-|X-no|X-none) + # Either we are not compiling for parallel or the header and library + # files and locations are known to the compiler (this is the case + # for a correct installation of mpicc for instance). + echo "$ac_t""skipped" 1>&6 + ;; + + X-yes|X-mpich) + # For normal mpich installation the compiler, mpicc, should know + # where the MPI and MPI-IO header files are located and know which + # extra libraries need to be linked and will supply appropriate + # flags to the underlying compiler. + echo "$ac_t""mpich" 1>&6 + echo "configure: warning: *** Why aren't you using an mpicc compiler? ***" 1>&2 + + # Apparently mpicc isn't installed correctly so configure must search + # for the header files and libraries. Actually we only have to search + # for the libraries in order to get the onto the link line, the user + # will have already told us about the locations. Fail if something + # is missing. + PARALLEL=yes + echo $ac_n "checking for MPI_Init in -lmpich""... $ac_c" 1>&6 +echo "configure:4592: checking for MPI_Init in -lmpich" >&5 +ac_lib_var=`echo mpich'_'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" +LIBS="-lmpich $LIBS" cat > conftest.$ac_ext <<EOF -#line 4566 "configure" +#line 4600 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4573,7 +4607,7 @@ int main() { MPI_Init() ; return 0; } EOF -if { (eval echo configure:4577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4588,86 +4622,61 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo mpi | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + ac_tr_lib=HAVE_LIB`echo mpich | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <<EOF #define $ac_tr_lib 1 EOF - LIBS="-lmpi $LIBS" + LIBS="-lmpich $LIBS" else echo "$ac_t""no" 1>&6 +{ echo "configure: error: no mpich library" 1>&2; exit 1; } fi - echo $ac_n "checking for MPI_File_open in -lmpio""... $ac_c" 1>&6 -echo "configure:4605: 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 <<EOF -#line 4613 "configure" -#include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char MPI_File_open(); + ;; -int main() { -MPI_File_open() -; return 0; } -EOF -if { (eval echo configure:4624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + *) + echo "$ac_t""error" 1>&6 + { echo "configure: error: \"$enable_parallel\" is not a valid parallel search type" 1>&2; exit 1; } + ;; +esac +if test "X-" != "X-$PARALLEL"; then + TESTPARALLEL=testpar fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo mpio | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <<EOF -#define $ac_tr_lib 1 + +if test "X-" != "X-$PARALLEL"; then + # We are building a parallel library + cat >> confdefs.h <<\EOF +#define HAVE_PARALLEL 1 EOF - LIBS="-lmpio $LIBS" -else - echo "$ac_t""no" 1>&6 -fi + # Display what we found about running programs + echo $ac_n "checking how to run on one processor""... $ac_c" 1>&6 +echo "configure:4660: checking how to run on one processor" >&5 + echo "$ac_t""$RUNSERIAL" 1>&6 + echo $ac_n "checking how to run in parallel""... $ac_c" 1>&6 +echo "configure:4663: checking how to run in parallel" >&5 + echo "$ac_t""$RUNPARALLEL" 1>&6 - if test "X-" = "X-$RUNSERIAL" -o "X-none" = "X-$RUNSERIAL"; then - RUNSERIAL= - fi - if test "X-" = "X-$RUNPARALLEL"; then - RUNPARALLEL="mpirun -np 2" - 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 - ;; - - *) - { echo "configure: error: unknown parallel support: $PARALLEL" 1>&2; exit 1; } - ;; -esac - + # There *must* be some way to run in parallel even if it's just the + # word `none'. + if test "X-" = "X-$RUNPARALLEL"; then + { echo "configure: error: no way to run a parallel program" 1>&2; exit 1; } + fi + # If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with + # the empty string. + if test "X-none" = "X-$RUNSERIAL"; then + RUNSERIAL= + fi + if test "X-none" = "X-$RUNPARALLEL"; then + RUNPARALLEL= + fi +fi COMMENCE=config/commence CONCLUDE=config/conclude |