Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tbb config #119

Closed
wants to merge 2 commits into from
Closed

Conversation

hjmjohnson
Copy link

No description provided.

The FATAL_ERROR causes the un-recoverable failure on testing.

find_packaging(TBB QUIET) should be allowed to fail.  If a component
is missing that was requested, a non-terminating exit is needed.
@hjmjohnson
Copy link
Author

@tbbdev These changes are listed as a temporary homeberew patch at:
Homebrew/homebrew-core#36175

This should also resolve the problem posted here: oneapi-src/oneDPL#16

@@ -38,8 +38,7 @@ endif()

set(TBB_INTERFACE_VERSION @TBB_INTERFACE_VERSION@)

get_filename_component(_tbb_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_tbb_root "${_tbb_root}" PATH)
set(_tbb_root "@TBB_ROOT@")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to this change _tbb_root is set during the TBBConfig generation stage, but the previous implementation sets _tbb_root dynamically.
Is the generation of TBBConfig intended to be done on user system with absolute path in @TBB_ROOT@ as a part of TBB package installation? Or the generation is supposed to be done on a system where the package is prepared?

Anyway it doesn't look suitable for TBBConfig files in official TBB packages (which are portable, actually).

As far as I understand a relative path in @TBB_ROOT@ won't work without CMAKE_CURRENT_LIST_FILE as CMake will try to find TBB files relatively to user project location in this case.

@hjmjohnson
Copy link
Author

@AlexVeprev I see your point.

The current code is also wrong when -DSAVE_TO=lib/cmake/TBB (i.e. placing the files in the conventional relationship to the libraries as is done by the homebrew implementation.

It should be possible to configure the file with something like

"cmake", "-DTBB_ROOT=#{prefix}",
                    "-DTBB_OS=Darwin",
                    "-DSAVE_TO=/some/very/long/path/reference//with/arbitrary/levels/lib/cmake/TBB",
                    "-P", "cmake/tbb_config_generator.cmake"

https://github.com/Homebrew/homebrew-core/blob/master/Formula/tbb.rb

"cmake", "-DTBB_ROOT=#{prefix}",
                    "-DTBB_OS=Darwin",
                    "-DSAVE_TO=lib/cmake/TBB",
                    "-P", "cmake/tbb_config_generator.cmake"

=======
I am willing to help get the code correct, but it is quite difficult to determine the intended behaviors of tbb installation. tbb is one of the most difficult packages I have every work with in regards to incorporating it's deployment. (The library is great once installed, but integrating into existing builds for purposes like travis continous integration on github are extreemly unconventional).

If you can provide some guidance on the intended workflow for 1) Downloading, 2) building, 3) installing, and then 4) building our applications against TBB I would be eternally grateful.

Thanks,
Hans

@AlexVeprev
Copy link
Contributor

Hi @hjmjohnson
 
Speaking about GitHub TBB distribution: you can build TBB from sources or download packages with prebuilt binaries.
There are no special installation steps, but to use TBB you can:

  • Run tbbvars.sh/.csh/.bat to set environment variables (TBBROOT, LIBRARY_PATH, etc.) or
  • Use find_package from CMake with TBB_DIR=<tbb_root>/cmake as described here.

TBBMakeConfig.cmake was originally implemented to generate TBBConfig files for TBB packages distributed on GitHub. That's why it looks "buggy" when you use it in Homebrew. But now it is seen that TBBConfig generation is suitable for other TBB packages. I think it makes sense to work in this direction.
I didn't investigate this deep enough and cannot say what is better: to "fix" existing TBBConfig generator or to create a new one applicable for TBB GitHub/Homebrew/APT/YUM/Conda/etc. packages. I'd really appreciate if you share your ideas about it.

Thanks,
Alexey

@hjmjohnson
Copy link
Author

@AlexVeprev,

You instructions are OK for building single binary as a developer that wants to understand TBB. I need to install TBB in a way that allows integration with a hierarchy of other libraries (ITK, VTK, BRAINSTools, Slicer) across compilers/OS/ and development platforms (Not all unix or command line driven).

The time tested and validated paradigm to achieve this is supported by meson, cmake, autoconf tools:

-- Configure specifying 
        -- the compiler/IDE development environment: (CC, CXX, CFLAGS ....)
        -- the desired install prefix (i.e. --prefix=/usr/myfavoriteplace) will result in a standard directory layout rooted at '/usr/myfavoriteplace

-- build (ninja/make/nmake) 
-- install

The result should be that with 3 commands a redistributable set of binary files suitable for the current platform can be created:

${installprefix}/inlcude/tbb/<<< *.h >>>                                         #TBB header files
${installprefix}/lib/<<< libTBBB***[_debug].[.so|dylib|a]>>>>>  #TBB binary files
${installprefix}lib/cmake/TBB/***.cmake                                        #TBB cmake config files referencing this ${installprefix}

=======
NOTE: : Feel free to ignore. It seems that the build system for TBB is optimized for the convenience of the TBB library developers, and not the end users of TBB (or at least other developers that want to depend on TBB libraries). The build environment for TBB seems to be a one-off makefile hand crafted script. The most disturbing concern is that package developers (home-brew/ RPM/ debian ... etc) each have different implementations and wrapper scripts around the TBB build environment to coerce the creation of binaries from TBB into a standard install that is compatible with their distribution.
<\end_critique> :)

========

I've been fighting with TBB on and off for 6 months now. I can always build TBB by hand on my computers. Then I need to spend hours hand building and resolving linkage issues for each of the many packages that use TBB for our application. I need a scriptable install that works in continuous integration environment builds without manual interventions. I need a consistent pattern for finding system installed versions of TBB.

My current problems are 2 fold 1) The current homebrew install of TBB fails because the pathing is wrong in the TBBMakeConfig.cmake that is used by the home-brew package maintainers (and they are hesitant to make a change that is not in TBB upstream.) 2) The recommended way to include TBB using cmake tools depends on access to api.github.com in order to get version information and package tarball file information, but api.github.com is blocked on continuous integration environment (Travis) for security reasons presumably.

=======
I'm working on a more complete fix, but I don't want to expend a lot of time making a solution that fits my vision only to find that it will not be accepted.

@AlexVeprev
Copy link
Contributor

@hjmjohnson, thank you for the detailed explanation!

The paradigm configure/build/install allows to create the library/application from sources and install it, but from my perspective the more common use case for TBB is use of pre-built binaries. If I'm right then a TBB user is interested in installing TBB via his favorite package manager / installer and integration of the installed TBB into his project, e.g. using TBBConfig.

On the other hand for package maintainers the configure/build/install steps are truly applicable. And actually configure/build steps are covered by Makefile scripts in TBB (maybe not so conveniently as it is needed for package maintainers).
If we consider the existing build infrastructure: can it be improved with small investments, but with high value for package maintainers or users who wants to build TBB from source and install it?
E.g. add install target into Makefile which will copy headers/binaries to ${installprefix} and create ${installprefix}/lib/cmake/TBB/TBBConfig[Version].cmake. Or just another target creating TBBConfig[Version].cmake in the requested location.

A proper CMake support allows to simply implement the configure/build/install paradigm, but existing Makefile infrastructure in TBB is quite big and complex, so smooth and full migration to CMake will require a lot of resources.

@anton-malakhov
Copy link

@hjmjohnson Please note the build.py script which is intended for package maintainers usage. So far, it is used by Conda-Forge, Anaconda, and Intel itself in order to assemble tbb, tbb-devel, and tbb4py packages. BTW, conda's package management is good for any language, Conda-Forge provides a lot of C/C++ libraries as openly-compiled packages and it is pretty easy to add new recipes.

@hjmjohnson hjmjohnson force-pushed the fix_TBBConfig branch 2 times, most recently from e873222 to 3f63006 Compare January 29, 2019 03:06
@hjmjohnson
Copy link
Author

@anton-malakhov thanks but that is not a viable option. I can not add python or conda as a dependency for my applications.

@hjmjohnson
Copy link
Author

@AlexVeprev I have pushed a set of changes that add a script to accomplish a standard install of TBB. I'd appreciate if you could review these changes.

@AlexVeprev
Copy link
Contributor

@hjmjohnson, thank you! I've started the review. I'd like to understand the changes deeply enough and try them practically. So, it will take some time.

Thanks,
Alexey

The cmake/TBBBuildInstallScript.cmake allows for building TBB
in a temporary build directory under the mandated TBB build
heirarchy.  From the tempory build directory the headers, libraries,
and CMake package config files are installed in relocatable directory
heirachy that mimics the common unix scheme of

{install_prefix}/lib/lib*.[so|dylib|a]
{install_prefix}/lib/cmake/TBB/*.cmake
{install_prefix}include/tbb/*.h

NOTE: The {install_prefix}/lib/cmake/TBB/*.cmake files use relative
      paths, so these files are relocatable to any {install_prefix}
      after the initial install occurs.

NOTE: The TBBConfigForSource.cmake.in and TBBConfig.cmake.in files
      were merged as they only differed in how they set the
      _tbb_release_lib_dir, _tbb_debug_lib_dir, _tbb_include_dir
      variables, so that is now managed by a simple if() statement
      where the argument of the if is hard-coded at configure time.

NOTE: A test case that builds a minimal program from the installed
      directory has been added.

NOTE: TBBBiuld now exposes options to support more flexible building
      while maintaining backwards compatiblity with the default
      settings.

NOTE: Moved platform default values to TBBPlatformDefaults.cmake
      so that they are used consistently across units.

Example invocation to configure, build, install, and test against
installed binaries.

cmake  \
     -DCMAKE_INSTALL_PREFIX=/tmp/tbbinstall                   \
     -DTBB_BUILD_DIR:PATH=/tmp/buildtbb                       \
     -DTBB_BUILD_PREFIX:STRING=unix_cmake_build               \
     -DTBB_RELATIVE_CMAKE_CONFIG_PATH:PATH=lib/cmake/TBB      \
     -DTBB_LIBDIR_NAME:STRING=lib                             \
     -DTBB_COMPILER:STRING=clang                              \
     -DTBB_BUILD_STATIC:BOOL=ON                               \
     -DTBB_BUILD_SHARED:BOOL=ON                               \
     -DTBB_DO_EXTERNAL_CMAKE_BUILD_TEST:BOOL=ON               \
     -P cmake/TBBBuildInstallScript.cmake
Copy link
Contributor

@AlexVeprev AlexVeprev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @hjmjohnson, I've partly reviewed your changes (TBBMakeConfig).

Seems you completely changed behavior in case of CONFIG_FOR_SOURCE is false and you moved all legacy code under a condition "CONFIG_FOR_SOURCE is true".

But currently TBBMakeConfig can do the following:

  1. CONFIG_FOR_SOURCE is true: generate TBBConfig files from TBBBuild.cmake:189
  2. CONFIG_FOR_SOURCE is false: generate TBBConfig files for TBB release packages using tbb_config_generator.cmake.

I didn't verified the case 1 with your updates, but I was not able to generate a proper config for TBB release packages.
I understand that you probably don't have much interest in this functionality, but anyway it is used now and the problem needs somehow to be addressed before the PR can be merged.

Let's try to clarify your requirements for TBBConfig generator.
Please correct me if I'm wrong:

  1. Input:
    • relative path from TBBConfig.cmake to TBB binaries (release/debug?)
    • relative path from TBBConfig.cmake to TBB headers
    • TBB version (+interface version)
  2. Output:
    • TBBConfig.cmake
    • TBBConfigVersion.cmake
  3. Only one set of TBB binaries is supposed to be included into the package.
  4. *Binaries/headers presence in a system is not required during the generation.

@@ -79,7 +88,7 @@ if (NOT _tbb_compiler_id STREQUAL \"GNU\")
endif()

set(_tbb_compiler_subdir gcc4.1)
foreach (_tbb_gcc_version 4.1 4.4 4.7)
foreach (_tbb_gcc_version 4.1 4.4 4.7 5.0 5.4 6.0 7.0 7.5 8.0 9.0 ${CMAKE_CXX_COMPILER_VERSION})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you extend the list of GCC versions? This loop is needed to correctly choose compiler subdirectory in a TBB package for Linux, the latest package has only three subdirectories: gcc4.1, gcc4.4, gcc4.7.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When building with gcc 7.3.0 this code caused failure for the built version I installed. It means that this code only works for the binaries in the build configuration that are produced and delivered in binary form, not the source code builds.

This code is really concerning to me. Source code builds should not be tied to lists like this.

# CONFIG_FOR_SOURCE <- Reference the source from TBBConfig.cmake (mutually exclusive of TBB_BUILD_DIR)
# TBB_RELEASE_DIR | Source build release binaries directory
# TBB_DEBUG_DIR | Source build debug binaries directory
# TBB_BUILD_DIR:PATH <- Where installed packages are located (mutually exclusive of CONFIG_FOR_SOURCE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBB_BUILD_DIR is not quite clear to me, what did you mean? A directory like /usr? If yes, I'd use more clear name, e.g. INSTALL_DIR

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBB_BUILD_DIR is a temporary build directory where binaries are built before being installed.

In standard cmake paradigm

git clone <URL>/mypkg.git   # This is the source tree
mkdir mypkg-bld   # <- this is the out of source location for build artifacts (including .o files)
cd mypkg-bld &&  cmake ../mypkg -DCMAKE_INSTALL_PREFIX:PATH=/usr/local
make                      # This is building all the build products (.o intermeidiate files & lib*.a files)
make install           # This moves files from source tree and build tree to desired install tree

OR IN autoconf tools

git clone <URL>/mypkg.git   # This is the source tree
mkdir mypkg-bld 
cd mypkg-bld &&  ../mypkg/configure --prefix=/usr/local
make                      # This is building all the build products (.o intermeidiate files & lib*.a files)
make install           # This moves files from source tree and build tree to desired install tree


set(_tbb_x32_subdir @TBB_X32_SUBDIR@)
set(_tbb_x64_subdir @TBB_X64_SUBDIR@)
set(TBB_CONFIG_FOR_SOURCE @TBB_CONFIG_FOR_SOURCE@)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this option supposed to be controlled by user? If no, it is not clear for me how @TBB_CHOOSE_COMPILER_SUBDIR@ is used when TBB_CONFIG_FOR_SOURCE is ON.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an attempt to maintain backward compatibility with what was there. I was inferring how the tool might have been used. I needed different behavior from the default to support building from source.

@@ -74,7 +74,12 @@ foreach (_tbb_component ${TBB_FIND_COMPONENTS})
list(APPEND TBB_IMPORTED_TARGETS TBB::${_tbb_component})
set(TBB_${_tbb_component}_FOUND 1)
elseif (TBB_FIND_REQUIRED AND TBB_FIND_REQUIRED_${_tbb_component})
message(FATAL_ERROR "Missed required Intel TBB component: ${_tbb_component}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This FATAL_ERROR can appear only if TBB_FIND_REQUIRED AND TBB_FIND_REQUIRED_${_tbb_component}. I.e. only if the requested component is required.

With your change you also will get FATAL_ERROR in case of find_package(TBB QUIET REQUIRED):

CMake Error at CMakeLists.txt:7 (find_package):
  Found package configuration file:

    /tmp/tbb2019_20181203oss/cmake/TBBConfig.cmake

  but it set TBB_FOUND to FALSE so package "TBB" is considered to be NOT
  FOUND.

Could you please explain a use case when this change has effect?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YES!

I want to attempt to use a custom FindTBB.cmake that exists in my project in order to overcome problems with broken os installed versions of TBB.

Use case "Use system version of TBB if it can be found and configured correctly, else (disable tbb capabilites|build tbb from source|use custom FindTBB.cmake that does more brute force introspection of the system with different rules).

The current homebrew installed version of TBB uses "TBBMakeConfig.cmake" to generate a TBBConfig.cmake file with incorrect hard-coded paths to the wrong directories for finding the libraries. If TBB is installed on the system, there is no recovery in any way.

I'm trying to get a TBB dependant tool to build and be tested on the Travis continuous integration environment. Installing TBB from homebrew causes build failure for the reasons above. Trying to install TBB from source fails as well because the instructions for building from source for a cmake project require access to api.github.com (which is prohibited from CI environments).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thank you for explanation, I think this change (removal of fatal error) is ready to be integrated.

@hjmjohnson
Copy link
Author

Let's try to clarify your requirements for TBBConfig generator.
Please correct me if I'm wrong:

  1. Input:
    • relative path from TBBConfig.cmake to TBB binaries (release/debug?)
    • relative path from TBBConfig.cmake to TBB headers
    • TBB version (+interface version)
  2. Output:
    • TBBConfig.cmake
    • TBBConfigVersion.cmake
  3. Only one set of TBB binaries is supposed to be included into the package.
  4. Binaries/headers presence in a system is not required during the generation.

Yes.

Regarding point 3 above, many packages can be created, but each package contains only the materials for 1 binary support.

basedir=/usr/local # or /usr, or /opt or /myapplications or ${HOME}/.linuxbrew
===pkg 2019_U3_2
${basedir}/Cellar/tbb/2019_U3_2/lib/cmake/TBB
${basedir}/Cellar/tbb/2019_U3_2/inlcude
===pkg 2019_U3_1
${basedir}/Cellar/tbb/2019_U3_1/lib/cmake/TBB
${basedir}/Cellar/tbb/2019_U3_1/inlcude
===pkg 2020_U3_1
${basedir}/Cellar/tbb/2020_U3_1/lib/cmake/TBB
${basedir}/Cellar/tbb/2020_U3_1/inlcude

# TBB_BUILD_PREFIX:STRING <- BUILDPREFIX, or os build prefix
# TBB_RELATIVE_CMAKE_CONFIG_PATH <- on installation, relative to CMAEK_INSTALL_PREFIX, where should the cmake package files be placed
# TBB_COMPILER:STRING <- (optional) clang or gcc
# TBB_BUILD_STATIC:BOOL <- (optional) By default static libs are not built.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Officially TBB doesn't support static libraries. There is a special case for Big Iron platform. So if you'd like to cover this case it would be better to add Big Iron as an option for SYSTEM_NAME. In this case TBB_BUILD_STATIC and TBB_BUILD_SHARED flags are not needed at all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for information, "Big Iron" is not really a platform name; it's a common name for mainframe computers and similar HPC systems. Often dynamic (shared) libraries are avoided or prohibited on such systems.

It is true that building and using TBB as a static library is highly discouraged, as it opens the door to have multiple copies of TBB in the same process, with potential negative impact on performance or even correctness of the program.

DIRECTORY_PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE OWNER_WRITE
)

if (CMAKE_SIZEOF_VOID_P EQUAL 8)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a real use case to install x64/x86 binaries into one CMAKE_INSTALL_PREFIX but in different subdirectories?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexVeprev I don't understand the question in the context pointed to. Sorry.

@hjmjohnson
Copy link
Author

Could I get a status update on the progress of fixing the tbb config? This is holding up the incorporation of TBB in several projects.

@AlexVeprev
Copy link
Contributor

@hjmjohnson your PR is quite big and some parts need to be considered more deeply, for example cmake/TBBBuildInstallScript.cmake has the following concerns:

The installation script is a reasonable thing, but it may delay acceptance of the PR.

The fix in TBBMakeConfig is more critical problem than installation script, isn't it?
But it also has problems: it doesn't work for making configs for TBB releases on GitHub.

I can propose the following: I'll update TBBMakeConfig according to the requirements, but in compliant with existing TBB infrastructure. Do you agree?

@hjmjohnson
Copy link
Author

Sure. I've already spent several days effort trying to get TBB to build in a way that is consistent with other build and package managers.

My critique still holds: TBB's support of external communities that need "standard" procedures for building, installing, and deploying TBB as part of other packages is extremely fragile. Adoption of TBB in major medical imaging software packages has been stymied for several years now because each time we demonstrate the greatness of the the TBB library, we end up abandoning the efforts because we can not reliably produce an automated cross platform build for inclusion.

  1. We need a buildable version of TBB that is compatible with continuous integration (For example, we can not build TBB on travis CI because we do not have access to the api.github.com web site that is required for using the current macros).

  2. The CMake support is current broken for installing TBB, or making a valid package (NOTE: mac home-brew install of TBB is severely broken with regards to cmake package management).

========

TBB should follow conventions of building like: fftw, jsoncpp, ITK, dcmtk,

========

I don't care if any of my code is used, I just want TBB build, install, and inclusion in 3rd party tools following the standard install process that is consistent with autoconf, cmake, meson, bazel, etc. build manager systems. It should be as easy as:

PKG_URL:  GitHub url
PKG_SRC: Where source code was downloaded
PKG_BLD: The binary build directory where object, and targets of the build should go
PKG_INSTALL_DIR:  Where to install the binary objects suitable for distribution
PKG_NAME:  A package name
git clone ${PKG_URL};
mkdir ${PKG_BLD};
cd ${PKG_BLD};
cmake -DCMAKE_INSTALL_PREFIX:PATH=${PKG_INSTALL_DIR}  ${PKG_SRC}
make
make test
make install

OR

git clone ${PKG_URL};
mkdir ${PKG_BLD};
cd ${PKG_BLD};
${PKG_SRC}/configure --prefix=${PKG_INSTALL_DIR}  
make
make test
make install

The result should be

${PKG_INSTALL_DIR}/include  # <- The header files for the tool
${PKG_INSTALL_DIR}/include/${PKG_NAME}   # <- (OPTIONAL) The header files for the tool

${PKG_INSTALL_DIR}/lib         # <-- Where library objects go
${PKG_INSTALL_DIR}/lib/cmake/${PKG_NAME}/  # <- ${PKG_NAME}Config.cmake ${PKG_NAME}ConfigVersion.cmake
${PKG_INSTALL_DIR}/share/info     # <-- where command cmake files go

Perhaps https://www.gnu.org/prep/standards/html_node/DESTDIR.html can help with much of this effort of maintaining makefiles as the primary build environment.

@anton-malakhov
Copy link

anton-malakhov commented Feb 27, 2019

I've already spent several days effort trying to get TBB to build in a way that is consistent with other build and package managers.

@hjmjohnson I guess running build.py is still not an option, is it? Travis, Circle CI, Appveyor all have python or even conda pre-installed. Even if it is not available, installing miniconda is a question of 65Mb download size and running a simple script. So, if the build works well for TBB on Conda-Forge (which is not python-specific package manager), why it doesn't work for your package managers?

@hjmjohnson
Copy link
Author

@anton-malakhov I hope I can avoid the python dependency for building, but perhaps that is a mandatory requirement.

I did try

python build.py  --tbbroot ~/src/tbb --prefix /tmp/tbb_install --install-libs --install-devel --install-docs

but it does not create the cmake package files.

Hans

@anton-malakhov
Copy link

anton-malakhov commented Mar 4, 2019

it might not be a requirement if TBB team is willing to accept an alternative implementation, which covers all the functionality of what build.py is doing now. I guess nobody wants to support two implementations of the very same install functionality. build.py was designed to support more package managers than just conda, e.g. I looked up for what APT and homebrew are doing so their recipes can be rewritten to use build.py. If anything missing, like cmake files, it can certainly be added - the script is simple and you are welcome to modify it (or reimplement using another cross-platform scripting language).

@hjmjohnson
Copy link
Author

Abandoning. This effort was not supported, and other work around solutions seem to be more popular. Using a python wrapping around make, layered with cmake fix-ups seems to be the desired approach.

See #127 for the alternative approach.

@hjmjohnson hjmjohnson closed this Mar 14, 2019
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Sep 5, 2020
Changelog:
Intel TBB 2020 Update 3
TBB_INTERFACE_VERSION == 11103

Changes (w.r.t. Intel TBB 2020 Update 2):

Changes affecting backward compatibility:

- Changed body type concept of the flow::input_node.
    Set TBB_DEPRECATED_INPUT_NODE_BODY to 1 to compile with the previous
    concept of the body type.

Bugs fixed:

- Fixed compilation errors in C++20 mode due to ambiguity of comparison
    operators. Inspired by Barry Revzin
    (https://github.com/oneapi-src/oneTBB/pull/251).

Open-source contributions integrated:

- Fixed an issue in TBBBuild.cmake that causes the build with no arguments
    to fail (https://github.com/oneapi-src/oneTBB/pull/233) by tttapa.
- Added cmake/{TBBConfig,TBBConfigVersion}.cmake to Git ignore list
    (https://github.com/oneapi-src/oneTBB/pull/239) by Eisuke Kawashima.

------------------------------------------------------------------------
Intel TBB 2020 Update 2
TBB_INTERFACE_VERSION == 11102

Changes (w.r.t. Intel TBB 2020 Update 1):

- Cross-allocator copying constructor and copy assignment operator for
    concurrent_vector are deprecated.
- Added input_node to the flow graph API. It acts like a source_node
    except for being inactive by default; source_node is deprecated.
- Allocator template parameter for flow graph nodes is deprecated. Set
    TBB_DEPRECATED_FLOW_NODE_ALLOCATOR to 1 to avoid compilation errors.
- Flow graph preview hetero-features are deprecated.

Bugs fixed:

- Fixed the task affinity mechanism to prevent unlimited memory
    consumption in case the number of threads is explicitly decreased.
- Fixed memory leak related NUMA support functionality in task_arena.

------------------------------------------------------------------------
Intel TBB 2020 Update 1
TBB_INTERFACE_VERSION == 11101

Changes (w.r.t. Intel TBB 2020):

Preview features:

- The NUMA support library (tbbbind) no more depends on the main
    TBB library.

Bugs fixed:

- Fixed the issue of task_arena constraints not propagated on
    copy construction.
- Fixed TBBGet.cmake script broken by TBB package name changes
    (https://github.com/intel/tbb/issues/209).

------------------------------------------------------------------------
Intel TBB 2020
TBB_INTERFACE_VERSION == 11100

Changes (w.r.t. Intel TBB 2019 Update 9):

- Extended task_arena interface to simplify development of NUMA-aware
    applications.
- Added warning notifications when the deprecated functionality is used.

Open-source contributions integrated:

- Fixed various build warnings
    (https://github.com/intel/tbb/pull/179) by Raf Schietekat.

------------------------------------------------------------------------
Intel TBB 2019 Update 9
TBB_INTERFACE_VERSION == 11009

Changes (w.r.t. Intel TBB 2019 Update 8):

- Multiple APIs are deprecated. For details, please see
    Deprecated Features appendix in the TBB reference manual.
- Added C++17 deduction guides for flow graph nodes.

Preview Features:

- Added isolated_task_group class that allows multiple threads to add
    and execute tasks sharing the same isolation.
- Extended the flow graph API to simplify connecting nodes.
- Added erase() by heterogeneous keys for concurrent ordered containers.
- Added a possibility to suspend task execution at a specific point
    and resume it later.

Bugs fixed:

- Fixed the emplace() method of concurrent unordered containers to
    destroy a temporary element that was not inserted.
- Fixed a bug in the merge() method of concurrent unordered
    containers.
- Fixed behavior of a continue_node that follows buffering nodes.
- Fixed compilation error caused by missed stdlib.h when CMake
    integration is used (https://github.com/intel/tbb/issues/195).
    Inspired by Andrew Penkrat.

Open-source contributions integrated:

- Added support for move-only types to tbb::parallel_pipeline
    (https://github.com/intel/tbb/pull/159) by Raf Schietekat.
- Fixed detection of clang version when CUDA toolkit is installed
    (https://github.com/intel/tbb/pull/150) by Guilherme Amadio.

------------------------------------------------------------------------
Intel TBB 2019 Update 8
TBB_INTERFACE_VERSION == 11008

Changes (w.r.t. Intel TBB 2019 Update 7):

Bugs fixed:

- Fixed a bug in TBB 2019 Update 7 that could lead to incorrect memory
    reallocation on Linux (https://github.com/intel/tbb/issues/148).
- Fixed enqueuing tbb::task into tbb::task_arena not to fail on threads
    with no task scheduler initialized
    (https://github.com/intel/tbb/issues/116).

------------------------------------------------------------------------
Intel TBB 2019 Update 7
TBB_INTERFACE_VERSION == 11007

Changes (w.r.t. Intel TBB 2019 Update 6):

- Added TBBMALLOC_SET_HUGE_SIZE_THRESHOLD parameter to set the lower
    bound for allocations that are not released back to OS unless
    a cleanup is explicitly requested.
- Added zip_iterator::base() method to get the tuple of underlying
    iterators.
- Improved async_node to never block a thread that sends a message
    through its gateway.
- Extended decrement port of the tbb::flow::limiter_node to accept
    messages of integral types.
- Added support of Windows* to the CMake module TBBInstallConfig.
- Added packaging of CMake configuration files to TBB packages built
    using build/build.py script
    (https://github.com/intel/tbb/issues/141).

Changes affecting backward compatibility:

- Removed the number_of_decrement_predecessors parameter from the
    constructor of flow::limiter_node. To allow its usage, set
    TBB_DEPRECATED_LIMITER_NODE_CONSTRUCTOR macro to 1.

Preview Features:

- Added ordered associative containers:
    concurrent_{map,multimap,set,multiset} (requires C++11).

Open-source contributions integrated:

- Fixed makefiles to properly obtain the GCC version for GCC 7
    and later (https://github.com/intel/tbb/pull/147) by Timmmm.

------------------------------------------------------------------------
Intel TBB 2019 Update 6
TBB_INTERFACE_VERSION == 11006

Changes (w.r.t. Intel TBB 2019 Update 5):

- Added support for Microsoft* Visual Studio* 2019.
- Added support for enqueuing tbb::task into tbb::task_arena
    (https://github.com/01org/tbb/issues/116).
- Improved support for allocator propagation on concurrent_hash_map
    assigning and swapping.
- Improved scalable_allocation_command cleanup operations to release
    more memory buffered by the calling thread.
- Separated allocation of small and large objects into distinct memory
    regions, which helps to reduce excessive memory caching inside the
    TBB allocator.

Preview Features:

- Removed template class gfx_factory from the flow graph API.

------------------------------------------------------------------------
Intel TBB 2019 Update 5
TBB_INTERFACE_VERSION == 11005

Changes (w.r.t. Intel TBB 2019 Update 4):

- Associating a task_scheduler_observer with an implicit or explicit
    task arena is now a fully supported feature.
- Added a CMake module TBBInstallConfig that allows to generate and
    install CMake configuration files for TBB packages.
    Inspired by Hans Johnson (https://github.com/01org/tbb/pull/119).
- Added node handles, methods merge() and unsafe_extract() to concurrent
    unordered containers.
- Added constructors with Compare argument to concurrent_priority_queue
    (https://github.com/01org/tbb/issues/109).
- Controlling the stack size of worker threads is now supported for
    Universal Windows Platform.
- Improved tbb::zip_iterator to work with algorithms that swap values
    via iterators.
- Improved support for user-specified allocators in concurrent_hash_map,
    including construction of allocator-aware data types.
- For ReaderWriterMutex types, upgrades and downgrades now succeed if
    the mutex is already in the requested state.
    Inspired by Niadb (https://github.com/01org/tbb/pull/122).

Preview Features:

- The task_scheduler_observer::may_sleep() method has been removed.

Bugs fixed:

- Fixed the issue with a pipeline parallel filter executing serially if
    it follows a thread-bound filter.
- Fixed a performance regression observed when multiple parallel
    algorithms start simultaneously.

------------------------------------------------------------------------
Intel TBB 2019 Update 4
TBB_INTERFACE_VERSION == 11004

Changes (w.r.t. Intel TBB 2019 Update 3):

- global_control class is now a fully supported feature.
- Added deduction guides for tbb containers: concurrent_hash_map,
    concurrent_unordered_map, concurrent_unordered_set.
- Added tbb::scalable_memory_resource function returning
    std::pmr::memory_resource interface to the TBB memory allocator.
- Added tbb::cache_aligned_resource class that implements
    std::pmr::memory_resource with cache alignment and no false sharing.
- Added rml::pool_msize function returning the usable size of a memory
    block allocated from a given memory pool.
- Added default and copy constructors for tbb::counting_iterator
    and tbb::zip_iterator.
- Added TBB_malloc_replacement_log function to obtain the status of
    dynamic memory allocation replacement (Windows* only).
- CMake configuration file now supports release-only and debug-only
    configurations (https://github.com/01org/tbb/issues/113).
- TBBBuild CMake module takes the C++ version from CMAKE_CXX_STANDARD.

Bugs fixed:

- Fixed compilation for tbb::concurrent_vector when used with
    std::pmr::polymorphic_allocator.

Open-source contributions integrated:

- TBB_INTERFACE_VERSION is included into TBB version in CMake
    configuration (https://github.com/01org/tbb/pull/100)
    by Hans Johnson.
- Fixed detection of C++17 deduction guides for Visual C++*
    (https://github.com/01org/tbb/pull/112) by Marian Klymov.

------------------------------------------------------------------------
Intel TBB 2019 Update 3
TBB_INTERFACE_VERSION == 11003

Changes (w.r.t. Intel TBB 2019 Update 2):

- Added tbb::transform_iterator.
- Added new Makefile target 'profile' to flow graph examples enabling
    additional support for Intel(R) Parallel Studio XE tools.
- Added TBB_MALLOC_DISABLE_REPLACEMENT environment variable to switch off
    dynamic memory allocation replacement on Windows*. Inspired by
    a contribution from Edward Lam.

Preview Features:

- Extended flow graph API to support relative priorities for functional
    nodes, specified as an optional parameter to the node constructors.

Open-source contributions integrated:

- Enabled using process-local futex operations
    (https://github.com/01org/tbb/pull/58) by Andrey Semashev.

------------------------------------------------------------------------
Intel TBB 2019 Update 2
TBB_INTERFACE_VERSION == 11002

Changes (w.r.t. Intel TBB 2019 Update 1):

- Added overloads for parallel_reduce with default partitioner and
    user-supplied context.
- Added deduction guides for tbb containers: concurrent_vector,
    concurrent_queue, concurrent_bounded_queue,
    concurrent_priority_queue.
- Reallocation of memory objects >1MB now copies and frees memory if
    the size is decreased twice or more, trading performance off for
    reduced memory usage.
- After a period of sleep, TBB worker threads now prefer returning to
    their last used task arena.

Bugs fixed:

- Fixed compilation of task_group.h when targeting macOS* 10.11 or
    earlier (https://github.com/conda-forge/tbb-feedstock/issues/42).

Open-source contributions integrated:

- Added constructors with HashCompare argument to concurrent_hash_map
    (https://github.com/01org/tbb/pull/63) by arewedancer.

------------------------------------------------------------------------
Intel TBB 2019 Update 1
TBB_INTERFACE_VERSION == 11001

Changes (w.r.t. Intel TBB 2019):

- Doxygen documentation could be built with 'make doxygen' command now.

Changes affecting backward compatibility:

- Enforced 8 byte alignment for tbb::atomic<long long> and
    tbb::atomic<double>. On IA-32 architecture it may cause layout
    changes in structures that use these types.

Bugs fixed:

- Fixed an issue with dynamic memory allocation replacement on Windows*
    occurred for some versions of ucrtbase.dll.
- Fixed possible deadlock in tbbmalloc cleanup procedure during process
    shutdown. Inspired by a contribution from Edward Lam.
- Fixed usage of std::uncaught_exception() deprecated in C++17
   (https://github.com/01org/tbb/issues/67).
- Fixed a crash when a local observer is activated after an arena
    observer.
- Fixed compilation of task_group.h by Visual C++* 15.7 with
    /permissive- option (https://github.com/01org/tbb/issues/53).
- Fixed tbb4py to avoid dependency on Intel(R) C++ Compiler shared
    libraries.
- Fixed compilation for Anaconda environment with GCC 7.3 and higher.

Open-source contributions integrated:

- Fix various warnings when building with Visual C++
    (https://github.com/01org/tbb/pull/70) by Edward Lam.

------------------------------------------------------------------------
Intel TBB 2019
TBB_INTERFACE_VERSION == 11000

Changes (w.r.t. Intel TBB 2018 Update 5):

- Lightweight policy for functional nodes in the flow graph is now
    a fully supported feature.
- Reservation support in flow::write_once_node and flow::overwrite_node
    is now a fully supported feature.
- Support for Flow Graph Analyzer and improvements for
    Intel(R) VTune(TM) Amplifier become a regular feature enabled by
    TBB_USE_THREADING_TOOLS macro.
- Added support for std::new_handler in the replacement functions for
    global operator new.
- Added C++14 constructors to concurrent unordered containers.
- Added tbb::counting_iterator and tbb::zip_iterator.
- Fixed multiple -Wextra warnings in TBB source files.

Preview Features:

- Extracting nodes from a flow graph is deprecated and disabled by
    default. To enable, use TBB_DEPRECATED_FLOW_NODE_EXTRACTION macro.

Changes affecting backward compatibility:

- Due to internal changes in the flow graph classes, recompilation is
    recommended for all binaries that use the flow graph.

Open-source contributions integrated:

- Added support for OpenBSD by Anthony J. Bentley.

------------------------------------------------------------------------
Intel TBB 2018 Update 6
TBB_INTERFACE_VERSION == 10006

Changes (w.r.t. Intel TBB 2018 Update 5):

Bugs fixed:

- Fixed an issue with dynamic memory allocation replacement on Windows*
    occurred for some versions of ucrtbase.dll.

------------------------------------------------------------------------
Intel TBB 2018 Update 5
TBB_INTERFACE_VERSION == 10005

Changes (w.r.t. Intel TBB 2018 Update 4):

Preview Features:

- Added user event tracing API for Intel(R) VTune(TM) Amplifier and
    Flow Graph Analyzer.

Bugs fixed:

- Fixed the memory allocator to properly support transparent huge pages.
- Removed dynamic exception specifications in tbbmalloc_proxy for C++11
    and later (https://github.com/01org/tbb/issues/41).
- Added -flifetime-dse=1 option when building with GCC on macOS*
    (https://github.com/01org/tbb/issues/60).

Open-source contributions integrated:

- Added ARMv8 support by Siddhesh Poyarekar.
- Avoid GCC warnings for clearing an object of non-trivial type
    (https://github.com/01org/tbb/issues/54) by Daniel Arndt.

------------------------------------------------------------------------
Intel TBB 2018 Update 4
TBB_INTERFACE_VERSION == 10004

Changes (w.r.t. Intel TBB 2018 Update 3):

Preview Features:

- Improved support for Flow Graph Analyzer and Intel(R) VTune(TM)
    Amplifier in the task scheduler and generic parallel algorithms.
- Default device set for opencl_node now includes all the devices from
    the first available OpenCL* platform.
- Added lightweight policy for functional nodes in the flow graph. It
    indicates that the node body has little work and should, if possible,
    be executed immediately upon receiving a message, avoiding task
    scheduling overhead.

------------------------------------------------------------------------
Intel TBB 2018 Update 3
TBB_INTERFACE_VERSION == 10003

Changes (w.r.t. Intel TBB 2018 Update 2):

Preview Features:

- Added template class blocked_rangeNd for a generic multi-dimensional
    range (requires C++11). Inspired by a contribution from Jeff Hammond.

Bugs fixed:

- Fixed a crash with dynamic memory allocation replacement on
    Windows* for applications using system() function.
- Fixed parallel_deterministic_reduce to split range correctly when used
     with static_partitioner.
- Fixed a synchronization issue in task_group::run_and_wait() which
    caused a simultaneous call to task_group::wait() to return
    prematurely.

------------------------------------------------------------------------
Intel TBB 2018 Update 2
TBB_INTERFACE_VERSION == 10002

Changes (w.r.t. Intel TBB 2018 Update 1):

- Added support for Android* NDK r16, macOS* 10.13, Fedora* 26.
- Binaries for Universal Windows Driver (vc14_uwd) now link with static
    Microsoft* runtime libraries, and are only available in commercial
    releases.
- Extended flow graph documentation with more code samples.

Preview Features:

- Added a Python* module for multi-processing computations in numeric
    Python* libraries.

Bugs fixed:

- Fixed constructors of concurrent_hash_map to be exception-safe.
- Fixed auto-initialization in the main thread to be cleaned up at
    shutdown.
- Fixed a crash when tbbmalloc_proxy is used together with dbghelp.
- Fixed static_partitioner to assign tasks properly in case of nested
    parallelism.

------------------------------------------------------------------------
Intel TBB 2018 Update 1
TBB_INTERFACE_VERSION == 10001

Changes (w.r.t. Intel TBB 2018):

- Added lambda-friendly overloads for parallel_scan.
- Added support of static and simple partitioners in
    parallel_deterministic_reduce.

Preview Features:

- Added initial support for Flow Graph Analyzer to parallel_for.
- Added reservation support in overwrite_node and write_once_node.

Bugs fixed:

- Fixed a potential deadlock scenario in the flow graph that affected
    Intel TBB 2018.

------------------------------------------------------------------------
Intel TBB 2018
TBB_INTERFACE_VERSION == 10000

Changes (w.r.t. Intel TBB 2017 Update 7):

- Introduced Parallel STL, an implementation of the C++ standard
    library algorithms with support for execution policies. For more
    information, see Getting Started with Parallel STL
    (https://software.intel.com/en-us/get-started-with-pstl).
- this_task_arena::isolate() function is now a fully supported feature.
- this_task_arena::isolate() function and task_arena::execute() method
    were extended to pass on the value returned by the executed functor
    (requires C++11).
- task_arena::enqueue() and task_group::run() methods extended to accept
    move-only functors.
- A flow graph now spawns all tasks into the same task arena,
    and waiting for graph completion also happens in that arena.
- Improved support for Flow Graph Analyzer in async_node, opencl_node,
    and composite_node.
- Added support for Android* NDK r15, r15b.
- Added support for Universal Windows Platform.
- Increased minimally supported version of macOS*
    (MACOSX_DEPLOYMENT_TARGET) to 10.11.

Changes affecting backward compatibility:

- Internal layout changes in some flow graph classes;
- Several undocumented methods are removed from class graph,
    including set_active() and is_active().
- Due to incompatible changes, the namespace version is updated
    for the flow graph; recompilation is recommended for all
    binaries that use the flow graph classes.

Preview Features:

- opencl_node can be used with any graph object; class opencl_graph
    is removed.
- graph::wait_for_all() now automatically waits for all not yet consumed
    async_msg objects.
- Improved concurrent_lru_cache::handle_object to support C++11 move
    semantics, default construction, and conversion to bool.

Bugs fixed:

- Fixed a bug preventing use of streaming_node and opencl_node with
    Clang; inspired by a contribution from Francisco Facioni.
- Fixed this_task_arena::isolate() function to work correctly with
    parallel_invoke and parallel_do algorithms.
- Fixed a memory leak in composite_node.
- Fixed an assertion failure in debug tbbmalloc binaries when
    TBBMALLOC_CLEAN_ALL_BUFFERS is used.

------------------------------------------------------------------------
Intel TBB 2017 Update 8
TBB_INTERFACE_VERSION == 9108

Changes (w.r.t. Intel TBB 2017 Update 7):

Bugs fixed:

- Fixed an assertion failure in debug tbbmalloc binaries when
    TBBMALLOC_CLEAN_ALL_BUFFERS is used.

------------------------------------------------------------------------
Intel TBB 2017 Update 7
TBB_INTERFACE_VERSION == 9107

Changes (w.r.t. Intel TBB 2017 Update 6):

- In the huge pages mode, the memory allocator now is also able to use
    transparent huge pages.

Preview Features:

- Added support for Intel TBB integration into CMake-aware
    projects, with valuable guidance and feedback provided by Brad King
    (Kitware).

Bugs fixed:

- Fixed scalable_allocation_command(TBBMALLOC_CLEAN_ALL_BUFFERS, 0)
    to process memory left after exited threads.

------------------------------------------------------------------------
Intel TBB 2017 Update 6
TBB_INTERFACE_VERSION == 9106

Changes (w.r.t. Intel TBB 2017 Update 5):

- Added support for Android* NDK r14.

Preview Features:

- Added a blocking terminate extension to the task_scheduler_init class
    that allows an object to wait for termination of worker threads.

Bugs fixed:

- Fixed compilation and testing issues with MinGW (GCC 6).
- Fixed compilation with /std:c++latest option of VS 2017
    (https://github.com/01org/tbb/issues/13).

------------------------------------------------------------------------
Intel TBB 2017 Update 5
TBB_INTERFACE_VERSION == 9105

Changes (w.r.t. Intel TBB 2017 Update 4):

- Added support for Microsoft* Visual Studio* 2017.
- Added graph/matmult example to demonstrate support for compute offload
    to Intel(R) Graphics Technology in the flow graph API.
- The "compiler" build option now allows to specify a full path to the
    compiler.

Changes affecting backward compatibility:

- Constructors for many classes, including graph nodes, concurrent
    containers, thread-local containers, etc., are declared explicit and
    cannot be used for implicit conversions anymore.

Bugs fixed:

- Added a workaround for bug 16657 in the GNU C Library (glibc)
    affecting the debug version of tbb::mutex.
- Fixed a crash in pool_identify() called for an object allocated in
    another thread.

------------------------------------------------------------------------
Intel TBB 2017 Update 4
TBB_INTERFACE_VERSION == 9104

Changes (w.r.t. Intel TBB 2017 Update 3):

- Added support for C++11 move semantics in parallel_do.
- Added support for FreeBSD* 11.

Changes affecting backward compatibility:

- Minimal compiler versions required for support of C++11 move semantics
    raised to GCC 4.5, VS 2012, and Intel(R) C++ Compiler 14.0.

Bugs fixed:

- The workaround for crashes in the library compiled with GCC 6
    (-flifetime-dse=1) was extended to Windows*.

------------------------------------------------------------------------
Intel TBB 2017 Update 3
TBB_INTERFACE_VERSION == 9103

Changes (w.r.t. Intel TBB 2017 Update 2):

- Added support for Android* 7.0 and Android* NDK r13, r13b.

Preview Features:

- Added template class gfx_factory to the flow graph API. It implements
    the Factory concept for streaming_node to offload computations to
    Intel(R) processor graphics.

Bugs fixed:

- Fixed a possible deadlock caused by missed wakeup signals in
    task_arena::execute().

Open-source contributions integrated:

- A build fix for Linux* s390x platform by Jerry J.

------------------------------------------------------------------------
Intel TBB 2017 Update 2
TBB_INTERFACE_VERSION == 9102

Changes (w.r.t. Intel TBB 2017 Update 1):

- Removed the long-outdated support for Xbox* consoles.

Bugs fixed:

- Fixed the issue with task_arena::execute() not being processed when
    the calling thread cannot join the arena.
- Fixed dynamic memory allocation replacement failure on macOS* 10.12.

------------------------------------------------------------------------
Intel TBB 2017 Update 1
TBB_INTERFACE_VERSION == 9101

Changes (w.r.t. Intel TBB 2017):

Bugs fixed:

- Fixed dynamic memory allocation replacement failures on Windows* 10
    Anniversary Update.
- Fixed emplace() method of concurrent unordered containers to not
    require a copy constructor.

------------------------------------------------------------------------
Intel TBB 2017
TBB_INTERFACE_VERSION == 9100

Changes (w.r.t. Intel TBB 4.4 Update 5):

- static_partitioner class is now a fully supported feature.
- async_node class is now a fully supported feature.
- Improved dynamic memory allocation replacement on Windows* OS to skip
    DLLs for which replacement cannot be done, instead of aborting.
- Intel TBB no longer performs dynamic memory allocation replacement
    for Microsoft* Visual Studio* 2008.
- For 64-bit platforms, quadrupled the worst-case limit on the amount
    of memory the Intel TBB allocator can handle.
- Added TBB_USE_GLIBCXX_VERSION macro to specify the version of GNU
    libstdc++ when it cannot be properly recognized, e.g. when used
    with Clang on Linux* OS. Inspired by a contribution from David A.
- Added graph/stereo example to demonstrate tbb::flow::async_msg.
- Removed a few cases of excessive user data copying in the flow graph.
- Reworked split_node to eliminate unnecessary overheads.
- Added support for C++11 move semantics to the argument of
    tbb::parallel_do_feeder::add() method.
- Added C++11 move constructor and assignment operator to
    tbb::combinable template class.
- Added tbb::this_task_arena::max_concurrency() function and
    max_concurrency() method of class task_arena returning the maximal
    number of threads that can work inside an arena.
- Deprecated tbb::task_arena::current_thread_index() static method;
    use tbb::this_task_arena::current_thread_index() function instead.
- All examples for commercial version of library moved online:
    https://software.intel.com/en-us/product-code-samples. Examples are
    available as a standalone package or as a part of Intel(R) Parallel
    Studio XE or Intel(R) System Studio Online Samples packages.

Changes affecting backward compatibility:

- Renamed following methods and types in async_node class:
    Old                   New
    async_gateway_type => gateway_type
    async_gateway()    => gateway()
    async_try_put()    => try_put()
    async_reserve()    => reserve_wait()
    async_commit()     => release_wait()
- Internal layout of some flow graph nodes has changed; recompilation
    is recommended for all binaries that use the flow graph.

Preview Features:

- Added template class streaming_node to the flow graph API. It allows
    a flow graph to offload computations to other devices through
    streaming or offloading APIs.
- Template class opencl_node reimplemented as a specialization of
    streaming_node that works with OpenCL*.
- Added tbb::this_task_arena::isolate() function to isolate execution
    of a group of tasks or an algorithm from other tasks submitted
    to the scheduler.

Bugs fixed:

- Added a workaround for GCC bug #62258 in std::rethrow_exception()
    to prevent possible problems in case of exception propagation.
- Fixed parallel_scan to provide correct result if the initial value
    of an accumulator is not the operation identity value.
- Fixed a memory corruption in the memory allocator when it meets
    internal limits.
- Fixed the memory allocator on 64-bit platforms to align memory
    to 16 bytes by default for all allocations bigger than 8 bytes.
- As a workaround for crashes in the Intel TBB library compiled with
    GCC 6, added -flifetime-dse=1 to compilation options on Linux* OS.
- Fixed a race in the flow graph implementation.

Open-source contributions integrated:

- Enabling use of C++11 'override' keyword by Raf Schietekat.

------------------------------------------------------------------------
Intel TBB 4.4 Update 6
TBB_INTERFACE_VERSION == 9006

Changes (w.r.t. Intel TBB 4.4 Update 5):

- For 64-bit platforms, quadrupled the worst-case limit on the amount
    of memory the Intel TBB allocator can handle.

Bugs fixed:

- Fixed a memory corruption in the memory allocator when it meets
    internal limits.
- Fixed the memory allocator on 64-bit platforms to align memory
    to 16 bytes by default for all allocations bigger than 8 bytes.
- Fixed parallel_scan to provide correct result if the initial value
    of an accumulator is not the operation identity value.
- As a workaround for crashes in the Intel TBB library compiled with
    GCC 6, added -flifetime-dse=1 to compilation options on Linux* OS.

------------------------------------------------------------------------
Intel TBB 4.4 Update 5
TBB_INTERFACE_VERSION == 9005

Changes (w.r.t. Intel TBB 4.4 Update 4):

- Modified graph/fgbzip2 example to remove unnecessary data queuing.

Preview Features:

- Added a Python* module which is able to replace Python's thread pool
    class with the implementation based on Intel TBB task scheduler.

Bugs fixed:

- Fixed the implementation of 64-bit tbb::atomic for IA-32 architecture
    to work correctly with GCC 5.2 in C++11/14 mode.
- Fixed a possible crash when tasks with affinity (e.g. specified via
    affinity_partitioner) are used simultaneously with task priority
    changes.

------------------------------------------------------------------------
Intel TBB 4.4 Update 4
TBB_INTERFACE_VERSION == 9004

Changes (w.r.t. Intel TBB 4.4 Update 3):

- Removed a few cases of excessive user data copying in the flow graph.
- Improved robustness of concurrent_bounded_queue::abort() in case of
    simultaneous push and pop operations.

Preview Features:

- Added tbb::flow::async_msg, a special message type to support
    communications between the flow graph and external asynchronous
    activities.
- async_node modified to support use with C++03 compilers.

Bugs fixed:

- Fixed a bug in dynamic memory allocation replacement for Windows* OS.
- Fixed excessive memory consumption on Linux* OS caused by enabling
    zero-copy realloc.
- Fixed performance regression on Intel(R) Xeon Phi(tm) coprocessor with
    auto_partitioner.

------------------------------------------------------------------------
Intel TBB 4.4 Update 3
TBB_INTERFACE_VERSION == 9003

Changes (w.r.t. Intel TBB 4.4 Update 2):

- Modified parallel_sort to not require a default constructor for values
    and to use iter_swap() for value swapping.
- Added support for creating or initializing a task_arena instance that
    is connected to the arena currently used by the thread.
- graph/binpack example modified to use multifunction_node.
- For performance analysis, use Intel(R) VTune(TM) Amplifier XE 2015
    and higher; older versions are no longer supported.
- Improved support for compilation with disabled RTTI, by omitting its use
    in auxiliary code, such as assertions. However some functionality,
    particularly the flow graph, does not work if RTTI is disabled.
- The tachyon example for Android* can be built using Android Studio 1.5
    and higher with experimental Gradle plugin 0.4.0.

Preview Features:

- Added class opencl_subbufer that allows using OpenCL* sub-buffer
    objects with opencl_node.
- Class global_control supports the value of 1 for
    max_allowed_parallelism.

Bugs fixed:

- Fixed a race causing "TBB Warning: setaffinity syscall failed" message.
- Fixed a compilation issue on OS X* with Intel(R) C++ Compiler 15.0.
- Fixed a bug in queuing_rw_mutex::downgrade() that could temporarily
    block new readers.
- Fixed speculative_spin_rw_mutex to stop using the lazy subscription
    technique due to its known flaws.
- Fixed memory leaks in the tool support code.

------------------------------------------------------------------------
Intel TBB 4.4 Update 2
TBB_INTERFACE_VERSION == 9002

Changes (w.r.t. Intel TBB 4.4 Update 1):

- Improved interoperability with Intel(R) OpenMP RTL (libiomp) on Linux:
    OpenMP affinity settings do not affect the default number of threads
    used in the task scheduler. Intel(R) C++ Compiler 16.0 Update 1
    or later is required.
- Added a new flow graph example with different implementations of the
    Cholesky Factorization algorithm.

Preview Features:

- Added template class opencl_node to the flow graph API. It allows a
    flow graph to offload computations to OpenCL* devices.
- Extended join_node to use type-specified message keys. It simplifies
    the API of the node by obtaining message keys via functions
    associated with the message type (instead of node ports).
- Added static_partitioner that minimizes overhead of parallel_for and
    parallel_reduce for well-balanced workloads.
- Improved template class async_node in the flow graph API to support
    user settable concurrency limits.

Bugs fixed:

- Fixed a possible crash in the GUI layer for library examples on Linux.

------------------------------------------------------------------------
Intel TBB 4.4 Update 1
TBB_INTERFACE_VERSION == 9001

Changes (w.r.t. Intel TBB 4.4):

- Added support for Microsoft* Visual Studio* 2015.
- Intel TBB no longer performs dynamic replacement of memory allocation
    functions for Microsoft Visual Studio 2005 and earlier versions.
- For GCC 4.7 and higher, the intrinsics-based platform isolation layer
    uses __atomic_* built-ins instead of the legacy __sync_* ones.
    This change is inspired by a contribution from Mathieu Malaterre.
- Improvements in task_arena:
    Several application threads may join a task_arena and execute tasks
    simultaneously. The amount of concurrency reserved for application
    threads at task_arena construction can be set to any value between
    0 and the arena concurrency limit.
- The fractal example was modified to demonstrate class task_arena
    and moved to examples/task_arena/fractal.

Bugs fixed:

- Fixed a deadlock during destruction of task_scheduler_init objects
    when one of destructors is set to wait for worker threads.
- Added a workaround for a possible crash on OS X* when dynamic memory
    allocator replacement (libtbbmalloc_proxy) is used and memory is
    released during application startup.
- Usage of mutable functors with task_group::run_and_wait() and
    task_arena::enqueue() is disabled. An attempt to pass a functor
    which operator()() is not const will produce compilation errors.
- Makefiles and environment scripts now properly recognize GCC 5.0 and
    higher.

Open-source contributions integrated:

- Improved performance of parallel_for_each for inputs allowing random
    access, by Raf Schietekat.

------------------------------------------------------------------------
Intel TBB 4.4
TBB_INTERFACE_VERSION == 9000

Changes (w.r.t. Intel TBB 4.3 Update 6):

- The following features are now fully supported:
    tbb::flow::composite_node;
    additional policies of tbb::flow::graph_node::reset().
- Platform abstraction layer for Windows* OS updated to use compiler
    intrinsics for most atomic operations.
- The tbb/compat/thread header updated to automatically include
    C++11 <thread> where available.
- Fixes and refactoring in the task scheduler and class task_arena.
- Added key_matching policy to tbb::flow::join_node, which removes
    the restriction on the type that can be compared-against.
- For tag_matching join_node, tag_value is redefined to be 64 bits
    wide on all architectures.
- Expanded the documentation for the flow graph with details about
    node semantics and behavior.
- Added dynamic replacement of C11 standard function aligned_alloc()
    under Linux* OS.
- Added C++11 move constructors and assignment operators to
    tbb::enumerable_thread_specific container.
- Added hashing support for tbb::tbb_thread::id.
- On OS X*, binaries that depend on libstdc++ are not provided anymore.
    In the makefiles, libc++ is now used by default; for building with
    libstdc++, specify stdlib=libstdc++ in the make command line.

Preview Features:

- Added a new example, graph/fgbzip2, that shows usage of
    tbb::flow::async_node.
- Modification to the low-level API for memory pools:
    added a function for finding a memory pool by an object allocated
    from that pool.
- tbb::memory_pool now does not request memory till the first allocation
    from the pool.

Changes affecting backward compatibility:

- Internal layout of flow graph nodes has changed; recompilation is
    recommended for all binaries that use the flow graph.
- Resetting a tbb::flow::source_node will immediately activate it,
    unless it was created in inactive state.

Bugs fixed:

- Failure at creation of a memory pool will not cause process
    termination anymore.

Open-source contributions integrated:

- Supported building TBB with Clang on AArch64 with use of built-in
    intrinsics by David A.

------------------------------------------------------------------------
Intel TBB 4.3 Update 6
TBB_INTERFACE_VERSION == 8006

Changes (w.r.t. Intel TBB 4.3 Update 5):

- Supported zero-copy realloc for objects >1MB under Linux* via
    mremap system call.
- C++11 move-aware insert and emplace methods have been added to
    concurrent_hash_map container.
- install_name is set to @rpath/<library name> on OS X*.

Preview Features:

- Added template class async_node to the flow graph API. It allows a
    flow graph to communicate with an external activity managed by
    the user or another runtime.
- Improved speed of flow::graph::reset() clearing graph edges.
    rf_extract flag has been renamed rf_clear_edges.
- extract() method of graph nodes now takes no arguments.

Bugs fixed:

- concurrent_unordered_{set,map} behaves correctly for degenerate
    hashes.
- Fixed a race condition in the memory allocator that may lead to
    excessive memory consumption under high multithreading load.

------------------------------------------------------------------------
Intel TBB 4.3 Update 5
TBB_INTERFACE_VERSION == 8005

Changes (w.r.t. Intel TBB 4.3 Update 4):

- Added add_ref_count() method of class tbb::task.

Preview Features:

- Added class global_control for application-wide control of allowed
    parallelism and thread stack size.
- memory_pool_allocator now throws the std::bad_alloc exception on
    allocation failure.
- Exceptions thrown for by memory pool constructors changed from
    std::bad_alloc to std::invalid_argument and std::runtime_error.

Bugs fixed:

- scalable_allocator now throws the std::bad_alloc exception on
    allocation failure.
- Fixed a race condition in the memory allocator that may lead to
    excessive memory consumption under high multithreading load.
- A new scheduler created right after destruction of the previous one
    might be unable to modify the number of worker threads.

Open-source contributions integrated:

- (Added but not enabled) push_front() method of class tbb::task_list
    by Raf Schietekat.

------------------------------------------------------------------------
Intel TBB 4.3 Update 4
TBB_INTERFACE_VERSION == 8004

Changes (w.r.t. Intel TBB 4.3 Update 3):

- Added a C++11 variadic constructor for enumerable_thread_specific.
    The arguments from this constructor are used to construct
    thread-local values.
- Improved exception safety for enumerable_thread_specific.
- Added documentation for tbb::flow::tagged_msg class and
    tbb::flow::output_port function.
- Fixed build errors for systems that do not support dynamic linking.
- C++11 move-aware insert and emplace methods have been added to
    concurrent unordered containers.

Preview Features:

- Interface-breaking change: typedefs changed for node predecessor and
    successor lists, affecting copy_predecessors and copy_successors
    methods.
- Added template class composite_node to the flow graph API. It packages
    a subgraph to represent it as a first-class flow graph node.
- make_edge and remove_edge now accept multiport nodes as arguments,
    automatically using the node port with index 0 for an edge.

Open-source contributions integrated:

- Draft code for enumerable_thread_specific constructor with multiple
    arguments (see above) by Adrien Guinet.
- Fix for GCC invocation on IBM* Blue Gene*
    by Jeff Hammond and Raf Schietekat.
- Extended testing with smart pointers for Clang & libc++
    by Raf Schietekat.

------------------------------------------------------------------------
Intel TBB 4.3 Update 3
TBB_INTERFACE_VERSION == 8003

Changes (w.r.t. Intel TBB 4.3 Update 2):

- Move constructor and assignment operator were added to unique_lock.

Preview Features:

- Time overhead for memory pool destruction was reduced.

Open-source contributions integrated:

- Build error fix for iOS* by Raf Schietekat.

------------------------------------------------------------------------
Intel TBB 4.3 Update 2
TBB_INTERFACE_VERSION == 8002

Changes (w.r.t. Intel TBB 4.3 Update 1):

- Binary files for 64-bit Android* applications were added as part of the
    Linux* OS package.
- Exact exception propagation is enabled for Intel C++ Compiler on OS X*.
- concurrent_vector::shrink_to_fit was optimized for types that support
    C++11 move semantics.

Bugs fixed:

- Fixed concurrent unordered containers to insert elements much faster
    in debug mode.
- Fixed concurrent priority queue to support types that do not have
    copy constructors.
- Fixed enumerable_thread_specific to forbid copying from an instance
    with a different value type.

Open-source contributions integrated:

- Support for PathScale* EKOPath* Compiler by Erik Lindahl.

------------------------------------------------------------------------
Intel TBB 4.3 Update 1
TBB_INTERFACE_VERSION == 8001

Changes (w.r.t. Intel TBB 4.3):

- The ability to split blocked_ranges in a proportion, used by
    affinity_partitioner since version 4.2 Update 4, became a formal
    extension of the Range concept.
- More checks for an incorrect address to release added to the debug
    version of the memory allocator.
- Different kind of solutions for each TBB example were merged.

Preview Features:

- Task priorities are re-enabled in preview binaries.

Bugs fixed:

- Fixed a duplicate symbol when TBB_PREVIEW_VARIADIC_PARALLEL_INVOKE is
    used in multiple compilation units.
- Fixed a crash in __itt_fini_ittlib seen on Ubuntu 14.04.
- Fixed a crash in memory release after dynamic replacement of the
    OS X* memory allocator.
- Fixed incorrect indexing of arrays in seismic example.
- Fixed a data race in lazy initialization of task_arena.

Open-source contributions integrated:

- Fix for dumping information about gcc and clang compiler versions
    by Misty De Meo.

------------------------------------------------------------------------
Intel TBB 4.3
TBB_INTERFACE_VERSION == 8000

Changes (w.r.t. Intel TBB 4.2 Update 5):

- The following features are now fully supported: flow::indexer_node,
    task_arena, speculative_spin_rw_mutex.
- Compatibility with C++11 standard improved for tbb/compat/thread
    and tbb::mutex.
- C++11 move constructors have been added to concurrent_queue and
    concurrent_bounded_queue.
- C++11 move constructors and assignment operators have been added to
    concurrent_vector, concurrent_hash_map, concurrent_priority_queue,
    concurrent_unordered_{set,multiset,map,multimap}.
- C++11 move-aware emplace/push/pop methods have been added to
    concurrent_vector, concurrent_queue, concurrent_bounded_queue,
    concurrent_priority_queue.
- Methods to insert a C++11 initializer list have been added:
    concurrent_vector::grow_by(), concurrent_hash_map::insert(),
    concurrent_unordered_{set,multiset,map,multimap}::insert().
- Testing for compatibility of containers with some C++11 standard
    library types has been added.
- Dynamic replacement of standard memory allocation routines has been
    added for OS X*.
- Microsoft* Visual Studio* projects for Intel TBB examples updated
    to VS 2010.
- For open-source packages, debugging information (line numbers) in
    precompiled binaries now matches the source code.
- Debug information was added to release builds for OS X*, Solaris*,
    FreeBSD* operating systems and MinGW*.
- Various improvements in documentation, debug diagnostics and examples.

Preview Features:

- Additional actions on reset of graphs, and extraction of individual
    nodes from a graph (TBB_PREVIEW_FLOW_GRAPH_FEATURES).
- Support for an arbitrary number of arguments in parallel_invoke
   (TBB_PREVIEW_VARIADIC_PARALLEL_INVOKE).

Changes affecting backward compatibility:

- For compatibility with C++11 standard, copy and move constructors and
    assignment operators are disabled for all mutex classes. To allow
    the old behavior, use TBB_DEPRECATED_MUTEX_COPYING macro.
- flow::sequencer_node rejects messages with repeating sequence numbers.
- Changed internal interface between tbbmalloc and tbbmalloc_proxy.
- Following deprecated functionality has been removed:
    old debugging macros TBB_DO_ASSERT & TBB_DO_THREADING_TOOLS;
    no-op depth-related methods in class task;
    tbb::deprecated::concurrent_queue;
    deprecated variants of concurrent_vector methods.
- register_successor() and remove_successor() are deprecated as methods
    to add and remove edges in flow::graph; use make_edge() and
    remove_edge() instead.

Bugs fixed:

- Fixed incorrect scalable_msize() implementation for aligned objects.
- Flow graph buffering nodes now destroy their copy of forwarded items.
- Multiple fixes in task_arena implementation, including for:
    inconsistent task scheduler state inside executed functions;
    incorrect floating-point settings and exception propagation;
    possible stalls in concurrent invocations of execute().
- Fixed floating-point settings propagation when the same instance of
    task_group_context is used in different arenas.
- Fixed compilation error in pipeline.h with Intel Compiler on OS X*.
- Added missed headers for individual components to tbb.h.

Open-source contributions integrated:

- Range interface addition to parallel_do, parallel_for_each and
    parallel_sort by Stephan Dollberg.
- Variadic template implementation of parallel_invoke
    by Kizza George Mbidde (see Preview Features).
- Improvement in Seismic example for MacBook Pro* with Retina* display
    by Raf Schietekat.

------------------------------------------------------------------------
Intel TBB 4.2 Update 5
TBB_INTERFACE_VERSION == 7005

Changes (w.r.t. Intel TBB 4.2 Update 4):

- The second template argument of class aligned_space<T,N> now is set
    to 1 by default.

Preview Features:

- Better support for exception safety, task priorities and floating
    point settings in class task_arena.
- task_arena::current_slot() has been renamed to
    task_arena::current_thread_index().

Bugs fixed:

- Task priority change possibly ignored by a worker thread entering
    a nested parallel construct.
- Memory leaks inside the task scheduler when running on
    Intel(R) Xeon Phi(tm) coprocessor.

Open-source contributions integrated:

- Improved detection of X Window support for Intel TBB examples
    and other feedback by Raf Schietekat.

------------------------------------------------------------------------
Intel TBB 4.2 Update 4
TBB_INTERFACE_VERSION == 7004

Changes (w.r.t. Intel TBB 4.2 Update 3):

- Added possibility to specify floating-point settings at invocation
    of most parallel algorithms (including flow::graph) via
    task_group_context.
- Added dynamic replacement of malloc_usable_size() under
    Linux*/Android* and dlmalloc_usable_size() under Android*.
