Browse Source

Set the affinity. Only use 1 core of each module on bulldozer.

tags/v0.2.9.rc1
Zhang Xianyi 13 years ago
parent
commit
6ae2f868fd
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      driver/others/init.c

+ 2
- 2
driver/others/init.c View File

@@ -492,7 +492,7 @@ static void disable_affinity(void) {

#ifndef USE_OPENMP
for(i=0; i< count; i++){
lprocmask[i] &= ((unsigned long *)&cpu_orig_mask[0])[i];
lprocmask[i] &= common->avail[i];
}
#endif

@@ -751,7 +751,7 @@ void gotoblas_affinity_init(void) {
if (common -> num_nodes > 1) numa_mapping();

common -> final_num_procs = 0;
for(i = 0; i < common -> avail_count; i++) common -> final_num_procs += popcount(common -> avail[i]);
for(i = 0; i < common -> avail_count; i++) common -> final_num_procs += rcount(common -> avail[i]) + 1; //Make the max cpu number.

for (cpu = 0; cpu < common -> final_num_procs; cpu ++) common -> cpu_use[cpu] = 0;



Loading…
Cancel
Save