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
56fb0060
Commit
56fb0060
authored
10 years ago
by
BRAMAS Berenger
Browse files
Options
Downloads
Patches
Plain Diff
Solve the bug in the tree building - now it works with up to 200 process on my station
parent
e8de9ed7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Src/Files/FMpiTreeBuilder.hpp
+13
-2
13 additions, 2 deletions
Src/Files/FMpiTreeBuilder.hpp
with
13 additions
and
2 deletions
Src/Files/FMpiTreeBuilder.hpp
+
13
−
2
View file @
56fb0060
...
@@ -367,17 +367,22 @@ public:
...
@@ -367,17 +367,22 @@ public:
for
(
int
idxPack
=
0
;
idxPack
<
packsToSend
.
size
()
;
++
idxPack
){
for
(
int
idxPack
=
0
;
idxPack
<
packsToSend
.
size
()
;
++
idxPack
){
const
FEqualize
::
Package
&
pack
=
packsToSend
[
idxPack
];
const
FEqualize
::
Package
&
pack
=
packsToSend
[
idxPack
];
if
(
pack
.
idProc
!=
myRank
&&
0
<
(
pack
.
elementTo
-
pack
.
elementFrom
)){
if
(
pack
.
idProc
!=
myRank
&&
0
<
(
pack
.
elementTo
-
pack
.
elementFrom
)){
// If not to me and if there is something to send
//First, we need to send the size of the leaves we will send
nbPartsPerPackToSend
[
idxPack
]
=
leavesOffsetInParticles
[
pack
.
elementTo
]
-
leavesOffsetInParticles
[
pack
.
elementFrom
];
nbPartsPerPackToSend
[
idxPack
]
=
leavesOffsetInParticles
[
pack
.
elementTo
]
-
leavesOffsetInParticles
[
pack
.
elementFrom
];
// Send the size of the data
requestsNbParts
.
emplace_back
();
requestsNbParts
.
emplace_back
();
FMpi
::
MpiAssert
(
MPI_Isend
(
&
nbPartsPerPackToSend
[
idxPack
],
1
,
MPI_LONG_LONG_INT
,
pack
.
idProc
,
FMpi
::
MpiAssert
(
MPI_Isend
(
&
nbPartsPerPackToSend
[
idxPack
],
1
,
MPI_LONG_LONG_INT
,
pack
.
idProc
,
FMpi
::
TagExchangeIndexs
+
1
,
communicator
.
getComm
(),
&
requestsNbParts
.
back
()),
__LINE__
);
FMpi
::
TagExchangeIndexs
+
1
,
communicator
.
getComm
(),
&
requestsNbParts
.
back
()),
__LINE__
);
// Send the data
requestsParts
.
emplace_back
();
requestsParts
.
emplace_back
();
FMpi
::
MpiAssert
(
MPI_Isend
((
ParticleClass
*
)
&
particlesArrayInLeafOrder
[
leavesOffsetInParticles
[
pack
.
elementFrom
]],
FMpi
::
MpiAssert
(
MPI_Isend
((
ParticleClass
*
)
&
particlesArrayInLeafOrder
[
leavesOffsetInParticles
[
pack
.
elementFrom
]],
sizeof
(
ParticleClass
)
*
nbPartsPerPackToSend
[
idxPack
],
sizeof
(
ParticleClass
)
*
nbPartsPerPackToSend
[
idxPack
],
MPI_BYTE
,
pack
.
idProc
,
FMpi
::
TagExchangeIndexs
+
2
,
communicator
.
getComm
(),
&
requestsParts
.
back
()),
__LINE__
);
MPI_BYTE
,
pack
.
idProc
,
FMpi
::
TagExchangeIndexs
+
2
,
communicator
.
getComm
(),
&
requestsParts
.
back
()),
__LINE__
);
}
}
else
{
// Nothing to send
nbPartsPerPackToSend
[
idxPack
]
=
0
;
}
}
}
// Compute the current intervals
// Compute the current intervals
std
::
vector
<
std
::
pair
<
size_t
,
size_t
>
>
allCurrentIntervals
;
std
::
vector
<
std
::
pair
<
size_t
,
size_t
>
>
allCurrentIntervals
;
...
@@ -395,16 +400,22 @@ public:
...
@@ -395,16 +400,22 @@ public:
for
(
int
idxPack
=
0
;
idxPack
<
packsToRecv
.
size
();
++
idxPack
){
for
(
int
idxPack
=
0
;
idxPack
<
packsToRecv
.
size
();
++
idxPack
){
const
FEqualize
::
Package
&
pack
=
packsToRecv
[
idxPack
];
const
FEqualize
::
Package
&
pack
=
packsToRecv
[
idxPack
];
if
(
pack
.
idProc
!=
myRank
&&
0
<
(
pack
.
elementTo
-
pack
.
elementFrom
)){
if
(
pack
.
idProc
!=
myRank
&&
0
<
(
pack
.
elementTo
-
pack
.
elementFrom
)){
// We need to know how much particles to receive
requestsNbParts
.
emplace_back
();
requestsNbParts
.
emplace_back
();
FMpi
::
MpiAssert
(
MPI_Irecv
(
&
nbPartsPerPackToRecv
[
idxPack
],
1
,
MPI_LONG_LONG_INT
,
pack
.
idProc
,
FMpi
::
MpiAssert
(
MPI_Irecv
(
&
nbPartsPerPackToRecv
[
idxPack
],
1
,
MPI_LONG_LONG_INT
,
pack
.
idProc
,
FMpi
::
TagExchangeIndexs
+
1
,
communicator
.
getComm
(),
&
requestsNbParts
.
back
()),
__LINE__
);
FMpi
::
TagExchangeIndexs
+
1
,
communicator
.
getComm
(),
&
requestsNbParts
.
back
()),
__LINE__
);
}
}
else
{
else
{
if
(
pack
.
idProc
==
myRank
){
if
(
pack
.
idProc
==
myRank
){
// Take my own data
const
FSize
sourcePosition
=
FMath
::
Max
(
myObjective
.
first
,
myCurrentInter
.
first
)
-
myCurrentInter
.
first
;
const
FSize
sourcePosition
=
FMath
::
Max
(
myObjective
.
first
,
myCurrentInter
.
first
)
-
myCurrentInter
.
first
;
const
FSize
nbLeavesToCopy
=
pack
.
elementTo
-
pack
.
elementFrom
;
const
FSize
nbLeavesToCopy
=
pack
.
elementTo
-
pack
.
elementFrom
;
nbPartsPerPackToRecv
[
idxPack
]
=
leavesOffsetInParticles
[
sourcePosition
+
nbLeavesToCopy
]
-
leavesOffsetInParticles
[
sourcePosition
];
nbPartsPerPackToRecv
[
idxPack
]
=
leavesOffsetInParticles
[
sourcePosition
+
nbLeavesToCopy
]
-
leavesOffsetInParticles
[
sourcePosition
];
}
}
else
{
// Nothing to receive from this so avoid communication
nbPartsPerPackToRecv
[
idxPack
]
=
0
;
}
}
}
}
}
...
...
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