Skip to content

Commit

Permalink
Require hwloc 2 or later. Also get rid of a useless compile-time flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
insertinterestingnamehere committed Jan 21, 2025
1 parent b572ba0 commit 2bd7d57
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
7 changes: 0 additions & 7 deletions include/qthread_innards.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@

#include <pthread.h>

#ifdef USE_HWLOC
#include <hwloc.h>
#if (HWLOC_API_VERSION < 0x00010000)
#error HWLOC version unrecognized
#endif
#endif

/* Internal Headers */
#include "qt_asserts.h"
#include "qt_atomics.h"
Expand Down
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ if ("${QTHREADS_TOPOLOGY}" STREQUAL "hwloc" OR "${QTHREADS_TOPOLOGY}" STREQUAL "
HINTS ${HWLOC_INSTALL_DIR}
PATH_SUFFIXES lib lib64 lib32)
target_link_libraries(qthread PUBLIC "${HWLOC_LIBRARY}")
target_compile_definitions(qthread PRIVATE USE_HWLOC)
if ("${QTHREADS_TOPOLOGY}" STREQUAL "hwloc")
target_compile_definitions(qthread PRIVATE USE_HWLOC_MEM_AFFINITY)
endif()
Expand Down
4 changes: 4 additions & 0 deletions src/affinity/binders.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

#include <hwloc.h>

#if (HWLOC_API_VERSION < 0x00020000)
#error HWLOC version unrecognized
#endif

#include "qt_affinity.h"
#include "qt_alloc.h"
#include "qt_envariables.h"
Expand Down
4 changes: 4 additions & 0 deletions src/affinity/hwloc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#include <hwloc.h>

#if (HWLOC_API_VERSION < 0x00020000)
#error HWLOC version unrecognized
#endif

#include "qt_affinity.h"
#include "qt_alloc.h"
#include "qt_asserts.h" /* for qassert() */
Expand Down

0 comments on commit 2bd7d57

Please sign in to comment.