From 3c170c410c36186f2ff4898f2c83eb95e6f9bbcb Mon Sep 17 00:00:00 2001 From: Tim Woodall Date: Wed, 21 Dec 2005 15:11:40 +0000 Subject: [PATCH] changes required by dr This commit was SVN r8580. --- ompi/mca/bml/base/bml_base_endpoint.c | 27 ++++++++++++++------------- ompi/mca/bml/bml.h | 15 ++++++++------- ompi/mca/bml/r2/bml_r2.c | 5 +++++ 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/ompi/mca/bml/base/bml_base_endpoint.c b/ompi/mca/bml/base/bml_base_endpoint.c index ba5af81824..c833959d9a 100644 --- a/ompi/mca/bml/base/bml_base_endpoint.c +++ b/ompi/mca/bml/base/bml_base_endpoint.c @@ -25,25 +25,26 @@ -static void mca_bml_base_endpoint_construct(mca_bml_base_endpoint_t* proc) +static void mca_bml_base_endpoint_construct(mca_bml_base_endpoint_t* ep) { - proc->btl_proc = NULL; - proc->btl_rdma_offset = 0; - proc->btl_flags = 0; + ep->btl_proc = NULL; + ep->btl_rdma_offset = 0; + ep->btl_max_send_size = 0; + ep->btl_flags = 0; - OBJ_CONSTRUCT(&proc->btl_lock, opal_mutex_t); - OBJ_CONSTRUCT(&proc->btl_eager, mca_bml_base_btl_array_t); - OBJ_CONSTRUCT(&proc->btl_send, mca_bml_base_btl_array_t); - OBJ_CONSTRUCT(&proc->btl_rdma, mca_bml_base_btl_array_t); + OBJ_CONSTRUCT(&ep->btl_lock, opal_mutex_t); + OBJ_CONSTRUCT(&ep->btl_eager, mca_bml_base_btl_array_t); + OBJ_CONSTRUCT(&ep->btl_send, mca_bml_base_btl_array_t); + OBJ_CONSTRUCT(&ep->btl_rdma, mca_bml_base_btl_array_t); } -static void mca_bml_base_endpoint_destruct(mca_bml_base_endpoint_t* proc) +static void mca_bml_base_endpoint_destruct(mca_bml_base_endpoint_t* ep) { - OBJ_DESTRUCT(&proc->btl_lock); - OBJ_DESTRUCT(&proc->btl_eager); - OBJ_DESTRUCT(&proc->btl_send); - OBJ_DESTRUCT(&proc->btl_rdma); + OBJ_DESTRUCT(&ep->btl_lock); + OBJ_DESTRUCT(&ep->btl_eager); + OBJ_DESTRUCT(&ep->btl_send); + OBJ_DESTRUCT(&ep->btl_rdma); } diff --git a/ompi/mca/bml/bml.h b/ompi/mca/bml/bml.h index 36535e9687..734e832ab6 100644 --- a/ompi/mca/bml/bml.h +++ b/ompi/mca/bml/bml.h @@ -204,13 +204,14 @@ static inline mca_bml_base_btl_t* mca_bml_base_btl_array_find( */ struct mca_bml_base_endpoint_t { mca_pml_proc_t super; - struct ompi_proc_t *btl_proc; /**< back-pointer to ompi_proc_t */ - opal_mutex_t btl_lock; /**< lock to protect against concurrent access */ - int btl_flags; /**< prefered method of accessing this peer */ - size_t btl_rdma_offset; /**< max of min rdma size for available rmda btls */ - mca_bml_base_btl_array_t btl_eager; /**< array of btls to use for first fragments */ - mca_bml_base_btl_array_t btl_send; /**< array of btls to use for remaining fragments */ - mca_bml_base_btl_array_t btl_rdma; /**< array of btls that support (prefer) rdma */ + struct ompi_proc_t *btl_proc; /**< back-pointer to ompi_proc_t */ + opal_mutex_t btl_lock; /**< lock to protect against concurrent access */ + int btl_flags; /**< prefered method of accessing this peer */ + size_t btl_rdma_offset; /**< max of min rdma size for available rmda btls */ + size_t btl_max_send_size; /**< min of max send size for available send btls */ + mca_bml_base_btl_array_t btl_eager; /**< array of btls to use for first fragments */ + mca_bml_base_btl_array_t btl_send; /**< array of btls to use for remaining fragments */ + mca_bml_base_btl_array_t btl_rdma; /**< array of btls that support (prefer) rdma */ }; typedef struct mca_bml_base_endpoint_t mca_bml_base_endpoint_t; diff --git a/ompi/mca/bml/r2/bml_r2.c b/ompi/mca/bml/r2/bml_r2.c index 57d56b2073..c8c0b1c5f4 100644 --- a/ompi/mca/bml/r2/bml_r2.c +++ b/ompi/mca/bml/r2/bml_r2.c @@ -248,6 +248,7 @@ int mca_bml_r2_add_procs( mca_bml_base_btl_array_reserve(&bml_endpoint->btl_eager, mca_bml_r2.num_btl_modules); mca_bml_base_btl_array_reserve(&bml_endpoint->btl_send, mca_bml_r2.num_btl_modules); mca_bml_base_btl_array_reserve(&bml_endpoint->btl_rdma, mca_bml_r2.num_btl_modules); + bml_endpoint->btl_max_send_size = -1; bml_endpoint->btl_proc = proc; proc->proc_pml = (struct mca_pml_proc_t*) bml_endpoint; @@ -368,6 +369,10 @@ int mca_bml_r2_add_procs( *bml_btl_new = *bml_btl; } + /* set endpoint max send size as min of available btls */ + if(bml_endpoint->btl_max_send_size > btl->btl_max_send_size) + bml_endpoint->btl_max_send_size = btl->btl_max_send_size; + /* check flags - is rdma prefered */ if(btl->btl_flags & (MCA_BTL_FLAGS_PUT|MCA_BTL_FLAGS_GET) && proc->proc_arch == ompi_proc_local_proc->proc_arch) {