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

Installation successful but received "Illegal instruction (core dumped)" #181

Open
alexandroskon opened this issue Mar 22, 2018 · 9 comments

Comments

@alexandroskon
Copy link

alexandroskon commented Mar 22, 2018

I am installing libcmaes on ubuntu 16.04 and I receive the message "Illegal instruction (core dumped)" when trying to run the tests. I have used the basic option for compilation and install as it was described in the README.md file.

./autogen.sh

echo "#define CMAES_EXPORT" > cmaes_export.h

./configure

make -j4

make install

There was no error during compilation and I have all the dependencies mentioned in README.md. Any ideas? Thanks!

@beniz
Copy link
Collaborator

beniz commented Mar 23, 2018

Hi, I can't reproduce, an installation from scratch works fine for me on 16.04. If you'd like to debug further you can try

libtool --mode=execute gdb ./simple_test

and use bt from within gdb to get a backtrace that you can post here.

@alexandroskon
Copy link
Author

alexandroskon commented Mar 23, 2018

Thanks for the quick reply. I executed the above command and the backtrace gave me
No stack.
I have attached the output file of valgrind if it's of any help. At the end of the valgrind run I get again
Illegal instruction (core dumped)
It's first time for me encountering this error and I don't really know how to debug it. Any other suggestion? Thanks!

P.S. I am also trying to compile the test code in README.md using
g++ --std=gnu++11 test.cpp -I$CMAES_HOME/src
and I am receiving
$CMAES_HOME/src/eo_matrix.h:26:23: fatal error: Eigen/Dense: No such file or directory.
(Even though I have libeigen3-dev installed in the system (by apt-get))

valout.txt

@lexy16
Copy link

lexy16 commented May 23, 2018

Hi, I have a similar issue.
I am installing libcmaes on Windows Subsystem for Linux (Ubuntu 18.04 LTS) and I try to run './test_functions'.
But it's throwing a Illegal instruction (core dumped).

gdb detail is below.

(gdb) run
Starting program: /mnt/c/Users/username/libcmaes/tests/.libs/test_functions
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
libcmaes::CMAParameters<libcmaes::GenoPheno<libcmaes::NoBoundStrategy, libcmaes::NoScalingStrategy> >::initialize_parameters (this=this@entry=0x82856c0 <rastrigin_params>) at cmaparameters.cc:83
83              sq_weights += _weights[i] * _weights[i];

and bt

(gdb) bt
#0  libcmaes::CMAParameters<libcmaes::GenoPheno<libcmaes::NoBoundStrategy, libcmaes::NoScalingStrategy> >::initialize_parameters (this=this@entry=0x82856c0 <rastrigin_params>) at cmaparameters.cc:83
#1  0x00007ffffefbf249 in libcmaes::CMAParameters<libcmaes::GenoPheno<libcmaes::NoBoundStrategy, libcmaes::NoScalingStrategy> >::CMAParameters (this=0x82856c0 <rastrigin_params>, x0=..., sigma=@0x7ffffffde3a8: 5, lambda=<optimized out>,    seed=<optimized out>, gp=...) at cmaparameters.cc:48
#2  0x0000000008041808 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)    at test-functions.cc:253
#3  _GLOBAL__sub_I__ZN8libcmaeslsERSoRKNS_7contourE () at test-functions.cc:728
#4  0x000000000806a0ed in __libc_csu_init ()
#5  0x00007ffffde41b28 in __libc_start_main (main=0x803f380 <main(int, char**)>, argc=1, argv=0x7ffffffde558,    init=0x806a0a0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffffffde548)    at ../csu/libc-start.c:266
#6  0x000000000804272a in _start ()

What happened? Thanks!

@beniz
Copy link
Collaborator

beniz commented May 23, 2018

See #185

@lexy16
Copy link

lexy16 commented May 31, 2018

Thanks for the quick reply.
I have took time to compile with -mfma until now.
And trying to run test_functions.
But it's throwing a Illegal instruction (core dumped).

Does nvm mean Node Version Manager?
Could you give me a little more advice?
Thanks!

@beniz
Copy link
Collaborator

beniz commented May 31, 2018

nvm means 'nevermind' I think :)

@lexy16
Copy link

lexy16 commented Jun 25, 2018

HI, I noticed that my CPU don't have the FMA.
Is this related to errors?
Thanks!

@beniz
Copy link
Collaborator

beniz commented Jun 25, 2018

@lexy16 I've decided to remove the optimization, try pulling the code again and building.

@lexy16
Copy link

lexy16 commented Jun 26, 2018

Thank you very much!! @beniz
I try git and build, and then it worked fine!
FIxed, thanks!
Today is a good day :)

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