Fixed oneAPI check and get version - #16053
Conversation
As of 2021.17, oneAPI's wrapper versioning command gives an error and uses a capital '-V' instead of lowercase '-v'. This is patched by adding an additional '-V' check, and changing the error code to 1. This resolves mesonbuild#16052
|
said error: |
|
Update: see below, the assessment of the source of the non-zero exit code was slightly inaccurate Update: upon a closer look at other versions, it actually looks like Intel has completely mangled what -v/V is supposed to do:
|
Add fallback check for --help, necessary to catch Intel's unstable mpiifx -V/v flags since >2021.16
Updated note regarding Intel oneAPI MPI wrappers detection issues.
|
also as a suggestion, it may be helpful to add a warning when intel-llvm is used and falls back to mpif90, since Intel intended mpif90 to build using gfortran, which would prevent confusing interactions like #16052 |
|
Update: actually, the mangling seems to occur because of ifx, not mpiifx, and maybe install stream dependent. It seems the mpiifx versioning always uses capital '-V' (again even though the usage message says -v), which is always passed to ifx. How ifx responds to an empty -V seems to be dependent on the installation stream. I cross referenced 2025.2.1 Build 20250806 across the installer, conda, and spack, and it seems to only execute with error with the install through the spack stream somehow? Doc changes have been updated accordingly. This may be connected to spack/spack#47672 |
|
#16052 (comment) outlines 2 upstream bugs and 1 Meson bug lining up to create a failure mode. This PR implements a workaround for upstream bug 1 and bug 2. |
warn users against remaining soft failure mode
At early as 2021.16, oneAPI-MPI's versioning command may use a capital '-V' instead of lowercase '-v'. This is patched by adding an additional '-V' check. In addition, in only the Fortran wrappers, it gives an error code,
which is patched by adapting returncode_value to 1. This resolves #16052.