Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VirtualFluids
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
iRMB
VirtualFluids
Commits
a3dd88c6
Commit
a3dd88c6
authored
3 years ago
by
AlenaKaranchuk
Browse files
Options
Downloads
Patches
Plain Diff
Fix MPIIOMigrationBECoProcessor
parent
0a0d4c8e
No related branches found
No related tags found
2 merge requests
!171
Newest Update
,
!83
Fix MPICommunicator
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.cpp
+16
-10
16 additions, 10 deletions
...alFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.cpp
with
16 additions
and
10 deletions
src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationBECoProcessor.cpp
+
16
−
10
View file @
a3dd88c6
...
...
@@ -972,6 +972,8 @@ void MPIIOMigrationBECoProcessor::blocksExchange(int tagN, int ind1, int ind2, i
MPI_Waitall
(
requestCount
,
&
requests
[
0
],
MPI_STATUSES_IGNORE
);
MPI_Type_free
(
&
sendBlockDoubleType
);
delete
[]
blocksCounterSend
;
delete
[]
blocksCounterRec
;
delete
[]
rawDataSend
;
...
...
@@ -1079,11 +1081,15 @@ void MPIIOMigrationBECoProcessor::readDataSet(int step)
for
(
int
r
=
0
;
r
<
size
;
r
++
)
rawDataReceiveF
[
r
].
resize
(
0
);
blocksExchange
(
MESSAGE_TAG
,
indexB
,
indexE
,
int
(
doubleCountInBlock
),
doubleValuesArrayF
,
rawDataReceiveF
);
std
::
vector
<
double
>*
rawDataReceiveH1
=
new
std
::
vector
<
double
>
[
size
];
for
(
int
r
=
0
;
r
<
size
;
r
++
)
rawDataReceiveH1
[
r
].
resize
(
0
);
blocksExchange
(
MESSAGE_TAG
,
indexB
,
indexE
,
int
(
doubleCountInBlock
),
doubleValuesArrayH1
,
rawDataReceiveH1
);
if
(
multiPhase
)
{
for
(
int
r
=
0
;
r
<
size
;
r
++
)
rawDataReceiveH1
[
r
].
resize
(
0
);
blocksExchange
(
MESSAGE_TAG
,
indexB
,
indexE
,
int
(
doubleCountInBlock
),
doubleValuesArrayH1
,
rawDataReceiveH1
);
}
/* std::vector<double>* rawDataReceiveH2 = new std::vector<double>[size];
for (int r = 0; r < size; r++)
...
...
@@ -1125,14 +1131,14 @@ void MPIIOMigrationBECoProcessor::readDataSet(int step)
vectorsOfValuesF2
.
assign
(
rawDataReceiveF
[
r
].
data
()
+
index
,
rawDataReceiveF
[
r
].
data
()
+
index
+
vectorSize2
);
if
(
multiPhase
)
vectorsOfValuesH12
.
assign
(
rawDataReceiveH1
[
r
].
data
()
+
index
,
rawDataReceiveH1
[
r
].
data
()
+
index
+
vectorSize
1
);
//vectorsOfValuesH22.assign(rawDataReceiveH2[r].data() + index, rawDataReceiveH2[r].data() + index + vectorSize
1
);
vectorsOfValuesH12
.
assign
(
rawDataReceiveH1
[
r
].
data
()
+
index
,
rawDataReceiveH1
[
r
].
data
()
+
index
+
vectorSize
2
);
//vectorsOfValuesH22.assign(rawDataReceiveH2[r].data() + index, rawDataReceiveH2[r].data() + index + vectorSize
2
);
index
+=
vectorSize2
;
vectorsOfValuesF3
.
assign
(
rawDataReceiveF
[
r
].
data
()
+
index
,
rawDataReceiveF
[
r
].
data
()
+
index
+
vectorSize3
);
if
(
multiPhase
)
vectorsOfValuesH13
.
assign
(
rawDataReceiveH1
[
r
].
data
()
+
index
,
rawDataReceiveH1
[
r
].
data
()
+
index
+
vectorSize
1
);
//vectorsOfValuesH23.assign(rawDataReceiveH2[r].data() + index, rawDataReceiveH2[r].data() + index + vectorSize
1
);
vectorsOfValuesH13
.
assign
(
rawDataReceiveH1
[
r
].
data
()
+
index
,
rawDataReceiveH1
[
r
].
data
()
+
index
+
vectorSize
3
);
//vectorsOfValuesH23.assign(rawDataReceiveH2[r].data() + index, rawDataReceiveH2[r].data() + index + vectorSize
3
);
index
+=
vectorSize3
;
SPtr
<
DistributionArray3D
>
mFdistributions
(
new
D3Q27EsoTwist3DSplittedVector
());
...
...
@@ -1174,7 +1180,6 @@ void MPIIOMigrationBECoProcessor::readDataSet(int step)
dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(mH2distributions)->setNX2(dataSetParamStr1.nx2);
dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(mH2distributions)->setNX3(dataSetParamStr1.nx3);*/
// find the nesessary block and fill it
SPtr
<
Block3D
>
block
=
grid
->
getBlock
(
blockID
);
this
->
lbmKernel
->
setBlock
(
block
);
...
...
@@ -1196,7 +1201,8 @@ void MPIIOMigrationBECoProcessor::readDataSet(int step)
block
->
setKernel
(
kernel
);
}
}
//if (comm->isRoot())
if
(
comm
->
isRoot
())
{
UBLOG
(
logINFO
,
"MPIIOMigrationBECoProcessor::readDataSet end of restore of data, rank = "
<<
rank
);
UBLOG
(
logINFO
,
"Physical Memory currently used by current process: "
<<
Utilities
::
getPhysMemUsedByMe
()
/
1073741824.0
<<
" GB"
);
...
...
@@ -1245,7 +1251,7 @@ void MPIIOMigrationBECoProcessor::readDataSet(int step)
readArray
(
step
,
PhaseField2
,
std
::
string
(
"/cpPhaseField2.bin"
));
delete
[]
rawDataReceiveF
;
//
delete[] rawDataReceiveH1;
delete
[]
rawDataReceiveH1
;
// delete[] rawDataReceiveH2;
}
...
...
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