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
0c1ed390
Commit
0c1ed390
authored
Jan 05, 2016
by
BRAMAS Berenger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update rotation mpi
parent
c440a8f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
Src/Utils/FQuickSortMpi.hpp
Src/Utils/FQuickSortMpi.hpp
+4
-1
Tests/Kernels/testRotationAlgorithmProc.cpp
Tests/Kernels/testRotationAlgorithmProc.cpp
+1
-1
No files found.
Src/Utils/FQuickSortMpi.hpp
View file @
0c1ed390
...
...
@@ -96,15 +96,18 @@ class FQuickSortMpi : public FQuickSort< SortType, IndexType> {
const
IndexType
nbElementsAlreadyOwned
=
(
inFromRightToLeft
?
globalElementBalance
[
idxProc
].
lowerPart
:
globalElementBalance
[
idxProc
].
greaterPart
);
const
IndexType
averageNbElementForRemainingProc
=
(
totalRemainingElements
)
/
(
lastProcToRecv
-
idxProc
);
totalRemainingElements
-=
nbElementsAlreadyOwned
;
FAssertLF
(
totalRemainingElements
>=
0
);
if
(
nbElementsAlreadyOwned
<
averageNbElementForRemainingProc
){
nbElementsToRecvPerProc
[
idxProc
-
firstProcToRecv
]
=
(
averageNbElementForRemainingProc
-
nbElementsAlreadyOwned
);
totalRemainingElements
-=
nbElementsToRecvPerProc
[
idxProc
-
firstProcToRecv
];
}
else
{
FAssert
((
averageNbElementForRemainingProc
-
nbElementsAlreadyOwned
)
==
0
);
nbElementsToRecvPerProc
[
idxProc
-
firstProcToRecv
]
=
0
;
}
FLOG
(
FLog
::
Controller
<<
"SCALFMM-DEBUG ["
<<
currentRank
<<
"] nbElementsToRecvPerProc["
<<
idxProc
<<
"] = "
<<
nbElementsToRecvPerProc
[
idxProc
-
firstProcToRecv
]
<<
"
\n
"
;
)
}
FAssertLF
(
totalRemainingElements
==
0
);
}
// Store in an array the number of element to send
...
...
@@ -243,7 +246,7 @@ class FQuickSortMpi : public FQuickSort< SortType, IndexType> {
}
}
FAssertLF
(
whatToSendToWho
.
size
()
<=
requests
.
size
());
FLOG
(
FLog
::
Controller
<<
"SCALFMM-DEBUG ["
<<
"
Wait for "
<<
requests
.
size
()
<<
" request
\n
"
);
FLOG
(
FLog
::
Controller
<<
"SCALFMM-DEBUG ["
<<
currentComm
.
processId
()
<<
"]
Wait for "
<<
requests
.
size
()
<<
" request
\n
"
);
FLOG
(
FLog
::
Controller
.
flush
());
// Wait to complete
FMpi
::
Assert
(
MPI_Waitall
(
int
(
requests
.
size
()),
requests
.
data
(),
MPI_STATUSES_IGNORE
),
__LINE__
);
...
...
Tests/Kernels/testRotationAlgorithmProc.cpp
View file @
0c1ed390
...
...
@@ -115,7 +115,7 @@ int main(int argc, char* argv[])
tree
.
getBoxWidth
(),
tree
.
getHeight
(),
&
finalParticles
,
&
balancer
);
{
// -----------------------------------------------------
std
::
cout
<<
"Creating & Inserting "
<<
loader
.
getNumberOfParticles
()
<<
" particles ..."
<<
std
::
endl
;
std
::
cout
<<
"Creating & Inserting "
<<
finalParticles
.
getSize
()
<<
" particles ..."
<<
std
::
endl
;
std
::
cout
<<
"For a total of "
<<
loader
.
getNumberOfParticles
()
*
app
.
global
().
processCount
()
<<
" particles ..."
<<
std
::
endl
;
std
::
cout
<<
"
\t
Height : "
<<
TreeHeight
<<
"
\t
sub-height : "
<<
SubTreeHeight
<<
std
::
endl
;
time
.
tic
();
...
...
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