Open MPI logo

Network Locality Devel Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Network Locality Devel mailing list

Subject: Re: [netloc-devel] First cut of integrating netloc into OMPI
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2014-01-30 17:26:32

Le 30/01/2014 23:22, Jeff Squyres (jsquyres) a écrit :
> I took a swipe at this today: I was adding opal/mca/netloc, right alongside opal/mca/hwloc. I only worked on the "external" netloc plugin, meaning that OMPI would refer to an externally-installed netloc (vs. an embedded one):
> ./configure --with-netloc=/path/to/netloc/install
> However, I ran into a minor annoyance and a major difficulty:
> 0. Some changes I made with a consult from Josh: in configure, I'm checking to see that including netloc.h works. To make this work, I moved all the Jansson-based functions from the public netloc.h to private/netloc.h (see This prevents OMPI from needing to know where <jansson.h> can be found. Cool -- now OMPI's configure can find netloc.h properly.
> --> Josh: you might want to take a hard look at the rest of <netloc.h> and see if there are any other non-public functions in there that should move to private/netloc.h, or elsewhere.
> 1. Then configure checks that -lnetloc works. This fails because I need to also ensure that the right -L is in LDFLAGS to find libjansson. Annoying, but do-able on the configure command line.

We need a pkg-config for netloc?

> 2. But even after adding LDFLAGS=-L/path/to/libjansson, the configury test fails because libnetloc depends on libhwloc. OMPI typically builds its own embedded hwloc, and this doesn't exist yet. So trying to link against libnetloc is guaranteed to fail. This is a chicken-and-egg problem.
> I'm not quite sure how to solve #2 yet...

If you're linking with an external libnetloc, I would say you should use
the external libhwloc that libnetloc was built against (and pkg-config
would bring that too) ?