Skip to content

Commit 44d2976

Browse files
committed
Remove MPI1 functions and datatypes (API change!)
This commit removes the MPI1 functions and datatypes from both the mpi.h header and from the library. WARNING: This changes the MPI API, in a non-backwards compatible way. This also removes the configure option that was added in Open MPI v4.0.x, requiring users to change their apps if they are using any of these almost 20 year old APIs. This removes the following MPI1 removed functions at datatypes MPI_Address MPI_Errhandler_create MPI_Errhandler_get MPI_Errhandler_set MPI_Type_extent MPI_Type_hindexed MPI_Type_hvector MPI_Type_struct MPI_Type_UB MPI_Type_LB Signed-off-by: Geoffrey Paulsen <[email protected]>
1 parent 4671046 commit 44d2976

File tree

14 files changed

+27
-245
lines changed

14 files changed

+27
-245
lines changed

config/ompi_config_files.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Copyright (c) 2018 Los Alamos National Security, LLC. All rights
77
# reserved.
88
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
9+
# Copyright (c) 2019 IBM Corporation. All rights reserved.
910
# $COPYRIGHT$
1011
#
1112
# Additional copyrights may follow
@@ -36,7 +37,6 @@ AC_DEFUN([OMPI_CONFIG_FILES],[
3637
ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile
3738
ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h
3839
ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h
39-
ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-removed-interfaces.h
4040
ompi/mpi/fortran/use-mpi-f08/Makefile
4141
ompi/mpi/fortran/use-mpi-f08/bindings/Makefile
4242
ompi/mpi/fortran/use-mpi-f08/mod/Makefile

contrib/update-my-copyright.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565
my $HELP = 0;
6666

6767
# Defaults
68-
my $my_search_name = "Cisco";
69-
my $my_formal_name = "Cisco Systems, Inc. All rights reserved.";
68+
my $my_search_name = "IBM";
69+
my $my_formal_name = "IBM Corporation. All rights reserved.";
7070
my $my_manual_list = "";
7171

7272
# Protected directories

ompi/datatype/ompi_datatype_args.c

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* reserved.
1616
* Copyright (c) 2015-2019 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
18-
* Copyright (c) 2017 IBM Corporation. All rights reserved.
18+
* Copyright (c) 2017-2019 IBM Corporation. All rights reserved.
1919
* $COPYRIGHT$
2020
*
2121
* Additional copyrights may follow
@@ -841,25 +841,19 @@ ompi_datatype_t* ompi_datatype_get_single_predefined_type_from_args( ompi_dataty
841841
return NULL;
842842
}
843843
}
844-
#if OMPI_ENABLE_MPI1_COMPAT
845-
if (current_predef != MPI_LB && current_predef != MPI_UB) {
846-
#endif
847-
if( NULL == predef ) { /* This is the first iteration */
848-
predef = current_predef;
849-
} else {
850-
/**
851-
* What exactly should we consider as identical types?
852-
* If they are the same MPI level type, or if they map
853-
* to the same OPAL datatype? In other words, MPI_FLOAT
854-
* and MPI_REAL4 are they identical?
855-
*/
856-
if( predef != current_predef ) {
857-
return NULL;
858-
}
844+
if( NULL == predef ) { /* This is the first iteration */
845+
predef = current_predef;
846+
} else {
847+
/**
848+
* What exactly should we consider as identical types?
849+
* If they are the same MPI level type, or if they map
850+
* to the same OPAL datatype? In other words, MPI_FLOAT
851+
* and MPI_REAL4 are they identical?
852+
*/
853+
if( predef != current_predef ) {
854+
return NULL;
859855
}
860-
#if OMPI_ENABLE_MPI1_COMPAT
861856
}
862-
#endif
863857
}
864858
return predef;
865859
}

ompi/include/mpi.h.in

Lines changed: 0 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@
137137
/* Whether we have FORTRAN REAL*8 or not */
138138
#undef OMPI_HAVE_FORTRAN_REAL8
139139

140-
/* Whether in include MPI-1 compatibility */
141-
#undef OMPI_ENABLE_MPI1_COMPAT
142-
143140
/* Whether we have float _Complex or not */
144141
#undef HAVE_FLOAT__COMPLEX
145142

@@ -280,33 +277,8 @@
280277
# define __mpi_interface_deprecated__(msg) __attribute__((__deprecated__))
281278
# endif
282279
# 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-
# if (OMPI_ENABLE_MPI1_COMPAT || OMPI_BUILDING)
292-
# define OMPI_OMIT_MPI1_COMPAT_DECLS 0
293-
# define MPI_INTERFACE_REMOVED(func, newfunc, ...) func(__VA_ARGS) __mpi_interface_deprecated__((#func " was removed in MPI-3.0. Use " #newfunc " instead. continuing..."))
294-
# else
295-
# if (__STDC_VERSION__ >= 201112L)
296-
# define MPI_INTERFACE_REMOVED(func, newfunc, ...) _Static_assert(0, #func " was removed in MPI-3.0. Use " #newfunc " instead.")
297-
# define OMPI_OMIT_MPI1_COMPAT_DECLS 0
298-
# else
299-
# if OPAL_HAVE_ATTRIBUTE_ERROR
300-
# define MPI_INTERFACE_REMOVED(func, newfunc, ...) func(__VA_ARGS) __attribute__((__error__(#func " was removed in MPI-3.0. Use " #newfunc " instead.")))
301-
# define OMPI_OMIT_MPI1_COMPAT_DECLS 0
302-
# else
303-
# define MPI_INTERFACE_REMOVED(func, newfunc, ...) func(__VA_ARGS)
304-
# define OMPI_OMIT_MPI1_COMPAT_DECLS 1
305-
# endif
306-
# endif
307280
# endif
308281
# endif
309-
#endif
310282

311283
/*
312284
* If we didn't define __mpi_interface_deprecated__ above, then we
@@ -317,14 +289,6 @@
317289
# define __mpi_interface_deprecated__(msg)
318290
#endif
319291

320-
#if !defined(__mpi_interface_removed__)
321-
# define __mpi_interface_removed__(msg)
322-
#endif
323-
324-
#if !defined(OMPI_OMIT_MPI1_COMPAT_DECLS)
325-
# define OMPI_OMIT_MPI1_COMPAT_DECLS !OMPI_ENABLE_MPI1_COMPAT
326-
#endif
327-
328292
/*
329293
* To accomodate programs written for MPI implementations that use a
330294
* straight ROMIO import
@@ -1025,23 +989,6 @@ OMPI_DECLSPEC extern struct ompi_predefined_info_t ompi_mpi_info_env;
1025989
OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUS_IGNORE;
1026990
OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUSES_IGNORE;
1027991

1028-
#if !OMPI_OMIT_MPI1_COMPAT_DECLS
1029-
/*
1030-
* Removed datatypes. These datatypes are only available if Open MPI
1031-
* was configured with --enable-mpi1-compatibility.
1032-
*
1033-
* These datatypes were formally removed from the MPI specification
1034-
* and should no longer be used in MPI applications.
1035-
*/
1036-
#define MPI_UB OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_ub)
1037-
#define MPI_LB OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_lb)
1038-
1039-
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_lb
1040-
__mpi_interface_removed__("MPI_LB was removed in MPI-3.0; use MPI_Type_create_resized instead.");
1041-
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_ub
1042-
__mpi_interface_removed__("MPI_UB was removed in MPI-3.0; use MPI_Type_create_resized instead.");
1043-
#endif /* !OMPI_OMIT_MPI1_COMPAT_DECLS */
1044-
1045992
/*
1046993
* MPI predefined handles
1047994
*/
@@ -2692,85 +2639,6 @@ OMPI_DECLSPEC int OMPI_C_MPI_NULL_DELETE_FN( MPI_Comm comm, int comm_keyval,
26922639
void* extra_state )
26932640
__mpi_interface_deprecated__("MPI_NULL_DELETE_FN was deprecated in MPI-2.0; use MPI_COMM_NULL_DELETE_FN instead.");
26942641

2695-
#if !OMPI_OMIT_MPI1_COMPAT_DECLS
2696-
/*
2697-
* Removed typedefs. These typedefs are only available if Open MPI
2698-
* was configured with --enable-mpi1-compatibility.
2699-
*
2700-
* These typedefs were formally removed from the MPI specification
2701-
* and should no longer be used in MPI applications.
2702-
*
2703-
* Even though MPI_Handler_function is removed, we do not use the
2704-
* attributes marking it as such, because otherwise the compiler
2705-
* will warn for all the functions that are declared using them
2706-
* (e.g., MPI_Errhandler_create).
2707-
*/
2708-
typedef void (MPI_Handler_function)(MPI_Comm *, int *, ...);
2709-
/* MPI_Handler_function was removed in MPI-3.0; use MPI_Comm_use_errhandler_function instead. */
2710-
2711-
/*
2712-
* Removed prototypes. These prototypes are only available if Open
2713-
* MPI was configured with --enable-mpi1-compatibility.
2714-
*
2715-
* These functions were formally removed from the MPI specification
2716-
* and should no longer be used in MPI applications.
2717-
*/
2718-
OMPI_DECLSPEC int MPI_Address(void *location, MPI_Aint *address);
2719-
#define MPI_Address(...) MPI_INTERFACE_REMOVED(MPI_Address, MPI_Get_address)
2720-
OMPI_DECLSPEC int PMPI_Address(void *location, MPI_Aint *address);
2721-
#define PMPI_Address(...) MPI_INTERFACE_REMOVED(PMPI_Address, PMPI_Get_address)
2722-
OMPI_DECLSPEC int MPI_Errhandler_create(MPI_Handler_function *function,
2723-
MPI_Errhandler *errhandler);
2724-
#define MPI_Errhandler_create MPI_INTERFACE_REMOVED(MPI_Errhandler_create, MPI_Comm_create_errhandler)
2725-
OMPI_DECLSPEC int PMPI_Errhandler_create(MPI_Handler_function *function,
2726-
MPI_Errhandler *errhandler);
2727-
#define PMPI_Errhandler_create MPI_INTERFACE_REMOVED(PMPI_Errhandler_create, PMPI_Comm_create_errhandler)
2728-
OMPI_DECLSPEC int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler);
2729-
#define MPI_Errhandler_get(...) MPI_INTERFACE_REMOVED(MPI_Errhandler_get, MPI_Comm_get_errhandler)
2730-
OMPI_DECLSPEC int PMPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler);
2731-
#define PMPI_Errhandler_get(...) MPI_INTERFACE_REMOVED(PMPI_Errhandler_get, PMPI_Comm_get_errhandler)
2732-
OMPI_DECLSPEC int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler);
2733-
#define MPI_Errhandler_set(...) MPI_INTERFACE_REMOVED(MPI_Errhandler_set, MPI_Comm_set_errhandler)
2734-
OMPI_DECLSPEC int PMPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler);
2735-
#define PMPI_Errhandler_set(...) MPI_INTERFACE_REMOVED(PMPI_Errhandler_set, PMPI_Comm_set_errhandler)
2736-
OMPI_DECLSPEC int MPI_Type_extent(MPI_Datatype type, MPI_Aint *extent);
2737-
#define MPI_Type_extent(...) MPI_INTERFACE_REMOVED(MPI_Type_extent, MPI_Type_get_extent)
2738-
OMPI_DECLSPEC int PMPI_Type_extent(MPI_Datatype type, MPI_Aint *extent);
2739-
#define PMPI_Type_extent(...) MPI_INTERFACE_REMOVED(PMPI_Type_extent, PMPI_Type_get_extent)
2740-
OMPI_DECLSPEC int MPI_Type_hindexed(int count, int array_of_blocklengths[],
2741-
MPI_Aint array_of_displacements[],
2742-
MPI_Datatype oldtype, MPI_Datatype *newtype);
2743-
#define MPI_Type_hindexed(...) MPI_INTERFACE_REMOVED(MPI_Type_hindexed, MPI_Type_create_hindexed)
2744-
OMPI_DECLSPEC int PMPI_Type_hindexed(int count, int array_of_blocklengths[],
2745-
MPI_Aint array_of_displacements[],
2746-
MPI_Datatype oldtype, MPI_Datatype *newtype);
2747-
#define PMPI_Type_hindexed(...) MPI_INTERFACE_REMOVED(PMPI_Type_hindexed, PMPI_Type_create_hindexed)
2748-
OMPI_DECLSPEC int MPI_Type_hvector(int count, int blocklength, MPI_Aint stride,
2749-
MPI_Datatype oldtype, MPI_Datatype *newtype);
2750-
#define MPI_Type_hvector(...) MPI_INTERFACE_REMOVED(MPI_Type_hvector, MPI_Type_create_hvector)
2751-
OMPI_DECLSPEC int PMPI_Type_hvector(int count, int blocklength, MPI_Aint stride,
2752-
MPI_Datatype oldtype, MPI_Datatype *newtype);
2753-
#define PMPI_Type_hvector(...) MPI_INTERFACE_REMOVED(PMPI_Type_hvector, PMPI_Type_create_hvector)
2754-
OMPI_DECLSPEC int MPI_Type_lb(MPI_Datatype type, MPI_Aint *lb);
2755-
#define MPI_Type_lb(...) MPI_INTERFACE_REMOVED(MPI_Type_lb, MPI_Type_get_extent)
2756-
OMPI_DECLSPEC int PMPI_Type_lb(MPI_Datatype type, MPI_Aint *lb);
2757-
#define PMPI_Type_lb(...) MPI_INTERFACE_REMOVED(PMPI_Type_lb, PMPI_Type_get_extent)
2758-
OMPI_DECLSPEC int MPI_Type_struct(int count, int array_of_blocklengths[],
2759-
MPI_Aint array_of_displacements[],
2760-
MPI_Datatype array_of_types[],
2761-
MPI_Datatype *newtype);
2762-
#define MPI_Type_struct MPI_INTERFACE_REMOVED(MPI_Type_struct, MPI_Type_create_struct)
2763-
OMPI_DECLSPEC int PMPI_Type_struct(int count, int array_of_blocklengths[],
2764-
MPI_Aint array_of_displacements[],
2765-
MPI_Datatype array_of_types[],
2766-
MPI_Datatype *newtype);
2767-
#define PMPI_Type_struct MPI_INTERFACE_REMOVED(PMPI_Type_struct, PMPI_Type_create_struct)
2768-
OMPI_DECLSPEC int MPI_Type_ub(MPI_Datatype mtype, MPI_Aint *ub);
2769-
#define MPI_Type_ub(...) MPI_INTERFACE_REMOVED(MPI_Type_ub, MPI_Type_get_extent)
2770-
OMPI_DECLSPEC int PMPI_Type_ub(MPI_Datatype mtype, MPI_Aint *ub);
2771-
#define PMPI_Type_ub(...) MPI_INTERFACE_REMOVED(PMPI_Type_ub, PMPI_Type_get_extent)
2772-
#endif /* !OMPI_OMIT_MPI1_COMPAT_DECLS */
2773-
27742642

27752643
#if defined(c_plusplus) || defined(__cplusplus)
27762644
}

ompi/mpi/c/Makefile.am

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# reserved.
1818
# Copyright (c) 2015-2018 Research Organization for Information Science
1919
# and Technology (RIST). All rights reserved.
20+
# Copyright (c) 2019 IBM Corporation. All rights reserved.
2021
# $COPYRIGHT$
2122
#
2223
# Additional copyrights may follow
@@ -436,21 +437,6 @@ libmpi_c_mpi_la_SOURCES = \
436437
win_unlock_all.c \
437438
win_wait.c
438439

439-
440-
if OMPI_ENABLE_MPI1_COMPAT
441-
libmpi_c_mpi_la_SOURCES += \
442-
address.c \
443-
errhandler_create.c \
444-
errhandler_get.c \
445-
errhandler_set.c \
446-
type_extent.c \
447-
type_hindexed.c \
448-
type_hvector.c \
449-
type_lb.c \
450-
type_struct.c \
451-
type_ub.c
452-
endif
453-
454440
# Conditionally install the header files
455441

456442
if WANT_INSTALL_HEADERS

ompi/mpi/c/profile/Makefile.am

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# reserved.
1919
# Copyright (c) 2015-2018 Research Organization for Information Science
2020
# and Technology (RIST). All rights reserved.
21+
# Copyright (c) 2019 IBM Corporation. All rights reserved.
2122
# $COPYRIGHT$
2223
#
2324
# Additional copyrights may follow
@@ -416,20 +417,6 @@ nodist_libmpi_c_pmpi_la_SOURCES = \
416417
pwin_unlock_all.c \
417418
pwin_wait.c
418419

419-
if OMPI_ENABLE_MPI1_COMPAT
420-
nodist_libmpi_c_pmpi_la_SOURCES += \
421-
paddress.c \
422-
perrhandler_create.c \
423-
perrhandler_get.c \
424-
perrhandler_set.c \
425-
ptype_extent.c \
426-
ptype_hindexed.c \
427-
ptype_hvector.c \
428-
ptype_lb.c \
429-
ptype_struct.c \
430-
ptype_ub.c
431-
endif
432-
433420
#
434421
# Sym link in the sources from the real MPI directory
435422
#

ompi/mpi/cxx/mpicxx.cc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// Copyright (c) 2011 FUJITSU LIMITED. All rights reserved.
1616
// Copyright (c) 2017 Research Organization for Information Science
1717
// and Technology (RIST). All rights reserved.
18+
// Copyright (c) 2019 IBM Corporation. All rights reserved.
1819
// $COPYRIGHT$
1920
//
2021
// Additional copyrights may follow
@@ -163,10 +164,4 @@ const char*** ARGVS_NULL = (const char***) MPI_ARGVS_NULL;
163164
// empty group
164165
const Group GROUP_EMPTY(MPI_GROUP_EMPTY);
165166

166-
#if OMPI_ENABLE_MPI1_COMPAT
167-
// special datatypes for contstruction of derived datatypes
168-
const Datatype UB(MPI_UB);
169-
const Datatype LB(MPI_LB);
170-
#endif
171-
172167
} /* namespace MPI */

ompi/mpi/fortran/configure-fortran-output.h.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
! Copyright (c) 2017-2018 Research Organization for Information Science
77
! and Technology (RIST). All rights reserved.
88
!
9+
! Copyright (c) 2019 IBM Corporation. All rights reserved.
910
! $COPYRIGHT$
1011
!
1112
! Additional copyrights may follow
@@ -106,8 +107,6 @@
106107
#define OMPI_KIND_FORTRAN_COMPLEX32 @OMPI_KIND_FORTRAN_COMPLEX32@
107108
#define OMPI_SIZEOF_FORTRAN_COMPLEX32 @OMPI_SIZEOF_FORTRAN_COMPLEX32@
108109
109-
#define OMPI_ENABLE_MPI1_COMPAT @OMPI_ENABLE_MPI1_COMPAT@
110-
111110
! Include some post-processing, based on the values from above
112111
113112
#include "ompi/mpi/fortran/configure-fortran-output-bottom.h"

ompi/mpi/fortran/mpif-h/Makefile.am

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# reserved.
1717
# Copyright (c) 2015-2017 Research Organization for Information Science
1818
# and Technology (RIST). All rights reserved.
19-
# Copyright (c) 2016 IBM Corporation. All rights reserved.
19+
# Copyright (c) 2016-2019 IBM Corporation. All rights reserved.
2020
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
2121
# $COPYRIGHT$
2222
#
@@ -483,23 +483,9 @@ lib@OMPI_LIBMPI_NAME@_mpifh_la_SOURCES += \
483483
win_flush_all_f.c \
484484
win_flush_local_f.c \
485485
win_flush_local_all_f.c
486-
487-
488-
if OMPI_ENABLE_MPI1_COMPAT
489-
lib@OMPI_LIBMPI_NAME@_mpifh_la_SOURCES += \
490-
address_f.c \
491-
errhandler_create_f.c \
492-
errhandler_get_f.c \
493-
errhandler_set_f.c \
494-
type_extent_f.c \
495-
type_hindexed_f.c \
496-
type_hvector_f.c \
497-
type_lb_f.c \
498-
type_struct_f.c \
499-
type_ub_f.c
500-
endif
501486
endif
502487

488+
503489
#
504490
# Conditionally install the header files
505491
#

ompi/mpi/fortran/mpif-h/profile/Makefile.am

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# Copyright (c) 2015-2018 Research Organization for Information Science
1919
# and Technology (RIST). All rights reserved.
2020
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
21+
# Copyright (c) 2019 IBM Corporation. All rights reserved.
2122
# $COPYRIGHT$
2223
#
2324
# Additional copyrights may follow
@@ -398,19 +399,6 @@ linked_files = \
398399
pwin_flush_local_f.c \
399400
pwin_flush_local_all_f.c
400401

401-
if OMPI_ENABLE_MPI1_COMPAT
402-
linked_files += \
403-
paddress_f.c \
404-
perrhandler_create_f.c \
405-
perrhandler_get_f.c \
406-
perrhandler_set_f.c \
407-
ptype_extent_f.c \
408-
ptype_hindexed_f.c \
409-
ptype_hvector_f.c \
410-
ptype_lb_f.c \
411-
ptype_struct_f.c \
412-
ptype_ub_f.c
413-
endif
414402

415403
#
416404
# Sym link in the sources from the real MPI directory

0 commit comments

Comments
 (0)