Basic HTML version of Foils prepared August 29 98

Foil 49 PCF Example (SGI Variant)

From Designing and Building Parallel Programs I: Introduction DoD Modernization Tutorial -- 1995-1998. by Ian Foster, Gina Goff, Ehtesham Hayder, Chuck Koelbel


!$DOACROSS, LOCAL(I), SHARE(A,B,C),
!$& REDUCTION(X),
!$& IF (N.GT.1000),
!$& MP_SCHEDTYPE=DYNAMIC, CHUNK=100
  • DO I = 2, N-1
    • A(I) = (B(I-1)+B(I)+B(I+1)) / 3
    • X = X + A(I)/C(I)
  • END DO
!$DOACROSS, LOCAL(I), SHARE(D,E),
!$& MP_SCHEDTYPE=SIMPLE
  • DO I = 1, N
    • D(I) = SIN(E(I))
  • END DO
X is a summation
Conditional parallelization
Iterations managed first-come, first-served, in blocks of 100
Iterations blocked evenly among threads (INTERLEAVE, GSS, RUNTIME scheduling also available)
PCF standard



© 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 Apr 11 1999