I am getting CI failures with ifx 2025.1 apparently due to architecture flags while building fpm: I would like to ask you help as I don’t have an OneAPI installation on my mac setup. Compilation flags are:
flags=-O3 -xHost -unroll -O3 -fast
The error message says that “native” is not valid but I’m puzzled. Is that a byproduct of -xHost?
did you try upgrading the CI to use ifx 2025.2 and check ?
If this is the case then maybe it is a general problem with the github runners on AMD CPUs … would be a bummer if this would force to manually adapt the flags.
On my side -xHost works but it is an intel CPU, it would be necessary to test on a AMD CPU.
Unfortunately it does not help. Yeah I believe github may pickup either an AMD or an Intel CPU for the x86_64 platform, which is actually a good thing - the setup has to work either way.
It’s usually not a good idea to set the -fast flag, unless you’re certain you’re going to run the executable in the exact same host it was compiled. The ifx man page has the note:
NOTE: Option fast sets some aggressive optimizations that may not be appropriate for all applications. The resulting exe‐
cutable may not run on processor types different from the one on which you compile. You should make sure that you understand
the individual optimization options that are enabled by option fast.
That is, the -fast flag is mostly for benchmark purposes and might change substantially from one version to another.
ifort man page has
On ifort, it sets the following options:
-ipo, -O3, -no-prec-div,-static, -fp-model fast=2, and -xHost
And ifx has
It sets the following options:
-ipo, -O3, -static, -fp-model fast
So, you could just explicitly set the flags you want and avoid the hassle.
Thanks, that looks like a good solution. I agree avoiding xHost (also through -fast) is definitely the way to go. That said, the native issue definitely looks like a bug to me; I hope posting it here will be useful.