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:08:29

Jeff Squyres, le Wed 05 Sep 2012 17:06:00 +0200, a écrit :
> On Sep 5, 2012, at 10:21 AM, Samuel Thibault wrote:
> > So ltdl does not help for that matter?
> No. It's not really an ltdl issue. ltdl is just a portable wrapper around OS-specific dlopen-like mechanisms.

I understand that, but dlopen is usually used for plugins, and plugins
usually need such kind of calling back into what loaded the plugin.

> > One way would be to pass to the component a structure with all the
> > useful function pointers (using #define to keep the same source code).
> We thought about this in OMPI and decided it would be a nightmare in the source code.

The source code shouldn't need to be modified:

#define hwloc_foo_bar(arg1, arg2) hwloc_funcs->foo_bar(arg1, arg2)