Skip to content

Commit df1c86d

Browse files
ggouaillardetbwbarrett
authored andcommitted
mpi: mark MPI_COMBINER_{HVECTOR,HINDEXED,STRUCT}_INTEGER removed
unless configure'd with --enable-mpi1-compatibility Thanks Lisandro Dalcin for reporting this. BWB Note: This patch was originally applied directly to v4.0.x in e2638db, but now needs to be added to master, as we are keeping the 4.x mpi1-compat behavior. Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp> Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent ac0a9f0 commit df1c86d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

ompi/include/mpi.h.in

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,13 +765,25 @@ enum {
765765
MPI_COMBINER_DUP,
766766
MPI_COMBINER_CONTIGUOUS,
767767
MPI_COMBINER_VECTOR,
768+
#if (OMPI_ENABLE_MPI1_COMPAT || OMPI_BUILDING)
768769
MPI_COMBINER_HVECTOR_INTEGER,
770+
#else
771+
OMPI_WAS_MPI_COMBINER_HVECTOR_INTEGER, /* preserve ABI compatibility */
772+
#endif
769773
MPI_COMBINER_HVECTOR,
770774
MPI_COMBINER_INDEXED,
775+
#if (OMPI_ENABLE_MPI1_COMPAT || OMPI_BUILDING)
771776
MPI_COMBINER_HINDEXED_INTEGER,
777+
#else
778+
OMPI_WAS_MPI_COMBINER_HINDEXED_INTEGER, /* preserve ABI compatibility */
779+
#endif
772780
MPI_COMBINER_HINDEXED,
773781
MPI_COMBINER_INDEXED_BLOCK,
782+
#if (OMPI_ENABLE_MPI1_COMPAT || OMPI_BUILDING)
774783
MPI_COMBINER_STRUCT_INTEGER,
784+
#else
785+
OMPI_WAS_MPI_COMBINER_STRUCT_INTEGER, /* preserve ABI compatibility */
786+
#endif
775787
MPI_COMBINER_STRUCT,
776788
MPI_COMBINER_SUBARRAY,
777789
MPI_COMBINER_DARRAY,
@@ -782,6 +794,20 @@ enum {
782794
MPI_COMBINER_HINDEXED_BLOCK
783795
};
784796

797+
#if (OMPI_ENABLE_MPI1_COMPAT || OMPI_BUILDING)
798+
#else
799+
/* If not building or configured --enable-mpi1-compatibility, then
800+
* we don't want these datatypes, instead we define MPI_COMBINER_*_INTEGER
801+
* to our Static Assert message if the compiler supports
802+
* that staticly assert with a nice message.
803+
*/
804+
# if (OMPI_REMOVED_USE_STATIC_ASSERT)
805+
# define MPI_COMBINER_HVECTOR_INTEGER THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_COMBINER_HVECTOR_INTEGER, MPI_COMBINER_HVECTOR);
806+
# define MPI_COMBINER_HINDEXED_INTEGER THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_COMBINER_HINDEXED_INTEGER, MPI_COMBINER_HINDEXED);
807+
# define MPI_COMBINER_STRUCT_INTEGER THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_COMBINER_STRUCT_INTEGER, MPI_COMBINER_STRUCT);
808+
# endif /* OMPI_REMOVED_USE_STATIC_ASSERT */
809+
#endif /* Removed datatypes */
810+
785811
/*
786812
* Communicator split type constants.
787813
* Do not change the order of these without also modifying mpif.h.in

0 commit comments

Comments
 (0)