Skip to content

Commit 115467c

Browse files
committed
Fixes Issue 6278 (removed prototypes only warning)
This commit is intended to be cherry-picked to v4.0.x and the following commit will ammend to this functionality for master's removal. Changes the prototypes for MPI removed functions in the following ways: There are 4 cases: - User wants MPI-1 compatibility (--enable-mpi1-compatibility) MPI_Address (and friends) are declared in mpi.h with deprecation notice - User does not want MPI-1 compatibility, and has a C11-capable compiler Declare an MPI_Address (etc.) macro in mpi.h, which will cause a compile-time error using _Static_assert C11 feature - User does not want MPI-1 compatibility, and does not have a C11-capable compiler - User does not want MPI-1 compatibility, and does not have a C11-capable compiler, but the compiler supports error function attributes. Declare an MPI_Address (etc.) macro in mpi.h, which will cause a compile-time error using error function attribute. - User does not want MPI-1 compatibility, and does not have a C11-capable compiler, or a compiler that supports error function attributes. Do not declare MPI_Address (etc.) in mpi.h at all. Unless the user is compiling with something like -Werror, this will allow the user's code to compile. We are choosing this because it seems like a losing battle to make some kind of compile time error that is friendly to the user (and doesn't make it look like mpi.h itself is broken). On v4.0.x, this will allow the user code to both compile (albeit with a warning) and link (because the MPI_Address will be in the MPI library because we are preserving ABI back to 3.0.x). On master/v5.0.x, this will allow the user code to compile, but it will fail to link (because the MPI_Address symbol will not be in the MPI library). Signed-off-by: Geoffrey Paulsen <[email protected]>
1 parent e3f2137 commit 115467c

File tree

11 files changed

+154
-28
lines changed

11 files changed

+154
-28
lines changed

ompi/include/mpi.h.in

Lines changed: 74 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* Copyright (c) 2015 University of Houston. All rights reserved.
2020
* Copyright (c) 2015-2018 Research Organization for Information Science
2121
* and Technology (RIST). All rights reserved.
22-
* Copyright (c) 2017-2018 IBM Corporation. All rights reserved.
22+
* Copyright (c) 2017-2019 IBM Corporation. All rights reserved.
2323
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
2424
* $COPYRIGHT$
2525
*
@@ -280,10 +280,35 @@
280280
# define __mpi_interface_deprecated__(msg) __attribute__((__deprecated__))
281281
# endif
282282
# endif
283-
# if OMPI_ENABLE_MPI1_COMPAT
284-
# define __mpi_interface_removed__(msg) __mpi_interface_deprecated__(msg)
285-
# define OMPI_OMIT_MPI1_COMPAT_DECLS 0
286-
# endif
283+
# endif
284+
285+
/* For removed API, there is no portable way to cause the
286+
* C compiler to error with a nice message on the usage of
287+
* one of these symbols, so instead we use a C11 static_assert
288+
* If the user is not using a C11 compiler, they will get an
289+
* undefined reference, but no line number or nice message.
290+
*
291+
* Don't do MACRO magic for building Profiling library as it
292+
* interferes with that system.
293+
*/
294+
# if (OMPI_ENABLE_MPI1_COMPAT || OMPI_BUILDING)
295+
# define OMPI_OMIT_MPI1_COMPAT_DECLS 0
296+
# define __mpi_interface_removed__(func, newfunc) __mpi_interface_deprecated__(#func " was removed in MPI-3.0. Use " #newfunc " instead. continuing...")
297+
# else
298+
# if (__STDC_VERSION__ >= 201112L)
299+
# define OMPI_REMOVED_STATIC_ASSERT_MSG(func, newfunc) _Static_assert(0, #func " was removed in MPI-3.0. Use " #newfunc " instead.")
300+
# define OMPI_OMIT_MPI1_COMPAT_DECLS 1
301+
# define OMPI_REMOVED_USE_STATIC_ASSERT 1
302+
# else
303+
# if OPAL_HAVE_ATTRIBUTE_ERROR
304+
# define __mpi_interface_removed__(func, newfunc) __attribute__((__error__(#func " was removed in MPI-3.0. Use " #newfunc " instead.")))
305+
# define OMPI_OMIT_MPI1_COMPAT_DECLS 0
306+
# else
307+
# define OMPI_OMIT_MPI1_COMPAT_DECLS 1
308+
# define OMPI_REMOVED_USE_STATIC_ASSERT 0
309+
# endif
310+
# endif
311+
>>>>>>> 94f21129... Fixes Issue 6278 (removed prototypes only warning)
287312
# endif
288313
# endif
289314
#endif
@@ -298,7 +323,15 @@
298323
#endif
299324

300325
#if !defined(__mpi_interface_removed__)
301-
# define __mpi_interface_removed__(msg)
326+
# define __mpi_interface_removed__(A,B)
327+
#endif
328+
329+
#if !defined(OMPI_REMOVED_STATIC_ASSERT_MSG)
330+
# define OMPI_REMOVED_STATIC_ASSERT_MSG(func, newfunc)
331+
#endif
332+
333+
#if !defined(OMPI_REMOVED_USE_STATIC_ASSERT)
334+
# define OMPI_REMOVED_USE_STATIC_ASSERT 0
302335
#endif
303336

304337
#if !defined(OMPI_OMIT_MPI1_COMPAT_DECLS)
@@ -1017,9 +1050,9 @@ OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUSES_IGNORE;
10171050
#define MPI_LB OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_lb)
10181051

10191052
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_lb
1020-
__mpi_interface_removed__("MPI_LB was removed in MPI-3.0; use MPI_Type_create_resized instead.");
1053+
OMPI_REMOVED_STATIC_ASSERT_MSG(MPI_LB, MPI_Type_create_resized);
10211054
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_ub
1022-
__mpi_interface_removed__("MPI_UB was removed in MPI-3.0; use MPI_Type_create_resized instead.");
1055+
OMPI_REMOVED_STATIC_ASSERT_MSG(MPI_UB, MPI_Type_create_resized);
10231056
#endif /* !OMPI_OMIT_MPI1_COMPAT_DECLS */
10241057

10251058
/*
@@ -2696,61 +2729,74 @@ typedef void (MPI_Handler_function)(MPI_Comm *, int *, ...);
26962729
* and should no longer be used in MPI applications.
26972730
*/
26982731
OMPI_DECLSPEC int MPI_Address(void *location, MPI_Aint *address)
2699-
__mpi_interface_removed__("MPI_Address was removed in MPI-3.0; use MPI_Get_address instead.");
2732+
__mpi_interface_removed__(MPI_Address, MPI_Get_address);
27002733
OMPI_DECLSPEC int PMPI_Address(void *location, MPI_Aint *address)
2701-
__mpi_interface_removed__("PMPI_Address was removed in MPI-3.0; use MPI_Get_address instead.");
2734+
__mpi_interface_removed__(PMPI_Address, PMPI_Get_address);
27022735
OMPI_DECLSPEC int MPI_Errhandler_create(MPI_Handler_function *function,
27032736
MPI_Errhandler *errhandler)
2704-
__mpi_interface_removed__("MPI_Errhandler_create was removed in MPI-3.0; use MPI_Comm_create_errhandler instead.");
2737+
__mpi_interface_removed__(MPI_Errhandler_create, MPI_Comm_create_errhandler);
27052738
OMPI_DECLSPEC int PMPI_Errhandler_create(MPI_Handler_function *function,
27062739
MPI_Errhandler *errhandler)
2707-
__mpi_interface_removed__("PMPI_Errhandler_create was removed in MPI-3.0; use PMPI_Comm_create_errhandler instead.");
2740+
__mpi_interface_removed__(PMPI_Errhandler_create, PMPI_Comm_create_errhandler);
27082741
OMPI_DECLSPEC int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler)
2709-
__mpi_interface_removed__("MPI_Errhandler_get was removed in MPI-3.0; use MPI_Comm_get_errhandler instead.");
2742+
__mpi_interface_removed__(MPI_Errhandler_get, MPI_Comm_get_errhandler);
27102743
OMPI_DECLSPEC int PMPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler)
2711-
__mpi_interface_removed__("PMPI_Errhandler_get was removed in MPI-3.0; use PMPI_Comm_get_errhandler instead.");
2744+
__mpi_interface_removed__(PMPI_Errhandler_get, PMPI_Comm_get_errhandler);
27122745
OMPI_DECLSPEC int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler)
2713-
__mpi_interface_removed__("MPI_Errhandler_set was removed in MPI-3.0; use MPI_Comm_set_errhandler instead.");
2746+
__mpi_interface_removed__(MPI_Errhandler_set, MPI_Comm_set_errhandler);
27142747
OMPI_DECLSPEC int PMPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler)
2715-
__mpi_interface_removed__("PMPI_Errhandler_set was removed in MPI-3.0; use PMPI_Comm_set_errhandler instead.");
2748+
__mpi_interface_removed__(PMPI_Errhandler_set, PMPI_Comm_set_errhandler);
27162749
OMPI_DECLSPEC int MPI_Type_extent(MPI_Datatype type, MPI_Aint *extent)
2717-
__mpi_interface_removed__("MPI_Type_extent was removed in MPI-3.0; use MPI_Type_get_extent instead.");
2750+
__mpi_interface_removed__(MPI_Type_extent, MPI_Type_get_extent);
27182751
OMPI_DECLSPEC int PMPI_Type_extent(MPI_Datatype type, MPI_Aint *extent)
2719-
__mpi_interface_removed__("PMPI_Type_extent was removed in MPI-3.0; use PMPI_Type_get_extent instead.");
2752+
__mpi_interface_removed__(PMPI_Type_extent, PMPI_Type_get_extent);
27202753
OMPI_DECLSPEC int MPI_Type_hindexed(int count, int array_of_blocklengths[],
27212754
MPI_Aint array_of_displacements[],
27222755
MPI_Datatype oldtype, MPI_Datatype *newtype)
2723-
__mpi_interface_removed__("MPI_Type_hindexed was removed in MPI-3.0; use MPI_Type_create_hindexed instead.");
2756+
__mpi_interface_removed__(MPI_Type_hindexed, MPI_Type_create_hindexed);
27242757
OMPI_DECLSPEC int PMPI_Type_hindexed(int count, int array_of_blocklengths[],
27252758
MPI_Aint array_of_displacements[],
27262759
MPI_Datatype oldtype, MPI_Datatype *newtype)
2727-
__mpi_interface_removed__("PMPI_Type_hindexed was removed in MPI-3.0; use PMPI_Type_create_hindexed instead.");
2760+
__mpi_interface_removed__(PMPI_Type_hindexed, PMPI_Type_create_hindexed);
27282761
OMPI_DECLSPEC int MPI_Type_hvector(int count, int blocklength, MPI_Aint stride,
27292762
MPI_Datatype oldtype, MPI_Datatype *newtype)
2730-
__mpi_interface_removed__("MPI_Type_hvector was removed in MPI-3.0; use MPI_Type_create_hvector instead.");
2763+
__mpi_interface_removed__(MPI_Type_hvector, MPI_Type_create_hvector);
27312764
OMPI_DECLSPEC int PMPI_Type_hvector(int count, int blocklength, MPI_Aint stride,
27322765
MPI_Datatype oldtype, MPI_Datatype *newtype)
2733-
__mpi_interface_removed__("PMPI_Type_hvector was removed in MPI-3.0; use PMPI_Type_create_hvector instead.");
2766+
__mpi_interface_removed__(PMPI_Type_hvector, PMPI_Type_create_hvector);
27342767
OMPI_DECLSPEC int MPI_Type_lb(MPI_Datatype type, MPI_Aint *lb)
2735-
__mpi_interface_removed__("MPI_Type_lb has been removed in MPI-3.0; use MPI_Type_get_extent instead.");
2768+
__mpi_interface_removed__(MPI_Type_lb, MPI_Type_get_extent);
27362769
OMPI_DECLSPEC int PMPI_Type_lb(MPI_Datatype type, MPI_Aint *lb)
2737-
__mpi_interface_removed__("PMPI_Type_lb has been removed in MPI-3.0; use PMPI_Type_get_extent instead.");
2770+
__mpi_interface_removed__(PMPI_Type_lb, PMPI_Type_get_extent);
27382771
OMPI_DECLSPEC int MPI_Type_struct(int count, int array_of_blocklengths[],
27392772
MPI_Aint array_of_displacements[],
27402773
MPI_Datatype array_of_types[],
27412774
MPI_Datatype *newtype)
2742-
__mpi_interface_removed__("MPI_Type_struct was removed in MPI-3.0; use MPI_Type_create_struct instead.");
2775+
__mpi_interface_removed__(MPI_Type_struct, MPI_Type_create_struct);
27432776
OMPI_DECLSPEC int PMPI_Type_struct(int count, int array_of_blocklengths[],
27442777
MPI_Aint array_of_displacements[],
27452778
MPI_Datatype array_of_types[],
27462779
MPI_Datatype *newtype)
2747-
__mpi_interface_removed__("PMPI_Type_struct was removed in MPI-3.0; use PMPI_Type_create_struct instead.");
2780+
__mpi_interface_removed__(PMPI_Type_struct, PMPI_Type_create_struct);
27482781
OMPI_DECLSPEC int MPI_Type_ub(MPI_Datatype mtype, MPI_Aint *ub)
2749-
__mpi_interface_removed__("MPI_Type_ub has been removed in MPI-3.0; use MPI_Type_get_extent instead.");
2782+
__mpi_interface_removed__(MPI_Type_ub, MPI_Type_get_extent);
27502783
OMPI_DECLSPEC int PMPI_Type_ub(MPI_Datatype mtype, MPI_Aint *ub)
2751-
__mpi_interface_removed__("PMPI_Type_ub has been removed in MPI-3.0; use PMPI_Type_get_extent instead.");
2784+
__mpi_interface_removed__(PMPI_Type_ub, PMPI_Type_get_extent);
27522785
#endif /* !OMPI_OMIT_MPI1_COMPAT_DECLS */
27532786

