[Mpi-forum] Compile problems with examples in MPI Standard
N.M. Maclaren
nmm1 at cam.ac.uk
Tue Jul 24 10:33:20 CDT 2012
On Jul 24 2012, John DelSignore wrote:
>
> In C and C++, the type of "char *argv[]" as a parameter is equivalent to
> the type of "char **argv", because you can't pass an array as an
> argument. Therefore, as written in the example, the type of argv is "a
> pointer to a pointer to a char".
Grrk. Yes, but only after a certain unspecified point in translation
phase 7, different from the point at which arrays are converted to
pointers in other contexts. Compilers have differed and do differ in
this area, and all of them are conforming :-(
> I don't know what the type signature of MPI_Init() is in your
> implementation, but it's possible that a "const" got tossed in there
> somewhere, for example: int MPI_Init(int *, const char ***);
That would certainly account for it. If that is the case, there is
no point in looking for anything more subtle.
Regards,
Nick Maclaren.
More information about the mpi-forum
mailing list