Skip to content

Commit

Permalink
Allow mpi_init_thread to override the MPI_THREAD_LEVEL
Browse files Browse the repository at this point in the history
Signed-off-by: Austen Lauria <awlauria@us.ibm.com>
(cherry picked from commit babfd93)
  • Loading branch information
AboorvaDevarajan authored and awlauria committed Aug 25, 2021
1 parent aa4529b commit 2bfe913
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ompi/mpi/c/init_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,14 @@ int MPI_Init_thread(int *argc, char ***argv, int required,
int *provided)
{
int err;
char *env;

ompi_hook_base_mpi_init_thread_top(argc, argv, required, provided);

if (NULL != (env = getenv("OMPI_MPI_THREAD_LEVEL"))) {
safe_required = atoi(env);
}

if ( MPI_PARAM_CHECK ) {
if (required < MPI_THREAD_SINGLE || required > MPI_THREAD_MULTIPLE) {
ompi_mpi_errors_are_fatal_comm_handler(NULL, NULL, FUNC_NAME);
Expand Down

0 comments on commit 2bfe913

Please sign in to comment.