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
8dd8cd8c
Commit
8dd8cd8c
authored
Jan 12, 2016
by
BRAMAS Berenger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prepare to split the messages for the merge of splited leaves
parent
3c39fc84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
Src/Files/FMpiTreeBuilder.hpp
Src/Files/FMpiTreeBuilder.hpp
+14
-10
No files found.
Src/Files/FMpiTreeBuilder.hpp
View file @
8dd8cd8c
...
...
@@ -196,7 +196,7 @@ public:
FMpi
::
MpiAssert
(
MPI_Allgather
(
&
borderLeavesState
,
sizeof
(
LeafInfo
)
*
2
,
MPI_BYTE
,
allProcFirstLeafStates
.
get
(),
sizeof
(
LeafInfo
)
*
2
,
MPI_BYTE
,
communicator
.
getComm
()),
__LINE__
);
FV
ector
<
MPI_Request
>
requests
;
std
::
v
ector
<
MPI_Request
>
requests
;
// Find what to send/recv from who
bool
hasSentFirstLeaf
=
false
;
...
...
@@ -211,10 +211,12 @@ public:
// We found someone
if
(
idProcToSendTo
!=
myRank
&&
allProcFirstLeafStates
[(
idProcToSendTo
)
*
2
+
1
].
mindex
==
borderLeavesState
[
0
].
mindex
){
// Post and send message for the first leaf
requests
.
push
((
MPI_Request
)
0
);
FAssertLF
(
borderLeavesState
[
0
].
nbParts
*
sizeof
(
IndexedParticle
)
<
std
::
numeric_limits
<
int
>::
max
());
FMpi
::
MpiAssert
(
MPI_Isend
(
&
workingArray
[
0
],
int
(
borderLeavesState
[
0
].
nbParts
*
sizeof
(
IndexedParticle
)),
MPI_BYTE
,
idProcToSendTo
,
FMpi
::
TagExchangeIndexs
,
communicator
.
getComm
(),
&
requests
[
0
]),
__LINE__
);
// requests.push((MPI_Request)0);
// FAssertLF(borderLeavesState[0].nbParts*sizeof(IndexedParticle) < std::numeric_limits<int>::max());
// FMpi::MpiAssert(MPI_Isend(&workingArray[0], int(borderLeavesState[0].nbParts*sizeof(IndexedParticle)), MPI_BYTE, idProcToSendTo,
// FMpi::TagExchangeIndexs, communicator.getComm(), &requests[0]),__LINE__);
FMpi
::
ISendSplit
(
&
workingArray
[
0
],
borderLeavesState
[
0
].
nbParts
,
idProcToSendTo
,
FMpi
::
TagExchangeIndexs
,
communicator
,
&
requests
);
FLOG
(
FLog
::
Controller
<<
"SCALFMM-DEBUG ["
<<
communicator
.
processId
()
<<
"] send "
<<
borderLeavesState
[
0
].
nbParts
<<
" to "
<<
idProcToSendTo
<<
"
\n
"
;
FLog
::
Controller
.
flush
();
);
hasSentFirstLeaf
=
true
;
}
...
...
@@ -242,10 +244,12 @@ public:
for
(
int
postRecvIdx
=
(
myRank
+
1
);
postRecvIdx
<=
idProcToRecvFrom
;
++
postRecvIdx
){
// If there are some on this proc
if
(
allProcFirstLeafStates
[(
postRecvIdx
)
*
2
].
mindex
!=
noDataFlag
){
requests
.
push
((
MPI_Request
)
0
);
FAssertLF
(
allProcFirstLeafStates
[(
postRecvIdx
)
*
2
].
nbParts
*
sizeof
(
IndexedParticle
)
<
std
::
numeric_limits
<
int
>::
max
());
FMpi
::
MpiAssert
(
MPI_Irecv
(
&
receivedParticles
[
postPositionRecv
],
int
(
allProcFirstLeafStates
[(
postRecvIdx
)
*
2
].
nbParts
*
sizeof
(
IndexedParticle
)),
MPI_BYTE
,
postRecvIdx
,
FMpi
::
TagExchangeIndexs
,
communicator
.
getComm
(),
&
requests
[
0
]),
__LINE__
);
// requests.push((MPI_Request)0);
// FAssertLF(allProcFirstLeafStates[(postRecvIdx)*2].nbParts*sizeof(IndexedParticle) < std::numeric_limits<int>::max());
// FMpi::MpiAssert(MPI_Irecv(&receivedParticles[postPositionRecv], int(allProcFirstLeafStates[(postRecvIdx)*2].nbParts*sizeof(IndexedParticle)), MPI_BYTE, postRecvIdx,
// FMpi::TagExchangeIndexs, communicator.getComm(), &requests[0]),__LINE__);
FMpi
::
IRecvSplit
(
&
receivedParticles
[
postPositionRecv
],
allProcFirstLeafStates
[(
postRecvIdx
)
*
2
].
nbParts
,
postRecvIdx
,
FMpi
::
TagExchangeIndexs
,
communicator
,
&
requests
);
FLOG
(
FLog
::
Controller
<<
"SCALFMM-DEBUG ["
<<
communicator
.
processId
()
<<
"] recv "
<<
allProcFirstLeafStates
[(
postRecvIdx
)
*
2
].
nbParts
<<
" from "
<<
postRecvIdx
<<
"
\n
"
;
FLog
::
Controller
.
flush
();
);
// Inc the write position
postPositionRecv
+=
allProcFirstLeafStates
[(
postRecvIdx
)
*
2
].
nbParts
;
...
...
@@ -256,7 +260,7 @@ public:
}
// Finalize communication
FMpi
::
MpiAssert
(
MPI_Waitall
(
int
(
requests
.
getS
ize
()),
requests
.
data
(),
MPI_STATUSES_IGNORE
),
__LINE__
);
FMpi
::
MpiAssert
(
MPI_Waitall
(
int
(
requests
.
s
ize
()),
requests
.
data
(),
MPI_STATUSES_IGNORE
),
__LINE__
);
// IF we sent we need to remove the first leaf
if
(
hasSentFirstLeaf
){
...
...
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