33 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
44 * University Research and Technology
55 * 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
77 * of Tennessee Research Foundation. All rights
88 * reserved.
99 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -135,8 +135,8 @@ int ompi_comm_init(void)
135135 ompi_mpi_comm_world .comm .c_remote_group = group ;
136136 OBJ_RETAIN (ompi_mpi_comm_world .comm .c_remote_group );
137137 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 );
140140 OMPI_COMM_SET_PML_ADDED (& ompi_mpi_comm_world .comm );
141141 opal_pointer_array_set_item (& ompi_mpi_communicators , 0 , & ompi_mpi_comm_world );
142142
@@ -188,8 +188,8 @@ int ompi_comm_init(void)
188188 ompi_mpi_comm_self .comm .c_local_group = group ;
189189 ompi_mpi_comm_self .comm .c_remote_group = group ;
190190 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 );
193193 OMPI_COMM_SET_PML_ADDED (& ompi_mpi_comm_self .comm );
194194 opal_pointer_array_set_item (& ompi_mpi_communicators , 1 , & ompi_mpi_comm_self );
195195
@@ -214,8 +214,10 @@ int ompi_comm_init(void)
214214 ompi_mpi_comm_null .comm .c_contextid = 2 ;
215215 ompi_mpi_comm_null .comm .c_my_rank = MPI_PROC_NULL ;
216216
217+ /* unlike world, self, and parent, comm_null does not inherit the initial error
218+ * handler */
217219 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 );
219221 opal_pointer_array_set_item (& ompi_mpi_communicators , 2 , & ompi_mpi_comm_null );
220222
221223 opal_string_copy (ompi_mpi_comm_null .comm .c_name , "MPI_COMM_NULL" ,
@@ -228,6 +230,8 @@ int ompi_comm_init(void)
228230 OBJ_RETAIN (& ompi_mpi_comm_null );
229231 OBJ_RETAIN (& ompi_mpi_group_null .group );
230232 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). */
231235
232236 /* initialize communicator requests (for ompi_comm_idup) */
233237 ompi_comm_request_init ();
0 commit comments