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

OpenVino demo demo_squeezenet_download failing

KarthickM
Beginner
881 Views

Hi,

I am not able to run this demo due to illegal instruction error.

[root@localhost demo]# source /opt/intel/openvino/bin/setupvars.sh
/opt/intel/openvino_2020.4.287[setupvars.sh] OpenVINO environment initialized
[root@localhost demo]# ./demo_squeezenet_download_convert_run.sh
target_precision = FP16
/opt/intel/openvino_2020.4.287[setupvars.sh] OpenVINO environment initialized


###################################################

 

Downloading the Caffe model and the prototxt
Installing dependencies
Requirement already satisfied: pyyaml in /usr/local/lib/python3.6/site-packages (from -r /opt/intel/openvino/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 1)) (5.3.1)
Requirement already satisfied: requests in /usr/local/lib/python3.6/site-packages (from -r /opt/intel/openvino/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (2.24.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests->-r /opt/intel/openvino/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (1.25.10)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from requests->-r /opt/intel/openvino/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (2020.6.20)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests->-r /opt/intel/openvino/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests->-r /opt/intel/openvino/deployment_tools/demo/../open_model_zoo/tools/downloader/requirements.in (line 2)) (2.10)
Run /usr/local/bin/python3.6 /opt/intel/openvino_2020.4.287/deployment_tools/open_model_zoo/tools/downloader/downloader.py --name squeezenet1.1 --output_dir /root/openvino_models/models --cache_dir /root/openvino_models/cache

################|| Downloading models ||################

========== Retrieving /root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt from the cache

========== Retrieving /root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffemodel from the cache

################|| Post-processing ||################

========== Replacing text in /root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt


###################################################

Install Model Optimizer dependencies

Requirement already satisfied: networkx>=1.11 in /usr/local/lib/python3.6/site-packages (from -r /opt/intel/openvino_2020.4.287/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 1)) (2.5)
Requirement already satisfied: numpy>=1.13.0 in /usr/local/lib/python3.6/site-packages (from -r /opt/intel/openvino_2020.4.287/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 2)) (1.19.1)
Requirement already satisfied: protobuf>=3.6.1 in /usr/local/lib/python3.6/site-packages (from -r /opt/intel/openvino_2020.4.287/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 3)) (3.13.0)
Requirement already satisfied: test-generator==0.1.1 in /usr/local/lib/python3.6/site-packages (from -r /opt/intel/openvino_2020.4.287/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 4)) (0.1.1)
Requirement already satisfied: defusedxml>=0.5.0 in /usr/local/lib/python3.6/site-packages (from -r /opt/intel/openvino_2020.4.287/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 5)) (0.6.0)
Requirement already satisfied: decorator>=4.3.0 in /usr/local/lib/python3.6/site-packages (from networkx>=1.11->-r /opt/intel/openvino_2020.4.287/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 1)) (4.4.2)
Requirement already satisfied: six>=1.9 in /usr/local/lib/python3.6/site-packages (from protobuf>=3.6.1->-r /opt/intel/openvino_2020.4.287/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 3)) (1.15.0)
Requirement already satisfied: setuptools in /usr/local/lib/python3.6/site-packages (from protobuf>=3.6.1->-r /opt/intel/openvino_2020.4.287/deployment_tools/model_optimizer/install_prerequisites/../requirements_caffe.txt (line 3)) (50.3.0)
[WARNING] All Model Optimizer dependencies are installed globally.
[WARNING] If you want to keep Model Optimizer in separate sandbox
[WARNING] run install_prerequisites.sh venv {caffe|tf|mxnet|kaldi|onnx}


###################################################

Convert a model with Model Optimizer

Run /usr/local/bin/python3.6 /opt/intel/openvino_2020.4.287/deployment_tools/open_model_zoo/tools/downloader/converter.py --mo /opt/intel/openvino_2020.4.287/deployment_tools/model_optimizer/mo.py --name squeezenet1.1 -d /root/openvino_models/models -o /root/openvino_models/ir --precisions FP16

