Next: Detailed communication code
Up: Redistribution of block-cyclic data
Previous: Packing the data
Unpacking the Data
integer roffset
pos = 0
call mpi_unpack (tbuf2, bytesinbuf, pos,
gindex, 1, MPI_INTEGER,
comm, ierr)
roffset = r*mod (gindex, k)
call mpi_unpack (tbuf2, bytesinbuf, pos,
b(roffset), nsuperblks, newtype,
comm, ierr)
- First we unpack the global index of the first block received. This is at
the start of the packed buffer.
- Then we unpack the blocks, placing one block from each superblock
into the array holding the new distribution.
David W Walker
Mon Jan 20 11:10:22 GMT 1997