[MPI3 Fortran] MPI-3, the Interoperability TR and choice buffers
N.M. Maclaren
nmm1 at cam.ac.uk
Wed Sep 29 04:02:46 CDT 2010
On Sep 28 2010, Rolf Rabenseifner wrote:
>
>yes, you are right.
>It looks like that assumed-rank does not work as we expected.
I am afraid so. I won't duplicate Bill's points.
>To have a maximum of backward compatibility,
>we have to use "impolicit interfaces" from mpif.h as a first basis.
Yes.
>>From this, argument checking with a declaration
>
> SUBROUTINE MPI_Send(buf, ...)
> !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf
> !$PRAGMA IGNORE_TKR buf
> INTEGER , dimension(*) :: buf
A separate comment is that it would be a good idea to drop those DEC-
and Sun-specific directives, as they are very confusing and unsuitable
for a portable specification.
>At the same time,
> the MPI standard can require, that the compilation script (i.e., mpif90,
> mpicc, or whatever used) must switch on compiler options that guarantee
> that for skalars, arrays and contiguous subarrays call-by-reference is
> used (I know that the MPI standard does not require this, but the usage
> of such a compiler for MPI applications can and should require this).
Not at all. Just specify BIND(C). That's there for the purpose, and is
in Fortran 90.
> With this, we still have copy-in-copy-out for all non-contiguous
> subarrays.
Yes. And potentially others.
>Why is the dope-vector and all behind not defined in a way that it
>can handle
> - normal (scalar) varibles (as zero-ranked)
> - multidimensional arrays and subarrays
> - ***and*** ***also*** such assumed-size arrays?
That was my proposal. Bill's CDESC would also solve this problem, and is
probably the minimal change to the TR that would.
>Based on the compilation-reqeirement (call-by-ref whereever possible)
>for MPI programming environments, we can give the hint that
>an assumed-size array can be substituted by a fixed size array
>or by its first element.
No. Postitively NOT! The first element hack applies ONLY when sequence
association is used, and that (in this context) applies only when the
called procedure is declared with BIND(C), an assumed-size array and no
other new attributes.
Regards,
Nick.
More information about the mpiwg-fortran
mailing list