Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to Eigen 3.3.9 #2235

Closed
spinkney opened this issue Dec 4, 2020 · 5 comments
Closed

update to Eigen 3.3.9 #2235

spinkney opened this issue Dec 4, 2020 · 5 comments

Comments

@spinkney
Copy link
Collaborator

spinkney commented Dec 4, 2020

I know there was an update not too long ago but there seems to be plenty of bug fixes since. See the changelog.

@rok-cesnovar
Copy link
Member

Thanks!

We need to wait for 3.3.8 to also be available in RcppEigen because that is what rstan uses and we want to be in-sync.
We could also just upgrade as:

  • by the time there will be the next rstan release RcppEigen will most likely use 3.3.8
  • its a patch release, so there should be no interfacing changes that would break rstan

I asked the Rcppeigen devs on the timeline and if any of us can help: RcppCore/RcppEigen#91

@bgoodri
Copy link
Contributor

bgoodri commented Dec 5, 2020

There is a build failure with Eigen 3.3.9 (and possibly 3.3.8). I get

In file included from /home/ben/r-devel/library/StanHeaders/include/stan/math/rev/core/matrix_vari.hpp:4,
                 from /home/ben/r-devel/library/StanHeaders/include/stan/math/rev/core.hpp:16,
                 from ./stan/model/model_base.hpp:5,
                 from Module.cpp:2:
/home/ben/r-devel/library/StanHeaders/include/stan/math/rev/mat/fun/Eigen_NumTraits.hpp:200:77: error: wrong number of template arguments (8, should be 9)
                                      RhsStorageOrder, ConjugateRhs, ColMajor> {
                                                                             ^

@rok-cesnovar
Copy link
Member

rok-cesnovar commented Dec 5, 2020

This is with Stan Headers set to develop Stan Math or Stan Math 3.4.0? Or current CRAN StanHeaders?

@bgoodri
Copy link
Contributor

bgoodri commented Dec 5, 2020

Current everything on CRAN except drat RcppEigen 3.3.9. I should have probably included more of the error message:

In file included from /home/ben/r-devel/library/StanHeaders/include/stan/math/rev/core/matrix_vari.hpp:4,
                 from /home/ben/r-devel/library/StanHeaders/include/stan/math/rev/core.hpp:16,
                 from ./stan/model/model_base.hpp:5,
                 from Module.cpp:2:
/home/ben/r-devel/library/StanHeaders/include/stan/math/rev/mat/fun/Eigen_NumTraits.hpp:200:77: error: wrong number of template arguments (8, should be 9)
                                      RhsStorageOrder, ConjugateRhs, ColMajor> {
                                                                             ^
In file included from /home/ben/r-devel/library/RcppEigen/include/Eigen/Core:454,
                 from /home/ben/r-devel/library/RcppEigen/include/Eigen/Dense:1,
                 from /home/ben/r-devel/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:13,
                 from /home/ben/r-devel/library/StanHeaders/include/stan/math/prim/mat/meta/append_return_type.hpp:4,
                 from /home/ben/r-devel/library/StanHeaders/include/stan/math/prim/meta.hpp:9,
                 from /home/ben/r-devel/library/StanHeaders/include/stan/math/memory/stack_alloc.hpp:7,
                 from /home/ben/r-devel/library/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4,
                 from /home/ben/r-devel/library/StanHeaders/include/stan/math/rev/core.hpp:4,
                 from ./stan/model/model_base.hpp:5,
                 from Module.cpp:2:
/home/ben/r-devel/library/RcppEigen/include/Eigen/src/Core/util/BlasUtil.h:35:8: note: provided for ‘template<class Index, class LhsScalar, int LhsStorageOrder, bool ConjugateLhs, class Rh$
 struct general_matrix_matrix_product;
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@bgoodri
Copy link
Contributor

bgoodri commented Dec 6, 2020

It seems that an emergency StanHeaders will have to uploaded to CRAN that branches on EIGEN_MINOR_VERSION in order to preserve compatibility with all the existing CRAN packages and pave the way for RcppEigen to upgrade to 3.3.9. Do we at least understand what we have to do with the 8 vs. 9 template arguments to the NumTraits thing?

@rok-cesnovar rok-cesnovar changed the title update to Eigen 3.3.8 update to Eigen 3.3.9 Dec 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants