|
137 | 137 | /* Whether we have FORTRAN REAL*8 or not */ |
138 | 138 | #undef OMPI_HAVE_FORTRAN_REAL8 |
139 | 139 |
|
140 | | -/* Whether in include MPI-1 compatibility */ |
141 | | -#undef OMPI_ENABLE_MPI1_COMPAT |
142 | | - |
143 | 140 | /* Whether we have float _Complex or not */ |
144 | 141 | #undef HAVE_FLOAT__COMPLEX |
145 | 142 |
|
|
280 | 277 | # define __mpi_interface_deprecated__(msg) __attribute__((__deprecated__)) |
281 | 278 | # endif |
282 | 279 | # endif |
283 | | -# endif |
284 | | - |
285 | | - /* For MPI removed APIs, there is no generally portable way to cause |
286 | | - * the C compiler to error with a nice message, on the _usage_ of |
287 | | - * one of these symbols. We've gone with tiered appraoch: |
288 | | - * |
289 | | - * If the user configured with --enable-mpi1-compatibility, |
290 | | - * just emit a compiletime warning (via the deprecation function |
291 | | - * attribute) that they're using an MPI1 removed function. |
292 | | - * |
293 | | - * Otherwise, we'd like to issue a fatal error directing the user |
294 | | - * that they've used an MPI1 removed function. If the user's |
295 | | - * compiler supports C11 _Static_assert feature, we #define |
296 | | - * the MPI routines to instead be a call to _Static_assert |
297 | | - * with an appropreate message suggesting the new MPI3 equivalent. |
298 | | - * |
299 | | - * Otherwise, if the user's compiler supports the error function |
300 | | - * attribute, define the MPI routines with that error attribute. |
301 | | - * This is supported by most modern GNU compilers. |
302 | | - * |
303 | | - * Finally if the compiler doesn't support any of those, just |
304 | | - * Don't declare those MPI routines at all in mpi.h |
305 | | - * |
306 | | - * Don't do MACRO magic for building Profiling library as it |
307 | | - * interferes with the above. |
308 | | - */ |
309 | | -# if (OMPI_ENABLE_MPI1_COMPAT || OMPI_BUILDING) |
310 | | -# define OMPI_OMIT_MPI1_COMPAT_DECLS 0 |
311 | | -# define OMPI_REMOVED_USE_STATIC_ASSERT 0 |
312 | | -# define __mpi_interface_removed__(func, newfunc) __mpi_interface_deprecated__(#func " was removed in MPI-3.0. Use " #newfunc " instead. continuing...") |
313 | | -# elif (__STDC_VERSION__ >= 201112L) |
314 | | -# define OMPI_OMIT_MPI1_COMPAT_DECLS 1 |
315 | | -# define OMPI_REMOVED_USE_STATIC_ASSERT 1 |
316 | | -// This macro definition may show up in compiler output. So we both |
317 | | -// outdent it back to column 0 and give it a user-friendly name to |
318 | | -// help users grok what we are trying to tell them here. |
319 | | -#define THIS_SYMBOL_WAS_REMOVED_IN_MPI30(func, newfunc) _Static_assert(0, #func " was removed in MPI-3.0. Use " #newfunc " instead.") |
320 | | -# elif OPAL_HAVE_ATTRIBUTE_ERROR |
321 | | -# define OMPI_OMIT_MPI1_COMPAT_DECLS 0 |
322 | | -# define OMPI_REMOVED_USE_STATIC_ASSERT 0 |
323 | | -# define __mpi_interface_removed__(func, newfunc) __attribute__((__error__(#func " was removed in MPI-3.0. Use " #newfunc " instead."))) |
324 | | -# else |
325 | | -# define OMPI_OMIT_MPI1_COMPAT_DECLS 1 |
326 | | -# define OMPI_REMOVED_USE_STATIC_ASSERT 0 |
327 | 280 | # endif |
328 | 281 | # endif |
329 | 282 | #endif |
|
337 | 290 | # define __mpi_interface_deprecated__(msg) |
338 | 291 | #endif |
339 | 292 |
|
340 | | -#if !defined(__mpi_interface_removed__) |
341 | | -# define __mpi_interface_removed__(A,B) |
342 | | -#endif |
343 | | - |
344 | | -#if !defined(THIS_SYMBOL_WAS_REMOVED_IN_MPI30) |
345 | | -# define THIS_SYMBOL_WAS_REMOVED_IN_MPI30(func, newfunc) |
346 | | -#endif |
347 | | - |
348 | | -#if !defined(OMPI_REMOVED_USE_STATIC_ASSERT) |
349 | | -# define OMPI_REMOVED_USE_STATIC_ASSERT 0 |
350 | | -#endif |
351 | | - |
352 | | -#if !defined(OMPI_OMIT_MPI1_COMPAT_DECLS) |
353 | | -# define OMPI_OMIT_MPI1_COMPAT_DECLS !OMPI_ENABLE_MPI1_COMPAT |
354 | | -#endif |
355 | | - |
356 | 293 | /* |
357 | 294 | * To accomodate programs written for MPI implementations that use a |
358 | 295 | * straight ROMIO import |
@@ -1053,33 +990,6 @@ OMPI_DECLSPEC extern struct ompi_predefined_info_t ompi_mpi_info_env; |
1053 | 990 | OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUS_IGNORE; |
1054 | 991 | OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUSES_IGNORE; |
1055 | 992 |
|
1056 | | -/* |
1057 | | - * Removed datatypes. These datatypes are only available if Open MPI |
1058 | | - * was configured with --enable-mpi1-compatibility. |
1059 | | - * |
1060 | | - * These datatypes were formally removed from the MPI specification |
1061 | | - * and should no longer be used in MPI applications. |
1062 | | - */ |
1063 | | -#if (OMPI_ENABLE_MPI1_COMPAT || OMPI_BUILDING) |
1064 | | -# define MPI_UB OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_ub) |
1065 | | -# define MPI_LB OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_lb) |
1066 | | - |
1067 | | -OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_lb; |
1068 | | -OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_ub; |
1069 | | - |
1070 | | -#else |
1071 | | -/* If not building or configured --enable-mpi1-compatibility, then |
1072 | | - * we don't want these datatypes, instead we define MPI_UB and |
1073 | | - * MPI_LB to our Static Assert message if the compiler supports |
1074 | | - * that staticly assert with a nice message. |
1075 | | - */ |
1076 | | -# if (OMPI_REMOVED_USE_STATIC_ASSERT) |
1077 | | -# define MPI_UB THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_UB, MPI_Type_create_resized); |
1078 | | -# define MPI_LB THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_LB, MPI_Type_create_resized); |
1079 | | -# endif /* OMPI_REMOVED_USE_STATIC_ASSERT */ |
1080 | | -#endif /* Removed datatypes */ |
1081 | | - |
1082 | | - |
1083 | 993 | /* |
1084 | 994 | * MPI predefined handles |
1085 | 995 | */ |
@@ -2730,98 +2640,6 @@ OMPI_DECLSPEC int OMPI_C_MPI_NULL_DELETE_FN( MPI_Comm comm, int comm_keyval, |
2730 | 2640 | void* extra_state ) |
2731 | 2641 | __mpi_interface_deprecated__("MPI_NULL_DELETE_FN was deprecated in MPI-2.0; use MPI_COMM_NULL_DELETE_FN instead."); |
2732 | 2642 |
|
2733 | | -#if !OMPI_OMIT_MPI1_COMPAT_DECLS |
2734 | | -/* |
2735 | | - * Removed typedefs. These typedefs are only available if Open MPI |
2736 | | - * was configured with --enable-mpi1-compatibility. |
2737 | | - * |
2738 | | - * These typedefs were formally removed from the MPI specification |
2739 | | - * and should no longer be used in MPI applications. |
2740 | | - * |
2741 | | - * Even though MPI_Handler_function is removed, we do not use the |
2742 | | - * attributes marking it as such, because otherwise the compiler |
2743 | | - * will warn for all the functions that are declared using them |
2744 | | - * (e.g., MPI_Errhandler_create). |
2745 | | - */ |
2746 | | -typedef void (MPI_Handler_function)(MPI_Comm *, int *, ...); |
2747 | | -/* MPI_Handler_function was removed in MPI-3.0; use MPI_Comm_use_errhandler_function instead. */ |
2748 | | - |
2749 | | -/* |
2750 | | - * Removed prototypes. These prototypes are only available if Open |
2751 | | - * MPI was configured with --enable-mpi1-compatibility. |
2752 | | - * |
2753 | | - * These functions were formally removed from the MPI specification |
2754 | | - * and should no longer be used in MPI applications. |
2755 | | - */ |
2756 | | -OMPI_DECLSPEC int MPI_Address(void *location, MPI_Aint *address) |
2757 | | - __mpi_interface_removed__(MPI_Address, MPI_Get_address); |
2758 | | -OMPI_DECLSPEC int PMPI_Address(void *location, MPI_Aint *address) |
2759 | | - __mpi_interface_removed__(PMPI_Address, PMPI_Get_address); |
2760 | | -OMPI_DECLSPEC int MPI_Errhandler_create(MPI_Handler_function *function, |
2761 | | - MPI_Errhandler *errhandler) |
2762 | | - __mpi_interface_removed__(MPI_Errhandler_create, MPI_Comm_create_errhandler); |
2763 | | -OMPI_DECLSPEC int PMPI_Errhandler_create(MPI_Handler_function *function, |
2764 | | - MPI_Errhandler *errhandler) |
2765 | | - __mpi_interface_removed__(PMPI_Errhandler_create, PMPI_Comm_create_errhandler); |
2766 | | -OMPI_DECLSPEC int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler) |
2767 | | - __mpi_interface_removed__(MPI_Errhandler_get, MPI_Comm_get_errhandler); |
2768 | | -OMPI_DECLSPEC int PMPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler) |
2769 | | - __mpi_interface_removed__(PMPI_Errhandler_get, PMPI_Comm_get_errhandler); |
2770 | | -OMPI_DECLSPEC int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler) |
2771 | | - __mpi_interface_removed__(MPI_Errhandler_set, MPI_Comm_set_errhandler); |
2772 | | -OMPI_DECLSPEC int PMPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler) |
2773 | | - __mpi_interface_removed__(PMPI_Errhandler_set, PMPI_Comm_set_errhandler); |
2774 | | -OMPI_DECLSPEC int MPI_Type_extent(MPI_Datatype type, MPI_Aint *extent) |
2775 | | - __mpi_interface_removed__(MPI_Type_extent, MPI_Type_get_extent); |
2776 | | -OMPI_DECLSPEC int PMPI_Type_extent(MPI_Datatype type, MPI_Aint *extent) |
2777 | | - __mpi_interface_removed__(PMPI_Type_extent, PMPI_Type_get_extent); |
2778 | | -OMPI_DECLSPEC int MPI_Type_hindexed(int count, int array_of_blocklengths[], |
2779 | | - MPI_Aint array_of_displacements[], |
2780 | | - MPI_Datatype oldtype, MPI_Datatype *newtype) |
2781 | | - __mpi_interface_removed__(MPI_Type_hindexed, MPI_Type_create_hindexed); |
2782 | | -OMPI_DECLSPEC int PMPI_Type_hindexed(int count, int array_of_blocklengths[], |
2783 | | - MPI_Aint array_of_displacements[], |
2784 | | - MPI_Datatype oldtype, MPI_Datatype *newtype) |
2785 | | - __mpi_interface_removed__(PMPI_Type_hindexed, PMPI_Type_create_hindexed); |
2786 | | -OMPI_DECLSPEC int MPI_Type_hvector(int count, int blocklength, MPI_Aint stride, |
2787 | | - MPI_Datatype oldtype, MPI_Datatype *newtype) |
2788 | | - __mpi_interface_removed__(MPI_Type_hvector, MPI_Type_create_hvector); |
2789 | | -OMPI_DECLSPEC int PMPI_Type_hvector(int count, int blocklength, MPI_Aint stride, |
2790 | | - MPI_Datatype oldtype, MPI_Datatype *newtype) |
2791 | | - __mpi_interface_removed__(PMPI_Type_hvector, PMPI_Type_create_hvector); |
2792 | | -OMPI_DECLSPEC int MPI_Type_lb(MPI_Datatype type, MPI_Aint *lb) |
2793 | | - __mpi_interface_removed__(MPI_Type_lb, MPI_Type_get_extent); |
2794 | | -OMPI_DECLSPEC int PMPI_Type_lb(MPI_Datatype type, MPI_Aint *lb) |
2795 | | - __mpi_interface_removed__(PMPI_Type_lb, PMPI_Type_get_extent); |
2796 | | -OMPI_DECLSPEC int MPI_Type_struct(int count, int array_of_blocklengths[], |
2797 | | - MPI_Aint array_of_displacements[], |
2798 | | - MPI_Datatype array_of_types[], |
2799 | | - MPI_Datatype *newtype) |
2800 | | - __mpi_interface_removed__(MPI_Type_struct, MPI_Type_create_struct); |
2801 | | -OMPI_DECLSPEC int PMPI_Type_struct(int count, int array_of_blocklengths[], |
2802 | | - MPI_Aint array_of_displacements[], |
2803 | | - MPI_Datatype array_of_types[], |
2804 | | - MPI_Datatype *newtype) |
2805 | | - __mpi_interface_removed__(PMPI_Type_struct, PMPI_Type_create_struct); |
2806 | | -OMPI_DECLSPEC int MPI_Type_ub(MPI_Datatype mtype, MPI_Aint *ub) |
2807 | | - __mpi_interface_removed__(MPI_Type_ub, MPI_Type_get_extent); |
2808 | | -OMPI_DECLSPEC int PMPI_Type_ub(MPI_Datatype mtype, MPI_Aint *ub) |
2809 | | - __mpi_interface_removed__(PMPI_Type_ub, PMPI_Type_get_extent); |
2810 | | -#endif /* !OMPI_OMIT_MPI1_COMPAT_DECLS */ |
2811 | | - |
2812 | | -#if OMPI_REMOVED_USE_STATIC_ASSERT |
2813 | | -#define MPI_Address(...) THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_Address, MPI_Get_address) |
2814 | | -#define MPI_Errhandler_create(...) THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_Errhandler_create, MPI_Comm_create_errhandler) |
2815 | | -#define MPI_Errhandler_get(...) THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_Errhandler_get, MPI_Comm_get_errhandler) |
2816 | | -#define MPI_Errhandler_set(...) THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_Errhandler_set, MPI_Comm_set_errhandler) |
2817 | | -#define MPI_Type_extent(...) THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_Type_extent, MPI_Type_get_extent) |
2818 | | -#define MPI_Type_hindexed(...) THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_Type_hindexed, MPI_Type_create_hindexed) |
2819 | | -#define MPI_Type_hvector(...) THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_Type_hvector, MPI_Type_create_hvector) |
2820 | | -#define MPI_Type_lb(...) THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_Type_lb, MPI_Type_get_extent) |
2821 | | -#define MPI_Type_struct(...) THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_Type_struct, MPI_Type_create_struct) |
2822 | | -#define MPI_Type_ub(...) THIS_SYMBOL_WAS_REMOVED_IN_MPI30(MPI_Type_ub, MPI_Type_get_extent) |
2823 | | -#endif |
2824 | | - |
2825 | 2643 | #if defined(c_plusplus) || defined(__cplusplus) |
2826 | 2644 | } |
2827 | 2645 | #endif |
|
0 commit comments