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

error: 'minimum_degree_ordering' - SimplicialLLT

Tags: None
(comma "," separated)
Akkawe
Registered Member
Posts
35
Karma
0
OS
Hello,
I have a problem:

K is a square sparse matrix (upper triangular)
Code: Select all
#include <Eigen\SparseCore>
#include <Eigen/Dense>
#include <Eigen/SparseCholesky>
void foo(Eigen::SparseMatrix<double> *K){
Eigen::SimplicialLLT<Eigen::SparseMatrix<double>, Eigen::Upper > solverLLt;
solverLLt.compute(*K);


the compiler says:

WARNING!
error C2039: 'minimum_degree_ordering' : is not a member of 'Eigen::internal'
error C3861: 'minimum_degree_ordering': identifier not found


May you help me?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Maybe you have two conflicting installation of Eigen. Also, please check which Eigen version you are using.
stuart10
Registered Member
Posts
2
Karma
0
I have a similar problem to the OP. I have tried using eigen 3.1.3 and 3.2beta and both the gnu and intel compilers.

Some example code:
Code: Select all
#include <Eigen/SparseCore>
#include <Eigen/Dense>
#include <Eigen/SparseCholesky>

typedef Eigen::SparseMatrix<float> spMat;
typedef Eigen::Triplet<float> T;

int main()
{
   spMat CM(10,10);
   std::vector<T> tripletList;
   tripletList.reserve(10);

   for (int i=0; i<10; i++){tripletList.push_back(T(i, i, log(1+pow(10.,2*(-1-i/100.))) ) ) ;}
   CM.setFromTriplets(tripletList.begin(), tripletList.end());

   Eigen::SimplicialLDLT<spMat, Eigen::Upper > chol2(CM);

   return 0.;
}


If I compile with gnu I get:

Code: Select all
In file included from /home/stuart/work/soft9/eigen/Eigen/SparseCholesky:26:0,
                 from test.cpp:3:
/home/stuart/work/soft9/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h: In member function ‘void Eigen::SimplicialCholeskyBase<Derived>::ordering(const MatrixType&, Eigen::SimplicialCholeskyBase<Derived>::CholMatrixType&)’:
/home/stuart/work/soft9/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h:684:5: error: ‘minimum_degree_ordering’ is not a member of ‘Eigen::internal’


whilst the intel compiler gives (specifying the -wd2196 flag to suppress some warnings) :

Code: Select all
/home/stuart/work/soft9/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h(684): error: namespace "Eigen::internal" has no member "minimum_degree_ordering"
      internal::minimum_degree_ordering(C, m_Pinv);
                ^
          detected during:
            instantiation of "void Eigen::SimplicialCholeskyBase<Derived>::compute<DoLDLT>(const Eigen::SimplicialCholeskyBase<Derived>::MatrixType &) [with Derived=Eigen::SimplicialLDLT<spMat, 2>, DoLDLT=true]" at line 492
            instantiation of "Eigen::SimplicialLDLT<_MatrixType, _UpLo> &Eigen::SimplicialLDLT<_MatrixType, _UpLo>::compute(const Eigen::SimplicialLDLT<_MatrixType, _UpLo>::MatrixType &) [with _MatrixType=spMat, _UpLo=2]" at line 97
            instantiation of "Eigen::SimplicialCholeskyBase<Derived>::SimplicialCholeskyBase(const Eigen::SimplicialCholeskyBase<Derived>::MatrixType &) [with Derived=Eigen::SimplicialLDLT<spMat, 2>]" at line 470
            instantiation of "Eigen::SimplicialLDLT<_MatrixType, _UpLo>::SimplicialLDLT(const Eigen::SimplicialLDLT<_MatrixType, _UpLo>::MatrixType &) [with _MatrixType=spMat, _UpLo=2]" at line 17 of "test.cpp"

compilation aborted for test.cpp (code 2)


Any help would be much appreciated, thanks.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
The problem is simply a missing include in SparseCholesky. In the meantime you can simply #include <Eigen/Sparse> to fix the issue (that's also why most people never seen this problem).
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
for the record:

https://bitbucket.org/eigen/eigen/commits/a3c07164632c/
Changeset: a3c07164632c
User: ggael
Date: 2013-06-11 21:13:30
Summary: Add missing dependency in SparseSholesky header

https://bitbucket.org/eigen/eigen/commits/215438987fe6/
Changeset: 215438987fe6
Branch: 3.1
User: ggael
Date: 2013-06-11 21:13:30
Summary: Add missing dependency in SparseSholesky header
(transplanted from a3c07164632c3fceea8b94ae5e2be73f2d72af61)
stuart10
Registered Member
Posts
2
Karma
0
Perfect, that's sorted it.

Many thanks.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]