본문 바로가기

NVIDIA Jeston/Jetson BSP

[Jetson] python 실행 중 Illegal instruction 오류

Illegal instruction on Jetson platform

python 실행 중 Illegal instruction 오류 발생

Illegal instruction 현상

Jetson 에서 임의의 파이선 프로그램 실행 시, py 코드에 들어가지도 못하고 Illegal instruction 이 발생되는 문제가 있었다.

$ python3 abc.py
Illegal instruction (core dumped)

이 문제의 원인은 다양할 수 있다. 예를 들어 /sys/device  에서 cpuid 를 읽으려는 시도 등에서 발생할 수 있는데, 이 경우에는 OPENBLAS_CORETYPE=ARMV8 선언으로 해결될 수 있다.

export OPENBLAS_CORETYPE=ARMV8 python

매번 터미널에서 export 해야한다면, .bashrc 에 이 환경변수를 등록하는 것을 권장한다.

참고자료

Illegal instruction (core dumped)” Xavier

https://forums.developer.nvidia.com/t/illegal-instruction-core-dumped-xavier/166278

 

" Illegal instruction (core dumped)" Xavier

when i import numpy on python3 shell, it says " Illegal instruction (core dumped)" on xavier.How can i solve this problem? my pip3 list is : Cython 0.29.21 numpy 1.19.5 pip 20.3.3 setuptools 51.0.0 torch 1.1.0 wheel 0.36.1

forums.developer.nvidia.com

  1. Run export OPENBLAS_CORETYPE=ARMV8 in your terminal. It will remain active as long as that terminal remains open.
  2. Add export OPENBLAS_CORETYPE=ARMV8 to your ~/.bashrc. It will set that environment variable on every new terminal that is opened.