- Added new methods to concurrent_vector:
    grow_by() that appends a sequence between two given iterators;
    grow_to_at_least() that initializes new elements with a given value.
- Improved affinity_partitioner for better performance on balanced
    workloads.
- Improvements in the task scheduler, including better scalability
    when threads search for a task arena, and better diagnostics.
- Improved allocation performance for workloads that do intensive
    allocation/releasing of same-size objects larger than ~8KB from
    multiple threads.
- Exception support is enabled by default for 32-bit MinGW compilers.
- The tachyon example for Android* can be built for all targets
    supported by the installed NDK.
- Added Windows Store* version of the tachyon example.
- GettingStarted/sub_string_finder example ported to offload execution
    on Windows* for Intel(R) Many Integrated Core Architecture.

Preview Features:

- Removed task_scheduler_observer::on_scheduler_leaving() callback.
- Added task_scheduler_observer::may_sleep() callback.
- The CPF or_node has been renamed indexer_node. The input to
    indexer_node is now a list of types. The output of indexer_node is
    a tagged_msg type composed of a tag and a value. For indexer_node,
    the tag is a size_t.

Bugs fixed:

- Fixed data races in preview extensions of task_scheduler_observer.
- Added noexcept(false) for destructor of task_group_base to avoid
    crash on cancellation of structured task group in C++11.

