"Jeff Squyres (jsquyres)" <jsquy...@cisco.com> writes: >> Totally superficial, just passing "status(1)" instead of "status" or >> "status(1:MPI_STATUS_SIZE)". > > That's a different type (INTEGER scalar vs. INTEGER array). So the > compiler complaining about that is actually correct.
Yes, exactly. > Under the covers, Fortran will (most likely) pass both by reference, > so they'll both actually (most likely) *work* if you build with an MPI > that doesn't provide an interface for MPI_Recv, but passing status(1) > is actually incorrect Fortran. Prior to slice notation, this would be the only way to build an array of statuses. I.e., receives go into status(1:MPI_STATUS_SIZE), status(1+MPI_STATUS_SIZE:2*MPI_STATUS_SIZE), etc. Due to pass-by-reference semantics, I think this will always work, despite not type-checking with explicit interfaces. I don't know what the language standard says about backward-compatibility of such constructs, but presumably we need to know the dialect to understand whether it's acceptable. (I actually don't know if the Fortran 77 standard defines the behavior when passing status(1), status(1+MPI_STATUS_SIZE), etc., or whether it works only as a consequence of the only reasonable implementation. > I think you're saying that you agree with my above statements about > the different types, and you're just detailing how you got to asking > about WTF we were providing an MPI_Recv interface in the first place. > Kumbaya. :-) Indeed.
pgpRjssQGNBtq.pgp
Description: PGP signature