Skip to content

Commit ca8fac3

Browse files
feat(mt-kahypar): disable hwloc functionality
1 parent a6c19d9 commit ca8fac3

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

nix/mt-kahypar-windows.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/mt-kahypar/parallel/thread_pinning_observer.h b/mt-kahypar/parallel/thread_pinning_observer.h
2+
index 8fc5f8b9..4353ac67 100644
3+
--- a/mt-kahypar/parallel/thread_pinning_observer.h
4+
+++ b/mt-kahypar/parallel/thread_pinning_observer.h
5+
@@ -33,6 +33,7 @@
6+
#include <sstream>
7+
8+
#ifdef _WIN32
9+
+#include <windows.h>
10+
#include <winbase.h>
11+
#elif KAHYPAR_ENABLE_THREAD_PINNING
12+
#include <sched.h>

nix/mt-kahypar.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
cmake,
66
git,
77
boost,
8-
hwloc,
98
tbb_2022_0,
109
windows,
1110
}:
@@ -47,18 +46,19 @@ stdenv.mkDerivation rec {
4746

4847
buildInputs = [
4948
boost.dev
50-
hwloc.dev
5149
tbb_2022_0.dev
5250
] ++ lib.optionals stdenv.hostPlatform.isWindows [ windows.pthreads ];
5351

5452
patches = [
5553
./mt-kahypar-cmake.patch
5654
./mt-kahypar-pc.patch
55+
./mt-kahypar-windows.patch
5756
];
5857

5958
cmakeFlags = [
6059
"-D FETCHCONTENT_SOURCE_DIR_KAHYPAR-SHARED-RESOURCES=${shared-resources}"
6160
"-D FETCHCONTENT_SOURCE_DIR_WHFC=${WHFC}"
61+
"-D KAHYPAR_DISABLE_HWLOC=ON"
6262
] ++ lib.optionals stdenv.hostPlatform.isWindows [ "-D BUILD_SHARED_LIBS=ON" ];
6363

6464
buildPhase = "cmake --build . --target mtkahypar --parallel $NIX_BUILD_CORES";

0 commit comments

Comments
 (0)