oneapi-src / oneTBB

oneAPI Threading Building Blocks (oneTBB)
https://oneapi-src.github.io/oneTBB/
Apache License 2.0
5.61k stars 1.01k forks source link

test_arena_constraints and conformance_arena_constraints test failures (macOS Required regular expression not found) #1050

Closed nieder closed 1 year ago

nieder commented 1 year ago

On macOS 10.14.6 (oneTBB 2021.8.0), test_arena_constraints and conformance_arena_constraints both fail. I have hwloc 2.9.0 installed.

Start testing: Mar 26 07:00 CDT
----------------------------------------------------------
68/135 Testing: test_arena_constraints
68/135 Test: test_arena_constraints
Command: "/Users/nieder/src/oneTBB-2021.8.0/finkbuild/appleclang_11.0_cxx11_64_release/test_arena_constraints" "--force-colors=1"
Directory: /Users/nieder/src/oneTBB-2021.8.0/finkbuild/appleclang_11.0_cxx11_64_release
"test_arena_constraints" start time: Mar 26 07:00 CDT
Output:
----------------------------------------------------------
oneTBB: SPECIFICATION VERSION   1.0
oneTBB: VERSION     2021.8
oneTBB: INTERFACE VERSION   12080
oneTBB: TBB_USE_DEBUG   0
oneTBB: TBB_USE_ASSERT  0
oneTBB: ALLOCATOR   scalable_malloc
oneTBB: TOOLS SUPPORT   disabled
oneTBB: TBBBIND UNAVAILABLE
TBBmalloc: SPECIFICATION VERSION    1.0
TBBmalloc: VERSION      2021.8
TBBmalloc: INTERFACE VERSION    12080
TBBmalloc: TBB_USE_DEBUG    0
TBBmalloc: TBB_USE_ASSERT   0
TBBmalloc: huge pages   not requested
[doctest] doctest version is "2.4.7"
[doctest] run with "--help" for options
===============================================================================
/Users/nieder/src/oneTBB-2021.8.0/test/tbb/test_arena_constraints.cpp:28:
TEST CASE:  Test core types topology traversal correctness

/Users/nieder/src/oneTBB-2021.8.0/test/common/common_arena_constraints.h:188: FATAL ERROR: REQUIRE( hwloc_get_cpubind(topology, process_cpuset, 0) >= 0 ) is NOT correct!
  values: REQUIRE( -1 >= 0 )
  logged: Error occurred inside hwloc call.

===============================================================================
/Users/nieder/src/oneTBB-2021.8.0/test/tbb/test_arena_constraints.cpp:42:
TEST CASE:  Test affinity and default_concurrency correctness for all available constraints.

/Users/nieder/src/oneTBB-2021.8.0/test/common/common_arena_constraints.h:188: FATAL ERROR: REQUIRE( hwloc_get_cpubind(topology, process_cpuset, 0) >= 0 ) is NOT correct!
  values: REQUIRE( -1 >= 0 )
  logged: Error occurred inside hwloc call.

===============================================================================
/Users/nieder/src/oneTBB-2021.8.0/test/tbb/test_arena_constraints.cpp:85:
TEST CASE:  Test binding with nested arenas

/Users/nieder/src/oneTBB-2021.8.0/test/common/common_arena_constraints.h:188: FATAL ERROR: REQUIRE( hwloc_get_cpubind(topology, process_cpuset, 0) >= 0 ) is NOT correct!
  values: REQUIRE( -1 >= 0 )
  logged: Error occurred inside hwloc call.

===============================================================================
/Users/nieder/src/oneTBB-2021.8.0/test/tbb/test_arena_constraints.cpp:94:
TEST CASE:  Test constraints propagation during arenas copy construction

/Users/nieder/src/oneTBB-2021.8.0/test/common/common_arena_constraints.h:188: FATAL ERROR: REQUIRE( hwloc_get_cpubind(topology, process_cpuset, 0) >= 0 ) is NOT correct!
  values: REQUIRE( -1 >= 0 )
  logged: Error occurred inside hwloc call.

===============================================================================
[doctest] test cases:  8 |  4 passed | 4 failed | 0 skipped
[doctest] assertions: 29 | 25 passed | 4 failed |
[doctest] Status: FAILURE!
<end of output>
Test time =   0.02 sec
----------------------------------------------------------
Test Fail Reason:
Required regular expression not found. Regex=[oneTBB: TBBBIND.*tbbbind_2_5
]
"test_arena_constraints" end time: Mar 26 07:00 CDT
"test_arena_constraints" time elapsed: 00:00:00
----------------------------------------------------------

121/135 Testing: conformance_arena_constraints
121/135 Test: conformance_arena_constraints
Command: "/Users/nieder/src/oneTBB-2021.8.0/finkbuild/appleclang_11.0_cxx11_64_release/conformance_arena_constraints" "--force-colors=1"
Directory: /Users/nieder/src/oneTBB-2021.8.0/finkbuild/appleclang_11.0_cxx11_64_release
"conformance_arena_constraints" start time: Mar 26 07:00 CDT
Output:
----------------------------------------------------------
[doctest] doctest version is "2.4.7"
[doctest] run with "--help" for options
===============================================================================
/Users/nieder/src/oneTBB-2021.8.0/test/conformance/conformance_arena_constraints.cpp:26:
TEST CASE:  NUMA aware arenas task execution test

/Users/nieder/src/oneTBB-2021.8.0/test/common/common_arena_constraints.h:188: FATAL ERROR: REQUIRE( hwloc_get_cpubind(topology, process_cpuset, 0) >= 0 ) is NOT correct!
  values: REQUIRE( -1 >= 0 )
  logged: Error occurred inside hwloc call.

===============================================================================
/Users/nieder/src/oneTBB-2021.8.0/test/conformance/conformance_arena_constraints.cpp:43:
TEST CASE:  Test NUMA topology traversal correctness

/Users/nieder/src/oneTBB-2021.8.0/test/common/common_arena_constraints.h:188: FATAL ERROR: REQUIRE( hwloc_get_cpubind(topology, process_cpuset, 0) >= 0 ) is NOT correct!
  values: REQUIRE( -1 >= 0 )
  logged: Error occurred inside hwloc call.

===============================================================================
[doctest] test cases: 2 | 0 passed | 2 failed | 0 skipped
[doctest] assertions: 8 | 6 passed | 2 failed |
[doctest] Status: FAILURE!
<end of output>
Test time =   0.01 sec
----------------------------------------------------------
Test Fail Reason:
Required regular expression not found. Regex=[oneTBB: TBBBIND.*tbbbind_2_5
]
"conformance_arena_constraints" end time: Mar 26 07:00 CDT
"conformance_arena_constraints" time elapsed: 00:00:00
----------------------------------------------------------

End testing: Mar 26 07:00 CDT
isaevil commented 1 year ago

Hi @nieder. Looks like a CMake issue. TBBBind is not supported on MacOS and thus HWLOC should not be found and used by tests. It seems to me that CMake finds HWLOC with pkg-config. Can you try passing -DTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH=ON to your CMake configuration command?

nieder commented 1 year ago

Adding -DTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH=ON means the two tests don't link up with hwloc.dylib and then both tests pass. Thanks for that hint.