config/pac.m4
 configure.ac
 configure

Our configure uses Fortran for linking, so no need to check
BLAS/LAPACK from C (which wreaks havoc with CCE 8).
psblas3-final
Salvatore Filippone 13 years ago
parent 2bd8cbd2c9
commit 830cdfffdf

@ -340,7 +340,7 @@ dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
dnl dnl
AC_DEFUN([PAC_ARG_SERIAL_MPI], AC_DEFUN([PAC_ARG_SERIAL_MPI],
[ [
AC_MSG_CHECKING([whether we want serial (fake) mpi]) AC_MSG_CHECKING([whether we want serial mpi stubs])
AC_ARG_ENABLE(serial, AC_ARG_ENABLE(serial,
AC_HELP_STRING([--enable-serial], AC_HELP_STRING([--enable-serial],
[Specify whether to enable a fake mpi library to run in serial mode. ]), [Specify whether to enable a fake mpi library to run in serial mode. ]),
@ -1057,7 +1057,9 @@ dnl @category InstalledPackages
dnl @author Steven G. Johnson <stevenj@alum.mit.edu> dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
dnl @version 2001-12-13 dnl @version 2001-12-13
dnl @license GPLWithACException dnl @license GPLWithACException
dnl
dnl modified by salvatore.filippone@uniroma2.it dnl modified by salvatore.filippone@uniroma2.it
dnl
dnl shifted check for ESSL as it was generating erroneous results on dnl shifted check for ESSL as it was generating erroneous results on
dnl AIX SP5. dnl AIX SP5.
dnl Modified with new name to handle Fortran compilers (such as NAG) dnl Modified with new name to handle Fortran compilers (such as NAG)
@ -1067,7 +1069,7 @@ dnl would fail even when linking in the compiler's library)
AC_DEFUN([PAC_BLAS], [ AC_DEFUN([PAC_BLAS], [
AC_PREREQ(2.50) AC_PREREQ(2.50)
AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS]) dnl AC_REQUIRE([AC_FC_LIBRARY_LDFLAGS])
pac_blas_ok=no pac_blas_ok=no
AC_ARG_WITH(blas, AC_ARG_WITH(blas,
@ -1080,21 +1082,20 @@ case $with_blas in
esac esac
# Get fortran linker names of BLAS functions to check for. # Get fortran linker names of BLAS functions to check for.
AC_F77_FUNC(sgemm) #AC_FC_FUNC(sgemm)
AC_F77_FUNC(dgemm) #AC_FC_FUNC(dgemm)
pac_blas_save_LIBS="$LIBS" #pac_blas_save_LIBS="$LIBS"
LIBS="$LIBS $FLIBS" #LIBS="$LIBS $FLIBS"
AC_LANG([Fortran])
# First, check BLAS_LIBS environment variable # First, check BLAS_LIBS environment variable
if test $pac_blas_ok = no; then if test $pac_blas_ok = no; then
if test "x$BLAS_LIBS" != x; then if test "x$BLAS_LIBS" != x; then
save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS"
AC_LANG([Fortran])
AC_MSG_CHECKING([for sgemm in $BLAS_LIBS]) AC_MSG_CHECKING([for sgemm in $BLAS_LIBS])
AC_TRY_LINK_FUNC(sgemm, [pac_blas_ok=yes], [BLAS_LIBS=""]) AC_TRY_LINK_FUNC(sgemm, [pac_blas_ok=yes], [BLAS_LIBS=""])
AC_MSG_RESULT($pac_blas_ok) AC_MSG_RESULT($pac_blas_ok)
AC_LANG([C])
LIBS="$save_LIBS" LIBS="$save_LIBS"
fi fi
fi fi
@ -1102,6 +1103,7 @@ fi
# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
if test $pac_blas_ok = no; then if test $pac_blas_ok = no; then
AC_LANG([C])
AC_CHECK_LIB(atlas, ATL_xerbla, AC_CHECK_LIB(atlas, ATL_xerbla,
[AC_LANG([Fortran]) [AC_LANG([Fortran])
AC_CHECK_LIB(f77blas, sgemm, AC_CHECK_LIB(f77blas, sgemm,
@ -1111,7 +1113,6 @@ if test $pac_blas_ok = no; then
BLAS_LIBS="-lcblas -lf77blas -latlas"], BLAS_LIBS="-lcblas -lf77blas -latlas"],
[], [-lf77blas -latlas])], [], [-lf77blas -latlas])],
[], [-latlas])]) [], [-latlas])])
AC_LANG([C])
fi fi
@ -1124,17 +1125,16 @@ if test $pac_blas_ok = no; then
[pac_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas"], [pac_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas"],
[], [-lblas])], [], [-lblas])],
[], [-lblas])]) [], [-lblas])])
AC_LANG([C])
fi fi
# BLAS in Alpha CXML library? # BLAS in Alpha CXML library?
if test $pac_blas_ok = no; then if test $pac_blas_ok = no; then
AC_CHECK_LIB(cxml, $sgemm, [pac_blas_ok=yes;BLAS_LIBS="-lcxml"]) AC_CHECK_LIB(cxml, sgemm, [pac_blas_ok=yes;BLAS_LIBS="-lcxml"])
fi fi
# BLAS in Alpha DXML library? (now called CXML, see above) # BLAS in Alpha DXML library? (now called CXML, see above)
if test $pac_blas_ok = no; then if test $pac_blas_ok = no; then
AC_CHECK_LIB(dxml, $sgemm, [pac_blas_ok=yes;BLAS_LIBS="-ldxml"]) AC_CHECK_LIB(dxml, sgemm, [pac_blas_ok=yes;BLAS_LIBS="-ldxml"])
fi fi
@ -1142,7 +1142,7 @@ fi
if test $pac_blas_ok = no; then if test $pac_blas_ok = no; then
if test "x$GCC" != xyes; then # only works with Sun CC if test "x$GCC" != xyes; then # only works with Sun CC
AC_CHECK_LIB(sunmath, acosp, AC_CHECK_LIB(sunmath, acosp,
[AC_CHECK_LIB(sunperf, $sgemm, [AC_CHECK_LIB(sunperf, sgemm,
[BLAS_LIBS="-xlic_lib=sunperf -lsunmath" [BLAS_LIBS="-xlic_lib=sunperf -lsunmath"
pac_blas_ok=yes],[],[-lsunmath])]) pac_blas_ok=yes],[],[-lsunmath])])
@ -1151,7 +1151,7 @@ fi
# BLAS in SCSL library? (SGI/Cray Scientific Library) # BLAS in SCSL library? (SGI/Cray Scientific Library)
if test $pac_blas_ok = no; then if test $pac_blas_ok = no; then
AC_CHECK_LIB(scs, $sgemm, [pac_blas_ok=yes; BLAS_LIBS="-lscs"]) AC_CHECK_LIB(scs, sgemm, [pac_blas_ok=yes; BLAS_LIBS="-lscs"])
fi fi
# BLAS in SGIMATH library? # BLAS in SGIMATH library?
@ -1163,15 +1163,15 @@ fi
# BLAS in IBM ESSL library? (requires generic BLAS lib, too) # BLAS in IBM ESSL library? (requires generic BLAS lib, too)
if test $pac_blas_ok = no; then if test $pac_blas_ok = no; then
AC_CHECK_LIB(blas, $sgemm, AC_CHECK_LIB(blas, $sgemm,
[AC_CHECK_LIB(essl, $sgemm, [AC_CHECK_LIB(essl, sgemm,
[pac_blas_ok=yes; BLAS_LIBS="-lessl -lblas"], [pac_blas_ok=yes; BLAS_LIBS="-lessl -lblas"],
[], [-lblas $FLIBS])]) [], [-lblas $FLIBS])])
fi fi
# BLAS linked to by default? (happens on some supercomputers) # BLAS linked to by default? (happens on some supercomputers)
if test $pac_blas_ok = no; then if test $pac_blas_ok = no; then
save_LIBS="$LIBS"; LIBS="$LIBS" save_LIBS="$LIBS"; LIBS="$LIBS"
AC_TRY_LINK_FUNC($sgemm, [pac_blas_ok=yes], [BLAS_LIBS=""]) AC_TRY_LINK_FUNC(sgemm, [pac_blas_ok=yes], [BLAS_LIBS=""])
dnl AC_CHECK_FUNC($sgemm, [pac_blas_ok=yes]) dnl AC_CHECK_FUNC(sgemm, [pac_blas_ok=yes])
LIBS="$save_LIBS" LIBS="$save_LIBS"
fi fi
@ -1179,10 +1179,6 @@ fi
if test $pac_blas_ok = no; then if test $pac_blas_ok = no; then
AC_LANG([Fortran]) AC_LANG([Fortran])
AC_CHECK_LIB(blas, sgemm, [pac_blas_ok=yes; BLAS_LIBS="-lblas"]) AC_CHECK_LIB(blas, sgemm, [pac_blas_ok=yes; BLAS_LIBS="-lblas"])
AC_LANG([C])
if test $pac_blas_ok = no; then
AC_CHECK_LIB(blas, $sgemm, [pac_blas_ok=yes; BLAS_LIBS="-lblas"])
fi
fi fi
AC_SUBST(BLAS_LIBS) AC_SUBST(BLAS_LIBS)
@ -1256,7 +1252,7 @@ case $with_lapack in
esac esac
# Get fortran linker name of LAPACK function to check for. # Get fortran linker name of LAPACK function to check for.
AC_F77_FUNC(cheev) #AC_FC_FUNC(cheev)
# We cannot use LAPACK if BLAS is not found # We cannot use LAPACK if BLAS is not found
if test "x$pac_blas_ok" != xyes; then if test "x$pac_blas_ok" != xyes; then

8297
configure vendored

File diff suppressed because it is too large Load Diff

@ -645,11 +645,11 @@ AR="${AR} -cur"
# Right now it is a matter of user's taste when linking custom applications. # Right now it is a matter of user's taste when linking custom applications.
# But PSBLAS examples could take advantage of these libraries, too. # But PSBLAS examples could take advantage of these libraries, too.
AC_LANG([C])
PAC_BLAS([], [AC_MSG_ERROR([[Cannot find BLAS library, specify a path using --with-blas=DIR/LIB (for example --with-blas=/usr/path/lib/libcxml.a)]])]) PAC_BLAS([], [AC_MSG_ERROR([[Cannot find BLAS library, specify a path using --with-blas=DIR/LIB (for example --with-blas=/usr/path/lib/libcxml.a)]])])
PAC_LAPACK( PAC_LAPACK(
[FDEFINES="$psblas_cv_define_prepend-DHAVE_LAPACK $FDEFINES"], [FDEFINES="$psblas_cv_define_prepend-DHAVE_LAPACK $FDEFINES"],
) )
AC_LANG([C])
############################################################################### ###############################################################################

Loading…
Cancel
Save