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-
> ./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
> libutil.so.1 => /lib/libutil.so.1 (0x0f590000)
> libnsl.so.1 => /lib/libnsl.so.1 (0x0e850000)
> libdl.so.2 => /lib/libdl.so.2 (0x0fdc0000)
> libbproc.so.4 => /usr/lib/libbproc.so.4 (0x0fe50000)
> libpthread.so.0 => /lib/tls/libpthread.so.0 (0x0fc40000)
> librt.so.1 => /lib/tls/librt.so.1 (0x0f660000)
> libm.so.6 => /lib/tls/libm.so.6 (0x30013000)
> libc.so.6 => /lib/tls/libc.so.6 (0x0fe70000)
> /lib/ld.so.1 => /lib/ld.so.1 (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/libpthread.so.
> Checking ompi_config.h shows:
> #define HAVE_PTHREAD_H 1
> #define OMPI_ENABLE_MPI_THREADS 0
> #define OMPI_ENABLE_PROGRESS_THREADS 0
> #define OMPI_HAVE_POSIX_THREADS 0
> #define OMPI_HAVE_SOLARIS_THREADS 0
> #define OMPI_THREADS_HAVE_DIFFERENT_PIDS 0
> 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.
Open MPI developer