(j3.2006) Integration of co-arrays with the intrinsic shift functions

Bill Long longb
Tue Jul 17 13:46:26 EDT 2007

Craig Rasmussen wrote:
> Yes, after looking more closely at CO_SUM, it is too different from  
> SUM and breaks the "element of least surprise".  We should actually  
> integrate co-arrays into the Fortran language

We have.

>  and define SUM so that  
> it takes a co-array as an arguments.  

It does.

> It is simply amazing to me that  
> there is not a reduction intrinsic on a co-array that returns a  
> scalar of the sum of all of the elements of a co-array.  

That's what SUM does.  CO_SUM sums the elements of corresponding 
co-arrays on a collection of images.  If you want the sum of all the 
elements of all the corresponding co-arrays on a collection of images, 
it is easy to write using sum and co_sum.  Or you can just copy of the 
code out of the draft - see pages 585-586. 

> Without the  
> DIM argument, the result doesn't even depend on the distribution. 

What distribution?
> Seriously, what were you all thinking or afraid of?  The discussions  
> went on in secret so neither J3 nor WG5 can know until you enlighten us.

The discussions went on in subgroup, in J3 meeting plenary sessions, and 
through numerous J3 papers.

> Integration of the new array type into the existing Fortran language  
> is much preferable to simply tacking something along side Fortran and  
> rushing it out the door.

Co-arrays have been under development for 15 years and benefit from the 
experience of 10 years of actual use.  This is hardly being rushed out 
the door.

> Are you really saying that a global view is not a "good direction"?   

Any view is fine for the user.  But very bad for the language.  HPF 
taught us that.  We should learn from the mistakes of the past, not 
repeat them.


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://j3-fortran.org/pipermail/j3/attachments/20070717/b0aced7e/attachment-0001.html 

More information about the J3 mailing list