Exchange handles

saf_allgather_handles is a function defined in utils.c.

Synopsis:

ss_pers_t * saf_allgather_handles(ss_pers_t *_pers, int *commsize, ss_pers_t *result)

Formal Arguments:

  • _pers: A Pointer to the handle to be exchanged. Every participant must supply a valid handle of the same type and in the same scope as every other participant.
  • commsize: [OUT] A pointer to optional caller supplied memory which is to receive the integer number of handles returned by this function. This is the number of participants or the size of the communicator associated with the given database.
  • result: [OUT] An optional pointer to an array that will will be initialized with a handle from each MPI task in task rank order. If this buffer is supplied then it should be at least as large as the communicator associated with the DB argument. If not supplied (i.e., null) then a buffer will be allocated for the return value.

Description: This function is used to exchange handles created locally by processes for global writing. This is generally done when collecting the local handles to be written stored with an indirect relation or field.

Preconditions:

  • _pers must be a valid object link. (low-cost)

Return Value: Returns a buffer of handles on success or null on failure. The buffer is either the non-null value of the result argument or a buffer which is allocated by this function.

Parallel Notes: This call must be collective across the communicator for the given database.

See Also: