Basic HTML version of Foils prepared August 7 98

Foil 35 Irregular Mesh: HPF Program

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


1 USE HPF_LIBRARY
2 REAL x(nnode), flux(nedge)
3 INTEGER iedge(nedge,2)
4 INTEGER permute_node(nnode), permute_edge(nedge)
5 !HPF$ DISTRIBUTE x(BLOCK)
6 !HPF$ DISTRIBUTE flux(BLOCK)
7 !HPF$ ALIGN iedge(i,*) WITH flux(i)
8 !HPF$ ALIGN permute_edge(i) WITH flux(i)
9 !HPF$ ALIGN permute_node(i) WITH x(i)
10 CALL renumber_nodes( iedge, permute_node )
11 x( permute_node(:) ) = x
12 FORALL (i=1:nedge) iedge(i,:) = permute_node(iedge(i,:))
13 permute_edge = GRADE_UP( iedge(:,1) )
14 FORALL (i=1:nedge) iedge(i,:) = iedge(permute_edge(i),:)
15 err = tol * 1e6
16 DO WHILE (err > tol)
  • flux=(x(iedge(1:nedge,1))-x(iedge(1:nedge,2)))/2
  • x=SUM_SCATTER(-flux(1:nedge),x,iedge(1:nedge,1))
  • x=SUM_SCATTER( flux(1:nedge),x,iedge(1:nedge,2))
  • err = SUM( flux*flux ) / nedge
17 END DO

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