OpenBLAS icon indicating copy to clipboard operation
OpenBLAS copied to clipboard

CMake: Check for known bad configurations with LLVM Flang

Open mmuetzel opened this issue 2 years ago • 6 comments

Some features either don't compile or don't work correctly with LLVM Flang before version 17. This PR tries to help users to avoid these known-bad configurations by emitting a message and adapting the corresponding flags.

It's still unclear if both of these known-bad configurations will actually be fixed in LLVM Flang 17 or if one of them is actually an issue that is platform-dependent (i.e., only Windows or MinGW). In the latter case, the conditions could still be adapted in the future.

The flags need to be adapted early on. At least, before system_check.cmake is included via system.cmake. That required to move the check for the Fortran compiler to earlier in the configuration process.

mmuetzel avatar Aug 05 '23 19:08 mmuetzel

Updated the PR and rebased on a current head. Building with AVX512 still leads to failing tests with LLVM Flang 17 on Windows.

mmuetzel avatar Sep 25 '23 14:09 mmuetzel

Any update with flang-18.1?

MehdiChinoune avatar Apr 05 '24 09:04 MehdiChinoune

All tests pass with flang-18

MehdiChinoune avatar Apr 06 '24 07:04 MehdiChinoune

avx512 too ?

martin-frbg avatar Apr 06 '24 07:04 martin-frbg

avx512 too ?

I don't know, I haven't passed NO_AVX512 to cmake and It builds (after applying #4616) and all tests pass. I don't have an AVX512 PC to test on.

MehdiChinoune avatar Apr 06 '24 07:04 MehdiChinoune

I see - actually passing the tests on an avx512 cpu used to be the problem with recent llvm, but I will probably not get to recheck this before monday

martin-frbg avatar Apr 06 '24 08:04 martin-frbg