Skip to content

Commit 3431c8d

Browse files
Joe-DownsJoseph Downs
authored andcommitted
WIP: add some workarounds for MPI_Fint and MPI_Info_create_env
1 parent 566fdaa commit 3431c8d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ompi/mpi/bindings/c_header.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,15 @@ def output_constant(const, use_enum: bool, mangle_name: bool):
230230
# like "MPI_Group_difference"
231231
datatype_pattern = r"([\( ]?)(" + datatype + r")([; \*\)]{1})"
232232
line = re.sub(datatype_pattern, f"\\g<1>\\g<2>{ABI_INTERNAL}\\g<3>", line)
233+
if "MPI_Fint" in line:
234+
# Comment out a line if it has references to MPI_Fint, we don't need
235+
# that for the ABI
236+
line = f"/* {line} */"
237+
# TODO: pympistandard creates `MPI_Info_create_env` with its `argv`
238+
# parameter being of type `char *` instead of `char **` --- as defined in
239+
# the standard.
240+
if "MPI_Info_create_env" in line:
241+
line = line.replace("char argv[]", "char *argv[]")
233242
output[i] = line
234243

235244
with open(OUTPUT, 'tw') as header_out:

0 commit comments

Comments
 (0)