Skip to content

Commit 0704146

Browse files
committed
fixes to abi_get_fortran_info
for logicals Signed-off-by: Howard Pritchard <[email protected]>
1 parent f738ba1 commit 0704146

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

ompi/mpi/c/ompi_abi_fortran.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ int ompi_abi_get_fortran_info(ompi_info_t **info)
117117
}
118118
#endif
119119

120-
#if OMPI_SIZEOF_FORTRAN_LOGICAL1
120+
#if OMPI_DATATYPE_MPI_LOGICAL1
121+
cptr = (OMPI_DATATYPE_MPI_LOGICAL1 != OMPI_DATATYPE_MPI_UNAVAILABLE) ? true_str : false_str;
121122
cptr = true_str;
122123
#else
123124
cptr = false_str;
@@ -127,8 +128,8 @@ int ompi_abi_get_fortran_info(ompi_info_t **info)
127128
goto err_cleanup;
128129
}
129130

130-
#if OMPI_SIZEOF_FORTRAN_LOGICAL2
131-
cptr = true_str;
131+
#if OMPI_DATATYPE_MPI_LOGICAL2
132+
cptr = (OMPI_DATATYPE_MPI_LOGICAL2 != OMPI_DATATYPE_MPI_UNAVAILABLE) ? true_str : false_str;
132133
#else
133134
cptr = false_str;
134135
#endif
@@ -137,8 +138,8 @@ int ompi_abi_get_fortran_info(ompi_info_t **info)
137138
goto err_cleanup;
138139
}
139140

140-
#if OMPI_SIZEOF_FORTRAN_LOGICAL4
141-
cptr = true_str;
141+
#if OMPI_DATATYPE_MPI_LOGICAL4
142+
cptr = (OMPI_DATATYPE_MPI_LOGICAL4 != OMPI_DATATYPE_MPI_UNAVAILABLE) ? true_str : false_str;
142143
#else
143144
cptr = false_str;
144145
#endif
@@ -147,8 +148,8 @@ int ompi_abi_get_fortran_info(ompi_info_t **info)
147148
goto err_cleanup;
148149
}
149150

150-
#if OMPI_SIZEOF_FORTRAN_LOGICAL8
151-
cptr = true_str;
151+
#if OMPI_DATATYPE_MPI_LOGICAL8
152+
cptr = (OMPI_DATATYPE_MPI_LOGICAL8 != OMPI_DATATYPE_MPI_UNAVAILABLE) ? true_str : false_str;
152153
#else
153154
cptr = false_str;
154155
#endif
@@ -157,11 +158,13 @@ int ompi_abi_get_fortran_info(ompi_info_t **info)
157158
goto err_cleanup;
158159
}
159160

160-
#if OMPI_SIZEOF_FORTRAN_LOGICAL16
161-
cptr = true_str;
161+
#if OMPI_DATATYPE_MPI_LOGICAL16
162+
cptr = (OMPI_DATATYPE_MPI_LOGICAL16 != OMPI_DATATYPE_MPI_UNAVAILABLE) ? true_str : false_str;
163+
fprintf(stderr, "cptr = %s\n", cptr);
162164
#else
163165
cptr = false_str;
164166
#endif
167+
fprintf(stderr ,"setting mpi_logical16_supported to %s\n", cptr);
165168
ret = opal_info_set(&newinfo->super, "mpi_logical16_supported", cptr);
166169
if (OPAL_SUCCESS != ret) {
167170
goto err_cleanup;

0 commit comments

Comments
 (0)