I think you hit the nail on the head -- we typo'ed the macro name in the C 
code.  Doh!

If you can confirm that this fixes the issue for you, please commit and CMR.

Thank you for tracking this down!


On Aug 20, 2013, at 11:06 AM, Steve Wise <sw...@opengridcomputing.com> wrote:

> So is this the correct fix?
> 
> [root@r9 ompi-trunk]# svn diff
> Index: ompi/mca/btl/openib/btl_openib_component.c
> ===================================================================
> --- ompi/mca/btl/openib/btl_openib_component.c  (revision 29050)
> +++ ompi/mca/btl/openib/btl_openib_component.c  (working copy)
> @@ -716,7 +716,7 @@
>             return OMPI_ERR_NOT_FOUND;
>         }
> 
> -#if defined(HAVE_IBV_LINK_LAYER_ETHERNET)
> +#if defined(HAVE_DECL_IBV_LINK_LAYER_ETHERNET)
>         if (IBV_LINK_LAYER_ETHERNET == ib_port_attr->link_layer) {
>             subnet_id = mca_btl_openib_get_ip_subnet_id(device->ib_dev,
>                                                            port_num);
> Index: ompi/mca/btl/openib/btl_openib.c
> ===================================================================
> --- ompi/mca/btl/openib/btl_openib.c    (revision 29050)
> +++ ompi/mca/btl/openib/btl_openib.c    (working copy)
> @@ -444,7 +444,7 @@
> #ifdef HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE
>     switch(openib_btl->device->ib_dev->transport_type) {
>         case IBV_TRANSPORT_IB:
> -#if defined(HAVE_IBV_LINK_LAYER_ETHERNET)
> +#if defined(HAVE_DECL_IBV_LINK_LAYER_ETHERNET)
>             switch(openib_btl->ib_port_attr.link_layer) {
>                 case IBV_LINK_LAYER_ETHERNET:
>                     return MCA_BTL_OPENIB_TRANSPORT_RDMAOE;
> Index: ompi/mca/btl/openib/connect/btl_openib_connect_udcm.c
> ===================================================================
> --- ompi/mca/btl/openib/connect/btl_openib_connect_udcm.c       (revision 
> 29050)
> +++ ompi/mca/btl/openib/connect/btl_openib_connect_udcm.c       (working copy)
> @@ -389,7 +389,7 @@
>        /* If we do not have struct ibv_device.transport_device, then
>           we're in an old version of OFED that is IB only (i.e., no
>           iWarp), so we can safely assume that we can use this CPC. */
> -#if defined(HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE) && 
> defined(HAVE_IBV_LINK_LAYER_ETHERNET)
> +#if defined(HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE) && 
> defined(HAVE_DECL_IBV_LINK_LAYER_ETHERNET)
>        if (BTL_OPENIB_CONNECT_BASE_CHECK_IF_NOT_IB(btl)) {
>            BTL_VERBOSE(("UD CPC only supported on InfiniBand; skipped on 
> %s:%d",
>                         ibv_get_device_name(btl->device->ib_dev),
> Index: ompi/mca/btl/openib/connect/btl_openib_connect_oob.c
> ===================================================================
> --- ompi/mca/btl/openib/connect/btl_openib_connect_oob.c        (revision 
> 29050)
> +++ ompi/mca/btl/openib/connect/btl_openib_connect_oob.c        (working copy)
> @@ -127,7 +127,7 @@
>        IB (this CPC will not work with iWarp).  If we do not have the
>        transport_type member, then we must be < OFED v1.2, and
>        therefore we must be IB. */
> -#if defined(HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE) && 
> defined(HAVE_IBV_LINK_LAYER_ETHERNET)
> +#if defined(HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE) && 
> defined(HAVE_DECL_IBV_LINK_LAYER_ETHERNET)
>     if (BTL_OPENIB_CONNECT_BASE_CHECK_IF_NOT_IB(btl)) {
>         opal_output_verbose(5, ompi_btl_base_framework.framework_output,
>                             "openib BTL: oob CPC only supported on 
> InfiniBand; skipped on  %s:%d",
> Index: ompi/mca/common/verbs/common_verbs_find_ports.c
> ===================================================================
> --- ompi/mca/common/verbs/common_verbs_find_ports.c     (revision 29050)
> +++ ompi/mca/common/verbs/common_verbs_find_ports.c     (working copy)
> @@ -170,7 +170,7 @@
>     }
> }
> 
> -#if defined(HAVE_IBV_LINK_LAYER_ETHERNET)
> +#if defined(HAVE_DECL_IBV_LINK_LAYER_ETHERNET)
> static const char *link_layer_to_str(int link_type)
> {
>     switch(link_type) {
> @@ -417,7 +417,7 @@
>                 /* If they specified neither link layer, then we want this 
> port */
>                 want = true;
>             }
> -#if defined(HAVE_IBV_LINK_LAYER_ETHERNET)
> +#if defined(HAVE_DECL_IBV_LINK_LAYER_ETHERNET)
>             else if (flags & OMPI_COMMON_VERBS_FLAGS_LINK_LAYER_IB) {
>                 if (IBV_LINK_LAYER_INFINIBAND == port_attr.link_layer) {
>                     want = true;
> 
> 
> 
>> -----Original Message-----
>> From: devel [mailto:devel-boun...@open-mpi.org] On Behalf Of Steve Wise
>> Sent: Tuesday, August 20, 2013 9:25 AM
>> To: 'Open MPI Developers'; 'Jeff Squyres (jsquyres)'
>> Cc: 'Indranil Choudhury'
>> Subject: Re: [OMPI devel] openmpi-1.7.2 fails to use the RDMACM CPC
>> 
>> 
>> Ah:
>> 
>> Here's the config.log:
>> 
>> configure:133950: checking whether IBV_LINK_LAYER_ETHERNET is declared
>> configure:133950: gcc -std=gnu99 -c -g -Wall -Wundef -Wno-long-long 
>> -Wsign-compare
>> -Wmissing-prototypes -Wstrict-prototypes -Wcomment -pedantic 
>> -Werror-implicit-function-declaration
>> -finline-functions -fno-strict-aliasing -pthread
>> -I/usr/local/src/ompi-trunk/opal/mca/hwloc/hwloc152/hwloc/include
>> -I/usr/local/src/ompi-trunk/opal/mca/event/libevent2021/libevent
>> -I/usr/local/src/ompi-trunk/opal/mca/event/libevent2021/libevent/include  
>> conftest.c >&5
>> conftest.c:611: warning: function declaration isn't a prototype
>> configure:133950: $? = 0
>> configure:133950: result: yes
>> 
>> And I see it in opal_config.h:
>> 
>> /* Define to 1 if you have the declaration of `IBV_LINK_LAYER_ETHERNET', and
>>   to 0 if you don't. */
>> #define HAVE_DECL_IBV_LINK_LAYER_ETHERNET 1
>> 
>> Note the #define is HAVE_DECL_IBV_LINK_LAYER_ETHERNET but the code is 
>> checking for
>> HAVE_IBV_LINK_LAYER_ETHERNET!
>> 
>> No _DECL_...
>> 
>> 
>> 
>>> -----Original Message-----
>>> From: devel [mailto:devel-boun...@open-mpi.org] On Behalf Of Steve Wise
>>> Sent: Tuesday, August 20, 2013 9:07 AM
>>> To: 'Jeff Squyres (jsquyres)'
>>> Cc: 'Open MPI Developers'; 'Indranil Choudhury'
>>> Subject: Re: [OMPI devel] openmpi-1.7.2 fails to use the RDMACM CPC
>>> 
>>> 
>>> 
>>>> -----Original Message-----
>>>> From: Jeff Squyres (jsquyres) [mailto:jsquy...@cisco.com]
>>>> Sent: Tuesday, August 20, 2013 8:59 AM
>>>> To: Steve Wise
>>>> Cc: Open MPI Developers; Indranil Choudhury
>>>> Subject: Re: [OMPI devel] openmpi-1.7.2 fails to use the RDMACM CPC
>>>> 
>>>> On Aug 20, 2013, at 9:51 AM, Steve Wise <sw...@opengridcomputing.com> 
>>>> wrote:
>>>> 
>>>>> I checked in the correct fix,
>>>> 
>>>> Er, no.  Please re-read my email -- your fix was incorrect (you're 
>>>> overriding the output of an
>> AC
>>> macro).
>>>> :-)
>>>> 
>>> 
>>> What is the correct fix then?  I've never worked with any of this AC 
>>> stuff...
>>> 
>>> With the existing code (prior to my broken fix), 
>>> HAVE_IBV_LINK_LAYER_ETHERNET does not get
>> defined.
>>> Yet the enum and the link_type field are in verbs.h...
>>> 
>>> Thanks.
>>> 
>>> 
>>> _______________________________________________
>>> devel mailing list
>>> de...@open-mpi.org
>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>> 
>> _______________________________________________
>> devel mailing list
>> de...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
> 


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/

Reply via email to