eschnett/MPItrampoline

Some Fortran functions are missing the 'ierror' argument

mkre opened this issue · 4 comments

mkre commented

Hi,

Some of the signatures in mpi_functions_fortran.py are missing the ierror argument. I think ierror needs to be present as an argument in all MPI functions except MPI_Wtime(), MPI_Wtick(), MPI_Aint_add(), MPI_Aint_diff().

This can lead to hard-to-catch bugs at run time for applications using mpif.h. The same applies to the MPIwrapper code. Let me know if I should also open an issue over there.

Thanks,
Moritz

Indeed, e.g. MPI_Waitany is missing the ierror argument. Thanks for finding this.

(There is no need to open another issue.)

mkre commented

It's not only MPI_Waitany(). This should be the full list:

  • MPI_Waitany()
  • MPI_Testany()
  • MPI_Waitall()
  • MPI_Testall()
  • MPI_Waitsome()
  • MPI_Testsome()
  • MPI_Startall()
  • MPI_Type_create_struct()
  • MPI_Type_struct()
  • MPI_Type_get_contents()
  • MPI_Alltoallw()
  • MPI_Op_create()
  • MPI_Op_free()
  • MPI_Ialltoallw()
  • MPI_Neighbor_alltoallw()
  • MPI_Ineighbor_alltoallw()
  • MPI_Finalize()

EDIT: Just saw the "e.g." in your comment above, so you were already aware of the fact there are more ;)

Yes, I wrote a Python script to check for all missing ierror variables.