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
624fdbdb
Commit
624fdbdb
authored
3 years ago
by
Nandhana Sakhtivel
Browse files
Options
Downloads
Patches
Plain Diff
NUMA awarness
parent
f5ab873e
No related branches found
No related tags found
No related merge requests found
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
Makefile
+3
-3
3 additions, 3 deletions
Makefile
allvars.c
+2
-1
2 additions, 1 deletion
allvars.c
allvars.h
+3
-0
3 additions, 0 deletions
allvars.h
gridding.c
+1
-0
1 addition, 0 deletions
gridding.c
init.c
+4
-0
4 additions, 0 deletions
init.c
main.c
+1
-0
1 addition, 0 deletions
main.c
proto.h
+4
-0
4 additions, 0 deletions
proto.h
with
18 additions
and
4 deletions
Makefile
+
3
−
3
View file @
624fdbdb
...
@@ -30,7 +30,7 @@ endif
...
@@ -30,7 +30,7 @@ endif
#OPT += -DNVIDIA
#OPT += -DNVIDIA
# perform one-side communication (suggested) instead of reduce (only if MPI is active)
# perform one-side communication (suggested) instead of reduce (only if MPI is active)
#
OPT += -DONE_SIDE
OPT
+=
-DONE_SIDE
# write the full 3D cube of gridded visibilities and its FFT transform
# write the full 3D cube of gridded visibilities and its FFT transform
#OPT += -DWRITE_DATA
#OPT += -DWRITE_DATA
# write the final image
# write the final image
...
@@ -39,8 +39,8 @@ OPT += -DWRITE_IMAGE
...
@@ -39,8 +39,8 @@ OPT += -DWRITE_IMAGE
OPT
+=
-DPHASE_ON
OPT
+=
-DPHASE_ON
DEPS
=
w-stacking.h main.c w-stacking.cu phase_correction.cu allvars.h init.c gridding.c fourier_transform.c result.c
DEPS
=
w-stacking.h main.c w-stacking.cu phase_correction.cu allvars.h init.c gridding.c fourier_transform.c result.c
numa.h
COBJ
=
w-stacking.o main.o phase_correction.o allvars.o init.o gridding.o fourier_transform.o result.o
COBJ
=
w-stacking.o main.o phase_correction.o allvars.o init.o gridding.o fourier_transform.o result.o
numa.o
w-stacking.c
:
w-stacking.cu
w-stacking.c
:
w-stacking.cu
cp
w-stacking.cu w-stacking.c
cp
w-stacking.cu w-stacking.c
...
...
This diff is collapsed.
Click to expand it.
allvars.c
+
2
−
1
View file @
624fdbdb
...
@@ -27,6 +27,7 @@ long * histo_send, size_of_grid;
...
@@ -27,6 +27,7 @@ long * histo_send, size_of_grid;
double
*
grid
,
*
gridss
,
*
gridss_real
,
*
gridss_img
,
*
gridss_w
;
double
*
grid
,
*
gridss
,
*
gridss_real
,
*
gridss_img
,
*
gridss_w
;
#ifdef USE_MPI
#ifdef USE_MPI
MPI_Comm
MYMPI_COMM_WORLD
;
MPI_Win
slabwin
;
MPI_Win
slabwin
;
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
allvars.h
+
3
−
0
View file @
624fdbdb
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
#include
<math.h>
#include
<math.h>
#include
<time.h>
#include
<time.h>
#include
<unistd.h>
#include
<unistd.h>
#include
"numa.h"
extern
struct
io
extern
struct
io
{
{
...
@@ -128,6 +130,7 @@ extern long * histo_send, size_of_grid;
...
@@ -128,6 +130,7 @@ extern long * histo_send, size_of_grid;
extern
double
*
grid
,
*
gridss
,
*
gridss_real
,
*
gridss_img
,
*
gridss_w
;
extern
double
*
grid
,
*
gridss
,
*
gridss_real
,
*
gridss_img
,
*
gridss_w
;
#ifdef USE_MPI
#ifdef USE_MPI
extern
MPI_Comm
MYMPI_COMM_WORLD
;
extern
MPI_Win
slabwin
;
extern
MPI_Win
slabwin
;
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
gridding.c
+
1
−
0
View file @
624fdbdb
...
@@ -248,6 +248,7 @@ void gridding_data(){
...
@@ -248,6 +248,7 @@ void gridding_data(){
#ifdef ONE_SIDE
#ifdef ONE_SIDE
printf
(
"One Side communication active
\n
"
);
printf
(
"One Side communication active
\n
"
);
memcpy
(
Me
.
win
.
ptr
,
gridss
,
size_of_grid
);
MPI_Win_lock
(
MPI_LOCK_SHARED
,
target_rank
,
0
,
slabwin
);
MPI_Win_lock
(
MPI_LOCK_SHARED
,
target_rank
,
0
,
slabwin
);
MPI_Accumulate
(
gridss
,
size_of_grid
,
MPI_DOUBLE
,
target_rank
,
0
,
size_of_grid
,
MPI_DOUBLE
,
MPI_SUM
,
slabwin
);
MPI_Accumulate
(
gridss
,
size_of_grid
,
MPI_DOUBLE
,
target_rank
,
0
,
size_of_grid
,
MPI_DOUBLE
,
MPI_SUM
,
slabwin
);
MPI_Win_unlock
(
target_rank
,
slabwin
);
MPI_Win_unlock
(
target_rank
,
slabwin
);
...
...
This diff is collapsed.
Click to expand it.
init.c
+
4
−
0
View file @
624fdbdb
...
@@ -30,6 +30,10 @@ void init(int index)
...
@@ -30,6 +30,10 @@ void init(int index)
xaxis
=
local_grid_size_x
;
xaxis
=
local_grid_size_x
;
yaxis
=
local_grid_size_y
;
yaxis
=
local_grid_size_y
;
#ifdef USE_MPI
init_numa
(
rank
,
size
,
&
MYMPI_COMM_WORLD
,
&
Me
);
#endif
clock_gettime
(
CLOCK_MONOTONIC
,
&
begin
);
clock_gettime
(
CLOCK_MONOTONIC
,
&
begin
);
start
=
clock
();
start
=
clock
();
...
...
This diff is collapsed.
Click to expand it.
main.c
+
1
−
0
View file @
624fdbdb
...
@@ -28,6 +28,7 @@ int main(int argc, char * argv[])
...
@@ -28,6 +28,7 @@ int main(int argc, char * argv[])
#ifdef USE_FFTW
#ifdef USE_FFTW
fftw_mpi_init
();
fftw_mpi_init
();
#endif
#endif
MPI_Comm_dup
(
MPI_COMM_WORLD
,
&
MYMPI_COMM_WORLD
);
#else
#else
rank
=
0
;
rank
=
0
;
size
=
1
;
size
=
1
;
...
...
This diff is collapsed.
Click to expand it.
proto.h
+
4
−
0
View file @
624fdbdb
/* function declaration */
/* function declaration */
/* numa.c */
int
init_numa
(
int
,
int
,
MPI_Comm
*
,
map_t
*
);
int
shutdown_numa
(
int
,
int
,
MPI_Comm
*
,
map_t
*
);
/* init.c */
/* init.c */
void
init
(
int
i
);
void
init
(
int
i
);
...
...
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