Skip to content

Commit e0df0f4

Browse files
committed
Make errors_mpi3 compat a global mpi-3 compatibility flag
Signed-off-by: Aurelien Bouteiller <bouteill@icl.utk.edu>
1 parent 7dfe6c1 commit e0df0f4

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

ompi/errhandler/errhandler_invoke.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object,
4747
int32_t state = ompi_mpi_state;
4848
if (state >= OMPI_MPI_STATE_INIT_COMPLETED &&
4949
state < OMPI_MPI_STATE_FINALIZE_PAST_COMM_SELF_DESTRUCT) {
50-
comm = (ompi_mpi_errors_mpi3)? &ompi_mpi_comm_world.comm: &ompi_mpi_comm_self.comm;
50+
comm = (ompi_mpi_compat_mpi3)? &ompi_mpi_comm_world.comm: &ompi_mpi_comm_self.comm;
5151
comm->error_handler->eh_comm_fn(&comm, &err_code, message, NULL);
5252
}
5353
else {

ompi/runtime/ompi_mpi_params.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ bool ompi_async_mpi_finalize = false;
7575
uint32_t ompi_add_procs_cutoff = OMPI_ADD_PROCS_CUTOFF_DEFAULT;
7676
bool ompi_mpi_dynamics_enabled = true;
7777

78-
bool ompi_mpi_errors_mpi3 = true;
78+
bool ompi_mpi_compat_mpi3 = false;
7979

8080
char *ompi_mpi_spc_attach_string = NULL;
8181
bool ompi_mpi_spc_dump_enabled = false;
@@ -326,13 +326,13 @@ int ompi_mpi_register_params(void)
326326
MCA_BASE_VAR_SYN_FLAG_DEPRECATED);
327327
}
328328

329-
ompi_mpi_errors_mpi3 = true;
330-
(void) mca_base_var_register("ompi", "mpi", NULL, "errors_mpi3",
331-
"A boolean value for whether errors in operations without a handle are raised on (true) MPI_COMM_WORLD (MPI-3 behavior) or (false) MPI_COMM_SELF (MPI-4 behavior).",
329+
ompi_mpi_compat_mpi3 = false;
330+
(void) mca_base_var_register("ompi", "mpi", NULL, "compat_mpi3",
331+
"A boolean value for whether Open MPI operates in MPI-3 compatibility mode; this changes the following behavior: in operations without a handle, errors are raised on (true) MPI_COMM_WORLD (MPI-3 behavior) or (false) MPI_COMM_SELF (MPI-4 behavior).",
332332
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
333333
OPAL_INFO_LVL_9,
334334
MCA_BASE_VAR_SCOPE_READONLY,
335-
&ompi_mpi_errors_mpi3);
335+
&ompi_mpi_compat_mpi3);
336336

337337
ompi_mpi_spc_attach_string = NULL;
338338
(void) mca_base_var_register("ompi", "mpi", NULL, "spc_attach",

ompi/runtime/params.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,16 @@ OMPI_DECLSPEC extern bool ompi_mpi_abort_print_stack;
115115
OMPI_DECLSPEC extern int ompi_mpi_abort_delay;
116116

117117
/**
118-
* Whether errors in operations without a handle are raised on
119-
* MPI_COMM_WORLD (MPI-3 behavior) or MPI_COMM_SELF (MPI-4 behavior).
118+
* Whether we operate in MPI3 compatibility, or MPI4 mode (default).
120119
*
121-
* true: raise on MPI_COMM_WORLD
122-
* false: raise on MPI_COMM_SELF
123-
*/
124-
OMPI_DECLSPEC extern bool ompi_mpi_errors_mpi3;
120+
* true: use MPI3 compatibility
121+
* false: use MPI4 compatibility (default)
122+
*
123+
* Behavioral changes:
124+
* - errors in operations without a handle are raised on MPI_COMM_WORLD (MPI-3 behavior) or MPI_COMM_SELF (MPI-4 behavior)
125+
*
126+
*/
127+
OMPI_DECLSPEC extern bool ompi_mpi_compat_mpi3;
125128

126129
/**
127130
* Whether sparse MPI group storage formats are supported or not.

0 commit comments

Comments
 (0)