Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPC_Imaging
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Claudio Gheller
HPC_Imaging
Commits
4bddc68e
Commit
4bddc68e
authored
Mar 4, 2022
by
Luca Tornatore
Browse files
Options
Downloads
Patches
Plain Diff
just maquillage
parent
3d40f2a6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
gridding.c
+53
-59
53 additions, 59 deletions
gridding.c
with
53 additions
and
59 deletions
gridding.c
+
53
−
59
View file @
4bddc68e
...
@@ -130,31 +130,23 @@ void gridding_data(){
...
@@ -130,31 +130,23 @@ void gridding_data(){
double
resolution_asec
=
(
3600
.
0
*
180
.
0
)
/
MAX
(
abs
(
metaData
.
uvmin
),
abs
(
metaData
.
uvmax
))
/
PI
;
double
resolution_asec
=
(
3600
.
0
*
180
.
0
)
/
MAX
(
abs
(
metaData
.
uvmin
),
abs
(
metaData
.
uvmax
))
/
PI
;
printf
(
"RESOLUTION = %f rad, %f arcsec
\n
"
,
resolution
,
resolution_asec
);
printf
(
"RESOLUTION = %f rad, %f arcsec
\n
"
,
resolution
,
resolution_asec
);
// Declare temporary arrays for the masking
for
(
long
isector
=
0
;
isector
<
nsectors
;
isector
++
)
double
*
uus
;
double
*
vvs
;
double
*
wws
;
float
*
visreals
;
float
*
visimgs
;
float
*
weightss
;
long
isector
;
for
(
long
isector_count
=
0
;
isector_count
<
nsectors
;
isector_count
++
)
{
{
clock_gettime
(
CLOCK_MONOTONIC
,
&
begink
);
clock_gettime
(
CLOCK_MONOTONIC
,
&
begink
);
startk
=
clock
();
startk
=
clock
();
// define local destination sector
// define local destination sector
//isector = (isector_count+rank)%size;
//isector = (isector_count+rank)%size;
// this line must be wrong! [LT]
isector
=
isector_count
;
// allocate sector arrays
// allocate sector arrays
long
Nsec
=
histo_send
[
isector
];
long
Nsec
=
histo_send
[
isector
];
uus
=
(
double
*
)
malloc
(
Nsec
*
sizeof
(
double
));
double
*
uus
=
(
double
*
)
malloc
(
Nsec
*
sizeof
(
double
));
vvs
=
(
double
*
)
malloc
(
Nsec
*
sizeof
(
double
));
double
*
vvs
=
(
double
*
)
malloc
(
Nsec
*
sizeof
(
double
));
wws
=
(
double
*
)
malloc
(
Nsec
*
sizeof
(
double
));
double
*
wws
=
(
double
*
)
malloc
(
Nsec
*
sizeof
(
double
));
long
Nweightss
=
Nsec
*
metaData
.
polarisations
;
long
Nweightss
=
Nsec
*
metaData
.
polarisations
;
long
Nvissec
=
Nweightss
*
metaData
.
freq_per_chan
;
long
Nvissec
=
Nweightss
*
metaData
.
freq_per_chan
;
weightss
=
(
float
*
)
malloc
(
Nweightss
*
sizeof
(
float
));
float
*
weightss
=
(
float
*
)
malloc
(
Nweightss
*
sizeof
(
float
));
visreals
=
(
float
*
)
malloc
(
Nvissec
*
sizeof
(
float
));
float
*
visreals
=
(
float
*
)
malloc
(
Nvissec
*
sizeof
(
float
));
visimgs
=
(
float
*
)
malloc
(
Nvissec
*
sizeof
(
float
));
float
*
visimgs
=
(
float
*
)
malloc
(
Nvissec
*
sizeof
(
float
));
// select data for this sector
// select data for this sector
long
icount
=
0
;
long
icount
=
0
;
...
@@ -262,13 +254,15 @@ void gridding_data(){
...
@@ -262,13 +254,15 @@ void gridding_data(){
#ifndef USE_MPI
#ifndef USE_MPI
long
stride
=
isector
*
2
*
xaxis
*
yaxis
*
num_w_planes
;
long
stride
=
isector
*
2
*
xaxis
*
yaxis
*
num_w_planes
;
for
(
long
iii
=
0
;
iii
<
2
*
xaxis
*
yaxis
*
num_w_planes
;
iii
++
)
gridtot
[
stride
+
iii
]
=
gridss
[
iii
];
for
(
long
iii
=
0
;
iii
<
2
*
xaxis
*
yaxis
*
num_w_planes
;
iii
++
)
gridtot
[
stride
+
iii
]
=
gridss
[
iii
];
#endif
#endif
// Write grid in the corresponding remote slab
// Write grid in the corresponding remote slab
#ifdef USE_MPI
#ifdef USE_MPI
int
target_rank
=
(
int
)
isector
;
// int target_rank = (int)isector; it implied that size >= nsectors
//int target_rank = (int)(size-isector-1);
int
target_rank
=
(
int
)(
isector
%
size
);
#ifdef ONE_SIDE
#ifdef ONE_SIDE
printf
(
"One Side communication active
\n
"
);
printf
(
"One Side communication active
\n
"
);
MPI_Win_lock
(
MPI_LOCK_SHARED
,
target_rank
,
0
,
slabwin
);
MPI_Win_lock
(
MPI_LOCK_SHARED
,
target_rank
,
0
,
slabwin
);
...
...
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