configry to check for OpenMP flags.

psblas-3.6-openmp
Salvatore Filippone 6 years ago
parent 5fd73b347e
commit 00ac68739d

@ -24,6 +24,7 @@ MPFC=@MPIFC@
MPCC=@MPICC@
FLINK=$(MPFC)
FLINKFLAGS=@FLINKFLAGS@
LIBS=@LIBS@

@ -1130,6 +1130,18 @@ if test $pac_blas_ok = no; then
fi
if test $pac_blas_ok = no; then
AC_LANG([C])
if test "x$psblas_have_openmp" == "xyes";
then
AC_CHECK_LIB(tatlas, ATL_xerbla,
[AC_LANG([Fortran])
AC_CHECK_LIB(tatlas, sgemm,
[AC_LANG([C])
AC_CHECK_LIB(tatlas, cblas_dgemm,
[pac_blas_ok=yes
BLAS_LIBS="-ltatlas $BLAS_LIBDIR"],
[], [-ltatlas])],
[], [-ltatlas])])
else
AC_CHECK_LIB(satlas, ATL_xerbla,
[AC_LANG([Fortran])
AC_CHECK_LIB(satlas, sgemm,
@ -1139,7 +1151,7 @@ if test $pac_blas_ok = no; then
BLAS_LIBS="-lsatlas $BLAS_LIBDIR"],
[], [-lsatlas])],
[], [-lsatlas])])
fi
fi
# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)
@ -1833,3 +1845,35 @@ CPPFLAGS="$SAVE_CPPFLAGS";
])dnl
dnl @synopsis PAC_OPENMP()
dnl
dnl Check for OpenMP flags for C and Fortran compilers
dnl
dnl
dnl
dnl
dnl
AC_DEFUN(PAC_CHECK_OPENMP,
[AC_ARG_WITH(openmp,AC_HELP_STRING([--with-openmp], [search for openmp flags]),
[psblas_search_openmp="yes"],
[psblas_search_openmp="no"])
AC_MSG_NOTICE([Search for openmp $psblas_search_openmp])
AC_MSG_CHECKING([for OPENMP flags])
psblas_have_openmp="no";
AC_LANG([C])
AC_OPENMP
if test "x$OPENMP_CFLAGS" != "x"; then
psblas_have_openmp="yes";
psblas_openmp_cflags="$OPENMP_CFLAGS";
fi
AC_LANG([Fortran])
AC_OPENMP
if test "x$OPENMP_FCFLAGS" != "x"; then
psblas_have_openmp="yes";
psblas_openmp_fcflags="$OPENMP_FCFLAGS";
fi
AC_MSG_RESULT($psblas_have_openmp)
]) dnl

8660
configure vendored

File diff suppressed because it is too large Load Diff

@ -608,6 +608,16 @@ fi
# This should be portable
AR="${AR} -cur"
##########################################################################
# Check for OpenMP before BLAS, to pick thread-safe BLAS if appropriate
#########################################################################
PAC_CHECK_OPENMP
if test "x$psblas_have_openmp" == "xyes"; then
CCOPT="$CCOPT $psblas_openmp_cflags";
FCOPT="$FCOPT $psblas_openmp_fcflags";
FLINKFLAGS="$psblas_openmp_fcflags";
fi
###############################################################################
# BLAS library presence checks
@ -719,6 +729,7 @@ AC_SUBST(MPICC)
AC_SUBST(FCOPT)
AC_SUBST(CCOPT)
AC_SUBST(EXTRA_OPT)
AC_SUBST(FLINKFLAGS)
AC_SUBST(FAKEMPI)
AC_SUBST(FIFLAG)
AC_SUBST(FMFLAG)

@ -7,7 +7,7 @@ include $(INCDIR)/Make.inc.psblas
#
LIBDIR=$(INSTALLDIR)/lib/
PSBLAS_LIB= -L$(LIBDIR) -lpsb_util -lpsb_krylov -lpsb_prec -lpsb_base
LDLIBS=$(PSBLDLIBS)
LDLIBS=$(PSBLDLIBS) $(FLINKFLAGS)
FINCLUDES=$(FMFLAG)$(MODDIR) $(FMFLAG).

@ -6,7 +6,7 @@ include $(INCDIR)/Make.inc.psblas
# Libraries used
LIBDIR=$(INSTALLDIR)/lib
PSBLAS_LIB= -L$(LIBDIR) -lpsb_util -lpsb_krylov -lpsb_prec -lpsb_base
LDLIBS=$(PSBLDLIBS)
LDLIBS=$(PSBLDLIBS) $(FLINKFLAGS)
#
# Compilers and such
#

Loading…
Cancel
Save