From help@cs.rice.edu  Thu Jun  1 10:44:43 1995
Return-Path: <mmzn@terka.cs.rice.edu>
Received: from terka.cs.rice.edu by cs.rice.edu (KAA01654); Thu, 1 Jun 1995 10:44:42 -0500
Received: from localhost.cs.rice.edu by terka.cs.rice.edu (AA12423); Thu, 1 Jun 95 10:44:41 CDT
Message-Id: <9506011544.AA12423@terka.cs.rice.edu>
To: hpff-distribute@cs.rice.edu
Cc: mmzn@terka.cs.rice.edu
Subject: test for new hpff mail list - pls ignore
Date: Thu, 01 Jun 95 10:44:40 -0500
From: mmzn@terka.cs.rice.edu

piffle

From help@cs.rice.edu  Fri Jul 21 08:30:16 1995
Return-Path: <pm@icase.edu>
Received: from squid.icase.edu by cs.rice.edu (IAA03009); Fri, 21 Jul 1995 08:30:15 -0500
Received: by squid.icase.edu (8.6.11/lanleaf8.6.4)
	id JAA20090; Fri, 21 Jul 1995 09:30:16 -0400
Message-Id: <199507211330.JAA20090@squid.icase.edu>
Date: Fri, 21 Jul 1995 09:30:16 -0400
From: Piyush Mehrotra <pm@icase.edu>
To: hpff-distribute@cs.rice.edu
Subject: Proposal for mapping derived types


Mapping of derived type components:

Proposal by:  Barbara Chapman, Piyush Mehrotra, Guy Robinson and Hans Zima


	Remove the first constraints under H303-311 and H312-318.

That is, a distributee or an alignee may be a subobject designator.

Add the constraint:

	Constraint:  
	If a component of a derived type is mapped
	(either through a distribute or an align statement)
	then no other component below or above it 
	in the derived type tree may be mapped.

{the above constraint needs to use more precise language
about "below" and "above" in the "derived type tree"}

Note that a subcomponent of a derived type can be declared DYNAMIC
and can be redistributed or realigned as long as the above
constraint is not violated.

Example:
! MULTI is an array of MESHes each of which has components of type GRID


    TYPE GRID
         ....
         REAL S(100)
!HPF$ DISTRIBUTE S(BLOCK)
    END TYPE GRID


    TYPE MESH
           INTEGER SIZE
           REAL RV(100,100)
           INTEGER KV(100,100)
! Both RV and KV can be distributed
!HPF$ DISTRIBUTE (BLOCK, BLOCK):: RV, KV

           TYPE(GRID) SG(100)
!Illegal:  SG cannot be distributed since a subobject (S) is already distributed
!HPF$ DISTRIBUTE SG(BLOCK)
    END TYPE MESH




    TYPE(GRID) MULTI(20)
!Illegal distribution
!HPF$ DISTRIBUTE MULTI(BLOCK)

Here, the derived type tree is as follows:

	MULTI
	  |
	  |
	MESH
	  |
	  |
	GRID

Since a subobject of GRID is distributed and subobjects of MESH
of TYPE GRID cannot be distributed. Other subobjects of MESH can
be distributed. However, MULTI cannot be distributed since
its subobjects are distributed.

Here is another example:
allocation of blocks in a multiblock code; 

!HPF$ PROCESSORS P( number_of_processors() )

     TYPE SUBGRID
          INTEGER size
          INTEGER lo, hi	! target subset of processors
          REAL, POINTER bl(:)
!HPF$ DYNAMIC bl
     END TYPE SUBGRID

     TYPE (SUBGRID), ALLOCATABLE:: grid(:)

     READ (*,*) gridnos
     ALLOCATE GRID(gridnos)

     DO i = 1, gridnos
         READ(*,*) isize
         grid(i)%size = isize
     END DO

! Computes processor subsets for each subgrid setting the lo, hi values
     CALL procs ( grid, number_of_processors()) 

! Allocate each subgrid and distribute to computed subset 
     DO i = 1, gridnos
         ALLOCATE(grid(i)%bl(isize))
!HPF$ REDISTRIBUTE  grid(i)%bl(BLOCK) ONTO P( grid(i)%lo: grid(i)%hi)
     END DO

     ....

	







From help@cs.rice.edu  Fri Jul 21 08:30:36 1995
Return-Path: <pm@icase.edu>
Received: from squid.icase.edu by cs.rice.edu (IAA03033); Fri, 21 Jul 1995 08:30:36 -0500
Received: by squid.icase.edu (8.6.11/lanleaf8.6.4)
	id JAA20094; Fri, 21 Jul 1995 09:30:36 -0400
Message-Id: <199507211330.JAA20094@squid.icase.edu>
Date: Fri, 21 Jul 1995 09:30:36 -0400
From: Piyush Mehrotra <pm@icase.edu>
To: hpff-distribute@cs.rice.edu
Subject: Proposal for Generalized Blocks

Generalized Block Distributions:

Proposal by:  Barbara Chapman, Piyush Mehrotra, Guy Robinson and Hans Zima

TO H309 add:

	dist-format	is BLOCK ...
			or CYCLIC ....
			or *
			or GEN_BLOCK (int-array)

	Constraint: int-array must be a one-dimensional integer array
	of size equal to the extent of the corresponding
	dimension of the target processor array.

	Constraint: 
	The sum of the values of int-array must match the size of the
	dimension of the array being distributed using this distribution.

This distribution maps contiguous blocks of the array elements
onto processor with the sizes of the blocks being
given by the integer array <int-array>.  
Thus, if S(i) = lb + sum of k = 1 to i int-array(i),
the lb is the lower bound of the array being distributed,
then P(1) owns the array elements [ lb : S(1)-1]
and P(i) owns array elements [ S(i-1)+1, S(i)]]

Example:
	PARAMETER (START = /4,46,46,4/)
!HPF$ PROCESSORS P(4)
	REAL A(100), B(200), new(4)
!HPF$ DISTRIBUTE A( GEN_BLOCK( START) ) ONTO P
!HPF$ DYNAMIC  B
	...

       new = ...

