Skip to content

Commit b3f2a3b

Browse files
authored
Merge pull request #11502 from hppritcha/fix_issue_11407
sessions: plug hole in support for sessions erh
2 parents f4a212f + 185f7bf commit b3f2a3b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

ompi/errhandler/errhandler_invoke.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* reserved.
1717
* Copyright (c) 2016 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
19+
* Copyright (c) 2023 Triad National Security, LLC. All rights
20+
* reserved.
1921
* $COPYRIGHT$
2022
*
2123
* Additional copyrights may follow
@@ -40,6 +42,7 @@ int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object,
4042
ompi_communicator_t *comm;
4143
ompi_win_t *win;
4244
ompi_file_t *file;
45+
ompi_instance_t *instance;
4346

4447
/* If we got no errorhandler, then route the error to the appropriate
4548
* predefined error handler */
@@ -121,6 +124,22 @@ int ompi_errhandler_invoke(ompi_errhandler_t *errhandler, void *mpi_object,
121124
break;
122125
}
123126
break;
127+
128+
case OMPI_ERRHANDLER_TYPE_INSTANCE:
129+
instance = (ompi_instance_t *) mpi_object;
130+
switch (errhandler->eh_lang) {
131+
case OMPI_ERRHANDLER_LANG_C:
132+
errhandler->eh_instance_fn(&instance, &err_code, message, NULL);
133+
break;
134+
135+
case OMPI_ERRHANDLER_LANG_FORTRAN:
136+
fortran_handle = OMPI_INT_2_FINT(instance->i_f_to_c_index);
137+
errhandler->eh_fort_fn(&fortran_handle, &fortran_err_code);
138+
err_code = OMPI_FINT_2_INT(fortran_err_code);
139+
break;
140+
}
141+
break;
142+
124143
}
125144

126145
/* All done */

0 commit comments

Comments
 (0)