From 37d595439ac388f8d919b93ce9ae1fe6efde07b7 Mon Sep 17 00:00:00 2001 From: rahuel Date: Tue, 22 Jan 2008 12:42:15 +0000 Subject: [PATCH] Traces --- src/ParaMEDMEM/MPI_Access.cxx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/ParaMEDMEM/MPI_Access.cxx b/src/ParaMEDMEM/MPI_Access.cxx index 50a22e77d..70d0ca611 100644 --- a/src/ParaMEDMEM/MPI_Access.cxx +++ b/src/ParaMEDMEM/MPI_Access.cxx @@ -281,6 +281,10 @@ int MPI_Access::Send(void* buffer, int count, MPI_Datatype datatype, int target, DeleteRequest( RequestId ) ; sts = _CommInterface.send(buffer, count, datatype, target, MPItag, *_IntraCommunicator ) ; + if ( _Trace ) + cout << "MPI_Access::Send" << _MyRank << " SendRequestId " + << RequestId << " count " << count << " target " << target + << " MPItag " << MPItag << endl ; } return sts ; } @@ -308,6 +312,10 @@ int MPI_Access::Recv(void* buffer, int count, MPI_Datatype datatype, int source, if ( OutCount != NULL ) { *OutCount = outcount ; } + if ( _Trace ) + cout << "MPI_Access::Recv" << _MyRank << " RecvRequestId " + << RequestId << " count " << count << " source " << source + << " MPItag " << MPItag << endl ; DeleteRequest( RequestId ) ; } return sts ; @@ -325,6 +333,15 @@ int MPI_Access::ISend(void* buffer, int count, MPI_Datatype datatype, int target aTimeMsg->tag = MPItag ; } MPI_Request *aSendRequest = MPIRequest( RequestId ) ; + if ( _Trace ) { + cout << "MPI_Access::ISend" << _MyRank << " ISendRequestId " + << RequestId << " count " << count << " target " << target + << " MPItag " << MPItag << endl ; + if ( MPItag == 1 ) + cout << "MPI_Access::ISend" << _MyRank << " time " + << ((TimeMessage *)buffer)->time << " " << ((TimeMessage *)buffer)->deltatime + << endl ; + } sts = _CommInterface.Isend(buffer, count, datatype, target, MPItag, *_IntraCommunicator , aSendRequest) ; } @@ -339,6 +356,15 @@ int MPI_Access::IRecv(void* buffer, int count, MPI_Datatype datatype, int source _MessageIdent aMethodIdent = MethodId( datatype ) ; int MPItag = NewRecvTag( datatype, source , aMethodIdent , true , RequestId ) ; MPI_Request *aRecvRequest = MPIRequest( RequestId ) ; + if ( _Trace ) { + cout << "MPI_Access::IRecv" << _MyRank << " IRecvRequestId " + << RequestId << " count " << count << " source " << source + << " MPItag " << MPItag << endl ; + if ( MPItag == 1 ) + cout << "MPI_Access::ISend" << _MyRank << " time " + << ((TimeMessage *)buffer)->time << " " << ((TimeMessage *)buffer)->deltatime + << endl ; + } sts = _CommInterface.Irecv(buffer, count, datatype, source, MPItag, *_IntraCommunicator , aRecvRequest) ; } -- 2.39.2