MATLAB coder GUI / CLI shows cryptic errors: libmwboost / CUDA_CODEGEN
Ältere Kommentare anzeigen
Hi, I hit a number of snags when using MATLAB coder. I'm using R2020a on Ubuntu 18.04 on an XPS 15 9570.
Issue no.1 (GUI): When I run the GUI, I am stopped at the automatically define input types step by the message
"Invalid MEX-file '/path/on/my/machine' : libmwboost_system.so.1.65.1: cannot open shared object file: No such file or directory.
However...
>> !locate libmwboost_system
/usr/local/MATLAB/R2020a/bin/glnxa64/libmwboost_system.so.1.70.0
Why doesn't MATLAB detect and use the latest version of this .so? How to fix this problem?
Issue no.2 (CLI): Raw C code is better than nothing. so I ran the command below and hit another snag
>> codegen -c foo
CRL: "CUDA_CODEGEN" cannot be found in the registry.
Use help codegen for more information on using this command.
Error using codegen
Googling for CUDA_CODEGEN doesn't even give relevant results. Before diving into debugging GPU issues, I need to emphasize that CUDA code generation is the absolute least of my concern. If there is a way to make Coder ignore CUDA and move on, I'd go with that.
I'm totally stalled now and I greatly appreciate any answer.
Both issues manifest with the simplest toy function like
function y = foo(x)
y = x;
end
8 Kommentare
Hi Hei,
For problem (2) you are encountering, it looks like the CUDA library cannot be found for some reason.
Can you restart MATLAB and try the following command to see if it errors out?
crviewr('CUDA_CODEGEN')
If this errors out, can you check if the following directory is on MATLAB path?
<matlabroot>/toolbox/coder/foundation/tfl (on linux or mac)
<matlabroot>\toolbox\coder\foundation\tfl (on windows)
If it is not on the path, you will need to add it for codgen to work.
Thanks.
Ye
Ye Yang
am 3 Aug. 2020
Hi Hei,
In addition to the steps above, can you let us know some details how you use the codegen command?
e.g. Are you using a custom config object? If so, can you provide the command how you create the config objects?
This will also be helpful to identify and resolve the issue.
Thanks.
Ye
Hei Shing Helson Go
am 4 Aug. 2020
Ye Yang
am 4 Aug. 2020
Hi Hei,
I do not think it is because of the CUDA requirement.
This library is unconditionally installed/loaded with/without CUDA, but it is somehow not accessible in your case.
Can you go to coder/foundation/tfl and check the followings?
(1) Are there .mat files with the names
private_cuda_codegen_tfl_table_tmw
private_cuda_cpu_codegen_tfl_table_tmw
private_cuda_cpu_sim_tfl_table_tmw
private_cuda_half_table_tmw
private_cuda_sim_tfl_table_tmw
(2) Is there a .mat file named rtw_default_targetInfo_tfl?
If so, you can load this matfile and do the following check:
thisTfl.Name
Can you check whether it contains 'CUDA_CODEGEN' and 'CUDA_SIM'?
If so, can you find index in thisTfl that corresponds to 'CUDA_CODEGEN' and check the contents there?
crviewer(thisTfl(idx))
Thanks.
Ye
Hei Shing Helson Go
am 5 Aug. 2020
Bearbeitet: Hei Shing Helson Go
am 5 Aug. 2020
Ye Yang
am 5 Aug. 2020
Hi Hei,
Looks like your rtw_default_targetInfo_tfl.mat file was not updated.
It is possible to copy this file from another computer, but similar issues might happen with other files as well.
At this point, I strongly recommend to just do a reinstall.
Thanks.
Ye
Hei Shing Helson Go
am 6 Aug. 2020
falk
am 16 Mär. 2021
Restart could also help!
Antworten (1)
Walter Roberson
am 4 Aug. 2020
"Invalid MEX-file '/path/on/my/machine' : libmwboost_system.so.1.65.1: cannot open shared object file: No such file or directory.
/usr/local/MATLAB/R2020a/bin/glnxa64/libmwboost_system.so.1.70.0
Why doesn't MATLAB detect and use the latest version of this .so? How to fix this problem?
You have different minor version numbers, 1.65 compared to 1.70 . The convention is that shared objects that differ in minor version numbers are entitled to be incompatible, but that changes in the release number, the third number in the triple, are intended to be bug fixes or compilation improvements that are intended to be compatible.
Therefore the linking process should not substitute 1.70.0 for 1.65.1 because as far as the linker can tell from the version numbers, the two might have different entry point numbers and different external symbol names.
The convention is that major version numbers such as the leading 1 correspond to major redesigns that might be barely recognizable in operation -- but in the meantime a change in minor version number is permitted to add or remove functions.
As boost deals a lot with templated C++ functions, it would be common for later versions to add functionality -- but it would also be common for later versions to lose internally generated symbols corresponding to changed implementation details .
Kategorien
Mehr zu MATLAB Coder finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!