Re: [MPIWG Fortran] Another MPI_SIZEOF question
On Jun 10 2014, William Gropp wrote:
The problem is that the standard also requires MPI_SIZEOF to be supported by every version of the Fortran interfaces, even mpif.h. This was *not* the case in MPI-2. The standard even acknowledges that MPI_SIZEOF requires overloading, and that overloading definition is required in mpif.h . Thus, mpif.h cannot be implemented in a way that supports a Fortran 77 compiler.
Another problem, that does not seem to have been raised, is that MPI_Sizeof is potentially unimplementable without a compiler extension in Fortran 77. There is no way of passing arguments that forbids copy-in/copy-out, and it is perfectly permissible for a compiler to change the storage representation for argument passing. I can't remember offhand if any did or does, but it wouldn't surprise me if some did or even do for scalar arguments. The same is true for C, incidentally, and was even more common with that. Quite a few compilers did weird and wonderful things with arguments. Even using interface blocks requires the library to know far more about the compiler and its options (and that's the gotcha!) than is decent. Regards, Nick Maclaren.
participants (1)
-
N.M. Maclaren