Next: Unpacking the data
Up: Redistribution of block-cyclic data
Previous: Code for communicating the
Packing the Data
integer soffset
soffset = istep*r
pos = 0
call mpi_pack (gindex, 1, MPI_INTEGER,
tbuf1, bytesinbuf, pos, comm, ierr)
call mpi_pack (a(soffset), nsuperblks, newtype,
tbuf1, bytesinbuf, pos, comm, ierr)
- First we pack the global index of the first block to be sent.
- Then we pack the blocks, taking one block from each superblock.
- Extra memory is required for the packing and unpacking buffers.
David W Walker
Mon Jan 20 11:10:22 GMT 1997