From 8177d91835640535087d547f32696430481309ab Mon Sep 17 00:00:00 2001 From: Eugene Loh Date: Thu, 10 Dec 2009 19:28:39 +0000 Subject: [PATCH] Minor change so that if the number of shared-memory FIFOs is greater than can be used (e.g., number of on-node peers), that no additional room is set aside for those FIFOs that will never be created. This makes it easier to have dedicated FIFOs: just set btl_sm_num_fifos to be very large rather than setting it to be the local number of procs. In practice, we ask for extra headroom anyhow, so this change generally won't matter. This commit was SVN r22291. --- ompi/mca/btl/sm/btl_sm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ompi/mca/btl/sm/btl_sm.c b/ompi/mca/btl/sm/btl_sm.c index cb9f15fe4b..fbc9acbf71 100644 --- a/ompi/mca/btl/sm/btl_sm.c +++ b/ompi/mca/btl/sm/btl_sm.c @@ -213,7 +213,8 @@ static int sm_btl_first_time_init(mca_btl_sm_t *sm_btl, int n) * additions to account for some padding and edge effects that may lie * in the allocator. */ - res.size = m->nfifos * ( sizeof(sm_fifo_t) + sizeof(void *) * m->fifo_size + 4 * CACHE_LINE_SIZE ) + res.size = + FIFO_MAP_NUM(n) * ( sizeof(sm_fifo_t) + sizeof(void *) * m->fifo_size + 4 * CACHE_LINE_SIZE ) + ( 2 * n + m->sm_free_list_inc ) * ( m->eager_limit + 2 * CACHE_LINE_SIZE ) + m->sm_free_list_num * ( m->max_frag_size + 2 * CACHE_LINE_SIZE );