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

How to install TBB?

Tux__the_Linux_Pengu
5,163 Views

Hello everyone!

I have a problem relating to TBB. I recently downloaded it (the Commercial-Aligned Open Source version) onto a Windows XP PC with Microsoft Visual Studio 2008 Express and Microsoft Visual Studio 2010 Express (All four products, Visual Basic, Visual C++, Visual C#, and Visual Web Developer for both installations). I found a tutorial (http://llpanorama.wordpress.com/tbb-tutorial/) but I dont have the required software (Microsoft Visual Studio 2005 Express, which is not supported anymore, or end-of-life, and which also cant be downloaded anymore). How can I install TBB with Visual Studio 2010 Express (or if I have to, Visual Studio 2008 Express)?

Thanks in advance!

Edit: I needed Microsoft Visual Studio 2005 Express for Microsoft Assembler

0 Kudos
1 Solution
Vladimir_P_1234567890
5,169 Views
You have used tbbvars.bat from the package converted via notepad++, right? generate_tbbvars.bat should be run by the build/gmake to produce righttbbvars.bat

--Vladimir

View solution in original post

0 Kudos
31 Replies
Vladimir_P_1234567890
957 Views
well, do you build in command-line or in IDE? it looks like you set environment in command line but build the sample in the IDE. Am I correct?
--Vladimir
0 Kudos
Tux__the_Linux_Pengu
957 Views
well, do you build in command-line or in IDE? it looks like you set environment in command line but build the sample in the IDE. Am I correct?
--Vladimir

Yes, you're correct. I prefer to use IDEs. Does that not work?

0 Kudos
Vladimir_P_1234567890
957 Views
by calling tbbvars.bat you set environement for the current console. Do you use /useenv option?
after calling thetbbvars.bat you need to launch visual studio using following command
[bash]devenv /useenv[/bash]
then this environment will be propagated to VS and this should work.
Also you can useMSVS Plug-in (http://www.threadingbuildingblocks.org/ver.php?fid=129) but it needs to be updated for tbb 3.0. there are instructions inside archive.
--Vladimir
0 Kudos
Tux__the_Linux_Pengu
957 Views
by calling tbbvars.bat you set environement for the current console. Do you use /useenv option?
after calling thetbbvars.bat you need to launch visual studio using following command
[bash]devenv /useenv[/bash]
then this environment will be propagated to VS and this should work.
Also you can useMSVS Plug-in (http://www.threadingbuildingblocks.org/ver.php?fid=129) but it needs to be updated for tbb 3.0. there are instructions inside archive.
--Vladimir

Thanks for the reply! Does the msvs plugin work with the express version? I remember it saying that it didn't somewhere... I triedusingthe vc8fileswith vs2010 express, but it didn't work. :-( Anyway, I couldn't find the devenv command. Also, just so you know, I updated the VCProjectEngine.Dll.Express.Configmanually, still does not work(see the include, library, path lines):
[bash]

    
		
    

[/bash]
0 Kudos
Tux__the_Linux_Pengu
957 Views

I just discovered something! Instead of
[plain]devenv /useenv[/plain]

its
[plain]vcexpress /useenv[/plain]

the fibonacci sample includes (w/o the full paths (below)) still do not work. :-(
[cpp]#include 
#include 
#include 
#include 
#include "tbb/task.h"
#include "tbb/task_scheduler_init.h"
#include "tbb/tick_count.h"
#include "tbb/blocked_range.h"
#include "tbb/concurrent_vector.h"
#include "tbb/concurrent_queue.h"
#include "tbb/concurrent_hash_map.h"
#include "tbb/parallel_while.h"
#include "tbb/parallel_for.h"
#include "tbb/parallel_reduce.h"
#include "tbb/parallel_scan.h"
#include "tbb/pipeline.h"
#include "tbb/atomic.h"
#include "tbb/mutex.h"
#include "tbb/spin_mutex.h"
#include "tbb/queuing_mutex.h"
#include "tbb/tbb_thread.h"[/cpp]
0 Kudos
Vladimir_P_1234567890
5,170 Views
You have used tbbvars.bat from the package converted via notepad++, right? generate_tbbvars.bat should be run by the build/gmake to produce righttbbvars.bat

--Vladimir
0 Kudos
Tux__the_Linux_Pengu
957 Views
You have used tbbvars.bat from the package converted via notepad++, right? generate_tbbvars.bat should be run by the build/gmake to produce righttbbvars.bat

--Vladimir

Not really, I'll convert it now.

0 Kudos
Tux__the_Linux_Pengu
957 Views
Actually, I used notepad to convert them. Now they're linux eols along with dos eols. :-)
0 Kudos
Tux__the_Linux_Pengu
957 Views
Actually, I used notepad to convert them. Now they're linux eols along with dos eols. :-)

I just converted the file I mentioned above in the quote by deleting the linux eol and the dos eol and than pressing on each of the lines. Here is what it looks like now:

[bash]@echo off
REM
REM Copyright 2005-2010 Intel Corporation.  All Rights Reserved.
REM
REM This file is part of Threading Building Blocks.
REM
REM Threading Building Blocks is free software; you can redistribute it
REM and/or modify it under the terms of the GNU General Public License
REM version 2 as published by the Free Software Foundation.
REM
REM Threading Building Blocks is distributed in the hope that it will be
REM useful, but WITHOUT ANY WARRANTY; without even the implied warranty
REM of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License
REM along with Threading Building Blocks; if not, write to the Free Software
REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
REM
REM As a special exception, you may use this file as part of a free software
REM library without restriction.  Specifically, if other files instantiate
REM templates or use macros or inline functions from this file, or you compile
REM this file and link it with other files to produce an executable, this
REM file does not by itself cause the resulting executable to be covered by
REM the GNU General Public License.  This exception does not however
REM invalidate any other reasons why the executable file might be covered by
REM the GNU General Public License.
REM
set SCRIPT_NAME=%~nx0
if (%1) == () goto Syntax
SET TBB30_BIN_DIR=%~d0%~p0
SET TBB30_INSTALL_DIR=%TBB30_BIN_DIR%..
:ParseArgs
:: Parse the incoming arguments
if /i "%1"==""        goto SetEnv
if /i "%1"=="ia32"         (set TBB_TARGET_ARCH=ia32)    & shift & goto ParseArgs
if /i "%1"=="intel64"      (set TBB_TARGET_ARCH=intel64) & shift & goto ParseArgs
if /i "%1"=="vs2005"       (set TBB_TARGET_VS=vc8)       & shift & goto ParseArgs
if /i "%1"=="vs2008"       (set TBB_TARGET_VS=vc9)       & shift & goto ParseArgs
if /i "%1"=="vs2010"       (set TBB_TARGET_VS=vc10)      & shift & goto ParseArgs
if /i "%1"=="all"          (set TBB_TARGET_VS=vc_mt)     & shift & goto ParseArgs
:SetEnv
if  ("%TBB_TARGET_VS%") == ("") set TBB_TARGET_VS=vc_mt
SET TBB_ARCH_PLATFORM=%TBB_TARGET_ARCH%%TBB_TARGET_VS%
if exist "%TBB30_BIN_DIR%%TBB_ARCH_PLATFORM%tbb.dll" SET PATH=%TBB30_BIN_DIR%%TBB_ARCH_PLATFORM%;%PATH%
if exist "%TBB30_INSTALL_DIR%..redist%TBB_TARGET_ARCH%tbb%TBB_TARGET_VS%tbb.dll" SET PATH=%TBB30_INSTALL_DIR%..redist%TBB_TARGET_ARCH%tbb%TBB_TARGET_VS%;%PATH%
SET LIB=%TBB30_INSTALL_DIR%lib%TBB_ARCH_PLATFORM%;%LIB%
SET INCLUDE=%TBB30_INSTALL_DIR%include;%INCLUDE%
IF ("%ICPP_COMPILER11%") NEQ ("") SET TBB_CXX=icl.exe
IF ("%ICPP_COMPILER12%") NEQ ("") SET TBB_CXX=icl.exe
goto End
:Syntax
echo Syntax:
echo  %SCRIPT_NAME% ^ ^
echo    ^ must be is one of the following
echo        ia32         : Set up for IA-32  architecture
echo        intel64      : Set up for Intel 64  architecture
echo    ^ should be one of the following
echo        vs2005      : Set to use with Microsoft Visual Studio 2005 runtime DLLs
echo        vs2008      : Set to use with Microsoft Visual Studio 2008 runtime DLLs
echo        vs2010      : Set to use with Microsoft Visual Studio 2010 runtime DLLs
echo        all         : Set to use TBB statically linked with Microsoft Visual C++ runtime
echo    if ^ is not set TBB statically linked with Microsoft Visual C++ runtime will be used.
exit /B 1
:End
exit /B 0[/bash]
0 Kudos
Tux__the_Linux_Pengu
957 Views

I just tried the new tbbvars.bat, and it worked, except for one thing. *sigh* I tried the fibonacci sample again, and the includes worked (not full paths; e.g. tbb/atomic.h), but there was a error:

[plain]1>------ Build started: Project: fibonacci_tbb, Configuration: Debug Win32 ------
1>  Fibonacci.cpp
1>LINK : fatal error LNK1104: cannot open file 'tbb_debug.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/plain]

Were the lib paths updated?

0 Kudos
Tux__the_Linux_Pengu
957 Views

I'm done! I manually updated the lib path with this command:

[bash]set path=C:Program FilesIntelTBB3.0 Update 1 Commercial-Aligned Releasebinia32vc10;%path%
[/bash]
Now the fibonacci sample works!
(My install path will probably be different from other people's install paths. If you've already set the TBB30_INSTALL_DIR, use it like this:
[bash]set path=%TBB_INSTALL_DIR%binia32;%path%[/bash]

)
A big thank you to all the people who replied!
0 Kudos
Reply