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

testLinearStructure (dec) fails with recent Boost versions. #1268

Open
rolanddenis opened this issue Jun 20, 2017 · 6 comments
Open

testLinearStructure (dec) fails with recent Boost versions. #1268

rolanddenis opened this issue Jun 20, 2017 · 6 comments

Comments

@rolanddenis
Copy link
Member

When compiling testLinearStructure using Boost version 1.63.0 or 1.64.0, it fails with the following message:

New Block [testing 3d operators]
  [dec | primal 0-cells <-> dual 3-cells (2) | primal 1-cells <-> dual 2-cells (5) | primal 2-cells <-> dual 1-cells (4) | primal 3-cells <-> dual 0-cells (1)]
  New Block [base operators]
    d0
[primal 0-form => primal 1-form (2 => 5)]
-1  1
 0  1
 0  1
-1  0
-1  0
    d2p
[dual 2-form => dual 3-form (5 => 2)]
-1  0  0 -1 -1
 1  1  1  0  0
    [ERR] Fatal Error - assertion (Eigen::MatrixXd(d0.myContainer) == d0_th) failed in void test_manual_operators_3d(): /scratch/denis/DGtal/tests/dec/testLinearStructure.cpp(391)
Abandon (core dumped)

The related code https://github.com/DGtal-team/DGtal/blob/master/tests/dec/testLinearStructure.cpp#L391 suggests that the primal 0-form should instead be:

d0_th <<
    -1, 0,
    -1, 0,
    -1, 1,
     0, 1,
     0, 1;

It is indeed the case when using Boost 1.58.0.

Tested with GNU 5.4.1, 6.2.0 and 7.1.1, with Eigen 3.3.3 and 3.3.4.

@dcoeurjo
Copy link
Member

dcoeurjo commented Apr 5, 2021

Looks ok with the last boost 1.75.
Should we keep this issue open?

@dcoeurjo dcoeurjo closed this as completed Apr 5, 2021
Issue triage automation moved this from Inbox to Done Apr 5, 2021
@rolanddenis
Copy link
Member Author

Still fails on my side with GCC 10.2.0, Eigen 3.3.9 and Boost 1.75.0 ... Does it work on your side ?

@rolanddenis rolanddenis reopened this Apr 6, 2021
Issue triage automation moved this from Done to Inbox Apr 6, 2021
@dcoeurjo
Copy link
Member

dcoeurjo commented Apr 6, 2021

Ok so the problem does not come from boost 1.75 itself, maybe a combo GCC10+boost1.75.
(clang+boost1.75 is fine).

@rolanddenis
Copy link
Member Author

Fails also with LLVM 10.0.0, Boost 1.75.0 and Eigen 3.3.9 (Ubuntu), strange...

@rolanddenis
Copy link
Member Author

I cannot test on Boost 1.58.0 anymore but looking at code of DiscreteExteriorCalcul shows that it depends on Boost for boost::array and boost::unordered_map. Naively replacing boost::unordered_map by std::map to define myProperties leads to another, but still invalid, result. Using std::unordered_map leads to a correct result for this specific comparison but another one fails just after.

It behaves like something is implementation dependent...

@rolanddenis
Copy link
Member Author

In DiscreteExteriorCalculus::updateIndexes, index associated to each cell depends on the read order of myCellProperties.
In DiscreteExteriorCalculus::derivative, this index is used as column index to fill the resulting sparse array, thus invalidating comparison in testLinearStructure with hard coded expected result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Issue triage
  
Inbox
Development

No branches or pull requests

2 participants