This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Trouble compiling Eigen 3.1 with MKL

Tags: None
(comma "," separated)
kde-jklontz
Registered Member
Posts
3
Karma
0
Greetings,
I'm having trouble compiling a simple test application using Eigen with the MKL backend:

test.cpp:
Code: Select all
#define EIGEN_USE_MKL_ALL
#include "Eigen/Dense"
int main()
{
    return 0;
}


Running OS X 10.7 with MKL included in the latest Intel Parallel Composer XE (MKL 10.3 Update 11) and Eigen 3.1.1. I've tried various compilers, each yields different errors:

Code: Select all
$ g++ --version
$ i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
$ g++ -I/opt/intel/mkl/include -I../eigen-eigen-43d9075b23ef test.cpp
$ In file included from ../eigen-eigen-43d9075b23ef/Eigen/QR:31,
                 from ../eigen-eigen-43d9075b23ef/Eigen/Dense:4,
                 from test.cpp:2:
../eigen-eigen-43d9075b23ef/Eigen/src/QR/ColPivHouseholderQR_MKL.h:86: error: expected constructor, destructor, or type conversion before ‘<’ token
... many more errors ...


Code: Select all
$ icpc --version
$ icpc (ICC) 12.1.5 20120612
$ icpc -I/opt/intel/mkl/include -I../eigen-eigen-43d9075b23ef test.cpp
$ ../eigen-eigen-43d9075b23ef/Eigen/src/QR/ColPivHouseholderQR_MKL.h(86): error: inlineColPivHouseholderQR is not a template
  EIGEN_MKL_QR_COLPIV(double,   double,        d, ColMajor, LAPACK_COL_MAJOR)
  ^

../eigen-eigen-43d9075b23ef/Eigen/src/QR/ColPivHouseholderQR_MKL.h(86): error: declaration is incompatible with "Eigen::ColPivHouseholderQR<_MatrixType> &Eigen::ColPivHouseholderQR<_MatrixType>::compute(const _MatrixType &) [with _MatrixType=Eigen::Matrix<double, -1, -1, 0, -1, -1>]" (declared at line 139 of "../eigen-eigen-43d9075b23ef/Eigen/src/QR/ColPivHouseholderQR.h")
  EIGEN_MKL_QR_COLPIV(double,   double,        d, ColMajor, LAPACK_COL_MAJOR)
  ^
... many more errors ...


Code: Select all
$ /usr/local/bin/clang++ --version
$ clang version 3.1 (tags/RELEASE_31/final)
Target: x86_64-apple-darwin11.0.0
Thread model: posix
$ /usr/local/bin/clang++ -I/opt/intel/mkl/include -I../eigen-eigen-43d9075b23ef test.cpp
$ In file included from test.cpp:2:
In file included from ../eigen-eigen-43d9075b23ef/Eigen/Dense:4:
In file included from ../eigen-eigen-43d9075b23ef/Eigen/QR:31:
../eigen-eigen-43d9075b23ef/Eigen/src/QR/ColPivHouseholderQR_MKL.h:86:1: error: no template named 'inlineColPivHouseholderQR'; did you mean 'ColPivHouseholderQR'?
EIGEN_MKL_QR_COLPIV(double,   double,        d, ColMajor, LAPACK_COL_MAJOR)
^
../eigen-eigen-43d9075b23ef/Eigen/src/QR/ColPivHouseholderQR_MKL.h:44:12: note: expanded from macro 'EIGEN_MKL_QR_COLPIV'
template<> inline\
           ^
../eigen-eigen-43d9075b23ef/Eigen/src/QR/ColPivHouseholderQR.h:37:38: note: 'ColPivHouseholderQR' declared here
template<typename _MatrixType> class ColPivHouseholderQR
... many more errors ...


They all seem to be complaining about more or less the same thing but I have no idea what I'm doing wrong.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
should be fixed in the repo.
kde-jklontz
Registered Member
Posts
3
Karma
0
Confirmed, thanks!
kde-jklontz
Registered Member
Posts
3
Karma
0
However, now receiving the following error at runtime:
Code: Select all
MKL ERROR: Parameter 13 was incorrect on entry to SGEMM
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
I cannot reproduce. Could you paste the backtrace, thanks.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]