Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
SWE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
SWE
Commits
7d1fe74a
Commit
7d1fe74a
authored
Dec 04, 2012
by
Sebastian Rettenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CPU-Communication time should messure CPU AND communication
parent
16ef1d89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
swe_mpi.cpp
src/examples/swe_mpi.cpp
+8
-7
No files found.
src/examples/swe_mpi.cpp
View file @
7d1fe74a
...
@@ -432,8 +432,7 @@ int main( int argc, char** argv ) {
...
@@ -432,8 +432,7 @@ int main( int argc, char** argv ) {
l_topNeighborRank
,
l_topInflow
,
l_topOutflow
,
l_topNeighborRank
,
l_topInflow
,
l_topOutflow
,
l_mpiRow
);
l_mpiRow
);
// update communication time and reset the cpu clock
// reset the cpu clock
tools
::
Logger
::
logger
.
updateCpuCommunicationTime
();
tools
::
Logger
::
logger
.
resetCpuClockToCurrentTime
();
tools
::
Logger
::
logger
.
resetCpuClockToCurrentTime
();
// set values in ghost cells
// set values in ghost cells
...
@@ -445,9 +444,8 @@ int main( int argc, char** argv ) {
...
@@ -445,9 +444,8 @@ int main( int argc, char** argv ) {
//! maximum allowed time step width within a block.
//! maximum allowed time step width within a block.
float
l_maxTimeStepWidth
=
l_wavePropgationBlock
.
getMaxTimestep
();
float
l_maxTimeStepWidth
=
l_wavePropgationBlock
.
getMaxTimestep
();
// update the cpu time in the logger
and reset communication time
// update the cpu time in the logger
tools
::
Logger
::
logger
.
updateCpuTime
();
tools
::
Logger
::
logger
.
updateCpuTime
();
tools
::
Logger
::
logger
.
resetCpuCommunicationClockToCurrentTime
();
//! maximum allowed time steps of all blocks
//! maximum allowed time steps of all blocks
float
l_maxTimeStepWidthGlobal
;
float
l_maxTimeStepWidthGlobal
;
...
@@ -455,15 +453,15 @@ int main( int argc, char** argv ) {
...
@@ -455,15 +453,15 @@ int main( int argc, char** argv ) {
// determine smallest time step of all blocks
// determine smallest time step of all blocks
MPI_Allreduce
(
&
l_maxTimeStepWidth
,
&
l_maxTimeStepWidthGlobal
,
1
,
MPI_FLOAT
,
MPI_MIN
,
MPI_COMM_WORLD
);
MPI_Allreduce
(
&
l_maxTimeStepWidth
,
&
l_maxTimeStepWidthGlobal
,
1
,
MPI_FLOAT
,
MPI_MIN
,
MPI_COMM_WORLD
);
// update the communication time and reset the cpu time
// reset the cpu time
tools
::
Logger
::
logger
.
updateCpuCommunicationTime
();
tools
::
Logger
::
logger
.
resetCpuClockToCurrentTime
();
tools
::
Logger
::
logger
.
resetCpuClockToCurrentTime
();
// update the cell values
// update the cell values
l_wavePropgationBlock
.
updateUnknowns
(
l_maxTimeStepWidthGlobal
);
l_wavePropgationBlock
.
updateUnknowns
(
l_maxTimeStepWidthGlobal
);
// update the cpu time in the logger
// update the cpu
and CPU-communication
time in the logger
tools
::
Logger
::
logger
.
updateCpuTime
();
tools
::
Logger
::
logger
.
updateCpuTime
();
tools
::
Logger
::
logger
.
updateCpuCommunicationTime
();
// update simulation time with time step width.
// update simulation time with time step width.
l_t
+=
l_maxTimeStepWidthGlobal
;
l_t
+=
l_maxTimeStepWidthGlobal
;
...
@@ -503,6 +501,9 @@ int main( int argc, char** argv ) {
...
@@ -503,6 +501,9 @@ int main( int argc, char** argv ) {
// print the cpu time
// print the cpu time
tools
::
Logger
::
logger
.
printCpuTime
(
"CPU time"
);
tools
::
Logger
::
logger
.
printCpuTime
(
"CPU time"
);
// print CPU + Communication time
tools
::
Logger
::
logger
.
printCpuCommunicationTime
();
// print the wall clock time (includes plotting)
// print the wall clock time (includes plotting)
tools
::
Logger
::
logger
.
printWallClockTime
(
time
(
NULL
));
tools
::
Logger
::
logger
.
printWallClockTime
(
time
(
NULL
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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