Skip to content

Commit

Permalink
mpi: use pointers for array_of_statuses
Browse files Browse the repository at this point in the history
Apparently some compilers -- gcc-11.2 -- will differentiate between
    MPI_Status array_of_statuses[]
and
    MPI_Status *array_of_statuses
and warns if we pass MPI_STATUSES_IGNORE to the former.

Note: the standard uses the latter form.
  • Loading branch information
hzhou committed Jan 6, 2022
1 parent 0f82b30 commit f6cd207
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions maint/local_python/binding_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ def get_C_param(param, func, mapping):
else:
# MPI_Init, MPI_Init_thread -> char ***argv
want_star = 3
elif kind == "STATUS" and param['length'] is not None:
# MPI_{Wait,Test}{all,some}
# gcc-11 warns when we pass MPI_STATUSES_IGNORE to MPI_Status statues[]
want_star = 1
elif not want_star:
if is_pointer_type(param):
if kind == "STRING_ARRAY":
Expand Down

0 comments on commit f6cd207

Please sign in to comment.