Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] [hwloc-users] hwloc_get_last_cpu_location on AIX
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2012-06-15 04:45:22


Hello Hendryk,

I am re-adding hwloc-devel to CC since we have a non-trivial patch
attached and discussion below.

I talked to your IBM contact and he was indeed able to help, thanks. So
there are indeed two different binding interfaces on AIX. hwloc only
support rsets, that's why we don't see binding made with the other
(older) interface (bindprocessor) in the XL OpenMP runtime. Fortunately,
both interfaces cannot be use in a contradictory way, so we just need to
fallback to the other interface when we find no rset binding.

The attached patch is supposed to implement this. I didn't test all
cases (current/other process/thread) yet. Let me know if it works fine
in your MPI+OpenMP program.

On set_cpubind() side, we should likely add some code to handle
conflicts with the older interface. If we get EPERM when setting a rset,
we should unbind with the old interface and try again. Unfortunately,
only the entire process can be unbound, single threads can't, from what
I understand. So we could get problems if the application binds multiple
threads with the old interface and then binds a single thread with
hwloc. But that'd be rare and bad anyway.

What will remains is get_last_cpu_location() for anything but the
current thread. I don't see any way to implement this.

Brice