Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
solverstack
ScalFMM
Commits
e56468ff
Commit
e56468ff
authored
Mar 05, 2012
by
BRAMAS Berenger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print the time elapsed at each level in sequential and threaded fmm
parent
5b105537
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
65 additions
and
3 deletions
+65
-3
Src/Core/FFmmAlgorithm.hpp
Src/Core/FFmmAlgorithm.hpp
+13
-1
Src/Core/FFmmAlgorithmPeriodic.hpp
Src/Core/FFmmAlgorithmPeriodic.hpp
+10
-0
Src/Core/FFmmAlgorithmTask.hpp
Src/Core/FFmmAlgorithmTask.hpp
+6
-0
Src/Core/FFmmAlgorithmThread.hpp
Src/Core/FFmmAlgorithmThread.hpp
+8
-2
Src/Core/FFmmAlgorithmThreadProc.hpp
Src/Core/FFmmAlgorithmThreadProc.hpp
+4
-0
Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp
Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp
+4
-0
Src/Core/FFmmAlgorithmThreadTsm.hpp
Src/Core/FFmmAlgorithmThreadTsm.hpp
+10
-0
Src/Core/FFmmAlgorithmTsm.hpp
Src/Core/FFmmAlgorithmTsm.hpp
+10
-0
No files found.
Src/Core/FFmmAlgorithm.hpp
View file @
e56468ff
...
...
@@ -126,6 +126,8 @@ private:
// for each levels
for
(
int
idxLevel
=
OctreeHeight
-
2
;
idxLevel
>
1
;
--
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
// for each cells
do
{
// We need the current cell and the child
...
...
@@ -136,7 +138,9 @@ private:
}
while
(
octreeIterator
.
moveRight
());
avoidGotoLeftIterator
.
moveUp
();
octreeIterator
=
avoidGotoLeftIterator
;
// equal octreeIterator.moveUp(); octreeIterator.gotoLeft();
octreeIterator
=
avoidGotoLeftIterator
;
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
...
...
@@ -165,6 +169,8 @@ private:
// for each levels
for
(
int
idxLevel
=
2
;
idxLevel
<
OctreeHeight
;
++
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
// for each cells
do
{
const
int
counter
=
tree
->
getInteractionNeighbors
(
neighbors
,
octreeIterator
.
getCurrentGlobalCoordinate
(),
idxLevel
);
...
...
@@ -179,6 +185,8 @@ private:
avoidGotoLeftIterator
.
moveDown
();
octreeIterator
=
avoidGotoLeftIterator
;
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
FDEBUG
(
FDebug
::
Controller
<<
"
\t
Finished (@Downward Pass (M2L) = "
<<
counterTime
.
tacAndElapsed
()
<<
"s)
\n
"
);
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
Computation : "
<<
computationCounter
.
cumulated
()
<<
" s
\n
"
);
...
...
@@ -203,6 +211,8 @@ private:
const
int
heightMinusOne
=
OctreeHeight
-
1
;
// for each levels exepted leaf level
for
(
int
idxLevel
=
2
;
idxLevel
<
heightMinusOne
;
++
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
// for each cells
do
{
FDEBUG
(
computationCounter
.
tic
());
...
...
@@ -212,6 +222,8 @@ private:
avoidGotoLeftIterator
.
moveDown
();
octreeIterator
=
avoidGotoLeftIterator
;
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
FDEBUG
(
FDebug
::
Controller
<<
"
\t
Finished (@Downward Pass (L2L) = "
<<
counterTime
.
tacAndElapsed
()
<<
"s)
\n
"
);
...
...
Src/Core/FFmmAlgorithmPeriodic.hpp
View file @
e56468ff
...
...
@@ -129,6 +129,7 @@ public:
// for each levels
for
(
int
idxLevel
=
OctreeHeight
-
2
;
idxLevel
>
0
;
--
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
// for each cells
do
{
// We need the current cell and the child
...
...
@@ -140,6 +141,7 @@ public:
avoidGotoLeftIterator
.
moveUp
();
octreeIterator
=
avoidGotoLeftIterator
;
// equal octreeIterator.moveUp(); octreeIterator.gotoLeft();
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
...
...
@@ -166,6 +168,7 @@ public:
// for each levels
for
(
int
idxLevel
=
1
;
idxLevel
<
OctreeHeight
;
++
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
// for each cells
do
{
const
int
counter
=
tree
->
getPeriodicInteractionNeighbors
(
neighbors
,
octreeIterator
.
getCurrentGlobalCoordinate
(),
idxLevel
);
...
...
@@ -175,6 +178,11 @@ public:
}
while
(
octreeIterator
.
moveRight
());
avoidGotoLeftIterator
.
moveDown
();
octreeIterator
=
avoidGotoLeftIterator
;
FDEBUG
(
computationCounter
.
tic
());
kernels
->
finishedLevelM2L
(
idxLevel
);
FDEBUG
(
computationCounter
.
tac
());
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
FDEBUG
(
FDebug
::
Controller
<<
"
\t
Finished (@Downward Pass (M2L) = "
<<
counterTime
.
tacAndElapsed
()
<<
"s)
\n
"
);
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
Computation : "
<<
computationCounter
.
cumulated
()
<<
" s
\n
"
);
...
...
@@ -197,6 +205,7 @@ public:
const
int
heightMinusOne
=
OctreeHeight
-
1
;
// for each levels exepted leaf level
for
(
int
idxLevel
=
1
;
idxLevel
<
heightMinusOne
;
++
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
// for each cells
do
{
FDEBUG
(
computationCounter
.
tic
());
...
...
@@ -206,6 +215,7 @@ public:
avoidGotoLeftIterator
.
moveDown
();
octreeIterator
=
avoidGotoLeftIterator
;
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
FDEBUG
(
FDebug
::
Controller
<<
"
\t
Finished (@Downward Pass (L2L) = "
<<
counterTime
.
tacAndElapsed
()
<<
"s)
\n
"
);
...
...
Src/Core/FFmmAlgorithmTask.hpp
View file @
e56468ff
...
...
@@ -149,6 +149,7 @@ private:
// for each levels
for
(
int
idxLevel
=
OctreeHeight
-
2
;
idxLevel
>
1
;
--
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
// for each cells
do
{
// We need the current cell and the child
...
...
@@ -163,6 +164,7 @@ private:
octreeIterator
=
avoidGotoLeftIterator
;
// equal octreeIterator.moveUp(); octreeIterator.gotoLeft();
#pragma omp taskwait
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
}
}
...
...
@@ -195,6 +197,7 @@ private:
// for each levels
for
(
int
idxLevel
=
2
;
idxLevel
<
OctreeHeight
;
++
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
// for each cells
do
{
const
int
counter
=
tree
->
getInteractionNeighbors
(
neighbors
,
octreeIterator
.
getCurrentGlobalCoordinate
(),
idxLevel
);
...
...
@@ -219,6 +222,7 @@ private:
}
#pragma omp taskwait
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
}
}
...
...
@@ -246,6 +250,7 @@ private:
const
int
heightMinusOne
=
OctreeHeight
-
1
;
// for each levels exepted leaf level
for
(
int
idxLevel
=
2
;
idxLevel
<
heightMinusOne
;
++
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
// for each cells
do
{
#pragma omp task
...
...
@@ -259,6 +264,7 @@ private:
octreeIterator
=
avoidGotoLeftIterator
;
#pragma omp taskwait
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
}
}
...
...
Src/Core/FFmmAlgorithmThread.hpp
View file @
e56468ff
...
...
@@ -176,6 +176,7 @@ private:
// for each levels
for
(
int
idxLevel
=
OctreeHeight
-
2
;
idxLevel
>
1
;
--
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
int
numberOfCells
=
0
;
// for each cells
do
{
...
...
@@ -186,10 +187,10 @@ private:
octreeIterator
=
avoidGotoLeftIterator
;
// equal octreeIterator.moveUp(); octreeIterator.gotoLeft();
FDEBUG
(
computationCounter
.
tic
());
#pragma omp parallel
#pragma omp parallel
{
KernelClass
*
const
myThreadkernels
=
kernels
[
omp_get_thread_num
()];
#pragma omp for nowait
#pragma omp for nowait
for
(
int
idxCell
=
0
;
idxCell
<
numberOfCells
;
++
idxCell
){
// We need the current cell and the child
// child is an array (of 8 child) that may be null
...
...
@@ -198,6 +199,7 @@ private:
}
FDEBUG
(
computationCounter
.
tac
());
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
...
...
@@ -224,6 +226,7 @@ private:
// for each levels
for
(
int
idxLevel
=
2
;
idxLevel
<
OctreeHeight
;
++
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
int
numberOfCells
=
0
;
// for each cells
do
{
...
...
@@ -250,6 +253,7 @@ private:
FDEBUG
(
computationCounter
.
tac
());
}
FDEBUG
(
computationCounter
.
tac
());
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
FDEBUG
(
FDebug
::
Controller
<<
"
\t
Finished (@Downward Pass (M2L) = "
<<
counterTime
.
tacAndElapsed
()
<<
"s)
\n
"
);
...
...
@@ -275,6 +279,7 @@ private:
const
int
heightMinusOne
=
OctreeHeight
-
1
;
// for each levels exepted leaf level
for
(
int
idxLevel
=
2
;
idxLevel
<
heightMinusOne
;
++
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
int
numberOfCells
=
0
;
// for each cells
do
{
...
...
@@ -294,6 +299,7 @@ private:
}
}
FDEBUG
(
computationCounter
.
tac
());
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
FDEBUG
(
FDebug
::
Controller
<<
"
\t
Finished (@Downward Pass (L2L) = "
<<
counterTime
.
tacAndElapsed
()
<<
"s)
\n
"
);
...
...
Src/Core/FFmmAlgorithmThreadProc.hpp
View file @
e56468ff
...
...
@@ -641,6 +641,8 @@ private:
const
int
counter
=
tree
->
getInteractionNeighbors
(
neighbors
,
iterArray
[
idxCell
].
getCurrentGlobalCoordinate
(),
idxLevel
);
if
(
counter
)
myThreadkernels
->
M2L
(
iterArray
[
idxCell
].
getCurrentCell
()
,
neighbors
,
counter
,
idxLevel
);
}
myThreadkernels
->
finishedLevelM2L
(
idxLevel
);
}
FDEBUG
(
computationCounter
.
tac
());
}
...
...
@@ -744,6 +746,8 @@ private:
myThreadkernels
->
M2L
(
iterArray
[
idxCell
].
getCurrentCell
()
,
neighbors
,
counter
,
idxLevel
);
}
}
myThreadkernels
->
finishedLevelM2L
(
idxLevel
);
}
FDEBUG
(
computationCounter
.
tac
());
}
...
...
Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp
View file @
e56468ff
...
...
@@ -715,6 +715,8 @@ private:
const
int
counter
=
tree
->
getPeriodicInteractionNeighbors
(
neighbors
,
iterArray
[
idxCell
].
getCurrentGlobalCoordinate
(),
idxLevel
);
if
(
counter
)
myThreadkernels
->
M2L
(
iterArray
[
idxCell
].
getCurrentCell
()
,
neighbors
,
counter
,
idxLevel
);
}
myThreadkernels
->
finishedLevelM2L
(
idxLevel
);
}
FDEBUG
(
computationCounter
.
tac
());
}
...
...
@@ -818,6 +820,8 @@ private:
myThreadkernels
->
M2L
(
iterArray
[
idxCell
].
getCurrentCell
()
,
neighbors
,
counter
,
idxLevel
);
}
}
myThreadkernels
->
finishedLevelM2L
(
idxLevel
);
}
FDEBUG
(
computationCounter
.
tac
());
}
...
...
Src/Core/FFmmAlgorithmThreadTsm.hpp
View file @
e56468ff
...
...
@@ -167,6 +167,7 @@ public:
// for each levels
for
(
int
idxLevel
=
OctreeHeight
-
2
;
idxLevel
>
1
;
--
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
int
numberOfCells
=
0
;
// for each cells
do
{
...
...
@@ -203,6 +204,7 @@ public:
}
}
FDEBUG
(
computationCounter
.
tac
());
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
FDEBUG
(
counterTime
.
tac
()
);
...
...
@@ -225,6 +227,7 @@ public:
// for each levels
for
(
int
idxLevel
=
2
;
idxLevel
<
OctreeHeight
;
++
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
int
numberOfCells
=
0
;
// for each cells
do
{
...
...
@@ -261,8 +264,13 @@ public:
}
}
}
FDEBUG
(
computationCounter
.
tic
());
myThreadkernels
->
finishedLevelM2L
(
idxLevel
);
FDEBUG
(
computationCounter
.
tac
());
}
FDEBUG
(
computationCounter
.
tac
());
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
FDEBUG
(
FDebug
::
Controller
<<
"
\t
Finished (@Downward Pass (M2L) = "
<<
counterTime
.
tacAndElapsed
()
<<
"s)
\n
"
);
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
Computation : "
<<
computationCounter
.
cumulated
()
<<
" s
\n
"
);
...
...
@@ -284,6 +292,7 @@ public:
const
int
heightMinusOne
=
OctreeHeight
-
1
;
// for each levels exepted leaf level
for
(
int
idxLevel
=
2
;
idxLevel
<
heightMinusOne
;
++
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
int
numberOfCells
=
0
;
// for each cells
do
{
...
...
@@ -314,6 +323,7 @@ public:
}
}
FDEBUG
(
computationCounter
.
tac
());
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
FDEBUG
(
FDebug
::
Controller
<<
"
\t
Finished (@Downward Pass (L2L) = "
<<
counterTime
.
tacAndElapsed
()
<<
"s)
\n
"
);
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
Computation : "
<<
computationCounter
.
cumulated
()
<<
" s
\n
"
);
...
...
Src/Core/FFmmAlgorithmTsm.hpp
View file @
e56468ff
...
...
@@ -131,6 +131,7 @@ public:
// for each levels
for
(
int
idxLevel
=
OctreeHeight
-
2
;
idxLevel
>
1
;
--
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
// for each cells
do
{
// We need the current cell and the child
...
...
@@ -160,6 +161,7 @@ public:
avoidGotoLeftIterator
.
moveUp
();
octreeIterator
=
avoidGotoLeftIterator
;
// equal octreeIterator.moveUp(); octreeIterator.gotoLeft();
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
FDEBUG
(
counterTime
.
tac
()
);
...
...
@@ -184,6 +186,7 @@ public:
// for each levels
for
(
int
idxLevel
=
2
;
idxLevel
<
OctreeHeight
;
++
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
// for each cells
do
{
FDEBUG
(
computationCounter
.
tic
());
...
...
@@ -209,8 +212,13 @@ public:
FDEBUG
(
totalComputation
+=
computationCounter
.
elapsed
());
}
while
(
octreeIterator
.
moveRight
());
FDEBUG
(
computationCounter
.
tic
());
kernels
->
finishedLevelM2L
(
idxLevel
);
FDEBUG
(
computationCounter
.
tac
());
avoidGotoLeftIterator
.
moveDown
();
octreeIterator
=
avoidGotoLeftIterator
;
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
FDEBUG
(
counterTime
.
tac
()
);
...
...
@@ -232,6 +240,7 @@ public:
const
int
heightMinusOne
=
OctreeHeight
-
1
;
// for each levels exepted leaf level
for
(
int
idxLevel
=
2
;
idxLevel
<
heightMinusOne
;
++
idxLevel
){
FDEBUG
(
FTic
counterTimeLevel
);
// for each cells
do
{
FDEBUG
(
computationCounter
.
tic
());
...
...
@@ -253,6 +262,7 @@ public:
avoidGotoLeftIterator
.
moveDown
();
octreeIterator
=
avoidGotoLeftIterator
;
FDEBUG
(
FDebug
::
Controller
<<
"
\t\t
>> Level "
<<
idxLevel
<<
" = "
<<
counterTimeLevel
.
tacAndElapsed
()
<<
"s
\n
"
);
}
FDEBUG
(
counterTime
.
tac
()
);
...
...
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