Hi,

        * ompi/mca/btl/openib/btl_openib_component.c (init_one_hca):
        mca_btl_openib_open_xrc_domain and
        mca_btl_openib_close_xrc_domain depend on XRC

Fixes the compilation failure as in the head of attached patch.
TIA,
Bernhard
CXX -g -finline-functions -o .libs/ompi_info components.o ompi_info.o output.o param.o version.o -Wl,--export-dynamic  ../../../ompi/.libs/libmpi.so -L/opt/infiniband/lib /opt/infiniband/lib/libibverbs.so -lpthread -lrt /home/bernhard/src/openmpi/ompi-trunk/orte/.libs/libopen-rte.so /home/bernhard/src/openmpi/ompi-trunk/opal/.libs/libopen-pal.so -ldl -lnuma -lnsl -lutil  -Wl,-rpath,/opt/libs//openmpi-1.3.0.a1.r18069-INTEL-10.1.013-64/lib -Wl,-rpath,/opt/infiniband/lib
../../../ompi/.libs/libmpi.so: undefined reference to `mca_btl_openib_close_xrc_domain'
../../../ompi/.libs/libmpi.so: undefined reference to `mca_btl_openib_open_xrc_domain'
make[2]: *** [ompi_info] Error 1

Index: ompi-trunk/ompi/mca/btl/openib/btl_openib_component.c
===================================================================
--- ompi-trunk/ompi/mca/btl/openib/btl_openib_component.c	(revision 18069)
+++ ompi-trunk/ompi/mca/btl/openib/btl_openib_component.c	(working copy)
@@ -1012,12 +1012,14 @@ static int init_one_hca(opal_list_t *btl
         goto error;
     }

+#if HAVE_XRC
     if (MCA_BTL_XRC_ENABLED) {
         if (OMPI_SUCCESS != mca_btl_openib_open_xrc_domain(hca)) {
             BTL_ERROR(("XRC Internal error. Failed to open xrc domain"));
             goto error;
         }
     }
+#endif

     mpool_resources.reg_data = (void*)hca;
     mpool_resources.sizeof_reg = sizeof(mca_btl_openib_reg_t);
@@ -1103,11 +1105,13 @@ error:
 #endif
     if(hca->mpool)
         mca_mpool_base_module_destroy(hca->mpool);
+#if HAVE_XRC
     if (MCA_BTL_XRC_ENABLED) {
         if(OMPI_SUCCESS != mca_btl_openib_close_xrc_domain(hca)) {
             BTL_ERROR(("XRC Internal error. Failed to close xrc domain"));
         }
     }
+#endif
     if(hca->ib_pd)
         ibv_dealloc_pd(hca->ib_pd);
     if(hca->ib_dev_context)

Reply via email to