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


1 !$DOACROSS, LOCAL(I), SHARE(A,B,C),
2 !$& REDUCTION(X),
3 !$& IF (N.GT.1000),
4 !$& 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
5 !$DOACROSS, LOCAL(I), SHARE(D,E),
6 !$& MP_SCHEDTYPE=SIMPLE
  • DO I = 1, N
    • D(I) = SIN(E(I))
  • END DO
7 X is a summation
8 Conditional parallelization
9 Iterations managed first-come, first-served, in blocks of 100
10 Iterations blocked evenly among threads (INTERLEAVE, GSS, RUNTIME scheduling also available)
11 PCF standard

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