Skip to content

Commit a620328

Browse files
committed
Remove MPI1 functionality completely
This commit removes MPI1 functionality that was removed in the MPI 3.0 standard, completely. This commit also removes the ability to configure with --enable-mpi1-compatibility configure flag. Users of these removed interfaces should stay at Open MPI v4.x. This commit also removes all of the MPI data structures, and functions from mpi.h that were removed in the MPI3.0 standard. Including the Fortran TKR definitions.
1 parent b6f207d commit a620328

15 files changed

+16
-975
lines changed

config/ompi_configure_options.m4

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dnl Copyright (c) 2004-2005 The Regents of the University of California.
1212
dnl All rights reserved.
1313
dnl Copyright (c) 2006-2017 Cisco Systems, Inc. All rights reserved
1414
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
15-
dnl Copyright (c) 2009 IBM Corporation. All rights reserved.
15+
dnl Copyright (c) 2009-2019 IBM Corporation. All rights reserved.
1616
dnl Copyright (c) 2009-2018 Los Alamos National Security, LLC. All rights
1717
dnl reserved.
1818
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
@@ -196,22 +196,6 @@ fi
196196
AC_DEFINE_UNQUOTED([OMPI_WANT_MPI_CXX_SEEK], [$OMPI_WANT_MPI_CXX_SEEK],
197197
[do we want to try to work around C++ bindings SEEK_* issue?])
198198

199-
# Remove these when we finally kill them once and for all
200-
AC_ARG_ENABLE([mpi1-compatibility],
201-
[AC_HELP_STRING([--enable-mpi1-compatibility],
202-
[Enable support for MPI-1.x functions removed from the current MPI standard (MPI-3.x). This option will go away in a future release of Open MPI (default: disabled)])])
203-
204-
if test "x$enable_mpi1_compatibility" = "xyes" ; then
205-
ompi_mpi1_support=1
206-
else
207-
ompi_mpi1_support=0
208-
fi
209-
210-
211-
AC_DEFINE_UNQUOTED([OMPI_ENABLE_MPI1_COMPAT], [$ompi_mpi1_support], [whether we want MPI-1.x support])
212-
AC_SUBST([OMPI_ENABLE_MPI1_COMPAT], [$ompi_mpi1_support])
213-
AM_CONDITIONAL([OMPI_ENABLE_MPI1_COMPAT],[test $ompi_mpi1_support = 1])
214-
215199
AC_ARG_ENABLE([grequest-extensions],
216200
[AC_HELP_STRING([--enable-grequest-extensions],
217201
[Enable support for Grequest extensions (default: disabled)])])

ompi/datatype/ompi_datatype_args.c

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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 & 126 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

@@ -279,24 +276,6 @@
279276
# else
280277
# define __mpi_interface_deprecated__(msg) __attribute__((__deprecated__))
281278
# endif
282-
# endif
283-
/* For removed API, there is no portable way to cause the
284-
* C compiler to error with a nice message on the usage of
285-
* one of these symbols, so instead we use a C11 static_assert
286-
* If the user is not using a C11 compiler, they will get an
287-
* undefined reference, but no line number or nice message.
288-
*/
289-
# if (OMPI_ENABLE_MPI1_COMPAT && !OMPI_BUILDING)
290-
# define OMPI_OMIT_MPI1_COMPAT_DECLS 0
291-
# if (__STDC_VERSION__ >= 201112L)
292-
# define MPI_INTERFACE_REMOVED(func, newfunc, ...) _Static_assert(0, #func " was removed in MPI-3.0. Use " #newfunc " instead.")
293-
# else
294-
# if OPAL_HAVE_ATTRIBUTE_ERROR
295-
# define MPI_INTERFACE_REMOVED(func, newfunc, ...) func(__VA_ARGS) __attribute__((__error__(#func " was removed in MPI-3.0. Use " #newfunc " instead.")))
296-
# else
297-
# define MPI_INTERFACE_REMOVED(func, newfunc, ...) func(__VA_ARGS)
298-
# endif
299-
# endif
300279
# endif
301280
# endif
302281
# endif
@@ -311,14 +290,6 @@
311290
# define __mpi_interface_deprecated__(msg)
312291
#endif
313292

