We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent adb2834 commit a287858Copy full SHA for a287858
1 file changed
src/testROC.cxx
@@ -18,7 +18,11 @@ InfoLogger theLog;
18
#include <time.h>
19
20
#include <sys/mman.h>
21
+
22
+#ifdef WITH_NUMA
23
#include <numa.h>
24
+#endif
25
26
#include <sched.h>
27
#include <sys/types.h>
28
#include <sys/stat.h>
@@ -220,13 +224,17 @@ int main(int argc, char**argv) {
220
224
221
225
// bind alloc/exec on numa node
222
226
if (numaNodeId>=0) {
227
+ #ifdef WITH_NUMA
223
228
struct bitmask *nodemask;
229
nodemask=numa_allocate_nodemask();
230
if (nodemask==NULL) {return -1;}
231
numa_bitmask_clearall(nodemask);
232
numa_bitmask_setbit(nodemask,numaNodeId);
233
numa_bind(nodemask);
234
printf("Locked to numa node %d\n",numaNodeId);
235
+ #else
236
+ printf("Can not set numaNode ... program compiled without NUMA support\n");
237
+ #endif
238
}
239
240
0 commit comments