-
Notifications
You must be signed in to change notification settings - Fork 868
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
v4.0.x: Re-add removed deprecate-only MPI-2.0 symbols #6120
v4.0.x: Re-add removed deprecate-only MPI-2.0 symbols #6120
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gpaulsen This is not enough. Per #6114 (comment), we need to always include all the symbols in libmpi.
Thanks I'll take a look |
is there any reason why this is not a cherry-pick/backport of #6118 ? |
you will also need to cherry-pick the commit from #6122 once merged into master |
BTW, if it comes to the release time, I don't think that this fix should effect the shared library version at all. As 4.0.0 broke the |
@bertwesarg Agreed -- the major |
fee6e54
to
f7d0a7d
Compare
@ggouaillardet, This is a cherry-pick of #6118, but I forgot the -x. Redoing. I've also cherry-picked #6122 here too. I've searched through all of the removed symbols, and the C/Fortran symbols are all present in the Makefiles, though the removed functions are only built when the configure option |
@@ -437,7 +437,8 @@ libmpi_c_mpi_la_SOURCES = \ | |||
win_wait.c | |||
|
|||
|
|||
if OMPI_ENABLE_MPI1_COMPAT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about putting these files just back up (alphabetically) in the main list of files?
Also, this specific commit was not a cherry pick, right? Can you please put a comment about that in the commit message? (i.e., why this is not a cherry pick: because on master, we are no longer building those symbols by default, but on v4.0 we are still building those symbols by default, yadda yadda yadda)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kinda liked having them separated out at the bottom to help indicate that they're going away.
I will rework the commit message to indicate why we want/need this v4.0.x specific patch (instead of a cherry-pick from master).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gpaulsen This PR fails to compile.
Drat, I just saw that too... working. |
The IBM CI (GNU Compiler) build failed! Please review the log, linked below. Gist: https://gist.github.com/fe832eba609631aa95f53983e34de01d |
The IBM CI (XL Compiler) build failed! Please review the log, linked below. Gist: https://gist.github.com/30c8322f19b427bcad29721be9a5e53c |
The IBM CI (PGI Compiler) build failed! Please review the log, linked below. Gist: https://gist.github.com/4f23e242e8c62b305455a39c368a37f4 |
41a506f
to
b3f00bc
Compare
The IBM CI (GNU Compiler) build failed! Please review the log, linked below. Gist: https://gist.github.com/eba77f14eb4c28e794b806274c75ee62 |
I think #if !defined(OMPI_OMIT_MPI1_COMPAT_DECLS)
# define OMPI_OMIT_MPI1_COMPAT_DECLS !OMPI_ENABLE_MPI1_COMPAT
#endif |
b3f00bc
to
ea1d2fb
Compare
The IBM CI (GNU Compiler) build failed! Please review the log, linked below. Gist: https://gist.github.com/062b323ebc9bef2b179451e13b8c8a06 |
ea1d2fb
to
4f2f6ef
Compare
@bertwesarg, I just repushed. And instead in the Fortran implementations I set OMPI_OMIT_MPI1_COMPAT_DECLS to 0. |
That is the current code in master, not a proposal from me. From my point of view (I'm from the Score-P measurement infrastructure team), I would like to have a hook to enable these prototypes also past 'make install', something like being able to skip the C++ interface. Let me elaborate: Score-P wants to intercepts all function calls from the application. We don't care about deprecations at all. If the application calls an MPI function, we want to know it. Now that the functions are in the library but no prototype, we skip our wrappers in our build process as we don't find the declarations. so having a hook like PS: we also would like to skip any deprecation warnings from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something still isn't right. When I compile without --enable-mpi1-compatibility
, I still see a bunch of warnings like this:
perrhandler_create.c:35:31: warning: no previous prototype for ‘PMPI_Errhandler_create’ [-Wmissing-prototypes]
#define MPI_Errhandler_create PMPI_Errhandler_create
^~~~~~~~~~~~~~~~~~~~~~
perrhandler_create.c:38:5: note: in expansion of macro ‘MPI_Errhandler_create’
int MPI_Errhandler_create(MPI_Comm_errhandler_function *function,
^~~~~~~~~~~~~~~~~~~~~
:( I'll take a look |
I've got a fix, and will push soon. |
@jsquyres please review. I can squish the last two commits if you'd like. |
ompi/mpi/c/address.c
Outdated
* to the newer MPI calls, we are defining OMPI_OMIT_MPI1_COMPAT_DECLS | ||
* to 0 before including the c bindings. | ||
*/ | ||
#define OMPI_OMIT_MPI1_COMPAT_DECLS 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the OMPI_BUILDING
#define
be sufficient here? If not, why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, there's currently no logic to affect OMPI_OMIT_MPI1_COMPAT_DECLS
via OMPI_BUILDING
. Are you proposing we add that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OMPI_BUILDING
already overrules OMPI_WANT_MPI_INTERFACE_WARNING
, where the latter is for users. Why shouldn't OMPI_BUILDING
also overrule OMPI_OMIT_MPI1_COMPAT_DECLS
, and leave OMPI_OMIT_MPI1_COMPAT_DECLS
to the users?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by "leave OMPI_OMIT_MPI1_COMPAT_DECLS
to the users?" Users can control that already via the --enable-mpi-compatibility configure flag. This is just silently unsetting during the build of a few files in the .c files (not mpi.h) to allow those files to build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as the symbols are in the library, I think its valid to access them by there prototype. I can understand that by default you hide them, but having a way to reveal the prototypes is very convenient. As not all users can wait until the used software project changes the software to not use deprecated APIs.
As a second user case, we the tools developers nevertheless want to wrap as many API as possible. If we know, that if we set some magic variable and get all prototypes for all available symbols. We certainly will use it.
If OMPI_OMIT_MPI1_COMPAT_DECLS
is that hook, to get all prototypes, than its something for the users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gpaulsen I think the point here is that OMPI_BUILDING
is a flag we use internally -- it means that additional things should be available because we are building Open MPI itself (vs. a user MPI application). I think @bertwesarg is saying that OMPI_BUILDING
should probably also imply that the MPI1 compatibility prototypes should be available if OMPI_BUILDING==1
. That way, OMPI_OMIT_MPI1_COMPAT_DECLS
is purely tied to --enable-mpi-compatibility
(i.e., solely "for the users").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, let me see if I can do that and repush, for your review.
Adding the implementations of the functions that were removed from the MPI standard to the build list, regardless of the state of the OMPI_ENABLE_MPI1_COMPAT. According to the README, we want the OMPI_ENABLE_MPI1_COMPAT configure flag to control which MPI prototypes are exposed in mpi.h, NOT, which are built into the mpi library. Those will remain in the mpi library until a future major release (5.0?) NOTE: for the Fortran implementations, we instead define OMPI_OMIT_MPI1_COMPAT_DECLS to 0 instead of OMPI_ENABLE_MPI1_COMPAT to 1. I'm not sure why, but this seems to work correctly. Also changing the removed MPI_Errhandler_create implementation to use the non removed MPI_Comm_errhandler_function prototype (prototype remains unchanged from MPI_Comm_errhandler_fn) NOTE: This commit is *NOT* a cherry-pick from master, because on master, we are no longer building those symbols by default, but on v4.0.x we _ARE_ still building these symbols by default. This is because the v4.0.x branch is to remain backwards compatible with v3.0.x, while at the same time removing the "removed" symbols from mpi.h (unless the user configures with --enable-mpi1-compatibility) Signed-off-by: Geoffrey Paulsen <gpaulsen@us.ibm.com>
94d7479
to
4aa91e1
Compare
@@ -12,6 +12,7 @@ | |||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. | |||
* Copyright (c) 2015 Research Organization for Information Science | |||
* and Technology (RIST). All rights reserved. | |||
* Copyright (c) 2018 IBM Corporation. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should remove the copyright addition from the files where you didn't make any changes (I count 10 files like this).
* | ||
* To prevent having to port these implementations of removed functions | ||
* to the newer MPI calls, we are defining ENABLE_MPI1_COMPAT to 1 | ||
* before including the c bindings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot parse this statement -- what exactly does it mean? Why would we port MPI_ADDRESS to be implemented on top of MPI_GET_ADDRESS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intent was to communicate that we are NOT porting the implementations of these removed mpi1 functions to use the NEWer APIs, and instead we're doing Maco magic to allow us to build the older functions for the library only.
This latest push changed the mechanism that we do this, and no longer do we SET ENABLE_MPI1_COMPAT internally when we build these few routines, but instead this PR adds a || OMPI_BUILDING
to the cpp logic around the prototypes of these removed functions to allow us to build them into the library.
I suspect all of this is clear ( || OMPI_BUILDING
is much more straight forward), so I've just removed this paragraph.
I'm getting tired of this . @jsquyres we are going to take this as is. |
Sorry, I put work in progress on here because There was a real change that was still needed. I'll add another commit on top of this in a separate PR. |
oops I didn't notice the DWI tag. @gpaulsen revert an reopen if there was more to go in. sorry. shouldn't do these with my iphone. |
This PR should be reverted. It was not ready to be merged. |
Okay, I can revert this. |
Just click the "revert" button on this PR. |
This does not work with the 4.0.1rc1, as I only get a
but not the hidden prototypes. The following patch to v4.0.1 gives me the desired behavior: diff --git i/ompi/include/mpi.h.in w/ompi/include/mpi.h.in
index 27feae4ad8..03f095013b 100644
--- i/ompi/include/mpi.h.in
+++ w/ompi/include/mpi.h.in
@@ -306,7 +306,8 @@
* Don't do MACRO magic for building Profiling library as it
* interferes with the above.
*/
-# if (OMPI_ENABLE_MPI1_COMPAT || OMPI_BUILDING)
+# if defined(OMPI_OMIT_MPI1_COMPAT_DECLS)
+# elif (OMPI_ENABLE_MPI1_COMPAT || OMPI_BUILDING)
# define OMPI_OMIT_MPI1_COMPAT_DECLS 0
# define OMPI_REMOVED_USE_STATIC_ASSERT 0
# define __mpi_interface_removed__(func, newfunc) __mpi_interface_deprecated__(#func " was removed in MPI-3.0. Use " #newfunc " instead. continuing...") |
As mentioned in [1], it may be desirable to nevertheless get the hidden MPI 1 prototypes, for users who know what they are doing, i.e., the tools guys. @ggouaillardet mentioned in [2], that `-DOMPI_OMIT_MPI1_COMPAT_DECLS=0` should work, but it does not, as than we only get redefinition warnings. See [3]. This topic does not relate to master, as we can remove the actual symbols there, but here in v4.0.x land, the symbols are always there. [1] open-mpi#6120 (comment) [2] open-mpi#6120 (comment) [3] open-mpi#6120 (comment)
Follow-up to open-mpi#6120. As mentioned in [1], it may be desirable to nevertheless get the hidden MPI 1 prototypes, for users who know what they are doing, i.e., the tools guys. @ggouaillardet mentioned in [2], that `-DOMPI_OMIT_MPI1_COMPAT_DECLS=0` should work, but it does not, as than we only get redefinition warnings. See [3]. This topic does not relate to master, as we can remove the actual symbols there, but here in v4.0.x land, the symbols are always there. [1] open-mpi#6120 (comment) [2] open-mpi#6120 (comment) [3] open-mpi#6120 (comment) Signed-off-by: Bert Wesarg <bert.wesarg@tu-dresden.de>
Follow-up to open-mpi#6120. As mentioned in [1], it may be desirable to nevertheless get the hidden MPI 1 prototypes, for users who know what they are doing, i.e., the tools guys. @ggouaillardet mentioned in [2], that `-DOMPI_OMIT_MPI1_COMPAT_DECLS=0` should work, but it does not, as than we only get redefinition warnings. See [3]. This topic does not relate to master, as we can remove the actual symbols there, but here in v4.0.x land, the symbols are always there. [1] open-mpi#6120 (comment) [2] open-mpi#6120 (comment) [3] open-mpi#6120 (comment) Signed-off-by: Bert Wesarg <bert.wesarg@tu-dresden.de>
Follow-up to open-mpi#6120. As mentioned in [1], it may be desirable to nevertheless get the hidden MPI 1 prototypes, for users who know what they are doing, i.e., the tools guys. @ggouaillardet mentioned in [2], that `-DOMPI_OMIT_MPI1_COMPAT_DECLS=0` should work, but it does not, as than we only get redefinition warnings. See [3]. [1] open-mpi#6120 (comment) [2] open-mpi#6120 (comment) [3] open-mpi#6120 (comment) Signed-off-by: Bert Wesarg <bert.wesarg@tu-dresden.de> Signed-off-by: Brian Barrett <bbarrett@amazon.com>
Follow-up to open-mpi#6120. As mentioned in [1], it may be desirable to nevertheless get the hidden MPI 1 prototypes, for users who know what they are doing, i.e., the tools guys. @ggouaillardet mentioned in [2], that `-DOMPI_OMIT_MPI1_COMPAT_DECLS=0` should work, but it does not, as than we only get redefinition warnings. See [3]. [1] open-mpi#6120 (comment) [2] open-mpi#6120 (comment) [3] open-mpi#6120 (comment) BWB Note: This patch was originally applied directly to v4.0.x in 73134ab, but now needs to be added to master, as we are keeping the 4.x mpi1-compat behavior. Signed-off-by: Bert Wesarg <bert.wesarg@tu-dresden.de> Signed-off-by: Brian Barrett <bbarrett@amazon.com>
Follow-up to open-mpi#6120. As mentioned in [1], it may be desirable to nevertheless get the hidden MPI 1 prototypes, for users who know what they are doing, i.e., the tools guys. @ggouaillardet mentioned in [2], that `-DOMPI_OMIT_MPI1_COMPAT_DECLS=0` should work, but it does not, as than we only get redefinition warnings. See [3]. [1] open-mpi#6120 (comment) [2] open-mpi#6120 (comment) [3] open-mpi#6120 (comment) BWB Note: This patch was originally applied directly to v4.0.x in 73134ab, but now needs to be added to master, as we are keeping the 4.x mpi1-compat behavior. Signed-off-by: Bert Wesarg <bert.wesarg@tu-dresden.de> Signed-off-by: Brian Barrett <bbarrett@amazon.com> (cherry picked from commit b934c90)
I restored the APIs in mpi.h in commit 2d3b4bb, but forgot the Makefile changes. :(
Fixes #6114
Signed-off-by: Bert Wesarg bert.wesarg@tu-dresden.de