Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

Installation of TBB on Linux

bjornis
Beginner
3,656 Views
I am trying to install TBB properly so that OpenCVs make process detects thepresenceof TBB.
Platform: GNU/Linux (opensuse 11.2, x86_64).
The installation manual says:
To install on Linux* systems:
In the following instructions, specific examples of commands for
various steps are prefixed with '#' characters.
1. Unpack the package in a directory to which you have write
access.
# cd
# tar -xzf tbb__lin.tar.gz
2. Run the installation script. Execute the script in the
directory where the package was unpacked in the previous step.
# cd /tbb__lin
# ./install.sh
To install on Linux* systems:In the following instructions, specific examples of commands forvarious steps are prefixed with '#' characters.1. Unpack the package in a directory to which you have writeaccess.# cd # tar -xzf tbb__lin.tar.gz2. Run the installation script. Execute the script in thedirectory where the package was unpacked in the previous step.# cd /tbb__lin# ./install.sh
I cannot find the file referred to as install.sh in the package "tbb30_20100406oss_src.tgz". If I just "make" and source the tbbvars.sh OpenCV will not detect TBB nor does it qualify as aninstallation in my opinion. Sure I can build TBB applications, but thepresence of TBB is not conveyed properly through the system.
I am sure that I am making a very trivialmistakeso point me in the right direction. Or rather tell me how TBB should be compiled in order to work with OpenCV or where install.sh is located.
BR & Huge thanks
Bjornis
0 Kudos
3 Replies
damienhocking
New Contributor I
3,656 Views
Hey Bjornis,

Are you trying to compile TBB from source yourself, or just install the Intel-built binaries and have OpenCV detect them? The tbb30_20100406oss_src.tgz package you're using is source, not binaries. Those instructions are for the binary package, which is this: tbb30_018oss_lin.tgz.

Damien
0 Kudos
Vladimir_P_1234567890
3,656 Views
hiBjornis,
these instructions are for commercial package. in open source packages there are no install scripts. you just need to untar it and set the environment (LIBRARY_PATH, LD_LIBRARY_PATH andCPATH). if you use source package you need to build it and it will create scripts
example for the package you have used:
tar -xzftbb30_20100406oss_src.tgz
cdtbb30_20100406oss
make
source ./build/linux*release/tbbvars.sh
where *- arch, gcc and kernel specific parts
--Vladimir
0 Kudos
Nav
New Contributor I
3,656 Views

Hi Bjornis, try this:

1. Get the source folder from the TBB download webpage. You can either download a stable release version or a development release version. The filename will end with "_src". (It is recommended that you log in as root user through the command line and create a folder called intel in the /opt folder and place the downloaded file in the intel folder because thats where the Intel C++ compiler installs TBB by default. It isnt compulsory to place the files in the opt subfolders. You may place the file in any directory you like). Extract it, and through the command line, enter the "src" folder and type "gmake".

A long installation and test program running process will take place.

2. Place the below line in the ~/.bashrc file:

source /home/username/TBB/tbbSource/build/linux_ia32_gcc_cc4.1.2_libc2.7_kernel2.6.23.1_release/tbbvars.sh

If you're using the debug version, use this line instead:

source /home/username/TBB/tbbSource/build/linux_ia32_gcc_cc4.1.2_libc2.7_kernel2.6.23.1_debug/tbbvars.sh

Doing so will run the script in tbbvars.sh, every time you start a bash terminal. The script ensures that the existing variables do not get over-written by the variables being set for TBB.

You might have to change the path and filename above, according to where the tbbvars.sh file is located in your system.

The folder mentioned as "tbbSource" is the name of the folder you extracted after downloading.

3. Open a new terminal so that .bashrc is run again or type source .bashrc

4. Compile your programs with "g++ -ltbb -o executableName filename.cpp"

0 Kudos
Reply