Skip to content

Commit

Permalink
Allow user to overwrite OMPI_ENABLE_MPI1_COMPAT
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bertwesarg authored and bwbarrett committed Mar 9, 2022
1 parent df1c86d commit b934c90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ompi/include/mpi.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@
* 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)
/* The user set OMPI_OMIT_MPI1_COMPAT_DECLS, do what he commands */
# 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...")
Expand Down

0 comments on commit b934c90

Please sign in to comment.