Skip to content

Commit 14beec1

Browse files
committed
abi_fortran: add support for LOGICAL16
Signed-off-by: Howard Pritchard <[email protected]>
1 parent 05a7e3d commit 14beec1

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

ompi/mpi/c/ompi_abi_fortran.c

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,10 @@ int ompi_abi_get_fortran_info(ompi_info_t **info)
158158
goto err_cleanup;
159159
}
160160

161-
#if 0
162-
/* TODO need to bolt in fortran logical16 data type */
163161
#if OMPI_SIZEOF_FORTRAN_LOGICAL16
164162
cptr = true_str;
165163
#else
166164
cptr = false_str;
167-
#endif
168165
#endif
169166
ret = opal_info_set(&newinfo->super, "mpi_logical16_supported", "false");
170167
if (OPAL_SUCCESS != ret) {
@@ -459,6 +456,24 @@ int ompi_abi_get_fortran_booleans(int logical_size, void *logical_true, void *lo
459456
unavailable = true;
460457
break;
461458
}
459+
case OMPI_SIZEOF_FORTRAN_LOGICAL16:
460+
switch (OMPI_DATATYPE_MPI_LOGICAL16) {
461+
case OMPI_DATATYPE_MPI_INT8_T:
462+
use_int8_t = true;
463+
break;
464+
case OMPI_DATATYPE_MPI_INT16_T:
465+
use_int16_t = true;
466+
break;
467+
case OMPI_DATATYPE_MPI_INT32_T:
468+
use_int32_t = true;
469+
break;
470+
case OMPI_DATATYPE_MPI_INT64_T:
471+
use_int64_t = true;
472+
break;
473+
default:
474+
unavailable = true;
475+
break;
476+
}
462477
default:
463478
unavailable = true;
464479
}

0 commit comments

Comments
 (0)