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.
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
Fixes https://github.com/TRIQS/nda/issues/67