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

Using PARDISO Intel MKL with Eigen

Tags: None
(comma "," separated)
aledauser
Registered Member
Posts
2
Karma
0

Using PARDISO Intel MKL with Eigen

Fri Feb 17, 2012 6:19 pm
Dear all,

I have recently downloaded the latest release of eigen 3.1.0alpha2. I have also managed to get the MKL library from Intel and link it with eigen. However I haven't been able to get the PARDISOSupport module working. When I included it, it first complained that it could not find the header file. Looking in the folder structure of eigen I noticed that there was a mistake and renamed the folder from PardisoSupport to PARDISOSupport.

After however it complains that several variables: m_param, flags, etc. are not defined.

I am a bit stumped as to what to do, any help will be much appreciated.

Thanks in advance,
Alex.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
hm, sounds strange. Could you paste the complete list of errors? thanks.
aledauser
Registered Member
Posts
2
Karma
0
Hi ggael,

Thanks for the quick reply. This is what I get when I include the PARDISO module.

    In file included from /usr/local/include/eigen3/Eigen/PARDISOSupport:24:0,
    from /home/aledauser/Documents/ComputerScience/PhD/Programming/3DMMOgre/src/headers/MathsUtils.h:15,
    from /home/aledauser/Documents/ComputerScience/PhD/Programming/3DMMOgre/src/headers/OMOgreConverter.h:22,
    from /home/aledauser/Documents/ComputerScience/PhD/Programming/3DMMOgre/src/headers/MMViewer.h:20,
    from ../src/code/MMViewer.cpp:17:
    /usr/local/include/eigen3/Eigen/src/PARDISOSupport/PARDISOSupport.h: In member function ‘Eigen::Array<typename Eigen::internal::pardiso_traits<Derived>::Index, 64, 1>& Eigen::PardisoImpl<Derived>::pardisoParameterArray()’:
    /usr/local/include/eigen3/Eigen/src/PARDISOSupport/PARDISOSupport.h:143:14: error: ‘m_param’ was not declared in this scope
    In file included from /usr/local/include/eigen3/Eigen/PARDISOSupport:24:0,
    from /home/aledauser/Documents/ComputerScience/PhD/Programming/3DMMOgre/src/headers/MathsUtils.h:15,
    from /home/aledauser/Documents/ComputerScience/PhD/Programming/3DMMOgre/src/headers/OMOgreConverter.h:22,
    from /home/aledauser/Documents/ComputerScience/PhD/Programming/3DMMOgre/src/headers/MMViewer.h:20,
    from ../src/code/MMViewer.cpp:17:
    /usr/local/include/eigen3/Eigen/src/PARDISOSupport/PARDISOSupport.h: In constructor ‘Eigen::PardisoLDLT<_MatrixType, Options>::PardisoLDLT(const MatrixType&)’:
    /usr/local/include/eigen3/Eigen/src/PARDISOSupport/PARDISOSupport.h:462:14: error: ‘flags’ was not declared in this scope
    /usr/local/include/eigen3/Eigen/src/PARDISOSupport/PARDISOSupport.h:465:23: error: ‘hermitian’ was not declared in this scope

Perhaps there is something I am missing when I am linking the libraries?

Regards,
Alex.
sullyf
Registered Member
Posts
8
Karma
0
OS
Hello,

I have been having exactly the same problem with 3.1.0-alpha2

Using the trunk version (0b51d2327999), I reduced the number of missing members to one: m_param.

Are we missing something?


S
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
should be ok now. the explanation for this is simply that I can only try pardiso with ICC, and ICC does not check code of non instantiated functions....
sullyf
Registered Member
Posts
8
Karma
0
OS
OK great it works now.

For those interested into how to use Pardiso support, here is a code sample:

Code: Select all
typedef Matrix<ScalarType, Dynamic, Dynamic> DenseMatrixType;

// build the sparse matrix
SparseMatrix<ScalarType> A(n, n);
A.setFromTriplets(tripletList.begin(), tripletList.end());

// setup the Pardiso solver
PardisoLU< SparseMatrix<ScalarType> > lu( A );

// inverse the matrix by calling X = A \ Identity.
DenseMatrixType X = lu.solve( DenseMatrixType::Identity(n, n).eval() );


Note the .eval() on the identity matrix, else it won't compile.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]