Browse Source

Check that cblas_sgemv is available

spmv/dw_block_spmv requires it
Samuel Thibault 4 years ago
parent
commit
14504550ba
2 changed files with 9 additions and 0 deletions
  1. 7 0
      configure.ac
  2. 2 0
      examples/Makefile.am

+ 7 - 0
configure.ac

@@ -2777,6 +2777,13 @@ AM_CONDITIONAL(STARPU_HAVE_CBLAS_H, test x$have_cblas_h = xyes)
 if test x$have_cblas_h = xyes; then
     AC_DEFINE(STARPU_HAVE_CBLAS_H, [1], [The blas library has blas.h])
 fi
+if test x$blas_lib != xnone; then
+    SAVED_LIBS="$LIBS"
+    LIBS="$LIBS -lblas"
+    AC_CHECK_FUNCS([cblas_sgemv])
+    LIBS="$SAVED_LIBS"
+fi
+AM_CONDITIONAL(STARPU_HAVE_CBLAS_SGEMV, test $HAVE_CBLAS_SGEMV = 1)
 
 AM_CONDITIONAL(STARPU_ATLAS_BLAS_LIB, test x$blas_lib = xatlas)
 AM_CONDITIONAL(STARPU_GOTO_BLAS_LIB, test x$blas_lib = xgoto)

+ 2 - 0
examples/Makefile.am

@@ -358,9 +358,11 @@ STARPU_EXAMPLES +=				\
 endif
 
 if STARPU_HAVE_CBLAS_H
+if STARPU_HAVE_CBLAS_SGEMV
 STARPU_EXAMPLES +=				\
 	spmv/dw_block_spmv
 endif
+endif
 
 if !STARPU_SIMGRID
 if STARPU_HAVE_F77