[MPI3 Fortran] MPI Data types

N.M. Maclaren nmm1 at cam.ac.uk
Sat May 9 14:17:16 CDT 2009


On May 9 2009, Iain Bason wrote:
>>
>> That's interesting.  Something that I raised in J3 is that compilers
>> may use copy-in/copy-out even when passing to assumed shape dummy
>> arguments.  Consider calls like:
>>
>>   REAL :: X(1000,1000,10000)
>>   LinearSolve(X(1,:,:),X(2,3,:))
>>
>> That is most cache-unfriendly, and can often be speeded up  
>> considerably by
>> copying the arrays to contiguous storage.  Fortran permits that, in  
>> the
>> absence of various special attributes.  And, yes, it has been done  
>> and may
>> still be done.
>
>Yes, although we would generally do that inside the called routine  
>(i.e., the prologue and epilogue to LinearSolve in this case would do  
>the copies).  A compiler might also do that to pad inner dimensions to  
>avoid thrashing TLB, for instance.

Precisely.  But one must always remember that the called routine may be
an intermediate one, with the buffer passed into it as an argument, and
passed down to MPI.





More information about the mpiwg-fortran mailing list