314-
#if !defined(__mpi_interface_removed__)
315-
# define __mpi_interface_removed__(msg)
316-
#endif
317-
318-
#if !defined(OMPI_OMIT_MPI1_COMPAT_DECLS)
319-
# define OMPI_OMIT_MPI1_COMPAT_DECLS !OMPI_ENABLE_MPI1_COMPAT
320-
#endif
321-
322293
/*
323294
* To accomodate programs written for MPI implementations that use a
324295
* straight ROMIO import
@@ -1019,23 +990,6 @@ OMPI_DECLSPEC extern struct ompi_predefined_info_t ompi_mpi_info_env;
1019990
OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUS_IGNORE;
1020991
OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUSES_IGNORE;
1021992

1022-
#if (!OMPI_OMIT_MPI1_COMPAT_DECLS || OMPI_BUILDING)
1023-
/*
1024-
* Removed datatypes. These datatypes are only available if Open MPI
1025-
* was configured with --enable-mpi1-compatibility.
1026-
*
1027-
* These datatypes were formally removed from the MPI specification
1028-
* and should no longer be used in MPI applications.
1029-
*/
1030-
#define MPI_UB OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_ub)
1031-
#define MPI_LB OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_lb)
1032-
1033-
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_lb
1034-
__mpi_interface_removed__("MPI_LB was removed in MPI-3.0; use MPI_Type_create_resized instead.");
1035-
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_ub
1036-
__mpi_interface_removed__("MPI_UB was removed in MPI-3.0; use MPI_Type_create_resized instead.");
1037-
#endif /* !OMPI_OMIT_MPI1_COMPAT_DECLS */
1038-
1039993
/*
1040994
* MPI predefined handles
1041995
*/
@@ -2686,86 +2640,6 @@ OMPI_DECLSPEC int OMPI_C_MPI_NULL_DELETE_FN( MPI_Comm comm, int comm_keyval,
26862640
void* extra_state )
26872641
__mpi_interface_deprecated__("MPI_NULL_DELETE_FN was deprecated in MPI-2.0; use MPI_COMM_NULL_DELETE_FN instead.");
26882642

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

ompi/mpi/c/Makefile.am

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -436,21 +436,6 @@ libmpi_c_mpi_la_SOURCES = \
436436
win_unlock_all.c \
437437
win_wait.c
438438

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-
454439
# Conditionally install the header files
455440

456441
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: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,4 @@ const char*** ARGVS_NULL = (const char***) MPI_ARGVS_NULL;
163163
// empty group
164164
const Group GROUP_EMPTY(MPI_GROUP_EMPTY);
165165

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-
172166
} /* namespace MPI */

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@
106106
#define OMPI_KIND_FORTRAN_COMPLEX32 @OMPI_KIND_FORTRAN_COMPLEX32@
107107
#define OMPI_SIZEOF_FORTRAN_COMPLEX32 @OMPI_SIZEOF_FORTRAN_COMPLEX32@
108108
109-
#define OMPI_ENABLE_MPI1_COMPAT @OMPI_ENABLE_MPI1_COMPAT@
110-
111109
! Include some post-processing, based on the values from above
112110
113111
#include "ompi/mpi/fortran/configure-fortran-output-bottom.h"

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

Lines changed: 1 addition & 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,21 +483,6 @@ 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

503488
#

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

Lines changed: 1 addition & 14 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,20 +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
414-
415402
#
416403
# Sym link in the sources from the real MPI directory
417404
#

ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ lib_LTLIBRARIES = lib@OMPI_LIBMPI_NAME@_usempi_ignore_tkr.la
2828

2929
mpi-ignore-tkr-interfaces.h: mpi-ignore-tkr-interfaces.h.in
3030
mpi-ignore-tkr-file-interfaces.h: mpi-ignore-tkr-file-interfaces.h.in
31-
mpi-ignore-tkr-removed-interfaces.h: mpi-ignore-tkr-removed-interfaces.h.in
3231

3332
mpi-ignore-tkr.lo: $(top_srcdir)/ompi/mpi/fortran/base/attr-fn-int-callback-interfaces.h
3433
mpi-ignore-tkr.lo: $(top_srcdir)/ompi/mpi/fortran/base/conversion-fn-null-int-interface.h
3534
mpi-ignore-tkr.lo: mpi-ignore-tkr-interfaces.h
3635
mpi-ignore-tkr.lo: mpi-ignore-tkr-file-interfaces.h
37-
mpi-ignore-tkr.lo: mpi-ignore-tkr-removed-interfaces.h
3836
mpi-ignore-tkr.lo: mpi-ignore-tkr-sizeof.h
3937
mpi-ignore-tkr.lo: mpi-ignore-tkr-sizeof.f90
4038
mpi-ignore-tkr.lo: mpi-ignore-tkr.F90
@@ -43,8 +41,7 @@ lib@OMPI_LIBMPI_NAME@_usempi_ignore_tkr_la_SOURCES = \
4341
mpi-ignore-tkr.F90
4442
nodist_lib@OMPI_LIBMPI_NAME@_usempi_ignore_tkr_la_SOURCES = \
4543
mpi-ignore-tkr-interfaces.h \
46-
mpi-ignore-tkr-file-interfaces.h \
47-
mpi-ignore-tkr-removed-interfaces.h
44+
mpi-ignore-tkr-file-interfaces.h
4845

4946
if BUILD_FORTRAN_SIZEOF
5047
# These files are generated; do not distribute them

0 commit comments

Comments
 (0)