-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Summary
In a graph that merges two tokens, the output from the join_node is not in the expected order when executed with multiple threads.
Version
2022.3.0 extracted from oneapi-tbb-2022.3.0-lin.tgz
Environment
- Hardware
Multi-core workstation - OS name and version
Ubuntu 24.04 - Compiler version
gcc 13.3
Observed Behavior
The output of a join_node is not correct. The join_node has two inputs. The first input is a sequence of tuples (0,0), (1,1), (2,2), (3, 3)... The second input is a sequence of ints: 0, 1, 2, 3, 4, 5,.... The expected output is a sequence of tuples: ((0,0),0), ((1,1),1), ((2,2),2), ...
The observed output is sometime incorrect: ((0,0),0), ((2,2),1), ((1,1),2), ((3,3),3)
It seems the order of the first port is processed in incorrect order.
If the execution of the code is limited to one core via numactl, the output is correct.
Expected Behavior
The input of the join_node should be stored in a FIFO so that order is preserved. The output of the join_node should be independent of the number of cores and reproducible.
Steps To Reproduce
- Extract oneTBB
source oneapi-tbb-2022.3.0/env/vars.sh- Build:
g++ main.cpp -ltbb -o test_app - Run
./test_appthe program prints!!!if the order of tokens is incorrect