(j3.2006) MPI usage problems in Fortran

Bill Long longb
Tue Mar 18 19:04:30 EDT 2008



Aleksandar Donev wrote:
> On Tuesday 18 March 2008 15:04, Craig Rasmussen wrote:
>   
>> Plus if I declare a dummy to have the target  
>> attribute, the actual argument need not have the target attribute so  
>> the user simply won't add it.  I want these errors to be caught at  
>> compiler time.
>>     
> That's exactly my "beef" with asynchronous. There are no rules or even 
> specifics about the matching of the attribute across argument association.
>   
The asynchronous attribute for a dummy does require an explicit 
interface in the caller, so the caller knows the corresponding actual is 
'tainted'.  However, the main advantage is that the compiler will verify 
that the actual argument is simply contiguous (assuming the dummy is not 
assumed-shape or a pointer, neither of which is possible in this 
example).  If the actual argument is not simply contiguous, you get a 
constraint violation, and hence a compile time error.  This is what 
assures there is no copy-in/copy-out.  Same game works with volatile.

The main problem is that the compiler has poor information on when the 
actual argument becomes 'untainted'.  If the compiler actually knew what 
you were doing with the buffer (i.e. knew the internals of the MPI 
routines), then it could make much better decisions.  One of the many 
reasons why coarrays are so much better for this sort of thing.

Cheers,
Bill

> Why don't you write the code (including an explicit interface for MPI_Isend!) 
> with ASYNCHRONOUS and then I can comment on what the standard (in my reading) 
> actually says/guarantees about it.
> Aleks
>
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3
>   

-- 
Bill Long                                   longb at cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120

            




More information about the J3 mailing list