diff --git a/bioem.cpp b/bioem.cpp index 44414d698562507e48c506fe0322a1cc67e0aca8..7c419d4344bb5d93530e1384075587a7dd61983b 100644 --- a/bioem.cpp +++ b/bioem.cpp @@ -569,15 +569,15 @@ int bioem::run() } if (DebugOutput >= 2) printf("\tTime Projection %d: %f (rank %d)\n", iOrientAtOnce, timer.GetCurrentElapsedTime(), mpi_rank); - for (int iOrient = iOrientAtOnce; iOrient < iTmpEnd;iOrient++) + /* Recalibrate if needed */ + if (Autotuning && ((iOrientAtOnce - iOrientStart) % RECALIB_FACTOR == 0) && ((iOrientEnd - iOrientAtOnce) > RECALIB_FACTOR) && (iOrientAtOnce != iOrientStart)) { - /* Recalibrate if needed */ - if (Autotuning && ((iOrient - iOrientStart) % RECALIB_FACTOR == 0) && ((iTmpEnd - iOrient) > RECALIB_FACTOR)) - { - aut.Reset(); - rebalance(aut.Workload()); - } + aut.Reset(); + rebalance(aut.Workload()); + } + for (int iOrient = iOrientAtOnce; iOrient < iTmpEnd;iOrient++) + { mycomplex_t* proj_mapFFT = &proj_mapsFFT[(iOrient - iOrientAtOnce) * ProjMapSize]; // ***************************************************************************************