From 52208d7bf9430332b51e9c2f5457276c45dab956 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Tue, 27 Jun 2006 08:50:12 +0000 Subject: [PATCH] Whe don't need to register zero sized frags. This commit was SVN r10519. --- ompi/mca/btl/openib/btl_openib_component.c | 2 +- ompi/mca/btl/openib/btl_openib_frag.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ompi/mca/btl/openib/btl_openib_component.c b/ompi/mca/btl/openib/btl_openib_component.c index 358cea9a72..09740e6df5 100644 --- a/ompi/mca/btl/openib/btl_openib_component.c +++ b/ompi/mca/btl/openib/btl_openib_component.c @@ -615,7 +615,7 @@ mca_btl_base_module_t** mca_btl_openib_component_init(int *num_btl_modules, mca_btl_openib_component.ib_free_list_num, mca_btl_openib_component.ib_free_list_max, mca_btl_openib_component.ib_free_list_inc, - openib_btl->super.btl_mpool); + NULL); orte_pointer_array_init(&openib_btl->eager_rdma_buffers, mca_btl_openib_component.max_eager_rdma, diff --git a/ompi/mca/btl/openib/btl_openib_frag.c b/ompi/mca/btl/openib/btl_openib_frag.c index b1262c429e..d19b29b558 100644 --- a/ompi/mca/btl/openib/btl_openib_frag.c +++ b/ompi/mca/btl/openib/btl_openib_frag.c @@ -29,13 +29,15 @@ static void mca_btl_openib_frag_common_constructor( mca_btl_openib_frag_t* frag) frag->hdr = (mca_btl_openib_header_t*) (frag+1); /* initialize the btl header to start at end of frag */ frag->segment.seg_addr.pval = ((unsigned char* )frag->hdr) + sizeof(mca_btl_openib_header_t); /* init the segment address to start after the btl header */ - - frag->mr = registration->mr; + + if(registration) { + frag->mr = registration->mr; + frag->segment.seg_key.key32[0] = (uint32_t) frag->mr->lkey; + frag->sg_entry.lkey = frag->mr->lkey; + } frag->segment.seg_len = frag->size; - frag->segment.seg_key.key32[0] = (uint32_t) frag->mr->lkey; frag->sg_entry.addr = (unsigned long) frag->hdr; frag->sg_entry.length = frag->size; - frag->sg_entry.lkey = frag->mr->lkey; frag->base.des_flags = 0; }