ompi icon indicating copy to clipboard operation
ompi copied to clipboard

add support for request_get_status_any/all/some

Open edgargabriel opened this issue 5 months ago • 7 comments
trafficstars

Add support for the new MPI_Request_get_status_any/all/some functions introduced with MPI 4.1

This PR contains the C implementation for the functions as well as the man-pages. There are however also some things missing:

  • in the C code generation python scripts, we need to introduce the ability to create const MPI_Request[], (I have currently removed the const from the function definitions in mpi.h.in in order to make the code compile).
  • Fortran interfaces

edgargabriel avatar May 26 '25 20:05 edgargabriel

Let me know if you want help with the python binding infrastructure.

hppritcha avatar May 26 '25 23:05 hppritcha

Let me know if you want help with the python binding infrastructure.

@hppritcha yes, I would appreciate some help on that front (and the same applies for the fortran bindings, even if its just a conversation that I understand what needs to be done).

edgargabriel avatar May 27 '25 13:05 edgargabriel

@edgargabriel added new data type to the bindings code to add this new use of const MPI_Request reqs[] in the standard.

hppritcha avatar May 27 '25 18:05 hppritcha

I'll work on the fortran but that will have to wait till later in the week.

hppritcha avatar May 27 '25 18:05 hppritcha

note that mpi4py is probably not testing this since it keys off our MPI_Get_version return values for major/minor. @edgargabriel have you tested mpi4py with VERSION faked to return 4.1?

hppritcha avatar May 27 '25 18:05 hppritcha

@hppritcha thank you very much, I will test it later this week. I have not done the mpi4py test that you mentioned, will look into this as well.

edgargabriel avatar May 28 '25 13:05 edgargabriel

note that mpi4py is probably not testing this since it keys off our MPI_Get_version return values for major/minor. @edgargabriel have you tested mpi4py with VERSION faked to return 4.1?

faking MPI 4.1. for mpi4py doesn't work unfortunately, we fail the compilation of mpi4py due to other missing function (MPI_Buffer_flush etc.). I will write some tests for the new functions.

edgargabriel avatar Jun 11 '25 22:06 edgargabriel

@edgargabriel i pushed the remainder of the fortran related files to the PR - hopefully.

hppritcha avatar Jun 19 '25 19:06 hppritcha

@edgargabriel i pushed the remainder of the fortran related files to the PR - hopefully.

@hppritcha thank you! I hope to finish up adding tests to the ibm testsuite for the new function this weekend, and hopefully next week we could merge the PR if all tests pass.

edgargabriel avatar Jun 19 '25 20:06 edgargabriel

I added some tests for request_get_status_any/all/some to the ompi-tests private testsuite, and they pass. This is however only testing the C-interfaces of the function. The tests are also probably not entirely bullet-proof in terms of that they might miss some corner cases, but the base function is shown to be working.

edgargabriel avatar Jun 21 '25 23:06 edgargabriel

did we add the tests for this to ompi-tests? i'm triaging compile failures for the tests in my mtt runs:


request_get_status_all.c:32:9: error: call to undeclared function 'MPI_Request_get_status_all'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]    32 \|         MPI_Request_get_status_all(1, req, &flag, statuses);       \|         ^ request_get_status_all.c:32:9: note: did you mean 'MPI_Request_get_status'? /home/howardp/mtt/master_scratch/MiddlewareBuild_OMPIMaster/include/mpi.h:2234:20: note: 'MPI_Request_get_status' declared here  2234 \| OMPI_DECLSPEC  int MPI_Request_get_status(MPI_Request request, int *flag,       \|                    ^ 1 error generated. make[1]: Leaving directory '/home/howardp/mtt/master_scratch/TestGet_IBM/ompi-tests/ibm/pt2pt' make[1]: *** [Makefile:1582: request_get_status_all.o] Error 1 make: *** [Makefile:430: all-recursive] Error 1
--
Environment |  

hppritcha avatar Aug 13 '25 18:08 hppritcha

did we add the tests for this to ompi-tests? i'm triaging compile failures for the tests in my mtt runs:


request_get_status_all.c:32:9: error: call to undeclared function 'MPI_Request_get_status_all'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]    32 \|         MPI_Request_get_status_all(1, req, &flag, statuses);       \|         ^ request_get_status_all.c:32:9: note: did you mean 'MPI_Request_get_status'? /home/howardp/mtt/master_scratch/MiddlewareBuild_OMPIMaster/include/mpi.h:2234:20: note: 'MPI_Request_get_status' declared here  2234 \| OMPI_DECLSPEC  int MPI_Request_get_status(MPI_Request request, int *flag,       \|                    ^ 1 error generated. make[1]: Leaving directory '/home/howardp/mtt/master_scratch/TestGet_IBM/ompi-tests/ibm/pt2pt' make[1]: *** [Makefile:1582: request_get_status_all.o] Error 1 make: *** [Makefile:430: all-recursive] Error 1
--
Environment |  

@hppritcha I added these tests to the ibm testsuite https://github.com/open-mpi/ompi-tests/pull/189

edgargabriel avatar Aug 13 '25 21:08 edgargabriel

It was probably too early to merge it, should have waited until we merge the actual code. Sorry, I didn't think it through :-(

edgargabriel avatar Aug 13 '25 21:08 edgargabriel

related to #13279

hppritcha avatar Aug 14 '25 13:08 hppritcha