-
Notifications
You must be signed in to change notification settings - Fork 37
FieldsIO implementation for 0D to 2D cartesian grid fields, with MPI #512
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Looks very nice! I really have just two main issues:
- need to write global grid but local fields in MPI version of 2d cartesian grid
- I would like protection against accidental overwrite of previous files
brownbaerchen
approved these changes
Jan 17, 2025
|
All seems fine now, can be merged anytime |
|
Go ahead, can’t do this today.On 18. Jan 2025, at 10:37, Thibaut Lunet ***@***.***> wrote:
All seems fine now, can be merge anytime
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A small issue I encountered, in my attempt to use pySDC generated data to train a ML model for Rayleigh Benard convection, is that there was no efficient options (that I knew of) to write many (many many) field solutions when running many space-parallel simulations, hence a "tiny" technical problem.
So I quickly implemented a
FieldsIOgeneric (abstract) class to write multiple field solution into a binary file, and specialized it to scalar, 1D and 2D fields written on Cartesian grids. All are compatible with Numpy arrays, and each class is as generic as possible, such that most problem class using one or moremeshclass for their state variable can use it.Also, I added the MPI-IO functionalities to the 1D and 2D grid classes, that can be used with any type of Cartesian block decomposition : user simply has to specify its own local bounds at start, and the classes automatically deals with the collective writing of the local fields.
Testing is done in sequential and parallel, and the parallel tests uses some basic
BlockDecompositionclass, that can be used up to 3D problems.Note
This was mostly inspired from previous works during my PhD. It may be moved in a near future to a more generic package (as
qmat), since there is also an high-order interpolation algorithm (also compatible with MPI cartesian decomposition, developed during the end of my PhD) that I would like to make as a standalone package, and was needing this specific part.Bonus
CI uses now a "modern" python approach that installs
pySDCin the test environment, so tests do not need somesys.pathmodification anymore, to ensurepySDCis in the path when running tests ...