Christian Siebert wrote:
Hi Number Cruncher,
With, or without, C++ bindings, I'm getting serious warnings when
compiling *any* C++ program which #includes <mpi.h>: <snip>
that's one of the many reasons why the C++ bindings will very likely be
removed in the next version of the MPI standard. If you really rely on
C++ then you might try sth. like the Boost C++ Libraries ...
Christian
Indeed boost::mpi is really good and I am using it, but it won't help
here. But my problem exists ***without*** the C++ bindings. It should be
possible for my C++ code to call the MPI C standard API without such
warnings!
It's fundamentally wrong to expect a C++ compiler to alias a
"ompi_predefined_communicator_t *" to a "ompi_communicator_t *" unless
it has the full definition of such types available. I'm not an expert,
but I think the C standard is a bit more lax here.
The bottom line is that spotting aliasing from types is a good thing and
gives C++ better optimisation opportunities (e.g. Fortran has no
aliasing). See http://en.wikipedia.org/wiki/Aliasing_(computing) for a
decent discussion.
Simon.