!******************************************************************
!* An HPF parser test program                                     *
!* Name: directive_7.f90                                          *
!* Author: Giriraj Vengurlekar                                    *
!* Date: Nov. 19, 1995                                            *
!* Main testing points: directive origin/DISTRIBUTE               *
!* Rules/Options touched:                                         *
!*  RULE#                DESCRIPTION                              *
!*                                                                *
!* H303/1     is DISTRIBUTE distribute dist-directive stuff       *
!* H305/1     is dist-format-clause [dist onto clause]            *
!* H306/1     is dist-directive-stuff                             *
!* H306/2     is didt-onto-clause                                 *
!* H307/1     is object name                                      *
!* H307/2     is template name                                    *
!* H308/1     is (dist format list)                               *
!* H308/2     is * (dist format list)                             *
!* H308/3     is *                                                *
!* H309/1     is BLOCK [( int expr )]                             *
!* H309/2     is CYCLIC [( int expr )]                            *
!* H309/3     is *                                                *
!* H310/1     is ONTO dist-target                                 *
!* H311/1     is procrssors name                                  *
!* H311/2     is * processors name                                *
!* H311/3     is *                                                *
!*******************************************************************



      PROGRAM directive_7
      
      real, DIMENSION(10):: S,A,B,C,D,E,F,G,P,Q,R
 
!****************************************************************************
! Check for DISTRIBUTE directive and directive ORIGIN
!****************************************************************************

!HPF$ PROCESSORS NP1(2)

! Prescriptive format, prescriptive processors arrangement
!HPF$ DISTRIBUTE S(cyclic) ONTO NP1

! Transcriptive format, prescriptive processors arrangement
!HPF$ DISTRIBUTE A * ONTO NP1

! Descriptive format, prescriptive processors arrangement
!HPF$ DISTRIBUTE B(block) ONTO NP1

! Prescriptive format, descriptive processors arrangement
!HPF$ DISTRIBUTE C(block) ONTO NP1

! Transcriptive format, descriptive processors arrangement
!HPF$ DISTRIBUTE D * ONTO NP1

! Descriptive format, descriptive processors arrangement
!HPF$ DISTRIBUTE E(cyclic) ONTO NP1

! Prescriptive format, transcriptive processors arrangement
!HPF$ DISTRIBUTE F(block) ONTO *

! Transcriptive format, transcriptive processors arrangement
!HPF$ DISTRIBUTE G * ONTO *

! Descriptive format, transcriptive processors arrangement
!HPF$ DISTRIBUTE P(block) ONTO *

! Descriptive format, defaulted processors arrangement
!HPF$ DISTRIBUTE Q(cyclic)

! Defaulted format, descriptive processors arrangement
!HPF$ DISTRIBUTE ONTO NP1 :: R

      call SUBA( S,A,B,C,D,E,F,G,P,Q,R)


      end

      subroutine SUBA(S1,A1,B1,C1,D1,E1,F1,G1,P1,Q1,R1 )

      real, DIMENSION(10):: S1,A1,B1,C1,D1,E1,F1,G1,P1,Q1,R1
 

!HPF$ PROCESSORS NP1(2)

! Prescriptive format, prescriptive processors arrangement
!HPF$ DISTRIBUTE S1(cyclic) ONTO NP1

! Transcriptive format, prescriptive processors arrangement
!HPF$ DISTRIBUTE A1 * ONTO NP1

! Descriptive format, prescriptive processors arrangement
!HPF$ DISTRIBUTE B1 *(block) ONTO NP1

! Prescriptive format, descriptive processors arrangement
!HPF$ DISTRIBUTE C1(block) ONTO *NP1

! Transcriptive format, descriptive processors arrangement
!HPF$ DISTRIBUTE D1 * ONTO *NP1

! Descriptive format, descriptive processors arrangement
!HPF$ DISTRIBUTE E1 *(cyclic) ONTO *NP1

! Prescriptive format, transcriptive processors arrangement
!HPF$ DISTRIBUTE F1(block) ONTO *

! Transcriptive format, transcriptive processors arrangement
!HPF$ DISTRIBUTE G1 * ONTO *

! Descriptive format, transcriptive processors arrangement
!HPF$ DISTRIBUTE P1 *(block) ONTO *

! Descriptive format, defaulted processors arrangement
!HPF$ DISTRIBUTE Q1 *(cyclic)

! Defaulted format, descriptive processors arrangement
!HPF$ DISTRIBUTE ONTO *NP1 :: R1


      end subroutine SUBA
