Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] -lhwloc in components.
From: Samuel Thibault (samuel.thibault_at_[hidden])
Date: 2012-09-05 11:25:01


Jeff Squyres, le Wed 05 Sep 2012 17:13:56 +0200, a écrit :
> > The source code shouldn't need to be modified:
> >
> > #define hwloc_foo_bar(arg1, arg2) hwloc_funcs->foo_bar(arg1, arg2)
>
> You need to make sure that #define is only effected in certain places in the code.

Well, all the places that will constitute a plugin, no?

> And you need to ensure that hwloc_funcs->[foo] isn't attempted to be used before it has been filled in.

As I said in my earlier mail, hwloc_funcs would be provided by the
loader of the plugin, so it can make sure it's filled in (I forgot to
mention that what I call hwloc_funcs above is an internal variable of
the plugin, not a symbol provided by libhwloc.so).

> And unless there is a very fixed set of functions that can be called by plugins,

Well, I believe we'll have to have that anyway. That was part of the
whole discussion about plugins a long time ago.

> you'll probably need to grow hwloc_funcs over time, which may lead to ABI issues...?

Sure. We can for instance make the plugin check for the size of
hwloc_funcs provided by the plugin loader vs the size that it was
compiled against, and thus refuse to get loaded by an older hwloc.

Samuel