RcppCore / RcppEigen

Rcpp integration for the Eigen templated linear algebra library
Other
110 stars 40 forks source link

Lots of warnings During Compilation #127

Closed xbasics closed 1 year ago

xbasics commented 1 year ago

Every time I compile RcppEigen I'm getting what seems to be quite a lot warnings like the following. Warnings alone should not be causing problems in calculations done through this package. Yet I wonder if other users are encountering these same warnings when compiling this package and if they have notice/encountered any issues.

../inst/include/Eigen/src/Core/AssignEvaluator.h:879:31: required from ‘static void Eigen::internal::Assignment<DstXprType, SrcXprType, Functor, Eigen::internal::Dense2Dense, Weak>::run(DstXprType&, const SrcXprType&, const Functor&) [with DstXprType = Eigen::Block<Eigen::Matrix<double, -1, 1>, -1, 1, true>; SrcXprType = Eigen::Block<Eigen::Matrix<double, -1, 1>, -1, 1, true>; Functor = Eigen::internal::swap_assign_op; Weak = void]’ ../inst/include/Eigen/src/Core/AssignEvaluator.h:836:49: required from ‘void Eigen::internal::call_assignment_no_alias(Dst&, const Src&, const Func&) [with Dst = Eigen::Block<Eigen::Matrix<double, -1, 1>, -1, 1, true>; Src = Eigen::Block<Eigen::Matrix<double, -1, 1>, -1, 1, true>; Func = swap_assign_op]’ ../inst/include/Eigen/src/Core/AssignEvaluator.h:804:27: required from ‘void Eigen::internal::call_assignment(Dst&, const Src&, const Func&, typename enable_if<(! evaluator_assume_aliasing::value), void>::type) [with Dst = Eigen::Block<Eigen::Matrix<double, -1, 1>, -1, 1, true>; Src = Eigen::Block<Eigen::Matrix<double, -1, 1>, -1, 1, true>; Func = swap_assign_op; typename enable_if<(! evaluator_assume_aliasing::value), void>::type = void; typename evaluator_traits::Shape = Eigen::DenseShape]’ ../inst/include/Eigen/src/Core/DenseBase.h:418:22: required from ‘void Eigen::DenseBase::swap(const Eigen::DenseBase&) [with OtherDerived = Eigen::Block<Eigen::Matrix<double, -1, 1>, -1, 1, true>; Derived = Eigen::Block<Eigen::Matrix<double, -1, 1>, -1, 1, true>]’ ../inst/include/Eigen/src/Core/ProductEvaluators.h:1088:51: [ skipping 10 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] ../inst/include/Eigen/src/Core/AssignEvaluator.h:836:49: required from ‘void Eigen::internal::call_assignment_no_alias(Dst&, const Src&, const Func&) [with Dst = Eigen::Matrix<double, -1, 1>; Src = Eigen::Solve<Eigen::LDLT<Eigen::Matrix<double, -1, -1>, 1>, Eigen::Product<Eigen::Transpose<const Eigen::Map<Eigen::Matrix<double, -1, -1>, 0, Eigen::Stride<0, 0> > >, Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >, 0> >; Func = assign_op<double, double>]’ ../inst/include/Eigen/src/Core/AssignEvaluator.h:804:27: required from ‘void Eigen::internal::call_assignment(Dst&, const Src&, const Func&, typename enable_if<(! evaluator_assume_aliasing::value), void>::type) [with Dst = Eigen::Matrix<double, -1, 1>; Src = Eigen::Solve<Eigen::LDLT<Eigen::Matrix<double, -1, -1>, 1>, Eigen::Product<Eigen::Transpose<const Eigen::Map<Eigen::Matrix<double, -1, -1>, 0, Eigen::Stride<0, 0> > >, Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >, 0> >; Func = assign_op<double, double>; typename enable_if<(! evaluator_assume_aliasing::value), void>::type = void; typename evaluator_traits::Shape = Eigen::DenseShape]’ ../inst/include/Eigen/src/Core/AssignEvaluator.h:782:18: required from ‘void Eigen::internal::call_assignment(Dst&, const Src&) [with Dst = Eigen::Matrix<double, -1, 1>; Src = Eigen::Solve<Eigen::LDLT<Eigen::Matrix<double, -1, -1>, 1>, Eigen::Product<Eigen::Transpose<const Eigen::Map<Eigen::Matrix<double, -1, -1>, 0, Eigen::Stride<0, 0> > >, Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >, 0> >]’ ../inst/include/Eigen/src/Core/PlainObjectBase.h:714:32: required from ‘Derived& Eigen::PlainObjectBase::_set(const Eigen::DenseBase&) [with OtherDerived = Eigen::Solve<Eigen::LDLT<Eigen::Matrix<double, -1, -1>, 1>, Eigen::Product<Eigen::Transpose<const Eigen::Map<Eigen::Matrix<double, -1, -1>, 0, Eigen::Stride<0, 0> > >, Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >, 0> >; Derived = Eigen::Matrix<double, -1, 1>]’ ../inst/include/Eigen/src/Core/Matrix.h:225:24: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::DenseBase&) [with OtherDerived = Eigen::Solve<Eigen::LDLT<Eigen::Matrix<double, -1, -1>, 1>, Eigen::Product<Eigen::Transpose<const Eigen::Map<Eigen::Matrix<double, -1, -1>, 0, Eigen::Stride<0, 0> > >, Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >, 0> >; _Scalar = double; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]’ fastLm.cpp:135:46: required from here ../inst/include/Eigen/src/Core/CoreEvaluators.h:989:54: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type’ {aka ‘__m256d’} [-Wignored-attributes] 989 | PacketAlignment = unpacket_traits::alignment,

...

../inst/include/Eigen/src/Core/CwiseBinaryOp.h:164:18: required from ‘Derived& Eigen::MatrixBase::operator-=(const Eigen::MatrixBase&) [with OtherDerived = Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op, const Eigen::Matrix<double, -1, 1> >, const Eigen::Block<const Eigen::Transpose<const Eigen::Block<Eigen::Block<Eigen::Matrix<double, -1, -1, 1, -1, -1>, 1, -1, true>, 1, -1, false> >, -1, 1, false> >; Derived = Eigen::Block<Eigen::Transpose<Eigen::Matrix<double, 1, -1> >, -1, 1, false>]’ ../inst/include/Eigen/src/Core/products/TriangularMatrixVector.h:282:27: [ skipping 13 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] ../inst/include/Eigen/src/Householder/BlockHouseholder.h:67:33: required from ‘void Eigen::internal::make_block_householder_triangular_factor(TriangularFactorType&, const VectorsType&, const CoeffsType&) [with TriangularFactorType = Eigen::Matrix<double, -1, -1, 1, -1, -1>; VectorsType = Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, -1, false>; CoeffsType = Eigen::VectorBlock<const Eigen::Matrix<double, -1, 1>, -1>]’ ../inst/include/Eigen/src/Householder/BlockHouseholder.h:85:55: required from ‘void Eigen::internal::apply_block_householder_on_the_left(MatrixType&, const VectorsType&, const CoeffsType&, bool) [with MatrixType = Eigen::Block<Eigen::Matrix<double, -1, 1>, -1, -1, false>; VectorsType = Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, -1, false>; CoeffsType = Eigen::VectorBlock<const Eigen::Matrix<double, -1, 1>, -1>]’ ../inst/include/Eigen/src/Householder/HouseholderSequence.h:333:46: required from ‘void Eigen::HouseholderSequence<VectorsType, CoeffsType, Side>::applyThisOnTheLeft(Dest&, Workspace&) const [with Dest = Eigen::Matrix<double, -1, 1>; Workspace = Eigen::Matrix<double, 1, 1, 1, 1, 1>; VectorsType = Eigen::Matrix<double, -1, -1>; CoeffsType = Eigen::Matrix<double, -1, 1>; int Side = 1]’ ../inst/include/Eigen/src/Householder/HouseholderSequence.h:308:25: required from ‘void Eigen::HouseholderSequence<VectorsType, CoeffsType, Side>::applyThisOnTheLeft(Dest&) const [with Dest = Eigen::Matrix<double, -1, 1>; VectorsType = Eigen::Matrix<double, -1, -1>; CoeffsType = Eigen::Matrix<double, -1, 1>; int Side = 1]’ ../inst/include/Eigen/src/Householder/HouseholderSequence.h:360:25: required from ‘typename Eigen::internal::matrix_type_times_scalar_type<typename Eigen::internal::traits<Eigen::HouseholderSequence<VectorsType, CoeffsType, Side> >::Scalar, OtherDerived>::Type Eigen::HouseholderSequence<VectorsType, CoeffsType, Side>::operator*(const Eigen::MatrixBase&) const [with OtherDerived = Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >; VectorsType = Eigen::Matrix<double, -1, -1>; CoeffsType = Eigen::Matrix<double, -1, 1>; int Side = 1; typename Eigen::internal::matrix_type_times_scalar_type<typename Eigen::internal::traits<Eigen::HouseholderSequence<VectorsType, CoeffsType, Side> >::Scalar, OtherDerived>::Type = Eigen::Matrix<double, -1, 1>; typename Eigen::internal::traits<Eigen::HouseholderSequence<VectorsType, CoeffsType, Side> >::Scalar = double]’ fastLm.cpp:101:67: required from here ../inst/include/Eigen/src/Core/CoreEvaluators.h:989:54: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits::type’ {aka ‘__m256d’} [-Wignored-attributes] ../inst/include/Eigen/src/Core/CoreEvaluators.h: In instantiation of ‘struct Eigen::internal::evaluator<Eigen::Block<Eigen::Block<const Eigen::Matrix<double, -1, -1>, -1, -1, true>, -1, -1, false> >’: ../inst/include/Eigen/src/Core/CoreEvaluators.h:99:8: required from ‘struct Eigen::internal::evaluator<const Eigen::Block<Eigen::Block<const Eigen::Matrix<double, -1, -1>, -1, -1, true>, -1, -1, false> >’ ../inst/include/Eigen/src/Core/CoreEvaluators.h:961:41: required from ‘struct Eigen::internal::evaluator<Eigen::Block<const Eigen::Block<Eigen::Block<const Eigen::Matrix<double, -1, -1>, -1, -1, true>, -1, -1, false>, -1, -1, true> >’ ../inst/include/Eigen/src/Core/CoreEvaluators.h:99:8: required from ‘struct Eigen::internal::evaluator<const Eigen::Block<const Eigen::Block<Eigen::Block<const Eigen::Matrix<double, -1, -1>, -1, -1, true>, -1, -1, false>, -1, -1, true> >’ ../inst/include/Eigen/src/Core/CoreEvaluators.h:681:69: required from ‘struct Eigen::internal::binary_evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op, const Eigen::Matrix<double, -1, -1> >, const Eigen::Block<const Eigen::Block<Eigen::Block<const Eigen::Matrix<double, -1, -1>, -1, -1, true>, -1, -1, false>, -1, -1, true> >, Eigen::internal::IndexBased, Eigen::internal::IndexBased, double, double>’ ../inst/include/Eigen/src/Core/CoreEvaluators.h:665:8: required from ‘struct Eigen::internal::evaluator<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op, const Eigen::Matrix<double, -1, -1> >, const Eigen::Block<const Eigen::Block<Eigen::Block<const Eigen::Matrix<double, -1, -1>, -1, -1, true>, -1, -1, false>, -1, -1, true> > >’ ../inst/include/Eigen/src/Core/AssignEvaluator.h:730:20: [ skipping 18 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] ../inst/include/Eigen/src/Core/AssignEvaluator.h:836:49: required from ‘void Eigen::internal::call_assignment_no_alias(Dst&, const Src&, const Func&) [with Dst = Eigen::Matrix<double, -1, 1>; Src = Eigen::Solve<Eigen::HouseholderQR<Eigen::Matrix<double, -1, -1> >, Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> > >; Func = assign_op<double, double>]’

...

eddelbuettel commented 1 year ago

Duplicate of #25 filed only two weeks ago (as well as of course many identical earlier questions).

Feel free to reopen if you really think you can add anything substantial here but in short CRAN requires this are the best (local) remedy is flags in ~/.R/Makevars. It is irritating me too but as said: nuttin' we can do here.