Open-source contributions integrated:

- Improved concurrency detection for BG/Q, and other improvements
    by Raf Schietekat.
- Fix for crashes in enumerable_thread_specific in case if a contained
    object is too big to be constructed on the stack by Adrien Guinet.

------------------------------------------------------------------------
Intel TBB 4.2 Update 3
TBB_INTERFACE_VERSION == 7003

Changes (w.r.t. Intel TBB 4.2 Update 2):

- Added support for Microsoft* Visual Studio* 2013.
- Improved Microsoft* PPL-compatible form of parallel_for for better
    support of auto-vectorization.
- Added a new example for cancellation and reset in the flow graph:
    Kohonen self-organizing map (examples/graph/som).
- Various improvements in source code, tests, and makefiles.

Bugs fixed:

- Added dynamic replacement of _aligned_msize() previously missed.
- Fixed task_group::run_and_wait() to throw invalid_multiple_scheduling
    exception if the specified task handle is already scheduled.

Open-source contributions integrated:

- A fix for ARM* processors by Steve Capper.
- Improvements in std::swap calls by Robert Maynard.

------------------------------------------------------------------------
Intel TBB 4.2 Update 2
TBB_INTERFACE_VERSION == 7002

Changes (w.r.t. Intel TBB 4.2 Update 1):

