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


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

in Table To:


© 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