Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing MPI_F08_STATUS[ES]_IGNORE #1475

Closed
jsquyres opened this issue Mar 18, 2016 · 16 comments
Closed

Add missing MPI_F08_STATUS[ES]_IGNORE #1475

jsquyres opened this issue Mar 18, 2016 · 16 comments
Assignees
Labels
Milestone

Comments

@jsquyres
Copy link
Member

According to MPI-3.1 p681, we're supposed to have MPI_F08_STATUS[ES]_IGNORE in mpi.h.

@jsquyres jsquyres added the bug label Mar 18, 2016
@jsquyres jsquyres added this to the v2.1.0 milestone Mar 18, 2016
@ggouaillardet
Copy link
Contributor

@jsquyres i started this

@ggouaillardet ggouaillardet self-assigned this Mar 23, 2016
@ggouaillardet
Copy link
Contributor

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 ?

@jsquyres
Copy link
Member Author

@ggouaillardet Probably just so that all the declarations in mpif-c-constants-decl.h are of the same form...?

@ggouaillardet
Copy link
Contributor

@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 ?

@ggouaillardet
Copy link
Contributor

@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 ?

@omor1
Copy link
Contributor

omor1 commented Dec 31, 2016

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—for now, at least, I'll leave these constants out, as it appears to be problematic in a number of implementations.

@jsquyres jsquyres modified the milestones: v2.x, v2.1.0, v2.1.1 Feb 21, 2017
@hppritcha hppritcha modified the milestones: v2.1.2, v2.1.1 Apr 24, 2017
@hppritcha hppritcha modified the milestones: Future, v2.1.2 Aug 30, 2017
@SpinTensor
Copy link
Contributor

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.

@SpinTensor
Copy link
Contributor

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.

@ggouaillardet
Copy link
Contributor

@SpinTensor I am working on it

ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue May 26, 2020
 - MPI_Status_c2f08()
 - MPI_Status_f082c()
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
@jsquyres
Copy link
Member Author

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).

@ggouaillardet
Copy link
Contributor

@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.

ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue May 27, 2020
 - MPI_Status_c2f08()
 - MPI_Status_f082c()
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 22, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 22, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 22, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 22, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 23, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 24, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 24, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 25, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 25, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 25, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 26, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 26, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 26, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 26, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 26, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 26, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 26, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Jul 26, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
ggouaillardet added a commit to ggouaillardet/ompi that referenced this issue Sep 8, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
jsquyres pushed a commit to ggouaillardet/ompi that referenced this issue Sep 9, 2020
Only in C bindings:
 - MPI_Status_c2f08()
 - MPI_Status_f082c()

In all bindings but mpif.h
 - MPI_Status_f082f()
 - MPI_Status_f2f08()

and the PMPI_* related subroutines

As initially inteded by the MPI forum, the Fortran to/from Fortran 2008
conversion subtoutines are *not* implemented in the mpif.h bindings.
See the discussion at mpi-forum/mpi-issues#298

Refs. open-mpi#1475

Signed-off-by: Gilles Gouaillardet <[email protected]>
@jsquyres
Copy link
Member Author

@ggouaillardet Did you ever get a chance to look at adding the missing MPI_F08_STATUS[ES]_IGNORE symbols, perchance?

@SpinTensor
Copy link
Contributor

Hi just wanted to check on the status. I see that ggouaillardet already started a merge request. When will the changes be available in the main trunk?

@jsquyres
Copy link
Member Author

jsquyres commented Oct 5, 2021

@SpinTensor Thanks for the reminder; this one fell off the radar. ☹️

@jsquyres
Copy link
Member Author

jsquyres commented Oct 5, 2021

This was (finally) merged to master, and the fix-the-missing-MPI_F08_STATUS[ES]_IGNORE PR is pending being merged into the v5.0.x branch.

Per #8047 (comment), we didn't bring the missing conversion routines to v4.1.x or v4.0.x because of deeper ABI implications. As an extension of that, I didn't back-port the missing MPI_F08_STATUS[ES]_IGNORE constants fix to the v4.1.x or v4.0.x branches, either. Specifically: I didn't check if there were ABI implications for the MPI_F08_STATUS[ES]_IGNORE fixes, but if we didn't bring over the somewhat-esoteric missing conversion routines to v4.1.x and v4.0.x, then let's not bring the missing MPI_F08_STATUE[ES]_IGNORE back to v4.1.x or v4.0.x, either.

All these fixes will be included in the upcoming v5.0.x release.

@jsquyres jsquyres modified the milestones: Future, v5.0.0 Oct 5, 2021
@awlauria
Copy link
Contributor

awlauria commented Oct 7, 2021

This is fixed in master and v5.0, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants