Please note Open MPI standards state that for .m4 files, you need to always define preprocessor macros that are used for logical tests -- it is not sufficient to #define them or not. Instead, always define them to 0 or 1 (which would have made much of the original patch be valid).
Please update; thanks. On Mar 2, 2014, at 10:41 PM, <svn-commit-mai...@open-mpi.org> wrote: > Author: vasily (Vasily Philipov) > Date: 2014-03-03 01:41:46 EST (Mon, 03 Mar 2014) > New Revision: 30905 > URL: https://svn.open-mpi.org/trac/ompi/changeset/30905 > > Log: > OPENIB BTL/CONNECT: warning fixes caused by r30875. > > Text files modified: > trunk/ompi/mca/btl/openib/configure.m4 | 3 ++ > > trunk/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c | 52 > ++++++++++++++++++++-------------------- > 2 files changed, 29 insertions(+), 26 deletions(-) > > Modified: trunk/ompi/mca/btl/openib/configure.m4 > ============================================================================== > --- trunk/ompi/mca/btl/openib/configure.m4 Sat Mar 1 22:48:56 2014 > (r30904) > +++ trunk/ompi/mca/btl/openib/configure.m4 2014-03-03 01:41:46 EST (Mon, > 03 Mar 2014) (r30905) > @@ -102,6 +102,9 @@ > ], > [ AC_MSG_RESULT([no]) > AC_MSG_WARN([rsockets does not support keepalives. > librdmacm 1.0.18 or beyond is needed.]) > + ], > + [ > + AC_MSG_WARN([cross compiling detected - disable IB > addressing support in RDMACM openib BTL.]) > ] > ) > LDFLAGS="$LDFLAGS_save" > > Modified: trunk/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c > ============================================================================== > --- trunk/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c Sat Mar > 1 22:48:56 2014 (r30904) > +++ trunk/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c > 2014-03-03 01:41:46 EST (Mon, 03 Mar 2014) (r30905) > @@ -58,7 +58,7 @@ > #include "btl_openib_ip.h" > #include "btl_openib_ini.h" > > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > #include <infiniband/ib.h> > #endif > > @@ -89,7 +89,7 @@ > /* Dummy QP only used when we expect the connection to be > rejected */ > struct ibv_cq *dummy_cq; > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > union ibv_gid gid; > uint64_t service_id; > #else > @@ -123,7 +123,7 @@ > typedef struct { > int device_max_qp_rd_atom; > int device_max_qp_init_rd_atom; > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > uint8_t gid[16]; > uint64_t service_id; > #else > @@ -161,7 +161,7 @@ > > typedef struct { > uint32_t rem_index; > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > uint64_t rem_port; > #else > uint16_t rem_port; > @@ -233,7 +233,7 @@ > contents->endpoint = NULL; > contents->openib_btl = NULL; > contents->dummy_cq = NULL; > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > contents->service_id = 0; > #else > contents->ipaddr = 0; > @@ -355,7 +355,7 @@ > */ > static mca_btl_openib_endpoint_t *rdmacm_find_endpoint(rdmacm_contents_t > *contents, > struct rdma_cm_id *id, > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > uint64_t rem_port) > #else > uint16_t rem_port) > @@ -366,7 +366,7 @@ > opal_pointer_array_t *endpoints = contents->openib_btl->device->endpoints; > > struct sockaddr *peeraddr = rdma_get_peer_addr(id); > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > union ibv_gid *ep_gid, peer_gid; > memcpy(peer_gid.raw, ((struct sockaddr_ib *) peeraddr)->sib_addr.sib_raw, > sizeof peer_gid); > #else > @@ -401,7 +401,7 @@ > #endif > #endif > > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > ep_gid = (union ibv_gid *) message->gid; > if (ep_gid->global.interface_id == peer_gid.global.interface_id && > ep_gid->global.subnet_prefix == peer_gid.global.subnet_prefix && > @@ -546,7 +546,7 @@ > * node), then the process with the lower TCP port wins. > */ > static bool i_initiate(uint64_t local_port, uint64_t remote_port, > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > union ibv_gid *local_gid, union ibv_gid *remote_gid) > { > #else > @@ -558,7 +558,7 @@ > #endif > #endif > > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > if (local_gid->global.subnet_prefix < remote_gid->global.subnet_prefix || > (local_gid->global.subnet_prefix == remote_gid->global.subnet_prefix > && > local_gid->global.interface_id < remote_gid->global.interface_id) || > @@ -590,7 +590,7 @@ > return false; > } > > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > static int get_rdma_addr(char *src, char *dst, > struct rdma_addrinfo **rdma_addr, > int server) > @@ -641,7 +641,7 @@ > { > int rc; > id_context_t *context; > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > char src_addr[32], dst_addr[32]; > struct rdma_addrinfo *rdma_addr; > #else > @@ -738,7 +738,7 @@ > */ > OBJ_RETAIN(context); > opal_list_append(&(contents->ids), &(context->super)); > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > if (NULL == inet_ntop(AF_INET6, contents->gid.raw, > src_addr, sizeof src_addr)) { > BTL_ERROR(("local addr string creating fail")); > @@ -760,7 +760,7 @@ > ((struct sockaddr_ib *) (rdma_addr->ai_dst_addr))->sib_sid = > message->service_id; > #endif > rc = rdma_resolve_addr(context->id, > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > rdma_addr->ai_src_addr, > rdma_addr->ai_dst_addr, > #else > @@ -770,12 +770,12 @@ > rdmacm_resolve_timeout); > if (0 != rc) { > BTL_ERROR(("Failed to resolve the remote address with %d", rc)); > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > rdma_freeaddrinfo(rdma_addr); > #endif > goto out1; > } > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > rdma_freeaddrinfo(rdma_addr); > #endif > > @@ -852,7 +852,7 @@ > * is being connected from, in the case where there are multiple > * listeners on the local system. > */ > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > memcpy(contents->gid.raw, local_message->gid, sizeof(contents->gid)); > contents->service_id = local_message->service_id; > #else > @@ -864,7 +864,7 @@ > be rejected? */ > endpoint->endpoint_initiator = > i_initiate( > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > contents->service_id, message->service_id, > &contents->gid, (union ibv_gid *) message->gid); > #else > @@ -969,7 +969,7 @@ > private_data_t msg; > int rc = -1, qpnum; > uint32_t rem_index; > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > uint64_t rem_port; > #else > uint16_t rem_port; > @@ -1005,7 +1005,7 @@ > message = (modex_message_t *) > endpoint->endpoint_remote_cpc_data->cbm_modex_message; > endpoint->endpoint_initiator = > i_initiate( > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > contents->service_id, rem_port, > &contents->gid, (union ibv_gid *) message->gid); > #else > @@ -1609,7 +1609,7 @@ > > msg.qpnum = context->qpnum; > msg.rem_index = contents->endpoint->index; > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > msg.rem_port = contents->service_id; > #else > msg.rem_port = contents->tcp_port; > @@ -1995,7 +1995,7 @@ > message->device_max_qp_init_rd_atom = > openib_btl->device->ib_dev_attr.max_qp_init_rd_atom; > > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > memcpy(message->gid, server->gid.raw, sizeof(server->gid)); > message->service_id = server->service_id; > #else > @@ -2027,7 +2027,7 @@ > id_context_t *context; > rdmacm_contents_t *server = NULL; > > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > char rdmacm_addr_str[32]; > struct rdma_addrinfo *rdma_addr; > #else > @@ -2117,7 +2117,7 @@ > * port or one specified by a comand arg. > */ > rc = rdma_bind_addr(context->id, > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > rdma_addr->ai_src_addr); > #else > (struct sockaddr *)&sin); > @@ -2126,12 +2126,12 @@ > opal_output_verbose(5, ompi_btl_base_framework.framework_output, > "openib BTL: rdmacm CPC unable to bind to > address"); > rc = OMPI_ERR_UNREACH; > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > rdma_freeaddrinfo(rdma_addr); > #endif > goto out5; > } > -#if BTL_OPENIB_RDMACM_IB_ADDR > +#if defined(BTL_OPENIB_RDMACM_IB_ADDR) > server->service_id = ((struct sockaddr_ib *) > (&context->id->route.addr.src_addr))->sib_sid; > rdma_freeaddrinfo(rdma_addr); > #else > _______________________________________________ > svn-full mailing list > svn-f...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/svn-full -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/