- Enable C++11 features for Microsoft* Visual Studio* 2013 Preview.
- Added a test for compatibility of TBB containers with C++11
    range-based for loop.

Changes affecting backward compatibility:

- Internal layout changed for class tbb::flow::limiter_node.

Preview Features:

- Added speculative_spin_rw_mutex, a read-write lock class which uses
    Intel(R) Transactional Synchronization Extensions.

Bugs fixed:

- When building for Intel(R) Xeon Phi(tm) coprocessor, TBB programs
    no longer require explicit linking with librt and libpthread.

Open-source contributions integrated:

- Fixes for ARM* processors by Steve Capper, Leif Lindholm
    and Steven Noonan.
- Support for Clang on Linux by Raf Schietekat.
- Typo correction in scheduler.cpp by Julien Schueller.

------------------------------------------------------------------------
Intel TBB 4.2 Update 1
TBB_INTERFACE_VERSION == 7001

Changes (w.r.t. Intel TBB 4.2):

- Added project files for Microsoft* Visual Studio* 2010.
- Initial support of Microsoft* Visual Studio* 2013 Preview.
- Enable C++11 features available in Intel(R) C++ Compiler 14.0.
- scalable_allocation_mode(TBBMALLOC_SET_SOFT_HEAP_LIMIT, <size>) can be
    used to urge releasing memory from tbbmalloc internal buffers when
    the given limit is exceeded.

