Basic HTML version of Foils prepared 2 October 1995

Foil 13 Parallel Laplace Programming
Data Parallel for Jacobi Iteration in One Dimension

From New CPS615 Foils-- D 23 September 95 CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. by Geoffrey C. Fox


1 !HPF$ TEMPLATE WORLD(NTOT) (1)
2 !HPF$ DISTRIBUTE WORLD(BLOCK) (2)
    • DIMENSION PHINEW (NTOT), PHIOLD(NTOT)
3 !HPF$ ALIGN PHINEW WITH WORLD (3)
4 !HPF$ ALIGN PHIOLD WITH WORLD (3)
    • NTOT1 = NTOT-1
    • NTOT2 = NTOT-2
5 BEGIN PHINEW (2:NTOT1) =0.5* (EOSHIFT (PHIOLD,1) + EOSHIFT (PHIOLD, -1)) (4)
    • TEST = MAXVAL (ABS(PHINEW(2:NTOT1)-PHIOLD(2:NTOT1))) (5)
    • PHIOLD=PHINEW
    • IF (TEST>CONVG) GO TO BEGIN
    • ELSE STOP

in Table To:


© on Tue Oct 7 1997