[Mpi-forum] Compile problems with examples in MPI Standard

N.M. Maclaren nmm1 at cam.ac.uk
Wed Jul 25 14:55:56 CDT 2012


On Jul 25 2012, Rolf Rabenseifner wrote:
>
>I'm no specialist on this, but I want that you look at:
>
> - MPI-2.2 MPI_INIT       (..., char ***argv
>           MPI_INIT_THREAD(..., char *((*argv)[])
> - Bill's preference            char (*(*(argv_p[])))
> - current MPI-3.0 (r1486)   
>   MPI_INIT and MPI_INI_THREAD  char *((*argv)[])
>
>I would say, if there is no guaranteed backward compatible
>change, I would prefere to stay with MPI-2.2 declarations
>as they are.

Compatible with what?  Regrettably, that's not a joke - the C
standard is thoroughly confusing in this area :-(

All of those are required by C to be equivalent in a very strong
sense, but some of them are illegal to use in the form &argv,
for any of the permitted forms of declaring main, and programmers
would need to write casts in conforming code.

The form 'char ***' is probably the least confusing one and does
not require a cast.


Regards,
Nick Maclaren.





More information about the mpi-forum mailing list