xref: /oneTBB/doc/main/intro/limitations.rst (revision 229b63ee)
1.. _limitations:
2
3Known Limitations
4*****************
5
6This page outlines the known limitations of oneTBB to help you better understand its capabilities.
7
8Freestanding Compilation Mode
9^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10
11**Limitation:** oneTBB does not support the freestanding compilation mode.
12
13**Risk:** Compiling an application that utilizes oneTBB headers using the Intel(R) oneAPI DPC+/C+ Compiler may result in failure on Windows* OS if the ``/Qfreestanding`` compiler option is employed.
14
15Static Assert
16^^^^^^^^^^^^^
17
18**Limitation:** A static assert causes the compilation failures in oneTBB headers if the following conditions are satisfied:
19
20  * Compilation is done with Clang 12.0.0 or a more recent version.
21  * The LLVM standard library is employed, coupled with the use of the ``-ffreestanding`` flag and C++11/14 compiler options.
22
23**Risk:** The compilation failures.
24
25Interface Incompatibilities: TBB vs oneTBB
26^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27
28**Limitation:** An application using Parallel STL algorithms in the ``libstdc++`` versions 9 and 10 may fail to compile due to incompatible interface changes between earlier versions of Threading Building Blocks (TBB) and oneAPI Threading Building Blocks (oneTBB).
29
30**Solution:** Disable support for Parallel STL algorithms by defining ``PSTL_USE_PARALLEL_POLICIES`` (in libstdc++ 9) or ``_GLIBCXX_USE_TBB_PAR_BACKEND`` (in libstdc++ 10) macro to zero before inclusion of the first standard header file in each translation unit.
31
32Incorrect Installation Location
33^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34
35**Limitation:** On Linux* OS, if oneAPI Threading Building Blocks (oneTBB) or Threading Building Blocks (TBB) are installed in a system folder, such as ``/usr/lib64``, the application may fail to link due to the order in which the linker searches for libraries.
36
37**Risk:** The issue does not affect the program execution.
38
39**Solution:** Use the ``-L`` linker option to specify the correct location of oneTBB library.
40
41``fork()`` Support
42^^^^^^^^^^^^^^^^^^^
43
44**Limitation:** oneTBB does not support ``fork()``.
45
46**Solution:** To work-around the issue, consider using ``task_scheduler_handle`` to join oneTBB worker threads before using ``fork()``.
47