Re: [eigen] SparseQR compilation error

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


right, I missed one specialization in previous patch. Should be fixed now.


gael


On Mon, Sep 2, 2013 at 7:26 AM, Pavel Holoborodko <pavel@xxxxxxxxxxxxxxx> wrote:
Hi Gael,

Thank you again for the patch. Indeed, it fixes compilation error for the multiplication:

m_R = tempR * m_pivotperm;

where m_R and tempR are SparseMatrix<double> and m_pivotperm is a permutation matrix.

However I compiler gives similar error, when I try to get solution from the solver. Please see the code:

     typedef double Scalar;
    typedef Eigen::SparseMatrix< Scalar > SparseDoubleMatrix;
    typedef Eigen::Matrix <Scalar, Eigen::Dynamic, 1> DenseDoubleVector;
    typedef Eigen::Matrix <Scalar, Eigen::Dynamic, Eigen::Dynamic> DenseDoubleMatrix;
    typedef SparseDoubleMatrix::Index Index;


    typedef PermutationMatrix<Dynamic, Dynamic, Index> PermutationType;

    SparseDoubleMatrix A(10,10);
    PermutationType pivotperm;
    
    pivotperm.setIdentity(A.cols());

    A = A * pivotperm;   // <- your patch fixed error here

    SparseQR< SparseDoubleMatrix, COLAMDOrdering<Index> > solver;
    solver.compute(A);

    DenseDoubleVector B(10), x;

    x = solver.solve(B); // <- now ICC compiler screams here (referenced as line #296 in compiler backlog, see below)

My settings: Windows 7, ICC 13.1 integrated to MSVC2010. 

Is there place where I can put another EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl) to satisfy the compiler ;) ?
Thank in you in advance. 

Full compiler backlog is:

1>U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/Core/Block.h(110): error : class "Eigen::BlockImpl<const Eigen::SparseMatrix<Scalar={double}, 0, Index={int}>, -1, -1, 0, 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<Scalar={double}, 0, Index={int}>, BlockRows=-1, BlockCols=-1, InnerPanel=0]" at line 163 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/SparseCore/../plugins/BlockMethods.h"
1>              instantiation of "const Eigen::Block<const Derived, -1, -1, 0> Eigen::SparseMatrixBase<Derived>::topLeftCorner(Eigen::SparseMatrixBase<Derived>::Index, Eigen::SparseMatrixBase<Derived>::Index) const [with Derived=Eigen::SparseMatrix<Scalar={double}, 0, Index={int}>]" at line 164 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/SparseQR/SparseQR.h"
1>              instantiation of "bool Eigen::SparseQR<_MatrixType, _OrderingType>::_solve(const Eigen::MatrixBase<Rhs> &, Eigen::MatrixBase<Dest> &) const [with _MatrixType=Eigen::SparseMatrix<Scalar={double}, 0, Index={int}>, _OrderingType=Eigen::COLAMDOrdering<Index={int}>, Rhs=Eigen::Matrix<double, -1, 1, 0, -1, 1>, Dest=Eigen::Matrix<double, -1, 1, 0, -1, 1>]" at line 531 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/SparseQR/SparseQR.h"
1>              instantiation of "void Eigen::internal::solve_retval<Eigen::SparseQR<_MatrixType, OrderingType>, Rhs>::evalTo(Dest &) const [with _MatrixType=Eigen::SparseMatrix<Scalar={double}, 0, Index={int}>, OrderingType=Eigen::COLAMDOrdering<Index={int}>, Rhs=Eigen::Matrix<double, -1, 1, 0, -1, 1>, Dest=Eigen::Matrix<double, -1, 1, 0, -1, 1>]" at line 51 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/misc/Solve.h"
1>              instantiation of "void Eigen::internal::solve_retval_base<_DecompositionType, Rhs>::evalTo(Dest &) const [with _DecompositionType=Eigen::SparseQR<Eigen::SparseMatrix<Scalar={double}, 0, Index={int}>, Eigen::COLAMDOrdering<Index={int}>>, Rhs=Eigen::Matrix<double, -1, 1, 0, -1, 1>, Dest=Eigen::Matrix<double, -1, 1, 0, -1, 1>]" 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::solve_retval_base<Eigen::SparseQR<Eigen::SparseMatrix<Scalar={double}, 0, Index={int}>, Eigen::COLAMDOrdering<Index={int}>>, Eigen::Matrix<double, -1, 1, 0, -1, 1>>, Dest=Eigen::Matrix<double, -1, 1, 0, -1, 1>]" at line 522 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/Core/Assign.h"
1>              instantiation of "Derived &Eigen::internal::assign_selector<Derived, OtherDerived, 0, 0>::evalTo(ActualDerived &, const ActualOtherDerived &) [with Derived=Eigen::Matrix<double, -1, 1, 0, -1, 1>, OtherDerived=Eigen::internal::solve_retval_base<Eigen::SparseQR<Eigen::SparseMatrix<Scalar={double}, 0, Index={int}>, Eigen::COLAMDOrdering<Index={int}>>, Eigen::Matrix<double, -1, 1, 0, -1, 1>>, ActualDerived=Eigen::Matrix<double, -1, 1, 0, -1, 1>,
1>                        ActualOtherDerived=Eigen::ReturnByValue<Eigen::internal::solve_retval_base<Eigen::SparseQR<Eigen::SparseMatrix<Scalar={double}, 0, Index={int}>, Eigen::COLAMDOrdering<Index={int}>>, Eigen::Matrix<double, -1, 1, 0, -1, 1>>>]" at line 578 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/Core/Assign.h"
1>              instantiation of "Derived &Eigen::MatrixBase<Derived>::operator=(const Eigen::ReturnByValue<OtherDerived> &) [with Derived=Eigen::Matrix<double, -1, 1, 0, -1, 1>, OtherDerived=Eigen::internal::solve_retval_base<Eigen::SparseQR<Eigen::SparseMatrix<Scalar={double}, 0, Index={int}>, Eigen::COLAMDOrdering<Index={int}>>, Eigen::Matrix<double, -1, 1, 0, -1, 1>>]" at line 418 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/Core/PlainObjectBase.h"
1>              instantiation of "Derived &Eigen::PlainObjectBase<Derived>::operator=(const Eigen::ReturnByValue<OtherDerived> &) [with Derived=Eigen::Matrix<double, -1, 1, 0, -1, 1>, OtherDerived=Eigen::internal::solve_retval_base<Eigen::SparseQR<Eigen::SparseMatrix<Scalar={double}, 0, Index={int}>, Eigen::COLAMDOrdering<Index={int}>>, Eigen::Matrix<double, -1, 1, 0, -1, 1>>]" at line 190 of "U:\Development\trunk\libs\eigen-mp-3.2\Eigen\src/Core/Matrix.h"
1>              instantiation of "Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> &Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::ReturnByValue<OtherDerived> &) [with _Scalar=double, _Rows=-1, _Cols=1, _Options=0, _MaxRows=-1, _MaxCols=1, OtherDerived=Eigen::internal::solve_retval_base<Eigen::SparseQR<Eigen::SparseMatrix<Scalar={double}, 0, Index={int}>, Eigen::COLAMDOrdering<Index={int}>>, Eigen::Matrix<double, -1, 1, 0, -1, 1>>]" at
1>                        line 296 of "eigen_test.cpp"



On Wed, Aug 21, 2013 at 10:28 PM, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:

On Wed, Aug 21, 2013 at 8:52 AM, Pavel Holoborodko <pavel@xxxxxxxxxxxxxxx> wrote:
Your patch fixes the compilation issue with Intel Compiler. 
However EIGEN_INHERIT_ASSIGNMENT_OPERATORS(BlockImpl) should be placed in "public", not "private" section.

ok, thank you. Fix applied:

https://bitbucket.org/eigen/eigen/commits/09c5bd1da9ab/
Changeset:   09c5bd1da9ab
User:        ggael
Date:        2013-08-21 15:28:53
Summary:     Fix compilation with ICC/MSVC combo





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/