1
1

Set the initial error handler onto predefined communicators

Signed-off-by: Aurélien Bouteiller <bouteill@icl.utk.edu>

update to the predefined initial error handler selection

Signed-off-by: Aurelien Bouteiller <bouteill@icl.utk.edu>
Этот коммит содержится в:
Aurélien Bouteiller 2020-06-11 12:02:39 -04:00 коммит произвёл Aurelien Bouteiller
родитель 3cd85a9ec5
Коммит 83d0f92152
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 08F60797C5941DB2
2 изменённых файлов: 13 добавлений и 7 удалений

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2017 The University of Tennessee and The University
* Copyright (c) 2004-2020 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -135,8 +135,8 @@ int ompi_comm_init(void)
ompi_mpi_comm_world.comm.c_remote_group = group;
OBJ_RETAIN(ompi_mpi_comm_world.comm.c_remote_group);
ompi_mpi_comm_world.comm.c_cube_dim = opal_cube_dim((int)size);
ompi_mpi_comm_world.comm.error_handler = &ompi_mpi_errors_are_fatal.eh;
OBJ_RETAIN( &ompi_mpi_errors_are_fatal.eh );
ompi_mpi_comm_world.comm.error_handler = ompi_initial_error_handler_eh;
OBJ_RETAIN( ompi_mpi_comm_world.comm.error_handler );
OMPI_COMM_SET_PML_ADDED(&ompi_mpi_comm_world.comm);
opal_pointer_array_set_item (&ompi_mpi_communicators, 0, &ompi_mpi_comm_world);
@ -188,8 +188,8 @@ int ompi_comm_init(void)
ompi_mpi_comm_self.comm.c_local_group = group;
ompi_mpi_comm_self.comm.c_remote_group = group;
OBJ_RETAIN(ompi_mpi_comm_self.comm.c_remote_group);
ompi_mpi_comm_self.comm.error_handler = &ompi_mpi_errors_are_fatal.eh;
OBJ_RETAIN( &ompi_mpi_errors_are_fatal.eh );
ompi_mpi_comm_self.comm.error_handler = ompi_initial_error_handler_eh;
OBJ_RETAIN( ompi_mpi_comm_self.comm.error_handler );
OMPI_COMM_SET_PML_ADDED(&ompi_mpi_comm_self.comm);
opal_pointer_array_set_item (&ompi_mpi_communicators, 1, &ompi_mpi_comm_self);
@ -214,8 +214,10 @@ int ompi_comm_init(void)
ompi_mpi_comm_null.comm.c_contextid = 2;
ompi_mpi_comm_null.comm.c_my_rank = MPI_PROC_NULL;
/* unlike world, self, and parent, comm_null does not inherit the initial error
* handler */
ompi_mpi_comm_null.comm.error_handler = &ompi_mpi_errors_are_fatal.eh;
OBJ_RETAIN( &ompi_mpi_errors_are_fatal.eh );
OBJ_RETAIN( ompi_mpi_comm_null.comm.error_handler );
opal_pointer_array_set_item (&ompi_mpi_communicators, 2, &ompi_mpi_comm_null);
opal_string_copy(ompi_mpi_comm_null.comm.c_name, "MPI_COMM_NULL",
@ -228,6 +230,8 @@ int ompi_comm_init(void)
OBJ_RETAIN(&ompi_mpi_comm_null);
OBJ_RETAIN(&ompi_mpi_group_null.group);
OBJ_RETAIN(&ompi_mpi_errors_are_fatal.eh);
/* During dyn_init, the comm_parent error handler will be set to the same
* as comm_world (thus, the initial error handler). */
/* initialize communicator requests (for ompi_comm_idup) */
ompi_comm_request_init ();

Просмотреть файл

@ -233,7 +233,9 @@ struct ompi_request_t;
int32_t state = ompi_mpi_state; \
if (OPAL_UNLIKELY(state < OMPI_MPI_STATE_INIT_COMPLETED || \
state > OMPI_MPI_STATE_FINALIZE_PAST_COMM_SELF_DESTRUCT)) { \
ompi_mpi_errors_are_fatal_comm_handler(NULL, NULL, name); \
ompi_errhandler_invoke(NULL, NULL, -1, \
ompi_errcode_get_mpi_code(MPI_ERR_ARG), \
name); \
} \
}