Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Intel vs GNU ABI when building against MKL
For functions that return complex values, there are two strategies how values can be returned. Either via a value on the stack (aka return value) or via an implicit first argument (aka output argument). The former is called GNU ABI and the latter Intel ABI by the Intel MKL. There are two variants of the Intel MKL and when calling functions like zdotu that return a complex value it does make a difference which one the application is linked to. Unfortunately, there is no way to detect this at runtime and other libraries that are linked into the application might have other preferences with regards to which MKL interface they want to use. With this commit we make the code ABI agnostic by simply using the CBLAS API which always uses an output argument. https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2024-1/call-blas-funcs-return-complex-values-in-c-code.html
- Loading branch information