Basic HTML version of Foils prepared August 29 98

Foil 42 HPF Example

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


1 PROGRAM hpf_finite_difference
2 !HPF$ PROCESSORS pr(4)
3 REAL x(100,100), new(100,100)
4 !HPF$ ALIGN new(:,:) WITH x(:,:)
5 !HPF$ DISTRIBUTE x(BLOCK, *) ONTO pr
6 new(2:99,2:99) = (x(1:98,2:99)+x(3:100,2:99)+ &
7 & x(2:99,1:98)+x(2:99,3:100)) / 4
8 diff = MAXVAL(ABS(new-x))
9 end

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