Filter löschen
Filter löschen

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++

16 Ansichten (letzte 30 Tage)
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?

Antworten (1)

Anshuman
Anshuman am 3 Aug. 2023
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!

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by