Skip to content

Commit 324398e

Browse files
committed
abi: fix problems with error handler converters
Fix problem with the abi -> ompi and ompi -> abi converters for errhandler handles. Also fix the bindings code where the original problem was. We aren't using the bindings framework now to generate the converters but we may possibly return to that approach at some point so fix that code in this commit. Signed-off-by: Howard Pritchard <[email protected]>
1 parent d2015e2 commit 324398e

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

ompi/mpi/bindings/ompi_bindings/consts.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@
195195

196196
RESERVED_ERRHANDLERS = [
197197
'MPI_ERRHANDLER_NULL',
198+
'MPI_ERRHANDLER_ARE_FATAL',
199+
'MPI_ERRHANDLER_ABORT',
200+
'MPI_ERRHANDLER_RETURN',
198201
]
199202

200203
IGNORED_STATUS_HANDLES = [

ompi/mpi/c/abi_converters.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,13 +433,25 @@ __opal_attribute_always_inline__ static inline MPI_Errhandler ompi_convert_abi_e
433433
{
434434
if (MPI_ERRHANDLER_NULL_ABI_INTERNAL == errorhandler) {
435435
return MPI_ERRHANDLER_NULL;
436+
} else if (MPI_ERRORS_ARE_FATAL_ABI_INTERNAL == errorhandler) {
437+
return MPI_ERRORS_ARE_FATAL;
438+
} else if (MPI_ERRORS_ABORT_ABI_INTERNAL == errorhandler) {
439+
return MPI_ERRORS_ABORT;
440+
} else if (MPI_ERRORS_RETURN_ABI_INTERNAL == errorhandler) {
441+
return MPI_ERRORS_RETURN;
436442
}
437443
return (MPI_Errhandler) errorhandler;
438444
}
439445
__opal_attribute_always_inline__ static inline MPI_Errhandler_ABI_INTERNAL ompi_convert_intern_errorhandler_abi_errorhandler(MPI_Errhandler errorhandler)
440446
{
441447
if (MPI_ERRHANDLER_NULL == errorhandler) {
442448
return MPI_ERRHANDLER_NULL_ABI_INTERNAL;
449+
} else if (MPI_ERRORS_ARE_FATAL == errorhandler) {
450+
return MPI_ERRORS_ARE_FATAL_ABI_INTERNAL;
451+
} else if (MPI_ERRORS_ABORT == errorhandler) {
452+
return MPI_ERRORS_ABORT_ABI_INTERNAL;
453+
} else if (MPI_ERRORS_RETURN == errorhandler) {
454+
return MPI_ERRORS_RETURN_ABI_INTERNAL;
443455
}
444456
return (MPI_Errhandler_ABI_INTERNAL) errorhandler;
445457
}

0 commit comments

Comments
 (0)