Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
I
idg
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
8
Merge Requests
8
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ResearchAndDevelopment
idg
Commits
ee871913
Commit
ee871913
authored
Jan 11, 2021
by
Bram Veenboer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add synchronization to send/receive of visibilities
This prevents all wokers to send at once.
parent
386db174
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
idg-bin/examples/cxx/distributed/common.h
idg-bin/examples/cxx/distributed/common.h
+8
-5
No files found.
idg-bin/examples/cxx/distributed/common.h
View file @
ee871913
...
...
@@ -343,9 +343,11 @@ void receive_visibilities(
unsigned
int
nr_timesteps
=
visibilities
.
get_y_dim
();
unsigned
int
nr_channels
=
visibilities
.
get_x_dim
();
MPIRequestList
requests
;
for
(
unsigned
int
bl
=
0
;
bl
<
nr_baselines
;
bl
++
)
for
(
unsigned
int
source
=
1
;
source
<
world_size
;
source
++
)
{
for
(
unsigned
int
source
=
1
;
source
<
world_size
;
source
++
)
send_int
(
source
,
0
);
for
(
unsigned
int
bl
=
0
;
bl
<
nr_baselines
;
bl
++
)
{
void
*
visibilities_ptr
=
(
void
*
)
visibilities
.
data
(
bl
,
0
,
0
);
size_t
sizeof_visibilities
=
nr_timesteps
*
nr_channels
*
...
...
@@ -358,8 +360,9 @@ void receive_visibilities(
void
send_visibilities
(
idg
::
Array3D
<
idg
::
Visibility
<
std
::
complex
<
float
>>>&
visibilities
,
int
dest
)
int
rank
)
{
receive_int
();
unsigned
int
nr_baselines
=
visibilities
.
get_z_dim
();
unsigned
int
nr_timesteps
=
visibilities
.
get_y_dim
();
unsigned
int
nr_channels
=
visibilities
.
get_x_dim
();
...
...
@@ -369,7 +372,7 @@ void send_visibilities(
void
*
visibilities_ptr
=
(
void
*
)
visibilities
.
data
(
bl
,
0
,
0
);
size_t
sizeof_visibilities
=
nr_timesteps
*
nr_channels
*
sizeof
(
idg
::
Visibility
<
std
::
complex
<
float
>>
);
requests
.
create
()
->
send
(
visibilities_ptr
,
sizeof_visibilities
,
dest
);
requests
.
create
()
->
send
(
visibilities_ptr
,
sizeof_visibilities
,
0
);
}
requests
.
wait
();
}
...
...
@@ -751,7 +754,7 @@ void run_worker() {
synchronize
();
// Send visibilities
send_visibilities
(
visibilities
,
0
);
send_visibilities
(
visibilities
,
rank
);
}
}
// end run_worker
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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