Basic HTML version of Foils prepared August 7 98

Foil 18 Example of Task Parallelism

From DoD HPF Training -- 6. HPF2 DoD Training and Others -- 1995-98. by Chuck Koelbel -- Rice University


!HPF$ PROCESSORS p(8)
!HPF$ DISTRIBUTE a1(block,*) ONTO p(1:4)
!HPF$ DISTRIBUTE a2(*,block) ONTO p(5:8)
!HPF$ TEMPLATE, DIMENSION(4), DISTRIBUTE(BLOCK) ONTO p(1:4) :: td1
!HPF$ ALIGN WITH td1(*) :: done1
!HPF$ TASK_REGION
  • done1 = .false.
  • DO WHILE (.true.)
!HPF$ ON HOME(p(1:4)) BEGIN, RESIDENT
    • READ (unit = iu,end=100) a1
    • CALL rowffts(a1)
    • GOTO 101
100 done1 = .true.
101 CONTINUE
!HPF$ END ON
    • IF (done1) EXIT
    • a2 = a1
!HPF$ ON HOME(p(5:8)) BEGIN, RESIDENT
    • CALL colffts(a2)
    • WRITE(unit = ou) a2
!HPF$ END ON
  • ENDDO
!HPF$ END TASK_REGION



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Aug 9 1998