3
3
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4
4
* University Research and Technology
5
5
* Corporation. All rights reserved.
6
- * Copyright (c) 2004-2017 The University of Tennessee and The University
6
+ * Copyright (c) 2004-2020 The University of Tennessee and The University
7
7
* of Tennessee Research Foundation. All rights
8
8
* reserved.
9
9
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -135,8 +135,8 @@ int ompi_comm_init(void)
135
135
ompi_mpi_comm_world .comm .c_remote_group = group ;
136
136
OBJ_RETAIN (ompi_mpi_comm_world .comm .c_remote_group );
137
137
ompi_mpi_comm_world .comm .c_cube_dim = opal_cube_dim ((int )size );
138
- ompi_mpi_comm_world .comm .error_handler = & ompi_mpi_errors_are_fatal . eh ;
139
- OBJ_RETAIN ( & ompi_mpi_errors_are_fatal . eh );
138
+ ompi_mpi_comm_world .comm .error_handler = ompi_initial_error_handler_eh ;
139
+ OBJ_RETAIN ( ompi_mpi_comm_world . comm . error_handler );
140
140
OMPI_COMM_SET_PML_ADDED (& ompi_mpi_comm_world .comm );
141
141
opal_pointer_array_set_item (& ompi_mpi_communicators , 0 , & ompi_mpi_comm_world );
142
142
@@ -188,8 +188,8 @@ int ompi_comm_init(void)
188
188
ompi_mpi_comm_self .comm .c_local_group = group ;
189
189
ompi_mpi_comm_self .comm .c_remote_group = group ;
190
190
OBJ_RETAIN (ompi_mpi_comm_self .comm .c_remote_group );
191
- ompi_mpi_comm_self .comm .error_handler = & ompi_mpi_errors_are_fatal . eh ;
192
- OBJ_RETAIN ( & ompi_mpi_errors_are_fatal . eh );
191
+ ompi_mpi_comm_self .comm .error_handler = ompi_initial_error_handler_eh ;
192
+ OBJ_RETAIN ( ompi_mpi_comm_self . comm . error_handler );
193
193
OMPI_COMM_SET_PML_ADDED (& ompi_mpi_comm_self .comm );
194
194
opal_pointer_array_set_item (& ompi_mpi_communicators , 1 , & ompi_mpi_comm_self );
195
195
@@ -214,8 +214,10 @@ int ompi_comm_init(void)
214
214
ompi_mpi_comm_null .comm .c_contextid = 2 ;
215
215
ompi_mpi_comm_null .comm .c_my_rank = MPI_PROC_NULL ;
216
216
217
+ /* unlike world, self, and parent, comm_null does not inherit the initial error
218
+ * handler */
217
219
ompi_mpi_comm_null .comm .error_handler = & ompi_mpi_errors_are_fatal .eh ;
218
- OBJ_RETAIN ( & ompi_mpi_errors_are_fatal . eh );
220
+ OBJ_RETAIN ( ompi_mpi_comm_null . comm . error_handler );
219
221
opal_pointer_array_set_item (& ompi_mpi_communicators , 2 , & ompi_mpi_comm_null );
220
222
221
223
opal_string_copy (ompi_mpi_comm_null .comm .c_name , "MPI_COMM_NULL" ,
@@ -228,6 +230,8 @@ int ompi_comm_init(void)
228
230
OBJ_RETAIN (& ompi_mpi_comm_null );
229
231
OBJ_RETAIN (& ompi_mpi_group_null .group );
230
232
OBJ_RETAIN (& ompi_mpi_errors_are_fatal .eh );
233
+ /* During dyn_init, the comm_parent error handler will be set to the same
234
+ * as comm_world (thus, the initial error handler). */
231
235
232
236
/* initialize communicator requests (for ompi_comm_idup) */
233
237
ompi_comm_request_init ();
0 commit comments