Commit 4dc6c762 authored by David Rohr's avatar David Rohr
Browse files

Fix Indentation, Improve Debug Output

parent e9b15195
...@@ -386,7 +386,7 @@ int bioem::run() ...@@ -386,7 +386,7 @@ int bioem::run()
if (DebugOutput >= 1) timer2.ResetStart(); if (DebugOutput >= 1) timer2.ResetStart();
if (DebugOutput >= 2) timer.ResetStart(); if (DebugOutput >= 2) timer.ResetStart();
createProjection(iOrient, proj_mapFFT); createProjection(iOrient, proj_mapFFT);
if (DebugOutput >= 2) printf("Time Projection %d: %f (rank %d)\n", iOrient, timer.GetCurrentElapsedTime(), mpi_rank); if (DebugOutput >= 2) printf("\tTime Projection %d: %f (rank %d)\n", iOrient, timer.GetCurrentElapsedTime(), mpi_rank);
// *************************************************************************************** // ***************************************************************************************
// ***** **** Internal Loop over convolutions **** ***** // ***** **** Internal Loop over convolutions **** *****
...@@ -396,7 +396,7 @@ int bioem::run() ...@@ -396,7 +396,7 @@ int bioem::run()
if (DebugOutput >= 2) timer.ResetStart(); if (DebugOutput >= 2) timer.ResetStart();
createConvolutedProjectionMap(iOrient, iConv, proj_mapFFT, conv_map, conv_mapFFT, sumCONV, sumsquareCONV); 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\tTime Convolution %d %d: %f (rank %d)\n", iOrient, iConv, timer.GetCurrentElapsedTime(), mpi_rank);
// *************************************************************************************** // ***************************************************************************************
// *** Comparing each calculated convoluted map with all experimental maps *** // *** Comparing each calculated convoluted map with all experimental maps ***
...@@ -413,10 +413,10 @@ int bioem::run() ...@@ -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; (((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; 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\tTime 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 orientation %d: %f (rank %d)\n", iOrient, timer2.GetCurrentElapsedTime(), mpi_rank); if (DebugOutput >= 1) printf("\tTotal time for projection %d: %f (rank %d)\n", iOrient, timer2.GetCurrentElapsedTime(), mpi_rank);
} }
//deallocating fftw_complex vector //deallocating fftw_complex vector
myfftw_free(proj_mapFFT); myfftw_free(proj_mapFFT);
...@@ -547,10 +547,10 @@ int bioem::run() ...@@ -547,10 +547,10 @@ int bioem::run()
angProbfile.open ("ANG_PROB"); angProbfile.open ("ANG_PROB");
} }
ofstream ccProbfile; ofstream ccProbfile;
if(param.param_device.writeCC) if(param.param_device.writeCC)
{ {
ccProbfile.open ("CROSS_CORRELATION"); ccProbfile.open ("CROSS_CORRELATION");
} }
ofstream outputProbFile; ofstream outputProbFile;
outputProbFile.open ("Output_Probabilities"); outputProbFile.open ("Output_Probabilities");
...@@ -588,18 +588,18 @@ int bioem::run() ...@@ -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"; 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) if(param.param_device.writeCC)
{ {
int cc=0; 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_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) 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); bioem_Probability_cc& pProbCC = pProb.getProbCC(iRefMap, cc);
ccProbfile << " " << iRefMap << " " << cent_x << " " << cent_y << " " << log(pProbCC.forCC) <<"\n"; ccProbfile << " " << iRefMap << " " << cent_x << " " << cent_y << " " << log(pProbCC.forCC) <<"\n";
} }
} }
} }
} }
...@@ -607,11 +607,11 @@ int bioem::run() ...@@ -607,11 +607,11 @@ int bioem::run()
{ {
angProbfile.close(); angProbfile.close();
} }
if(param.param_device.writeCC)
{
ccProbfile.close();
}
if(param.param_device.writeCC)
{
ccProbfile.close();
}
outputProbFile.close(); outputProbFile.close();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment