diff --git a/NEWS b/NEWS index 0997630454..4eab3f17c8 100644 --- a/NEWS +++ b/NEWS @@ -64,6 +64,8 @@ Trunk (not on release branches yet) - Modified paffinity system to provide warning when bindings result in being "bound to all", which is equivalent to "not bound" - Added MPI-3 function: MPI_GET_LIBRARY_VERSION. +- Enabled compile-time warning of deprecated MPI functions by default + (in supported compilers). 1.5.5 diff --git a/README b/README index 00742f94e4..c0c89541e0 100644 --- a/README +++ b/README @@ -444,6 +444,20 @@ MPI Functionality and Features it to printf for other MPI functions. Patches and/or suggestions would be greatfully appreciated on the Open MPI developer's list. +- When using MPI deprecated functions, some compilers will emit + warnings. For example: + + $ cat my_mpi_func.c + #include + void foo(void) { + MPI_Datatype type; + MPI_Type_struct(1, NULL, NULL, NULL, &type); + } + $ mpicc -c my_mpi_func.c + my_mpi_func.c: In function 'foo': + my_mpi_func.c:4: warning: 'MPI_Type_struct' is deprecated (declared at /opt/openmpi/include/mpi.h:1522) + + Collectives ----------- diff --git a/ompi/config/ompi_configure_options.m4 b/ompi/config/ompi_configure_options.m4 index 7ebb32a455..536022469a 100644 --- a/ompi/config/ompi_configure_options.m4 +++ b/ompi/config/ompi_configure_options.m4 @@ -28,17 +28,18 @@ AC_DEFUN([OMPI_CONFIGURE_OPTIONS],[ ompi_show_subtitle "OMPI Configuration options" # -# Do we want to enable MPI interface warnings (e.g. deprecated functionality and others)? +# Do we want to enable MPI interface warnings (e.g. deprecated +# functionality and others)? # -# XXX This __disabled__ by default for 1.5, but will be __enabled__ for 1.7 by default -# Users should be notified about this proposed change. +# This was disabled by default in v1.5, but will be enabled by default +# in 1.7 and beyond. # AC_MSG_CHECKING([if want compile-time warnings inside of mpi.h]) AC_ARG_ENABLE(mpi-interface-warning, AC_HELP_STRING([--enable-mpi-interface-warning], [enable warnings in wrong (e.g. deprecated) usage in user-level code (default: disabled)])) -if test "$enable_mpi_interface_warning" = "yes"; then +if test "$enable_mpi_interface_warning" != "no"; then AC_MSG_RESULT([yes]) OMPI_WANT_MPI_INTERFACE_WARNING=1 else @@ -46,7 +47,7 @@ else OMPI_WANT_MPI_INTERFACE_WARNING=0 fi AC_DEFINE_UNQUOTED([OMPI_WANT_MPI_INTERFACE_WARNING], [$OMPI_WANT_MPI_INTERFACE_WARNING], - [Enable warnings in wrong usage (e.g. deprecated) in user-level code]) + [Enable warnings when using deprecated MPI functions]) # # Sparse Groups