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
8acb1a2c
Commit
8acb1a2c
authored
3 years ago
by
Anna Wellmann
Browse files
Options
Downloads
Patches
Plain Diff
Reformat communicator
parent
a2d0cc73
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/Communication/Communicator.h
+45
-45
45 additions, 45 deletions
src/gpu/VirtualFluids_GPU/Communication/Communicator.h
with
45 additions
and
45 deletions
src/gpu/VirtualFluids_GPU/Communication/Communicator.h
+
45
−
45
View file @
8acb1a2c
...
...
@@ -30,53 +30,53 @@ namespace gpu
class
VIRTUALFLUIDS_GPU_EXPORT
Communicator
{
public:
static
Communicator
*
getInstanz
();
static
Communicator
*
getInstanz
(
const
int
numberOfProcs
);
void
exchngBottomToTop
(
float
*
sbuf
,
float
*
rbuf
,
int
count
);
void
exchngTopToBottom
(
float
*
sbuf
,
float
*
rbuf
,
int
count
);
void
waitAll
();
void
distributeGeometry
(
unsigned
int
*
dataRoot
,
unsigned
int
*
dataNode
,
int
dataSizePerNode
);
int
getPID
()
const
;
int
getNummberOfProcess
()
const
;
int
getNeighbourTop
();
int
getNeighbourBottom
();
void
exchngData
(
float
*
sbuf_t
,
float
*
rbuf_t
,
float
*
sbuf_b
,
float
*
rbuf_b
,
int
count
);
void
exchngDataNB
(
float
*
sbuf_t
,
int
count_st
,
float
*
rbuf_t
,
int
count_rt
,
float
*
sbuf_b
,
int
count_sb
,
float
*
rbuf_b
,
int
count_rb
);
//////////////////////////////////////////////////////////////////////////
void
exchngDataGPU
(
real
*
sbuf
,
int
count_s
,
real
*
rbuf
,
int
count_r
,
int
nb_rank
);
void
sendRecvGPU
(
real
*
sbuf
,
int
count_s
,
real
*
rbuf
,
int
count_r
,
int
nb_rank
);
void
nbRecvDataGPU
(
real
*
rbuf
,
int
count_r
,
int
nb_rank
);
void
nbSendDataGPU
(
real
*
sbuf
,
int
count_s
,
int
nb_rank
);
void
waitallGPU
();
void
sendDataGPU
(
real
*
sbuf
,
int
count_s
,
int
nb_rank
);
void
waitGPU
(
int
id
);
void
resetRequest
();
void
barrierGPU
();
void
barrier
();
//////////////////////////////////////////////////////////////////////////
void
exchngDataGeo
(
int
*
sbuf_t
,
int
*
rbuf_t
,
int
*
sbuf_b
,
int
*
rbuf_b
,
int
count
);
MPI_Comm
getCommunicator
();
void
startTimer
();
void
stopTimer
();
double
getTime
();
int
mapCudaDevice
(
const
int
&
rank
,
const
int
&
size
,
const
std
::
vector
<
unsigned
int
>
&
devices
,
const
int
&
maxdev
);
static
Communicator
*
getInstanz
();
static
Communicator
*
getInstanz
(
const
int
numberOfProcs
);
void
exchngBottomToTop
(
float
*
sbuf
,
float
*
rbuf
,
int
count
);
void
exchngTopToBottom
(
float
*
sbuf
,
float
*
rbuf
,
int
count
);
void
waitAll
();
void
distributeGeometry
(
unsigned
int
*
dataRoot
,
unsigned
int
*
dataNode
,
int
dataSizePerNode
);
int
getPID
()
const
;
int
getNummberOfProcess
()
const
;
int
getNeighbourTop
();
int
getNeighbourBottom
();
void
exchngData
(
float
*
sbuf_t
,
float
*
rbuf_t
,
float
*
sbuf_b
,
float
*
rbuf_b
,
int
count
);
void
exchngDataNB
(
float
*
sbuf_t
,
int
count_st
,
float
*
rbuf_t
,
int
count_rt
,
float
*
sbuf_b
,
int
count_sb
,
float
*
rbuf_b
,
int
count_rb
);
//////////////////////////////////////////////////////////////////////////
void
exchngDataGPU
(
real
*
sbuf
,
int
count_s
,
real
*
rbuf
,
int
count_r
,
int
nb_rank
);
void
sendRecvGPU
(
real
*
sbuf
,
int
count_s
,
real
*
rbuf
,
int
count_r
,
int
nb_rank
);
void
nbRecvDataGPU
(
real
*
rbuf
,
int
count_r
,
int
nb_rank
);
void
nbSendDataGPU
(
real
*
sbuf
,
int
count_s
,
int
nb_rank
);
void
waitallGPU
();
void
sendDataGPU
(
real
*
sbuf
,
int
count_s
,
int
nb_rank
);
void
waitGPU
(
int
id
);
void
resetRequest
();
void
barrierGPU
();
void
barrier
();
//////////////////////////////////////////////////////////////////////////
void
exchngDataGeo
(
int
*
sbuf_t
,
int
*
rbuf_t
,
int
*
sbuf_b
,
int
*
rbuf_b
,
int
count
);
MPI_Comm
getCommunicator
();
void
startTimer
();
void
stopTimer
();
double
getTime
();
int
mapCudaDevice
(
const
int
&
rank
,
const
int
&
size
,
const
std
::
vector
<
unsigned
int
>
&
devices
,
const
int
&
maxdev
);
protected:
private:
static
Communicator
*
instanz
;
int
numprocs
,
PID
;
int
nbrbottom
,
nbrtop
;
MPI_Comm
comm1d
,
commGPU
;
MPI_Status
status
[
4
];
MPI_Request
request
[
4
];
//////////////////////////////////////////////////////////////////////////
std
::
vector
<
MPI_Request
>
requestGPU
;
int
rcount
;
//////////////////////////////////////////////////////////////////////////
double
starttime
;
double
endtime
;
Communicator
();
Communicator
(
const
int
numberOfProcs
);
Communicator
(
const
Communicator
&
);
static
Communicator
*
instanz
;
int
numprocs
,
PID
;
int
nbrbottom
,
nbrtop
;
MPI_Comm
comm1d
,
commGPU
;
MPI_Status
status
[
4
];
MPI_Request
request
[
4
];
//////////////////////////////////////////////////////////////////////////
std
::
vector
<
MPI_Request
>
requestGPU
;
int
rcount
;
//////////////////////////////////////////////////////////////////////////
double
starttime
;
double
endtime
;
Communicator
();
Communicator
(
const
int
numberOfProcs
);
Communicator
(
const
Communicator
&
);
};
}
// namespace GPU
...
...
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