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

Threads package not available when checking options for SST/MPI #3874

Closed
liangwang0734 opened this issue Oct 27, 2023 · 2 comments
Closed

Threads package not available when checking options for SST/MPI #3874

liangwang0734 opened this issue Oct 27, 2023 · 2 comments
Assignees
Labels
area: build Build issues

Comments

@liangwang0734
Copy link

liangwang0734 commented Oct 27, 2023

Describe the bug
Building release_29 with SST/MPI gives errors:

-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/mpicc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/mpicxx - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found MPI_C: /usr/bin/mpicc (found version "3.1") 
-- Found MPI_CXX: /usr/bin/mpicxx (found version "3.1") 
-- Found MPI: TRUE (found version "3.1") found components: C CXX 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'libfabric'
--   Found libfabric, version 1.19.0rc1
-- Found LIBFABRIC: /home/liang/src/libfabric-build/lib/libfabric.so (Required is at least version "1.6") 
-- Checking for module 'cray-drc'
--   No package 'cray-drc' found
-- Could NOT find CrayDRC (missing: CrayDRC_LIBRARIES) 
-- Performing Test ADIOS2_HAVE_MPI_CLIENT_SERVER
CMake Error at /home/liang/src/adios2-build29/CMakeFiles/CMakeTmp/CMakeLists.txt:21 (add_executable):
  Target "cmTC_1e80d" links to target "Threads::Threads" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?


CMake Error at /usr/share/cmake-3.22/Modules/Internal/CheckSourceRuns.cmake:94 (try_run):
  Failed to generate test project build system.
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/CheckCXXSourceRuns.cmake:76 (cmake_check_source_runs)
  cmake/DetectOptions.cmake:435 (check_cxx_source_runs)
  CMakeLists.txt:170 (include)

To Reproduce

  1. Install libfabric from source
  2. Build adios2 with
cmake \
  -DBUILD_SHARED_LIBS=ON \
  -DADIOS2_BUILD_EXAMPLES=OFF \
  -DBUILD_TESTING=OFF \
  -DCMAKE_INSTALL_PREFIX=/home/liang/src/adios2-install29 \
  -DCMAKE_BUILD_TYPE=RELEASE \
  \
  -DADIOS2_USE_BP5=ON \
  -DADIOS2_USE_DataMan=OFF \
  -DADIOS2_USE_DataSpaces=OFF \
  -DADIOS2_USE_HDF5=OFF \
  -DADIOS2_USE_MHS=OFF \
  -DADIOS2_USE_SST=ON \
  -DLIBFABRIC_ROOT=/home/liang/src/libfabric-build \
  -DADIOS2_USE_Fortran=OFF \
  -DADIOS2_USE_MPI=ON \
  -DADIOS2_USE_Python=OFF \
  -DADIOS2_USE_Blosc2=OFF \
  -DADIOS2_USE_BZip2=OFF \
  -DADIOS2_USE_LIBPRESSIO=OFF \
  -DADIOS2_USE_MGARD=OFF \
  -DADIOS2_USE_PNG=OFF \
  -DADIOS2_USE_SZ=OFF \
  -DADIOS2_USE_ZFP=OFF \
  -DADIOS2_USE_DAOS=OFF \
  -DADIOS2_USE_IME=OFF \
  -DADIOS2_USE_Sodium=OFF \
  -DADIOS2_USE_Catalyst=OFF \
  -DADIOS2_USE_SysVShMem=ON \
  -DADIOS2_USE_UCX=OFF \
  -DADIOS2_USE_ZeroMQ=OFF \
  -DADIOS2_USE_Profiling=OFF \
  -DADIOS2_USE_Endian_Reverse=OFF \
  -DADIOS2_USE_AWSSDK=OFF \
  -DADIOS2_USE_CUDA=OFF \
  -DADIOS2_USE_Kokkos=OFF \
../ADIOS2

Expected behavior
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS/Platform: Linux pop-os 5.19.0-76051900-generic #202207312230166078056622.04~9d60db1 SMP PREEMPT_DYNAMIC Thu A x86_64 x86_64 x86_64 GNU/Linux
  • Build compiler version gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, cmake version 3.22.1, build type: shared

Additional context
Following fix works

diff --git a/cmake/DetectOptions.cmake b/cmake/DetectOptions.cmake
index c1ed1dee2..902aa8f56 100644
--- a/cmake/DetectOptions.cmake
+++ b/cmake/DetectOptions.cmake
@@ -418,6 +418,9 @@ if(Python_Interpreter_FOUND)
   )
 endif()
 
+# Multithreading
+find_package(Threads REQUIRED)
+
 # Sst
 if(ADIOS2_USE_SST AND NOT WIN32)
   set(ADIOS2_HAVE_SST TRUE)
@@ -544,9 +547,6 @@ if(AWSSDK_FOUND)
     set(ADIOS2_HAVE_AWSSDK TRUE)
 endif()
 
-# Multithreading
-find_package(Threads REQUIRED)
-
 # Floating point detection
 include(CheckTypeRepresentation)

Following up
Was the issue fixed? Please report back.

@vicentebolea
Copy link
Collaborator

cc @scottwittenburg

@vicentebolea
Copy link
Collaborator

We have observed this in spack spack/spack#40832 and was corrected for master in #3893 which will be backported to release soon, I will close this when this is backported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build issues
Projects
None yet
Development

No branches or pull requests

2 participants