Skip to content

Remove some more symbols removed in MPI 3.0 #6625

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

ggouaillardet
Copy link
Contributor

No description provided.

@ibm-ompi
Copy link

The IBM CI (GNU Compiler) build failed! Please review the log, linked below.

Gist: https://gist.github.com/499689414582a6d13dcf500ac9b3547a

@ibm-ompi
Copy link

The IBM CI (XL Compiler) build failed! Please review the log, linked below.

Gist: https://gist.github.com/7b507504c3f5bee19ee5adb6fe883041

@ggouaillardet ggouaillardet force-pushed the topic/remove_mpi30_removed_symbols branch from f104442 to 7c8f011 Compare April 30, 2019 04:15
@ibm-ompi
Copy link

The IBM CI (GNU Compiler) build failed! Please review the log, linked below.

Gist: https://gist.github.com/3e58242af1662695a3dd0c21229d9e4e

@ibm-ompi
Copy link

The IBM CI (XL Compiler) build failed! Please review the log, linked below.

Gist: https://gist.github.com/063ad9b9abff0175024114b434a16adc

@ggouaillardet ggouaillardet force-pushed the topic/remove_mpi30_removed_symbols branch from f39a3cf to e420edf Compare April 30, 2019 05:40
@ibm-ompi
Copy link

The IBM CI (XL Compiler) build failed! Please review the log, linked below.

Gist: https://gist.github.com/c9e426ba6ffd45b0b47dc04626fb2925

Copy link
Member

@gpaulsen gpaulsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good. Thanks for going through and doing this.

I always worry about changing the values of enums, especially in something as core as the dataytpe enums.
Would it be better to just NOT define the removed enums and constants, and leave the other values the same?

If (as in this PR) almost all of the constants/enums changed values, it might affect any hard coded values elsewhere in Open MPI (hopefully none) or in user's code. (That would be an unportable/non-standard usage, but we could be a bit kinder if we don't change ALL of these values).

This change might also affect other non-open sourced PMLs that might use Open MPI's datatype engine.

Thoughts?

@jsquyres
Copy link
Member

@ggouaillardet This patch looks pretty good -- thanks!

We talked about this on the Webex today. We tend to agree with @gpaulsen's question: can we not do the integer handle re-ordering? It would probably be ok to leave "holes" in the integer handle ranges -- just put comments in the relevant places in the code explaining why there are holes there.

Thanks!

@ggouaillardet
Copy link
Contributor Author

I am fine to implement the suggested change(s).

Just to be clear, the renumbering thing occurs in two places

  • when MPI_COMBINER_{HINDEXED,HVECTOR,STRUCT}_INTEGER are removed from a public (but anonymous) enum
  • when MPI_LB and MPI_UB were removed from the internal datatypes.

In the first case, I can avoid renumbering by replacing MPI_COMBINER_HINDEXED_INTEGER and friends with OMPI_REMOVED_MPI_COMBINER_HVECTOR_INTEGER and friends (I did that for the v4.0.x branch).

In the second case, that will require a small trick, since the MOOG() macro is expected to be called in sequence

#define MOOG(name, index)                                               \
    do {                                                                \
        ompi_mpi_##name.dt.d_f_to_c_index =                             \
            opal_pointer_array_add(&ompi_datatype_f_to_c_table, &ompi_mpi_##name); \
        if( ompi_datatype_number_of_predefined_data < (ompi_mpi_##name).dt.d_f_to_c_index ) \
            ompi_datatype_number_of_predefined_data = (ompi_mpi_##name).dt.d_f_to_c_index; \
        assert( (index) == ompi_mpi_##name.dt.d_f_to_c_index );         \
    } while(0)

We already broke the ABI compatibility when we removed the MPI1 symbols, so I naively finished the job even if I had to break the ABI compatibility even more.
And as I wrote earlier, I undertand your concern and will implement the requested changes.
Please tell me if I should avoid all renumbering, or only avoid the second renumbering.

@gpaulsen
Copy link
Member

gpaulsen commented May 1, 2019

Thanks. I don't know the details well enough to comment. Hopefully @jsquyres or others can comment. Or we'll discuss next week.

Copy link
Member

@jsquyres jsquyres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you're saying about the renumbering -- you made a sane choice, but the amount of secondary renumbering it caused made us all nervous. I think your rationale is sound -- one way is probably no better than the other (i.e., deliberately leave a bogus name in an enum which just reminds us forever that something was deleted, or renumber). It might be possible to slightly pretty up leaving holes by having a secondary macro like MOOG_SKIP() or something, but still - kinda ugly.

Unless anyone else has objections, perhaps your first version was the right one: just rip the band aid off and remove everything (which triggers renumbering). If we want them gone, make them really be gone gone gone (since you're right: we already broke API and ABI).

Could you submit the ROMIO changes upstream? (or at least some of them -- e.g., they will still have to look for UB/LB, but some of the other straightforward changes could be accepted) I also noticed you didn't change the indenting of ROMIO code, presumably in order to make it potentially easier to merge down future versions of ROMIO. 👍

parameter (MPIX_CXX_SHORT_FLOAT_COMPLEX=76)
parameter (MPIX_SHORT_FLOAT=72)
parameter (MPIX_C_SHORT_FLOAT_COMPLEX=73)
parameter (MPIX_CXX_SHORT_FLOAT_COMPLEX=74)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to avoid having to do these. These are scary -- i.e., are there any others hiding around the code base that we're unaware of?

Indeed, this kinda raises the question of how new datatypes should be added in MPI extensions (especially if multiple extensions can add datatypes -- they could conflict!). Not necessarily a problem for this PR to solve, but it's one that bears some thought...

@@ -630,13 +630,10 @@ enum {
MPI_COMBINER_DUP,
MPI_COMBINER_CONTIGUOUS,
MPI_COMBINER_VECTOR,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we associate values we can cope with the holes in the enum.

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
…PI 3.0)

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
…3.0)

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
…3.0)

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
 - MPI_COMBINER_HVECTOR_INTEGER
 - MPI_COMBINER_HINDEXED_INTEGER
 - MPI_COMBINER_STRUCT_INTEGERo

note this commit breaks ABI compatibility since a public enum is modified.

Thanks Lisandro Dalcin for reporting this.

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
@ggouaillardet ggouaillardet force-pushed the topic/remove_mpi30_removed_symbols branch from d1d8c4a to 522ad12 Compare May 2, 2019 14:44
@ggouaillardet
Copy link
Contributor Author

@jsquyres I updated the PR according to the reviews, and I am still doing the same renumbering.

@jsquyres
Copy link
Member

jsquyres commented May 3, 2019

I approved this PR because it is correct.

However, I think the "WIP" label is still good for now.

Specifically: I still think it's an open question as to whether we should actually do this for v5.0 or not. Per https://github.com/open-mpi/ompi/wiki/5.0.x-FeatureList#features-deferred-to-v50x-from-40x, we decided not do delete all the MPI-1/2 removed symbols for v5.0 -- see https://github.com/open-mpi/ompi/wiki/5.0.x-FeatureList#features-deferred-to-v50x-from-40x (yes, I know we already removed some from master, but I don't know if we want to compound the issue if we want to put them back for v5.0 and not actually delete them until v6.0).

@AboorvaDevarajan
Copy link
Member

Can one of the admins verify this patch?

@gpaulsen
Copy link
Member

gpaulsen commented Jul 8, 2019

We may not want to merge this into master now (for v5.0) since we're working to put this functionality back (see #6660).
Eventually we WILL want this functionality, so I'm not sure the best way to preserve this work.

@ibm-ompi
Copy link

ibm-ompi commented Feb 6, 2020

The IBM CI (GNU/Scale) build failed! Please review the log, linked below.

Gist: https://gist.github.com/d07625924c606fee6cfe1d2b8efe610e

@ibm-ompi
Copy link

The IBM CI (PGI) build failed! Please review the log, linked below.

Gist: https://gist.github.com/0c6f9d4dca582b72e9b8295997910cea

@gpaulsen
Copy link
Member

gpaulsen commented May 4, 2020

@ggouaillardet @bosilca @jsquyres - This PR is quite old, and needs to be rebased at a minimum.

v5.0 is a major release in which to get a Backward Compatible break like this in. Is this PR a change we still want for v5.0?

@jsquyres
Copy link
Member

jsquyres commented May 5, 2020

@gpaulsen Please see my comment above where I said that we do not want this for v5.0, and should be targeted at v6.0: #6625 (comment)

@gpaulsen gpaulsen added this to the v6.0.0 milestone May 5, 2020
@hppritcha
Copy link
Member

what about this PR? do we want to revive it for 6.0.0?

@jsquyres
Copy link
Member

jsquyres commented Feb 6, 2025

I would imagine that this PR would need to change a bunch with respect to #12226, right?

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

Successfully merging this pull request may close these issues.

7 participants