-
Notifications
You must be signed in to change notification settings - Fork 48
Write fsgrid domain size as a 64bit number, instead of 32bit. #532
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
Conversation
Without this, writing a 5th refinement level would have silently failed.
Is it compatible with older restarts?
…On 8 February 2021 19:50:20 EET, Urs Ganse ***@***.***> wrote:
Without this, writing a 5th refinement level would have silently failed
and restarting from those file (or plotting them) would have just given
bogus data.
This fixes #517.
Tested with the restart_write and restart_read tests, and by plotting
files with visit.
You can view, comment on, or merge this pull request online at:
#532
-- Commit Summary --
* Write fsgrid domain size as a 64bit number, instead of 32bit.
-- File Changes --
M iowrite.cpp (2)
-- Patch Links --
https://github.com/fmihpc/vlasiator/pull/532.patch
https://github.com/fmihpc/vlasiator/pull/532.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#532
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Yep. It actually only changed a single line, where the data was written. |
So, should this be added to said plugin then?
…On 8 February 2021 22:26:52 EET, Urs Ganse ***@***.***> wrote:
Yep. It actually only changed a single line, where the data was
written.
Indeed, since I just checked: we never even read MESH_DOMAIN_SIZES in
the fsgrid reader code, so this would only break the Visit plugin
reading.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#532 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
According to #517, the Visit plugin already reads it correctly so no change is required:
|
Hmm, actually looks like line Line 583 in 81d92b2
also has the mesh domain size as uint32_t And in ioread.cpp we do read the mesh domain size but that's already uint64_t. |
vlsvdiff.cpp line 259 |
True, but in that case I'm not so worried about it, since that affects vlasovGrid and individiual velocity grids only. For those, we are still very comfortably away from 2³² cells. Of course it doesn't really hurt to just change that also, then we should be future-proof forever in this respect.
And those are really just the velocity space mesh domains. They will remain small for all forseeable future. :) |
But does the visit plugin read those in as uint64s? Even if we don't need the memory space quite yet, we should consolidate the variable size between the different access methods. |
Good catch, I'm fixing and testing this. |
Yes it does, see here: https://github.com/fmihpc/vlsv/blob/master/visit-plugin/mesh_metadata_visit_ucd_amr.cpp#L251 |
Compare issue fmihpc#517 and pull request fmihpc#532. Even though this is not likely to ever be an issue for the ionosphere, this does squelch two compilation warnings.
I think we could move this up to Vlasiator-5.1 as it is required for compiling with AOCC / clang on some systems |
And actually: is there anything preventing us from merging this immediately? It seems to work well and improve compilation on AOCC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let it merge!
Without this, writing a 5th refinement level would have silently failed and restarting from those file (or plotting them) would have just given bogus data.
This fixes #517.
Tested with the restart_write and restart_read tests, and by plotting files with visit.