From 2a9ab3eb10b75bd4b346bce22b62315186d8a304 Mon Sep 17 00:00:00 2001 From: Tim Woodall Date: Fri, 26 Aug 2005 20:28:42 +0000 Subject: [PATCH] move obj construct back into open This commit was SVN r7057. --- ompi/mca/pml/ob1/pml_ob1.c | 55 ---------------------------- ompi/mca/pml/ob1/pml_ob1_component.c | 50 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 55 deletions(-) diff --git a/ompi/mca/pml/ob1/pml_ob1.c b/ompi/mca/pml/ob1/pml_ob1.c index b5f0ee6ef7..eb5534189f 100644 --- a/ompi/mca/pml/ob1/pml_ob1.c +++ b/ompi/mca/pml/ob1/pml_ob1.c @@ -58,62 +58,7 @@ mca_pml_ob1_t mca_pml_ob1 = { int mca_pml_ob1_enable(bool enable) { -#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT - -#endif - if( false == enable ) return OMPI_SUCCESS; - - OBJ_CONSTRUCT(&mca_pml_ob1.lock, opal_mutex_t); - - /* requests */ - OBJ_CONSTRUCT(&mca_pml_ob1.send_requests, ompi_free_list_t); - ompi_free_list_init( - &mca_pml_ob1.send_requests, - sizeof(mca_pml_ob1_send_request_t), - OBJ_CLASS(mca_pml_ob1_send_request_t), - mca_pml_ob1.free_list_num, - mca_pml_ob1.free_list_max, - mca_pml_ob1.free_list_inc, - NULL); - - OBJ_CONSTRUCT(&mca_pml_ob1.recv_requests, ompi_free_list_t); - ompi_free_list_init( - &mca_pml_ob1.recv_requests, - sizeof(mca_pml_ob1_recv_request_t), - OBJ_CLASS(mca_pml_ob1_recv_request_t), - mca_pml_ob1.free_list_num, - mca_pml_ob1.free_list_max, - mca_pml_ob1.free_list_inc, - NULL); - - /* fragments */ - OBJ_CONSTRUCT(&mca_pml_ob1.rdma_frags, ompi_free_list_t); - ompi_free_list_init( - &mca_pml_ob1.rdma_frags, - sizeof(mca_pml_ob1_rdma_frag_t), - OBJ_CLASS(mca_pml_ob1_rdma_frag_t), - mca_pml_ob1.free_list_num, - mca_pml_ob1.free_list_max, - mca_pml_ob1.free_list_inc, - NULL); - - OBJ_CONSTRUCT(&mca_pml_ob1.recv_frags, ompi_free_list_t); - ompi_free_list_init( - &mca_pml_ob1.recv_frags, - sizeof(mca_pml_ob1_recv_frag_t), - OBJ_CLASS(mca_pml_ob1_recv_frag_t), - mca_pml_ob1.free_list_num, - mca_pml_ob1.free_list_max, - mca_pml_ob1.free_list_inc, - NULL); - - OBJ_CONSTRUCT(&mca_pml_ob1.buffers, ompi_free_list_t); - - /* pending operations */ - OBJ_CONSTRUCT(&mca_pml_ob1.send_pending, opal_list_t); - OBJ_CONSTRUCT(&mca_pml_ob1.recv_pending, opal_list_t); - OBJ_CONSTRUCT(&mca_pml_ob1.acks_pending, opal_list_t); mca_pml_ob1.enabled = true; return OMPI_SUCCESS; } diff --git a/ompi/mca/pml/ob1/pml_ob1_component.c b/ompi/mca/pml/ob1/pml_ob1_component.c index a52401c61f..5987da1bf6 100644 --- a/ompi/mca/pml/ob1/pml_ob1_component.c +++ b/ompi/mca/pml/ob1/pml_ob1_component.c @@ -95,6 +95,56 @@ int mca_pml_ob1_component_open(void) mca_pml_ob1.recv_pipeline_depth = mca_pml_ob1_param_register_int("recv_pipeline_depth", 4); + OBJ_CONSTRUCT(&mca_pml_ob1.lock, opal_mutex_t); + + /* requests */ + OBJ_CONSTRUCT(&mca_pml_ob1.send_requests, ompi_free_list_t); + ompi_free_list_init( + &mca_pml_ob1.send_requests, + sizeof(mca_pml_ob1_send_request_t), + OBJ_CLASS(mca_pml_ob1_send_request_t), + mca_pml_ob1.free_list_num, + mca_pml_ob1.free_list_max, + mca_pml_ob1.free_list_inc, + NULL); + + OBJ_CONSTRUCT(&mca_pml_ob1.recv_requests, ompi_free_list_t); + ompi_free_list_init( + &mca_pml_ob1.recv_requests, + sizeof(mca_pml_ob1_recv_request_t), + OBJ_CLASS(mca_pml_ob1_recv_request_t), + mca_pml_ob1.free_list_num, + mca_pml_ob1.free_list_max, + mca_pml_ob1.free_list_inc, + NULL); + + /* fragments */ + OBJ_CONSTRUCT(&mca_pml_ob1.rdma_frags, ompi_free_list_t); + ompi_free_list_init( + &mca_pml_ob1.rdma_frags, + sizeof(mca_pml_ob1_rdma_frag_t), + OBJ_CLASS(mca_pml_ob1_rdma_frag_t), + mca_pml_ob1.free_list_num, + mca_pml_ob1.free_list_max, + mca_pml_ob1.free_list_inc, + NULL); + + OBJ_CONSTRUCT(&mca_pml_ob1.recv_frags, ompi_free_list_t); + ompi_free_list_init( + &mca_pml_ob1.recv_frags, + sizeof(mca_pml_ob1_recv_frag_t), + OBJ_CLASS(mca_pml_ob1_recv_frag_t), + mca_pml_ob1.free_list_num, + mca_pml_ob1.free_list_max, + mca_pml_ob1.free_list_inc, + NULL); + + OBJ_CONSTRUCT(&mca_pml_ob1.buffers, ompi_free_list_t); + + /* pending operations */ + OBJ_CONSTRUCT(&mca_pml_ob1.send_pending, opal_list_t); + OBJ_CONSTRUCT(&mca_pml_ob1.recv_pending, opal_list_t); + OBJ_CONSTRUCT(&mca_pml_ob1.acks_pending, opal_list_t); mca_base_param_register_int("mpi", NULL, "leave_pinned", "leave_pinned", 0); param = mca_base_param_find("mpi", NULL, "leave_pinned");