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.
6403 Discussions

How do I test if the NCS is in working condition?

idata
Employee
2,598 Views

Hi, I've installed ncsdk 2 on a VM running Ubuntu 16 64-bit, but I'm unable to run "make examples" currently as no USB device is found. Similarly, python hello_ncs.py returns an error of "no NCS devices detected", and my dmesg has been empty since clearing it even after plugging and unplugging. The host machine is Win7 x64, which I don't expect is able to recognize the device anyway, so I'm unsure how to proceed troubleshooting. Would appreciate any help - thanks!

 

 

I solved the issue and am now able to complete make examples using the solution detailed in this post: https://forums.virtualbox.org/viewtopic.php?p=176270#p176270

 

Something to do with Virtual Box & Windows 7, I suppose. It seemed insane until I tried it.

 

However, there are a number of lines that go something like:

 

E: [ 0] dispatcherEventSend:728 Write failed -1

 

and I can't tell if something else is now going wrong.

0 Kudos
12 Replies
idata
Employee
2,087 Views

delete/merged into question

0 Kudos
idata
Employee
2,087 Views

@ly3 Hi, have you set up the VM USB filters for the NCS device? You can find more information about this https://movidius.github.io/ncsdk/vm_config.html. Once the proper USB filters are set, you should be able to run the sample apps to confirm your NCS device is working.

0 Kudos
idata
Employee
2,088 Views

Thanks, Tome. Yep, I did that! I'm not sure what exactly happened, but somehow I ended up in a state where they weren't recognized anyway. From what I read in the link I updated the first post with, perhaps it's the particular combination of Virtual Box + Windows 7 that requires the additional remedy of reinstalling VirtualBox USB after installing and setting up the Extension Pack (per the detailed instructions in the other forum link). I'm unsure, but that's my hypothesis.

 

Do I need to be concerned with the write/read failed dispatcherEventSend messages?

0 Kudos
idata
Employee
2,087 Views

@ly3 I haven't seen that error myself, but that is definitely not normal behavior. What output do you get now with the hello_ncs_py app?

0 Kudos
idata
Employee
2,087 Views

Hi there, I'm running the environment in W10 host, ubutu 16.04 64bit virtualbox. Also followed instructions to setup USB3.0 correctly. The hello_ncs_py app says to run ok at the end and all kinds of information about the stick is showing except the last write (like above) fails.

 

I can re-run the app repeatedly with the same result. If I try to run e.g. ncsdk/examples/caffe/GoogLeNet it fails and now I have to re-plug the stick to get something running again. I get the impression that reading and writing data is failing. Othe communication with the stick seems to run fine in the VM. Any suggestions?

0 Kudos
idata
Employee
2,087 Views

I switched to running this off a Raspberry Pi, with better success (I think). I get the expected results from the hello executables, although when I tried to redo "make examples" I got the following:

 

****** WARNING: using empty weights ****** Traceback (most recent call last): File "/usr/local/bin/mvNCProfile", line 121, in <module> profile_net(args.network, args.inputnode, args.outputnode, args.nshaves, args.inputsize, args.weights, args.device_no) File "/usr/local/bin/mvNCProfile", line 101, in profile_net net = parse_caffe(args, myriad_config, file_gen=True) File "/usr/local/bin/ncsdk/Controllers/CaffeParser.py", line 1294, in parse_caffe bias = get_caffe_params(layer, net.params)[1] File "/usr/local/bin/ncsdk/Controllers/CaffeParser.py", line 215, in get_caffe_params dtype=data_type), blobs[layer.name][1].data.astype(dtype=data_type) MemoryError Makefile:64: recipe for target 'profile' failed make[3]: *** [profile] Error 1 make[3]: Leaving directory '/home/pi/workspace/ncsdk/examples/caffe/AlexNet' Makefile:12: recipe for target 'AlexNet/.' failed make[2]: *** [AlexNet/.] Error 2 make[2]: Leaving directory '/home/pi/workspace/ncsdk/examples/caffe' Makefile:12: recipe for target 'caffe/.' failed make[1]: *** [caffe/.] Error 2 make[1]: Leaving directory '/home/pi/workspace/ncsdk/examples' Makefile:57: recipe for target 'examples' failed make: *** [examples] Error 2

 

(maybe a memory issue given the limited hardware?)

 

Back on my VM, the python hello app gives a bunch of similar-looking debug messages, but says that the device ran successfully:

 

python3 hello_ncs.py; D: [ 0] ncDeviceCreate:221 ncDeviceCreate index 0 D: [ 0] resetAll:144 Found stalled device 1- I: [ 0] resetAll:165 Stalled devices found, Reseting... E: [ 0] dispatcherEventReceive:198 dispatcherEventReceive() Read failed -1 I: [ 0] resetAll:189 ... I: [ 0] resetAll:189 ... I: [ 0] resetAll:189 ... I: [ 0] resetAll:189 ... I: [ 0] resetAll:189 ... D: [ 0] ncDeviceCreate:221 ncDeviceCreate index 1 D: [ 0] ncDeviceOpen:415 File path /usr/local/lib/mvnc/MvNCAPI-ma2450.mvcmd I: [ 0] ncDeviceOpen:421 ncDeviceOpen() XLinkBootRemote returned success 0 I: [ 0] ncDeviceOpen:450 XLinkConnect done - link Id 1 D: [ 0] ncDeviceOpen:464 done I: [ 0] ncDeviceOpen:466 Booted 2-ma2450 -> VSC I: [ 0] getDevAttributes:287 Device attributes I: [ 0] getDevAttributes:290 Device FW version: 2.4.2450.e4 I: [ 0] getDevAttributes:292 mvTensorVersion 2.4 I: [ 0] getDevAttributes:293 Maximum graphs: 10 I: [ 0] getDevAttributes:294 Maximum fifos: 20 I: [ 0] getDevAttributes:296 Maximum graph option class: 1 I: [ 0] getDevAttributes:298 Maximum device option class: 1 I: [ 0] getDevAttributes:299 Device memory capacity: 522081584 Hello NCS! Device opened normally. I: [ 0] ncDeviceClose:656 closing device E: [ 0] dispatcherEventReceive:198 dispatcherEventReceive() Read failed -1 Goodbye NCS! Device closed normally. NCS device working.

 

The C++ hello app results in this:

 

making hello_ncs_cpp g++ cpp/hello_ncs.cpp -o cpp/hello_ncs_cpp -lmvnc Created cpp/hello_ncs_cpp executable making run cd cpp; ./hello_ncs_cpp; cd .. Hello NCS! Device opened normally. E: [ 0] dispatcherEventReceive:198 dispatcherEventReceive() Read failed -1 Goodbye NCS! Device Closed normally. NCS device working.

 

I'm not sure what this all means, but I'll probably try sticking to the Rpi for now. Providing the output dump in case it's helpful to you! Thanks a lot for pointing me to the hello_ apps, which seem like the right way to verify that the stick is connected and functioning.

 

Small aside, I think the readme.md in the python directory should be updated a little bit to remove the traces of that are copied from the cpp version.

0 Kudos
idata
Employee
2,088 Views

@ly3 do you still get the Read failed -1 error while running hello_ncs on the Rapsberry Pi?

0 Kudos
idata
Employee
2,088 Views

@Tome_at_Intel Nope! I just get this:

 

making run python3 hello_ncs.py; Hello NCS! Device opened normally. Goodbye NCS! Device closed normally. NCS device working.

 

On the Rpi it seems maybe a few examples didn't make successfully (see the make errors above) but otherwise I have yet to encounter "Read failed" or "Write failed" errors.

0 Kudos
idata
Employee
2,088 Views

@ly3 For the examples that didn't make successfully, can you go into root directory of the example which didn't run and do a make run. For example if AlexNet wasn't building when you ran make example, open a terminal and switch to the caffe/AlexNet directory and run the command make run. Let me know what if the example runs when you do it this way. Thanks.

0 Kudos
idata
Employee
2,088 Views

@ly3 @kbfifi Looks like the dispatcher event "read failed" doesn't affect the functionality of the device, but it is a VM related bug that we are working on at the moment.

0 Kudos
idata
Employee
2,088 Views

On the Rpi:

 

making compile mvNCCompile -w bvlc_alexnet.caffemodel -s 12 deploy.prototxt mvNCCompile v02.00, Copyright @ Movidius Ltd 2016 [Error 28] Caffe Error: MemoryError. Potential Cause: Available RAM not sufficient for Network to be loaded into Caffe

 

Perhaps it's a memory limitation for this particular app in the zoo. The Rpi has 1GB. Good to hear about the read errors!

0 Kudos
idata
Employee
2,088 Views

@ly3 Maybe you can try increasing the swap space for your Pi?

0 Kudos
Reply