Community
cancel
Showing results for 
Search instead for 
Did you mean: 
raushan
Novice
1,280 Views

Could not find a package configuration file provided by TBB

Hi,
 
I have uncommented the tbb code in opt/intel/openvino_2020.4.287/deployment_tools/inference_engine/demos/multi_channel/object_detection_demo_yolov3
#ifdef USE_TBB
//#if 0  // disable multithreaded rendering for now
    run_in_arena([&](){
        tbb::parallel_for<size_t>(0, data.size(), [&](size_t i) {
            loopBody(i);
        });
    });
 
Enabled MULTICHANNEL_DEMO_USE_TBB in CMake file to use the TBB library . 
 
Cmake file path: /opt/intel/openvino/inference_engine/demos/multi_channel
 
option(MULTICHANNEL_DEMO_USE_TBB "Use TBB-based threading in multichannel face detection demo" ON) Earlier it was OFF
 
But when i compiled , Getting the below error.
 
ubuntu@ip-172-31-43-117:~/video_demo$ cmake /opt/intel/openvino/inference_engine/demos
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_BUILD_TYPE not defined, 'Release' will be used
-- 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 C++ include stddef.h
-- Looking for C++ include stddef.h - found
-- Check size of uint32_t
-- Check size of uint32_t - done
-- Looking for strtoll
-- Looking for strtoll - found
-- Found OpenCV: /opt/intel/openvino_2020.4.287/opencv (found version "4.4.0") found components:  core imgproc 
-- Found InferenceEngine: /opt/intel/openvino_2020.4.287/deployment_tools/inference_engine/lib/intel64/libinference_engine.so (Required is at least version "2.0") 
CMake Error at multi_channel/common/CMakeLists.txt:35 (find_package):
  By not providing "FindTBB.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "TBB", but
  CMake did not find one.
 
  Could not find a package configuration file provided by "TBB" with any of
  the following names:
 
    TBBConfig.cmake
    tbb-config.cmake
 
  Add the installation prefix of "TBB" to CMAKE_PREFIX_PATH or set "TBB_DIR"
  to a directory containing one of the above files.  If "TBB" provides a
  separate development package or SDK, be sure it has been installed.
 

-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/video_demo/CMakeFiles/CMakeOutput.log".
 
1. why this code has been commented in inference samples in openvino?
 
2. is TBB recommended to use in openvino?
 
 
Thanks
 
0 Kudos
4 Replies
Iffa_Intel
Moderator
1,218 Views

Greetings,


For this issue you can try this workaround:


For binary integration (the simplest way) you need to download a TBB Release, unpack it wherever you want and pass when you're running CMake.


Linux:


cd /tmp

git clone https://github.com/intel/parallelstl

wget https://github.com/01org/tbb/releases/download/2018_U5/tbb2018_20180618oss_lin.tgz

tar zxf tbb2018_20180618oss_lin.tgz

mkdir build && cd build

cmake -DTBB_DIR=/tmp/tbb2018_20180618oss/cmake /tmp/parallelstl


Fyi,

Parallel STL is an implementation of the C++ standard library algorithms with support for execution policies, as specified in ISO/IEC 14882:2017 standard, commonly called C++17. The implementation also supports the unsequenced execution policy specified in Parallelism TS version 2 and proposed for the next version of the C++ standard in the C++ working group paper P1001R1.

Parallel STL offers efficient support for both parallel and vectorized execution of algorithms for Intel® processors. For sequential execution, it relies on an available implementation of the C++ standard library. You may refer here.


Certain code which had been commented out means that it's usage is optional.


Sincerely,

Iffa



kkonelin1
Beginner
1,044 Views

Hi. @Iffa_Intel 

it failed:

```

apple@ubuntu:/tmp$ mkdir build && cd build
apple@ubuntu:/tmp/build$ cmake -DTBB_DIR=/tmp/tbb2018_20180618oss/cmake /tmp/parallelstl
CMake Error: The source directory "/tmp/parallelstl" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

```

 

Shawn_S_Intel
Employee
666 Views

@kkonelin1 

Prior guidance does not appear to work, but with 2020.3, this guidance below does work in CentOS 7.

You need to download TBB and point cmake to use this new TBB package. Consider this and this as references. TBB packages can be seen here.

Example instructions from demo_squeezenet_download_convert_run.sh:

  1. cd /tmp
  2. wget https://github.com/oneapi-src/oneTBB/releases/download/v2020.3/tbb-2020.3-lin.tgz
  3. tar xzf tbb-2020.3-lin.tgz
  4. cd /opt/intel/openvino/deployment_tools/demo
  5. <edit demo_squeezenet_download_convert_run.sh>
    1. Line 205, add -DTBB_DIR=/tmp/tbb2018_20180618oss/cmake to cmake line 
    2. Shawn_S_Intel_0-1613576774469.png
  6. ./demo_squeezenet_download_convert_run.sh

 

Iffa_Intel
Moderator
1,187 Views

Greetings,


Intel will no longer monitor this thread since we have provided a solution. If you need any additional information from Intel, please submit a new question. 


Sincerely,

Iffa


Reply