Closed eariascib closed 2 years ago
What if you replace all occurances of isnan
with std::isnan
in src/jaz/tomography/local_particle_refinement.cpp
?
(I think) you have to install a more recent version of gcc g++ (at least gcc-6)
Thanks for the reply. I've installed gcc 7, 8 and 9 but I obtained a compilation error because the cuda version that we currently have (8.0) is not compatible with gcc versions higher than 5. I'll install a new version of the NVIDIA driver and CUDA and try again.
@eariascib Did you try what I suggested last month?
Yes, sorry. I think I replied to your email but I didn't post my response here. I did replace all occurrences of isnan with std::isnan in src/jaz/tomography/local_particle_refinement.cpp and the compilation went fine.
Good morning,
I am trying to compile Relion4.0 on a dual GPU workstation and I am getting an error message when it tries to compile tomo_ctf_find.cpp.o
I would be very grateful if you could give me some assistance to solve this issue.
The workstation has the following configuration:
Environment:
I have installed Relion3.1 in this machine before, but I am getting an error with this version. I have specifically entered as superuser:
git clone https://github.com/3dem/relion.git
cd relion
git checkout ver4.0
mkdir build
cd build/
cmake -DCUDA_ARCH=61 -DFORCE_OWN_FFTW=ON -DFORCE_OWN_FLTK=ON ..
make -j 6
Error message:
[ 19%] Building CXX object src/apps/CMakeFiles/relion_lib.dir//jaz/tomography/local_particle_refinement.cpp.o [ 19%] Building CXX object src/apps/CMakeFiles/relion_lib.dir//jaz/tomography/tomo_ctf_find.cpp.o /usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.cpp: In member function ‘double LocalParticleRefinement::f(const std::vector&, void*) const’:
/usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.cpp:138:17: error: ‘isnan’ was not declared in this scope
if (isnan(x[i])) return std::numeric_limits::max();
^
/usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.cpp:138:17: note: suggested alternative:
In file included from /usr/local/relion_4.0_beta/src/funcs.h:50:0,
from /usr/local/relion_4.0_beta/src/metadata_table.h:43,
from /usr/local/relion_4.0_beta/src/jaz/tomography/particle_set.h:4,
from /usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.h:5,
from /usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.cpp:1:
/usr/include/c++/5/cmath:641:5: note: ‘std::isnan’
isnan(_Tp x)
^
/usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.cpp: In member function ‘void LocalParticleRefinement::grad(const std::vector&, std::vector&, void*) const’:
/usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.cpp:225:17: error: ‘isnan’ was not declared in this scope
if (isnan(x[i])) return;
^
/usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.cpp:225:17: note: suggested alternative:
In file included from /usr/local/relion_4.0_beta/src/funcs.h:50:0,
from /usr/local/relion_4.0_beta/src/metadata_table.h:43,
from /usr/local/relion_4.0_beta/src/jaz/tomography/particle_set.h:4,
from /usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.h:5,
from /usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.cpp:1:
/usr/include/c++/5/cmath:641:5: note: ‘std::isnan’
isnan(_Tp x)
^
/usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.cpp: In member function ‘virtual double LocalParticleRefinement::gradAndValue(const std::vector&, std::vector&) const’:
/usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.cpp:401:17: error: ‘isnan’ was not declared in this scope
if (isnan(x[i])) return std::numeric_limits::max();
^
/usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.cpp:401:17: note: suggested alternative:
In file included from /usr/local/relion_4.0_beta/src/funcs.h:50:0,
from /usr/local/relion_4.0_beta/src/metadata_table.h:43,
from /usr/local/relion_4.0_beta/src/jaz/tomography/particle_set.h:4,
from /usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.h:5,
from /usr/local/relion_4.0_beta/src/jaz/tomography/local_particle_refinement.cpp:1:
/usr/include/c++/5/cmath:641:5: note: ‘std::isnan’
isnan(_Tp x)
^
src/apps/CMakeFiles/relion_lib.dir/build.make:2198: recipe for target 'src/apps/CMakeFiles/relion_lib.dir//jaz/tomography/local_particle_refinement.cpp.o' failed
make[2]: [src/apps/CMakeFiles/relion_lib.dir/__/jaz/tomography/local_particle_refinement.cpp.o] Error 1
make[2]: Waiting for unfinished jobs....
CMakeFiles/Makefile2:4611: recipe for target 'src/apps/CMakeFiles/relion_lib.dir/all' failed
make[1]: [src/apps/CMakeFiles/relion_lib.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: [all] Error 2
Thank you very much for your help. Kind regards, Ernesto.