========== Converting squeezenet1.1 to IR (FP16)
Conversion command: /usr/local/bin/python3.6 -- /opt/intel/openvino_2020.4.287/deployment_tools/model_optimizer/mo.py --framework=caffe --data_type=FP16 --output_dir=/root/openvino_models/ir/public/squeezenet1.1/FP16 --model_name=squeezenet1.1 '--input_shape=[1,3,227,227]' --input=data '--mean_values=data[104.0,117.0,123.0]' --output=prob --input_model=/root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffemodel --input_proto=/root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt

Model Optimizer arguments:
Common parameters:
- Path to the Input Model: /root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffemodel
- Path for generated IR: /root/openvino_models/ir/public/squeezenet1.1/FP16
- IR output name: squeezenet1.1
- Log level: ERROR
- Batch: Not specified, inherited from the model
- Input layers: data
- Output layers: prob
- Input shapes: [1,3,227,227]
- Mean values: data[104.0,117.0,123.0]
- Scale values: Not specified
- Scale factor: Not specified
- Precision of IR: FP16
- Enable fusing: True
- Enable grouped convolutions fusing: True
- Move mean values to preprocess section: False
- Reverse input channels: False
Caffe specific parameters:
- Path to Python Caffe* parser generated from caffe.proto: /opt/intel/openvino_2020.4.287/deployment_tools/model_optimizer/mo/front/caffe/proto
- Enable resnet optimization: True
- Path to the Input prototxt: /root/openvino_models/models/public/squeezenet1.1/squeezenet1.1.prototxt
- Path to CustomLayersMapping.xml: Default
- Path to a mean file: Not specified
- Offsets for a mean file: Not specified
Model Optimizer version:

[ SUCCESS ] Generated IR version 10 model.
[ SUCCESS ] XML file: /root/openvino_models/ir/public/squeezenet1.1/FP16/squeezenet1.1.xml
[ SUCCESS ] BIN file: /root/openvino_models/ir/public/squeezenet1.1/FP16/squeezenet1.1.bin
[ SUCCESS ] Total execution time: 11.44 seconds.
[ SUCCESS ] Memory consumed: 87 MB.

 

###################################################

Build Inference Engine samples

-- Looking for C++ include unistd.h
-- Looking for C++ include unistd.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include fnmatch.h
-- Looking for C++ include fnmatch.h - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Found InferenceEngine: /opt/intel/openvino_2020.4.287/deployment_tools/inference_engine/lib/intel64/libinference_engine.so (Required is at least version "2.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /root/inference_engine_samples_build
[ 37%] Built target gflags_nothreads_static
[ 87%] Built target format_reader
[100%] Built target classification_sample_async


###################################################

Run Inference Engine classification sample

Run ./classification_sample_async -d CPU -i /opt/intel/openvino/deployment_tools/demo/car.png -m /root/openvino_models/ir/public/squeezenet1.1/FP16/squeezenet1.1.xml

[ INFO ] InferenceEngine:
API version ............ 2.1
Build .................. 2020.4.0-359-21e092122f4-releases/2020/4
Description ....... API
[ INFO ] Parsing input parameters
[ INFO ] Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ] /opt/intel/openvino/deployment_tools/demo/car.png
[ INFO ] Creating Inference Engine
CPU
MKLDNNPlugin version ......... 2.1
Build ........... 2020.4.0-359-21e092122f4-releases/2020/4

[ INFO ] Loading network files
[ INFO ] Preparing input blobs
[ WARNING ] Image is resized from (787, 259) to (227, 227)
[ INFO ] Batch size is 1
[ INFO ] Loading model to the device
/opt/intel/openvino/deployment_tools/demo/utils.sh: line 11: 30609 Illegal instruction "$@"
Error on or near line 15; exiting with status 1
[root@localhost demo]#

 

0 Kudos
4 Replies
Rizal_Intel
Moderator
862 Views

Hi Karthick,

 

It would seem you are encountering an error while loading the model to the inference engine.

We suspect that it could be due to an unsupported chipset.

Would you provide your environment details such as Operating System(OS) and processor chipset?

Additionally, here is the system and hardware requirements for Intel® Distribution of OpenVINO™ Toolkit.

 

Hope this helps.

 

Regards,

Rizal


0 Kudos
KarthickM
Beginner
846 Views

Hi Rizal,

 

Thank you for the response. In the install.sh file, the minimum requirement was  MIN_FAMILY=6 and
MIN_MODEL=14. Our chipset is Family = 6 and Model = 42.  Please let me know if I am missing anything.

The Operating System: 

Red Hat Enterprise Linux Server release 7.6 (Maipo)

Processor info:

[root@localhost ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel Xeon E312xx (Sandy Bridge)
stepping : 1
microcode : 0x1
cpu MHz : 1999.999
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb lm constant_tsc nopl nonstop_tsc eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm xsaveopt
bogomips : 3999.99
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel Xeon E312xx (Sandy Bridge)
stepping : 1
microcode : 0x1
cpu MHz : 1999.999
cache size : 4096 KB
physical id : 1
siblings : 1
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb lm constant_tsc nopl nonstop_tsc eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm xsaveopt
bogomips : 3999.99
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel Xeon E312xx (Sandy Bridge)
stepping : 1
microcode : 0x1
cpu MHz : 1999.999
cache size : 4096 KB
physical id : 2
siblings : 1
core id : 0
cpu cores : 1
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb lm constant_tsc nopl nonstop_tsc eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm xsaveopt
bogomips : 3999.99
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel Xeon E312xx (Sandy Bridge)
stepping : 1
microcode : 0x1
cpu MHz : 1999.999
cache size : 4096 KB
physical id : 3
siblings : 1
core id : 0
cpu cores : 1
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb lm constant_tsc nopl nonstop_tsc eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm xsaveopt
bogomips : 3999.99
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 4
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel Xeon E312xx (Sandy Bridge)
stepping : 1
microcode : 0x1
cpu MHz : 1999.999
cache size : 4096 KB
physical id : 4
siblings : 1
core id : 0
cpu cores : 1
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb lm constant_tsc nopl nonstop_tsc eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm xsaveopt
bogomips : 3999.99
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 5
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel Xeon E312xx (Sandy Bridge)
stepping : 1
microcode : 0x1
cpu MHz : 1999.999
cache size : 4096 KB
physical id : 5
siblings : 1
core id : 0
cpu cores : 1
apicid : 5
initial apicid : 5
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb lm constant_tsc nopl nonstop_tsc eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm xsaveopt
bogomips : 3999.99
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 6
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel Xeon E312xx (Sandy Bridge)
stepping : 1
microcode : 0x1
cpu MHz : 1999.999
cache size : 4096 KB
physical id : 6
siblings : 1
core id : 0
cpu cores : 1
apicid : 6
initial apicid : 6
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb lm constant_tsc nopl nonstop_tsc eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm xsaveopt
bogomips : 3999.99
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel Xeon E312xx (Sandy Bridge)
stepping : 1
microcode : 0x1
cpu MHz : 1999.999
cache size : 4096 KB
physical id : 7
siblings : 1
core id : 0
cpu cores : 1
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb lm constant_tsc nopl nonstop_tsc eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm xsaveopt
bogomips : 3999.99
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

 

Thanks & Regards,

Karthick

0 Kudos
Rizal_Intel
Moderator
827 Views

Hi Karthick,

 

Theoretically, your chipset and OS should not be issue.

Are you running it directly on local remote or virtual machine?

 

Based on the error you have encountered, the illegal instruction error could be caused by running code which was compiled for different chipset instructions OR it could be caused by an aging hardware which produces error during its processes.

 

Are you getting the same error consistently while running the demo?

Could you try running on different machines with newer hardware (if possible)?

 

Regards,

Rizal


0 Kudos
KarthickM
Beginner
823 Views

Hi Rizal,

I was getting the error consistently. I was running in virtual machine. 

I have decided to run it on different machine whicha Ubuntu 20.04 focal version and following chipset:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel Xeon Processor (Skylake, IBRS)
stepping : 4
microcode : 0x1
cpu MHz : 2394.374
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti ibrs ibpb fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1

 

Even here, I faced issue installing opencv and inference Engine. As mentioned in this post, https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Inference-Engine-libraries-not-built-in-install-2019-1-133-Linux/td-p/1138698 , I changed '${DISTRIB_CODENAME} = bionic' to '${DISTRIB_CODENAME} = focal'. Now, I am able to install openvino and run the demo successfully. 

Thanks again for the responses.

Warm Regards,

Karthick

0 Kudos
Reply