MATLAB LAPACK/BLAS Configuration
18 views (last 30 days)
Show older comments
I am calling an external program from within MATLAB that requires a LAPACK/BLAS version. For this I am using the non-MATLAB LAPACK/BLAS version as Openblas is giving me greater speed with it. I am using Ubuntu 18.04 LTS.
In order to link to the external program I am setting the:
BLAS_VERSION, LAPACK_VERSION env variables to the location of the openblas libraries. However, it seems like MATLAB will use these env variables and now try and use that version of LAPACK and BLAS which then cases a number of errors (such as not being able to find the eigenvalues of a 2x2 matrix - giving an out of memory issue. This has been documented before: https://au.mathworks.com/matlabcentral/answers/518117-out-of-memory-error-when-working-with-small-matrices)
I am wondering, is there a way to force matlab to use its own version of LAPACK/BLAS (the one it shipped with) whilst my external program is using the openblas version?
I have tried to use the suggestion provided in the link about, however, I receive the following error: "/bin/sh: error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory".
Any help on this would be much appreciated.
Thanks!
1 Comment
Aaron G
on 31 Mar 2022
Hi Liam,
I'm having the same issue that you describe here. Did you find a solution?
I saw your suggestion of running with `(unset BLAS_VERSION; unset LAPACK_VERSION; matlab) but that also makes the environment variables invisible to my external programm (which is called from within matlab).
Best regards,
Aaron
Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!