Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MPIBP-Hummer
BioEM
Commits
4dc6c762
Commit
4dc6c762
authored
Jul 24, 2014
by
David Rohr
Browse files
Fix Indentation, Improve Debug Output
parent
e9b15195
Changes
1
Hide whitespace changes
Inline
Side-by-side
bioem.cpp
View file @
4dc6c762
...
...
@@ -386,7 +386,7 @@ int bioem::run()
if
(
DebugOutput
>=
1
)
timer2
.
ResetStart
();
if
(
DebugOutput
>=
2
)
timer
.
ResetStart
();
createProjection
(
iOrient
,
proj_mapFFT
);
if
(
DebugOutput
>=
2
)
printf
(
"Time Projection %d: %f (rank %d)
\n
"
,
iOrient
,
timer
.
GetCurrentElapsedTime
(),
mpi_rank
);
if
(
DebugOutput
>=
2
)
printf
(
"
\t
Time Projection %d: %f (rank %d)
\n
"
,
iOrient
,
timer
.
GetCurrentElapsedTime
(),
mpi_rank
);
// ***************************************************************************************
// ***** **** Internal Loop over convolutions **** *****
...
...
@@ -396,7 +396,7 @@ int bioem::run()
if
(
DebugOutput
>=
2
)
timer
.
ResetStart
();
createConvolutedProjectionMap
(
iOrient
,
iConv
,
proj_mapFFT
,
conv_map
,
conv_mapFFT
,
sumCONV
,
sumsquareCONV
);
if
(
DebugOutput
>=
2
)
printf
(
"Time Convolution %d %d: %f (rank %d)
\n
"
,
iOrient
,
iConv
,
timer
.
GetCurrentElapsedTime
(),
mpi_rank
);
if
(
DebugOutput
>=
2
)
printf
(
"
\t\t
Time Convolution %d %d: %f (rank %d)
\n
"
,
iOrient
,
iConv
,
timer
.
GetCurrentElapsedTime
(),
mpi_rank
);
// ***************************************************************************************
// *** Comparing each calculated convoluted map with all experimental maps ***
...
...
@@ -413,10 +413,10 @@ int bioem::run()
(((
double
)
param
.
param_device
.
NumberPixels
-
(
double
)
param
.
param_device
.
maxDisplaceCenter
/
2.
)
*
((
double
)
param
.
param_device
.
NumberPixels
-
(
double
)
param
.
param_device
.
maxDisplaceCenter
/
2.
)
*
2.
+
8.
)
*
(
double
)
sizeof
(
myfloat_t
)
/
compTime
;
const
double
nGBs2
=
(
double
)
RefMap
.
ntotRefMap
*
((
double
)
param
.
param_device
.
NumberPixels
*
(
double
)
param
.
param_device
.
NumberPixels
+
8.
)
*
(
double
)
sizeof
(
myfloat_t
)
/
compTime
;
printf
(
"Time Comparison %d %d: %f sec (%f GFlops, %f GB/s (cached), %f GB/s) (rank %d)
\n
"
,
iOrient
,
iConv
,
compTime
,
nFlops
/
1000000000.
,
nGBs
/
1000000000.
,
nGBs2
/
1000000000.
,
mpi_rank
);
printf
(
"
\t\t
Time Comparison %d %d: %f sec (%f GFlops, %f GB/s (cached), %f GB/s) (rank %d)
\n
"
,
iOrient
,
iConv
,
compTime
,
nFlops
/
1000000000.
,
nGBs
/
1000000000.
,
nGBs2
/
1000000000.
,
mpi_rank
);
}
}
if
(
DebugOutput
>=
1
)
printf
(
"Total time for
orienta
tion %d: %f (rank %d)
\n
"
,
iOrient
,
timer2
.
GetCurrentElapsedTime
(),
mpi_rank
);
if
(
DebugOutput
>=
1
)
printf
(
"
\t
Total time for
projec
tion %d: %f (rank %d)
\n
"
,
iOrient
,
timer2
.
GetCurrentElapsedTime
(),
mpi_rank
);
}
//deallocating fftw_complex vector
myfftw_free
(
proj_mapFFT
);
...
...
@@ -547,10 +547,10 @@ int bioem::run()
angProbfile
.
open
(
"ANG_PROB"
);
}
ofstream
ccProbfile
;
if
(
param
.
param_device
.
writeCC
)
{
ccProbfile
.
open
(
"CROSS_CORRELATION"
);
}
if
(
param
.
param_device
.
writeCC
)
{
ccProbfile
.
open
(
"CROSS_CORRELATION"
);
}
ofstream
outputProbFile
;
outputProbFile
.
open
(
"Output_Probabilities"
);
...
...
@@ -588,18 +588,18 @@ int bioem::run()
angProbfile
<<
" "
<<
iRefMap
<<
" "
<<
param
.
angles
[
iOrient
].
pos
[
0
]
<<
" "
<<
param
.
angles
[
iOrient
].
pos
[
1
]
<<
" "
<<
param
.
angles
[
iOrient
].
pos
[
2
]
<<
" "
<<
log
(
pProbAngle
.
forAngles
)
+
pProbAngle
.
ConstAngle
+
0.5
*
log
(
M_PI
)
+
(
1
-
param
.
param_device
.
Ntotpi
*
0.5
)
*
(
log
(
2
*
M_PI
)
+
1
)
+
log
(
param
.
param_device
.
volu
)
<<
" "
<<
log
(
param
.
param_device
.
volu
)
<<
"
\n
"
;
}
}
if
(
param
.
param_device
.
writeCC
)
{
int
cc
=
0
;
for
(
int
cent_x
=
0
;
cent_x
<
param
.
param_device
.
NumberPixels
;
cent_x
=
cent_x
+
param
.
param_device
.
CCdisplace
)
{
for
(
int
cent_y
=
0
;
cent_y
<
param
.
param_device
.
NumberPixels
;
cent_y
=
cent_y
+
param
.
param_device
.
CCdisplace
)
{
bioem_Probability_cc
&
pProbCC
=
pProb
.
getProbCC
(
iRefMap
,
cc
);
ccProbfile
<<
" "
<<
iRefMap
<<
" "
<<
cent_x
<<
" "
<<
cent_y
<<
" "
<<
log
(
pProbCC
.
forCC
)
<<
"
\n
"
;
}
}
if
(
param
.
param_device
.
writeCC
)
{
int
cc
=
0
;
for
(
int
cent_x
=
0
;
cent_x
<
param
.
param_device
.
NumberPixels
;
cent_x
=
cent_x
+
param
.
param_device
.
CCdisplace
)
{
for
(
int
cent_y
=
0
;
cent_y
<
param
.
param_device
.
NumberPixels
;
cent_y
=
cent_y
+
param
.
param_device
.
CCdisplace
)
{
bioem_Probability_cc
&
pProbCC
=
pProb
.
getProbCC
(
iRefMap
,
cc
);
ccProbfile
<<
" "
<<
iRefMap
<<
" "
<<
cent_x
<<
" "
<<
cent_y
<<
" "
<<
log
(
pProbCC
.
forCC
)
<<
"
\n
"
;
}
}
}
}
...
...
@@ -607,11 +607,11 @@ int bioem::run()
{
angProbfile
.
close
();
}
if
(
param
.
param_device
.
writeCC
)
{
ccProbfile
.
close
();
}
if
(
param
.
param_device
.
writeCC
)
{
ccProbfile
.
close
();
}
outputProbFile
.
close
();
}
...
...
Write
Preview
Supports
Markdown
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