What: Warn user about deprecated MPI functionality and "wrong" compiler usage
Why: Because deprecated MPI functions, are ... deprecated Where: On trunk When: Apply on trunk before branching for v1.5 (it is user-visible) Timeout: 1 weeks - May 26, 2009 after the teleconf. --------------------------------------------------------------------- I'd like to propose a patch that addresses two issues: - Users shoot themselves in the foot compiling with a different compiler than what was used to compile OMPI (think ABI) - The MPI-2.1 std. defines several functions to be deprecated. This will warn Open MPI users, when accessing deprecated functions, even giving a proper warning such as: "MPI_TYPE_HVECTOR is superseded by MPI_TYPE_CREATE_HVECTOR" Also, now we may _warn_ when using a different compiler (gcc vs. intel vs. pgcc) This is achieved using __opal_attribute_deprecated__ and obviously needs to be added into mpi.h, therefore being a user-visible change. This however has a few caveats: 1.) Having Open MPI compiled with gcc and having users compiling with another compiler, which is not supporting __attribute__((deprecated)) is going to be a problem 2.) The attribute is most useful, when having a proper description (as above) -- which requires support for the optional argument to __deprecate__. This feature is offered only in gcc>4.4 (see http://gcc.gnu.org/ml/gcc- patches/2009-04/msg00087.html). Therefore, I added a configure-check for the compiler's support of the optional argument. And we need to store, which compiler is used to compile Open MPI and at (user- app) compile-time again check (within mpi.h), which compiler (and version!) is being used. This is then compared at user-level compile-time. To prevent users getting swamped with error msg. this can be turned off using the configure-option: --enable-mpi-interface-warning which turns on OMPI_WANT_MPI_INTERFACE_WARNING (default: DISabled), as suggested by Jeff. The user can however override that with (check mpi2basic_tests): mpicc -DOMPI_WANT_MPI_INTERFACE_WARNING -c lalala.c lots of warnings follow Please take a look into: http://bitbucket.org/jsquyres/ompi-deprecated/ With best regards, Rainer PS: Also, we need to disable the warning, when building Open MPI itselve ;-) PPS: Thanks to Paul Hargrove and Dan Bonachea for the GASnet file portable_platform.h which offers the CPP magic to figure out compilers and esp. compiler-versions. -- ------------------------------------------------------------------------ Rainer Keller, PhD Tel: +1 (865) 241-6293 Oak Ridge National Lab Fax: +1 (865) 241-4811 PO Box 2008 MS 6164 Email: kel...@ornl.gov Oak Ridge, TN 37831-2008 AIM/Skype: rusraink