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

ofi/common: fix code that broke sessions #12882

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

hppritcha
Copy link
Member

With sessions initialization model (section 11.3 of MPI 4 standard) MPI may be initialized and finalized any number of times.

This patch refactors code that was assuming a one shot init/finalize sequence for initializing Open MPI and its MCA param space

The underlying problem with the replaced code was that when an app calls MPI_Session_finalize and there are no more sessions active, the MCA param space is destroyed. So if one does not build Open MPI to use dynamically load components, and a component is using static variables in a way that assumes the MCA param space is always preserved if a static variable is set to some value, then things break if a subsequent MPI_Session_init is invoked.

Related to #12869

Signed-off-by: Howard Pritchard [email protected]
(cherry picked from commit 2f4ba1b)

With sessions initialization model (section 11.3 of MPI 4 standard)
MPI may be initialized and finalized any number of times.

This patch refactors code that was assuming a one shot init/finalize
sequence for initializing Open MPI and its MCA param space

The underlying problem with the replaced code was that when an app calls MPI_Session_finalize
and there are no more sessions active, the MCA param space is
destroyed.  So if one does not build Open MPI to use dynamically load components,
and a component is using static variables in a way that assumes the MCA param
space is always preserved if a static variable is set to some value,
then things break if a subsequent MPI_Session_init is invoked.

Related to open-mpi#12869

Signed-off-by: Howard Pritchard <[email protected]>
(cherry picked from commit 2f4ba1b)
@github-actions github-actions bot added this to the v5.0.6 milestone Oct 25, 2024
@janjust janjust merged commit a4d90c8 into open-mpi:v5.0.x Oct 30, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants