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
Show more breadcrumbs
solverstack
ScalFMM
Commits
2397f7f9
Commit
2397f7f9
authored
10 years ago
by
BRAMAS Berenger
Browse files
Options
Downloads
Patches
Plain Diff
Move thread kernel inside the task to ensure correct value
parent
7ae8ff1a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Src/Core/FFmmAlgorithmThreadProc.hpp
+8
-9
8 additions, 9 deletions
Src/Core/FFmmAlgorithmThreadProc.hpp
with
8 additions
and
9 deletions
Src/Core/FFmmAlgorithmThreadProc.hpp
+
8
−
9
View file @
2397f7f9
...
@@ -685,10 +685,7 @@ private:
...
@@ -685,10 +685,7 @@ private:
// Do M2L
// Do M2L
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
KernelClass
*
const
myThreadkernels
=
kernels
[
omp_get_thread_num
()];
#pragma omp single nowait
const
CellClass
*
neighbors
[
343
];
#pragma omp single nowait
{
{
typename
OctreeClass
::
Iterator
octreeIterator
(
tree
);
typename
OctreeClass
::
Iterator
octreeIterator
(
tree
);
octreeIterator
.
moveDown
();
octreeIterator
.
moveDown
();
...
@@ -718,8 +715,11 @@ private:
...
@@ -718,8 +715,11 @@ private:
{
{
const
int
chunckSize
=
FMath
::
Max
(
1
,
numberOfCells
/
(
omp_get_num_threads
()
*
omp_get_num_threads
()));
const
int
chunckSize
=
FMath
::
Max
(
1
,
numberOfCells
/
(
omp_get_num_threads
()
*
omp_get_num_threads
()));
for
(
int
idxCell
=
0
;
idxCell
<
numberOfCells
;
idxCell
+=
chunckSize
){
for
(
int
idxCell
=
0
;
idxCell
<
numberOfCells
;
idxCell
+=
chunckSize
){
#pragma omp task
#pragma omp task
{
{
KernelClass
*
const
myThreadkernels
=
kernels
[
omp_get_thread_num
()];
const
CellClass
*
neighbors
[
343
];
const
int
nbCellToCompute
=
FMath
::
Min
(
chunckSize
,
numberOfCells
-
idxCell
);
const
int
nbCellToCompute
=
FMath
::
Min
(
chunckSize
,
numberOfCells
-
idxCell
);
for
(
int
idxCellToCompute
=
idxCell
;
idxCellToCompute
<
idxCell
+
nbCellToCompute
;
++
idxCellToCompute
){
for
(
int
idxCellToCompute
=
idxCell
;
idxCellToCompute
<
idxCell
+
nbCellToCompute
;
++
idxCellToCompute
){
const
int
counter
=
tree
->
getInteractionNeighbors
(
neighbors
,
iterArray
[
idxCellToCompute
].
getCurrentGlobalCoordinate
(),
idxLevel
);
const
int
counter
=
tree
->
getInteractionNeighbors
(
neighbors
,
iterArray
[
idxCellToCompute
].
getCurrentGlobalCoordinate
(),
idxLevel
);
...
@@ -729,10 +729,10 @@ private:
...
@@ -729,10 +729,10 @@ private:
}
}
}
}
#pragma omp taskwait
#pragma omp taskwait
for
(
int
idxThread
=
0
;
idxThread
<
omp_get_num_threads
()
;
++
idxThread
){
for
(
int
idxThread
=
0
;
idxThread
<
omp_get_num_threads
()
;
++
idxThread
){
#pragma omp task
#pragma omp task
{
{
kernels
[
idxThread
]
->
finishedLevelM2L
(
idxLevel
);
kernels
[
idxThread
]
->
finishedLevelM2L
(
idxLevel
);
}
}
...
@@ -1271,8 +1271,6 @@ private:
...
@@ -1271,8 +1271,6 @@ private:
//////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
{
{
KernelClass
*
myThreadkernels
=
(
kernels
[
omp_get_thread_num
()]);
#pragma omp single nowait
#pragma omp single nowait
{
{
FLOG
(
computationCounter
.
tic
());
FLOG
(
computationCounter
.
tic
());
...
@@ -1286,6 +1284,7 @@ private:
...
@@ -1286,6 +1284,7 @@ private:
const
int
nbLeavesInTask
=
FMath
::
Min
(
endAtThisShape
-
idxLeafs
,
chunckSize
);
const
int
nbLeavesInTask
=
FMath
::
Min
(
endAtThisShape
-
idxLeafs
,
chunckSize
);
#pragma omp task
#pragma omp task
{
{
KernelClass
*
myThreadkernels
=
(
kernels
[
omp_get_thread_num
()]);
// There is a maximum of 26 neighbors
// There is a maximum of 26 neighbors
ContainerClass
*
neighbors
[
27
];
ContainerClass
*
neighbors
[
27
];
...
...
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