Open MPI logo

Hardware Locality Users' Mailing List Archives

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

Subject: Re: [hwloc-users] hwloc_get_last_cpu_location on AIX
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2012-05-08 08:41:33


Le 08/05/2012 14:33, Hendryk Bockelmann a écrit :
> 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?

Hello,
get_last_cpu_location is currently not implemented on AIX. There's a
TODO in the code saying that we should use AIX "mycpu". The main problem
with hwloc on AIX is that none of us has access to a AIX machine anymore.
Brice