필터 지우기
필터 지우기

The problem of 'conv2' with 'BLAS loading error.

조회 수: 5 (최근 30일)
Chang
Chang 2021년 11월 11일
댓글: Chang 2021년 11월 15일
When I using a compilied matconvnet to apply 'conv2(a, h, 'valid')', a 'BLAS loading error' occurs if the first dimension of 'a' is larger than 16.
If the first dimension of 'a' is less than 16, it works.
  댓글 수: 3
Chang
Chang 2021년 11월 12일
Ubuntu 20.04.3 LTS (GNU/Linux 5.11.0-38-generic x86_64)
CPU: Hygon C86 7151 16-core Processor
GPU: NVIDIA RTX A5000
Image Analyst
Image Analyst 2021년 11월 12일
Works for me
out = conv2(rand(16, 1), rand(1,1))
out = conv2(rand(17, 1), rand(1,1))
The above code runs with no error. Does it only happen if you've compiled the code? Like into a standalone executable?
I don't know what a "matconvnet" is. What is that?

댓글을 달려면 로그인하십시오.

채택된 답변

Heiko Weichelt
Heiko Weichelt 2021년 11월 12일
The problem occurs from the fact that this particular processor is not correctly detected by MATLAB, and hence, not the right BLAS and LAPACK library gets loaded.
This is a bug and we are already working on fixing that for the future.
A workaround you can try consists of telling MATLAB explicitly which BLAS/LAPACK library to use.
Your MATLAB installation should contain the BLAS/LAPACK library mkl.so for glnxa64 systems. Please locate the installation path by running the following inside MATLAB:
>> matlabroot
ans =
/some/path/to/MATLAB
Use this path to set the following two environment variables before starting MATLAB:
BLAS_VERSION = /some/path/to/MATLAB/glnxa64/bin/mkl.so
LAPACK_VERSION = /some/path/to/MATLAB/glnxa64/bin/mkl.so
It depends on the console you're using in Ubuntu on how to set those variables. If you are using 'bash', e.g., it would look as following:
$ export BLAS_VERSION=/some/path/to/MATLAB/glnxa64/bin/mkl.so
$ export LAPACK_VERSION=/some/path/to/MATLAB/glnxa64/bin/mkl.so
Other consoles have similar syntaxes.
Once those variables are set, start MATLAB from the same console. Afterwards, you can verify that MKL was loaded correctly by running the following inside MATLAB:
>> version -blas
>> version -lapack
If both comments return the MKL version of your MATLAB version, you should all be set and your initial computation should work as expected.
If this does not work, please get in touch via Customer Support so we can discuss further steps more directly.
Please notice that MathWorks has not qualified MATLAB on this particular platform and, hence, cannot guarantee anything.
  댓글 수: 1
Chang
Chang 2021년 11월 15일
Thank you very much!
According to the solution you provided, the problem has been solved!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by