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: [OMPI devel] Adding a BTL module implementing poll()
From: Alex Margolin (alex.margolin_at_[hidden])
Date: 2010-10-31 04:54:14


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 Makefile.am 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): ./autogen.sh ; ./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/libopen-pal.la -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/libopen-pal.so -ldl -lnsl -lutil -lm -pthread
-Wl,-rpath -Wl,/home/alex/huji/mpi/lib
../../../opal/.libs/libopen-pal.so: 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