Download Global Arrays with hands-on time

Transcript
Transpose Example – Fortran (cont.)
c
c
Initialize data in g_a
c
do i = 1, dims(1)
a(i) = i
end do
lo1(1) = 1
hi1(1) = dims(1)
c
c
Copy data from local buffer a to global array g_a. Only do this for
c
processor 0.
c
if (me.eq.0) call nga_put(g_a, lo1, hi1, a, ld)
c
c
Synchronize all processors to guarantee that everyone has data
c
before proceeding to the next step.
c
call ga_sync