Skip to content

Handle Debugging:Status queries

Marc-Andre edited this page Apr 8, 2025 · 6 revisions

Use cases

Provide API similar to MPI_Get_count, MPI_Get_elements

For case of missing debug information, also access to MPI_SOURCE, MPI_TAG, and MPI_ERROR should be provided with a query function.

void foo(MPI_Datatype type){
  MPI_Status status;
  int elements;
  MPI_Recv(..., type, &status);
  /**/
  MPI_Get_elements(status, type, &elements );
}

Status queries

Life-time of MPI_Status is very limited, so have a query without allocating a debugging handle (mpid_status_handle_t):

int mpid_status_get_count_elements(mpid_process_handle_t *process,
                                   mpid_address_t status,  // Address of the MPI_status 
                                   int language, // MPID_TYPE_LANG_C or MPID_TYPE_LANG_FORTRAN 
                                   mpid_type_handle_t *type_handle, // debugging handle for the data type used in the receive call
                                   int64 *count,
                                   int64 *elements);

count and elements might be NULL, if they are not of interest.

Clone this wiki locally