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
a3badff9
Commit
a3badff9
authored
3 years ago
by
Claudio Gheller
Browse files
Options
Downloads
Patches
Plain Diff
timings collected in ascii file
parent
90ef6004
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
phase_correction.cu
+8
-0
8 additions, 0 deletions
phase_correction.cu
w-stacking-fftw.c
+12
-0
12 additions, 0 deletions
w-stacking-fftw.c
with
20 additions
and
0 deletions
phase_correction.cu
+
8
−
0
View file @
a3badff9
...
@@ -108,12 +108,18 @@ void phase_correction(double* gridss, double* image_real, double* image_imag, in
...
@@ -108,12 +108,18 @@ void phase_correction(double* gridss, double* image_real, double* image_imag, in
double
*
gridss_g
;
double
*
gridss_g
;
mmm
=
cudaMalloc
(
&
gridss_g
,
2
*
num_w_planes
*
xaxis
*
yaxis
*
sizeof
(
double
));
mmm
=
cudaMalloc
(
&
gridss_g
,
2
*
num_w_planes
*
xaxis
*
yaxis
*
sizeof
(
double
));
printf
(
"CUDA ERROR 1 %s
\n
"
,
cudaGetErrorString
(
mmm
));
mmm
=
cudaMalloc
(
&
image_real_g
,
xaxis
*
yaxis
*
sizeof
(
double
));
mmm
=
cudaMalloc
(
&
image_real_g
,
xaxis
*
yaxis
*
sizeof
(
double
));
printf
(
"CUDA ERROR 2 %s
\n
"
,
cudaGetErrorString
(
mmm
));
mmm
=
cudaMalloc
(
&
image_imag_g
,
xaxis
*
yaxis
*
sizeof
(
double
));
mmm
=
cudaMalloc
(
&
image_imag_g
,
xaxis
*
yaxis
*
sizeof
(
double
));
printf
(
"CUDA ERROR 3 %s
\n
"
,
cudaGetErrorString
(
mmm
));
mmm
=
cudaMemcpy
(
gridss_g
,
gridss
,
2
*
num_w_planes
*
xaxis
*
yaxis
*
sizeof
(
double
),
cudaMemcpyHostToDevice
);
mmm
=
cudaMemcpy
(
gridss_g
,
gridss
,
2
*
num_w_planes
*
xaxis
*
yaxis
*
sizeof
(
double
),
cudaMemcpyHostToDevice
);
printf
(
"CUDA ERROR 4 %s
\n
"
,
cudaGetErrorString
(
mmm
));
mmm
=
cudaMemset
(
image_real_g
,
0.0
,
xaxis
*
yaxis
*
sizeof
(
double
));
mmm
=
cudaMemset
(
image_real_g
,
0.0
,
xaxis
*
yaxis
*
sizeof
(
double
));
printf
(
"CUDA ERROR 5 %s
\n
"
,
cudaGetErrorString
(
mmm
));
mmm
=
cudaMemset
(
image_imag_g
,
0.0
,
xaxis
*
yaxis
*
sizeof
(
double
));
mmm
=
cudaMemset
(
image_imag_g
,
0.0
,
xaxis
*
yaxis
*
sizeof
(
double
));
printf
(
"CUDA ERROR 6 %s
\n
"
,
cudaGetErrorString
(
mmm
));
// call the phase correction kernel
// call the phase correction kernel
phase_g
<<<
Nbl
,
Nth
>>>
(
xaxis
,
phase_g
<<<
Nbl
,
Nth
>>>
(
xaxis
,
...
@@ -131,7 +137,9 @@ void phase_correction(double* gridss, double* image_real, double* image_imag, in
...
@@ -131,7 +137,9 @@ void phase_correction(double* gridss, double* image_real, double* image_imag, in
nbucket
);
nbucket
);
mmm
=
cudaMemcpy
(
image_real
,
image_real_g
,
xaxis
*
yaxis
*
sizeof
(
double
),
cudaMemcpyDeviceToHost
);
mmm
=
cudaMemcpy
(
image_real
,
image_real_g
,
xaxis
*
yaxis
*
sizeof
(
double
),
cudaMemcpyDeviceToHost
);
printf
(
"CUDA ERROR 7 %s
\n
"
,
cudaGetErrorString
(
mmm
));
mmm
=
cudaMemcpy
(
image_imag
,
image_imag_g
,
xaxis
*
yaxis
*
sizeof
(
double
),
cudaMemcpyDeviceToHost
);
mmm
=
cudaMemcpy
(
image_imag
,
image_imag_g
,
xaxis
*
yaxis
*
sizeof
(
double
),
cudaMemcpyDeviceToHost
);
printf
(
"CUDA ERROR 8 %s
\n
"
,
cudaGetErrorString
(
mmm
));
#else
#else
...
...
This diff is collapsed.
Click to expand it.
w-stacking-fftw.c
+
12
−
0
View file @
a3badff9
...
@@ -70,6 +70,7 @@ int main(int argc, char * argv[])
...
@@ -70,6 +70,7 @@ int main(int argc, char * argv[])
char
logfile
[
30
]
=
"run.log"
;
char
logfile
[
30
]
=
"run.log"
;
char
extension
[
30
]
=
".txt"
;
char
extension
[
30
]
=
".txt"
;
char
srank
[
4
];
char
srank
[
4
];
char
timingfile
[
30
]
=
"timings.dat"
;
double
*
uu
;
double
*
uu
;
double
*
vv
;
double
*
vv
;
...
@@ -940,6 +941,17 @@ int main(int argc, char * argv[])
...
@@ -940,6 +941,17 @@ int main(int argc, char * argv[])
}
}
}
}
if
(
rank
==
0
)
{
pFile
=
fopen
(
timingfile
,
"w"
);
if
(
num_threads
==
1
)
{
fprintf
(
pFile
,
"%f %f %f %f %f %f %f
\n
"
,
setup_time
,
kernel_time
,
compose_time
,
reduce_time
,
fftw_time
,
phase_time
,
tot_time
);
}
else
{
fprintf
(
pFile
,
"%f %f %f %f %f %f %f
\n
"
,
setup_time1
,
kernel_time1
,
compose_time1
,
reduce_time1
,
fftw_time1
,
phase_time1
,
tot_time1
);
}
fclose
(
pFile
);
}
// Close MPI environment
// Close MPI environment
#ifdef USE_MPI
#ifdef USE_MPI
...
...
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