Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] need help to add a module
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2011-08-04 19:43:30

On Jul 23, 2011, at 3:08 PM, bin wang wrote:

> I'm trying to add a module into open-mpi MCA framework.
> I hope the module could be conditionally compiled and linked.
> It should be disabled by default and enabled by certain flags at configure step.

Sorry for the delay in replying -- I was on vacation last week and am only just now starting to get caught up with my INBOX...

What you describe is very do-able.

> When I make a dynamic module, everything is working fine.
> The problem is that when I make a static compilation/link,
> the compiler would complain the component variable is not defined.
> In my build log, I found something as following,
> 1414 --- MCA component btl:mx (m4 configuration macro)
> 1415 checking for MCA component btl:mx compile mode... static
> 1416 checking --with-mx value... simple ok (unspecified)
> 1417 checking --with-mx-libdir value... simple ok (unspecified)
> 1418 checking myriexpress.h usability... no
> 1419 checking myriexpress.h presence... no
> 1420 checking for myriexpress.h... no
> 1421 checking if MCA component btl:mx can compile... no
> Correspondingly the ompi/mca/btl/base/static-components.h had no
> declaration of extern mca_btl_mx_component variable.
> I think this is the behavior I expect for my module. I checked the files
> but found nothing special.

That is correct. If your configure.m4 decides that the component cannot be built, then the upper-level's will skip your components altogether. Hence, nothing special needs to be in your component's Makefile.ams to determine whether they need to be built or not.

> I'm not familiar with those autotools, can anyone give me some detailed
> guidance on what I should do?

Did you have a look at the following wiki pages:

The latter one goes through what you can do in configure.m4 in detail.

Note that the configure.m4 contents on the SVN trunk are slightly different than the v1.4 and v1.5 branches. There's links on the wiki pages for the older v1.4/v1.5 build system stuff, too.

Jeff Squyres
For corporate legal information go to: