From 55f9f1a85935b7a66edf09ec2646ca5252335fc0 Mon Sep 17 00:00:00 2001 From: BenLangmead Date: Thu, 24 Mar 2016 13:16:59 -0400 Subject: [PATCH] getting rid of dependence on libnuma --- Makefile | 1 - cohort.hpp | 1 - cpu_numa_info.cpp | 18 ------------------ cpu_numa_info.h | 3 --- 4 files changed, 23 deletions(-) diff --git a/Makefile b/Makefile index 32e7fd3..d076304 100644 --- a/Makefile +++ b/Makefile @@ -130,7 +130,6 @@ OTHER_CPPS = ccnt_lut.cpp ref_read.cpp alphabet.cpp shmem.cpp \ edit.cpp ebwt.cpp ifeq (1,$(WITH_COHORTLOCK)) - LIBS += -lnuma override EXTRA_FLAGS += -DWITH_COHORTLOCK=1 OTHER_CPPS += cohort.cpp cpu_numa_info.cpp endif diff --git a/cohort.hpp b/cohort.hpp index 4e04df4..91afaec 100644 --- a/cohort.hpp +++ b/cohort.hpp @@ -3,7 +3,6 @@ #ifndef COHORT_H_ #define COHORT_H_ -#include #include #include #include diff --git a/cpu_numa_info.cpp b/cpu_numa_info.cpp index e383a82..fb5ea0b 100644 --- a/cpu_numa_info.cpp +++ b/cpu_numa_info.cpp @@ -1,23 +1,5 @@ #include "cpu_numa_info.h" -//adapted from http://stackoverflow.com/questions/7259363/measuring-numa-non-uniform-memory-access-no-observable-asymmetry-why -int bind_to_node(int thread_idx) -{ - //int numcpus = numa_num_task_cpus() - //bitmask* bm = numa_bitmask_alloc(numcpus); - int num_nodes = numa_max_possible_node(); - int numa_node = thread_idx % num_nodes; - bitmask* nm = numa_allocate_nodemask(); - numa_bitmask_setbit(nm,numa_node); - //void numa_bind(struct bitmask *nodemask); sets node AND memory - //this one only sets node (not memeory) - //numa_run_on_node_mask(struct bitmask *nodemask); - numa_run_on_node_mask(nm); - numa_free_nodemask(nm); - return numa_node; - //numa_bitmask_free(bm); -} - /// Based on http://stackoverflow.com/questions/16862620/numa-get-current-node-core void get_cpu_and_node_(int& cpu, int& node) { unsigned long a,d,c; diff --git a/cpu_numa_info.h b/cpu_numa_info.h index eebe990..1125df6 100644 --- a/cpu_numa_info.h +++ b/cpu_numa_info.h @@ -1,9 +1,6 @@ #ifndef CPU_AND_NODE_H_ #define CPU_AND_NODE_H_ -#include - extern void get_cpu_and_node_(int& cpu, int& node); -extern int bind_to_node(int thread_idx); #endif