Subject: hpff-interpret: A couple of questions

From: <[email-masked]> (Henry Zongaro)
Date: Thu, 31 Aug 1995 16:24:47 -0400 (EDT)

---------------------------------------------------------------------------
[email-masked] is a mailing list for corrections,
clarifications, and interpretations related to High Performance Fortran.
Instructions for adding or deleting yourself from this list appear at the
bottom of this message.
---------------------------------------------------------------------------

Hello,

     Page 41, lines 21-34 of the HPF 1.1 document specifies that an array or
template must not be distributed on a processor arrangement at the time the
arrangement becomes undefined, unless the array or template also becomes
undefined or the processor arrangement always has identical bounds.

     Presumably this was done so that objects with the SAVE attribute would
not change mappings from one call to the next.  Is this rule sufficiently
strict?  Consider the following:

        program p
          call sub(5)
          call sub(10)
        end program p

        subroutine sub(n)
          integer, save :: a(10)
!hpf$     processors proc(2)
!hpf$     distribute a(block(n)) onto proc
        end subroutine sub

     In the first call to sub, a is distributed block(5); in the second call,
it is distributed block(10).  This is currently permitted because the bounds of
the processor arrangement have not changed.

     More complicated examples could be drawn involving ALIGN.

     Similar text appears on page 44, line 43 - page 45, line 3 for templates.

     A second question I have relates to CCI item #20.  The HPF_LOCAL_LIBRARY
procedures all specify that the ARRAY argument must be a local dummy argument
associated with a global HPF actual argument.  It would seem to me to be
desirable to be able to call these routines with a function result as well.
For example,

        program p
          interface
            extrinsic(hpf_local) function f()
              integer :: f(100)
!hpf$         processors proc(number_of_processors())
!hpf$         distribute f(block) onto proc
            end function f
          end interface
        end program p

        extrinsic(hpf_local) function f()
          integer :: f(100/number_of_processors()), g_index

          ! Would be nice to be able to call local_to_global to determine
          ! which elements of local result correspond to which elements
          ! of global result
          call local_to_global(f, (/1/), l_index)
        end function f

Any opinions?

Thanks,

Henry
---------------------------------------------------------------------------
To (un)subscribe to this list, send mail to
[email-masked].
Leave the subject line blank, and in the body put the line
(un)subscribe <email-address>
---------------------------------------------------------------------------