This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 551 - redefining EIGEN_DEFAULT_DENSE_INDEX_TYPE leads to errors
Summary: redefining EIGEN_DEFAULT_DENSE_INDEX_TYPE leads to errors
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: unspecified
Hardware: x86 - 64-bit All
: Normal Unknown
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-08 16:09 UTC by Clemens Hofreither
Modified: 2019-12-04 12:03 UTC (History)
2 users (show)



Attachments
error messages (13.34 KB, text/plain)
2013-02-08 16:11 UTC, Clemens Hofreither
no flags Details

Description Clemens Hofreither 2013-02-08 16:09:55 UTC
I'm on a 64 bit machine, gcc 4.5.4.

The Eigen dense index seems to default to long in this environment. Say I want int indices, so I defined EIGEN_DEFAULT_DENSE_INDEX_TYPE to be int.

During compiling I get these errors:

/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/products/GeneralMatrixMatrix.h: In constructor 'Eigen::internal::gemm_blocking_space<StorageOrder, _LhsScalar, _RhsScalar, MaxRows, MaxCols, MaxDepth, KcFactor, false>::gemm_blocking_space(Eigen::DenseIndex, Eigen::DenseIndex, Eigen::DenseIndex) [with int StorageOrder = 0, _LhsScalar = double, _RhsScalar = double, int MaxRows = -0x00000000000000001, int MaxCols = -0x00000000000000001, int MaxDepth = -0x00000000000000001, int KcFactor = 1, Eigen::DenseIndex = int]':
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/products/GeneralMatrixMatrix.h:420:63:   instantiated from 'void Eigen::GeneralProduct<Lhs, Rhs, 5>::scaleAndAddTo(Dest&, Eigen::GeneralProduct<Lhs, Rhs, 5>::Scalar) const [with Dest = Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, Lhs = Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op<double>, const Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, Rhs = Eigen::Transpose<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, Eigen::GeneralProduct<Lhs, Rhs, 5>::Scalar = double]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/ProductBase.h:111:63:   instantiated from 'void Eigen::ProductBase<Derived, Lhs, Rhs>::scaleAndAddTo(Dest&, Eigen::ProductBase<Derived, Lhs, Rhs>::Scalar) const [with Dest = Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, Derived = Eigen::GeneralProduct<Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op<double>, const Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, Eigen::Transpose<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, 5>, Lhs = Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op<double>, const Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, Rhs = Eigen::Transpose<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, Eigen::ProductBase<Derived, Lhs, Rhs>::Scalar = double]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/ProductBase.h:102:58:   instantiated from 'void Eigen::ProductBase<Derived, Lhs, Rhs>::evalTo(Dest&) const [with Dest = Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, Derived = Eigen::GeneralProduct<Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op<double>, const Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, Eigen::Transpose<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, 5>, Lhs = Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op<double>, const Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, Rhs = Eigen::Transpose<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/ProductBase.h:272:3:   instantiated from 'Derived& Eigen::MatrixBase<Derived>::lazyAssign(const Eigen::ProductBase<ProductDerived, Lhs, Rhs>&) [with ProductDerived = Eigen::GeneralProduct<Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op<double>, const Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, Eigen::Transpose<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, 5>, Lhs = Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op<double>, const Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, Rhs = Eigen::Transpose<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, Derived = Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/PlainObjectBase.h:406:46:   instantiated from 'Derived& Eigen::PlainObjectBase<Derived>::lazyAssign(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::GeneralProduct<Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op<double>, const Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, Eigen::Transpose<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, 5>, Derived = Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/Assign.h:522:123:   instantiated from 'static Derived& Eigen::internal::assign_selector<Derived, OtherDerived, false, false>::run(Derived&, const OtherDerived&) [with Derived = Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, OtherDerived = Eigen::GeneralProduct<Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op<double>, const Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, Eigen::Transpose<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, 5>]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/NoAlias.h:41:108:   instantiated from 'ExpressionType& Eigen::NoAlias<ExpressionType, StorageBase>::operator=(const StorageBase<OtherDerived>&) [with OtherDerived = Eigen::GeneralProduct<Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op<double>, const Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, Eigen::Transpose<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001> >, 5>, ExpressionType = Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, StorageBase = Eigen::MatrixBase]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsAssembler/gsGaussAssembler.hpp:121:13:   instantiated from 'gismo::gsGaussAssembler<T>::Galerkin_Poisson_system_t gismo::gsGaussAssembler<T>::assemblePoisson_impl(const gismo::gsBasis<T>&, const gismo::gsDofMapper<T>&, const gismo::gsMatrix<T>&, const gismo::gsFunction<T>&, int) [with int D = -0x00000000000000001, T = double, gismo::gsGaussAssembler<T>::Galerkin_Poisson_system_t = gismo::system_t<gismo::gsSparseMatrix<double>, gismo::gsVector<double, -0x00000000000000001> >]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsAssembler/gsGaussAssembler.hpp:25:101:   instantiated from 'gismo::gsGaussAssembler<T>::Galerkin_Poisson_system_t gismo::gsGaussAssembler<T>::assemblePoisson(const gismo::gsBasis<T>&, const gismo::gsDofMapper<T>&, const gismo::gsMatrix<T>&, const gismo::gsFunction<T>&, int) [with T = double, gismo::gsGaussAssembler<T>::Galerkin_Poisson_system_t = gismo::system_t<gismo::gsSparseMatrix<double>, gismo::gsVector<double, -0x00000000000000001> >]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsSolver/gsGalerkinPoisson.h:281:62:   instantiated from 'gismo::gsField<T>* gismo::gsGalerkinPoisson<T>::solveMultipatch() [with T = double]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsSolver/gsGalerkinPoisson.h:163:38:   instantiated from 'gismo::gsField<T>* gismo::gsGalerkinPoisson<T>::solve() [with T = double]'
/home/burnside/chofreither/software/gismo/tests/test_compilespeed.cpp:81:40:   instantiated from here
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/products/GeneralMatrixMatrix.h:337:7: error: no matching function for call to 'computeProductBlockingSizes(Eigen::DenseIndex&, Eigen::DenseIndex&, Eigen::DenseIndex&)'
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/products/GeneralMatrixMatrix.h: In constructor 'Eigen::internal::gemm_blocking_space<StorageOrder, _LhsScalar, _RhsScalar, MaxRows, MaxCols, MaxDepth, KcFactor, false>::gemm_blocking_space(Eigen::DenseIndex, Eigen::DenseIndex, Eigen::DenseIndex) [with int StorageOrder = 0, _LhsScalar = double, _RhsScalar = double, int MaxRows = -0x00000000000000001, int MaxCols = -0x00000000000000001, int MaxDepth = -0x00000000000000001, int KcFactor = 4, Eigen::DenseIndex = int]':
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/SolveTriangular.h:99:55:   instantiated from 'static void Eigen::internal::triangular_solver_selector<Lhs, Rhs, Side, Mode, 0, -0x00000000000000001>::run(const Lhs&, Rhs&) [with Lhs = Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, 0, Eigen::Stride<0, 0> >, -0x00000000000000001, -0x00000000000000001, false>, -0x00000000000000001, -0x00000000000000001, false>, Rhs = Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, 0, Eigen::Stride<0, 0> >, -0x00000000000000001, -0x00000000000000001, false>, -0x00000000000000001, -0x00000000000000001, false>, int Side = 1, int Mode = 5]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/SolveTriangular.h:185:3:   instantiated from 'void Eigen::TriangularView<MatrixType, Mode>::solveInPlace(const Eigen::MatrixBase<OtherDerived>&) const [with int Side = 1, OtherDerived = Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, 0, Eigen::Stride<0, 0> >, -0x00000000000000001, -0x00000000000000001, false>, -0x00000000000000001, -0x00000000000000001, false>, _MatrixType = Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, 0, Eigen::Stride<0, 0> >, -0x00000000000000001, -0x00000000000000001, false>, -0x00000000000000001, -0x00000000000000001, false>, unsigned int _Mode = 5u]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/TriangularMatrix.h:342:43:   instantiated from 'void Eigen::TriangularView<MatrixType, Mode>::solveInPlace(const Eigen::MatrixBase<OtherDerived>&) const [with OtherDerived = Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, 0, Eigen::Stride<0, 0> >, -0x00000000000000001, -0x00000000000000001, false>, -0x00000000000000001, -0x00000000000000001, false>, _MatrixType = Eigen::Block<Eigen::Block<Eigen::Map<Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, 0, Eigen::Stride<0, 0> >, -0x00000000000000001, -0x00000000000000001, false>, -0x00000000000000001, -0x00000000000000001, false>, unsigned int _Mode = 5u]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/LU/PartialPivLU.h:362:9:   instantiated from 'static Eigen::internal::partial_lu_impl<Scalar, StorageOrder, PivIndex>::Index Eigen::internal::partial_lu_impl<Scalar, StorageOrder, PivIndex>::blocked_lu(Eigen::internal::partial_lu_impl<Scalar, StorageOrder, PivIndex>::Index, Eigen::internal::partial_lu_impl<Scalar, StorageOrder, PivIndex>::Index, Scalar*, Eigen::internal::partial_lu_impl<Scalar, StorageOrder, PivIndex>::Index, PivIndex*, PivIndex&, Eigen::internal::partial_lu_impl<Scalar, StorageOrder, PivIndex>::Index) [with Scalar = double, int StorageOrder = 0, PivIndex = int, Eigen::internal::partial_lu_impl<Scalar, StorageOrder, PivIndex>::Index = int]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/LU/PartialPivLU.h:379:3:   instantiated from 'void Eigen::internal::partial_lu_inplace(MatrixType&, TranspositionType&, typename TranspositionType::Index&) [with MatrixType = Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, TranspositionType = Eigen::Transpositions<-0x00000000000000001, -0x00000000000000001, int>, typename TranspositionType::Index = int]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/LU/PartialPivLU.h:397:3:   [ skipping 4 instantiation contexts ]
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/LU/Determinant.h:96:96:   instantiated from 'typename Eigen::internal::traits<T>::Scalar Eigen::MatrixBase<Derived>::determinant() const [with Derived = Eigen::Matrix<double, -0x00000000000000001, -0x00000000000000001>, typename Eigen::internal::traits<T>::Scalar = double]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsAssembler/gsGaussAssembler.hpp:118:55:   instantiated from 'gismo::gsGaussAssembler<T>::Galerkin_Poisson_system_t gismo::gsGaussAssembler<T>::assemblePoisson_impl(const gismo::gsBasis<T>&, const gismo::gsDofMapper<T>&, const gismo::gsMatrix<T>&, const gismo::gsFunction<T>&, int) [with int D = -0x00000000000000001, T = double, gismo::gsGaussAssembler<T>::Galerkin_Poisson_system_t = gismo::system_t<gismo::gsSparseMatrix<double>, gismo::gsVector<double, -0x00000000000000001> >]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsAssembler/gsGaussAssembler.hpp:25:101:   instantiated from 'gismo::gsGaussAssembler<T>::Galerkin_Poisson_system_t gismo::gsGaussAssembler<T>::assemblePoisson(const gismo::gsBasis<T>&, const gismo::gsDofMapper<T>&, const gismo::gsMatrix<T>&, const gismo::gsFunction<T>&, int) [with T = double, gismo::gsGaussAssembler<T>::Galerkin_Poisson_system_t = gismo::system_t<gismo::gsSparseMatrix<double>, gismo::gsVector<double, -0x00000000000000001> >]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsSolver/gsGalerkinPoisson.h:281:62:   instantiated from 'gismo::gsField<T>* gismo::gsGalerkinPoisson<T>::solveMultipatch() [with T = double]'
/home/burnside/chofreither/software/gismo/Gismo/src/gsSolver/gsGalerkinPoisson.h:163:38:   instantiated from 'gismo::gsField<T>* gismo::gsGalerkinPoisson<T>::solve() [with T = double]'
/home/burnside/chofreither/software/gismo/tests/test_compilespeed.cpp:81:40:   instantiated from here
/home/burnside/chofreither/software/gismo/Gismo/src/gsExternal/Eigen/src/Core/products/GeneralMatrixMatrix.h:337:7: error: no matching function for call to 'computeProductBlockingSizes(Eigen::DenseIndex&, Eigen::DenseIndex&, Eigen::DenseIndex&)'
make[3]: *** [tests/CMakeFiles/test_compilespeed.dir/test_compilespeed.cpp.o] Error 1
make[2]: *** [tests/CMakeFiles/test_compilespeed.dir/all] Error 2
make[1]: *** [tests/CMakeFiles/test_compilespeed.dir/rule] Error 2


Basically, computeProductBlockingSizes wants references to ptrdiff_t, and an int cannot be passed here.

I assume the same happens if one wants to use 64-bit indices on a 32-bit machine.
Comment 1 Clemens Hofreither 2013-02-08 16:11:01 UTC
Created attachment 313 [details]
error messages
Comment 2 Clemens Hofreither 2013-02-08 16:11:57 UTC
Sorry, the error messages came out a bit unwieldy, I attached them as a separate file.
Comment 4 Nobody 2019-12-04 12:03:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/551.

Note You need to log in before you can comment on or make changes to this bug.