-
Notifications
You must be signed in to change notification settings - Fork 860
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
What to do with OMPI_MPI_THREAD_LEVEL env variable? #9332
Comments
In same cases modifying the source code of an application/library is not an option, and being able to alter the behavior of the MPI library remains a critical capability. Among the things users need to control, the thread level comes high, because this will allows the MPI library to handle things in a threaded way (async progress being one of these opportunities). However, as noted in #9312 we have an issue if the user set the OMPI_MPI_THREAD_LEVEL in the way that collides with the application requested thread model. Thus, we need to be careful on the meaning of this variable, and instead of allowing it to force set the thread level we should only allow it to escalate the requested thread level (using the thread level defined by the MPI standard). And as usual 👍 on more documentation. |
In the past our team has also decreased the thread level of an Remember the thread level specified to |
We talked about this on the 31 Aug 2021 Open MPI webex. Conclusions that we came to:
|
I checked the sessions requirements, and I think this will affect the sessions in the same way it affects the MPI_COMM_WORLD model, aka. by enforcing a selectable thread-level. |
I started to implement this, this morning as an mca parameter. Unfortunately the mca system setup needs to know what the thread level is beforehand since it passes that info to various components which behave differently based on the thread level. I will just PR using an env var so that I don't have to touch the mca infrastructure. |
@gpaulsen Any progress on this? Does this need to be done for v5.0.0? I.e., are there backwards compatibility issues with releasing it after v5.0.0? |
I agree; I thought that IBM was interested in back-porting to at least v4.1.x so that you guys could have parity with the community release...? |
This is an opening to a discussion about the
OMPI_MPI_THREAD_LEVEL
environment variable. There's a few issues here:MPI_Init()
as a way for the OMPI developers to set the MPI thread level for apps that callMPI_Init()
(notMPI_Init_thread()
). This allowed us to the thread code in Open MPI without updating every single OMPI test to callMPI_Init_thread()
.MPI_Init_thread()
because the thought was that in this case, the app had asked for exactly what it wanted in therequired
param. Meaning: the env variable override was for legacy apps who still callMPI_INIT
.MPI_Init_thread()
to also obey the value from theOMPI_MPI_THREAD_LEVEL
environment variable. This is a behavior change.OMPI_MPI_THREAD_LEVEL
to end users. I honestly don't remember if it was intended to be a developer-only feature or whether we intended to allow end users to use this functionality.ompi_mpi_init()
(does the Sessions prototype useompi_mpi_init()
?) -- not handled separately in bothMPI_Init()
andMPI_Init_thread()
.OMPI_MPI_THREAD_LEVEL
env variable is actually compliant with the spec. It makes a few statements about how callingMPI_Init()
is the same as callingMPI_Init_thread()
withMPI_THREAD_SINGLE
. This might affect whether we want to expose this "backdoor" functionality to end users.I think a few discussions fall out of the above points:
MPI_INIT
,MPI_INIT_THREAD
, sessions functions, ...)?The text was updated successfully, but these errors were encountered: