Zoltan User's Guide  |  Next  |  Previous

Migration Query Functions

The following query functions must be registered to use any of the migration tools described in Migration Functions. These functions should NOT use interprocessor communication.
ZOLTAN_OBJ_SIZE_MULTI_FN or ZOLTAN_OBJ_SIZE_FN
ZOLTAN_PACK_OBJ_MULTI_FN or ZOLTAN_PACK_OBJ_FN
ZOLTAN_UNPACK_OBJ_MULTI_FN or ZOLTAN_UNPACK_OBJ_FN
The "MULTI_" versions of the packing/unpacking functions take lists of IDs as input and pack/unpack data for all objects in the lists. Only one function of each type must be provided (e.g., either a ZOLTAN_PACK_OBJ_FN or ZOLTAN_PACK_OBJ_MULTI_FN, but not both).

Optional, additional query functions for migration may also be registered; these functions are called at the beginning, middle, and end of migration in Zoltan_Migrate. Interprocessor communication is allowed in these functions.

ZOLTAN_PRE_MIGRATE_PP_FN
ZOLTAN_MID_MIGRATE_PP_FN
ZOLTAN_POST_MIGRATE_PP_FN
For backward compatibility with previous versions of Zoltan, the following functions may be used with Zoltan_Help_Migrate.
ZOLTAN_PRE_MIGRATE_FN
ZOLTAN_MID_MIGRATE_FN
ZOLTAN_POST_MIGRATE_FN


C and C++: typedef int ZOLTAN_OBJ_SIZE_FN(
      void *data,
      int num_gid_entries
      int num_lid_entries,
      ZOLTAN_ID_PTR global_id,
      ZOLTAN_ID_PTR local_id,
      int *ierr);
