Skip to content
Snippets Groups Projects

Draft: MatrixMarket for GMPField and Float128

Open Simon Praetorius requested to merge issue/matrixmarket-gmpfield into master
1 unresolved thread

Summary

This MR solves an issue with MatrixMarket writer for GMPField (and Float128) that came up on the mailinglist, see https://lists.dune-project.org/pipermail/dune/2021-June/015117.html

Merge request reports

Approval is optional
Ready to merge by members who can write to the target branch.

Merge details

  • The source branch is 367 commits behind the target branch.
  • 1 commit and 1 merge commit will be added to .
  • Source branch will not be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • Note, the matrixmarkettest still fails due to some problem in the test for equality of floating point values in combination with SIMD types. There is the check Dune::Simd::anyTrue(*entry!=*entry1) that compares the written with the read vector entries. But unfortunately one cannot control the tolerance in the comparison (at least, I don't know how). For GMPField this test then fails.

    • If someone has an idea how to fix the SIMD issue, this MR is ready to be merged.

    • You could fix the test by checking the difference Dune::Simd::anyTrue(abs(*entry - *entry1) > eps) with a suitably chosen eps.

      The choice of the eps is then the main question... The docs state

      The nonzero values may be in either in fixed or floating point representation, to any precision (although Fortran and C typically parse less than 20 significant digits).

      So the question is in which precision do we want to write GMPField and Float128? The latter could be written exact, while for GPMField this might be (practically) impossible. So... do we need an addition precision parameter?

      The test currently assumes that we write the data with full precision and that is exactly what is checked.

    • Could we use something like Dune::Simd::anyTrue(Dune::FloatCmp::eq(*entry, *entry1))? For the FloatCmp class one can set a tolerance., or an EpsilonType. This is fixed to float if the data-type is GMPField.

    • Please register or sign in to reply
  • changed milestone to %DUNE 2.8.0

  • Timo Koch changed milestone to %DUNE 2.9.0

    changed milestone to %DUNE 2.9.0

  • Robert K removed milestone %DUNE 2.9.0

    removed milestone %DUNE 2.9.0

  • While this solves an issue, the implementation is not yet complete. Will be marked as "Draft" until a solution for SIMD is available. Also, I will add this to the milestone 2.11.

  • changed milestone to %DUNE 2.11.0

  • Simon Praetorius marked this merge request as draft

    marked this merge request as draft

Please register or sign in to reply
Loading