Skip to content

bugfix: Setting OMPI_MPI_THREAD_LEVEL to a value different than requested crashes #13211

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abouteiller
Copy link
Member

Setting OMPI_MPI_THREAD_LEVEL to a value different than requested in MPI_Init_thread would invoke the error handler, even though it is an useful override in some threaded library use cases.

char *env;

ompi_hook_base_mpi_init_thread_top(argc, argv, required, provided);

/* Detect an incorrect thread support level, but dont report until we have the minimum
* infrastructure setup.
*/
if( (MPI_THREAD_SINGLE == required) || (MPI_THREAD_SERIALIZED == required) ||
Copy link
Member Author

@abouteiller abouteiller Apr 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is inconsistent with the way this is tested in MPI_INIT, I picked this resolution with an explicit individual check per value, this should be more in-tune with ABI values when that becomes relevant.

@abouteiller abouteiller removed the bug label Apr 25, 2025
@abouteiller abouteiller force-pushed the bugfix/env-thread-level-ignored branch 3 times, most recently from 7a81ed0 to b71461f Compare April 25, 2025 16:15
`requested` in `MPI_Init_thread` would invoke the error handler, even
though it is an useful override in some threaded library use cases.

Signed-off-by: Aurelien Bouteiller <[email protected]>
@abouteiller abouteiller force-pushed the bugfix/env-thread-level-ignored branch from b71461f to b481893 Compare April 25, 2025 16:29
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.

OMPI_MPI_THREAD_LEVEL cannot override 'required' in MPI_Init_thread
1 participant