next up previous
Next: Example applications Up: Packing and unpacking messages Previous: Code for unpacking data

Unpacking integers and reals


Unpack Example (cont.)

Integers are unpacked as follows

   call mpi_unpack (message, size, pos,
                    ints(nints), nitems, MPI_INTEGER,
                    comm, ierr)
   nints = nints + nitems

Reals are unpacked as follows

   call mpi_unpack (message, size, pos,
                    reals(nreals), nitems, MPI_REAL,
                    comm, ierr)
   nreals = nreals + nitems



David W Walker
Mon Jan 20 11:10:22 GMT 1997