Custom C++ Library gives error: Intel MKL ERROR: Parameter 8 was incorrect on entry to DGEMM when using armadillo despite working perfectly fine in standalone C++

26 次查看(过去 30 天)
I am currently developing a MATLAB wrapper for a underlying library built with the armadillo matrix library, using openBLAS, LAPACK, SUPERLU and Arpack. Unfortunately I get the error above. I have tracked the error down to an incompatibility with the version of intel MKL that MATLAB ships with and openBLAS/LAPACK - is there any way to force MATLAB to use the system versions of openBLAS and LAPACK rather than the problematic MKL it ships with?

回答(1 个)

Anshuman
Anshuman 2023-8-3
Hi Matthew,
If you want to use the system versions of openBLAS and LAPACK instead of the bundled MKL(Math Kernel Library), you can try the following steps:
  1. Set the 'LD_PRELOAD' Environment Variable: Before launching MATLAB, you can set the 'LD_PRELOAD' environment variable to force it to use the system versions of openBLAS and LAPACK. This variable specifies a list of shared libraries to be loaded before all others. Open a terminal and enter the following command:
export LD_PRELOAD=/path/to/openBLAS.so:/path/to/LAPACK.so
Replace '/path/to/openBLAS.so' and '/path/to/LAPACK.so' with the actual paths to your system versions of openBLAS and LAPACK libraries.
2. After setting the 'LD_PRELOAD' environment variable, launch MATLAB from the same terminal window. MATLAB should now use the specified system versions of openBLAS and LAPACK for linear algebra operations.
Hope it helps!

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

标签

产品


版本

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by