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
e71677c5
Commit
e71677c5
authored
Jan 13, 2021
by
Bram Veenboer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update distributed example
parent
d6d6affa
Pipeline
#8134
passed with stages
in 19 minutes and 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
idg-bin/examples/cxx/distributed/common.h
idg-bin/examples/cxx/distributed/common.h
+14
-14
No files found.
idg-bin/examples/cxx/distributed/common.h
View file @
e71677c5
...
...
@@ -445,10 +445,12 @@ void run_master() {
std
::
vector
<
double
>
runtimes_grid_reduce
(
nr_cycles
);
std
::
vector
<
double
>
runtimes_grid_fft
(
nr_cycles
);
std
::
vector
<
double
>
runtimes_grid_broadcast
(
nr_cycles
);
double
runtime_imaging
;
// Iterate all cycles
for
(
unsigned
cycle
=
0
;
cycle
<
nr_cycles
;
cycle
++
)
{
runtime_imaging
=
-
omp_get_wtime
();
for
(
unsigned
cycle
=
0
;
cycle
<
nr_cycles
;
cycle
++
)
{
// Run gridding and degridding for all blocks of time
for
(
unsigned
int
t
=
0
;
t
<
nr_time_blocks
;
t
++
)
{
...
...
@@ -477,7 +479,7 @@ void run_master() {
synchronize
();
// Run gridding
runtimes_gridding
[
cycle
]
=
-
omp_get_wtime
();
runtimes_gridding
[
cycle
]
-=
omp_get_wtime
();
proxy
.
gridding
(
plan
,
w_offset
,
shift
,
cell_size
,
kernel_size
,
subgrid_size
,
frequencies
,
visibilities
,
uvw
,
baselines
,
aterms
,
aterms_offsets
,
spheroidal
);
...
...
@@ -485,7 +487,7 @@ void run_master() {
runtimes_gridding
[
cycle
]
+=
omp_get_wtime
();
// Run degridding
runtimes_degridding
[
cycle
]
=
-
omp_get_wtime
();
runtimes_degridding
[
cycle
]
-=
omp_get_wtime
();
proxy
.
degridding
(
plan
,
w_offset
,
shift
,
cell_size
,
kernel_size
,
subgrid_size
,
frequencies
,
visibilities
,
uvw
,
baselines
,
aterms
,
aterms_offsets
,
spheroidal
);
...
...
@@ -493,9 +495,6 @@ void run_master() {
runtimes_degridding
[
cycle
]
+=
omp_get_wtime
();
}
// Get grid
grid
=
proxy
.
get_grid
();
// Run FFT
runtimes_grid_fft
[
cycle
]
=
-
omp_get_wtime
();
proxy
.
transform
(
idg
::
FourierDomainToImageDomain
,
*
grid
);
...
...
@@ -504,6 +503,9 @@ void run_master() {
// Reduce grids
if
(
world_size
>
1
)
{
// Get grid
grid
=
proxy
.
get_grid
();
runtimes_grid_reduce
[
cycle
]
=
-
omp_get_wtime
();
reduce_grids
(
grid
,
0
,
world_size
);
runtimes_grid_reduce
[
cycle
]
+=
omp_get_wtime
();
...
...
@@ -518,16 +520,17 @@ void run_master() {
runtimes_grid_broadcast
[
cycle
]
=
-
omp_get_wtime
();
broadcast_grid
(
grid
,
0
);
runtimes_grid_broadcast
[
cycle
]
+=
omp_get_wtime
();
}
// Set grid
proxy
.
set_grid
(
grid
);
// Set grid
proxy
.
set_grid
(
grid
);
}
// Run FFT
runtimes_grid_fft
[
cycle
]
-=
omp_get_wtime
();
proxy
.
transform
(
idg
::
ImageDomainToFourierDomain
,
*
grid
);
runtimes_grid_fft
[
cycle
]
+=
omp_get_wtime
();
}
runtime_imaging
+=
omp_get_wtime
();
// Report timings
std
::
clog
<<
std
::
endl
;
...
...
@@ -545,14 +548,11 @@ void run_master() {
idg
::
report
(
"degridding"
,
runtime_degridding
);
idg
::
report
(
"grid reduce"
,
runtime_grid_reduce
);
idg
::
report
(
"grid broadcast"
,
runtime_grid_broadcast
);
double
runtime_imaging
=
runtime_gridding
+
runtime_degridding
+
runtime_grid_fft
+
runtime_grid_reduce
+
runtime_grid_broadcast
;
idg
::
report
(
"runtime imaging"
,
runtime_imaging
);
std
::
clog
<<
std
::
endl
;
// Report throughput
uint64_t
nr_visibilities
=
1ULL
*
nr_baselines
*
total_nr_timesteps
*
nr_channels
*
world_size
;
uint64_t
nr_visibilities
=
1ULL
*
nr_
cycles
*
nr_
baselines
*
total_nr_timesteps
*
nr_channels
*
world_size
;
idg
::
report_visibilities
(
"gridding"
,
runtime_gridding
,
nr_visibilities
);
idg
::
report_visibilities
(
"degridding"
,
runtime_degridding
,
nr_visibilities
);
idg
::
report_visibilities
(
"imaging"
,
runtime_imaging
,
nr_visibilities
);
...
...
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