Intel® Concurrent Collections for C++ 0.5.x Getting Started

Contents

  • This is Pre-Release Code
  • The prerequisite Software for Install and Set-up
  • Installing the Intel® Threading Building Blocks Library
  • Downloading and Installing the Intel® Concurrent Collections for C++
  • Running the Samples
  • Running Different Versions of Visual Studio on the Same Machine
  • Locate the Documentation
  • Changing, Updating and Removing the Product
  • Disclaimer and Legal Information

This is Pre-Release Code

Intel® Concurrent Collections for C++ is pre-release code, which may not be fully functional and which Intel may substantially modify in producing any final version. Intel can provide no assurance that it will ever produce or make generally available a final version.

The Prerequisite Software for Install and Set-up

  1. Intel® Concurrent Collections for C++ is supported on the Microsoft Windows* OS and Linux* OS running on IA-32 or Intel® 64 architecture systems.
  2. For Microsoft Windows*, you must have Microsoft Visual Studio* 2005 SP1 or Microsoft Visual Studio* 2008 with the Visual C++* component installed on your system.
  3. For Linux*, you must have GNU g++ version 3.4.2 or greater installed on your system.
  4. You must have the Intel® Threading Building Blocks (TBB) 2.2 runtime library installed on your system.

Note: the Intel® Concurrent Collections for C++ product is designed to run with either the Microsoft* or Intel® C++ compilers on Microsoft Windows*, and either the GNU g++ or Intel® C++ compilers on Linux*.

Installing the Intel® Threading Building Blocks Library

The Intel® Concurrent Collections for C++ runtime library uses the Intel® Threading Building Blocks 2.2 runtime library. If Intel® Threading Building Blocks 2.2 is not already installed on your system, then:

For Windows*

  1. Create a directory to hold the Intel® TBB files. We recommend C:\Program Files\Intel\TBB\2.2.
  2. Download Intel® Threading Building Blocks 2.2. Although all versions of Intel® TBB 2.2 work with Intel® Concurrent Collections for C++, we recommend that you download the latest update from the Commercial Aligned Release section, which is TBB update 3. To download the Commercial Aligned Release, go to http://threadingbuildingblocks.org; Click on "Downloads"; Click on "Commercial Aligned Release"; Click on "tbb22_013oss"; Click on "Download" that is next to tbb22_013oss_win.zip, then save the file to a location on your local system. Note that the latest Stable Release, tbb22_20090809oss_win.zip, also works with this version of Intel® Concurrent Collections for C++. To download the Stable Release, Click on "Stable Release" and follow the above instructions using tbb22_20090809oss.
  3. Using unzip, extract all files/folders in tbb22_013oss_win.zip (or tbb22_20090809oss_win.zip) using the "Use folder names" option to the directory you created in step 1.
  4. Set up the Intel® TBB environment variable - TBB22_INSTALL_DIR to point at the full path name of the Intel® TBB directory. Use the Control Panel -> System -> Advanced -> Environment Variables. Note: if you followed all of the recommendations in the above steps, the value of TBB22_INSTALL_DIR would be C:\Program Files\Intel\TBB\2.2\tbb22_013oss.
  5. If you installed the latest Commercial Aligned Release, tbb22_013oss_win.zip, then you must edit each "tbbvars.bat" file, which are located in the bin directories under TBB. Please replace the statement:
    "SET TBB22_INSTALL_DIR=SUBSTITUTE_INSTALL_DIR_HERE"
    with:
    "IF NOT DEFINED TBB22_INSTALL_DIR SET TBB22_INSTALL_DIR=SUBSTITUTE_INSTALL_DIR_HERE"

    If you don't use the setenv_*_vs200*.bat scripts to setup your environment, you should add the location of the appropriate Intel® TBB dll’s to your path. The location should be:

    %TBB22_INSTALL_DIR%\[ia32 or intel64]\[vc8 or vc9]\bin

    Note: You specify ia32 if you are using an IA-32 architecture system and intel64 if you are using an Intel® 64 architecture system. In addition, you should specify vc8 if you are using Microsoft Visual Studio* 2005 SP1 and vc9 if you are using Microsoft Visual Studio* 2008. For information on script files provided to aid in environment variable set-up, please refer to Running Different Versions of Visual Studio* on the Same Machine.

For Linux*

  1. Create a directory to hold the Intel® TBB files. We recommend /opt/intel/tbb/2.2.
  2. Download Intel® Threading Building Blocks 2.2 from http://threadingbuildingblocks.org. We recommend that you download the latest update from the Commercial Aligned Release section, tbb22_013oss_lin.tgz. Click on Download then save the file to a location on your local system. Note that the latest Stable Release, tbb22_20090809oss_lin.tgz, also works with this version of Intel® Concurrent Collections for C++.
  3. Use the "tar -xzf" command to extract all files/folders in tbb22_013oss_lin.tgz and move the contents of the resulting tbb22_013oss/ directory into the directory you created in step 1.
  4. Modify the appropriate Intel® TBB shell script used to set up the environment variables so that it contains the full path name of the Intel® TBB installation directory. Note: if you followed all of the recommendations in the above steps, then if you are on an IA-32 architecture system, modify the shell script located in /opt/intel/tbb/2.2/ia32/cc3.4.4_libc2.3.4_kernel2.6.9/bin/, or if you are on an Intel® 64 architecture system, modify the shell script located in /opt/intel/tbb/2.2/intel64/cc3.4.3_libc2.3.4_kernel2.6.9/bin/. There are "tbbvars.csh" and "tbbvars.sh" files in each of the above directories. Edit the appropriate file (depending on the shell you are using), and replace the phrase "SUBSTITUTE_INSTALL_DIR" with the path to your Intel® TBB installation, which would be /opt/intel/tbb/2.2 if you followed the recommendations.
  5. Invoke the modified shell script to set up your environment variables, e.g. "source tbbvars.csh".

