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

FindTBB.cmake cannot find correct TBB library. #6504

Open
gnaggnoyil opened this issue Jun 9, 2024 · 1 comment
Open

FindTBB.cmake cannot find correct TBB library. #6504

gnaggnoyil opened this issue Jun 9, 2024 · 1 comment

Comments

@gnaggnoyil
Copy link

Expected Behavior

After enabling HPX_WITH_EXAMPLES_TBB option at configuration time, the test tbb_homogeneous_timed_task_spawn specified in tests/performance/local/CMakeLists.txt should be built and be tested when invoking CTest.

Actual Behavior

The test tbb_homogeneous_timed_task_spawn is not invoked during CTest

Steps to Reproduce the Problem

  1. mkdir -p <hpx_source_dir>/build && cd <hpx_source_dir>/build
  2. cmake -DHPX_WITH_EXAMPLES_TBB=ON ..
    In this step the following warning message appears:
    -- Nice threadlevel is disabled.
    -- Stack traces are enabled.
    CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
      The package name passed to `find_package_handle_standard_args` (TBBmalloc)
      does not match the name of the calling package (TBB).  This can lead to
      problems in calling code that expects `find_package` result variables
      (e.g., `_FOUND`) to follow a certain pattern.
    Call Stack (most recent call first):
      cmake/FindTBB.cmake:44 (find_package_handle_standard_args)
      CMakeLists.txt:1365 (find_package)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    -- Could NOT find TBBmalloc (missing: Tbb_LIBRARY) 
    -- Compiling with the native toolset
    -- Performing Test HPX_WITH_CXX11_ATOMIC - Success
    
  3. cmake --build .
  4. ctest | grep tbb_homogeneous_timed_task_spawn
    Nothing to output from stdout.

Specifications

  • HPX Version: current master (5898e7e)
  • Platform (compiler, OS): Archlinux, with the following packages installed from Arch offical repo:
    pacman -Qs | grep -E '(/gcc )|(/onetbb )|(/cmake )' 
    local/cmake 3.29.5-2
    local/gcc 14.1.1+r58+gfc9fb69ad62-1
    local/onetbb 2021.12.0-2
    
  • The contents of file /usr/lib/pkgconfig/tbb.pc from package onetbb is:
    # Copyright (c) 2021-2023 Intel Corporation
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    prefix=/usr
    libdir=${prefix}/lib
    includedir=${prefix}/include
    
    Name: oneAPI Threading Building Blocks (oneTBB)
    Description: C++ library for parallel programming on multi-core processors.
    URL: https://github.com/oneapi-src/oneTBB
    Version: 2021.12.0
    Libs: -L${libdir}  -ltbb
    Cflags: -I${includedir}
    
@hkaiser
Copy link
Member

hkaiser commented Jun 9, 2024

We should probably remove this example and the (optional) dependency on TBB. This code has not been looked at in over 10 years, IIRC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants