Skip to content
Snippets Groups Projects
Commit bf2bb81f authored by Kurt A. O'Hearn's avatar Kurt A. O'Hearn
Browse files

PG-PuReMD: update build system for LAPACKE. Conditionally include LAPACKE...

PG-PuReMD: update build system for LAPACKE. Conditionally include LAPACKE header based on results of compilation.
parent 2e13af95
No related branches found
No related tags found
No related merge requests found
......@@ -132,14 +132,43 @@ fi
AC_SUBST(MPI_CFLAGS)
AC_SUBST(MPI_LIBS)
# Check for LAPACKE
AC_CHECK_HEADERS([mkl.h], [MKL_FOUND_HEADERS="yes"])
if test "x${MKL_FOUND_HEADERS}" = "xyes"
then
AC_SEARCH_LIBS([LAPACKE_dgels], [mkl_intel_ilp64],
[MKL_FOUND_LIBS="yes"], [MKL_FOUND_LIBS="no"],
[-lmkl_sequential -lmkl_core -lpthread -lm -ldl])
AS_IF([test "x${MKL_FOUND_LIBS}" != "xyes"],
[AC_MSG_ERROR([Unable to find MKL LAPACKE library.])])
LIBS="${LIBS} -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl"
AC_DEFINE([HAVE_LAPACKE_MKL], [1], [Define to 1 if you have MKL LAPACKE support enabled.])
else
AC_CHECK_HEADERS([lapacke.h], [LAPACKE_FOUND_HEADERS="yes"])
if test "x${LAPACKE_FOUND_HEADERS}" = "xyes"
then
AC_SEARCH_LIBS([LAPACKE_dgels], [lapacke],
[LAPACKE_FOUND_LIBS="yes"], [LAPACKE_FOUND_LIBS="no"],
[-llapack])
AS_IF([test "x${LAPACKE_FOUND_LIBS}" != "xyes"],
[AC_MSG_ERROR([Unable to find LAPACKE library.])])
LIBS="${LIBS} -llapack"
AC_DEFINE([HAVE_LAPACKE], [1], [Define to 1 if you have LAPACKE support enabled.])
else
AC_MSG_WARN([
-----------------------------------------------
Unable to find LAPACKE on this system.
Disabling support for dependent methods.
-----------------------------------------------])
fi
fi
AC_LANG([C++])
# Checks for programs.
AC_PROG_CXX([icpc g++ clang++ c++])
AC_PROG_CXXCPP
AX_COMPILER_VENDOR
# Check for CUDA support.
if test "x${BUILD_GPU}" = "xyes"; then
CONFIGURE_HEADLINE([ CUDA support ])
......
......@@ -28,6 +28,14 @@
#include "tool_box.h"
#include "vector.h"
/* Intel MKL */
#if defined(HAVE_LAPACKE_MKL)
#include "mkl.h"
/* reference LAPACK */
#elif defined(HAVE_LAPACKE)
#include "lapacke.h"
#endif
#if defined(HAVE_CUDA) && defined(DEBUG)
#include "cuda/cuda_validation.h"
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment