> For the complete documentation index, see [llms.txt](https://docs-ksc.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-ksc.gitbook.io/blog/tips/common/cpu-related-error-illegal-instruction.md).

# CPU 관련 오류 사항 ( illegal instruction )

* 오류 내용
  * Program Exception - illegal instruction
* 원인
  * CPU에 최적화된 옵션을 사용한 프로그램이 다른 타입의 CPU 에서 실행 하는 경우 발생합니다.
* 조치사항
  * 사용할 CPU 타입에 맞게 프로그램을 재 컴파일을 진행 해야 합니다.
  * 각 컴파일러 별 CPU 타입에 맞는 최적화 옵션은 아래 참고 사항을 확인하시기 바랍니다.

**※ 참고 : 컴파일러 별 AVX-512 옵션**&#x20;

각 컴파일러들에서 INTEL AVX-512(Advanced Vector Extensions 512) 를 활성화 시키는 옵션입니다.

INTEL AVX-512 참고 : <https://en.wikipedia.org/wiki/AVX-512>

**\[GNU]**

\- Skylake : -march=skylake-avx512

\- KNL : -march=knl

&#x20;

**\[Intel]**

\- Skylake : -xCORE-AVX512

\- KNL : -xMIC-AVX512

※ 참고 : <https://software.intel.com/en-us/articles/compiling-for-the-intel-xeon-phi-processor-and-the-intel-avx-512-isa>

**\[PGI]**

\- Skylake : -tp=skylake

\- KNL : -tp=knl

※ 참고 : <https://www.pgroup.com/resources/docs/18.1/x86/pgi-release-notes/index.htm>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-ksc.gitbook.io/blog/tips/common/cpu-related-error-illegal-instruction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
