Skip to content

Handle Debugging:Use cases

Joachim edited this page Oct 19, 2023 · 7 revisions

What we want to solve

Requests

typedef ompi_request_.._t * MPI_Request;
typedef int MPI_Request;
int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
              int tag, MPI_Comm comm, MPI_Request *request);
int MPI_Wait(MPI_Request *request);


MPI_Request request;
MPI_Irecv(..., &request);
...
MPI_Wait(&request);

Assume execution is stopped in MPI_Wait: What is the request?

  • Provide information about the kind of communication -> query basic information
    • Active / inactive? -> which stage?
    • Partitioned communication requests?
    • Generalized requests?
    • MPI_RGET_ACCUMULATE / MPI_RGET / MPI_RPUT?
  • Where was it started? -> codeptr?
    • Persistent: where created, where started?
  • Who is communication partner? -> rank, communicator
    • neighborhood collective?
    • files

Buffer usage / datatypes

typedef ompi_datatype_.._t * MPI_Datatype;
typedef int MPI_Datatype;
int MPI_Isend(void *buf, int count, MPI_Datatype datatype, int dest,
              int tag, MPI_Comm comm, MPI_Request *request);

MPI_Isend(buf, count, type, ...);

What is the content of buf?

  • Basically allow a typecast like: (type[count])buf

    • type-map: {MPI_INT: 0, MPI_FLOAT: 8, ...}
    • MPI basic type -> base language type (int/float + size)
    • nested type definition: type = { type1: 0, type2*20: 100, type3: 200 } type1 = MPI_INT type2 = { MPI_INT:0, MPI_FLOAT:8, MPI_INT:16}
    • MPI_Type_get_envelope : length of the info arrays, kind of type
    • MPI_Type_get_contents : info arrays
  • Provide access to the MPI view on data

RMA

  • show buffer content (similar to P2P, but based on Window information)
  • Window properties

Communicator

  • Which process is the receiver/sender/root rank in MPI communication?
  • Group processes by communicator:
    • Allow setting breakpoints for processes of a communicator
    • Use communicator information in watchpoints / conditional breakpoints?
  • MPI Process is not necessarily a OS process - might be OS thread

Conditional breakpoints:

  • break on MPI_Bcast not using MPI_COMM_WORLD
  • break, if an MPI_Send is sending 23 as the 42nd value.

MPI 4.0: Sessions

  • Identify the session some MPI stuff belongs to.

Provide MQD functionality

Collective communication

  • What is the state of the communication? Which processes have contributed to the communication? What part of the data has arrived?
  • Which internal protocol is used?
  • Can this be done for blocking functions? Can this be done for non-blocking functions based on the request handle?

Clone this wiki locally