Startup Crash from running 06-ProgrammingWithThreadingBuildingBlocks_PS Courseware

Startup Crash from running 06-ProgrammingWithThreadingBuildingBlocks_PS Courseware

Hi,

We are running into the issue of not being able to work through the Activity labs from Parallel Training version 3.0, 06-ProgrammingWithThreadingBuildingBlocks_PS. When we switch to use TBB to convert MatrixMultiply for Parallel we crash on startup. Please look at the attached image.

We did dependency walker and the TBB.dll exist but we fail to startup.

On our configuration we have both Intel Parallel Studio and Intel C/C++ Compiler product and it rebuilds with no problems.

Any ideas what's going on?

Thanks

Professor Jose Villeta

USC

AttachmentSize
Downloadimage/jpeg IntelTBBStartupCrash.jpg260.58 KB
10 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

What code are you using? Is this the solution for this exercise or something that was written from the serial code? Have you initialized the TBB scheduler in the code before calling a TBB algorithm?

If all of that checks out, could you post the code you are using? I can verify that it does or doesn't work on systems that I have. If it does, then there may be something with the setup on your system. Does it work if you place the tbb.dll or other needed libraries in the executable directory? If so, check the paths used in Visual Studio.

--clay

Quoting Clay Breshears (Intel)

Does it work if you place the tbb.dll or other needed libraries in the executable directory? If so, check the paths used in Visual Studio.

I really meant to say check the paths in the environment variables. Once it's compiled correctly, thoe paths in VS shouldn't affect execution.

Also, does the code run from the execution directory if you launch it with a command window? If not, there may be a problem with the path setup.

--clay

We tested with the code solution provided with no changes.

It has task_scheduler_init init call.

It crashes from the VS2008 dev env either with F5 or CTRL-F5 commands.

It crashes as well if executing the Application directly.

It crashes on both Win7, 64 bit OS or running on the Intel Server Windows 2008 R2.

It fails as well on both command prompts from Intel C/C++ or Parallel Studio.

I confirmed it will happen for any of the modules provided like PI solution code as well.

Can you try to duplicate the problem by just building the MatrixMultiply solution with the parallel code solution provided?

Thanks for your help since this blocks out the traininig of this module.

jose

Quoting josevilleta

We tested with the code solution provided with no changes.

I've tried this on my own systems and there has been no problems. It is not a problem with the code, but would appear to be a problem (difference)with your execution environment.

Have you tried running the executable with the tbb.dll in the execution directory? Have you confirmed that the proper path environment variables are set to locate the TBB libraries? Locate the tbbvars.bat file and either run that or use the details to set up/check your environment set up.

Here are the relevant lines from my local TBB installation:

SET TBB22_INSTALL_DIR=C:\Program Files\Intel\TBB\2.2
SET TBB_ARCH_PLATFORM=ia32\vc9
SET PATH=%TBB22_INSTALL_DIR%\%TBB_ARCH_PLATFORM%\bin;%PATH%
SET LIB=%TBB22_INSTALL_DIR%\%TBB_ARCH_PLATFORM%\lib;%LIB%
SET INCLUDE=%TBB22_INSTALL_DIR%\include;%INCLUDE%

If you're wanting to use the Intel Parallel Composer installed version, you should look in...

C:\Program Files\Intel\Parallel Studio\Composer\tbb\

--clay

Hi Clay,

Here're our settings for both desktops and server:

TBB22_INSTALL_DIR=C:\Program Files (x86)\Intel\Compiler\11.1\054\tbb
TBB_ARCH_PLATFORM=intel64\vc9

ICPP_COMPILER11=C:\Program Files (x86)\Intel\Compiler\11.1\054\
INCLUDE=C:\Program Files (x86)\Intel\VTune\Analyzer\include
INTEL_LICENSE_FILE=C:\Program Files (x86)\Common Files\Intel\Licenses
ITT_TCHECK=C:\Program Files (x86)\Intel\VTune\tcheck
ITT_TPROFILE=C:\Program Files (x86)\Intel\VTune\tprofile
LIB=C:\Program Files (x86)\Intel\VTune\Analyzer\lib

