-
Notifications
You must be signed in to change notification settings - Fork 43
Parallel reading of serial basis files #316
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
|
@dreamer2368 and @ckendrick Let's review and approve this PR. |
dreamer2368
left a comment
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.
Could you describe the use case of this PR a little more?
- How does a serial basis file look like? Is it a monolithic basis matrix, or some rows of the basis matrix corresponding to a MPI process at the time of POD training?
- What kind of parallel reading is performed here? All MPI processes attempt to read one monolithic basis matrix?
| d_format(db_format) | ||
| { | ||
| CAROM_ASSERT(!base_file_name.empty()); | ||
| d_distributed = comm != MPI_COMM_NULL; |
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.
This concerns me a little bit, since libROM currently does not support custom MPI communicator other than MPI_COMM_WORLD.
Should we add a line of CAROM_VERIFY for checking if the communicator is MPI_COMM_WORLD?
|
@dreamer2368 An example using this PR is in file The workflow being supported is
In this PR, the As you suggested, we could add a verification that the communicator is either |
ckendrick
left a comment
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.
I think using the communicator over a bool for this is a good idea and will hopefully save work later on when we support different MPI communicators.
Could you also add a small test for this feature? It can be something like a simple call to BasisReader with the new communicator option and just check if the Matrix returned has the correct sizes and distributed flag set for each rank.
ckendrick
left a comment
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.
@dylan-copeland thanks for adding the test, this looks good to me now!
I'm okay with this PR as long as a verification line is added. |
This PR enables the reading of serial basis files in parallel, by using the
MPI_COMM_NULLcommunicator inBasisReader.