int MPI_Access::Send(void* buffer, int count, MPI_Datatype datatype, int target,
int &RequestId) {
int sts = MPI_SUCCESS ;
+ RequestId = -1 ;
if ( count ) {
_MessageIdent aMethodIdent = MethodId( datatype ) ;
int MPItag = NewSendTag( datatype, target , aMethodIdent , false , RequestId ) ;
int MPI_Access::Recv(void* buffer, int count, MPI_Datatype datatype, int source,
int &RequestId, int *OutCount) {
int sts = MPI_SUCCESS ;
+ RequestId = -1 ;
+ if ( OutCount != NULL ) {
+ *OutCount = -1 ;
+ }
if ( count ) {
_MessageIdent aMethodIdent = MethodId( datatype ) ;
int MPItag = NewRecvTag( datatype, source , aMethodIdent , false , RequestId ) ;
int MPI_Access::ISend(void* buffer, int count, MPI_Datatype datatype, int target,
int &RequestId) {
int sts = MPI_SUCCESS ;
+ RequestId = -1 ;
if ( count ) {
_MessageIdent aMethodIdent = MethodId( datatype ) ;
int MPItag = NewSendTag( datatype, target , aMethodIdent , true , RequestId ) ;
int MPI_Access::IRecv(void* buffer, int count, MPI_Datatype datatype, int source,
int &RequestId) {
int sts = MPI_SUCCESS ;
+ RequestId = -1 ;
if ( count ) {
_MessageIdent aMethodIdent = MethodId( datatype ) ;
int MPItag = NewRecvTag( datatype, source , aMethodIdent , true , RequestId ) ;
else {
source = -1 ;
MPITag = -1 ;
+ datatype = 0 ;
outcount = -1 ;
}
return sts ;
else {
source = -1 ;
MPITag = -1 ;
+ datatype = 0 ;
outcount = -1 ;
}
return sts ;
for ( MapOfRequestStructiterator = _MapOfRequestStruct.begin() ;
MapOfRequestStructiterator != _MapOfRequestStruct.end() ;
MapOfRequestStructiterator++ ) {
- cout << " Check" << _MyRank << " " << i << ". Request"
- << MapOfRequestStructiterator->first << "-->" ;
if ( MapOfRequestStructiterator->second == NULL ) {
- cout << " MapOfRequestStructiterator->second == NULL" << endl ;
+// cout << " MapOfRequestStructiterator->second == NULL" << endl ;
}
else {
+ cout << " Check" << _MyRank << " " << i << ". Request"
+ << MapOfRequestStructiterator->first << "-->" ;
if ( (MapOfRequestStructiterator->second)->MPIAsynchronous ) {
cout << "I" ;
}
}
inline void MPI_Access::DeleteSendRecvRequest( int RequestId ) {
+ if ( _Trace )
+ cout << "MPI_Access::DeleteSendRecvRequest" << _MyRank
+ << "( " << RequestId << " ) " << endl ;
if ( MPIIsRecv( RequestId ) ) {
_RecvRequests[ MPITarget( RequestId ) ].remove( RequestId ) ;
}
struct RequestStruct *aRequestStruct = _MapOfRequestStruct[ RequestId ] ;
if ( aRequestStruct ) {
aRequestStruct->MPICompleted = completed ;
- //if ( completed ) {
- // DeleteRequest( RequestId ) ;
- //}
}
}
inline void MPI_Access::SetMPIOutCount( int RequestId , int outcount ) {