- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On a host with an AMD Ryzen 9 9900X CPU (Zen 5 architecture), compiling a Fortran 90 code with the -fast option raises a compilation error: "Unknown target CPU 'native'." The compilation works fine without this option.
As a workaround, I'm currently using -O3 -march=znver5 instead, which resolves the issue.
Is this a known issue for ifx on AMD Ryzen platforms, specifically with Zen 5 architecture?
System Information:
CPU: AMD Ryzen 9 9900X 12-Core Processor
Operating System: Ubuntu 24.04
Compiler Version: ifx (IFX) 2025.2.1 20250806
hello.f90:
program hello_world implicit none print *, "Hello, World!" end program hello_world
ifx -fast -o hello.out hello.f90
Output:
hello.f90: error #5544: Unknown target CPU 'native'. Valid CPU targets: ... compilation aborted for hello.f90 (code 1)
Thank you,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-fast implies -xHost, which is the only -x option supporting execution on non-Intel processors. I wrote the original code to support -xHost, using the CPUINFO instruction to look at instruction sets supported and selecting the best -march option to match that. I'm pretty sure that code was replaced some years ago with some that uses specific architecture names, and it probably hasn't been updated to account for Zen5.
It may be that the LLVM backend has its own knowledge of -march names, which is why explicitly specifying znver5 works.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't have the answer to your question. However, concerning the -march option, 'znver5' does not seem to be a valid processor name according to the compiler doc (https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2025-2/march.html ). I'm not sure what the compiler does if the processor name is not recognized.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-fast implies -xHost, which is the only -x option supporting execution on non-Intel processors. I wrote the original code to support -xHost, using the CPUINFO instruction to look at instruction sets supported and selecting the best -march option to match that. I'm pretty sure that code was replaced some years ago with some that uses specific architecture names, and it probably hasn't been updated to account for Zen5.
It may be that the LLVM backend has its own knowledge of -march names, which is why explicitly specifying znver5 works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you both for the replies.
I will continue to use the explicit "-03 -march=znver5" workaround for now.
Your answers have been incredibly helpful. Thank you again for your insights.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page