{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Eq 2 then do i32n3 1 do i11n1 indx indx 1 ui11i3

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ata Distribution B C •  Given a virtual processor grid… A D …arrays are block-distributed between processors: Per-processor Data Allocation •  In addition to its local block of values… A …each processor allocates ghost cells for caching neighboring values A Stencil Communication Prior to computing a stencil, communication is typically required to refresh the ghost cells A B Notes: •  Lots of optimization opportunities etc. C •  Have to eventually start skipping processors for coarser levels D Distributed rprj3 in Fortran subroutine rprj3(r,m1k,m2k,m3k,s,m1j,m2j,m3j,k) implicit none include 'cafnpb.h' include 'globals.h' integer m1k, m2k, m3k, m1j, m2j, m3j,k double precision r(m1k,m2k,m3k), s(m1j,m2j,m3j) integer j3, j2, j1, i3, i2, i1, d1, d2, d3, j double precision x1(m), y1(m), x2,y2 if(m1k.eq.3)then d1 = 2 else d1 = 1 endif if(m2k.eq.3)then d2 = 2 else d2 = 1 endif if(m3k.eq.3)then d3 = 2 else d3 = 1 endif > > > > > > > > do j3=2,m3j-1 i3 = 2*j3-d3 do j2=2,m2j-1 i2 = 2*j2-d2 do j1=2,m1j i1 = 2*j1-d1 x1(i1-1) =...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online