diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2002-03-29 18:28:22 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2002-03-29 18:28:22 (GMT) |
commit | 8f1891c178e2ec39d7b1ca8aceed824cc709d4ed (patch) | |
tree | a0cd8523c07a32ae3fcce77e9e1edfee6ff9da5e /fortran | |
parent | 64591ec1a83c5b156b26e07e7d6ba7645c2ea296 (diff) | |
download | hdf5-8f1891c178e2ec39d7b1ca8aceed824cc709d4ed.zip hdf5-8f1891c178e2ec39d7b1ca8aceed824cc709d4ed.tar.gz hdf5-8f1891c178e2ec39d7b1ca8aceed824cc709d4ed.tar.bz2 |
[svn-r5117] Purpose:
Bug Fix
Description:
Back ported fix for the Fortran MPI parallel test to the 1.4 branch.
Solution:
Needed to change the order of the link line in the acsite.m4 file so
that libraries came after the *.o file to catch some of the
unresolved references being generated.
Platforms tested:
Modi4
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/acsite.m4 | 2 | ||||
-rwxr-xr-x | fortran/configure | 74 | ||||
-rw-r--r-- | fortran/configure.in | 28 |
3 files changed, 46 insertions, 58 deletions
diff --git a/fortran/acsite.m4 b/fortran/acsite.m4 index 5f34c7d..2539bab 100644 --- a/fortran/acsite.m4 +++ b/fortran/acsite.m4 @@ -77,7 +77,7 @@ AC_DEFUN(AC_LANG_FORTRAN9X, [ define([AC_LANG], [FORTRAN9X]) ac_ext=f90 ac_compile='${F9X-f90} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC' -ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' +ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&AC_FD_CC' cross_compiling=$ac_cv_prog_f9x_cross ]) diff --git a/fortran/configure b/fortran/configure index 7bea3d0..1e6d633 100755 --- a/fortran/configure +++ b/fortran/configure @@ -793,7 +793,7 @@ echo "configure:788: checking for config $f" >&5 echo "$ac_t""no" 1>&6 done if test "X$host_config" != "Xnone"; then - CC_BASENAME="`echo $CC |cut -f1 -d' ' |xargs basename 2>/dev/null`" + CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" . $host_config fi @@ -1823,7 +1823,7 @@ echo "configure:1821: checking whether the Fortran 9X compiler ($F9X $FFLAGS $LD ac_ext=f90 ac_compile='${F9X-f90} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' cross_compiling=$ac_cv_prog_f9x_cross @@ -1926,7 +1926,7 @@ echo "configure:1924: checking what $F9X does with modules" >&5 ac_ext=f90 ac_compile='${F9X-f90} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' cross_compiling=$ac_cv_prog_f9x_cross @@ -2290,14 +2290,14 @@ rm -f confcache ac_ext=f90 ac_compile='${F9X-f90} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' cross_compiling=$ac_cv_prog_f9x_cross - - - - + PARALLEL="" + RUNSERIAL="" + RUNPARALLEL="" + TESTPARALLEL="" case "$F9X" in mpif90) @@ -2359,7 +2359,7 @@ case "X-$enable_parallel" in ac_ext=f90 ac_compile='${F9X-f90} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' cross_compiling=$ac_cv_prog_f9x_cross @@ -2371,12 +2371,11 @@ cat >conftest.$ac_ext <<EOF program conftest include 'mpif.h' - integer ierr - call MPI_INIT( ierr ) + call mpi_file_open( ierr ) end EOF -if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then : else @@ -2386,7 +2385,7 @@ else ac_ext=f90 ac_compile='${F9X-f90} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' cross_compiling=$ac_cv_prog_f9x_cross @@ -2398,8 +2397,7 @@ cat >conftest.$ac_ext <<EOF program conftest include 'mpif.h' - integer ierr - call MPI_INIT( ierr ) + call mpi_file_open( ierr ) end EOF @@ -2408,7 +2406,7 @@ if test -n "mpi"; then LDFLAGS="$LDFLAGS -lmpi" fi -if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then : else @@ -2429,7 +2427,7 @@ rm -rf conftest* ac_ext=f90 ac_compile='${F9X-f90} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' cross_compiling=$ac_cv_prog_f9x_cross @@ -2441,19 +2439,21 @@ cat >conftest.$ac_ext <<EOF program conftest include 'mpif.h' - integer ierr - call MPI_INIT( ierr ) + call mpi_file_open( ierr ) end EOF -if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + : + +else : ac_ext=f90 ac_compile='${F9X-f90} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' cross_compiling=$ac_cv_prog_f9x_cross @@ -2465,8 +2465,7 @@ cat >conftest.$ac_ext <<EOF program conftest include 'mpif.h' - integer ierr - call MPI_INIT( ierr ) + call mpi_file_open( ierr ) end EOF @@ -2475,7 +2474,7 @@ if test -n "mpio"; then LDFLAGS="$LDFLAGS -lmpio" fi -if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then : else @@ -2485,9 +2484,6 @@ fi cd .. rm -rf conftest* -else - : - fi cd .. rm -rf conftest* @@ -2509,7 +2505,7 @@ rm -rf conftest* ac_ext=f90 ac_compile='${F9X-f90} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' cross_compiling=$ac_cv_prog_f9x_cross @@ -2521,8 +2517,7 @@ cat >conftest.$ac_ext <<EOF program conftest include 'mpif.h' - integer ierr - call MPI_INIT( ierr ) + call mpi_file_open( ierr ) end EOF @@ -2531,7 +2526,7 @@ if test -n "fmpich"; then LDFLAGS="$LDFLAGS -lfmpich" fi -if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then : else @@ -2556,20 +2551,20 @@ fi ADD_PARALLEL_FILES="no" if test -n "$PARALLEL"; then echo $ac_n "checking prefix for running on one processor""... $ac_c" 1>&6 -echo "configure:2560: checking prefix for running on one processor" >&5 +echo "configure:2555: checking prefix for running on one processor" >&5 echo "$ac_t""$RUNSERIAL" 1>&6 echo $ac_n "checking prefix for running in parallel""... $ac_c" 1>&6 -echo "configure:2563: checking prefix for running in parallel" >&5 +echo "configure:2558: checking prefix for running in parallel" >&5 echo "$ac_t""$RUNPARALLEL" 1>&6 echo $ac_n "checking whether a simple MPI-IO program can be linked""... $ac_c" 1>&6 -echo "configure:2567: checking whether a simple MPI-IO program can be linked" >&5 +echo "configure:2562: checking whether a simple MPI-IO program can be linked" >&5 ac_ext=f90 ac_compile='${F9X-f90} -c $FFLAGS conftest.$ac_ext 1>&5' -ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${F9X-f90} -o conftest${ac_exeext} $FFLAGS conftest.$ac_ext $LDFLAGS $LIBS 1>&5' cross_compiling=$ac_cv_prog_f9x_cross @@ -2581,12 +2576,11 @@ cat >conftest.$ac_ext <<EOF program conftest include 'mpif.h' - integer ierr - call MPI_INIT( ierr ) + call mpi_file_open( ierr ) end EOF -if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then : echo "$ac_t""yes" 1>&6 else @@ -2614,7 +2608,7 @@ fi echo $ac_n "checking make""... $ac_c" 1>&6 -echo "configure:2618: checking make" >&5 +echo "configure:2612: checking make" >&5 if test "`${MAKE-make} --version -f /dev/null 2>/dev/null |\ sed -n 1p|cut -c1-8`" = "GNU Make"; then @@ -2631,7 +2625,7 @@ fi if test -z "$DEPEND"; then echo $ac_n "checking how to include a makefile""... $ac_c" 1>&6 -echo "configure:2635: checking how to include a makefile" >&5 +echo "configure:2629: checking how to include a makefile" >&5 cat >makeinc <<EOF foo: diff --git a/fortran/configure.in b/fortran/configure.in index 63a8d0d..e9f138b 100644 --- a/fortran/configure.in +++ b/fortran/configure.in @@ -121,7 +121,7 @@ for f in $host_cpu-$host_vendor-$host_os \ AC_MSG_RESULT(no) done if test "X$host_config" != "Xnone"; then - CC_BASENAME="`echo $CC |cut -f1 -d' ' |xargs basename 2>/dev/null`" + CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`" . $host_config fi @@ -361,10 +361,10 @@ 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(PARALLEL) PARALLEL="" +AC_SUBST(RUNSERIAL) RUNSERIAL="" +AC_SUBST(RUNPARALLEL) RUNPARALLEL="" +AC_SUBST(TESTPARALLEL) TESTPARALLEL="" dnl ---------------------------------------------------------------------- dnl If the compiler is obviously a parallel compiler then we're building @@ -444,23 +444,19 @@ case "X-$enable_parallel" in dnl Try link a simple MPI program. If fail, try again with -lmpi. AC_TRY_FLINK(mpif.h, [ - integer ierr - call MPI_INIT( ierr )],, + call mpi_file_open( ierr )],, AC_CHECK_FLIB(mpi, [ include 'mpif.h' - integer ierr - call MPI_INIT( ierr )],, PARALLEL=no)) + call mpi_file_open( ierr )],, PARALLEL=no)) dnl Then try link a simple MPI-IO program. If fail, try again with dnl -lmpio. if test "X$PARALLEL" = "Xyes"; then AC_TRY_FLINK(mpif.h, [ - integer ierr - call MPI_INIT( ierr )], + call mpi_file_open( ierr )],, AC_CHECK_FLIB(mpio, [ include 'mpif.h' - integer ierr - call MPI_INIT( ierr )],, PARALLEL=no)) + call mpi_file_open( ierr )],, PARALLEL=no)) fi dnl Set RUNPARALLEL to mpirun if not set yet. @@ -485,8 +481,7 @@ case "X-$enable_parallel" in PARALLEL=mpich AC_CHECK_FLIB(fmpich, [ include 'mpif.h' - integer ierr - call MPI_INIT( ierr )],, AC_MSG_ERROR(no mpich library)) + call mpi_file_open( ierr )],, AC_MSG_ERROR(no mpich library)) ;; *) @@ -516,8 +511,7 @@ if test -n "$PARALLEL"; then dnl Check that we can link a simple MPI and MPI-IO application AC_MSG_CHECKING(whether a simple MPI-IO program can be linked) AC_TRY_FLINK(mpif.h,[ - integer ierr - call MPI_INIT( ierr )], + call mpi_file_open( ierr )], AC_MSG_RESULT(yes), AC_MSG_RESULT(no) AC_MSG_ERROR('unable to link a simple MPI-IO application')) |