Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Gleb Natapov (glebn_at_[hidden])
Date: 2007-10-28 09:13:48


Hi Brian,

  Is there a special reason why you call btl functions directly instead
of using bml wrappers? What about applying this patch?

diff --git a/ompi/mca/osc/rdma/osc_rdma_component.c b/ompi/mca/osc/rdma/osc_rdma_component.c
index 2d0dc06..302dd9e 100644
--- a/ompi/mca/osc/rdma/osc_rdma_component.c
+++ b/ompi/mca/osc/rdma/osc_rdma_component.c
@@ -1044,9 +1044,8 @@ rdma_send_info_send(ompi_osc_rdma_module_t *module,
     ompi_osc_rdma_rdma_info_header_t *header = NULL;
         
     bml_btl = peer_send_info->bml_btl;
- descriptor = bml_btl->btl_alloc(bml_btl->btl,
- MCA_BTL_NO_ORDER,
- sizeof(ompi_osc_rdma_rdma_info_header_t));
+ mca_bml_base_alloc(bml_btl, &descriptor, MCA_BTL_NO_ORDER,
+ sizeof(ompi_osc_rdma_rdma_info_header_t));
     if (NULL == descriptor) {
         ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
         goto cleanup;
diff --git a/ompi/mca/osc/rdma/osc_rdma_data_move.c b/ompi/mca/osc/rdma/osc_rdma_data_move.c
index e9fd17c..e7b5813 100644
--- a/ompi/mca/osc/rdma/osc_rdma_data_move.c
+++ b/ompi/mca/osc/rdma/osc_rdma_data_move.c
@@ -454,10 +454,10 @@ ompi_osc_rdma_sendreq_send(ompi_osc_rdma_module_t *module,
         /* get a buffer... */
         endpoint = (mca_bml_base_endpoint_t*) sendreq->req_target_proc->proc_bml;
         bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager);
- descriptor = bml_btl->btl_alloc(bml_btl->btl,
- MCA_BTL_NO_ORDER,
- module->m_use_buffers ? bml_btl->btl_eager_limit : needed_len < bml_btl->btl_eager_limit ? needed_len :
- bml_btl->btl_eager_limit);
+ mca_bml_base_alloc(bml_btl, &descriptor, MCA_BTL_NO_ORDER,
+ module->m_use_buffers ? bml_btl->btl_eager_limit :
+ needed_len < bml_btl->btl_eager_limit ? needed_len :
+ bml_btl->btl_eager_limit);
         if (NULL == descriptor) {
             ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
             goto cleanup;
@@ -698,9 +698,8 @@ ompi_osc_rdma_replyreq_send(ompi_osc_rdma_module_t *module,
     /* Get a BTL and a fragment to go with it */
     endpoint = (mca_bml_base_endpoint_t*) replyreq->rep_origin_proc->proc_bml;
     bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager);
- descriptor = bml_btl->btl_alloc(bml_btl->btl,
- MCA_BTL_NO_ORDER,
- bml_btl->btl_eager_limit);
+ mca_bml_base_alloc(bml_btl, &descriptor, MCA_BTL_NO_ORDER,
+ bml_btl->btl_eager_limit);
     if (NULL == descriptor) {
         ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
         goto cleanup;
@@ -1260,9 +1259,8 @@ ompi_osc_rdma_control_send(ompi_osc_rdma_module_t *module,
     /* Get a BTL and a fragment to go with it */
     endpoint = (mca_bml_base_endpoint_t*) proc->proc_bml;
     bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager);
- descriptor = bml_btl->btl_alloc(bml_btl->btl,
- MCA_BTL_NO_ORDER,
- sizeof(ompi_osc_rdma_control_header_t));
+ mca_bml_base_alloc(bml_btl, &descriptor, MCA_BTL_NO_ORDER,
+ sizeof(ompi_osc_rdma_control_header_t));
     if (NULL == descriptor) {
         ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
         goto cleanup;
@@ -1322,9 +1320,8 @@ ompi_osc_rdma_rdma_ack_send(ompi_osc_rdma_module_t *module,
     ompi_osc_rdma_control_header_t *header = NULL;
         
     /* Get a BTL and a fragment to go with it */
- descriptor = bml_btl->btl_alloc(bml_btl->btl,
- rdma_btl->rdma_order,
- sizeof(ompi_osc_rdma_control_header_t));
+ mca_bml_base_alloc(bml_btl, &descriptor, rdma_btl->rdma_order,
+ sizeof(ompi_osc_rdma_control_header_t));
     if (NULL == descriptor) {
         ret = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
         goto cleanup;

--
			Gleb.