I am trying to enable Intel MKL (2023.0.0) on Eigen C++ (3.4.0) library using Visual Studio++, so far I am able to run Eigen library in Visual Studio 2022 with no issues.
But as stated on this other thread and official Eigen documentation, when I try to enable Intel MKL by adding
#define EIGEN_USE_BLAS
#include <Eigen/src/Core/util/MKL_support.h>
I manage to compile and execute, but throws this error
Intel MKL ERROR: Parameter 6 was incorrect on entry to SGEMV .
Intel MKL ERROR: Parameter 2 was incorrect on entry to SGEMV .
To enable Intel MKL on my Visual Studio project I added the include directories and library directories as stated here and the Intel MKL linker advisor, the libraries that the linker advisor recommends are
mkl_intel_ilp64.lib mkl_sequential.lib mkl_core.lib
For those who are curious, the line of code that throws this error is
Eigen::EigenSolver<Eigen::MatrixXf> es(eig_cov);
I am basically trying to compute the eigen vectors for a matrix of 8192x8192 (the matrix is symmetric and has been validated with other libraries like OpenCV and Armadillo, they just take so long, I have another thread about this in case you are curious)
Since my program is able to compile and execute and fail at the line above, I would say I have my dev environment setup but I am not really sure why Intel MKL is not liking Eigen, any pointers will be appreciated
PD: I tried to use EIGEN_USE_MKL_ALL instead of EIGEN_USE_BLAS, but I open a can of worms, looks more scary to solve that way.