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

Update tbb to 2020 3 #2447

Merged
merged 12 commits into from
Mar 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Stan Math depends on four libraries:
- Boost (version 1.75.0): [Boost Home Page](https://www.boost.org)
- Eigen (version 3.3.9: [Eigen Home Page](https://eigen.tuxfamily.org/index.php?title=Main_Page)
- SUNDIALS (version 5.7.0): [Sundials Home Page](https://computation.llnl.gov/projects/sundials/sundials-software)
- Intel TBB (version 2019_U8): [Intel TBB Home Page](https://www.threadingbuildingblocks.org)
- Intel TBB (version 2020.3): [Intel TBB Home Page](https://www.threadingbuildingblocks.org)

These are distributed under the `lib/` subdirectory. Only these
versions of the dependent libraries have been tested with Stan Math.
Expand Down Expand Up @@ -92,7 +92,7 @@ statements are given to the compiler and the necessary libraries are
linked: `~/stan-dev/math` and `~/stan-dev/math/lib/eigen_3.3.9` and
`~/stan-dev/math/lib/boost_1.75.0` and
`~/stan-dev/math/lib/sundials_5.7.0/include` and
`~/stan-dev/math/lib/tbb_2019_U8/include`. The
`~/stan-dev/math/lib/tbb_2020.3/include`. The
`~/stan-dev/math/lib/tbb` directory is created by the `math-libs`
makefile target automatically and contains the dynamically loaded
Intel TBB library. The flags `-Wl,-rpath,...` instruct the linker to
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions lib/tbb_2019_U8/.gitignore → lib/tbb_2020.3/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Thumbs.db
################################
CMakeCache.txt
CMakeFiles/
cmake/TBBConfig.cmake
cmake/TBBConfigVersion.cmake

# Other #
#########
Expand All @@ -85,3 +87,4 @@ CMakeFiles/
.svn
crash*
*.tmp
/.vs
115 changes: 115 additions & 0 deletions lib/tbb_2019_U8/CHANGES → lib/tbb_2020.3/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,121 @@
The list of most significant changes made over time in
Intel(R) Threading Building Blocks (Intel(R) TBB).

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

Expand Down
File renamed without changes.
File renamed without changes.
18 changes: 6 additions & 12 deletions lib/tbb_2019_U8/Makefile → lib/tbb_2020.3/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2005-2019 Intel Corporation
# Copyright (c) 2005-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +13,7 @@
# limitations under the License.

tbb_root?=.
cfg?=release
include $(tbb_root)/build/common.inc
.PHONY: default all tbb tbbmalloc tbbproxy test examples

Expand All @@ -25,25 +26,22 @@ default: tbb tbbmalloc $(if $(use_proxy),tbbproxy)
all: tbb tbbmalloc tbbproxy test examples

tbb: mkdir
$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbb cfg=debug
$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbb cfg=release

tbbmalloc: mkdir
$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc
$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc

tbbproxy: mkdir
$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbproxy cfg=debug tbbproxy
$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbproxy cfg=release tbbproxy

tbbbind: mkdir
$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbbind cfg=release tbbbind

test: tbb tbbmalloc $(if $(use_proxy),tbbproxy)
-$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test
-$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.test cfg=debug
-$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test
-$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.test cfg=release

rml: mkdir
$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.rml cfg=debug
$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.rml cfg=release

examples: tbb tbbmalloc
Expand All @@ -60,22 +58,18 @@ doxygen:
clean: clean_examples
$(shell $(RM) $(work_dir)_release$(SLASH)*.* >$(NUL) 2>$(NUL))
$(shell $(RD) $(work_dir)_release >$(NUL) 2>$(NUL))
$(shell $(RM) $(work_dir)_debug$(SLASH)*.* >$(NUL) 2>$(NUL))
$(shell $(RD) $(work_dir)_debug >$(NUL) 2>$(NUL))
@echo clean done

clean_examples:
$(shell $(MAKE) -s -i -r -C examples -f Makefile tbb_root=.. clean >$(NUL) 2>$(NUL))

mkdir:
$(shell $(MD) "$(work_dir)_release" >$(NUL) 2>$(NUL))
$(shell $(MD) "$(work_dir)_debug" >$(NUL) 2>$(NUL))
@echo Created $(work_dir)_release and ..._debug directories
@echo Created the $(work_dir)_release directory

info:
@echo OS: $(tbb_os)
@echo arch=$(arch)
@echo compiler=$(compiler)
@echo runtime=$(runtime)
@echo tbb_build_prefix=$(tbb_build_prefix)

File renamed without changes.
11 changes: 5 additions & 6 deletions lib/tbb_2019_U8/README.md → lib/tbb_2020.3/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Threading Building Blocks 2019 Update 8
[![Stable release](https://img.shields.io/badge/version-2019_U8-green.svg)](https://github.com/01org/tbb/releases/tag/2019_U8)
# Threading Building Blocks 2020
[![Stable release](https://img.shields.io/badge/version-2020.3-green.svg)](https://github.com/intel/tbb/releases/tag/v2020.3)
[![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE)

Threading Building Blocks (TBB) lets you easily write parallel C++ programs that take
Expand All @@ -8,16 +8,15 @@ full advantage of multicore performance, that are portable, composable and have
## Release Information
Here are the latest [Changes](CHANGES) and [Release Notes](doc/Release_Notes.txt) (contains system requirements and known issues).

Since [2018 U5](https://github.com/01org/tbb/releases/tag/2018_U5) TBB binary packages include [Parallel STL](https://github.com/intel/parallelstl) as a high-level component.
Since [2018 U5](https://github.com/intel/tbb/releases/tag/2018_U5) TBB binary packages include [Parallel STL](https://github.com/intel/parallelstl) as a high-level component.

## Documentation
* TBB [tutorial](https://software.intel.com/en-us/tbb-tutorial)
* TBB general documentation: [stable](https://software.intel.com/en-us/tbb-documentation)
and [latest](https://www.threadingbuildingblocks.org/docs/help/index.htm)
* TBB general documentation: [stable](https://software.intel.com/en-us/tbb-documentation). For latest documentation please refer to the [latest](https://github.com/intel/tbb/releases/latest) release assets.

## Support
Please report issues and suggestions via
[GitHub issues](https://github.com/01org/tbb/issues) or start a topic on the
[GitHub issues](https://github.com/intel/tbb/issues) or start a topic on the
[TBB forum](http://software.intel.com/en-us/forums/intel-threading-building-blocks/).

## How to Contribute
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2005-2019 Intel Corporation
# Copyright (c) 2005-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2005-2019 Intel Corporation
# Copyright (c) 2005-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2005-2019 Intel Corporation
# Copyright (c) 2005-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,7 +35,7 @@ LINK_FLAGS = -Wl,-rpath-link=. -Wl,-rpath=. -rdynamic
C_FLAGS = $(CPLUS_FLAGS)

ifeq ($(cfg), release)
CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
CPLUS_FLAGS = $(ITT_NOTIFY) -O2 -DUSE_PTHREAD
endif
ifeq ($(cfg), debug)
CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2005-2019 Intel Corporation
# Copyright (c) 2005-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@ ifndef arch
endif

ifndef runtime
clang_version:=$(shell clang -v 2>&1 | grep version | sed "s/.*version \([0-9]*\.[0-9]*\).*/\1/")
clang_version:=$(shell clang --version | sed -n "1s/.*version \(.*[0-9]\) .*/\1/p")
os_version:=$(shell uname -r)
os_kernel_version:=$(shell uname -r | sed -e 's/-.*$$//')
export runtime:=cc$(clang_version)_kernel$(os_kernel_version)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2005-2019 Intel Corporation
# Copyright (c) 2005-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2005-2019 Intel Corporation
# Copyright (c) 2005-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,13 +32,13 @@ C_FLAGS = $(CPLUS_FLAGS)

# gcc 6.0 and later have -flifetime-dse option that controls
# elimination of stores done outside the object lifetime
ifneq (,$(shell gcc -dumpfullversion -dumpversion | egrep "^([6-9])"))
ifneq (,$(shell gcc -dumpfullversion -dumpversion | egrep "^([6-9]|1[0-9])"))
# keep pre-contruction stores for zero initialization
DSE_KEY = -flifetime-dse=1
endif

ifeq ($(cfg), release)
CPLUS_FLAGS = -g -O2 -DUSE_PTHREAD
CPLUS_FLAGS = -O2 -DUSE_PTHREAD
endif
ifeq ($(cfg), debug)
CPLUS_FLAGS = -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2005-2019 Intel Corporation
# Copyright (c) 2005-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2005-2019 Intel Corporation
# Copyright (c) 2005-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -60,6 +60,13 @@ TBB_DEP_NON_RML_TEST?= cache_aligned_allocator_rml.$(OBJ) dynamic_link_rml.$(OBJ
ifeq ($(cfg),debug)
RML_TBB_DEP+= spin_mutex_rml.$(OBJ)
TBB_DEP_RML_TEST?= $(RML_ASM.OBJ) tbb_misc_rml.$(OBJ)

ifeq (windows icl,$(tbb_os) $(compiler_name))
# Some versions of ICC link to the wrong version of the vc runtime
# libcpmtd.lib should be used instead of libcpmt.lib
LIB_LINK_FLAGS += /nodefaultlib:libcpmt.lib
endif

else
TBB_DEP_RML_TEST?= $(RML_ASM.OBJ)
endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2005-2019 Intel Corporation
# Copyright (c) 2005-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Loading