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

Parallel snapshot generation with a custom MPI communicator #197

Open
dreamer2368 opened this issue Mar 21, 2023 · 2 comments
Open

Parallel snapshot generation with a custom MPI communicator #197

dreamer2368 opened this issue Mar 21, 2023 · 2 comments

Comments

@dreamer2368
Copy link
Collaborator

Currently BasisReader, BasisWriter, and BasisGenerator are initialized with only MPI_COMM_WORLD. This has been a limitation, particularly for generating samples in parallel. This happens when multiple samples can be run in parallel, but no communication is needed between each sample, so each sample can have a different communicator or even simply run with one process.

Did anybody come across with this situation, and how did you work around this? Or should we change the initializations so that each class can be initialized with a custom MPI Communicator?

@chldkdtn
Copy link
Collaborator

This is a good point. I think your domain decomposition ROM will be the first application where parallel sampling can get benefits. I think your suggestion makes sense, but it has to be done so that all previous usage cases do not break. @dylan-copeland , any thought?

@dylan-copeland
Copy link
Collaborator

@dreamer2368 you are right that the code assumes sampling of a variable in the global domain distributed with MPI_COMM_WORLD, and I believe you are the first person to need independent sampling and basis generation on different processes. This will require generalizations of the classes you mentioned, to allow for constructing them with different communicators. It would also be possible to have a serial version without any MPI, which assumes each variable is independent of other processes. This would be simpler to implement than allowing for different communicators, but it would not work in the most general case of variables parallelized within subdomains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants