From f8bfe1cb01fb7079b5307892b004a2c4f5c5ae09 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 28 Mar 2002 16:16:04 -0500 Subject: [svn-r5112] Purpose: Bug Fix Description: Parallel Fortran wasn't working on Modi4. The tests for parallel MPI Fortran were failing to find MPI files. Solution: Changed the AC_TRY_FLINK() macro so that libraries are included at the end of the link line so that unresolved symbols can be found... Platforms tested: Modi4 --- fortran/acsite.m4 | 2 +- fortran/configure | 72 ++++++++++++++++++++++++---------------------------- fortran/configure.in | 26 ++++++++----------- 3 files changed, 44 insertions(+), 56 deletions(-) diff --git a/fortran/acsite.m4 b/fortran/acsite.m4 index 7b7c1c5..c6bb4a8 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 a6bb5f7..7039971 100755 --- a/fortran/configure +++ b/fortran/configure @@ -1825,7 +1825,7 @@ echo "configure:1823: 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 @@ -1928,7 +1928,7 @@ echo "configure:1926: 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 @@ -2292,14 +2292,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) @@ -2361,7 +2361,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 @@ -2373,12 +2373,11 @@ cat >conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2382: \"$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:2381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then : else @@ -2388,7 +2387,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 @@ -2400,8 +2399,7 @@ cat >conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2414: \"$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:2412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then : else @@ -2431,7 +2429,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 @@ -2443,19 +2441,21 @@ cat >conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2452: \"$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:2449: \"$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 @@ -2467,8 +2467,7 @@ cat >conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2481: \"$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:2480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then : else @@ -2487,9 +2486,6 @@ fi cd .. rm -rf conftest* -else - : - fi cd .. rm -rf conftest* @@ -2511,7 +2507,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 @@ -2523,8 +2519,7 @@ cat >conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2537: \"$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:2532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then : else @@ -2558,20 +2553,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:2562: checking prefix for running on one processor" >&5 +echo "configure:2557: 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:2565: checking prefix for running in parallel" >&5 +echo "configure:2560: 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:2569: checking whether a simple MPI-IO program can be linked" >&5 +echo "configure:2564: 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 @@ -2583,12 +2578,11 @@ cat >conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; } && { (eval echo configure:2592: \"$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:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then : echo "$ac_t""yes" 1>&6 else @@ -2616,7 +2610,7 @@ fi echo $ac_n "checking make""... $ac_c" 1>&6 -echo "configure:2620: checking make" >&5 +echo "configure:2614: checking make" >&5 if test "`${MAKE-make} --version -f /dev/null 2>/dev/null |\ sed -n 1p|cut -c1-8`" = "GNU Make"; then @@ -2633,7 +2627,7 @@ fi if test -z "$DEPEND"; then echo $ac_n "checking how to include a makefile""... $ac_c" 1>&6 -echo "configure:2637: checking how to include a makefile" >&5 +echo "configure:2631: checking how to include a makefile" >&5 cat >makeinc <