Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Brian Barrett (brbarret_at_[hidden])
Date: 2006-03-17 10:33:35

On Mar 17, 2006, at 10:17 AM, Greg Watson wrote:

> I'm building OMPI 1.0.2a9 on a bproc machine (Yellow Dog Linux 4.0/
> ppc). It just has an ethernet interface, no fancy network.
> I've tried configuring as follows:
> ./configure --enable-static --disable-shared --without-threads --with-
> devel-headers
> and
> ./configure --enable-static --disable-shared --without-threads --
> without-mpi-threads --with-devel-headers

The second one should be --disable-mpi-threads, but it really doesn't
matter - specifying --without-threads will automatically disable mpi
threads. So these are both correct for what you are trying to do.
Clearly, however, something else is going on :/.

> In both cases, I'm still seeing the thread library linked in the
> final executable:
> $ mpicc -o testmpi testmpi.c
> $ ldd testmpi
> => /lib/ (0x0f590000)
> => /lib/ (0x0e850000)
> => /lib/ (0x0fdc0000)
> => /usr/lib/ (0x0fe50000)
> => /lib/tls/ (0x0fc40000)
> => /lib/tls/ (0x0f660000)
> => /lib/tls/ (0x30013000)
> => /lib/tls/ (0x0fe70000)
> /lib/ => /lib/ (0x0ffd0000)
> $

What does "mpicc -showme" show? If it includes something like -
pthread or -lpthread, can you send the config.log file from Open MPI?

Since ldd doesn't list the OMPI libraries as dependencies, it's a
pretty good assumption that they were statically linked in (so at
least the --disable-shared part worked). Therefore, if mpicc doesn't
explicitly list -pthread or -lpthread, then the dependency is coming
from one of two places. Either the compiler is explicitly adding -
lpthread anyway (unlikely) or one of the other libraries that we
added a -l for does depend on pthreads for some reason. I can't
think off hand what we might add to cause this, so it might mean
searching through the list of libraries with ldd to see if one of
them includes a dependency on /lib/tls/

> Checking ompi_config.h shows:
> #define HAVE_PTHREAD_H 1
> If anyone can tell me what I'm doing wrong, it would be appreciated.
> I need to get this working for a demo on Monday.

That looks like Open MPI's configure script disabled threads
support. The HAVE_PTHREAD_H should not be used to figure out if we
should use pthread support or not - it's only given to indicate
whether pthread.h exists as a useable header file.


   Brian Barrett
   Open MPI developer