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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Claudio Gheller
HPC_Imaging
Commits
11192972
Commit
11192972
authored
3 years ago
by
Nandhana Sakhtivel
Browse files
Options
Downloads
Patches
Plain Diff
Revamp of read file
parent
64adac63
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+8
-5
8 additions, 5 deletions
Makefile
allvars.c
+14
-0
14 additions, 0 deletions
allvars.c
allvars.h
+68
-0
68 additions, 0 deletions
allvars.h
w-stacking-fftw.c
+231
-265
231 additions, 265 deletions
w-stacking-fftw.c
with
321 additions
and
270 deletions
Makefile
+
8
−
5
View file @
11192972
...
...
@@ -13,8 +13,11 @@ else
include
Build/Makefile.systype
endif
FFTW_MPI_INC
=
-I
/
${
HOME
}
/include
FFTW_MPI_LIB
=
/
${
HOME
}
/lib
LIBS
=
-L
$(
FFTW_LIB
)
-lfftw3
-lm
-lcudart
-lcuda
CFLAGS
+=
$(
FFTW_MPI_INC
)
LIBS
=
-L
$(
FFTW_MPI_LIB
)
-lfftw3_mpi
-lfftw3
-lm
#-lcudart -lcuda
# create MPI code
OPT
+=
-DUSE_MPI
...
...
@@ -22,12 +25,12 @@ OPT += -DUSE_MPI
# use FFTW (it can be switched on ONLY if MPI is active)
ifeq
(USE_MPI,$(findstring USE_MPI,$(OPT)))
OPT
+=
-DUSE_FFTW
LIBS
=
-L
$(
FFTW_LIB
)
-lfftw3_mpi
-lfftw3
-lm
LIBS
=
-L
$(
FFTW_
MPI_
LIB
)
-lfftw3_mpi
-lfftw3
-lm
endif
#OPT += -DNVIDIA
# 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
#OPT += -DWRITE_DATA
# write the final image
...
...
@@ -36,8 +39,8 @@ OPT += -DWRITE_IMAGE
OPT
+=
-DPHASE_ON
DEPS
=
w-stacking.h w-stacking-fftw.c w-stacking.cu phase_correction.cu
COBJ
=
w-stacking.o w-stacking-fftw.o phase_correction.o
DEPS
=
w-stacking.h w-stacking-fftw.c w-stacking.cu phase_correction.cu
allvars.h
COBJ
=
w-stacking.o w-stacking-fftw.o phase_correction.o
allvars.o
w-stacking.c
:
w-stacking.cu
cp
w-stacking.cu w-stacking.c
...
...
This diff is collapsed.
Click to expand it.
allvars.c
0 → 100644
+
14
−
0
View file @
11192972
#include
"allvars.h"
struct
io
file
;
struct
ip
in
=
{
"ucoord.bin"
,
"vcoord.bin"
,
"wcoord.bin"
,
"weights.bin"
,
"visibilities_real.bin"
,
"visibilities_img.bin"
,
"meta.txt"
};
struct
op
out
=
{
"grid.txt"
,
"coords.txt"
,
"grid_real.bin"
,
"grid_img.bin"
,
"fft.txt"
,
"fft_real.bin"
,
"fft_img.bin"
,
"run.log"
,
".txt"
,
"timings.dat"
};
struct
meta
metaData
;
struct
time
timing
;
char
filename
[
1000
];
This diff is collapsed.
Click to expand it.
allvars.h
0 → 100644
+
68
−
0
View file @
11192972
/* file to store global variables*/
#include
<stdio.h>
extern
struct
io
{
FILE
*
pFile
;
FILE
*
pFile1
;
FILE
*
pFilereal
;
FILE
*
pFileimg
;
}
file
;
extern
struct
ip
{
char
ufile
[
30
];
char
vfile
[
30
];
char
wfile
[
30
];
char
weightsfile
[
30
];
char
visrealfile
[
30
];
char
visimgfile
[
30
];
char
metafile
[
30
];
}
in
;
extern
struct
op
{
char
outfile
[
30
];
char
outfile1
[
30
];
char
outfile2
[
30
];
char
outfile3
[
30
];
char
fftfile
[
30
];
char
fftfile2
[
30
];
char
fftfile3
[
30
];
char
logfile
[
30
];
char
extension
[
30
];
char
timingfile
[
30
];
}
out
;
extern
struct
meta
{
long
Nmeasures
,
Nmeasures0
;
long
Nvis
,
Nvis0
;
long
Nweights
,
Nweights0
;
long
freq_per_chan
,
freq_per_chan0
;
long
polarisations
,
polarisations0
;
long
Ntimes
,
Ntimes0
;
double
dt
,
dt0
;
double
thours
,
thours0
;
long
baselines
,
baselines0
;
double
uvmin
,
uvmin0
;
double
uvmax
,
uvmax0
;
double
wmin
,
wmin0
;
double
wmax
,
wmax0
;
}
metaData
;
extern
struct
time
{
double
setup_time
,
process_time
,
mpi_time
,
fftw_time
,
tot_time
,
kernel_time
,
reduce_time
,
compose_time
,
phase_time
;
double
setup_time1
,
process_time1
,
mpi_time1
,
fftw_time1
,
tot_time1
,
kernel_time1
,
reduce_time1
,
compose_time1
,
phase_time1
;
double
writetime
,
writetime1
;
}
timing
;
extern
char
filename
[
1000
];
This diff is collapsed.
Click to expand it.
w-stacking-fftw.c
+
231
−
265
View file @
11192972
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