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

Prevent integer overflow for large grid files in gwb-grid #702

Merged

Conversation

gassmoeller
Copy link
Contributor

When visualizing a large grid file with gwb-grid I noticed a broken .vtu output even though the .wb file worked for smaller resolutions. Turns out there is a conversion to int in the output even though the vector type for the output is vtu11::VtkIndexType which resolves to std::int64_t. This PR fixes the problem and I can visualize the .vtu file correctly. Btw: This is not just a problem for outputs with >2 billion points, as the indices and connectivity for the output can reach this threshold much sooner, the model in question for me had 300 million points.

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.21%. Comparing base (e8aa93d) to head (06e11d4).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #702      +/-   ##
==========================================
- Coverage   98.24%   98.21%   -0.03%     
==========================================
  Files         107      107              
  Lines        7464     7464              
==========================================
- Hits         7333     7331       -2     
- Misses        131      133       +2     
Files Coverage Δ
source/gwb-grid/main.cc 97.61% <100.00%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8aa93d...06e11d4. Read the comment docs.

Copy link

Benchmark Main Feature Difference (99.9% CI)
Slab interpolation simple none 1.023 ± 0.034 (s=430) 1.021 ± 0.005 (s=453) -0.8% .. +0.3%
Slab interpolation curved simple none 1.029 ± 0.004 (s=449) 1.023 ± 0.004 (s=430) -0.7% .. -0.5%
Spherical slab interpolation simple none 1.173 ± 0.009 (s=386) 1.174 ± 0.007 (s=384) -0.1% .. +0.2%
Slab interpolation simple curved CMS 1.059 ± 0.005 (s=398) 1.062 ± 0.005 (s=453) +0.1% .. +0.4%
Spherical slab interpolation simple CMS 1.559 ± 0.011 (s=284) 1.560 ± 0.011 (s=296) -0.1% .. +0.3%
Spherical fault interpolation simple none 1.178 ± 0.006 (s=380) 1.178 ± 0.009 (s=386) -0.2% .. +0.1%
Cartesian min max surface 2.304 ± 0.026 (s=196) 2.301 ± 0.017 (s=197) -0.4% .. +0.2%
Spherical min max surface 7.204 ± 0.014 (s=66) 7.211 ± 0.035 (s=61) -0.1% .. +0.3%

Copy link
Member

@MFraters MFraters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

odd, I would have assumed int on most system would have been 64 bit, but looking into it it seems that it is only 32 on most systems. Anyway, thanks for the fix!

@MFraters MFraters merged commit 0fa5424 into GeodynamicWorldBuilder:main Mar 28, 2024
35 of 39 checks passed
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

Successfully merging this pull request may close these issues.

2 participants