According to MPI-3.1 p681, we're supposed to have MPI_F08_STATUS[ES]_IGNORE in mpi.h.
@jsquyres i started this
fwiw, this is the tip of the iceberg ...
MPI_Status_f082c and MPI_Status_f082f and friends is where the heavy work is
btw, why OMPI_IS_FORTRAN_STATUS_IGNORE does not simply use MPI_F_STATUS_IGNORE ?
@ggouaillardet Probably just so that all the declarations in mpif-c-constants-decl.h are of the same form...?
@jsquyres i just found i screwed up some time ago ...
in ompi/mpi/fortran/base/constants.h from the v1.10 branch
* Since we made the fundamental decision to support all 4 common
* fortran compiler symbol conventions within the same library for
* those compilers who support weak symbols, we need to have 4 symbols
* for each of the fortran address constants. As described above, we
* have to have known *pointer* values for the fortran addresses
* (e.g., MPI_STATUS_IGNORE). So when the fortran wrapper for
* MPI_RECV gets (MPI_Fint *status), it can check (status ==
* some_sentinel_value) to know that it got the Fortran equivalent of
* MPI_STATUS_IGNORE and therefore pass the C MPI_STATUS_IGNORE to the
* C MPI_Recv.
but later, i made some changes that you documented
* Generation 3 / starting with v2.x: OMPI_IS_FORTRAN_foo() will check
* just the one symbol that is relevant for your compiler/platform
* (based on what configure figured out).
bottom line, if i build ompi master with gfortran (single underscore by default) and
build my app with -fsecond-underscore, then the application builds successfully, but
MPI_STATUS_IGNORE and friends are not interpreted correctly
that being said, MPI_F_STATUS_IGNORE and MPI_F08_STATUS_IGNORE cannot work as expected if we make the fundamental decision to support all 4 common fortran compiler symbol conventions within the same library
at this stage, my opinion is we cannot support all 4 common fortran compiler symbol conventions within the same library, so i'd rather fix the comment and remove all the weak symbols we do not want any more starting from gen3, and use MPI_F_STATUS_IGNORE inside OMPI_FORTRAN_IS_STATUS_IGNORE
any thoughts ?
@jsquyres
from mpi 3.1 standard page 658
int MPI_Status_f2f08(MPI_Fint *f_status, MPI_F08_status *f08_status)
MPI_Status_f2f08(f_status, f08_status, ierror)
INTEGER, INTENT(IN) :: f_status(MPI_STATUS_SIZE)
TYPE(MPI_Status), INTENT(OUT) :: f08_status
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
MPI_STATUS_F2F08(F_STATUS, F08_STATUS, IERROR)
INTEGER :: F_STATUS(MPI_STATUS_SIZE)
TYPE(MPI_Status) :: F08_STATUS
INTEGER IERROR
i am not sure how to interpret that ...
there are C and Fortran2008 subroutines MPI_Status_f2f08
what about MPI_STATUS_F2F08 ?
is this an other name of the same function from the use mpi_f08 binding ?
is this a use mpi binding ? in this case, TYPE(MPI_Status) is Fortran 2008 syntax, so i am a bit puzzled ...
or is this simply an error ?
Has there been any progress on this? Note that MPI_F08_STATUS[ES]_IGNORE actually appeared in MPI-3.0 (see page 674). Technically, Open MPI isn't fully compliant with MPI-3.0 or MPI-3.1, though in practice, I doubt these constants are in much use (else I would expect there to be more of a fuss about the omission) and are most likely not a part of any test suite.
Looking at other implementations, it appears that MPICH defines these constants, though they just point them to MPI_STATUS[ES]_IGNORE and state they aren't used. Note that they accidentally mis-named the struct in previous versions (MPI_F08_Status instead of MPI_F08_status). This is true for MPICH-derived libraries as well, such as Intel MPI.
I'm currently working on an MPI binding for Swift鈥攆or now, at least, I'll leave these constants out, as it appears to be problematic in a number of implementations.
Hi,
are there any news regarding the inclusing of MPI_F08_Status C-type and the MPI_Status_f082c C-routine? I need them in a lot of places of a project I am working on and a workaround via F90-status transfers would be possible, but ugly and cumbersome.
Hi again.
While trying to implement a workaround I realized that it is also not possible to convert between f08 and f77 status variables with openmpi. This means that there is no way to in open-mpi to pass an f08 status in any way to a c-routine, either directly or inderectly via f77.
@SpinTensor I am working on it
Ugh; are we missing a bunch of the status conversion functions from MPI-3.1 Figure 17.1 (aka figure 33 in https://www.mpi-forum.org/docs/mpi-3.1/mpi31-report/node447.htm#Node447)? That's... embarrassing. 鈽癸笍 @ggouaillardet If you have a PR up soon, I'll be happy to test / review.
Would be Very Good to have this in time for v5.0.0 (i.e., ASAP).
@jsquyres PR was posted 3 hours ago, and I chose you as the reviewer :-)
note MPI_F08_STATUS[ES]_IGNORE is still not defined (mangling issue iirc) but all the conversion subroutines are now implemented.