Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ScalFMM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
solverstack
ScalFMM
Commits
4ff2da85
Commit
4ff2da85
authored
11 years ago
by
BRAMAS Berenger
Browse files
Options
Downloads
Patches
Plain Diff
debug blocked tree and seq algorithm
parent
9debea45
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Src/GroupTree/FGroupOfParticles.hpp
+1
-1
1 addition, 1 deletion
Src/GroupTree/FGroupOfParticles.hpp
Src/GroupTree/FGroupSeqAlgorithm.hpp
+20
-6
20 additions, 6 deletions
Src/GroupTree/FGroupSeqAlgorithm.hpp
Tests/Kernels/testBlockedTree.cpp
+2
-2
2 additions, 2 deletions
Tests/Kernels/testBlockedTree.cpp
with
23 additions
and
9 deletions
Src/GroupTree/FGroupOfParticles.hpp
+
1
−
1
View file @
4ff2da85
...
@@ -52,7 +52,7 @@ protected:
...
@@ -52,7 +52,7 @@ protected:
size_t
attributeOffset
;
size_t
attributeOffset
;
//< This value is for not used leaves
//< This value is for not used leaves
static
const
MortonIndex
LeafIsEmptyFlag
=
-
1
;
static
const
int
LeafIsEmptyFlag
=
-
1
;
public
:
public
:
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Src/GroupTree/FGroupSeqAlgorithm.hpp
+
20
−
6
View file @
4ff2da85
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
#include
"../Core/FCoreCommon.hpp"
#include
"../Core/FCoreCommon.hpp"
#include
"../Utils/FQuickSort.hpp"
#include
"../Utils/FQuickSort.hpp"
#include
"../Containers/FTreeCoordinate.hpp"
#include
"../Containers/FTreeCoordinate.hpp"
#include
"../Utils/FLog.hpp"
#include
"../Utils/FTic.hpp"
#include
<list>
#include
<list>
#include
<vector>
#include
<vector>
...
@@ -38,6 +40,8 @@ public:
...
@@ -38,6 +40,8 @@ public:
}
}
void
execute
(
const
unsigned
operationsToProceed
=
FFmmNearAndFarFields
){
void
execute
(
const
unsigned
operationsToProceed
=
FFmmNearAndFarFields
){
FLOG
(
FLog
::
Controller
<<
"
\t
Start FGroupSeqAlgorithm
\n
"
);
if
(
operationsToProceed
&
FFmmP2M
)
bottomPass
();
if
(
operationsToProceed
&
FFmmP2M
)
bottomPass
();
if
(
operationsToProceed
&
FFmmM2M
)
upwardPass
();
if
(
operationsToProceed
&
FFmmM2M
)
upwardPass
();
...
@@ -51,6 +55,7 @@ public:
...
@@ -51,6 +55,7 @@ public:
protected
:
protected
:
void
bottomPass
(){
void
bottomPass
(){
FLOG
(
FTic
timer
;
);
typename
std
::
list
<
ParticleGroupClass
*>::
iterator
iterParticles
=
tree
->
leavesBegin
();
typename
std
::
list
<
ParticleGroupClass
*>::
iterator
iterParticles
=
tree
->
leavesBegin
();
const
typename
std
::
list
<
ParticleGroupClass
*>::
iterator
endParticles
=
tree
->
leavesEnd
();
const
typename
std
::
list
<
ParticleGroupClass
*>::
iterator
endParticles
=
tree
->
leavesEnd
();
...
@@ -77,9 +82,11 @@ protected:
...
@@ -77,9 +82,11 @@ protected:
}
}
FAssertLF
(
iterParticles
==
endParticles
&&
iterCells
==
endCells
);
FAssertLF
(
iterParticles
==
endParticles
&&
iterCells
==
endCells
);
FLOG
(
FLog
::
Controller
<<
"
\t\t
bottomPass in "
<<
timer
.
tacAndElapsed
()
<<
"s
\n
"
);
}
}
void
upwardPass
(){
void
upwardPass
(){
FLOG
(
FTic
timer
;
);
for
(
int
idxLevel
=
tree
->
getHeight
()
-
2
;
idxLevel
>=
2
;
--
idxLevel
){
for
(
int
idxLevel
=
tree
->
getHeight
()
-
2
;
idxLevel
>=
2
;
--
idxLevel
){
typename
std
::
list
<
CellContainerClass
*>::
iterator
iterCells
=
tree
->
cellsBegin
(
idxLevel
);
typename
std
::
list
<
CellContainerClass
*>::
iterator
iterCells
=
tree
->
cellsBegin
(
idxLevel
);
const
typename
std
::
list
<
CellContainerClass
*>::
iterator
endCells
=
tree
->
cellsEnd
(
idxLevel
);
const
typename
std
::
list
<
CellContainerClass
*>::
iterator
endCells
=
tree
->
cellsEnd
(
idxLevel
);
...
@@ -117,9 +124,11 @@ protected:
...
@@ -117,9 +124,11 @@ protected:
FAssertLF
(
iterCells
==
endCells
&&
(
iterChildCells
==
endChildCells
||
(
++
iterChildCells
)
==
endChildCells
));
FAssertLF
(
iterCells
==
endCells
&&
(
iterChildCells
==
endChildCells
||
(
++
iterChildCells
)
==
endChildCells
));
}
}
FLOG
(
FLog
::
Controller
<<
"
\t\t
upwardPass in "
<<
timer
.
tacAndElapsed
()
<<
"s
\n
"
);
}
}
void
transferPass
(){
void
transferPass
(){
FLOG
(
FTic
timer
;
);
for
(
int
idxLevel
=
tree
->
getHeight
()
-
1
;
idxLevel
>=
2
;
--
idxLevel
){
for
(
int
idxLevel
=
tree
->
getHeight
()
-
1
;
idxLevel
>=
2
;
--
idxLevel
){
typename
std
::
list
<
CellContainerClass
*>::
iterator
iterCells
=
tree
->
cellsBegin
(
idxLevel
);
typename
std
::
list
<
CellContainerClass
*>::
iterator
iterCells
=
tree
->
cellsBegin
(
idxLevel
);
const
typename
std
::
list
<
CellContainerClass
*>::
iterator
endCells
=
tree
->
cellsEnd
(
idxLevel
);
const
typename
std
::
list
<
CellContainerClass
*>::
iterator
endCells
=
tree
->
cellsEnd
(
idxLevel
);
...
@@ -151,7 +160,7 @@ protected:
...
@@ -151,7 +160,7 @@ protected:
counterExistingCell
+=
1
;
counterExistingCell
+=
1
;
}
}
}
}
else
if
(
interactions
Position
[
idxInter
]
<
343
/
2
){
else
if
(
interactions
Indexes
[
idxInter
]
<
mindex
){
OutOfBlockInteraction
property
;
OutOfBlockInteraction
property
;
property
.
insideIndex
=
mindex
;
property
.
insideIndex
=
mindex
;
property
.
outIndex
=
interactionsIndexes
[
idxInter
];
property
.
outIndex
=
interactionsIndexes
[
idxInter
];
...
@@ -179,7 +188,7 @@ protected:
...
@@ -179,7 +188,7 @@ protected:
currentOutInteraction
+=
1
;
currentOutInteraction
+=
1
;
}
}
int
lastOutInteraction
=
currentOutInteraction
+
1
;
int
lastOutInteraction
=
currentOutInteraction
;
while
(
lastOutInteraction
<
int
(
outsideInteractions
.
size
())
&&
outsideInteractions
[
lastOutInteraction
].
outIndex
<
blockEndIdx
){
while
(
lastOutInteraction
<
int
(
outsideInteractions
.
size
())
&&
outsideInteractions
[
lastOutInteraction
].
outIndex
<
blockEndIdx
){
lastOutInteraction
+=
1
;
lastOutInteraction
+=
1
;
}
}
...
@@ -211,9 +220,11 @@ protected:
...
@@ -211,9 +220,11 @@ protected:
}
}
}
}
FLOG
(
FLog
::
Controller
<<
"
\t\t
transferPass in "
<<
timer
.
tacAndElapsed
()
<<
"s
\n
"
);
}
}
void
downardPass
(){
void
downardPass
(){
FLOG
(
FTic
timer
;
);
for
(
int
idxLevel
=
2
;
idxLevel
<=
tree
->
getHeight
()
-
2
;
++
idxLevel
){
for
(
int
idxLevel
=
2
;
idxLevel
<=
tree
->
getHeight
()
-
2
;
++
idxLevel
){
typename
std
::
list
<
CellContainerClass
*>::
iterator
iterCells
=
tree
->
cellsBegin
(
idxLevel
);
typename
std
::
list
<
CellContainerClass
*>::
iterator
iterCells
=
tree
->
cellsBegin
(
idxLevel
);
const
typename
std
::
list
<
CellContainerClass
*>::
iterator
endCells
=
tree
->
cellsEnd
(
idxLevel
);
const
typename
std
::
list
<
CellContainerClass
*>::
iterator
endCells
=
tree
->
cellsEnd
(
idxLevel
);
...
@@ -251,9 +262,11 @@ protected:
...
@@ -251,9 +262,11 @@ protected:
FAssertLF
(
iterCells
==
endCells
&&
(
iterChildCells
==
endChildCells
||
(
++
iterChildCells
)
==
endChildCells
));
FAssertLF
(
iterCells
==
endCells
&&
(
iterChildCells
==
endChildCells
||
(
++
iterChildCells
)
==
endChildCells
));
}
}
FLOG
(
FLog
::
Controller
<<
"
\t\t
downardPass in "
<<
timer
.
tacAndElapsed
()
<<
"s
\n
"
);
}
}
void
directPass
(){
void
directPass
(){
FLOG
(
FTic
timer
;
);
{
{
typename
std
::
list
<
ParticleGroupClass
*>::
iterator
iterParticles
=
tree
->
leavesBegin
();
typename
std
::
list
<
ParticleGroupClass
*>::
iterator
iterParticles
=
tree
->
leavesBegin
();
const
typename
std
::
list
<
ParticleGroupClass
*>::
iterator
endParticles
=
tree
->
leavesEnd
();
const
typename
std
::
list
<
ParticleGroupClass
*>::
iterator
endParticles
=
tree
->
leavesEnd
();
...
@@ -303,7 +316,7 @@ protected:
...
@@ -303,7 +316,7 @@ protected:
ParticleContainerClass
interactionsObjects
[
27
];
ParticleContainerClass
interactionsObjects
[
27
];
ParticleContainerClass
*
interactions
[
27
];
ParticleContainerClass
*
interactions
[
27
];
memset
(
interactions
,
0
,
27
*
sizeof
(
Cell
Class
*
));
memset
(
interactions
,
0
,
27
*
sizeof
(
ParticleContainer
Class
*
));
int
counterExistingCell
=
0
;
int
counterExistingCell
=
0
;
for
(
int
idxInter
=
0
;
idxInter
<
counter
;
++
idxInter
){
for
(
int
idxInter
=
0
;
idxInter
<
counter
;
++
idxInter
){
...
@@ -314,7 +327,7 @@ protected:
...
@@ -314,7 +327,7 @@ protected:
counterExistingCell
+=
1
;
counterExistingCell
+=
1
;
}
}
}
}
else
if
(
interactions
Position
[
idxInter
]
<
27
/
2
){
else
if
(
interactions
Indexes
[
idxInter
]
<
mindex
){
OutOfBlockInteraction
property
;
OutOfBlockInteraction
property
;
property
.
insideIndex
=
mindex
;
property
.
insideIndex
=
mindex
;
property
.
outIndex
=
interactionsIndexes
[
idxInter
];
property
.
outIndex
=
interactionsIndexes
[
idxInter
];
...
@@ -342,7 +355,7 @@ protected:
...
@@ -342,7 +355,7 @@ protected:
currentOutInteraction
+=
1
;
currentOutInteraction
+=
1
;
}
}
int
lastOutInteraction
=
currentOutInteraction
+
1
;
int
lastOutInteraction
=
currentOutInteraction
;
while
(
lastOutInteraction
<
int
(
outsideInteractions
.
size
())
&&
outsideInteractions
[
lastOutInteraction
].
outIndex
<
blockEndIdx
){
while
(
lastOutInteraction
<
int
(
outsideInteractions
.
size
())
&&
outsideInteractions
[
lastOutInteraction
].
outIndex
<
blockEndIdx
){
lastOutInteraction
+=
1
;
lastOutInteraction
+=
1
;
}
}
...
@@ -354,7 +367,7 @@ protected:
...
@@ -354,7 +367,7 @@ protected:
ParticleContainerClass
particles
=
(
*
iterParticles
)
->
template
getLeaf
<
ParticleContainerClass
>(
outsideInteractions
[
outInterIdx
].
insideIndex
);
ParticleContainerClass
particles
=
(
*
iterParticles
)
->
template
getLeaf
<
ParticleContainerClass
>(
outsideInteractions
[
outInterIdx
].
insideIndex
);
FAssertLF
(
particles
.
isAttachedToSomething
());
FAssertLF
(
particles
.
isAttachedToSomething
());
ParticleContainerClass
*
interactions
[
27
];
ParticleContainerClass
*
interactions
[
27
];
memset
(
interactions
,
0
,
27
*
sizeof
(
Cell
Class
*
));
memset
(
interactions
,
0
,
27
*
sizeof
(
ParticleContainer
Class
*
));
interactions
[
outsideInteractions
[
outInterIdx
].
outPosition
]
=
&
interParticles
;
interactions
[
outsideInteractions
[
outInterIdx
].
outPosition
]
=
&
interParticles
;
const
int
counter
=
1
;
const
int
counter
=
1
;
kernels
->
P2PRemote
(
FTreeCoordinate
(
outsideInteractions
[
outInterIdx
].
insideIndex
,
tree
->
getHeight
()
-
1
),
&
particles
,
&
particles
,
interactions
,
counter
);
kernels
->
P2PRemote
(
FTreeCoordinate
(
outsideInteractions
[
outInterIdx
].
insideIndex
,
tree
->
getHeight
()
-
1
),
&
particles
,
&
particles
,
interactions
,
counter
);
...
@@ -373,6 +386,7 @@ protected:
...
@@ -373,6 +386,7 @@ protected:
++
iterParticles
;
++
iterParticles
;
}
}
}
}
FLOG
(
FLog
::
Controller
<<
"
\t\t
directPass in "
<<
timer
.
tacAndElapsed
()
<<
"s
\n
"
);
}
}
int
getOppositeNeighIndex
(
const
int
index
)
const
{
int
getOppositeNeighIndex
(
const
int
index
)
const
{
...
...
This diff is collapsed.
Click to expand it.
Tests/Kernels/testBlockedTree.cpp
+
2
−
2
View file @
4ff2da85
...
@@ -27,13 +27,13 @@
...
@@ -27,13 +27,13 @@
#include
"../../Src/GroupTree/FP2PGroupParticleContainer.hpp"
#include
"../../Src/GroupTree/FP2PGroupParticleContainer.hpp"
int
main
(
int
argc
,
char
*
argv
[]){
int
main
(
int
argc
,
char
*
argv
[]){
static
const
int
P
=
9
;
static
const
int
P
=
3
;
typedef
FRotationCell
<
P
>
CellClass
;
typedef
FRotationCell
<
P
>
CellClass
;
typedef
FP2PParticleContainer
<>
ContainerClass
;
typedef
FP2PParticleContainer
<>
ContainerClass
;
typedef
FSimpleLeaf
<
ContainerClass
>
LeafClass
;
typedef
FSimpleLeaf
<
ContainerClass
>
LeafClass
;
typedef
FOctree
<
CellClass
,
ContainerClass
,
LeafClass
>
OctreeClass
;
typedef
FOctree
<
CellClass
,
ContainerClass
,
LeafClass
>
OctreeClass
;
typedef
FGroupTree
<
CellClass
,
FP2PGroupParticleContainer
<>
,
4
,
FReal
>
GroupOctreeClass
;
typedef
FGroupTree
<
CellClass
,
FP2PGroupParticleContainer
<>
,
5
,
FReal
>
GroupOctreeClass
;
FTic
counter
;
FTic
counter
;
const
int
NbLevels
=
FParameters
::
getValue
(
argc
,
argv
,
"-h"
,
5
);
const
int
NbLevels
=
FParameters
::
getValue
(
argc
,
argv
,
"-h"
,
5
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment