Data Migration

There are three calls to Zoltan_Migrate within Fluidity, each migrating a different set of data; nodes, halo nodes and fields. For each of these calls a different set of callbacks are provided to deal with packing and unpacking the different data being sent. Three callbacks need to be provided for each Zoltan_Migrate call:

  1. The amount of storage needed for each graph node (mesh node, mesh halo node or fields data for an element).
  2. How to pack data from Fluidity data structures into a Zoltan communication buffer.
  3. How to unpack data from a Zoltan communication buffer into Fluidity data structures.

The Zoltan communication buffer is a byte array. This makes directly transferring data between it and the Fluidity data structures complicated as most Fluidity data is real. To simplify the process an intermediary real array is used for the packing and unpacking callbacks when migrating fields data. In the packing routine data is first packed from the Fluidity data structures into the real array. The Fortran intrinsic procedure transfer is then used to copy the packed real data into the integer Zoltan communication buffer. When unpacking the data is first copied from the integer Zoltan communication buffer into a real array and then data is unpacked from the real array into the Fluidity data structures.

Jon Hill 2012-03-02