Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI devel] Open MPI + HWLOC + Static build issue
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2011-08-03 10:29:16

I finally reproduced here. Based on the ornl platform script, you're
configuring with LDFLAGS=-static and then building with make
LDFLAGS=-all-static. Surprisingly, this works fine when building vanilla
hwloc, but it breaks inside OMPI. The reason is that OMPI doesn't pass
LDFLAGS=-static to hwloc's checks. Inside the vanilla hwloc, the libnuma
related checks properly use the static libnuma:

configure:9786: checking for set_mempolicy in -lnuma
configure:9811: gcc -o conftest -static conftest.c -lnuma -lpthread >&5
/usr/bin/ld: cannot find -lnuma
collect2: ld returned 1 exit status

Inside OMPI, there's no -static so it uses

configure:65582: checking for set_mempolicy in -lnuma
configure:65607: gcc -o conftest -O3 -DNDEBUG -finline-functions -fno-strict-aliasing -pthread conftest.c -lnuma -lnsl -lutil -lm >&5
configure:65607: $? = 0
configure:65616: result: yes

So I think I am passing the ball to Jeff to look at this :)

But there's something I am not sure about here:
Inside OMPI, passing LDFLAGS=-static seems to mean that "we want to
build static libs but they can depend on dynamic libs". Inside hwloc, it
means "we want fully static binaries (with no dynamic dependencies)". Is
one considered "more standard" than the other?

If OMPI is right, is there a way to pass -all-static to libtool at
configure time? (putting it inside LDFLAGS breaks configure). If yes, we
could try to detect this flag in the hwloc configure and adapt our
checks. But I am not sure I want to go there...


Le 25/07/2011 23:56, Shamis, Pavel a écrit :
> Hello,
> I have been trying to compile Open MPI (trunk) static version with hwloc, the last is enabled by default in trunk.
> The build platform is AMD machine, that has dynamic libnuma version only.
> Problem:
> Open MPI fails to link orted, because it can't find static version of libnuma.
> Workaround:
> add --without-hwloc
> Real solution:
> Is it a way to keep hwloc enabled when static libnuma isn't presented on the system ? If it's a such way, I would like to know how to enable it.
> Otherwise, I think configure script should handle such scenario, it means disable hwloc and enable some other alternative.
> Regards,
> Pavel (Pasha) Shamis
> ---
> Application Performance Tools Group
> Computer Science and Math Division
> Oak Ridge National Laboratory
> _______________________________________________
> devel mailing list
> devel_at_[hidden]