Commit f0889fbb authored by Ondrej Vysocky's avatar Ondrej Vysocky
Browse files

FIX numalib number of sockets reading #60

parent b081bc59
...@@ -335,8 +335,11 @@ void sysInfoSize() ...@@ -335,8 +335,11 @@ void sysInfoSize()
sockets = x86_adapt_get_nr_avaible_devices(X86_ADAPT_DIE); sockets = x86_adapt_get_nr_avaible_devices(X86_ADAPT_DIE);
cores = x86_adapt_get_nr_avaible_devices(X86_ADAPT_CPU)/sockets; cores = x86_adapt_get_nr_avaible_devices(X86_ADAPT_CPU)/sockets;
#elif defined HAVE_NUMA_H #elif defined HAVE_NUMA_H
cores = sysconf(_SC_NPROCESSORS_ONLN); cores = sysconf(_SC_NPROCESSORS_ONLN); //cores per node
sockets = cores / (numa_node_of_cpu(cores-1)+1); sockets = numa_node_of_cpu(cores-1)+1;
if (sockets <= 0)
sockets = 1;
cores = cores / sockets;
#endif #endif
std::cout << "# SYSTEM INFORMATION\n" std::cout << "# SYSTEM INFORMATION\n"
<< "\tSockets per Node: " << sockets << std::endl << "\tSockets per Node: " << sockets << std::endl
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment