Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] standalone-like build inside other projects
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-06-30 07:00:00


On Jun 30, 2010, at 5:53 AM, Brice Goglin wrote:

> Modified: mvapich2/trunk/src/mpid/ch3/channels/mrail/src/hwloc/Makefile.am
> ===================================================================
> --- mvapich2/trunk/src/mpid/ch3/channels/mrail/src/hwloc/Makefile.am 2010-06-29 22:01:58 UTC (rev 3997)
> +++ mvapich2/trunk/src/mpid/ch3/channels/mrail/src/hwloc/Makefile.am 2010-06-29 22:02:09 UTC (rev 3998)
> @@ -7,7 +7,7 @@
>
> SUBDIRS = src include
> if HWLOC_BUILD_STANDALONE
> -SUBDIRS += utils tests doc
> +SUBDIRS += utils tests
> endif

Doing this means that their "make dist" will not include the doc directory.

This may be (and probably is) fine for their requirements. For how they're using it, they technically don't need the utils, tests, or doc directories (aside from the fact that they're not using the embedded build). Indeed, in OMPI, I "svn -rm"'ed most of the contents of tests, doc, and utils, just so that an OMPI tarball wouldn't have to carry around all the hwloc man pages, PDF docs, etc. (but the directories themselves must still exist; the Autotools do sanity tests to ensure that they exist, even if they aren't traversed). I don't remember the numbers, but removing this stuff did make a noticeable difference on the size of the resulting OMPI tarball.

> If more people are going to use hwloc in standalone-mode inside other
> projects, maybe we need to talk:
> * tell them to switch to the embedded mode ? if not, what do they miss
> in the embedded mode ?

There's 2 ways to do the embedded mode:

1. use the m4 stuff, like Open MPI (and like I did with some other internal Cisco projects)
2. use "./configure --enable-embedded-mode ..." (which I used in at least 1 internal Cisco project)

Both are documented in the docs.

I can see how some people wouldn't want to get their hands dirty with the m4 stuff. But I'm not sure why they're not using the 2nd form.

According to the docs, here's what embedded mode gives you:

-----
When used in "embedded" mode, hwloc will:

- not install any header files
- not build any documentation files
- not build or install any executables or tests
- not build <tt>libhwloc.*</tt> -- instead, it will build
  <tt>libhwloc_embedded.*</tt>
-----

> * look at supporting the disabling the doc/tools build when called by
> AC_CONFIG_SUBDIRS ?

AC_CONFIG_SUBDIRS is unfortunately fairly limited. We don't use it in Open MPI because of all of its restrictions; we ended up rolling our own OMPI_CONFIG_SUBDIRS (which, while it isn't perfect, eases many/most of the restrictions from AC_CONDIF_SUBDIRS).

You can pass --enable-embedded-mode from the top-level configure to enable hwloc's embedded mode when invoked via AC_CONFIG_SUBDIRS, but that seems unattractive. I suppose the top-level configure could setenv $enable_embedded_mode before finishing, which would have the same effect as passing the actual flag --enable-embedded-mode, but I haven't tried this myself...?

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/