2787+
#if OMPI_REMOVED_USE_STATIC_ASSERT
2788+
#define MPI_Address(...) OMPI_REMOVED_STATIC_ASSERT_MSG(MPI_Address, MPI_Get_address)
2789+
#define MPI_Errhandler_create OMPI_REMOVED_STATIC_ASSERT_MSG(MPI_Errhandler_create, MPI_Comm_create_errhandler)
2790+
#define MPI_Errhandler_get(...) OMPI_REMOVED_STATIC_ASSERT_MSG(MPI_Errhandler_get, MPI_Comm_get_errhandler)
2791+
#define MPI_Errhandler_set(...) OMPI_REMOVED_STATIC_ASSERT_MSG(MPI_Errhandler_set, MPI_Comm_set_errhandler)
2792+
#define MPI_Type_extent(...) OMPI_REMOVED_STATIC_ASSERT_MSG(MPI_Type_extent, MPI_Type_get_extent)
2793+
#define MPI_Type_hindexed(...) OMPI_REMOVED_STATIC_ASSERT_MSG(MPI_Type_hindexed, MPI_Type_create_hindexed)
2794+
#define MPI_Type_hvector(...) OMPI_REMOVED_STATIC_ASSERT_MSG(MPI_Type_hvector, MPI_Type_create_hvector)
2795+
#define MPI_Type_lb(...) OMPI_REMOVED_STATIC_ASSERT_MSG(MPI_Type_lb, MPI_Type_get_extent)
2796+
#define MPI_Type_struct OMPI_REMOVED_STATIC_ASSERT_MSG(MPI_Type_struct, MPI_Type_create_struct)
2797+
#define MPI_Type_ub(...) OMPI_REMOVED_STATIC_ASSERT_MSG(MPI_Type_ub, MPI_Type_get_extent)
2798+
#endif
2799+
27542800
#if defined(c_plusplus) || defined(__cplusplus)
27552801
}
27562802
#endif

