Subject: hpff-doc: Corrections: parallel-ext.tex

From: Thomas Brandes <[email-masked]>
Date: Mon, 14 Oct 1996 08:35:37 +0200

---------------------------------------------------------------------------
[email-masked] is a mailing list for HPF 2.0 language specification
authors and editors.  Instructions for adding or deleting yourself from this
list appear at the bottom of this message.
---------------------------------------------------------------------------
There are still some errors in section 8:

p. 194 : there is still the ENVIRONMENT directive in the example (line 6)
p. 200 : example line 13 - line 42

The example for task parallelism contains some errors:

\CODE
        REAL DIMENSION(n,n) :: a1,a2
 **** missing comma       
        LOGICAL done1
!HPF$   PROCESSORS procs(8)

!HPF$   DISTRIBUTE a1(block,*) ONTO procs(1:4)
!HPF$   DISTRIBUTE a2(*,block) ONTO procs(5:8)

!HPF$   TEMPLATE, DIMENSION(4), DISTRIBUTE(BLOCK) ONTO procs(1:4) :: td1
!HPF$   ALIGN WITH td1(*) :: done1

!HPF$   TASK_REGION
        done1 = .false.
        DO WHILE (.true.)
!HPF$       ON HOME(procs(1:4)) BEGIN, RESIDENT
 *****      ON (procs(1:4)), RESIDENT BEGIN
              READ (unit = iu,end=100) a1
              CALL rowfft(a1)
              GOTO 101
    100       done1 = .true.
    101
!HPF$       END BEGIN
 *****      END ON

            IF (done1) EXIT
            a2 = a1

!HPF$       ON HOME(procs(5:8)) BEGIN, RESIDENT
 ****       ON (procs(5:8)), RESIDENT BEGIN
               CALL colfft(a2)
               WRITE(unit = ou) a2
!HPF$       END BEGIN
 ****       END ON
        ENDDO
!HPF$   END TASK REGION
 ****   END TASK_REGION
\EDOC

The keyword HOME is used only for templates and variables, but not
for processor arrangements.
 
So here is the code which should be inserted:

\CODE
        REAL, DIMENSION(n,n) :: a1,a2
        LOGICAL done1
!HPF$   PROCESSORS procs(8)

!HPF$   DISTRIBUTE a1(block,*) ONTO procs(1:4)
!HPF$   DISTRIBUTE a2(*,block) ONTO procs(5:8)

!HPF$   TEMPLATE, DIMENSION(4), DISTRIBUTE(BLOCK) ONTO procs(1:4) :: td1
!HPF$   ALIGN WITH td1(*) :: done1

!HPF$   TASK_REGION
        done1 = .false.
        DO WHILE (.true.)
!HPF$       ON (procs(1:4)), RESIDENT BEGIN
              READ (unit = iu,end=100) a1
              CALL rowfft(a1)
              GOTO 101
    100       done1 = .true.
    101       CONTINUE
!HPF$       END ON

            IF (done1) EXIT
            a2 = a1

!HPF$       ON (procs(5:8)), RESIDENT BEGIN
               CALL colfft(a2)
               WRITE(unit = ou) a2
!HPF$       END ON
        ENDDO
!HPF$   END TASK_REGION

        END
\EDOC

Thomas

===================================================================
Thomas Brandes                             e-mail: [email-masked]
GMD, SCAI.LAB, P.O. Box 1319                 Tel.: 49-2241-14-2492
D-53754 St. Augustin, West Germany           Fax : 49-2241-14-2181

http://www.gmd.de/SCAI/people/brandes.html
===================================================================

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