Try for IEEE754-precise poly2tri triangulation results - #4500
Conversation
This kills a little performance but makes it more robust to use the resulting meshes as "gold" results while using less safe optimization options elsewhere.
|
Job Coverage, step Generate coverage on 0648c87 wanted to post the following: CoverageInconsistent report tags were found between the head and base reports. Inconsistent tags: This comment will be updated on new commits. |
|
It turns out that this is insufficient, and even compiling all of I'm not sure if I want to disable FMA optimizations for every single geometric calculation. I may have to make push/pop versions of those pragmas, and put them into |
|
Still haven't had much time to play with this, but I at least checked that the rest of src/mesh and src/numerics were overkill; all we need is the stuff in this PR plus some subset of src/geom |
I've found a third spot that needs them and even my worst impulses can't bring me to copy-and-paste *again*.
This is getting my downstream Poly2Tri triangulations reproduceable at higher optimization settings
Weirdly, the same version of Eigen that gives me this warning for -march=native builds doesn't give me this warning for default arch builds. I don't even want to know what they're doing under the hood there.
|
@loganharbour is fixing us downstream to use tests that enforce the quality of generated triangulations without enforcing the exact mesh refinement pattern, so hopefully this will be redundant with that, but I think in general it's still an improvement for our meshes to be reproduceable, as well as to have a couple handy headers to enforce reproduceable FP arithmetic elsewhere if it's needed. |
|
This works with clang++ too, but I've still got nvc++ compatibility fixes to make before merging. |
@loganharbour is experimenting with adding
CXXFLAGSfor Haswell architecture compiler optimizations, and the fused-multiply-add instructions there are (via rounding differently) changing MOOSEXYDelaunayoutputs. Compiling the whole thing with-ffp-contract=offfixes the problem, but we do want to allow fused-multiply-add in most of our code, so let's see if we can just disable non-IEEE754-compliant optimizations selectively.Leaving this marked as draft until Logan can verify that it works for him.