!HPF$  REDISTRIBUTE ( B(GEN_BLOCK (new) )



Array elements A(1:4) are on P(1)
	       A(5:50) are on P(2)
               A(51:96) are on P(3)
               A(97:100) are on P(4)

General block distributions have
been implemented in the Vienna Fortran Compilation System.

From help@cs.rice.edu  Fri Jul 21 08:31:20 1995
Return-Path: <pm@icase.edu>
Received: from squid.icase.edu by cs.rice.edu (IAA03044); Fri, 21 Jul 1995 08:31:19 -0500
Received: by squid.icase.edu (8.6.11/lanleaf8.6.4)
	id JAA20098; Fri, 21 Jul 1995 09:31:20 -0400
Message-Id: <199507211331.JAA20098@squid.icase.edu>
Date: Fri, 21 Jul 1995 09:31:20 -0400
From: Piyush Mehrotra <pm@icase.edu>
To: hpff-distribute@cs.rice.edu
Subject: Proposal for irregular mappings

Irregular mapping:

Proposal by:  Barbara Chapman, Piyush Mehrotra, Guy Robinson and Hans Zima

TO H309 add

	dist-format     is BLOCK ...
			or CYCLIC ....
			or *
			or INDIRECT (int-array)

	Constraint: int-array must be a one-dimensional integer array
	of size equal to the extent of the corresponding
	dimension of the array being distributed.


Here, the int-array acts as a mapping array and provides 
the processor number onto which the array element is mapped.

Thus, array element i is mapped to processor index int-array(i).

Example:

	PARAMETER (map = /1,2,4,3,3,2,1,4, ..../)
!HPF$ PROCESSORS P(4)
	REAL A(100)
        INTEGER map(100)
!HPF$ DISTRIBUTE A( INDIRECT(map) ) ONTO P


Indirect distributions using map arrays have been implemented
in the Vienna Fortran Compilation System.


Mapping of derived type components:

	Remove the first constraints under H303-311 and H312-318.

That is, a distributee or an alignee may be a subobject designator.

Add the constraint:

	Constraint:  
	If a component of a derived type is mapped
	(either through a distribute or an align statement)
	then no other component below or above it 
	in the derived type tree may be mapped.

{the above constraint needs to use more precise language
about "below" and "above" in the "derived type tree"}

Note that a subcomponent of a derived type can be declared DYNAMIC
and can be redistributed or realigned as long as the above
constraint is not violated.

Example:
! MULTI is an array of MESHes each of which has components of type GRID


    TYPE GRID
         ....
         REAL S(100)
!HPF$ DISTRIBUTE S(BLOCK)
    END TYPE GRID


    TYPE MESH
           INTEGER SIZE
           REAL RV(100,100)
           INTEGER KV(100,100)
! Both RV and KV can be distributed
!HPF$ DISTRIBUTE (BLOCK, BLOCK):: RV, KV

           TYPE(GRID) SG(100)
!Illegal:  SG cannot be distributed since a subobject (S) is already distributed
!HPF$ DISTRIBUTE SG(BLOCK)
    END TYPE MESH




    TYPE(GRID) MULTI(20)
!Illegal distribution
!HPF$ DISTRIBUTE MULTI(BLOCK)

Here, the derived type tree is as follows:

	MULTI
	  |
	  |
	MESH
	  |
	  |
	GRID

Since a subobject of GRID is distributed and subobjects of MESH
of TYPE GRID cannot be distributed. Other subobjects of MESH can
be distributed. However, MULTI cannot be distributed since
its subobjects are distributed.

Here is another example:
allocation of blocks in a multiblock code; 

!HPF$ PROCESSORS P( number_of_processors() )

     TYPE SUBGRID
          INTEGER size
          INTEGER lo, hi	! target subset of processors
          REAL, POINTER bl(:)
!HPF$ DYNAMIC bl
     END TYPE SUBGRID

     TYPE (SUBGRID), ALLOCATABLE:: grid(:)

     READ (*,*) gridnos
     ALLOCATE GRID(gridnos)

     DO i = 1, gridnos
         READ(*,*) isize
         grid(i)%size = isize
     END DO

! Computes processor subsets for each subgrid setting the lo, hi values
     CALL procs ( grid, number_of_processors()) 

! Allocate each subgrid and distribute to computed subset 
     DO i = 1, gridnos
         ALLOCATE(grid(i)%bl(isize))
!HPF$ REDISTRIBUTE  grid(i)%bl(BLOCK) ONTO P( grid(i)%lo: grid(i)%hi)
     END DO

     ....

	







From help@cs.rice.edu  Fri Jul 21 08:32:03 1995
Return-Path: <pm@icase.edu>
Received: from squid.icase.edu by cs.rice.edu (IAA03053); Fri, 21 Jul 1995 08:32:02 -0500
Received: by squid.icase.edu (8.6.11/lanleaf8.6.4)
	id JAA20104; Fri, 21 Jul 1995 09:32:03 -0400
Message-Id: <199507211332.JAA20104@squid.icase.edu>
Date: Fri, 21 Jul 1995 09:32:03 -0400
From: Piyush Mehrotra <pm@icase.edu>
To: hpff-distribute@cs.rice.edu
Subject: Proposal for mapping to processor subsets


Mapping to Processor Subsets:

Proposal by:  Barbara Chapman, Piyush Mehrotra, Guy Robinson and Hans Zima

Replace HPF syntax rule H311 by the following:

	dist target	is processor-name [( subscript-triplet )]
			or * processor-name [( subscript-triplet )]
			or *

	Constraint: The subscript triplet must specify a subset
	of the named processor array.

This allows a processor subset to be specified wherever
a processor could be named, e.g., in distribute
statements. Note that this does not allow processor
subsets to be named.

Example:

!HPF$ PROCESSORS P(10)
	REAL A(100)
!HPF$ DISTRIBUTE A(BLOCK) ONTO P(2:5)

This distributes A onto processors P(2) to P(5).

This facility has been implemented in the Vienna Fortran Compilation
System.


Extension:
SUBGROUP statement for allowing subgroups to be named, i.e., 
restricted equivalencing of processors arrays

	SUBGROUP <processor-name> OF <target-proc-array> (subscript-triple)

This allows <processor-name> to be a named subgroup of
<target-proc-array>.


From help@cs.rice.edu  Fri Jul 21 16:54:53 1995
Return-Path: <zosel@phoenix.ocf.llnl.gov>
Received: from phoenix.ocf.llnl.gov by cs.rice.edu (QAA27310); Fri, 21 Jul 1995 16:54:52 -0500
Received: by phoenix.ocf.llnl.gov (5.65/LLNL-1.18)
	id AA08809; Fri, 21 Jul 1995 14:54:34 -0700
Date: Fri, 21 Jul 1995 14:54:34 -0700
From: zosel@phoenix.ocf.llnl.gov (Mary E Zosel)
Message-Id: <9507212154.AA08809@phoenix.ocf.llnl.gov>
To: hpff-distribute@cs.rice.edu
Subject: test message - ignore

test distribution.
   -mz-

