Basic HTML version of Foils prepared August 7 98

Foil 25 Conjugate Gradient: HPF Program

From DoD HPF Training -- 5. Parallel Programming in HPF DoD Training and Others -- 1995-98. by Chuck Koelbel -- Rice University


1 REAL u(0:n,0:n), r(0:n,0:n), p(0:n,0:n)
2 REAL q(0:n,0:n), f(0:n,0:n)
3 !HPF$ DISTRIBUTE u(BLOCK,*)
4 !HPF$ ALIGN (:,:) WITH u(:,:) :: r, p, q, f
5 INTERFACE
  • SUBROUTINE a_times_vector( x, y )
  • REAL, INTENT(IN) :: x(:,:)
  • REAL, INTENT(OUT) :: y(:,:)
  • !HPF$ DISTRIBUTE x *(BLOCK,*)
  • !HPF$ ALIGN y(:,:) WITH *x(:,:)
6 END INTERFACE
7 u = 0.0
8 r = f
9 err = MAXVAL( ABS(r(1:n-1,1:n-1)) )
10 i = 0; rho = 0

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 16 1998