Preview Features:

- Class task_arena no longer requires linking with a preview library,
    though still remains a community preview feature.
- The method task_arena::wait_until_empty() is removed.
- The method task_arena::current_slot() now returns -1 if
    the task scheduler is not initialized in the thread.

Changes affecting backward compatibility:

- Because of changes in internal layout of graph nodes, the namespace
    interface number of flow::graph has been incremented from 6 to 7.

Bugs fixed:

- Fixed a race in lazy initialization of task_arena.
- Fixed flow::graph::reset() to prevent situations where tasks would be
    spawned in the process of resetting the graph to its initial state.
- Fixed decrement bug in limiter_node.
- Fixed a race in arc deletion in the flow graph.

Open-source contributions integrated:

- Improved support for IBM* Blue Gene* by Raf Schietekat.

------------------------------------------------------------------------
Intel TBB 4.2
TBB_INTERFACE_VERSION == 7000

Changes (w.r.t. Intel TBB 4.1 Update 4):

- Added speculative_spin_mutex, which uses Intel(R) Transactional
    Synchronization Extensions when they are supported by hardware.
- Binary files linked with libc++ (the C++ standard library in Clang)
    were added on OS X*.
- For OS X* exact exception propagation is supported with Clang;
    it requires use of libc++ and corresponding Intel TBB binaries.