FORTRAN: FUNCTION Obj_Size(data, num_gid_entries,  num_lid_entries, global_id, local_id, ierr
INTEGER(Zoltan_INT) :: Obj_Size 
<type-data>, INTENT(IN) :: data 
INTEGER(Zoltan_INT), INTENT(IN) :: num_gid_entries, num_lid_entries
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: global_id,  local_id
INTEGER(Zoltan_INT), INTENT(OUT) :: ierr 

<type-data> can be any of INTEGER(Zoltan_INT), DIMENSION(*) or REAL(Zoltan_FLOAT), DIMENSION(*) or REAL(Zoltan_DOUBLE), DIMENSION(*) or TYPE(Zoltan_User_Data_x) where x is 1, 2, 3 or 4. See the section on Fortran query functions for an explanation. 


A ZOLTAN_OBJ_SIZE_FN query function returns the size (in bytes) of the data buffer that is needed to pack all of a single object's data.
 
Function Type: ZOLTAN_OBJ_SIZE_FN_TYPE
Arguments:
    data Pointer to user-defined data.
   num_gid_entries The number of array entries used to describe a single global ID.  This value is the maximum value over all processors of the parameter NUM_GID_ENTRIES.
   num_lid_entries The number of array entries used to describe a single local ID.  This value is the maximum value over all processors of the parameter NUM_LID_ENTRIES.
   global_id Pointer to the global ID of the object.
   local_id Pointer to the local ID of the object.
   ierr Error code to be set by function.
Returned Value:
    int The size (in bytes) of the required data buffer.



C and C++: typedef void ZOLTAN_OBJ_SIZE_MULTI_FN (
      void *data,
      int num_gid_entries,
      int num_lid_entries,
      int num_ids,
      ZOLTAN_ID_PTR global_ids,
      ZOLTAN_ID_PTR local_ids,
      int *sizes,
      int *ierr);
FORTRAN: SUBROUTINE Obj_Size_Multi(data, num_gid_entries,  num_lid_entries, num_ids, global_ids, local_ids, sizes, ierr
<type-data>, INTENT(IN) :: data 
INTEGER(Zoltan_INT), INTENT(IN) :: num_gid_entries, num_lid_entries, num_ids
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: global_ids,  local_ids
INTEGER(Zoltan_INT), INTENT(OUT), DIMENSION(*) :: sizes 
INTEGER(Zoltan_INT), INTENT(OUT) :: ierr 

<type-data> can be any of INTEGER(Zoltan_INT), DIMENSION(*) or REAL(Zoltan_FLOAT), DIMENSION(*) or REAL(Zoltan_DOUBLE), DIMENSION(*) or TYPE(Zoltan_User_Data_x) where x is 1, 2, 3 or 4. See the section on Fortran query functions for an explanation. 


A ZOLTAN_OBJ_SIZE_MULTI_FN query function is the multiple-ID version of ZOLTAN_OBJ_SIZE_FN. For a list of objects, it returns the per-objects sizes (in bytes) of the data buffers needed to pack object data.
 
Function Type: ZOLTAN_OBJ_SIZE_MULTI_FN_TYPE
Arguments:
    data Pointer to user-defined data.
   num_gid_entries The number of array entries used to describe a single global ID.  This value is the maximum value over all processors of the parameter NUM_GID_ENTRIES.
   num_lid_entries The number of array entries used to describe a single local ID.  This value is the maximum value over all processors of the parameter NUM_LID_ENTRIES.
   num_ids The number of objects whose sizes are to be returned.
   global_ids An array of global IDs of the objects. The ID for the i-th object begins in global_ids[i*num_gid_entries].
   local_ids An array of local IDs of the objects. The ID for the i-th object begins in local_ids[i*num_lid_entries].
   sizes Upon return, array of sizes (in bytes) for each object in the ID lists.
    ierr Error code to be set by function.



C and C++: typedef void ZOLTAN_PACK_OBJ_FN (
      void *data,
      int num_gid_entries,
      int num_lid_entries,
      ZOLTAN_ID_PTR global_id,
      ZOLTAN_ID_PTR local_id,
      int dest,
      int size,
      char *buf,
      int *ierr);
FORTRAN: SUBROUTINE Pack_Obj(data, num_gid_entries, num_lid_entries, global_id, local_id, dest, size, buf, ierr
<type-data>, INTENT(IN) :: data 
INTEGER(Zoltan_INT), INTENT(IN) :: num_gid_entries, num_lid_entries 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: global_id 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: local_id 
INTEGER(Zoltan_INT), INTENT(IN) :: dest, size 
INTEGER(Zoltan_INT), INTENT(OUT), DIMENSION(*) :: buf 
INTEGER(Zoltan_INT), INTENT(OUT) :: ierr 

<type-data> can be any of INTEGER(Zoltan_INT), DIMENSION(*) or REAL(Zoltan_FLOAT), DIMENSION(*) or REAL(Zoltan_DOUBLE), DIMENSION(*) or TYPE(Zoltan_User_Data_x) where x is 1, 2, 3 or 4. See the section on Fortran query functions for an explanation. 


A ZOLTAN_PACK_OBJ_FN query function allows the application to tell Zoltan how to copy all needed data for a given object into a communication buffer. The object's data can then be sent to another processor as part of data migration. It may also perform other operations, such as removing the object from the processor's data structure. This routine is called by Zoltan_Migrate for each object to be sent to another processor.
 
Function Type: ZOLTAN_PACK_OBJ_FN_TYPE
Arguments:
    data Pointer to user-defined data.
    num_gid_entries The number of array entries used to describe a single global ID.  This value is the maximum value over all processors of the parameter NUM_GID_ENTRIES.
    num_lid_entries The number of array entries used to describe a single local ID.  This value is the maximum value over all processors of the parameter NUM_LID_ENTRIES.
    global_id The global ID of the object for which data should be copied into the communication buffer.
    local_id The local ID of the object for which data should be copied into the communication buffer.
    dest The destination part (i.e., the part to which the object is being sent)
    size The size (in bytes) of the communication buffer for the specified object. This value is at least as large as the value returned by the ZOLTAN_OBJ_SIZE_MULTI_FN or ZOLTAN_OBJ_SIZE_FN query function; it may be slightly larger due to padding for data alignment in the buffer.
    buf The starting address of the communication buffer into which the object's data should be packed.
    ierr Error code to be set by function.



C and C++: typedef void ZOLTAN_PACK_OBJ_MULTI_FN (
      void *data,
      int num_gid_entries,
      int num_lid_entries,
      int num_ids,
      ZOLTAN_ID_PTR global_ids,
      ZOLTAN_ID_PTR local_ids,
      int *dest,
      int *sizes,
      int *idx,
      char *buf,
      int *ierr);
FORTRAN: SUBROUTINE Pack_Obj_Multi(data, num_gid_entries, num_lid_entries, num_ids, global_ids, local_ids, dest, sizes, idx, buf, ierr
<type-data>, INTENT(IN) :: data 
INTEGER(Zoltan_INT), INTENT(IN) :: num_gid_entries, num_lid_entries, num_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: global_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: local_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: dest
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: sizes 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: idx 
INTEGER(Zoltan_INT), INTENT(OUT), DIMENSION(*) :: buf 
INTEGER(Zoltan_INT), INTENT(OUT) :: ierr 

<type-data> can be any of INTEGER(Zoltan_INT), DIMENSION(*) or REAL(Zoltan_FLOAT), DIMENSION(*) or REAL(Zoltan_DOUBLE), DIMENSION(*) or TYPE(Zoltan_User_Data_x) where x is 1, 2, 3 or 4. See the section on Fortran query functions for an explanation. 


A ZOLTAN_PACK_OBJ_MULTI_FN query function is the multiple-ID version of a ZOLTAN_PACK_OBJ_FN. It allows the application to tell Zoltan how to copy all needed data for a given list of objects into a communication buffer.
 
Function Type: ZOLTAN_PACK_OBJ_FN_MULTI_TYPE
Arguments:
    data Pointer to user-defined data.
    num_gid_entries The number of array entries used to describe a single global ID.  This value is the maximum value over all processors of the parameter NUM_GID_ENTRIES.
    num_lid_entries The number of array entries used to describe a single local ID.  This value is the maximum value over all processors of the parameter NUM_LID_ENTRIES.
   num_ids The number of objects to be packed.
   global_ids An array of global IDs of the objects. The ID for the i-th object begins in global_ids[i*num_gid_entries].
   local_ids An array of local IDs of the objects. The ID for the i-th object begins in local_ids[i*num_lid_entries].
    dest An array of destination part numbers (i.e., the parts to which the objects are being sent)
    sizes An array containing the per-object sizes (in bytes) of the communication buffer for each object. Each value is at least as large as the corresponding value returned by the ZOLTAN_OBJ_SIZE_MULTI_FN or ZOLTAN_OBJ_SIZE_FN query function; it may be slightly larger due to padding for data alignment in the buffer.
    idx For each object, an index into the buf array giving the starting location of that object's data. Data for the i-th object are stored in buf[idx[i]], buf[idx[i]+1], ..., buf[idx[i]+sizes[i]-1]. Because Zoltan adds some tag information to packed data, idx[i]  !=  sum[j=0,i-1](sizes[j]).
    buf The address of the communication buffer into which the objects' data should be packed.
    ierr Error code to be set by function.



C and C++: typedef void ZOLTAN_UNPACK_OBJ_FN (
      void *data,
      int num_gid_entries,
      ZOLTAN_ID_PTR global_id,
      int size,
      char *buf,
      int *ierr);
FORTRAN: SUBROUTINE Unpack_Obj(data, num_gid_entries, global_id, size, buf, ierr
<type-data>, INTENT(INOUT) :: data 
INTEGER(Zoltan_INT), INTENT(IN) :: num_gid_entries 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: global_id 
INTEGER(Zoltan_INT), INTENT(IN) :: size 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: buf 
INTEGER(Zoltan_INT), INTENT(OUT) :: ierr 

<type-data> can be any of INTEGER(Zoltan_INT), DIMENSION(*) or REAL(Zoltan_FLOAT), DIMENSION(*) or REAL(Zoltan_DOUBLE), DIMENSION(*) or TYPE(Zoltan_User_Data_x) where x is 1, 2, 3 or 4. See the section on Fortran query functions for an explanation. 


A ZOLTAN_UNPACK_OBJ_FN query function allows the application to tell Zoltan how to copy all needed data for a given object from a communication buffer into the application's data structure. This operation is needed as the final step of importing objects during data migration. The query function may also perform other computation, such as building request lists for related data. This routine is called by Zoltan_Migrate for each object to be received by the processor. (Note: a local ID for the object is not included in this function, as the local ID is local to the exporting, not the importing, processor.)
 
Function Type: ZOLTAN_UNPACK_OBJ_FN_TYPE
Arguments:
    data Pointer to user-defined data.
    num_gid_entries The number of array entries used to describe a single global ID.  This value is the maximum value over all processors of the parameter NUM_GID_ENTRIES.
    global_id The global ID of the object whose data has been received in the communication buffer.
    size The size (in bytes) of the object's data in the communication buffer. This value is at least as large as the value returned by the ZOLTAN_OBJ_SIZE_MULTI_FN or ZOLTAN_OBJ_SIZE_FN query function; it may be slightly larger due to padding for data alignment in the buffer.
    buf The starting address of the communication buffer for this object.
    ierr Error code to be set by function.



C and C++: typedef void ZOLTAN_UNPACK_OBJ_MULTI_FN (
      void *data,
      int num_gid_entries,
      int num_ids,
      ZOLTAN_ID_PTR global_ids,
      int *sizes,
      int *idx,
      char *buf,
      int *ierr);
FORTRAN: SUBROUTINE Unpack_Obj_Multi(data, num_gid_entries, num_ids, global_ids, sizes, idx, buf, ierr
<type-data>, INTENT(INOUT) :: data 
INTEGER(Zoltan_INT), INTENT(IN) :: num_gid_entries 
INTEGER(Zoltan_INT), INTENT(IN) :: num_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: global_ids
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: sizes 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: idx 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: buf 
INTEGER(Zoltan_INT), INTENT(OUT) :: ierr 

<type-data> can be any of INTEGER(Zoltan_INT), DIMENSION(*) or REAL(Zoltan_FLOAT), DIMENSION(*) or REAL(Zoltan_DOUBLE), DIMENSION(*) or TYPE(Zoltan_User_Data_x) where x is 1, 2, 3 or 4. See the section on Fortran query functions for an explanation. 


A ZOLTAN_UNPACK_OBJ_MULTI_FN query function is the multiple-ID version of a ZOLTAN_UNPACK_OBJ_FN. It allows the application to tell Zoltan how to copy all needed data for a given list of objects from a communication buffer into the application's data structure.
 
Function Type: ZOLTAN_UNPACK_OBJ_MULTI_FN_TYPE
Arguments:
    data Pointer to user-defined data.
    num_gid_entries The number of array entries used to describe a single global ID.  This value is the maximum value over all processors of the parameter NUM_GID_ENTRIES.
   num_ids The number of objects to be unpacked.
   global_ids An array of global IDs of the objects. The ID for the i-th object begins in global_ids[i*num_gid_entries].
    sizes An array containing the per-object sizes (in bytes) of the communication buffer for each object. Each value is at least as large as the corresponding value returned by the ZOLTAN_OBJ_SIZE_MULTI_FN or ZOLTAN_OBJ_SIZE_FN query function; it may be slightly larger due to padding for data alignment in the buffer.
    idx For each object, an index into the buf array giving the starting location of that object's data. Data for the i-th object are stored in buf[idx[i]], buf[idx[i]+1], ..., buf[idx[i]+sizes[i]-1]. Because Zoltan adds some tag information to packed data, idx[i]  !=  sum[j=0,i-1](sizes[j]).
    buf The address of the communication buffer from which data is unpacked.
    ierr Error code to be set by function.



C and C++: typedef void ZOLTAN_PRE_MIGRATE_PP_FN (
      void *data,
      int num_gid_entries,
      int num_lid_entries,
      int num_import,
      ZOLTAN_ID_PTR import_global_ids,
      ZOLTAN_ID_PTR import_local_ids,
      int *import_procs,
      int *import_to_part,
      int num_export,
      ZOLTAN_ID_PTR export_global_ids,
      ZOLTAN_ID_PTR export_local_ids,
      int *export_procs,
      int *export_to_part,
      int *ierr);
FORTRAN: SUBROUTINE Pre_Migrate_PP(data, num_gid_entries, num_lid_entries, num_import, import_global_ids, import_local_ids, import_procs, import_to_part, num_export, export_global_ids, export_local_ids, export_procs, export_to_part, ierr
<type-data>, INTENT(INOUT) :: data 
INTEGER(Zoltan_INT), INTENT(IN) :: num_gid_entries, num_lid_entries 
INTEGER(Zoltan_INT), INTENT(IN) :: num_import, num_export 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_global_ids, export_global_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_local_ids, export_local_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_procs, export_procs 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_to_part, export_to_part 
INTEGER(Zoltan_INT), INTENT(OUT) :: ierr 

<type-data> can be any of INTEGER(Zoltan_INT), DIMENSION(*) or REAL(Zoltan_FLOAT), DIMENSION(*) or REAL(Zoltan_DOUBLE), DIMENSION(*) or TYPE(Zoltan_User_Data_x) where x is 1, 2, 3 or 4. See the section on Fortran query functions for an explanation. 


A ZOLTAN_PRE_MIGRATE_PP_FN query function performs any pre-processing desired by the application. If it is registered, it is called at the beginning of the Zoltan_Migrate routine. The arguments passed to Zoltan_Migrate are made available for use in the pre-processing routine.
 
Function Type: ZOLTAN_PRE_MIGRATE_PP_FN_TYPE
Arguments:
    data Pointer to user-defined data.
    num_gid_entries The number of array entries used to describe a single global ID.  This value is the maximum value over all processors of the parameter NUM_GID_ENTRIES.
    num_lid_entries The number of array entries used to describe a single local ID.  This value is the maximum value over all processors of the parameter NUM_LID_ENTRIES.
    num_import The number of objects that will be received by this processor.
    import_global_ids An array of num_import global IDs of objects to be received by this processor. This array may be NULL, as the processor does not necessarily need to know which objects it will receive.
    import_local_ids An array of num_import local IDs of objects to be received by this processor. This array may be NULL, as the processor does not necessarily need to know which objects it will receive.
    import_procs An array of size num_import listing the processor IDs of the source processors. This array may be NULL, as the processor does not necessarily need to know which objects is will receive.
    import_to_part An array of size num_import listing the parts to which objects will be imported. This array may be NULL, as the processor does not necessarily need to know from which objects it will receive.
    num_export The number of objects that will be sent from this processor to other processors.
    export_global_ids An array of num_export global IDs of objects to be sent from this processor.
    export_local_ids An array of num_export local IDs of objects to be sent from this processor.
    export_procs An array of size num_export listing the processor IDs of the destination processors.
    export_to_part An array of size num_export listing the parts to which objects will be sent.
    ierr Error code to be set by function.
Default:
No pre-processing is done if a ZOLTAN_PRE_MIGRATE_PP_FN is not registered.



C and C++: typedef void ZOLTAN_MID_MIGRATE_PP_FN (
      void *data,
      int num_gid_entries,
      int num_lid_entries,
      int num_import,
      ZOLTAN_ID_PTR import_global_ids,
      ZOLTAN_ID_PTR import_local_ids,
      int *import_procs,
      int *import_to_part,
      int num_export,
      ZOLTAN_ID_PTR export_global_ids,
      ZOLTAN_ID_PTR export_local_ids,
      int *export_procs,
      int *export_to_part,
      int *ierr);
FORTRAN: SUBROUTINE Mid_Migrate_PP(data, num_gid_entries, num_lid_entries, num_import, import_global_ids, import_local_ids, import_procs, import_to_part, num_export, export_global_ids, export_local_ids, export_procs, export_to_part, ierr
<type-data>, INTENT(INOUT) :: data 
INTEGER(Zoltan_INT), INTENT(IN) :: num_gid_entries, num_lid_entries 
INTEGER(Zoltan_INT), INTENT(IN) :: num_import, num_export 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_global_ids, export_global_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_local_ids, export_local_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_procs, export_procs 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_to_part, export_to_part 
INTEGER(Zoltan_INT), INTENT(OUT) :: ierr 

<type-data> can be any of INTEGER(Zoltan_INT), DIMENSION(*) or REAL(Zoltan_FLOAT), DIMENSION(*) or REAL(Zoltan_DOUBLE), DIMENSION(*) or TYPE(Zoltan_User_Data_x) where x is 1, 2, 3 or 4. See the section on Fortran query functions for an explanation. 


A ZOLTAN_MID_MIGRATE_PP_FN query function performs any processing desired by the application between the packing and unpacking of objects being migrated. If it is registered, it is called after export objects are packed in Zoltan_Migrate; imported objects are unpacked after the ZOLTAN_MID_MIGRATE_PP_FN query function is called. The arguments passed to Zoltan_Migrate are made available for use in the processing routine.
 
Function Type: ZOLTAN_MID_MIGRATE_PP_FN_TYPE
Arguments:
    data Pointer to user-defined data.
    num_gid_entries The number of array entries used to describe a single global ID.  This value is the maximum value over all processors of the parameter NUM_GID_ENTRIES.
    num_lid_entries The number of array entries used to describe a single local ID.  This value is the maximum value over all processors of the parameter NUM_LID_ENTRIES.
    num_import The number of objects that will be received by this processor.
    import_global_ids An array of num_import global IDs of objects to be received by this processor. This array may be NULL, as the processor does not necessarily need to know which objects it will receive.
    import_local_ids An array of num_import local IDs of objects to be received by this processor. This array may be NULL, as the processor does not necessarily need to know which objects it will receive.
    import_procs An array of size num_import listing the processor IDs of the source processors. This array may be NULL, as the processor does not necessarily need to know which objects is will receive.
    import_to_part An array of size num_import listing the parts to which objects will be imported. This array may be NULL, as the processor does not necessarily need to know from which objects it will receive.
    num_export The number of objects that will be sent from this processor to other processors.
    export_global_ids An array of num_export global IDs of objects to be sent from this processor.
    export_local_ids An array of num_export local IDs of objects to be sent from this processor.
    export_procs An array of size num_export listing the processor IDs of the destination processors.
    export_to_part An array of size num_export listing the parts to which objects will be sent.
    ierr Error code to be set by function.
Default:
No processing is done if a ZOLTAN_MID_MIGRATE_PP_FN is not registered.



C and C++: typedef void ZOLTAN_POST_MIGRATE_PP_FN (
      void *data,
      int num_gid_entries,
      int num_lid_entries,
      int num_import,
      ZOLTAN_ID_PTR import_global_ids,
      ZOLTAN_ID_PTR import_local_ids,
      int *import_procs,
      int *import_to_part,
      int num_export,
      ZOLTAN_ID_PTR export_global_ids,
      ZOLTAN_ID_PTR export_local_ids,
      int *export_procs,
      int *export_to_part,
      int *ierr);
FORTRAN: SUBROUTINE Post_Migrate_PP(data, num_gid_entries, num_lid_entries, num_import, import_global_ids, import_local_ids, import_procs, import_to_part, num_export, export_global_ids, export_local_ids, export_procs, export_to_part, ierr
<type-data>, INTENT(INOUT) :: data 
INTEGER(Zoltan_INT), INTENT(IN) :: num_gid_entries, num_lid_entries 
INTEGER(Zoltan_INT), INTENT(IN) :: num_import, num_export 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_global_ids, export_global_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_local_ids, export_local_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_procs, export_procs 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_to_part, export_to_part 
INTEGER(Zoltan_INT), INTENT(OUT) :: ierr 

<type-data> can be any of INTEGER(Zoltan_INT), DIMENSION(*) or REAL(Zoltan_FLOAT), DIMENSION(*) or REAL(Zoltan_DOUBLE), DIMENSION(*) or TYPE(Zoltan_User_Data_x) where x is 1, 2, 3 or 4. See the section on Fortran query functions for an explanation. 


A ZOLTAN_POST_MIGRATE_PP_FN query function performs any post-processing desired by the application. If it is registered, it is called at the end of the Zoltan_Migrate routine. The arguments passed to Zoltan_Migrate are made available for use in the post-processing routine.
 
Function Type: ZOLTAN_POST_MIGRATE_PP_FN_TYPE
Arguments:
    data Pointer to user-defined data.
    num_gid_entries The number of array entries used to describe a single global ID.  This value is the maximum value over all processors of the parameter NUM_GID_ENTRIES.
    num_lid_entries The number of array entries used to describe a single local ID.  This value is the maximum value over all processors of the parameter NUM_LID_ENTRIES.
    num_import The number of objects that will be received by this processor.
    import_global_ids An array of num_import global IDs of objects to be received by this processor. This array may be NULL, as the processor does not necessarily need to know which objects it will receive.
    import_local_ids An array of num_import local IDs of objects to be received by this processor. This array may be NULL, as the processor does not necessarily need to know which objects it will receive.
    import_procs An array of size num_import listing the processor IDs of the source processors. This array may be NULL, as the processor does not necessarily need to know which objects is will receive.
    import_to_part An array of size num_import listing the parts to which objects will be imported. This array may be NULL, as the processor does not necessarily need to know from which objects it will receive.
    num_export The number of objects that will be sent from this processor to other processors.
    export_global_ids An array of num_export global IDs of objects to be sent from this processor.
    export_local_ids An array of num_export local IDs of objects to be sent from this processor.
    export_procs An array of size num_export listing the processor IDs of the destination processors.
    export_to_part An array of size num_export listing the parts to which objects will be sent.
    ierr Error code to be set by function.
Default:
No post-processing is done if a ZOLTAN_POST_MIGRATE_PP_FN is not registered.


C: typedef void ZOLTAN_PRE_MIGRATE_FN (
      void *data,
      int num_gid_entries,
      int num_lid_entries,
      int num_import,
      ZOLTAN_ID_PTR import_global_ids,
      ZOLTAN_ID_PTR import_local_ids,
      int *import_procs,
      int num_export,
      ZOLTAN_ID_PTR export_global_ids,
      ZOLTAN_ID_PTR export_local_ids,
      int *export_procs,
      int *ierr);
FORTRAN: SUBROUTINE Pre_Migrate(data, num_gid_entries, num_lid_entries, num_import, import_global_ids, import_local_ids, import_procs, num_export, export_global_ids, export_local_ids, export_procs, ierr
<type-data>, INTENT(INOUT) :: data 
INTEGER(Zoltan_INT), INTENT(IN) :: num_gid_entries, num_lid_entries 
INTEGER(Zoltan_INT), INTENT(IN) :: num_import, num_export 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_global_ids, export_global_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_local_ids, export_local_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_procs, export_procs 
INTEGER(Zoltan_INT), INTENT(OUT) :: ierr 

<type-data> can be any of INTEGER(Zoltan_INT), DIMENSION(*) or REAL(Zoltan_FLOAT), DIMENSION(*) or REAL(Zoltan_DOUBLE), DIMENSION(*) or TYPE(Zoltan_User_Data_x) where x is 1, 2, 3 or 4. See the section on Fortran query functions for an explanation. 


A ZOLTAN_PRE_MIGRATE_FN query function performs any pre-processing desired by applications using Zoltan_Help_Migrate. Its function is analogous to ZOLTAN_PRE_MIGRATE_PP_FN, but it cannot be used with Zoltan_Migrate.
 
Function Type: ZOLTAN_PRE_MIGRATE_FN_TYPE
Arguments:
All arguments are analogous to those in ZOLTAN_PRE_MIGRATE_PP_FN. Part-assignment arguments import_to_part and export_to_part are not included, as processor and parts numbers are considered to be the same in Zoltan_Help_Migrate.
Default:
No pre-processing is done if a ZOLTAN_PRE_MIGRATE_FN is not registered.



C: typedef void ZOLTAN_MID_MIGRATE_FN (
      void *data,
      int num_gid_entries,
      int num_lid_entries,
      int num_import,
      ZOLTAN_ID_PTR import_global_ids,
      ZOLTAN_ID_PTR import_local_ids,
      int *import_procs,
      int num_export,
      ZOLTAN_ID_PTR export_global_ids,
      ZOLTAN_ID_PTR export_local_ids,
      int *export_procs,
      int *ierr);
FORTRAN: SUBROUTINE Mid_Migrate(data, num_gid_entries, num_lid_entries, num_import, import_global_ids, import_local_ids, import_procs, num_export, export_global_ids, export_local_ids, export_procs, ierr
<type-data>, INTENT(INOUT) :: data 
INTEGER(Zoltan_INT), INTENT(IN) :: num_gid_entries, num_lid_entries 
INTEGER(Zoltan_INT), INTENT(IN) :: num_import, num_export 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_global_ids, export_global_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_local_ids, export_local_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_procs, export_procs 
INTEGER(Zoltan_INT), INTENT(OUT) :: ierr 

<type-data> can be any of INTEGER(Zoltan_INT), DIMENSION(*) or REAL(Zoltan_FLOAT), DIMENSION(*) or REAL(Zoltan_DOUBLE), DIMENSION(*) or TYPE(Zoltan_User_Data_x) where x is 1, 2, 3 or 4. See the section on Fortran query functions for an explanation. 


A ZOLTAN_MID_MIGRATE_FN query function performs any mid-migration processing desired by applications using Zoltan_Help_Migrate. Its function is analogous to ZOLTAN_MID_MIGRATE_PP_FN, but it cannot be used with Zoltan_Migrate.
 
Function Type: ZOLTAN_MID_MIGRATE_FN_TYPE
Arguments:
All arguments are analogous to those in ZOLTAN_MID_MIGRATE_PP_FN. Part-assignment arguments import_to_part and export_to_part are not included, as processor and parts numbers are considered to be the same in Zoltan_Help_Migrate.
Default:
No processing is done if a ZOLTAN_MID_MIGRATE_FN is not registered.



C: typedef void ZOLTAN_POST_MIGRATE_FN (
      void *data,
      int num_gid_entries,
      int num_lid_entries,
      int num_import,
      ZOLTAN_ID_PTR import_global_ids,
      ZOLTAN_ID_PTR import_local_ids,
      int *import_procs,
      int num_export,
      ZOLTAN_ID_PTR export_global_ids,
      ZOLTAN_ID_PTR export_local_ids,
      int *export_procs,
      int *ierr);
FORTRAN: SUBROUTINE Post_Migrate(data, num_gid_entries, num_lid_entries, num_import, import_global_ids, import_local_ids, import_procs, num_export, export_global_ids, export_local_ids, export_procs, ierr
<type-data>, INTENT(INOUT) :: data 
INTEGER(Zoltan_INT), INTENT(IN) :: num_gid_entries, num_lid_entries 
INTEGER(Zoltan_INT), INTENT(IN) :: num_import, num_export 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_global_ids, export_global_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_local_ids, export_local_ids 
INTEGER(Zoltan_INT), INTENT(IN), DIMENSION(*) :: import_procs, export_procs 
INTEGER(Zoltan_INT), INTENT(OUT) :: ierr 

<type-data> can be any of INTEGER(Zoltan_INT), DIMENSION(*) or REAL(Zoltan_FLOAT), DIMENSION(*) or REAL(Zoltan_DOUBLE), DIMENSION(*) or TYPE(Zoltan_User_Data_x) where x is 1, 2, 3 or 4. See the section on Fortran query functions for an explanation. 


A ZOLTAN_POST_MIGRATE_FN query function performs any post-processing desired by applications using Zoltan_Help_Migrate. Its function is analogous to ZOLTAN_POST_MIGRATE_PP_FN, but it cannot be used with Zoltan_Migrate.
 
Function Type: ZOLTAN_POST_MIGRATE_FN_TYPE
Arguments:
All arguments are analogous to those in ZOLTAN_POST_MIGRATE_PP_FN. Part-assignment arguments import_to_part and export_to_part are not included, as processor and parts numbers are considered to be the same in Zoltan_Help_Migrate.
Default:
No post-processing is done if a ZOLTAN_POST_MIGRATE_FN is not registered.


[Table of Contents  | Next:  Zoltan Parameters and Output Levels  |  Previous:  Load-Balancing Query Functions  |  Privacy and Security]