Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] MPI_Recv operation time
From: Eugene Loh (eugene.loh_at_[hidden])
Date: 2012-11-05 10:12:26


On 11/5/2012 1:07 AM, huydanlin wrote:
> Hi,
> My objective is I want to calculate the time perform by MPI_Send &
> MPI_Recv . In case MPI_Send, i can put the timer before the MPI_Send
> and after its. like this "
> t1=MPI_Wtime(),
> MPI_Send....
> t2= MPI_Wtime
> tsend= t2 -t1; it mean when the message go to the system buffer, the
> control return to the sending process.
It means that the message is out of the user's send buffer. The time
could include a rendezvous with the receiving process. Depending on
what mechanism is used, a send (e.g., of a long message) might not be
able to complete until most of the message is already in the receiver's
buffer.
> So I can measure the MPI_Send.
> But my problem in MPI_Recv. If i do like MPI_Send( put the timer
> before and after MPI_Recv) I think it wrong. Because we dont know
> exactly when the message reach the system buffer in receiving side.
> So how can we measure the MPI_Recv operation time( time when the
> message is copied from the system buffer to the receive buffer) ?
You cannot if you're instrumenting the user's MPI program. If you want
to time the various phases of how the message was passed, you would have
to introduce timers into the underlying MPI implementation.