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 hardware instruction #3492

Open
jcrismer opened this issue Dec 6, 2023 · 2 comments
Open

illegal hardware instruction #3492

jcrismer opened this issue Dec 6, 2023 · 2 comments

Comments

@jcrismer
Copy link

jcrismer commented Dec 6, 2023

Hi,

Running a script that uses some python packages (awebox: https://github.com/awebox/awebox) relying on casadi, I am encountering the following error:
[1] 45159 illegal hardware instruction python3

Without any additional information. I have installed the latest version of casadi (3.6.4) with python 3.10.7 and I am using an Apple machine that has a M1 chip.

The line triggering the error is the following:
sol = solver(x0=w0, lbx=bounds['lbw'], ubx=bounds['ubw'], lbg=bounds['lbg'], ubg=bounds['ubg'],
p=ca.vertcat(x0, ref, u_ref, Q, R, P))

where solver is created like this:
solver = ca.nlpsol('solver', 'ipopt', foldername + 'mpc_solver.so', opts)

and the mpc_solver.so was itself created from
mpc.solver.generate_dependencies('mpc_solver.c')
os.system("mv ./mpc_solver.c" + " " + src_filename)
os.system("gcc -fPIC -shared -O3 " + src_filename + " -o " + lib_filename)

I hope you will be to help with those informations,

Thanks in advance ;)

@jgillis
Copy link
Member

jgillis commented Dec 6, 2023

Hi jcrismer,

I'm not familiar with awebox other than hearing about its existance.
If you want to see the bug looked into, please provide exact instructions (or a script) to reproduce this..

@jcrismer
Copy link
Author

jcrismer commented Dec 7, 2023

It seems that doing "gcc -fPIC -shared -g" (instead od -O3) solved the problem. It is ok as temporary solution for me.

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

2 participants