Skip to content

Commit a242fa1

Browse files
AboorvaDevarajanjsquyres
authored andcommitted
ompi/errhandler: fix comm errhandler issue
Signed-off-by: Aboorva Devarajan <abodevar@in.ibm.com>
1 parent dfc6ffa commit a242fa1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

ompi/errhandler/errhandler_invoke.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,17 @@ int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object,
4848
if (state >= OMPI_MPI_STATE_INIT_COMPLETED &&
4949
state < OMPI_MPI_STATE_FINALIZE_PAST_COMM_SELF_DESTRUCT) {
5050
comm = (ompi_mpi_compat_mpi3)? &ompi_mpi_comm_world.comm: &ompi_mpi_comm_self.comm;
51-
comm->error_handler->eh_comm_fn(&comm, &err_code, message, NULL);
51+
switch (comm->error_handler->eh_lang) {
52+
case OMPI_ERRHANDLER_LANG_C:
53+
comm->error_handler->eh_comm_fn(&comm, &err_code, message, NULL);
54+
break;
55+
56+
case OMPI_ERRHANDLER_LANG_FORTRAN:
57+
fortran_handle = OMPI_INT_2_FINT(comm->c_f_to_c_index);
58+
comm->error_handler->eh_fort_fn(&fortran_handle, &fortran_err_code);
59+
err_code = OMPI_FINT_2_INT(fortran_err_code);
60+
break;
61+
}
5262
}
5363
else {
5464
if(NULL == ompi_initial_error_handler) {

0 commit comments

Comments
 (0)