Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
80a0057b
Commit
80a0057b
authored
Sep 25, 2014
by
BRAMAS Berenger
Browse files
Change MPI from waitsome to waitall in P2P
parent
67885622
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Src/Core/FFmmAlgorithmThreadProc.hpp
View file @
80a0057b
This diff is collapsed.
Click to expand it.
Src/Core/FFmmAlgorithmThreadProcPeriodic.hpp
View file @
80a0057b
...
...
@@ -1259,35 +1259,22 @@ private:
// Waitsend receive
//////////////////////////////////////////////////////////
int
complete
=
0
;
int
*
const
indexMessage
=
new
int
[
nbProcess
*
2
];
while
(
complete
!=
iterRequest
){
memset
(
indexMessage
,
0
,
sizeof
(
int
)
*
nbProcess
*
2
);
int
countMessages
=
0
;
// Wait data
FLOG
(
waitCounter
.
tic
());
MPI_Waitsome
(
iterRequest
,
requests
,
&
countMessages
,
indexMessage
,
status
);
FLOG
(
waitCounter
.
tac
());
complete
+=
countMessages
;
for
(
int
idxRcv
=
0
;
idxRcv
<
countMessages
;
++
idxRcv
){
if
(
indexMessage
[
idxRcv
]
<
nbMessagesToRecv
){
const
int
idxProc
=
status
[
idxRcv
].
MPI_SOURCE
;
int
nbLeaves
;
(
*
recvBuffer
[
idxProc
])
>>
nbLeaves
;
for
(
int
idxLeaf
=
0
;
idxLeaf
<
nbLeaves
;
++
idxLeaf
){
MortonIndex
leafIndex
;
(
*
recvBuffer
[
idxProc
])
>>
leafIndex
;
otherP2Ptree
.
createLeaf
(
leafIndex
)
->
getSrc
()
->
restore
((
*
recvBuffer
[
idxProc
]));
}
delete
recvBuffer
[
idxProc
];
recvBuffer
[
idxProc
]
=
nullptr
;
}
FLOG
(
waitCounter
.
tic
());
MPI_Waitall
(
iterRequest
,
requests
,
status
);
FLOG
(
waitCounter
.
tac
());
for
(
int
idxRcv
=
0
;
idxRcv
<
nbMessagesToRecv
;
++
idxRcv
){
const
int
idxProc
=
status
[
idxRcv
].
MPI_SOURCE
;
int
nbLeaves
;
(
*
recvBuffer
[
idxProc
])
>>
nbLeaves
;
for
(
int
idxLeaf
=
0
;
idxLeaf
<
nbLeaves
;
++
idxLeaf
){
MortonIndex
leafIndex
;
(
*
recvBuffer
[
idxProc
])
>>
leafIndex
;
otherP2Ptree
.
createLeaf
(
leafIndex
)
->
getSrc
()
->
restore
((
*
recvBuffer
[
idxProc
]));
}
delete
recvBuffer
[
idxProc
];
recvBuffer
[
idxProc
]
=
nullptr
;
}
delete
[]
indexMessage
;
}
///////////////////////////////////////////////////
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment