Enable MPI deprecated API function warnings by default
This commit was SVN r25969.
Этот коммит содержится в:
родитель
2d4bbfb083
Коммит
a8f409caf9
2
NEWS
2
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
|
||||
|
14
README
14
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 <mpi.h>
|
||||
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
|
||||
-----------
|
||||
|
||||
|
@ -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
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user