Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal instruction (core dumped) on linux #795

Closed
belatulipo opened this issue Jul 4, 2019 · 11 comments
Closed

Illegal instruction (core dumped) on linux #795

belatulipo opened this issue Jul 4, 2019 · 11 comments

Comments

@belatulipo
Copy link

I'm trying to compile ANTs on ubuntu 18.04 using the instructions. I have searched and searched and I've done everything I can think of. Please help me understand what the problem is.
I have a laptop and a desktop computer with the same OS. With my laptop the system just crashed after the "make" command. With the desktop I get this error:

Illegal instruction (core dumped)
Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/hdf5-static.dir/build.make:61: recipe for target 'Modules/ThirdParty/HDF5/src/itkhdf5/H5Tinit.c' failed
make[5]: *** [Modules/ThirdParty/HDF5/src/itkhdf5/H5Tinit.c] Error 132
make[5]: *** Deleting file 'Modules/ThirdParty/HDF5/src/itkhdf5/H5Tinit.c'
CMakeFiles/Makefile2:7779: recipe for target 'Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/hdf5-static.dir/all' failed
make[4]: *** [Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/hdf5-static.dir/all] Error 2
make[4]: *** Waiting for unfinished jobs....
.
.
.
[ 58%] Built target gdcmDSED
Makefile:151: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/ITKv5.dir/build.make:112: recipe for target 'ITKv5-prefix/src/ITKv5-stamp/ITKv5-build' failed
make[2]: *** [ITKv5-prefix/src/ITKv5-stamp/ITKv5-build] Error 2
CMakeFiles/Makefile2:109: recipe for target 'CMakeFiles/ITKv5.dir/all' failed
make[1]: *** [CMakeFiles/ITKv5.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

@gdevenyi
Copy link
Contributor

gdevenyi commented Jul 4, 2019

likely overheating. Not an ANTs bug.

@belatulipo
Copy link
Author

I tried again after shutting down the whole system for hours and I got the exact same error. I don't think it's overheating. Any suggestions?

@gdevenyi
Copy link
Contributor

gdevenyi commented Jul 5, 2019

Building ANTs on 18.04 does not result in such issues on any systems I admin, or during our automated builds. Given that, I suspect it is an issue with your system.

Check "dmesg" for signs of thermal throttling.

Another possibility is bad ram, check memtest86+

@cookpa
Copy link
Member

cookpa commented Jul 9, 2019

@belatulipo is this native Linux or a VM / WSL?

@belatulipo
Copy link
Author

Building ANTs on 18.04 does not result in such issues on any systems I admin, or during our automated builds. Given that, I suspect it is an issue with your system.

Check "dmesg" for signs of thermal throttling.

Another possibility is bad ram, check memtest86+

Thank you I will try that.
I was able to successfully compile it on 16.04 at the research center. But I prefer to have it on my own computer as well.

@belatulipo
Copy link
Author

@belatulipo is this native Linux or a VM / WSL?
Native linux.

@cookpa
Copy link
Member

cookpa commented Jul 11, 2019

Thanks. I'm working on a VM, where I can successfully compile using 18.04 / GCC 7:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1) 

It might be related to this issue

#764

I can't test this because I can't reproduce the problem.

@cookpa
Copy link
Member

cookpa commented Jul 16, 2019

This commit might fix the problem, at least for some machines

691c865#diff-821bb4259dcdb7f026034ba1b16e553c

CC: @ronangarrison

@gdevenyi
Copy link
Contributor

This problem was actually introduced earlier:
2d54c16

@gdevenyi
Copy link
Contributor

To be clear, the devs believe the issue is that your CPU is older than corei7, which is what our default "arch" setting is:
https://github.com/ANTsX/ANTs/blob/master/CMake/ITKSetStandardCompilerFlags.cmake#L245

You can adjust this by adding "-march=native" to your compile options.

@cookpa
Copy link
Member

cookpa commented Dec 11, 2019

@cookpa cookpa closed this as completed Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants