Thanks to your help, this should now work in hwloc trunk. A tarball will be available tomorrow morning at http://www.open-mpi.org/software/hwloc/nightly/trunk/ (you need a SVN revision >= 4528)
I also added instruction cache detection for AIX while I was working on AIX. I am now looking at get_last_cpu_location() for entire processes instead of individual threads. Brice Le 08/05/2012 14:41, Brice Goglin a écrit : > 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 >