Downloading and Installing the Intel® Concurrent Collections for C++

For Windows*

This should be done using the executable from the WhatIf web site. Simply download the install exe, and run it.

The install process creates an environment variable named CNC_INSTALL_DIR, which points to the full path name of the Intel® Concurrent Collections for C++ product. If you want to use another version of the product, you must manually set CNC_INSTALL_DIR to point to that location.

For Linux*

This should be done using the installation script contained in the Linux* kit available from the WhatIf web site. Simply download the kit, extract it and run the install.sh script. For example:

  1. tar -xzf "l_cnc_b_0[1].5.001.tgz"
  2. cd l_cnc_b_0.5.001
  3. ./install.sh

Running the Samples

For Windows*

Sample programs using the Intel® Concurrent Collections for C++ product are available at %CNC_INSTALL_DIR%\Samples. To load these samples into Microsoft Visual Studio*and run them, just click on the example\examplename.sln file, for example:

%CNC_INSTALL_DIR%\Samples\VS2005\div_conq\div_conq.sln.

See the Intel® Concurrent Collections for C++ User's Guide for details on creating and running your own Intel® Concurrent Collections for C++ project.

For Linux*

Sample programs using the Intel® Concurrent Collections for C++ product are available in $CNC_INSTALL_DIR/samples/. The Makefiles for these samples rely on a CNC_INSTALL_DIR environment variable being defined; this can be accomplished by executing the following steps after installation:

  1. Open the $CNC_INSTALL_DIR/bin/$ARCH/cncvars.csh script (or cncvars.sh, depending on your shell) in a text editor, where $ARCH is "intel64" if you are on an Intel® 64 architecture system, and "ia32" if you are on an IA-32 architecture system.
  2. Replace "SUBSTITUTE_INSTALL_DIR_HERE" with the location of $CNC_INSTALL_DIR--e.g. "/opt/intel/cnc/0.5".
  3. Execute the modified script at the command line--e.g. type "source cncvars.csh".

After the environment variables have been properly set up, you can try building and running the examples located in the $CNC_INSTALL_DIR/samples directory. Note that the Makefiles are set up for an Intel® 64 architecture system by default. If you are on an IA-32 architecture system, redefine the "ARCH" variable in the Makefiles to be "ia32".

Running Different Versions of Visual Studio* on the Same Machine

(For Windows* only)

Usually, the environment variables used by Microsoft Visual Studio* are derived from the Use the Control Panel -> System -> Advanced -> Environment Variables settings. This method is not convenient when using multi-versions of Microsoft Visual Studio*, or when building programs for IA-32 and Intel® 64 architecture systems on the same machine. This is because the paths to the Intel® Concurrent Collections for C/C++ and Intel® TBB runtime libraries differ depending upon the version of Microsoft Visual Studio* and the target processor architecture. As an alternative, we provide four script files to aid in setting up the proper environment. The script files are located in the top-level directory of the Intel® Concurrent Collections for C/C++ product, and are named setenv_ia32_vs2005.bat, setenv_ia32_vs2008.bat, setenv_intel64_vs2005.bat, and setenv_intel64_vs2008.bat. Executing setenv_*_vs200*.bat from a Windows command prompt sets up the appropriate environment for that window. You can execute 'setenv_*_vs200*.bat -vs' from either a Windows command prompt or the Start -> Run menu, and the specified version of Microsoft Visual Studio* will be invoked with the appropriate environment. For more information, execute any of the setenv bat files with the -h option.

Note that the above mentioned script files are supplied as is. You may have to modify them for you system environment.

Locate the Documentation

The documentation is located in the <install-dir>\doc\ directory. You can find documentation on the following:

Changing, Updating and Removing the Product

(For Windows* only)

If you want to add or remove components from an installation, open the Add or Remove Programs applet in the Windows Control Panel, select "Intel® Concurrent Collections for C++ Prototype Edition, version 0.5.xxx" and click Change. To remove the product, select Remove instead of Change.

When installing an updated version of the product, you do not need to remove the older version first.

 

Disclaimer and Legal Information

INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL® PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR.
Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information.

The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request.

Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.

Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or by visiting Intel's Web Site.

Intel processor numbers are not a measure of performance. Processor numbers differentiate features within each processor family, not across different processor families. See http://www.intel.com/products/processor_number for details.

BunnyPeople, Celeron, Celeron Inside, Centrino, Centrino Atom, Centrino Atom Inside, Centrino Inside, Centrino logo, Core Inside, FlashFile, i960, InstantIP, Intel, Intel logo, Intel386, Intel486, IntelDX2, IntelDX4, IntelSX2, Intel Atom, Intel Atom Inside, Intel Core, Intel Inside, Intel Inside logo, Intel. Leap ahead., Intel. Leap ahead. logo, Intel NetBurst, Intel NetMerge, Intel NetStructure, Intel SingleDriver, Intel SpeedStep, Intel StrataFlash, Intel Viiv, Intel vPro, Intel XScale, Itanium, Itanium Inside, MCS, MMX, Oplus, OverDrive, PDCharm, Pentium, Pentium Inside, skoool, Sound Mark, The Journey Inside, Viiv Inside, vPro Inside, VTune, Xeon, and Xeon Inside are trademarks of Intel Corporation in the U.S. and other countries.

* Other names and brands may be claimed as the property of others.

Copyright (C) 2009-2010, Intel Corporation. All rights reserved.

Categories:
For more complete information about compiler optimizations, see our Optimization Notice.