ompi/mpi/c/address.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2015 Research Organization for Information Science
1313
* and Technology (RIST). All rights reserved.
14+
* Copyright (c) 2019 IBM Corporation. All rights reserved.
1415
* $COPYRIGHT$
1516
*
1617
* Additional copyrights may follow
@@ -21,6 +22,12 @@
2122
#include "ompi_config.h"
2223
#include <stdio.h>
2324

25+
/* This implementation has been removed from the MPI 3.1 standard.
26+
* Open MPI v4.0.x is keeping the implementation in the library, but
27+
* removing the prototypes from the headers, unless the user configures
28+
* with --enable-mpi1-compatibility.
29+
*/
30+
2431
#include "ompi/mpi/c/bindings.h"
2532
#include "ompi/runtime/params.h"
2633
#include "ompi/communicator/communicator.h"
@@ -30,6 +37,7 @@
3037
#if OPAL_HAVE_WEAK_SYMBOLS
3138
#pragma weak MPI_Address = PMPI_Address
3239
#endif
40+
#undef MPI_Address
3341
#define MPI_Address PMPI_Address
3442
#endif
3543

ompi/mpi/c/errhandler_create.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2015 Research Organization for Information Science
1313
* and Technology (RIST). All rights reserved.
14+
* Copyright (c) 2019 IBM Corporation. All rights reserved.
1415
* $COPYRIGHT$
1516
*
1617
* Additional copyrights may follow
@@ -20,6 +21,12 @@
2021

2122
#include "ompi_config.h"
2223

24+
/* This implementation has been removed from the MPI 3.1 standard.
25+
* Open MPI v4.0.x is keeping the implementation in the library, but
26+
* removing the prototypes from the headers, unless the user configures
27+
* with --enable-mpi1-compatibility.
28+
*/
29+
2330
#include "ompi/mpi/c/bindings.h"
2431
#include "ompi/communicator/communicator.h"
2532
#include "ompi/errhandler/errhandler.h"
@@ -28,6 +35,7 @@
2835
#if OPAL_HAVE_WEAK_SYMBOLS
2936
#pragma weak MPI_Errhandler_create = PMPI_Errhandler_create
3037
#endif
38+
#undef MPI_Errhandler_create
3139
#define MPI_Errhandler_create PMPI_Errhandler_create
3240
#endif
3341

ompi/mpi/c/errhandler_get.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2015 Research Organization for Information Science
1313
* and Technology (RIST). All rights reserved.
14+
* Copyright (c) 2019 IBM Corporation. All rights reserved.
1415
* $COPYRIGHT$
1516
*
1617
* Additional copyrights may follow
@@ -20,6 +21,12 @@
2021

2122
#include "ompi_config.h"
2223

24+
/* This implementation has been removed from the MPI 3.1 standard.
25+
* Open MPI v4.0.x is keeping the implementation in the library, but
26+
* removing the prototypes from the headers, unless the user configures
27+
* with --enable-mpi1-compatibility.
28+
*/
29+
2330
#include "ompi/mpi/c/bindings.h"
2431
#include "ompi/runtime/params.h"
2532
#include "ompi/communicator/communicator.h"
@@ -30,6 +37,7 @@
3037
#if OPAL_HAVE_WEAK_SYMBOLS
3138
#pragma weak MPI_Errhandler_get = PMPI_Errhandler_get
3239
#endif
40+
#undef MPI_Errhandler_get
3341
#define MPI_Errhandler_get PMPI_Errhandler_get
3442
#endif
3543

ompi/mpi/c/errhandler_set.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2015 Research Organization for Information Science
1313
* and Technology (RIST). All rights reserved.
14+
* Copyright (c) 2019 IBM Corporation. All rights reserved.
1415
* $COPYRIGHT$
1516
*
1617
* Additional copyrights may follow
@@ -20,6 +21,12 @@
2021

2122
#include "ompi_config.h"
2223

24+
/* This implementation has been removed from the MPI 3.1 standard.
25+
* Open MPI v4.0.x is keeping the implementation in the library, but
26+
* removing the prototypes from the headers, unless the user configures
27+
* with --enable-mpi1-compatibility.
28+
*/
29+
2330
#include "ompi/mpi/c/bindings.h"
2431
#include "ompi/runtime/params.h"
2532
#include "ompi/communicator/communicator.h"
@@ -30,6 +37,7 @@
3037
#if OPAL_HAVE_WEAK_SYMBOLS
3138
#pragma weak MPI_Errhandler_set = PMPI_Errhandler_set
3239
#endif
40+
#undef MPI_Errhandler_set
3341
#define MPI_Errhandler_set PMPI_Errhandler_set
3442
#endif
3543

ompi/mpi/c/type_extent.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2015 Research Organization for Information Science
1313
* and Technology (RIST). All rights reserved.
14+
* Copyright (c) 2019 IBM Corporation. All rights reserved.
1415
* $COPYRIGHT$
1516
*
1617
* Additional copyrights may follow
@@ -20,6 +21,12 @@
2021

2122
#include "ompi_config.h"
2223

24+
/* This implementation has been removed from the MPI 3.1 standard.
25+
* Open MPI v4.0.x is keeping the implementation in the library, but
26+
* removing the prototypes from the headers, unless the user configures
27+
* with --enable-mpi1-compatibility.
28+
*/
29+
2330
#include "ompi/mpi/c/bindings.h"
2431
#include "ompi/runtime/params.h"
2532
#include "ompi/communicator/communicator.h"
@@ -31,6 +38,7 @@
3138
#if OPAL_HAVE_WEAK_SYMBOLS
3239
#pragma weak MPI_Type_extent = PMPI_Type_extent
3340
#endif
41+
#undef MPI_Type_extent
3442
#define MPI_Type_extent PMPI_Type_extent
3543
#endif
3644

ompi/mpi/c/type_hindexed.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2015 Research Organization for Information Science
1313
* and Technology (RIST). All rights reserved.
14+
* Copyright (c) 2019 IBM Corporation. All rights reserved.
1415
* $COPYRIGHT$
1516
*
1617
* Additional copyrights may follow
@@ -20,6 +21,12 @@
2021

2122
#include "ompi_config.h"
2223

24+
/* This implementation has been removed from the MPI 3.1 standard.
25+
* Open MPI v4.0.x is keeping the implementation in the library, but
26+
* removing the prototypes from the headers, unless the user configures
27+
* with --enable-mpi1-compatibility.
28+
*/
29+
2330
#include "ompi/mpi/c/bindings.h"
2431
#include "ompi/runtime/params.h"
2532
#include "ompi/communicator/communicator.h"
@@ -30,6 +37,7 @@
3037
#if OPAL_HAVE_WEAK_SYMBOLS
3138
#pragma weak MPI_Type_hindexed = PMPI_Type_hindexed
3239
#endif
40+
#undef MPI_Type_hindexed
3341
#define MPI_Type_hindexed PMPI_Type_hindexed
3442
#endif
3543

ompi/mpi/c/type_hvector.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2015 Research Organization for Information Science
1313
* and Technology (RIST). All rights reserved.
14+
* Copyright (c) 2019 IBM Corporation. All rights reserved.
1415
* $COPYRIGHT$
1516
*
1617
* Additional copyrights may follow
@@ -20,6 +21,12 @@
2021

2122
#include "ompi_config.h"
2223

24+
/* This implementation has been removed from the MPI 3.1 standard.
25+
* Open MPI v4.0.x is keeping the implementation in the library, but
26+
* removing the prototypes from the headers, unless the user configures
27+
* with --enable-mpi1-compatibility.
28+
*/
29+
2330
#include "ompi/mpi/c/bindings.h"
2431
#include "ompi/runtime/params.h"
2532
#include "ompi/communicator/communicator.h"
@@ -30,6 +37,7 @@
3037
#if OPAL_HAVE_WEAK_SYMBOLS
3138
#pragma weak MPI_Type_hvector = PMPI_Type_hvector
3239
#endif
40+
#undef MPI_Type_hvector
3341
#define MPI_Type_hvector PMPI_Type_hvector
3442
#endif
3543

0 commit comments

Comments
 (0)