Commit 573c0456 authored by Sebastian Eibl's avatar Sebastian Eibl

add statistics about communication partners

parent f901b60d
Pipeline #12960 passed with stages
in 204 minutes and 22 seconds
......@@ -56,6 +56,7 @@ void BufferSystem::iterator::operator++()
} else
{
bufferSystem_.bytesReceived_ += currentRecvBuffer_->size() * sizeof(RecvBuffer::ElementType);
bufferSystem_.numberOfReceives_ += 1;
}
}
......@@ -307,7 +308,8 @@ void BufferSystem::sendAll()
{
if ( iter->second.buffer.size() > 0 )
{
bytesSent_ += iter->second.buffer.size() * sizeof(SendBuffer::ElementType);
bytesSent_ += iter->second.buffer.size() * sizeof(SendBuffer::ElementType);
numberOfSends_ += 1;
currentComm_->send( iter->first, iter->second.buffer );
}
......@@ -338,7 +340,8 @@ void BufferSystem::send( MPIRank rank )
if ( iter->second.buffer.size() > 0 )
{
bytesSent_ += iter->second.buffer.size() * sizeof(SendBuffer::ElementType);
bytesSent_ += iter->second.buffer.size() * sizeof(SendBuffer::ElementType);
numberOfSends_ += 1;
currentComm_->send( rank, iter->second.buffer );
}
......@@ -372,8 +375,11 @@ void BufferSystem::startCommunication()
currentComm_->scheduleReceives( recvInfos_ );
communicationRunning_ = true;
bytesSent_ = 0;
bytesReceived_ = 0;
bytesSent_ = 0;
bytesReceived_ = 0;
numberOfSends_ = 0;
numberOfReceives_ = 0;
}
......
......@@ -193,9 +193,16 @@ public:
//@}
//*******************************************************************************************************************
///Bytes sent during the current or last communication
int64_t getBytesSent() const { return bytesSent_; }
///Bytes received during the current or last communication
int64_t getBytesReceived() const { return bytesReceived_; }
///Communication partners during current or last send operation
int64_t getNumberOfSends() const { return numberOfSends_; }
///Communication partners during current or last receive operation
int64_t getNumberOfReceives() const { return numberOfReceives_; }
//* Rank Ranges *************************************************************************************************
/*! \name Rank Ranges */
......@@ -244,8 +251,11 @@ protected:
//each concurrently running communication uses different tags
static std::set<int> activeTags_;
int64_t bytesSent_ = 0; ///< number of bytes sent during last communication
int64_t bytesReceived_ = 0; ///< number of bytes received during last communication
int64_t bytesSent_ = 0; ///< number of bytes sent during last communication
int64_t bytesReceived_ = 0; ///< number of bytes received during last communication
int64_t numberOfSends_ = 0; ///< number of communication partners during last send
int64_t numberOfReceives_ = 0; ///< number of communication partners during last receive
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment