Sync from SUSE:SLFO:Main tbb revision 4638e42c4aa263fe8c3034ea602f11c2

This commit is contained in:
Adrian Schröter 2024-05-04 01:04:25 +02:00
commit 7f98e13466
10 changed files with 982 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

78
917.patch Normal file
View File

@ -0,0 +1,78 @@
From d9049c052c99162e26f86cf2a4982d026bf7dc57 Mon Sep 17 00:00:00 2001
From: Mo Zhou <cdluminate@gmail.com>
Date: Fri, 20 May 2022 09:02:53 -0400
Subject: [PATCH 1/2] Fix build failure for s390x and hppa architectures.
Signed-off-by: Mo Zhou <cdluminate@gmail.com>
---
src/tbb/tools_api/ittnotify_config.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/tbb/tools_api/ittnotify_config.h b/src/tbb/tools_api/ittnotify_config.h
index 5e7c0cdf5..411de0852 100644
--- a/src/tbb/tools_api/ittnotify_config.h
+++ b/src/tbb/tools_api/ittnotify_config.h
@@ -167,6 +167,14 @@
# define ITT_ARCH_LOONGARCH64 7
#endif /* ITT_ARCH_LOONGARCH64 */
+#ifndef ITT_ARCH_S390X
+# define ITT_ARCH_S390X 8
+#endif /* ITT_ARCH_S390X */
+
+#ifndef ITT_ARCH_HPPA
+# define ITT_ARCH_HPPA 9
+#endif /* ITT_ARCH_HPPA */
+
#ifndef ITT_ARCH
# if defined _M_IX86 || defined __i386__
# define ITT_ARCH ITT_ARCH_IA32
@@ -182,6 +190,10 @@
# define ITT_ARCH ITT_ARCH_PPC64
# elif defined __loongarch__
# define ITT_ARCH ITT_ARCH_LOONGARCH64
+# elif defined __s390__ || defined __s390x__
+# define ITT_ARCH ITT_ARCH_S390X
+# elif defined __hppa__
+# define ITT_ARCH ITT_ARCH_HPPA
# endif
#endif
From b0e9f8636e49c337836392d811fda403dc7102a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dirk=20M=C3=BCller?= <dirk@dmllr.de>
Date: Sat, 24 Sep 2022 14:27:24 +0200
Subject: [PATCH 2/2] Add riscv64 architecture detection
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Dirk Müller <dirk@dmllr.de>
---
src/tbb/tools_api/ittnotify_config.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/tbb/tools_api/ittnotify_config.h b/src/tbb/tools_api/ittnotify_config.h
index 411de0852..11422fd57 100644
--- a/src/tbb/tools_api/ittnotify_config.h
+++ b/src/tbb/tools_api/ittnotify_config.h
@@ -175,6 +175,10 @@
# define ITT_ARCH_HPPA 9
#endif /* ITT_ARCH_HPPA */
+#ifndef ITT_ARCH_RISCV64
+# define ITT_ARCH_RISCV64 10
+#endif /* ITT_ARCH_RISCV64 */
+
#ifndef ITT_ARCH
# if defined _M_IX86 || defined __i386__
# define ITT_ARCH ITT_ARCH_IA32
@@ -194,6 +198,8 @@
# define ITT_ARCH ITT_ARCH_S390X
# elif defined __hppa__
# define ITT_ARCH ITT_ARCH_HPPA
+# elif defined __riscv && __riscv_xlen == 64
+# define ITT_ARCH ITT_ARCH_RISCV64
# endif
#endif

8
_constraints Normal file
View File

@ -0,0 +1,8 @@
<constraints>
<hardware>
<memory>
<size unit="M">8000</size>
</memory>
<processors>4</processors>
</hardware>
</constraints>

View File

@ -0,0 +1,41 @@
From faea2c59a95ff609d23a4e4f859edef83d02f417 Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Fri, 9 Dec 2022 12:36:11 +0100
Subject: [PATCH] Add cmake check for libatomic requirement when building with
gcc (#980)
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
---
cmake/compilers/GNU.cmake | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake
index cd76acfe..59f4e693 100644
--- a/cmake/compilers/GNU.cmake
+++ b/cmake/compilers/GNU.cmake
@@ -44,6 +44,22 @@ if (NOT MINGW)
set(TBB_COMMON_LINK_LIBS dl)
endif()
+# Check whether code with full atomics can be built without libatomic
+# see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358
+include(CheckCXXSourceCompiles)
+check_cxx_source_compiles("#include <atomic>
+int main() {
+ std::atomic<uint8_t> w1;
+ std::atomic<uint16_t> w2;
+ std::atomic<uint32_t> w4;
+ std::atomic<uint64_t> w8;
+ return ++w1 + ++w2 + ++w4 + ++w8;
+}" TBB_BUILDS_WITHOUT_LIBATOMIC)
+
+if(NOT TBB_BUILDS_WITHOUT_LIBATOMIC)
+ set(TBB_COMMON_LINK_LIBS ${TBB_COMMON_LINK_LIBS} atomic)
+endif()
+
# Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.
if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
tbb_remove_compile_flag(-Werror)
--
2.30.2

View File

@ -0,0 +1,13 @@
Index: oneTBB-2021.3.0/cmake/templates/TBBConfig.cmake.in
===================================================================
--- oneTBB-2021.3.0.orig/cmake/templates/TBBConfig.cmake.in
+++ oneTBB-2021.3.0/cmake/templates/TBBConfig.cmake.in
@@ -58,8 +58,6 @@ foreach (_tbb_component ${TBB_FIND_COMPO
add_library(TBB::${_tbb_component} SHARED IMPORTED)
get_filename_component(_tbb_include_dir "${_tbb_root}/@TBB_INC_REL_PATH@" ABSOLUTE)
- set_target_properties(TBB::${_tbb_component} PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${_tbb_include_dir}"@TBB_COMPILE_DEFINITIONS@)
unset(_tbb_current_realpath)
unset(_tbb_include_dir)

View File

@ -0,0 +1,63 @@
From f12c93efd04991bc982a27e2fa6142538c33ca82 Mon Sep 17 00:00:00 2001
From: Rui Ueyama <ruiu@cs.stanford.edu>
Date: Sat, 7 May 2022 19:55:24 +0800
Subject: [PATCH] Retry if pthread_create fails with EAGAIN
On many Unix-like systems, pthread_create can fail spuriously even if
the running machine has enough resources to spawn a new thread.
Therefore, if EAGAIN is returned from pthread_create, we actually have
to try again.
I observed this issue when running the mold linker
(https://github.com/rui314/mold) under a heavy load. mold uses OneTBB
for parallelization.
As another data point, Go has the same logic to retry on EAGAIN:
https://go-review.googlesource.com/c/go/+/33894/
nanosleep is defined in POSIX 2001, so I believe that all Unix-like
systems support it.
Signed-off-by: Rui Ueyama <ruiu@cs.stanford.edu>
---
src/tbb/rml_thread_monitor.h | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/tbb/rml_thread_monitor.h b/src/tbb/rml_thread_monitor.h
index 13b556380..5b844b232 100644
--- a/src/tbb/rml_thread_monitor.h
+++ b/src/tbb/rml_thread_monitor.h
@@ -31,6 +31,7 @@
#include <pthread.h>
#include <cstring>
#include <cstdlib>
+#include <time.h>
#else
#error Unsupported platform
#endif
@@ -191,8 +192,24 @@ inline thread_monitor::handle_type thread_monitor::launch( void* (*thread_routin
check(pthread_attr_init( &s ), "pthread_attr_init has failed");
if( stack_size>0 )
check(pthread_attr_setstacksize( &s, stack_size ), "pthread_attr_setstack_size has failed" );
+
pthread_t handle;
- check( pthread_create( &handle, &s, thread_routine, arg ), "pthread_create has failed" );
+ int tries = 0;
+ for (;;) {
+ int error_code = pthread_create(&handle, &s, thread_routine, arg);
+ if (!error_code)
+ break;
+ if (error_code != EAGAIN || tries++ > 20) {
+ handle_perror(error_code, "pthread_create has failed");
+ break;
+ }
+
+ // pthreaed_create can spuriously fail on many Unix-like systems.
+ // Retry after tries * 1 millisecond.
+ struct timespec ts = {0, tries * 1000 * 1000};
+ nanosleep(&ts, NULL);
+ }
+
check( pthread_attr_destroy( &s ), "pthread_attr_destroy has failed" );
return handle;
}

BIN
tbb-2021.8.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

2
tbb-rpmlintrc Normal file
View File

@ -0,0 +1,2 @@
# loaded with ctypes by python package
addFilter("explicit-lib-dependency libirml1")

460
tbb.changes Normal file
View File

@ -0,0 +1,460 @@
-------------------------------------------------------------------
Wed Jan 4 20:08:08 UTC 2023 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to v2021.8.0
* Fixed oneapi::tbb::concurrent_bounded_queue::pop return type (GitHub* #807).
* Fixed oneapi::tbb::concurrent_queue and oneapi::tbb::concurrent_bounded_queue
with non-default constructible value types (GitHub* #885).
* Fixed incorrect splitting of iteration space in case there is no
support for proportional splitting in custom ranges.
- Add patch to link against libatomic where necessary
* add-cmake-check-for-libatomic-requirement-when-build.patch
- Drop 5cb212d44732947396abdd39eae1229c7cd51644.patch, merged upstream
- Use correct changelog entries for v2021.7.0
-------------------------------------------------------------------
Sun Dec 11 18:37:06 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to v2021.7.0:
* Memory allocator crash when allocating ~1TB on 64-bit systems (GitHub* #838).
* Thread Distribution over NUMA Nodes on Windows OS systems.
* For oneapi::tbb::suspend it is now guaranteed that the user-specified
callable object is executed by the calling thread.
-------------------------------------------------------------------
Sat Sep 24 12:16:41 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 2021.6.0:
* Improved support and use of the latest C++ standards for parallel_sort that
allows using this algorithm with user-defined and standard library-defined
objects with modern semantics.
* The following features are now fully functional: task_arena extensions,
collaborative_call_once, adaptive mutexes, heterogeneous overloads for
concurrent_hash_map, and task_scheduler_handle.
* Added support for Windows* Server 2022 and Python 3.10.
* Memory allocator crash on a system with an incomplete /proc/meminfo
* Incorrect blocking of task stealing
* Hang due to incorrect decrement of a limiter_node
* Memory corruption in some rare cases when passing big messages in a flow graph
* Possible deadlock in a throwable flow graph node with a lightweight policy.
The lightweight policy is now ignored for functors that can throw
exceptions
* Crash when obtaining a range from empty ordered and unordered containers
* Deadlock in a concurrent_vector resize() that could happen when the new
size is less than the previous size
- drop tbb-pr609-32bit-mwaitpkg.patch (upstream)
- add 5cb212d44732947396abdd39eae1229c7cd51644.patch, 917.patch:
build on riscv64, hppa, s390x
-------------------------------------------------------------------
Fri Aug 5 19:04:35 UTC 2022 - Martin Liška <mliska@suse.cz>
- Add retry-pthread_create.patch that fixes
gh#oneapi-src/oneTBB#824.
-------------------------------------------------------------------
Sat May 7 12:51:47 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 2021.1.5:
* Reworked synchronization mechanism to reduce contention when multiple
task_arenas are used concurrently.
* Fixed sporadic memory corruption.
* Enabled Microsoft Visual Studio* 2022 and Python 3.9 support.
* Extended task_group interface with a new run_and_wait overload to accept
task_handle.
* Fixed possible correctness issue in queuing_rw_mutex on non-Intel platforms.
* Fixed sporadic memory corruption.
-------------------------------------------------------------------
Tue Apr 5 14:34:05 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
- For 32-bit systems, rename tbb32.pc (default upstream for
32-bit) to tbb.pc (same as 64-bit) so that applications
depending on tbb do not have to call different pkgconfig modules
based on arch.
-------------------------------------------------------------------
Fri Oct 8 08:11:54 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Allow gcc11
- Add tbb-pr609-32bit-mwaitpkg.patch gh#oneapi-src/oneTBB#609
* fixes 32-bit build with gcc11
- Only run ctest when --with test is given
-------------------------------------------------------------------
Tue Oct 5 09:41:04 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to version 2021.4
* Large release notes since 2020.3:
https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-threading-building-blocks-release-notes.html
- Drop python2 package
- Drop patches:
* disable-irml.patch -- install the library
* optflags.patch -- build system change
* reproducible.patch -- build system change
- Refresh cmake-remove-include-path.patch
- Add libirml subpackage for python module
- Add libtbbbind library package for NUMA support
-------------------------------------------------------------------
Fri Dec 25 11:10:11 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Rework the building of python bindings
* Fix egg info version
* Remove shebang lines
* fix lining issue by setting TBBROOT and tbbvars in install phase
* Run python tests with irml library built (but not installed)
* Build bindings packages for all existing python3 flavors
gh#openSUSE/python-rpm-macros#66
-------------------------------------------------------------------
Mon Aug 3 05:52:53 UTC 2020 - Ismail Dönmez <idonmez@suse.com>
- Update to version 2020.3
* 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.
* 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).
* Fixed an issue in TBBBuild.cmake that causes the build with no arguments
to fail (https://github.com/oneapi-src/oneTBB/pull/233)
-------------------------------------------------------------------
Mon Mar 30 15:50:42 UTC 2020 - Ismail Dönmez <idonmez@suse.com>
- Update to version 2020.2
* 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.
* 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.
-------------------------------------------------------------------
Tue Jan 21 15:25:51 UTC 2020 - Ismail Dönmez <idonmez@suse.com>
- Update to version 2020.1
* 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).
-------------------------------------------------------------------
Wed Dec 18 16:28:51 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
- Update to version 2020.0
* Extended task_arena interface to simplify development of
NUMA-aware applications.
* Added warning notifications when the deprecated functionality is
used.
-------------------------------------------------------------------
Thu Oct 10 12:45:32 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
- Update to version 2019_u9
* 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.
* Added support for move-only types to tbb::parallel_pipeline
* Fixed detection of clang version when CUDA toolkit is installed
- Refresh patches:
* cmake-remove-include-path.patch
* disable-irml.patch
* optflags.patch
-------------------------------------------------------------------
Fri Jun 7 10:44:30 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
- Add cmake-remove-include-path.patch to remove setting include
path since we already install under /usr/include and this fixes
idiot OpenCV trying to do -isystem $TBB_INCLUDE_DIR
-------------------------------------------------------------------
Thu Jun 6 12:22:31 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
- Update to version 2019_U8
* 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).
-------------------------------------------------------------------
Tue Jun 4 14:54:09 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
- Update to version 2019_U7
* 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.
* 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.
* Added ordered associative containers:
concurrent_{map,multimap,set,multiset} (requires C++11).
-------------------------------------------------------------------
Tue May 14 07:53:56 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
- Update to version 2019_U6
* 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.
- Disable python2 support
-------------------------------------------------------------------
Thu Apr 25 07:56:20 UTC 2019 - Ismail Dönmez <idonmez@suse.com>
- Update to version 2019_U5
* Too many changes to list, please see the included CHANGES file.
- Install TBBConfig*.cmake
-------------------------------------------------------------------
Fri Aug 24 04:10:21 UTC 2018 - bwiedemann@suse.com
- Extend reproducible.patch to not capture build kernel version (boo#1101107)
-------------------------------------------------------------------
Wed Aug 1 04:32:27 UTC 2018 - bwiedemann@suse.com
- Extend reproducible.patch to override build date (boo#1047218)
-------------------------------------------------------------------
Mon Jan 8 09:41:48 UTC 2018 - tchvatal@suse.com
- Add conditions to build with py2 and py3 respectively in order
to allow us disable one based on codestream
-------------------------------------------------------------------
Thu Dec 21 12:20:59 UTC 2017 - idonmez@suse.com
- Add disable-irml.patch to disable linking to libirml
- Actually update to tarball to 2018_U2 release
-------------------------------------------------------------------
Sat Dec 16 15:29:08 UTC 2017 - idonmez@suse.com
- Update to version 2018_U2
* lambda-friendly overloads for parallel_scan.
* support of static and simple partitioners in
parallel_deterministic_reduce.
* initial support for Flow Graph Analyzer to do parallel_for.
* reservation support in overwrite_node and write_once_node.
* Fixed a potential deadlock scenario in the flow graph that
affected Intel® TBB 2018 Initial Release.
* 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.
-------------------------------------------------------------------
Wed Nov 1 17:31:14 UTC 2017 - mpluskal@suse.com
- Build python2 and python3 bindings
- Do not bundle python bindings with shared library
-------------------------------------------------------------------
Thu Sep 21 12:03:27 UTC 2017 - idonmez@suse.com
- Update to version 2018 release
* Now fully supports this_task_arena::isolate() function.
* Parallel STL, an implementation of the C++ standard library
algorithms with support for execution policies, has been
introduced.
* Fixed a bug preventing use of streaming_node and opencl_node
with Clang.
* 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.
-------------------------------------------------------------------
Tue May 30 09:11:27 UTC 2017 - bwiedemann@suse.com
- Add reproducible.patch to not add build hostname+kernel to binary
-------------------------------------------------------------------
Wed May 24 12:21:12 UTC 2017 - idonmez@suse.com
- Update to version 2017_20170412 release
* Added a blocking terminate extension to the task_scheduler_init
class that allows an object to wait for termination of worker
threads.
-------------------------------------------------------------------
Wed Apr 19 08:07:44 UTC 2017 - idonmez@suse.com
- Add missing include files boo#1034842
-------------------------------------------------------------------
Sun Mar 5 19:42:50 UTC 2017 - idonmez@suse.com
- Update to 2017_20170226 release
* Added support for C++11 move semantics in parallel_do.
* Constructors for many classes, including graph nodes, concurrent
containers, thread-local containers, etc., are declared explicit
and cannot be used for implicit conversions anymore.
* 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.
-------------------------------------------------------------------
Mon Dec 12 09:04:36 UTC 2016 - idonmez@suse.com
- Update to 2017_20161128 release
* Added template class gfx_factory to the flow graph API. It
implements the Factory concept for streaming_node to offload
computations to Intel processor graphics.
* Fixed a possible deadlock caused by missed wakeup signals in
task_arena::execute().
-------------------------------------------------------------------
Thu Nov 3 07:52:18 UTC 2016 - idonmez@suse.com
- Update to version 2017_20161004
* Fixed the issue with task_arena::execute() not being processed
when the calling thread cannot join the arena.
-------------------------------------------------------------------
Sat Sep 17 13:02:18 UTC 2016 - idonmez@suse.com
- Updated to version 2017_20160722
* static_partitioner class is now a fully supported feature.
* async_node class is now a fully supported feature.
* 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 demostrate 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.
- License changed to Apache-2.0
- Please see included CHANGES file for all changes.
-------------------------------------------------------------------
Wed Jun 8 10:50:50 UTC 2016 - idonmez@suse.com
- Update to version 44_20160526
* Added a Python module which is able to replace Python's thread pool
class with the implementation based on Intel TBB task scheduler.
* 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.
-------------------------------------------------------------------
Wed May 4 12:21:36 UTC 2016 - jengelh@inai.de
- Update group, and description of tbbmalloc.
-------------------------------------------------------------------
Wed May 4 10:53:51 UTC 2016 - idonmez@suse.com
- Update to version 44_20160128:
* Lots of changes, see the CHANGES file.
- Drop tbb-4.0-cas.patch, fixed upstream.
-------------------------------------------------------------------
Sun Feb 17 19:42:08 UTC 2013 - asterios.dramis@gmail.com
- Update to version 41_20130116:
* See CHANGES file for news.
- Removed tbb package which included only doc files (moved them to tbb-devel).
- Updated optflags.patch to make it apply correctly and also fix "File is
compiled without RPM_OPT_FLAGS" rpm post build check warning.
- Added a patch "tbb-4.0-cas.patch" to fix build on PowerPC (taken from
Fedora).
-------------------------------------------------------------------
Sun Jan 29 01:33:25 UTC 2012 - jengelh@medozas.de
- Remove redundant tags/sections per specfile guideline suggestions
- Parallel building using %_smp_mflags
-------------------------------------------------------------------
Sun Aug 14 23:35:15 UTC 2011 - crrodriguez@opensuse.org
- Update to version tbb30_20110704
-------------------------------------------------------------------
Wed Sep 16 11:09:37 CEST 2009 - meissner@suse.de
- Reimport from Andi Kleens directory.
-------------------------------------------------------------------
Sat Sep 5 00:00:00 UTC 2009 - andi@firstfloor.org
- update to 22_20090809oss, install machine/* includes
-------------------------------------------------------------------
Thu Sep 11 00:00:00 UTC 2008 - skh@suse.de
- update to snapshot 21_20080825 (for details see CHANGES file in
package)
- remove obsolete patch tbb-build.patch
- split off libtbb2 and libtbbmalloc2 subpackages
-------------------------------------------------------------------
Wed Aug 13 00:00:00 UTC 2008 - ro@suse.de
- add ExclusiveArch
-------------------------------------------------------------------
Mon Apr 28 00:00:00 UTC 2008 - skh@suse.de
- update to source version tbb20_20080408oss_src
-------------------------------------------------------------------
Wed Feb 13 00:00:00 UTC 2008 - dmueller@suse.de
- fix buildrequires
-------------------------------------------------------------------
Fri Feb 8 00:00:00 UTC 2008 - skh@suse.de
- initial package from version 2.0, source version
tbb20_20080122oss_src

291
tbb.spec Normal file
View File

@ -0,0 +1,291 @@
#
# spec file for package tbb
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define so_ver 12
%define so_ver_malloc 2
%define so_ver_irml 1
%define so_ver_bind 3
%if %{pkg_vcmp hwloc-devel >= 2.5}
%define tbbbind_suffix _2_5
%else
%if %{pkg_vcmp hwloc-devel >= 2}
%define tbbbind_suffix _2_0
%else
%define tbbbind_suffix %{nil}
%endif
%endif
# by default, don't compile all the tests
%bcond_with test
%if 0%{suse_version} >= 1500
%{?!python_module:%define python_module() python3-%{**}}
%bcond_without python3
%define skip_python2 1
%else
%bcond_with python3
%endif
Name: tbb
Version: 2021.8.0
Release: 0
Summary: Threading Building Blocks (TBB)
License: Apache-2.0
Group: Development/Libraries/C and C++
URL: https://www.threadingbuildingblocks.org/
Source0: https://github.com/oneapi-src/oneTBB/archive/v%{version}.tar.gz#/tbb-%{version}.tar.gz
Source99: tbb-rpmlintrc
Patch1: https://github.com/oneapi-src/oneTBB/pull/917.patch
# PATCH-FIX-OPENSUSE cmake-remove-include-path.patch -- openCV include error
Patch2: cmake-remove-include-path.patch
Patch3: retry-pthread_create.patch
Patch4: add-cmake-check-for-libatomic-requirement-when-build.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: hwloc-devel
%if %{with python3}
BuildRequires: %{python_module devel >= 3.5}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
BuildRequires: swig >= 3.0.6
%endif
%if 0%{?suse_version} > 1500
# if python multiflavor is available (Tumbleweed), use it to generate subpackages
%define python_subpackage_only 1
%python_subpackages
%else
# unified defaults for the package file list
%define pycache_only %{nil}
%define python_sitearch %{python3_sitearch}
%define python_files() -n python3-%{**}
%endif
%description
Threading Building Blocks (TBB) offers a rich and complete approach to
expressing parallelism in a C++ program. It is a library that helps you take
advantage of multi-core processor performance without having to be a threading
expert. Threading Building Blocks is not just a threads-replacement library. It
represents a higher-level, task-based parallelism that abstracts platform
details and threading mechanism for performance and scalability.
%package -n libtbb%{so_ver}
Summary: Threading Building Blocks (TBB)
Group: System/Libraries
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description -n libtbb%{so_ver}
Threading Building Blocks (TBB) offers a rich and complete approach to
expressing parallelism in a C++ program. It is a library that helps you take
advantage of multi-core processor performance without having to be a threading
expert. Threading Building Blocks is not just a threads-replacement library. It
represents a higher-level, task-based parallelism that abstracts platform
details and threading mechanism for performance and scalability.
%package -n libtbbmalloc%{so_ver_malloc}
Summary: Threading Building Blocks (TBB)
Group: System/Libraries
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description -n libtbbmalloc%{so_ver_malloc}
This subpackage contains the two TBB memory allocator templates that
are similar to the STL template class std::allocator. These two
templates, scalable_allocator<T> and cache_aligned_allocator<T>,
address critical issues in parallel programming: scalability and
false sharing.
%package -n libirml%{so_ver_irml}
Summary: Threading Building Blocks (TBB) - IPC Library
Group: System/Libraries
%description -n libirml%{so_ver_irml}
This subpackage provides the library required in order to enable inter-process
(IPC) coordination between oneTBB schedulers for the TBB python module.
%package -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind}
Summary: Threading Building Blocks (TBB) NUMA support library
Group: System/Libraries
%description -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind}
The NUMA support library for Threading Building Blocks (TBB)
%if 0%{?python_subpackage_only}
%package -n python-%{name}
Summary: Python %{python_version} support for Threading Building Blocks (TBB)
Group: Development/Languages/Python
Requires: libirml%{so_ver_irml}
%description -n python-%{name}
This package contains python %{python_version} bindings for Threading Building Blocks
(TBB).
%else
%package -n python3-%{name}
Summary: Python 3 support for Threading Building Blocks (TBB)
Group: Development/Languages/Python
Requires: libirml%{so_ver_irml}
%description -n python3-%{name}
This package contains python 3 bindings for Threading Building Blocks
(TBB).
%endif
%package devel
Summary: Development Files for Threading Building Blocks (TBB)
Group: Development/Libraries/C and C++
Requires: c++_compiler
Requires: libirml%{so_ver_irml} = %{version}
Requires: libtbb%{so_ver} = %{version}
Requires: libtbbbind%{tbbbind_suffix}-%{so_ver_bind} = %{version}
Requires: libtbbmalloc%{so_ver_malloc} = %{version}
%description devel
Threading Building Blocks (TBB) offers a rich and complete approach to
expressing parallelism in a C++ program. It is a library that helps you take
advantage of multi-core processor performance without having to be a threading
expert. Threading Building Blocks is not just a threads-replacement library. It
represents a higher-level, task-based parallelism that abstracts platform
details and threading mechanism for performance and scalability.
This package contains the header files needed for development with tbb.
%prep
%setup -q -n oneTBB-%{version}
%autopatch -p1
# fix python version
sed -i 's/version\s*="0.2"/version = "%{version}"/' python/setup.py
sed -i '1{/^#!.*env python/ d}' python/TBB.py python/tbb/*.py
%build
# HWLOC: no automatic find on SLE-12 (older cmake)
# TBB_TEST: don't compile by default
# TBB4PY: use cmake build system to build libirml in the python tree
%cmake \
%if 0%{suse_version} < 1500
-DCMAKE_HWLOC_2_LIBRARY_PATH=%{_libdir}/libhwloc.so \
-DCMAKE_HWLOC_2_INCLUDE_PATH=%{_includedir}/hwloc \
%endif
%if ! %{with test}
-DTBB_TEST:BOOL=OFF \
%endif
%if %{with python3}
-DTBB4PY_BUILD:BOOL=ON \
%endif
# Leap 15.2 encounters oom during compilation
%cmake_build \
%if 0%{?sle_version} == 150200
-j 4
%endif
source */vars.sh
cd ..
# rebuild for every python flavor
%if %{with python3}
pushd python
%python_build
popd
%endif
%install
# create empty python build dir (?)
mkdir -p build/python/build
%cmake_install
source build/*/vars.sh
%if %{with python3}
pushd python
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
popd
%endif
# we install it into the devel package docdir
rm -r %{buildroot}%{_datadir}/doc/TBB
# Rename tbb32.pc to tbb.pc (same as 64-bit) so that applications depending on tbb
# do not have to call different pkgconfig modules based on arch
test -f %{buildroot}%{_libdir}/pkgconfig/tbb32.pc && mv %{buildroot}%{_libdir}/pkgconfig/tbb32.pc %{buildroot}%{_libdir}/pkgconfig/tbb.pc
%check
%if %{with test}
%ctest --exclude-regex python_test
%endif
# always test python modules, if they are built
%if %{with python3}
# avoid shuffling the existing build dir
mkdir python-test
pushd python-test
export LD_LIBRARY_PATH="%{buildroot}%{_libdir}"
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m tbb test -v
popd
%endif
%post -n libtbb%{so_ver} -p /sbin/ldconfig
%postun -n libtbb%{so_ver} -p /sbin/ldconfig
%post -n libtbbmalloc%{so_ver_malloc} -p /sbin/ldconfig
%postun -n libtbbmalloc%{so_ver_malloc} -p /sbin/ldconfig
%post -n libirml%{so_ver_irml} -p /sbin/ldconfig
%postun -n libirml%{so_ver_irml} -p /sbin/ldconfig
%post -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind} -p /sbin/ldconfig
%postun -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind} -p /sbin/ldconfig
%files -n libtbb%{so_ver}
%{_libdir}/libtbb.so.%{so_ver}*
%files -n libtbbmalloc%{so_ver_malloc}
%{_libdir}/libtbbmalloc.so.%{so_ver_malloc}*
%{_libdir}/libtbbmalloc_proxy.so.%{so_ver_malloc}*
%files -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind}
%{_libdir}/libtbbbind%{tbbbind_suffix}.so.%{so_ver_bind}*
%files devel
%license LICENSE.txt
%doc README.md
%{_includedir}/tbb/
%{_includedir}/oneapi/
%{_libdir}/cmake/TBB
%{_libdir}/pkgconfig/tbb.pc
%{_libdir}/libtbb.so
%{_libdir}/libtbbmalloc.so
%{_libdir}/libtbbmalloc_proxy.so
%{_libdir}/libtbbbind%{tbbbind_suffix}.so
%if %{with python3}
%{_libdir}/libirml.so
%endif
%if %{with python3}
%files -n libirml%{so_ver_irml}
%{_libdir}/libirml.so.%{so_ver_irml}*
%files %{python_files %{name}}
%{python_sitearch}/tbb
%{python_sitearch}/TBB.py
%{python_sitearch}/TBB-*py3*
%{python_sitearch}/TBB-%{version}*-info
%pycache_only %{python_sitearch}/__pycache__/TBB*
%endif
%changelog