Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Trying to run OpenVINO InferenceEngine program using sudo under Ubuntu 16.04.

Radmer__Johannes
Beginner
721 Views

I am trying to run my program, which is using OpenVINO's InferenceEngine and the mkl cpu plugin, under Ubuntu 16.04. When running the program normally it works just fine, but when running the program using sudo it fails to find libMKLDNNPlugin.so and libmkl_tiny.so, failing with:

Cannot find plugin to use :Tried load plugin : MKLDNNPlugin,  error: Plugin MKLDNNPlugin cannot be loaded: cannot load plugin: MKLDNNPlugin from : Cannot load library 'libMKLDNNPlugin.so': libmkl_tiny.so: cannot open shared object file: No such file or directory, skipping

Since I know, that sudo does not passed the environment variables my first thought was that this might be the issue, but running with sudo -E still produces the same error. I tried putting libMKLDNNPlugin.so and libmkl_tiny.so in /usr/local/lib/, which did nothing as well. The problem does not only happen with my own program, but also with the sample programs in the computer vision toolkit.

Can someone verify the problem or know how to make the program find the libraries with sudo?

0 Kudos
5 Replies
nikos1
Valued Contributor I
721 Views

Just to make sure : have you run source setupvars.sh  ?  source  computer_vision_sdk/bin/setupvars.sh 

Yes, same issue here when I run with sudo.  There are many ways to configure sudo with the same environment. Not sure why you want to run using sudo though.

 

 

0 Kudos
Radmer__Johannes
Beginner
721 Views

Thank you for the quick response. Currently I need to run my program as sudo, because I can not access a needed peripheral otherwise. I thought maybe there was something obvious I was missing, which prevented the program from finding the libraries. But I think I should be able to get around the sudo requirement, which might be the better solution anyways.

0 Kudos
Huaichun__Fu
Beginner
721 Views

did you solve the problem? i have the same problem as you! And i also have use sudo ,but there is the same error that i can't solve! i have been solving this problem for three days ,but failed! if you successed, i hope you  can help me ! thank you!

0 Kudos
hirasawa__yui
Beginner
721 Views

I've tried adding library path to LD_LIBRARY_PATH and PATH with both ordinary user and root, but that doesn't work. I finally get rid of this problem by copy the .so needed(libmkl_tiny_tbb.so for me) to one of the directories in LD_LIBRARY_PATH.

0 Kudos
hirasawa__yui
Beginner
721 Views

In my case, it complains that libmkl_tiny_tbb.so cannot be found, but I actually found it in /opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/mkltiny_lnx/lib. So I tried adding this path into both LD_LIBRARY_PATH and PATH by ordinary user and root, but that didn't work.

I finally got rid of this problem by copying `libmkl_tiny_tbb.so` to one of the paths in LD_LIBRARY_PATH.

0 Kudos
Reply