Skip to content

Handle Debugging:Status queries

Joachim edited this page Nov 10, 2022 · 4 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 (mpidbg_status_handle_t):

int mpidbg_status_get_count_elements(mqs_process *process,
                                     mqs_taddr_t status,  // Address of the MPI_status 
                                     int language, // MPIDBG_TYPE_LANG_C or MPIDBG_TYPE_LANG_FORTRAN 
                                     struct mpidbg_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