Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] undefined references for rdma_get_peer_addr & rdma_get_local_addr
From: Steve Wise (swise_at_[hidden])
Date: 2008-05-04 11:10:45


This probably has to do with the fact that rdma_get_peer_addr() is a
static inline in /usr/include/rdma/rdma_cma.h. So if you don't include
that file in the test program, then you won't get rdma_get_peer_addr()
even if you link with librdmacm.so

Steve.

Jeff Squyres wrote:
> Jon / Steve -- can you comment?
>
> I tested with OFED 1.2.5 (which is what I assume you meant) and got:
>
> checking for rdma_get_peer_addr... no
>
> Because that function is not defined in OFED 1.2.5. Running with OFED
> 1.3 (where the function does exist), I get:
>
> checking for rdma_get_peer_addr... yes
>
> Outside of all the configure complexity, can you write a simple
> program that calls that function and have it compile and link properly?
>
> I suppose we could change the AC_COMPILE_IFELSE in config/
> ompi_check_openib.m4 to OMPI_LINK_IFELSE, but I'm a little confused as
> to why it would compile successfully if the symbol rdma_get_peer_addr
> is not declared anywhere (which it shouldn't be in OFED 1.2 or 1.2.5,
> AFAIK)...
>
>
>
> On May 3, 2008, at 10:56 AM, Pak Lui wrote:
>
>> Sure Jeff, see attached.
>>
>> Jeff Squyres wrote:
>>> (moving to devel so that others are aware)
>>> Crud. Can you send me your config.log? I don't know why it's able
>>> to find rdma_get_peer_addr() in configure, but then later not able
>>> to find it during the build - I'd like to see what happened
>>> during configure.
>>> On May 2, 2008, at 7:09 PM, Pak Lui wrote:
>>>> Hi Jeff,
>>>>
>>>> It seems that the cpc3 merge causes my Ranger build to break. I
>>>> believe it is using OFED 1.2 but I don't know how to check. It
>>>> passes the ompi_check_openib.m4 that you added in for the
>>>> rdma_get_peer_addr. Is there a missing #include for openib/ofed
>>>> related somewhere?
>>>>
>>>>
>>>> 1236 checking rdma/rdma_cma.h usability... yes
>>>> 1237 checking rdma/rdma_cma.h presence... yes
>>>> 1238 checking for rdma/rdma_cma.h... yes
>>>> 1239 checking for rdma_create_id in -lrdmacm... yes
>>>> 1240 checking for rdma_get_peer_addr... yes
>>>>
>>>>
>>>> pgCC -DHAVE_CONFIG_H -I. -I../../../../ompi/tools/ompi_info -
>>>> I../../../opal/include -I../../../orte/include -I../../../ompi/
>>>> include -I../../../opal/mca/paffinity/linux/plpa/src/libplpa -
>>>> DOMPI_CONFIGURE_USER="\"paklui\"" -
>>>> DOMPI_CONFIGURE_HOST="\"login4.ranger.tacc.utexas.edu\"" -
>>>> DOMPI_CONFIGURE_DATE="\"Fri May 2 17:07:01 CDT 2008\"" -
>>>> DOMPI_BUILD_USER="\"$USER\"" -DOMPI_BUILD_HOST="\"`hostname`\"" -
>>>> DOMPI_BUILD_DATE="\"`date`\"" -DOMPI_BUILD_CFLAGS="\"-O -DNDEBUG
>>>> \"" -DOMPI_BUILD_CPPFLAGS="\"-I../../../.. -I../../.. -
>>>> I../../../../ opal/include -I../../../../orte/include -
>>>> I../../../../ompi/include - D_REENTRANT\"" -
>>>> DOMPI_BUILD_CXXFLAGS="\"-O -DNDEBUG \"" -
>>>> DOMPI_BUILD_CXXCPPFLAGS="\"-I../../../.. -I../../.. -I../../../../
>>>> opal/include -I../../../../orte/include -I../../../../ompi/
>>>> include - D_REENTRANT\"" -DOMPI_BUILD_FFLAGS="\"\"" -
>>>> DOMPI_BUILD_FCFLAGS="\"\"" -DOMPI_BUILD_LDFLAGS="\" \"" -
>>>> DOMPI_BUILD_LIBS="\"-lnsl -lutil -lpthread\"" -
>>>> DOMPI_CC_ABSOLUTE="\"/opt/apps/pgi/7.1/linux86-64/7.1-2/bin/pgcc
>>>> \"" - DOMPI_CXX_ABSOLUTE="\"/opt/apps/pgi/7.1/linux86-64/7.1-2/bin/
>>>> pgCC\"" -DOMPI_F77_ABSOLUTE="\"/opt/apps/pgi/7.1/linux86-64/7.1-2/
>>>> bin/ pgf77\"" -DOMPI_F90_ABSOLUTE="\"/opt/apps/pgi/7.1/
>>>> linux86-64/7.1-2/ bin/pgf95\"" -DOMPI_F90_BUILD_SIZE="\"small\"" -
>>>> I../../../.. - I../../.. -I../../../../opal/include -I../../../../
>>>> orte/include - I../../../../ompi/include -D_REENTRANT -O -
>>>> DNDEBUG -c -o version.o ../../../../ompi/tools/ompi_info/
>>>> version.cc
>>>> /bin/sh ../../../libtool --tag=CXX --mode=link pgCC -O -DNDEBUG
>>>> - o ompi_info components.o ompi_info.o output.o param.o
>>>> version.o ../../../ompi/libmpi.la -lnsl -lutil -lpthread
>>>> libtool: link: pgCC -O -DNDEBUG -o .libs/ompi_info components.o
>>>> ompi_info.o output.o param.o version.o ../../../ompi/.libs/
>>>> libmpi.so -L/opt/ofed/lib64 -libcm -lrdmacm -libverbs -lrt /share/
>>>> home/00951/paklui/ompi-trunk5/config-data1/orte/.libs/libopen-
>>>> rte.so /share/home/00951/paklui/ompi-trunk5/config-data1/
>>>> opal/.libs/ libopen-pal.so -lnuma -ldl -lnsl -lutil -lpthread -
>>>> Wl,--rpath -Wl,/ share/home/00951/paklui/ompi-trunk5/shared-
>>>> install1/lib
>>>>
>>>> [1] Exit 2 make install >&
>>>> make.install.log.0
>>>> ../../../ompi/.libs/libmpi.so: undefined reference to
>>>> `rdma_get_peer_addr'
>>>> ../../../ompi/.libs/libmpi.so: undefined reference to
>>>> `rdma_get_local_addr'
>>>> make[2]: *** [ompi_info] Error 2
>>>> make[2]: Leaving directory `/share/home/00951/paklui/ompi-trunk5/
>>>> config-data1/ompi/tools/ompi_info'
>>>> make[1]: *** [install-recursive] Error 1
>>>> make[1]: Leaving directory `/share/home/00951/paklui/ompi-trunk5/
>>>> config-data1/ompi'
>>>> make: *** [install-recursive] Error 1
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> - Pak Lui
>>>> pak.lui_at_[hidden]
>>
>> --
>>
>>
>> - Pak Lui
>> pak.lui_at_[hidden]
>> <config.log.bz2><mime-attachment.txt>
>
>