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

FIX threads pinning at the MERIC init time #64

parent 09d2330e
......@@ -427,7 +427,15 @@ void Environment::init(int system, RegionParameters defaultParameter, int rank)
initHWSizes();
RAPL::initCountersUnits();
systemType = system;
//SET AFFINITY
#pragma omp parallel
{
cpu_set_t cpu_set;
CPU_ZERO(&cpu_set);
CPU_SET(sched_getcpu(), &cpu_set);
sched_setaffinity(0, sizeof(cpu_set_t), &cpu_set);
}
if(!rank)
{
getSystemDefaultSettings();
......
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