Illegal instruction(cpre dumped)

Posted AI浩

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Illegal instruction(cpre dumped)相关的知识,希望对你有一定的参考价值。

项目场景:

在使用英伟达Jetson平台执行Python时命令的出现“Illegal instruction(cpre dumped)”错误


问题描述

在使用英伟达Jetson平台执行Python时命令的出现“Illegal instruction(cpre dumped)”错误,导致Python命令无法执行。

原因分析:

详见这里:
https://stackoverflow.com/questions/65631801/illegal-instructioncore-dumped-error-on-jetson-nano

The ‘illegal instruction’ could be due to an recent change in the getauxval(AT_HWCAP).
An attempt to read cpuid information from /sys/devices in the event that getauxval did not succeed. (OpenBLAS PRs 2952 and 3004)

export OPENBLAS_CORETYPE=ARMV8 (or whatever the actual hardware is) before launching python should hopefully get around this. For example:

OPENBLAS_CORETYPE=ARMV8 python

The ‘illegal instruction’ could be due to an recent change in the getauxval(AT_HWCAP).
An attempt to read cpuid information from /sys/devices in the event that getauxval did not succeed. (OpenBLAS PRs 2952 and 3004)

export OPENBLAS_CORETYPE=ARMV8 (or whatever the actual hardware is) before launching python should hopefully get around this. For example:

OPENBLAS_CORETYPE=ARMV8 python
If you would like to make this export permanent, you should open your .bashrc file by typing on the terminal:

nano ~/.bashrc

Afterwards, just add “export OPENBLAS_CORETYPE=ARMV8” to the bottom of your .bashrc file, save/exit and reboot your system:

export OPENBLAS_CORETYPE=ARMV8

for more details look at:

https://github.com/numpy/numpy/issues/18131 https://www.reddit.com/r/JetsonNano/comments/ktcyoh/illegal_instructioncore_dumped_error_on_jetson/

解决方案:

执行命令:

export OPENBLAS_CORETYPE=ARMV8

永久的解决方法:将上面这句话添加到~/.bashrc中。
命令:

gedit ~/.bashrc

打开~/.bashrc 在末尾加入

export OPENBLAS_CORETYPE=ARMV8

关闭文件

source ~/.bashrc

更新配置。

然后就可以使用。唉!问题可真多。

以上是关于Illegal instruction(cpre dumped)的主要内容,如果未能解决你的问题,请参考以下文章

Illegal instruction 怎么办

Tensorflow: illegal instruction (core dumped) 的解决方法记录

Illegal instruction 怎么办

Illegal instruction 怎么办

“ucrtbase.dll”中的 _snprintf_s() 崩溃,状态为 STATUS_ILLEGAL_INSTRUCTION

illegal instruction