diff --git a/src/config.h.in b/src/config.h.in index fb9fe88..ee25197 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -66,6 +66,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MKL_MKL_PARDISO_H +/* Define to 1 if you have the header file. */ +#undef HAVE_MKL_PARDISO_H + /* Define to 1 if you have the `MPI_Comm_rank' function. */ #undef HAVE_MPI_COMM_RANK @@ -228,6 +231,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ZMUMPS_C_H +/* Define if mkl_pardiso.h is not located in a subfolder */ +#undef MKL_PARDISO_H + /* macro for alternative Octave symbols */ #undef OCTAVE__FEVAL diff --git a/src/configure.ac b/src/configure.ac index 1713671..a63df94 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -184,6 +184,7 @@ CPPFLAGS="${PARDISO_INC} ${CPPFLAGS}" LIBS="${PARDISO_LIBS} ${LIBS}" AC_CHECK_HEADERS([mkl/mkl_pardiso.h \ + mkl_pardiso.h \ omp.h]) AC_CHECK_FUNCS([pardiso_64],[have_pardiso=yes],[have_pardiso=no]) AC_CHECK_FUNCS([omp_set_num_threads \ @@ -193,6 +194,14 @@ if test "${ac_cv_header_omp_h}" = "yes" -a "${have_omp_threads}" = "yes"; then AC_DEFINE([USE_OMP_THREADS],1,[Define if omp_set_num_threads and omp_get_num_threads can be used]) fi +if test "${ac_cv_header_mkl_mkl_pardiso_h}" = "yes"; then + AC_DEFINE([MKL_PARDISO_H], [], [Define if mkl_pardiso.h is located in a subfolder called mkl]) +else + if test "${ac_cv_header_mkl_pardiso_h}" = "yes"; then + AC_DEFINE([MKL_PARDISO_H], [], [Define if mkl_pardiso.h is not located in a subfolder]) + fi +fi + AM_CONDITIONAL([USE_PARDISO],[test "${ac_cv_header_mkl_mkl_pardiso_h}" = "yes" && test "${have_pardiso}" = "yes"]) CPPFLAGS="${TCPPFLAGS}" diff --git a/src/pardiso.cc b/src/pardiso.cc index e055d87..cd0e9af 100644 --- a/src/pardiso.cc +++ b/src/pardiso.cc @@ -26,7 +26,7 @@ #include #include -#include +#include MKL_PARDISO_H #ifdef USE_OMP_THREADS #include