Interoperability of logical(C_BOOL) with bool in C requires to set the fpscomp logicals option for the Intel oneAPI Fortran compiler. Since this is included in -standard-semantics, I set it.
Unfortunately, -standard-semantics increases runtime in my case from 90s to 2000s, i.e. by a factor of 20. I find this enormous, especially given the fact that -standard-semantics was my default for ifort.
Did anyone encountered similar experiences and could eventually suggest flags (e.g. turning of selectively features implied by -standard-semantics) to cure this?
I indeed have -O3 -fp-model strict -xHost -align array64byte, but that works ok (ifx is a little bit slower than ifort, but not much). But -standard-semantics is the trigger.
More information: I’m using oneAPI 2025.1.1 in a docker container and the CPU is pretty a old Intel(R) Xeon(R) CPU X5670 @ 2.93GHz. /proc/cpuinfo contains
-standard-semantics enables a LOT of options that have their own switches. You can read the list at standard-semantics I suggest trying the individual options and see what makes the biggest difference.
I do see that Intel has reworked how the various “standard” options work - it used to be that -stand controlled diagnostics only, but now it changes semantics too.
You should focus on the options beginning with ieee
For us, we found that when performance regressed migrating from parallel studio XE2019 to OneAPI 2021 using standard semantics, adding “/assume:noieee_compares” (on Windows, “-assume noieee_compares” on Linux) restored it.
I encountered something similar to this and it was related to how gradual underflows were treated. With certain input data, my code generated a large number of denormalized numbers, and if gradual underflow was enabled it took a lot of time to process them.
As noted by @sblionel the documentation describes what lower-level switches are used when a higher-level switch that conglomerates lower-level switches is invoked; and it is al ways useful to read the literature; but ifort/ifx has a lot of switches that expose what it is doing. Particularly when using a lot of switches that may or may not be overlapping each other, using switches like -dryrun shows the actual switches being passed on, which can be really useful when trying to figure out issues like this. For better or worse at least for ifx the intrinsic COMPILER_OPTIONS() shows what you actually entered on the command line, which does not help this particular use-case.