Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] Adding a BTL module implementing poll()
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-11-01 08:30:53

How are you linking in the mos_poll() implementation? Is it up in the BTL?

If so, you'll need to move it down to the OPAL libevent section. This is because all OPAL things are built before any OMPI things, to include some executables (e.g., the opal/tools/wrappers directory). They link against libopen-pal (i.e., the library for OPAL), and don't "see" anything in the upper layers, such as BTLs.

Does that help?

On Oct 31, 2010, at 4:54 AM, Alex Margolin wrote:

> Hi,
> I'm developing a new module under for BTL component to utilize an
> existing distributed computing software in our lab.
> I decided to write a TCP-like interface (implementing socket(),
> connect(), accept(), send(), recv(), etc.) and then copy and modify
> the existing BTL TCP module to create my own. I've also given
> consideration to using LD_PRELOAD, but haven't gotten to it yet.
> Currently, i'm having trouble with the the poll() syscall. Since the
> I'm using other, "non-linux" sockets (no valid FD) with my own poll
> implementation on them, I tried to replace the poll() in
> opal/event/poll.c with a call to my poll in ompi/mca/btl/... and
> failed to build open-mpi.
> Since my poll needs to use the internal data structures of my module,
> I did the following steps:
> 1. Create a sym-link to my .h file in opal/event/
> 2. in poll.c include my .h file and change the poll() syscall to call
> my implementation (same interface).
> 3. in added my .h file under EXTRA_DIST, my .lo file under
> libevent_la_DEPENDENCIES and my module path under ompidir.
> 4. tried to compile (x64): ./ ; ./configure CFLAGS=-m64
> CXXFLAGS=-m64 FFLAGS=-m64 FCFLAGS=-m64 --prefix /home/alex/huji/mpi/ ;
> make ; make install
> 5. failed miserably:
> Making install in tools/wrappers
> make[2]: Entering directory `/home/alex/huji/openmpi-1.4.1/opal/tools/wrappers'
> /bin/sh ../../../libtool --tag=CC --mode=link gcc -O3 -DNDEBUG -m64
> -finline-functions -fno-strict-aliasing -pthread -fvisibility=hidden
> -export-dynamic -o opal_wrapper opal_wrapper.o
> ../../../opal/ -lnsl -lutil -lm
> libtool: link: gcc -O3 -DNDEBUG -m64 -finline-functions
> -fno-strict-aliasing -pthread -fvisibility=hidden -o
> .libs/opal_wrapper opal_wrapper.o -Wl,--export-dynamic
> ../../../opal/.libs/ -ldl -lnsl -lutil -lm -pthread
> -Wl,-rpath -Wl,/home/alex/huji/mpi/lib
> ../../../opal/.libs/ undefined reference to `mos_poll'
> collect2: ld returned 1 exit status
> make[2]: *** [opal_wrapper] Error 1
> make[2]: Leaving directory `/home/alex/huji/openmpi-1.4.1/opal/tools/wrappers'
> make[1]: *** [install-recursive] Error 1
> make[1]: Leaving directory `/home/alex/huji/openmpi-1.4.1/opal'
> make: *** [install-recursive] Error 1
> Can you please help me build open-mpi with my module, or suggest a
> better way to do this?
> Thanks,
> Alex
> _______________________________________________
> devel mailing list
> devel_at_[hidden]

Jeff Squyres
For corporate legal information go to: