Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Florian Weik
waLBerla
Commits
573c0456
Commit
573c0456
authored
Jan 09, 2019
by
Sebastian Eibl
Browse files
add statistics about communication partners
parent
f901b60d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/core/mpi/BufferSystem.cpp
View file @
573c0456
...
...
@@ -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
;
}
...
...
src/core/mpi/BufferSystem.h
View file @
573c0456
...
...
@@ -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
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment