Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
dc1809b4
Commit
dc1809b4
authored
Aug 17, 2015
by
BRAMAS Berenger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update the transfer pass with or without finalize
parent
b078ac09
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
73 additions
and
20 deletions
+73
-20
Src/Components/FAbstractKernels.hpp
Src/Components/FAbstractKernels.hpp
+1
-1
Src/Core/FFmmAlgorithmOmp4.hpp
Src/Core/FFmmAlgorithmOmp4.hpp
+2
-0
Src/Core/FFmmAlgorithmSectionTask.hpp
Src/Core/FFmmAlgorithmSectionTask.hpp
+50
-4
Src/Core/FFmmAlgorithmTask.hpp
Src/Core/FFmmAlgorithmTask.hpp
+17
-12
Src/Core/FFmmAlgorithmThreadProc.hpp
Src/Core/FFmmAlgorithmThreadProc.hpp
+1
-1
Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp
Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp
+1
-1
Src/Kernels/Spherical/FSphericalBlockBlasKernel.hpp
Src/Kernels/Spherical/FSphericalBlockBlasKernel.hpp
+1
-1
No files found.
Src/Components/FAbstractKernels.hpp
View file @
dc1809b4
...
...
@@ -77,7 +77,7 @@ public:
*
* @return false
*/
bool
n
eedFinishedM2LEvent
(){
constexpr
static
bool
N
eedFinishedM2LEvent
(){
return
false
;
}
/** This method can be optionally inherited
...
...
Src/Core/FFmmAlgorithmOmp4.hpp
View file @
dc1809b4
...
...
@@ -86,6 +86,8 @@ public:
FLOG
(
FLog
::
Controller
<<
"FFmmAlgorithmOmp4 (Max Thread "
<<
omp_get_max_threads
()
<<
")
\n
"
);
FAssertLF
(
KernelClass
::
NeedFinishedM2LEvent
()
==
false
,
"FFmmAlgorithmOmp4 cannot notify for M2L at level ending."
);
#ifdef OPENMP_SUPPORT_PRIORITY
size_t
nbLeaves
=
0
;
size_t
nbParticles
=
0
;
...
...
Src/Core/FFmmAlgorithmSectionTask.hpp
View file @
dc1809b4
...
...
@@ -190,7 +190,7 @@ protected:
do
{
// We need the current cell and the child
// child is an array (of 8 child) that may be null
#pragma omp task firstprivate(octreeIterator
) shared(
idxLevel)
#pragma omp task firstprivate(octreeIterator
,
idxLevel)
{
kernels
[
omp_get_thread_num
()]
->
M2M
(
octreeIterator
.
getCurrentCell
()
,
octreeIterator
.
getCurrentChild
(),
idxLevel
);
}
...
...
@@ -218,7 +218,12 @@ protected:
eztrace_start
();
#endif
this
->
transferPassWithFinalize
()
;
if
(
KernelClass
::
NeedFinishedM2LEvent
()){
this
->
transferPassWithFinalize
()
;
}
else
{
this
->
transferPassWithoutFinalize
()
;
}
#ifdef SCALFMM_USE_EZTRACE
eztrace_stop
();
#endif
...
...
@@ -246,7 +251,7 @@ protected:
do
{
const
int
counter
=
tree
->
getInteractionNeighbors
(
neighbors
,
octreeIterator
.
getCurrentGlobalCoordinate
(),
idxLevel
,
separationCriteria
);
if
(
counter
){
#pragma omp task firstprivate(octreeIterator, neighbors, counter
) shared(
idxLevel)
#pragma omp task firstprivate(octreeIterator, neighbors, counter
,
idxLevel)
{
kernels
[
omp_get_thread_num
()]
->
M2L
(
octreeIterator
.
getCurrentCell
()
,
neighbors
,
counter
,
idxLevel
);
}
...
...
@@ -273,6 +278,47 @@ protected:
FLOG
(
FLog
::
Controller
<<
"
\t
Finished (@Downward Pass (M2L) = "
<<
counterTime
.
tacAndElapsed
()
<<
" s)
\n
"
);
}
void
transferPassWithoutFinalize
(){
FLOG
(
FLog
::
Controller
.
write
(
"
\t
Start Downward Pass (M2L)
\n
"
).
write
(
FLog
::
Flush
);
);
FLOG
(
FTic
counterTime
);
const
CellClass
*
neighbors
[
343
];
typename
OctreeClass
::
Iterator
octreeIterator
(
tree
);
octreeIterator
.
moveDown
();
for
(
int
idxLevel
=
2
;
idxLevel
<
FAbstractAlgorithm
::
upperWorkingLevel
;
++
idxLevel
){
octreeIterator
.
moveDown
();
}
typename
OctreeClass
::
Iterator
avoidGotoLeftIterator
(
octreeIterator
);
//
// for each levels
for
(
int
idxLevel
=
FAbstractAlgorithm
::
upperWorkingLevel
;
idxLevel
<
FAbstractAlgorithm
::
lowerWorkingLevel
;
++
idxLevel
){
FLOG
(
FTic
counterTimeLevel
);
const
int
separationCriteria
=
(
idxLevel
!=
FAbstractAlgorithm
::
lowerWorkingLevel
-
1
?
1
:
leafLevelSeparationCriteria
);
// for each cells
do
{
const
int
counter
=
tree
->
getInteractionNeighbors
(
neighbors
,
octreeIterator
.
getCurrentGlobalCoordinate
(),
idxLevel
,
separationCriteria
);
if
(
counter
){
#pragma omp task firstprivate(octreeIterator, neighbors, counter,idxLevel)
{
kernels
[
omp_get_thread_num
()]
->
M2L
(
octreeIterator
.
getCurrentCell
()
,
neighbors
,
counter
,
idxLevel
);
}
}
}
while
(
octreeIterator
.
moveRight
());
avoidGotoLeftIterator
.
moveDown
();
octreeIterator
=
avoidGotoLeftIterator
;
}
#pragma omp taskwait
FLOG
(
FLog
::
Controller
<<
"
\t
Finished (@Downward Pass (M2L) = "
<<
counterTime
.
tacAndElapsed
()
<<
" s)
\n
"
);
}
/////////////////////////////////////////////////////////////////////////////
// Downward
/////////////////////////////////////////////////////////////////////////////
...
...
@@ -296,7 +342,7 @@ protected:
FLOG
(
FTic
counterTimeLevel
);
// for each cells
do
{
#pragma omp task firstprivate(octreeIterator
) shared(
idxLevel)
#pragma omp task firstprivate(octreeIterator
,
idxLevel)
{
kernels
[
omp_get_thread_num
()]
->
L2L
(
octreeIterator
.
getCurrentCell
()
,
octreeIterator
.
getCurrentChild
(),
idxLevel
);
}
...
...
Src/Core/FFmmAlgorithmTask.hpp
View file @
dc1809b4
...
...
@@ -209,18 +209,23 @@ protected:
/////////////////////////////////////////////////////////////////////////////
/** M2L */
void
transferPass
(){
#ifdef SCALFMM_USE_EZTRACE
eztrace_start
();
#endif
this
->
transferPassWithFinalize
()
;
#ifdef SCALFMM_USE_EZTRACE
eztrace_stop
();
#endif
}
void
transferPassWithOutFinalize
(){
void
transferPass
(){
#ifdef SCALFMM_USE_EZTRACE
eztrace_start
();
#endif
if
(
KernelClass
::
NeedFinishedM2LEvent
()){
this
->
transferPassWithFinalize
()
;
}
else
{
this
->
transferPassWithoutFinalize
()
;
}
#ifdef SCALFMM_USE_EZTRACE
eztrace_stop
();
#endif
}
void
transferPassWithoutFinalize
(){
FLOG
(
FLog
::
Controller
.
write
(
"
\t
Start Downward Pass (M2L)
\n
"
).
write
(
FLog
::
Flush
);
);
FLOG
(
FTic
counterTime
);
...
...
Src/Core/FFmmAlgorithmThreadProc.hpp
View file @
dc1809b4
...
...
@@ -859,7 +859,7 @@ protected:
#pragma omp taskwait
for
(
int
idxThread
=
0
;
idxThread
<
omp_get_num_threads
()
;
++
idxThread
){
#pragma omp task default(none) firstprivate(idxThread
) shared(
idxLevel)
#pragma omp task default(none) firstprivate(idxThread
,
idxLevel)
{
kernels
[
idxThread
]
->
finishedLevelM2L
(
idxLevel
);
}
...
...
Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp
View file @
dc1809b4
...
...
@@ -960,7 +960,7 @@ protected:
#pragma omp taskwait
for
(
int
idxThread
=
0
;
idxThread
<
omp_get_num_threads
()
;
++
idxThread
){
#pragma omp task default(none) firstprivate(idxThread
) shared(
idxLevel)
#pragma omp task default(none) firstprivate(idxThread
,
idxLevel)
{
kernels
[
idxThread
]
->
finishedLevelM2L
(
fackLevel
);
}
...
...
Src/Kernels/Spherical/FSphericalBlockBlasKernel.hpp
View file @
dc1809b4
...
...
@@ -189,7 +189,7 @@ public:
}
}
/** the needFinishedM2LEvent method is needed */
bool
n
eedFinishedM2LEvent
(){
constexpr
static
bool
N
eedFinishedM2LEvent
(){
return
true
;
}
/** Do we have some computation to do in the buffers */
...
...
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