- Support for C++11 initializer lists in constructor and assignment
    has been added to concurrent_hash_map, concurrent_unordered_set,
    concurrent_unordered_multiset, concurrent_unordered_map,
    concurrent_unordered_multimap.
- The memory allocator may now clean its per-thread memory caches
    when it cannot get more memory.
- Added the scalable_allocation_command() function for on-demand
    cleaning of internal memory caches.
- Reduced the time overhead for freeing memory objects smaller than ~8K.
- Simplified linking with the debug library for applications that use
    Intel TBB in code offloaded to Intel(R) Xeon Phi(tm) coprocessors.
    See an example in
    examples/GettingStarted/sub_string_finder/Makefile.
- Various improvements in source code, scripts and makefiles.

Changes affecting backward compatibility:

- tbb::flow::graph has been modified to spawn its tasks;
    the old behaviour (task enqueuing) is deprecated. This change may
    impact applications that expected a flow graph to make progress
    without calling wait_for_all(), which is no longer guaranteed. See
    the documentation for more details.
- Changed the return values of the scalable_allocation_mode() function.

Bugs fixed:

- Fixed a leak of parallel_reduce body objects when execution is
    cancelled or an exception is thrown, as suggested by Darcy Harrison.
- Fixed a race in the task scheduler which can lower the effective
    priority despite the existence of higher priority tasks.
- On Linux an error during destruction of the internal thread local
    storage no longer results in an exception.

Open-source contributions integrated:

- Fixed task_group_context state propagation to unrelated context trees
    by Raf Schietekat.

------------------------------------------------------------------------
Intel TBB 4.1 Update 4
TBB_INTERFACE_VERSION == 6105

Changes (w.r.t. Intel TBB 4.1 Update 3):

- Use /volatile:iso option with VS 2012 to disable extended
    semantics for volatile variables.
- Various improvements in affinity_partitioner, scheduler,
    tests, examples, makefiles.
- Concurrent_priority_queue class now supports initialization/assignment
    via C++11 initializer list feature (std::initializer_list<T>).

Bugs fixed:

- Fixed more possible stalls in concurrent invocations of
    task_arena::execute(), especially waiting for enqueued tasks.
- Fixed requested number of workers for task_arena(P,0).
- Fixed interoperability with Intel(R) VTune(TM) Amplifier XE in
    case of using task_arena::enqueue() from a terminating thread.

Open-source contributions integrated:

- Type fixes, cleanups, and code beautification by Raf Schietekat.
- Improvements in atomic operations for big endian platforms
    by Raf Schietekat.

------------------------------------------------------------------------
Intel TBB 4.1 Update 3
TBB_INTERFACE_VERSION == 6103

Changes (w.r.t. Intel TBB 4.1 Update 2):

- Binary files for Android* applications were added to the Linux* OS
    package.
- Binary files for Windows Store* applications were added to the
    Windows* OS package.
- Exact exception propagation (exception_ptr) support on Linux OS is
    now turned on by default for GCC 4.4 and higher.
- Stopped implicit use of large memory pages by tbbmalloc (Linux-only).
    Now use of large pages must be explicitly enabled with
    scalable_allocation_mode() function or TBB_MALLOC_USE_HUGE_PAGES
    environment variable.

Community Preview Features:

- Extended class task_arena constructor and method initialize() to
    allow some concurrency to be reserved strictly for application
    threads.
- New methods terminate() and is_active() were added to class
    task_arena.

Bugs fixed:

- Fixed initialization of hashing helper constant in the hash
    containers.
- Fixed possible stalls in concurrent invocations of
    task_arena::execute() when no worker thread is available to make
    progress.
- Fixed incorrect calculation of hardware concurrency in the presence
    of inactive processor groups, particularly on systems running
    Windows* 8 and Windows* Server 2012.

Open-source contributions integrated:

- The fix for the GUI examples on OS X* systems by Raf Schietekat.
- Moved some power-of-2 calculations to functions to improve readability
    by Raf Schietekat.
- C++11/Clang support improvements by arcata.
- ARM* platform isolation layer by Steve Capper, Leif Lindholm, Leo Lara
    (ARM).

------------------------------------------------------------------------
Intel TBB 4.1 Update 2
TBB_INTERFACE_VERSION == 6102

Changes (w.r.t. Intel TBB 4.1 Update 1):

- Objects up to 128 MB are now cached by the tbbmalloc. Previously
    the threshold was 8MB. Objects larger than 128 MB are still
    processed by direct OS calls.
- concurrent_unordered_multiset and concurrent_unordered_multimap
    have been added, based on Microsoft* PPL prototype.
- Ability to value-initialize a tbb::atomic<T> variable on construction
    in C++11, with const expressions properly supported.

Community Preview Features:

- Added a possibility to wait until all worker threads terminate.
    This is necessary before calling fork() from an application.

Bugs fixed:

- Fixed data race in tbbmalloc that might lead to memory leaks
    for large object allocations.
- Fixed task_arena::enqueue() to use task_group_context of target arena.
- Improved implementation of 64 bit atomics on ia32.

------------------------------------------------------------------------
Intel TBB 4.1 Update 1
TBB_INTERFACE_VERSION == 6101

Changes (w.r.t. Intel TBB 4.1):

- concurrent_vector class now supports initialization/assignment
    via C++11 initializer list feature (std::initializer_list<T>)
- Added implementation of the platform isolation layer based on
    Intel compiler atomic built-ins; it is supposed to work on
    any platform supported by compiler version 12.1 and newer.
- Using GetNativeSystemInfo() instead of GetSystemInfo() to support
    more than 32 processors for 32-bit applications under WOW64.
- The following form of parallel_for:
    parallel_for(first, last, [step,] f[, context]) now accepts an
    optional partitioner parameter after the function f.

Backward-incompatible API changes:

- The library no longer injects tuple in to namespace std.
    In previous releases, tuple was injected into namespace std by
    flow_graph.h when std::tuple was not available.  In this release,
    flow_graph.h now uses tbb::flow::tuple.  On platforms where
    std::tuple is available, tbb::flow::tuple is typedef'ed to
    std::tuple.  On all other platforms, tbb::flow::tuple provides
    a subset of the functionality defined by std::tuple. Users of
    flow_graph.h may need to change their uses of std::tuple to
    tbb::flow::tuple to ensure compatibility with non-C++11 compliant
    compilers.

Bugs fixed:

- Fixed local observer to be able to override propagated CPU state and
    to provide correct value of task_arena::current_slot() in callbacks.

------------------------------------------------------------------------
Intel TBB 4.1
TBB_INTERFACE_VERSION == 6100

Changes (w.r.t. Intel TBB 4.0 Update 5):

- _WIN32_WINNT must be set to 0x0501 or greater in order to use TBB
    on Microsoft* Windows*.
- parallel_deterministic_reduce template function is fully supported.
- TBB headers can be used with C++0x/C++11 mode (-std=c++0x) of GCC
    and Intel(R) Compiler.
- C++11 std::make_exception_ptr is used where available, instead of
    std::copy_exception from earlier C++0x implementations.
- Improvements in the TBB allocator to reduce extra memory consumption.
- Partial refactoring of the task scheduler data structures.
- TBB examples allow more flexible specification of the thread number,
    including arithmetic and geometric progression.

Bugs fixed:

- On Linux & OS X*, pre-built TBB binaries do not yet support exact
    exception propagation via C++11 exception_ptr. To prevent run time
    errors, by default TBB headers disable exact exception propagation
    even if the C++ implementation provides exception_ptr.

Community Preview Features:

- Added: class task_arena, for work submission by multiple application
    threads with thread-independent control of concurrency level.
- Added: task_scheduler_observer can be created as local to a master
    thread, to observe threads that work on behalf of that master.
    Local observers may have new on_scheduler_leaving() callback.

------------------------------------------------------------------------
Intel TBB 4.0 Update 5
TBB_INTERFACE_VERSION == 6005

Changes (w.r.t. Intel TBB 4.0 Update 4):

- Parallel pipeline optimization (directly storing small objects in the
    interstage data buffers) limited to trivially-copyable types for
    C++11 and a short list of types for earlier compilers.
- _VARIADIC_MAX switch is honored for TBB tuple implementation
    and flow::graph nodes based on tuple.
- Support of Cocoa framework was added to the GUI examples on OS X*
    systems.

Bugs fixed:

- Fixed a tv_nsec overflow bug in condition_variable::wait_for.
- Fixed execution order of enqueued tasks with different priorities.
- Fixed a bug with task priority changes causing lack of progress
    for fire-and-forget tasks when TBB was initialized to use 1 thread.
- Fixed duplicate symbol problem when linking multiple compilation
    units that include flow_graph.h on VC 10.

------------------------------------------------------------------------
Intel TBB 4.0 Update 4
TBB_INTERFACE_VERSION == 6004

Changes (w.r.t. Intel TBB 4.0 Update 3):

- The TBB memory allocator transparently supports large pages on Linux.
- A new flow_graph example, logic_sim, was added.
- Support for DirectX* 9 was added to GUI examples.

Community Preview Features:

- Added: aggregator, a new concurrency control mechanism.

Bugs fixed:

- The abort operation on concurrent_bounded_queue now leaves the queue
    in a reusable state. If a bad_alloc or bad_last_alloc exception is
    thrown while the queue is recovering from an abort, that exception
    will be reported instead of user_abort on the thread on which it
    occurred, and the queue will not be reusable.
- Steal limiting heuristic fixed to avoid premature stealing disabling
    when large amount of __thread data is allocated on thread stack.
- Fixed a low-probability leak of arenas in the task scheduler.
- In STL-compatible allocator classes, the method construct() was fixed
    to comply with C++11 requirements.
- Fixed a bug that prevented creation of fixed-size memory pools
    smaller than 2M.
- Significantly reduced the amount of warnings from various compilers.

Open-source contributions integrated:

- Multiple improvements by Raf Schietekat.
- Basic support for Clang on OS X* by Blas Rodriguez Somoza.
- Fixes for warnings and corner-case bugs by Blas Rodriguez Somoza
    and Edward Lam.

------------------------------------------------------------------------
Intel TBB 4.0 Update 3
TBB_INTERFACE_VERSION == 6003

Changes (w.r.t. Intel TBB 4.0 Update 2):

- Modifications to the low-level API for memory pools:
    added support for aligned allocations;
    pool policies reworked to allow backward-compatible extensions;
    added a policy to not return memory space till destruction;
    pool_reset() does not return memory space anymore.
- Class tbb::flow::graph_iterator added to iterate over all nodes
    registered with a graph instance.
- multioutput_function_node has been renamed multifunction_node.
    multifunction_node and split_node are now fully-supported features.
- For the tagged join node, the policy for try_put of an item with
    already existing tag has been defined: the item will be rejected.
- Matching the behavior on Windows, on other platforms the optional
    shared libraries (libtbbmalloc, libirml) now are also searched
    only in the directory where libtbb is located.
- The platform isolation layer based on GCC built-ins is extended.

Backward-incompatible API changes:

- a g…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants