-
Notifications
You must be signed in to change notification settings - Fork 900
v2.0.x: oshmem: move finalisation to oshmem_onexit #2120
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
v2.0.x: oshmem: move finalisation to oshmem_onexit #2120
Conversation
…nexit() so we can use the legacy start_pes even when Open MPI is compiled with --enable-static or --disable-visibility (back-ported from commit 92dd719)
@ggouaillardet Is this a bug fix, or a new feature? |
A bug fix |
This is the v2.0.x version of #2121. |
Ok, it's a bug fix. This is new behavior, though -- I think we'll need a good amount of testing to know that our shutdown procedures are safe during the process destructor. Question: When will this destructor fire?
|
@jsquyres Answers to your questions. See
There is no longer a destructor. |
This change is valid in case ompi/config/oshmem_configure_options.m4 Line 105 in 0d1afba
@jladd-mlnx @ggouaillardet @jsquyres Do you think it is reasonable limitation? |
oshmem is Linux only, right ? |
Note that currently, and if I understand correctly, if |
@ggouaillardet in original implementation |
Copying @ggouaillardet's comment from #2121 (comment), just so that the entire conversation is here on this PR: for the record, my initial analysis was incorrect. i thought shmem_finalize() was never invoked under the hood if legacy start_pes() is used. i do not know if/how destructors can be ordered in the case of static libraries. having shmem_finalize() invoked at exit (via on_exit()) ensures it is invoked before opal_class_finalize() so everything is fine. |
@ggouaillardet So I'm getting a little lost in the conversation. Does this PR fix a problem, or does it just change the mechanism for how the shutdown stuff is invoked? |
@jsquyres it does solve a problem @igor-ivanov thanks for the comments, i will review them. |
@igor-ivanov an other option that does not require |
@ggouaillardet may be we could use see https://phoxis.org/2011/04/27/c-language-constructors-and-destructors-with-gcc/ |
@igor-ivanov thanks for the pointer, I was not aware of this. |
We talked about this again on the call today. Everyone seems either neutral or ok with it: it solves a corner case that not many people will run into, but some will. So let's do it. |
…nexit()
so we can use the legacy start_pes even when Open MPI is compiled with
--enable-static or --disable-visibility
(back-ported from commit 92dd719)