(j3.2006) a question on cobounds

Bill Long longb
Tue Jul 28 12:23:02 EDT 2009



Jim Xia wrote:
> 
> j3-bounces at j3-fortran.org wrote on 07/28/2009 08:34:50 AM:
>  > >
>  > > Same shock today here finding this out.  Although it's not much of an
>  > > implementation issue, the simple fact that a piece of static memory 
> can
>  > > be declared differently from one run to another, from one image to
>  > > another, is quite appalling.  
>  >
>  

Just to make sure there is no confusion here, the cobounds for a local 
non-allocatable coarray in a subprogram have to be expressible in terms 
of variables. The number of images, and how the user wants those images 
mapped to processors is determined at run time, not compile time. The 
cobounds for the local array will need to be parameterized in terms of 
this runtime information.

The question being debated is whether we should require that these 
cobounds have the same values on all images for any particular 
execution. So far, the arguments I've seen in favor of imposing this 
restriction are:

1) The current flexibility encourages bad, error prone, or difficult to 
maintain code.

2) Having the cobounds the same on all images enhances the concept that 
the arrays are symmetric across images.

3) We require that the cobounds for allocatable coarrays be the same 
across images, so the same requirement for non-allocatable coarrays is 
more consistent.


In favor of keeping the current rules:

1) Things should no be restricted unless there is a good reason, and the 
reasons above are not good enough.

2) It is difficult for a runtime checking mechanism to detect violations 
of a restriction here.

3) The flexibility is potentially useful.


There is also the procedural question of whether a change like this 
rises to the level of a technical defect as intended by the current WG5 
resolutions.

In some ways the debate reminds me of a quote about mathematics - "In 
math you never know anything, you just get used to things."  I'm so used 
to this flexibility idea that it seems perfectly normal.


Cheers,
Bill


-- 
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