Open MPI logo

Hardware Locality Users' Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Users mailing list

Subject: [hwloc-users] hwloc_get_last_cpu_location on AIX
From: Hendryk Bockelmann (bockelmann_at_[hidden])
Date: 2012-05-08 08:33:35


Hello,

I just ran into trouble using hwloc_get_last_cpu_location on our POWER6
cluster with AIX6.1
My plan is to find out if the binding of the job-scheduler was correct
for MPI-tasks and OpenMP-threads. This is what I want to use:

support = hwloc_topology_get_support(topology);
ret = hwloc_get_cpubind(topology, set, HWLOC_CPUBIND_THREAD);
if (support->cpubind->get_thisthread_cpubind) {
   hwloc_bitmap_asprintf(&str, set);
   printf("--> cpuset (thread %d) is %s \n",omp_get_thread_num(),str);
}
if (support->cpubind->get_thisthread_last_cpu_location) {
   ret = hwloc_set_cpubind(topology, set, HWLOC_CPUBIND_THREAD);
   last = hwloc_bitmap_alloc();
   ret = hwloc_get_last_cpu_location(topology,last,HWLOC_CPUBIND_THREAD);
   hwloc_bitmap_asprintf(&str, last);
   printf("--> cpu_loca (thread %d) is %s \n",omp_get_thread_num(),str);
}

this is what I found in src/tests/hwloc_get_last_cpu_location.c

Running this on my local linux machine gives e.g.:

--> cpuset (thread 1) is 0x00000005
--> cpuset (thread 0) is 0x00000005
--> cpu_loca (thread 0) is 0x00000004
--> cpu_loca (thread 1) is 0x00000001

hence, (support->cpubind->get_thisthread_cpubind) and
(support->cpubind->get_thisthread_last_cpu_location) are both true

but on the AIX cluster I just get:

--> cpuset (thread 0) is 0x00000003
--> cpuset (thread 1) is 0x00000003

hence, (support->cpubind->get_thisthread_last_cpu_location) is false.
Now the question is whether this is related to my install of hwloc-1.4.1
or a general problem on AIX?
Furthermore, I would like to know if there is any other change to use
hwloc to check correct task/thread binding?

Best,
Hendryk