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

lack of Eigen asserts causing failures #904

Closed
bob-carpenter opened this issue Aug 25, 2014 · 2 comments
Closed

lack of Eigen asserts causing failures #904

bob-carpenter opened this issue Aug 25, 2014 · 2 comments
Assignees
Milestone

Comments

@bob-carpenter
Copy link
Contributor

Removing the EIGEN_NO_DEBUG flag:

-CFLAGS = -I src -isystem $(EIGEN) -isystem $(BOOST) -Wall -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -pipe -DEIGEN_NO_DEBUG
+CFLAGS = -I src -isystem $(EIGEN) -isystem $(BOOST) -Wall -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -pipe

leads to a world of hurt in the unit tests.

At least the following are known failures:

src/test/unit-agrad-rev/matrix/LDLT_alloc_test.cpp
src/test/unit-agrad-rev/matrix/append_col_test.cpp
src/test/unit-agrad-rev/matrix/append_row_test.cpp
  • The first one needs conditional behavior based on EIGEN_NO_DEBUG which someone conveniently left in the files
  • The last two cut-and-paste the same bug, which is allocating an Eigen vector of size 2 and then putting 3 objects into it. It's a bug in the test that wasn't caught with EIGEN_NO_DEBUG turned on.

I have to clean this up before I can tackle the nested agrad tests.

@bob-carpenter bob-carpenter added this to the v2.4.0++ milestone Aug 25, 2014
@bob-carpenter bob-carpenter self-assigned this Aug 25, 2014
@randommm
Copy link
Member

For a similar reason, a while ago I suggested the addition of the flag -D_GLIBCXX_DEBUG to compile tests. This one makes std::vector operator vec[n] be checked just like vec.at(n) is. I think it's worth considering it again.

P.S.: sorry, my mistake on the last two tests.

@syclik
Copy link
Member

syclik commented Aug 26, 2014

Can someone look at factor_U within src/stan/prob/transforms.hpp?

It doesn't look like it is doing the right thing and I don't know the implementation details well enough to get this implemented correctly.

Perhaps it's just a test issue. It's in factorU test in src/test/unit/prob/transforms_test.cpp.

@syclik syclik closed this as completed in d4f8a54 Aug 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants