> If Bob's MPI shop provides an mpi.h file the gives:
> int MPI_Send(const void *buff,....);
>
> and Joe's MPI Shoppe provides mpi.h with:
> int MPI_Send(void *buff,.........);
> What does a profiler writer who wants to write:
> #include "mpi.h"
> int MPI_Send(????? ,...)
> {
> return( PMPI_Send(......);
> }
> do to for the definition of formal argument number 1 to compile with
> either mpi.h and not get fatal compile errors from one or the other?
He does what I put before :-
int MPI_Send (const void *buff,...)
{
return PMPI_Send ((void *)buff, ...);
}
This will work in C (unless there's some clever name mangling so that
the linker can check function prototypes against implementations, in
which case the MPI_Send (const void *) won't satisfy the calls to
MPI_Send(void *)).
The fact that the implementation of MPI_Send may not match the
prototype in the header should be at worst a warning.
-- Jim
James Cownie
Dolphin Interconnect Solutions
Phone : +44 117 9071438
E-Mail: jcownie@dolphinics.com