Closed do-jason closed 4 years ago
Please don't enable #define TIMING
globally by preprocesser flags. It should be enabled only in one file.
Please don't enable
#define TIMING
globally by preprocesser flags.. It should be enabled only in one file.
It is globally enabled when CMAKE_BUILD_TYPE=Benchmarking was set. I love to use this build since there is almost no performance difference between "Release" and "Behchmarking" and "Benchmarking" gives some more detailed timing for each iteration. And as mentioned above, changing "Timer EERtimer" in renderEER.cpp file will resolve this issue.
In cmake/BuildTypes.cmake file, there is set(RELION_DEFINITIONS_BENCHMARKING "-DCUDA_BENCHMARK -DTIMING") statement.
Please see https://github.com/3dem/relion/issues/587.
CMAKE_BUILD_TYPE=Benchmarking
is no longer maintained and probably broken. If you can restore it (including GPU builds), please go ahead and send a pull request.
Fixed by 667a2cb.
@biochem-fan The above fix has typo in src/motioncorr_runner.cpp file.
MCtimer_fftw.printTimes(false);
MCtimer_fftw should be timer_fftw since there is timer_fftw declaration which does not conflict with timer.
I have tried latest ver3.1 version with Intel compiler and got the below error during the linking while most of the executables are created.
../../lib/librelion_lib.a(renderEER.cpp.o):(.bss+0x0): multiple definition of `timer' ../../lib/librelion_lib.a(motioncorr_runner.cpp.o):(.bss+0x0): first defined here make[2]: *** [src/apps/CMakeFiles/run_motioncorr.dir/build.make:95: bin/relion_run_motioncorr] Error 1
I have checked src/renderEER.cpp and src/motioncorr_runner.cpp and these have the same "Timer timer;" class instance name. Changing the instance name of Timer class in src/renderERR.cpp will resolve this issue.