We installed both Intel C/C++ compiler and Parallel Studio in addition to VTUNE, Thread Profiler and Thread Checker.

Both systems are 64-bit systems. Desktops are running Windows 7. Server is running Windows 2008 Server R2. Here're the path items from Intel products

PATH=

C:\Program Files (x86)\Intel\Compiler\11.1\054\tbb\intel64\vc9\bin;

C:\Program Files (x86)\Intel\Compiler\11.1\054\ipp\em64t\bin;

C:\Program Files (x86)\Intel\Compiler\11.1\054\lib\Intel64;

C:\Program Files (x86)\Intel\Compiler\11.1\054\mkl\em64t\bin;

C:\Program Files (x86)\Intel\Parallel Studio\Composer\tbb\intel64\vc9\bin;

C:\Program Files (x86)\Intel\Parallel Studio\Composer\ipp\em64t\bin;

C:\Program Files (x86)\Intel\Compiler\11.1\054\lib\ia32;

C:\Program Files (x86)\Intel\VTune\CGGlbCache;

C:\Program Files (x86)\Intel\VTune\Shared\Bin32e;

C:\Program Files (x86)\Intel\VTune\Analyzer\Bin32e;

C:\Program Files (x86)\Intel\VTune\Analyzer\Bin;

C:\Program Files (x86)\Intel\VTune\Shared\Bin

Any suggestions on what the vars should be set at?

Thanks

jose

Jose -

It would appear that the paths you have set up foir PATH should work. Looking on my system (Win XP) with the 11.1/054 compiler and Parallel Studio, I don't have TBB under any of these. My installation is separate, but I'm still able to use TBB from Parallel Studio.

Before checking the paths, though, you should test whether or not the apps will execute if you copy the tbb.dll file into the execution directory for the apps. If this works for me (and doesn't when the file is not present), then I begin to suspect that the paths aren't set up correctly on my system. You might then try installing a separate version of TBB and using that version to compile and run. Test this by opening up a command window and running the TBB set up batch file before running the code in the window.

If you've doneall of thie andstill can't get the applications to work, then there might be something with the interaction between Windows 7 and TBB. You'll need to report this to the TBB support team. I don't have access to a Windows 7 machine.

You might also try posting your question in the TBB forums at http://www.threadingbuildingblocks.org. They've got experts over there that monitor the forums. I'm just a TBB patzer.

--clay

Hi Tao,

The link posted states page not found.

I followed the steps below as you recommended and was able to make it work.

Thanks

jose

Please follow the procedures below, you will be able to fix the issue and run the TBB version of the lab:

1. Click .sln file found in 01 Matrix MultiplyPS to start the Parallel Studio in Visual Studio 2008 SP1. Right-click TBB Matrix Multiply and Set as Startup Project

2. Set Intel C++ Compiler Pro as below:

3. Select 64 bit Build Components as below:

Make sure you select Release Build

X64 Platform

Version to use: Intel Compiler Pro 11.1. Built 048

Select TBB

4. Set TBB Include for C/C++ by Go to Property -> C/C++ -> General and then click the first line Additional Include Directories to open Additional Include Directories Pop-up Window to add C:\ Program Files (x86)\Intel\Compiler\11.1\048\tbb \include or whatever version of TBB you have installed ( If you are using new Intel Compiler version 11, the TBB is included in Compiler package, and TBB folder is located under compiler folder). The Parallel Studio will change it to software $() link as below:

5. Set TBB Linker Go to Property -> Linker ->General and select the Additional Library Directories from the 3rd line from bottom add C:\ Program Files (x86)\Intel\Compiler\11.1\048\tbb\intel64\vc9\lib as below:

6. Follow the lab document: lab-ThreadingForPerformanceWithThreadingBuildingBlocks-Lab.doc, you will be able to run the lab as below:

I am happy to find many good details here in the post, writing is just fantastic.Wonderful post!

Leave a Comment

Please sign in to add a comment. Not a member? Join today