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
c53ba860
Commit
c53ba860
authored
3 years ago
by
Anna Wellmann
Browse files
Options
Downloads
Patches
Plain Diff
Add Process ID to log for number of communication indices after f to c
parent
907c3619
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!104
Add Communication Hiding to GPU version
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreams.cpp
+14
-10
14 additions, 10 deletions
...izer/GridReaderGenerator/IndexRearrangementForStreams.cpp
with
14 additions
and
10 deletions
src/gpu/VirtualFluids_GPU/DataStructureInitializer/GridReaderGenerator/IndexRearrangementForStreams.cpp
+
14
−
10
View file @
c53ba860
...
...
@@ -29,7 +29,7 @@ void IndexRearrangementForStreams::initCommunicationArraysForCommAfterFinetoCoar
std
::
vector
<
uint
>
recvIndicesForCommAfterFtoCPositions
;
recvIndicesForCommAfterFtoCPositions
.
resize
(
(
size_t
)
para
->
getParH
(
level
)
->
sendProcessNeighborsAfterFtoCX
[
j
].
numberOfNodes
*
2
);
// give vector an arbitraty size (larger than needed) // TODO:
This is stupid!
Find a better way
2
);
// give vector an arbitraty size (larger than needed) // TODO: Find a better way
auto
comm
=
vf
::
gpu
::
Communicator
::
getInstanz
();
comm
->
exchangeIndices
(
recvIndicesForCommAfterFtoCPositions
.
data
(),
(
int
)
recvIndicesForCommAfterFtoCPositions
.
size
(),
para
->
getParH
(
level
)
->
recvProcessNeighborX
[
j
].
rankNeighbor
,
...
...
@@ -38,7 +38,7 @@ void IndexRearrangementForStreams::initCommunicationArraysForCommAfterFinetoCoar
// resize receiving vector to correct size
auto
it
=
std
::
unique
(
recvIndicesForCommAfterFtoCPositions
.
begin
(),
recvIndicesForCommAfterFtoCPositions
.
end
());
recvIndicesForCommAfterFtoCPositions
.
erase
(
std
::
prev
(
it
,
1
),
recvIndicesForCommAfterFtoCPositions
.
end
());
recvIndicesForCommAfterFtoCPositions
.
erase
(
std
::
prev
(
it
,
1
),
recvIndicesForCommAfterFtoCPositions
.
end
());
// TODO: Find a better way
// init receive indices for communication after coarse to fine
std
::
cout
<<
"reorder receive indices "
;
...
...
@@ -64,7 +64,7 @@ void IndexRearrangementForStreams::initCommunicationArraysForCommAfterFinetoCoar
std
::
cout
<<
"mpi send and receive "
;
std
::
vector
<
uint
>
recvIndicesForCommAfterFtoCPositions
;
recvIndicesForCommAfterFtoCPositions
.
resize
((
size_t
)
para
->
getParH
(
level
)
->
sendProcessNeighborsAfterFtoCY
[
j
].
numberOfNodes
*
2
);
// give vector an arbitraty size (larger than needed) // TODO:
This is stupid!
Find a better way
2
);
// give vector an arbitraty size (larger than needed) // TODO: Find a better way
auto
comm
=
vf
::
gpu
::
Communicator
::
getInstanz
();
comm
->
exchangeIndices
(
recvIndicesForCommAfterFtoCPositions
.
data
(),
(
int
)
recvIndicesForCommAfterFtoCPositions
.
size
(),
para
->
getParH
(
level
)
->
recvProcessNeighborY
[
j
].
rankNeighbor
,
...
...
@@ -73,7 +73,7 @@ void IndexRearrangementForStreams::initCommunicationArraysForCommAfterFinetoCoar
// resize receiving vector to correct size
auto
it
=
std
::
unique
(
recvIndicesForCommAfterFtoCPositions
.
begin
(),
recvIndicesForCommAfterFtoCPositions
.
end
());
recvIndicesForCommAfterFtoCPositions
.
erase
(
std
::
prev
(
it
,
1
),
recvIndicesForCommAfterFtoCPositions
.
end
());
recvIndicesForCommAfterFtoCPositions
.
erase
(
std
::
prev
(
it
,
1
),
recvIndicesForCommAfterFtoCPositions
.
end
());
// TODO: Find a better way
// init receive indices for communication after coarse to fine
std
::
cout
<<
"reorder receive indices "
;
...
...
@@ -100,7 +100,7 @@ void IndexRearrangementForStreams::initCommunicationArraysForCommAfterFinetoCoar
std
::
cout
<<
"mpi send and receive "
;
std
::
vector
<
uint
>
recvIndicesForCommAfterFtoCPositions
;
recvIndicesForCommAfterFtoCPositions
.
resize
((
size_t
)
para
->
getParH
(
level
)
->
sendProcessNeighborsAfterFtoCZ
[
j
].
numberOfNodes
*
2
);
// give vector an arbitraty size (larger than needed) // TODO:
This is stupid!
Find a better way
2
);
// give vector an arbitraty size (larger than needed) // TODO: Find a better way
auto
comm
=
vf
::
gpu
::
Communicator
::
getInstanz
();
comm
->
exchangeIndices
(
recvIndicesForCommAfterFtoCPositions
.
data
(),
(
int
)
recvIndicesForCommAfterFtoCPositions
.
size
(),
para
->
getParH
(
level
)
->
recvProcessNeighborZ
[
j
].
rankNeighbor
,
...
...
@@ -109,7 +109,7 @@ void IndexRearrangementForStreams::initCommunicationArraysForCommAfterFinetoCoar
// resize receiving vector to correct size
auto
it
=
std
::
unique
(
recvIndicesForCommAfterFtoCPositions
.
begin
(),
recvIndicesForCommAfterFtoCPositions
.
end
());
recvIndicesForCommAfterFtoCPositions
.
erase
(
std
::
prev
(
it
,
1
),
recvIndicesForCommAfterFtoCPositions
.
end
());
recvIndicesForCommAfterFtoCPositions
.
erase
(
std
::
prev
(
it
,
1
),
recvIndicesForCommAfterFtoCPositions
.
end
());
// TODO: Find a better way
// init receive indices for communication after coarse to fine
std
::
cout
<<
"reorder receive indices "
;
...
...
@@ -251,8 +251,9 @@ void IndexRearrangementForStreams::reorderSendIndicesForCommAfterFtoC(int *sendI
for
(
uint
i
=
0
;
i
<
(
uint
)
sendIndicesOther
.
size
();
i
++
)
sendIndices
[
i
+
numberOfSendNeighborsAfterFtoC
]
=
sendIndicesOther
[
i
];
*
logging
::
out
<<
logging
::
Logger
::
INFO_INTERMEDIATE
<<
"... numberOfSendNeighborsAfterFtoC: "
<<
numberOfSendNeighborsAfterFtoC
<<
"
\n
"
;
*
logging
::
out
<<
logging
::
Logger
::
INFO_INTERMEDIATE
<<
"... Process "
<<
" "
<<
vf
::
gpu
::
Communicator
::
getInstanz
()
->
getPID
()
<<
" numberOfSendNeighborsAfterFtoC: "
<<
numberOfSendNeighborsAfterFtoC
<<
"
\n
"
;
if
(
numberOfSendNeighborsAfterFtoC
+
sendIndicesOther
.
size
()
!=
numberOfSendIndices
)
{
*
logging
::
out
<<
logging
::
Logger
::
LOGGER_ERROR
...
...
@@ -294,6 +295,8 @@ void IndexRearrangementForStreams::aggregateNodesInICellCFC(int level, std::vect
nodesCFC
.
push_back
(
neighborZ
[
neighborY
[
sparseIndex
]]);
nodesCFC
.
push_back
(
neighborZ
[
neighborY
[
neighborX
[
sparseIndex
]]]);
}
// remove duplicate nodes
std
::
sort
(
nodesCFC
.
begin
(),
nodesCFC
.
end
());
auto
iterator
=
std
::
unique
(
nodesCFC
.
begin
(),
nodesCFC
.
end
());
nodesCFC
.
erase
(
iterator
,
nodesCFC
.
end
());
...
...
@@ -396,8 +399,9 @@ void IndexRearrangementForStreams::reorderRecvIndicesForCommAfterFtoC(int *recvI
for
(
uint
i
=
0
;
i
<
(
uint
)
recvIndicesOther
.
size
();
i
++
)
recvIndices
[
i
+
numberOfRecvNeighborsAfterFtoC
]
=
recvIndicesOther
[
i
];
*
logging
::
out
<<
logging
::
Logger
::
INFO_INTERMEDIATE
<<
"... numberOfRecvNeighborsAfterFtoC: "
<<
numberOfRecvNeighborsAfterFtoC
<<
"
\n
"
;
*
logging
::
out
<<
logging
::
Logger
::
INFO_INTERMEDIATE
<<
"... Process "
<<
" "
<<
vf
::
gpu
::
Communicator
::
getInstanz
()
->
getPID
()
<<
" numberOfRecvNeighborsAfterFtoC: "
<<
numberOfRecvNeighborsAfterFtoC
<<
"
\n
"
;
if
(
numberOfRecvNeighborsAfterFtoC
+
recvIndicesOther
.
size
()
!=
numberOfRecvIndices
)
{
*
logging
::
out
<<
logging
::
Logger
::
LOGGER_ERROR
...
...
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