Skip to content

Commit

Permalink
Remove MPI1 functionality completely
Browse files Browse the repository at this point in the history
  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.
  • Loading branch information
gpaulsen committed Feb 8, 2019
1 parent b6f207d commit cdb9729
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 971 deletions.
18 changes: 1 addition & 17 deletions config/ompi_configure_options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
dnl Copyright (c) 2006-2017 Cisco Systems, Inc. All rights reserved
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2009 IBM Corporation. All rights reserved.
dnl Copyright (c) 2009-2019 IBM Corporation. All rights reserved.
dnl Copyright (c) 2009-2018 Los Alamos National Security, LLC. All rights
dnl reserved.
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
Expand Down Expand Up @@ -196,22 +196,6 @@ fi
AC_DEFINE_UNQUOTED([OMPI_WANT_MPI_CXX_SEEK], [$OMPI_WANT_MPI_CXX_SEEK],
[do we want to try to work around C++ bindings SEEK_* issue?])

# Remove these when we finally kill them once and for all
AC_ARG_ENABLE([mpi1-compatibility],
[AC_HELP_STRING([--enable-mpi1-compatibility],
[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)])])

if test "x$enable_mpi1_compatibility" = "xyes" ; then
ompi_mpi1_support=1
else
ompi_mpi1_support=0
fi


AC_DEFINE_UNQUOTED([OMPI_ENABLE_MPI1_COMPAT], [$ompi_mpi1_support], [whether we want MPI-1.x support])
AC_SUBST([OMPI_ENABLE_MPI1_COMPAT], [$ompi_mpi1_support])
AM_CONDITIONAL([OMPI_ENABLE_MPI1_COMPAT],[test $ompi_mpi1_support = 1])

AC_ARG_ENABLE([grequest-extensions],
[AC_HELP_STRING([--enable-grequest-extensions],
[Enable support for Grequest extensions (default: disabled)])])
Expand Down
28 changes: 11 additions & 17 deletions ompi/datatype/ompi_datatype_args.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,25 +841,19 @@ ompi_datatype_t* ompi_datatype_get_single_predefined_type_from_args( ompi_dataty
return NULL;
}
}
#if OMPI_ENABLE_MPI1_COMPAT
if (current_predef != MPI_LB && current_predef != MPI_UB) {
#endif
if( NULL == predef ) { /* This is the first iteration */
predef = current_predef;
} else {
/**
* What exactly should we consider as identical types?
* If they are the same MPI level type, or if they map
* to the same OPAL datatype? In other words, MPI_FLOAT
* and MPI_REAL4 are they identical?
*/
if( predef != current_predef ) {
return NULL;
}
if( NULL == predef ) { /* This is the first iteration */
predef = current_predef;
} else {
/**
* What exactly should we consider as identical types?
* If they are the same MPI level type, or if they map
* to the same OPAL datatype? In other words, MPI_FLOAT
* and MPI_REAL4 are they identical?
*/
if( predef != current_predef ) {
return NULL;
}
#if OMPI_ENABLE_MPI1_COMPAT
}
#endif
}
return predef;
}
126 changes: 0 additions & 126 deletions ompi/include/mpi.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@
/* Whether we have FORTRAN REAL*8 or not */
#undef OMPI_HAVE_FORTRAN_REAL8

/* Whether in include MPI-1 compatibility */
#undef OMPI_ENABLE_MPI1_COMPAT

/* Whether we have float _Complex or not */
#undef HAVE_FLOAT__COMPLEX

Expand Down Expand Up @@ -279,24 +276,6 @@
# else
# define __mpi_interface_deprecated__(msg) __attribute__((__deprecated__))
# endif
# endif
/* For removed API, there is no portable way to cause the
* C compiler to error with a nice message on the usage of
* one of these symbols, so instead we use a C11 static_assert
* If the user is not using a C11 compiler, they will get an
* undefined reference, but no line number or nice message.
*/
# if (OMPI_ENABLE_MPI1_COMPAT && !OMPI_BUILDING)
# define OMPI_OMIT_MPI1_COMPAT_DECLS 0
# if (__STDC_VERSION__ >= 201112L)
# define MPI_INTERFACE_REMOVED(func, newfunc, ...) _Static_assert(0, #func " was removed in MPI-3.0. Use " #newfunc " instead.")
# else
# if OPAL_HAVE_ATTRIBUTE_ERROR
# define MPI_INTERFACE_REMOVED(func, newfunc, ...) func(__VA_ARGS) __attribute__((__error__(#func " was removed in MPI-3.0. Use " #newfunc " instead.")))
# else
# define MPI_INTERFACE_REMOVED(func, newfunc, ...) func(__VA_ARGS)
# endif
# endif
# endif
# endif
# endif
Expand All @@ -311,14 +290,6 @@
# define __mpi_interface_deprecated__(msg)
#endif

