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

Installing TBB on Ubuntu Error

donnyb
Beginner
703 Views
I was able to run make all after placing the two _lin and _src files into a folder on opt/intel. And I changed the .sh and .csh file to the current directory so the program know where to fine the files.
However, when I come to use the the libary when coding I am able to tell my compiler where the header files are, but when I come to run the program. A very simple one like this.
[bash]#include "tbb/task_scheduler_init.h"
using namespace tbb;

int main()
{
    task_scheduler_init init;
    return 0;
}
[/bash]
I get an error like this unable to open file libtbb_debug.so.2. So I linked the compiler to the file in question with no results.
Upon closer examination the folder holding this file is not in the $PATH. I am not sure if this is the problem or if it is something else. Normally the program would let me link to it with my compiler. Am I using the wrong copy of libtbb_debug.so.2, I found at least two differnt copies in two differnt folders. How am I suposed to know which one to use. I am on an intel board with a 32 bit system, but there are two copies for that. Is that the problem. I am totaly lost here. Some help would be apprecated.
Thanks,
Donald

p.s. it is not my compiler spiting out the error, it prints on the acutal terminal. This is why I do not think it is compiler realated. I told the compiler where the file was and when I run it I think the operating system can not fine the copy.

Thanks in advance.
0 Kudos
5 Replies
Tux__the_Linux_Pengu
703 Views

Did you run the tbbvars.sh file? Are all the paths updated? (The $PATH, the lib path, etc.?)

Hope this helps!

P.S. I don't use linux, but I have a little experience with it.
0 Kudos
donnyb
Beginner
703 Views
I have looked at the .sh file and the .csh file and to subsituite the directory where it is installed is easy enough, but how do i change this.
get_ia32(){ 
	echo SUBSTITUTE_IA32_ARCH_HERE
}

get_ia64(){
	echo SUBSTITUTE_IA64_ARCH_HERE
}

get_intel64(){
	echo SUBSTITUTE_INTEL64_ARCH_HERE
}

After I fun this script I will rerun make all and see if it works.
If someone can tell me what the
SUBSTITUTE_INTEL64_ARCH_HERE is then I can subsitute the right values
also I run bash should I run the .csh or .sh

Thank you in advance,
Donald
0 Kudos
Tux__the_Linux_Pengu
703 Views
Try going to "/bin/ia32/" where is either
* cc3.4.4_libc2.3.4_kernel2.6.9
* cc4.1.0_libc2.4_kernel2.6.16.21
depending on what software you have. Then open tbbvars.sh and replace "SUBSTITUTE_INSTALL_DIR_HERE" with your tbb install path (keep the quotes) Example: "C:\Program Files\Intel\TBB\3.0 Update 1 Commercial-Aligned Release" (I use WinXP). Then run tbbvars.sh. Does that help?
Note: You can test if everything is working by going to /examples/test_all/fibonacci and then compiling and running Fibonacci.cpp. It should display "TEST PASSED" or something like that.

Hope that helps!
0 Kudos
Nav
New Contributor I
703 Views
Run the ".sh" file.
If the .sh file is not being found, the simplest thing you can do is to take all the lines of code from the .sh file and place it in your .bashrc file. You just have to substitute the variable names with the actual path.
This way, each time you start bash, the necessary variables for TBB will be set automatically.

" If someone can tell me what the 
SUBSTITUTE_INTEL64_ARCH_HERE"

I have no idea, and AFAIK, that line is not necessary either. Don't bother about it.
0 Kudos
mecej4
Honored Contributor III
703 Views
Here is the standard drill on setting the environment for a package: running a shell script with lines that set variables will set the environment for the duration of the script only. In other words, the variables are set when the script runs but, as soon as it finishes, the environment is reset to what it was before running the script.

To make the changes (semi)permanent, use the 'source' command or run the script as ". ", that is, dot-space-script_name .
0 Kudos
Reply