Reply to topic

SparseQR compilation error

pavelh
Registered Member
Posts
9
Karma
0

SparseQR compilation error

Sat Aug 10, 2013 11:13 am
Hi,

I am testing solvers for sparse systems.
Intel C++ compiler chokes on this code:

Code: Select all
typedef Eigen::SparseMatrix< double > SparseDoubleMatrix;

SparseQR< SparseDoubleMatrix, COLAMDOrdering<int> > solver;

SparseDoubleMatrix A(10,10);   // Just dummy matrix for now (I know how to use SparseMatrices properly :))
solver.compute(A);


Compiler points to solver.compute(A) with error message:
class "Eigen::BlockImpl<const Eigen::SparseMatrix<double, 0, int>, -1, 1, 1, Eigen::Sparse>" has no member "operator="

Error persists for any OrderingType.

Interestingly, error only shows for SparseQR. If I use SparseLU - everything compiles fine.

Full template instantiation chain lead to error is http://www.holoborodko.com/pavel/downloads/sparseqr-compilation-error.txt

Would appreciate any help & pointers how to solve the problem.

Thank you,
Pavel.
User avatar ggael
Moderator
Posts
2198
Karma
15
OS

Re: SparseQR compilation error

Mon Aug 12, 2013 10:03 am
Works for me with ICC 11, 12, and 13 using this self-contained code:
Code: Select all
#include <Eigen/SparseQR>
using namespace Eigen;
int main() {
  typedef Eigen::SparseMatrix< double > SparseDoubleMatrix;

  SparseQR< SparseDoubleMatrix, COLAMDOrdering<int> > solver;

  SparseDoubleMatrix A(10,10);   // Just dummy matrix for now (I know how to use SparseMatrices properly :))
  solver.compute(A);
}
pavelh
Registered Member
Posts
9
Karma
0

Re: SparseQR compilation error

Mon Aug 12, 2013 10:25 am
Hi Gael,

Thank you for your response.

Unfortunately error still persists even for simple self-contained test (copy-paste from yours).
My system is Windows 7 64-bit, ICC 13.1 integrated into MSVC 2010, using the most recent Eigen 3.2 and from source repository.

Will try to run complete Eigen test suite tonight.

Here is full cal stack if anyone interested:
U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/Core/Block.h(110): error : class "Eigen::BlockImpl<const Eigen::SparseMatrix<double, 0, int>, -1, 1, 1, Eigen::Sparse>" has no member "operator="
1> EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block)
1> ^
1> detected during:
1> instantiation of class "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel> [with XprType=const Eigen::SparseMatrix<double, 0, int>, BlockRows=-1, BlockCols=1, InnerPanel=1]" at line 260 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/SparseCore/SparseBlock.h"
1> instantiation of "const Eigen::SparseMatrixBase<Derived>::ConstInnerVectorReturnType Eigen::SparseMatrixBase<Derived>::innerVector(Eigen::SparseMatrixBase<Derived>::Index) const [with Derived=Eigen::SparseMatrix<double, 0, int>]" at line 64 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/SparseCore/SparsePermutation.h"
1> instantiation of "void Eigen::internal::permut_sparsematrix_product_retval<PermutationType, MatrixType, Side, Transposed>::evalTo(Dest &) const [with PermutationType=Eigen::PermutationBase<Eigen::PermutationMatrix<-1, -1, int>>, MatrixType=Eigen::SparseMatrix<double, 0, int>, Side=2, Transposed=0, Dest=Eigen::SparseMatrix<double, 0, int>]" at line 61 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/Core/ReturnByValue.h"
1> instantiation of "void Eigen::ReturnByValue<Derived>::evalTo(Dest &) const [with Derived=Eigen::internal::permut_sparsematrix_product_retval<Eigen::PermutationBase<Eigen::PermutationMatrix<-1, -1, int>>, Eigen::SparseMatrix<double, 0, int>, 2, 0>, Dest=Eigen::SparseMatrix<double, 0, int>]" at line 180 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/SparseCore/SparseMatrixBase.h"
1> instantiation of "Derived &Eigen::SparseMatrixBase<Derived>::operator=(const Eigen::ReturnByValue<OtherDerived> &) [with Derived=Eigen::SparseMatrix<double, 0, int>, OtherDerived=Eigen::internal::permut_sparsematrix_product_retval<Eigen::PermutationBase<Eigen::PermutationMatrix<-1, -1, int>>, Eigen::SparseMatrix<double, 0, int>, 2, 0>]" at line 734 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/SparseCore/SparseMatrix.h"
1> instantiation of "Eigen::SparseMatrix<_Scalar, _Options, _Index> &Eigen::SparseMatrix<_Scalar, _Options, _Index>::operator=(const Eigen::ReturnByValue<OtherDerived> &) [with _Scalar=double, _Options=0, _Index=int, OtherDerived=Eigen::internal::permut_sparsematrix_product_retval<Eigen::PermutationBase<Eigen::PermutationMatrix<-1, -1, int>>, Eigen::SparseMatrix<double, 0, int>, 2, 0>]" at line 508 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/SparseQR/SparseQR.h"
1> instantiation of "void Eigen::SparseQR<_MatrixType, _OrderingType>::factorize(const Eigen::SparseQR<_MatrixType, _OrderingType>::MatrixType &) [with _MatrixType=Eigen::SparseMatrix<double, 0, int>, _OrderingType=Eigen::COLAMDOrdering<int>]" at line 87 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/SparseQR/SparseQR.h"
1> instantiation of "void Eigen::SparseQR<_MatrixType, _OrderingType>::compute(const Eigen::SparseQR<_MatrixType, _OrderingType>::MatrixType &) [with _MatrixType=Eigen::SparseMatrix<double, 0, int>, _OrderingType=Eigen::COLAMDOrdering<int>]" at line 16 of "eigen_test.cpp"
1>
1> compilation aborted for eigen_test.cpp (code 2)
pavelh
Registered Member
Posts
9
Karma
0

Re: SparseQR compilation error

Mon Aug 12, 2013 10:38 am
In the same time, native MSVC 2010 compiler has no problem with the code!

Last ICC 13.1 (update 5) seems to be a problem, not Eigen.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], capslock, cloose, edmael, Exabot [Bot], Google [Bot], GreatEmerald, HmpfCBR, johngates, koriun, Majestic-12 [Bot], mgraesslin, piedro, psbot [Picsearch], sledz, Sogou [Bot], TheraHedwig, tparrott, Yahoo [Bot]