#if !defined(__mpi_interface_removed__)
# define __mpi_interface_removed__(msg)
#endif

#if !defined(OMPI_OMIT_MPI1_COMPAT_DECLS)
# define OMPI_OMIT_MPI1_COMPAT_DECLS !OMPI_ENABLE_MPI1_COMPAT
#endif

/*
* To accomodate programs written for MPI implementations that use a
* straight ROMIO import
Expand Down Expand Up @@ -1019,23 +990,6 @@ OMPI_DECLSPEC extern struct ompi_predefined_info_t ompi_mpi_info_env;
OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUS_IGNORE;
OMPI_DECLSPEC extern MPI_Fint *MPI_F_STATUSES_IGNORE;

#if (!OMPI_OMIT_MPI1_COMPAT_DECLS || OMPI_BUILDING)
/*
* Removed datatypes. These datatypes are only available if Open MPI
* was configured with --enable-mpi1-compatibility.
*
* These datatypes were formally removed from the MPI specification
* and should no longer be used in MPI applications.
*/
#define MPI_UB OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_ub)
#define MPI_LB OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_lb)

OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_lb
__mpi_interface_removed__("MPI_LB was removed in MPI-3.0; use MPI_Type_create_resized instead.");
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_ub
__mpi_interface_removed__("MPI_UB was removed in MPI-3.0; use MPI_Type_create_resized instead.");
#endif /* !OMPI_OMIT_MPI1_COMPAT_DECLS */

/*
* MPI predefined handles
*/
Expand Down Expand Up @@ -2686,86 +2640,6 @@ OMPI_DECLSPEC int OMPI_C_MPI_NULL_DELETE_FN( MPI_Comm comm, int comm_keyval,
void* extra_state )
__mpi_interface_deprecated__("MPI_NULL_DELETE_FN was deprecated in MPI-2.0; use MPI_COMM_NULL_DELETE_FN instead.");

#if (!OMPI_OMIT_MPI1_COMPAT_DECLS || OMPI_BUILDING)
/*
* Removed typedefs. These typedefs are only available if Open MPI
* was configured with --enable-mpi1-compatibility.
*
* These typedefs were formally removed from the MPI specification
* and should no longer be used in MPI applications.
*
* Even though MPI_Handler_function is removed, we do not use the
* attributes marking it as such, because otherwise the compiler
* will warn for all the functions that are declared using them
* (e.g., MPI_Errhandler_create).
*/
typedef void (MPI_Handler_function)(MPI_Comm *, int *, ...);
/* MPI_Handler_function was removed in MPI-3.0; use MPI_Comm_use_errhandler_function instead. */

/*
* Removed prototypes. These prototypes are only available if Open
* MPI was configured with --enable-mpi1-compatibility.
*
* These functions were formally removed from the MPI specification
* and should no longer be used in MPI applications.
*/
OMPI_DECLSPEC int MPI_Address(void *location, MPI_Aint *address);
#define MPI_Address(...) MPI_INTERFACE_REMOVED(MPI_Address, MPI_Get_address)
OMPI_DECLSPEC int PMPI_Address(void *location, MPI_Aint *address);
#define PMPI_Address(...) MPI_INTERFACE_REMOVED(PMPI_Address, PMPI_Get_address)
OMPI_DECLSPEC int MPI_Errhandler_create(MPI_Handler_function *function,
MPI_Errhandler *errhandler);
#define MPI_Errhandler_create MPI_INTERFACE_REMOVED(MPI_Errhandler_create, MPI_Comm_create_errhandler)
OMPI_DECLSPEC int PMPI_Errhandler_create(MPI_Handler_function *function,
MPI_Errhandler *errhandler);
#define PMPI_Errhandler_create MPI_INTERFACE_REMOVED(PMPI_Errhandler_create, PMPI_Comm_create_errhandler)
OMPI_DECLSPEC int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler);
#define MPI_Errhandler_get(...) MPI_INTERFACE_REMOVED(MPI_Errhandler_get, MPI_Comm_get_errhandler)
OMPI_DECLSPEC int PMPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler);
#define PMPI_Errhandler_get(...) MPI_INTERFACE_REMOVED(PMPI_Errhandler_get, PMPI_Comm_get_errhandler)
OMPI_DECLSPEC int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler);
#define MPI_Errhandler_set(...) MPI_INTERFACE_REMOVED(MPI_Errhandler_set, MPI_Comm_set_errhandler)
OMPI_DECLSPEC int PMPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler);
#define PMPI_Errhandler_set(...) MPI_INTERFACE_REMOVED(PMPI_Errhandler_set, PMPI_Comm_set_errhandler)
OMPI_DECLSPEC int MPI_Type_extent(MPI_Datatype type, MPI_Aint *extent);
#define MPI_Type_extent(...) MPI_INTERFACE_REMOVED(MPI_Type_extent, MPI_Type_get_extent)
OMPI_DECLSPEC int PMPI_Type_extent(MPI_Datatype type, MPI_Aint *extent);
#define PMPI_Type_extent(...) MPI_INTERFACE_REMOVED(PMPI_Type_extent, PMPI_Type_get_extent)
OMPI_DECLSPEC int MPI_Type_hindexed(int count, int array_of_blocklengths[],
MPI_Aint array_of_displacements[],
MPI_Datatype oldtype, MPI_Datatype *newtype);
#define MPI_Type_hindexed(...) MPI_INTERFACE_REMOVED(MPI_Type_hindexed, MPI_Type_create_hindexed)
OMPI_DECLSPEC int PMPI_Type_hindexed(int count, int array_of_blocklengths[],
MPI_Aint array_of_displacements[],
MPI_Datatype oldtype, MPI_Datatype *newtype);
#define PMPI_Type_hindexed(...) MPI_INTERFACE_REMOVED(PMPI_Type_hindexed, PMPI_Type_create_hindexed)
OMPI_DECLSPEC int MPI_Type_hvector(int count, int blocklength, MPI_Aint stride,
MPI_Datatype oldtype, MPI_Datatype *newtype);
#define MPI_Type_hvector(...) MPI_INTERFACE_REMOVED(MPI_Type_hvector, MPI_Type_create_hvector)
OMPI_DECLSPEC int PMPI_Type_hvector(int count, int blocklength, MPI_Aint stride,
MPI_Datatype oldtype, MPI_Datatype *newtype);
#define PMPI_Type_hvector(...) MPI_INTERFACE_REMOVED(PMPI_Type_hvector, PMPI_Type_create_hvector)
OMPI_DECLSPEC int MPI_Type_lb(MPI_Datatype type, MPI_Aint *lb);
#define MPI_Type_lb(...) MPI_INTERFACE_REMOVED(MPI_Type_lb, MPI_Type_get_extent)
OMPI_DECLSPEC int PMPI_Type_lb(MPI_Datatype type, MPI_Aint *lb);
#define PMPI_Type_lb(...) MPI_INTERFACE_REMOVED(PMPI_Type_lb, PMPI_Type_get_extent)
OMPI_DECLSPEC int MPI_Type_struct(int count, int array_of_blocklengths[],
MPI_Aint array_of_displacements[],
MPI_Datatype array_of_types[],
MPI_Datatype *newtype);
#define MPI_Type_struct MPI_INTERFACE_REMOVED(MPI_Type_struct, MPI_Type_create_struct)
OMPI_DECLSPEC int PMPI_Type_struct(int count, int array_of_blocklengths[],
MPI_Aint array_of_displacements[],
MPI_Datatype array_of_types[],
MPI_Datatype *newtype);
#define PMPI_Type_struct MPI_INTERFACE_REMOVED(PMPI_Type_struct, PMPI_Type_create_struct)
OMPI_DECLSPEC int MPI_Type_ub(MPI_Datatype mtype, MPI_Aint *ub);
#define MPI_Type_ub(...) MPI_INTERFACE_REMOVED(MPI_Type_ub, MPI_Type_get_extent)
OMPI_DECLSPEC int PMPI_Type_ub(MPI_Datatype mtype, MPI_Aint *ub);
#define PMPI_Type_ub(...) MPI_INTERFACE_REMOVED(PMPI_Type_ub, PMPI_Type_get_extent)
#endif /* !OMPI_OMIT_MPI1_COMPAT_DECLS */


#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
Expand Down
15 changes: 0 additions & 15 deletions ompi/mpi/c/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -436,21 +436,6 @@ libmpi_c_mpi_la_SOURCES = \
win_unlock_all.c \
win_wait.c


if OMPI_ENABLE_MPI1_COMPAT
libmpi_c_mpi_la_SOURCES += \
address.c \
errhandler_create.c \
errhandler_get.c \
errhandler_set.c \
type_extent.c \
type_hindexed.c \
type_hvector.c \
type_lb.c \
type_struct.c \
type_ub.c
endif

# Conditionally install the header files

if WANT_INSTALL_HEADERS
Expand Down
15 changes: 1 addition & 14 deletions ompi/mpi/c/profile/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# reserved.
# Copyright (c) 2015-2018 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2019 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand Down Expand Up @@ -416,20 +417,6 @@ nodist_libmpi_c_pmpi_la_SOURCES = \
pwin_unlock_all.c \
pwin_wait.c

if OMPI_ENABLE_MPI1_COMPAT
nodist_libmpi_c_pmpi_la_SOURCES += \
paddress.c \
perrhandler_create.c \
perrhandler_get.c \
perrhandler_set.c \
ptype_extent.c \
ptype_hindexed.c \
ptype_hvector.c \
ptype_lb.c \
ptype_struct.c \
ptype_ub.c
endif

#
# Sym link in the sources from the real MPI directory
#
Expand Down
6 changes: 0 additions & 6 deletions ompi/mpi/cxx/mpicxx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,4 @@ const char*** ARGVS_NULL = (const char***) MPI_ARGVS_NULL;
// empty group
const Group GROUP_EMPTY(MPI_GROUP_EMPTY);

#if OMPI_ENABLE_MPI1_COMPAT
// special datatypes for contstruction of derived datatypes
const Datatype UB(MPI_UB);
const Datatype LB(MPI_LB);
#endif

} /* namespace MPI */
2 changes: 0 additions & 2 deletions ompi/mpi/fortran/configure-fortran-output.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@
#define OMPI_KIND_FORTRAN_COMPLEX32 @OMPI_KIND_FORTRAN_COMPLEX32@
#define OMPI_SIZEOF_FORTRAN_COMPLEX32 @OMPI_SIZEOF_FORTRAN_COMPLEX32@
#define OMPI_ENABLE_MPI1_COMPAT @OMPI_ENABLE_MPI1_COMPAT@
! Include some post-processing, based on the values from above
#include "ompi/mpi/fortran/configure-fortran-output-bottom.h"
Expand Down
17 changes: 1 addition & 16 deletions ompi/mpi/fortran/mpif-h/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# reserved.
# Copyright (c) 2015-2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# Copyright (c) 2016-2019 IBM Corporation. All rights reserved.
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
Expand Down Expand Up @@ -483,21 +483,6 @@ lib@OMPI_LIBMPI_NAME@_mpifh_la_SOURCES += \
win_flush_all_f.c \
win_flush_local_f.c \
win_flush_local_all_f.c


if OMPI_ENABLE_MPI1_COMPAT
lib@OMPI_LIBMPI_NAME@_mpifh_la_SOURCES += \
address_f.c \
errhandler_create_f.c \
errhandler_get_f.c \
errhandler_set_f.c \
type_extent_f.c \
type_hindexed_f.c \
type_hvector_f.c \
type_lb_f.c \
type_struct_f.c \
type_ub_f.c
endif
endif

#
Expand Down
15 changes: 1 addition & 14 deletions ompi/mpi/fortran/mpif-h/profile/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# Copyright (c) 2015-2018 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# Copyright (c) 2019 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand Down Expand Up @@ -398,20 +399,6 @@ linked_files = \
pwin_flush_local_f.c \
pwin_flush_local_all_f.c

if OMPI_ENABLE_MPI1_COMPAT
linked_files += \
paddress_f.c \
perrhandler_create_f.c \
perrhandler_get_f.c \
perrhandler_set_f.c \
ptype_extent_f.c \
ptype_hindexed_f.c \
ptype_hvector_f.c \
ptype_lb_f.c \
ptype_struct_f.c \
ptype_ub_f.c
endif

#
# Sym link in the sources from the real MPI directory
#
Expand Down
Loading

0 comments on commit cdb9729

Please sign in to comment.