Skip to content

Commit 8819790

Browse files
AboorvaDevarajanawlauria
authored andcommitted
Allow mpi_init_thread to override the MPI_THREAD_LEVEL
Signed-off-by: Austen Lauria <awlauria@us.ibm.com> (cherry picked from commit babfd93)
1 parent a666e01 commit 8819790

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ompi/mpi/c/init_thread.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ int MPI_Init_thread(int *argc, char ***argv, int required,
4848
int *provided)
4949
{
5050
int err;
51+
char *env;
52+
53+
if (NULL != (env = getenv("OMPI_MPI_THREAD_LEVEL"))) {
54+
required = atoi(env);
55+
}
5156

5257
ompi_hook_base_mpi_init_thread_top(argc, argv, required, provided);
5358

0 commit comments

Comments
 (0)