diff --git a/ompi/mca/btl/mx/btl_mx_component.c b/ompi/mca/btl/mx/btl_mx_component.c index 2c5fceb626..e54293a262 100644 --- a/ompi/mca/btl/mx/btl_mx_component.c +++ b/ompi/mca/btl/mx/btl_mx_component.c @@ -75,6 +75,8 @@ mca_btl_mx_component_t mca_btl_mx_component = { int mca_btl_mx_component_open(void) { + int tmp; + /* initialize state */ mca_btl_mx_component.mx_num_btls = 0; mca_btl_mx_component.mx_btls = NULL; @@ -122,25 +124,30 @@ int mca_btl_mx_component_open(void) mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_mx_component, "exclusivity", "Priority compared with the others devices (used only when several devices are available", - false, false, 50, (int*)&mca_btl_mx_module.super.btl_exclusivity ); + false, false, 50, (int*) &mca_btl_mx_module.super.btl_exclusivity ); mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_mx_component, "first_frag_size", "Size of the first fragment for the rendez-vous protocol over MX", - true, true, 16*1024 - 20, (int*)&mca_btl_mx_module.super.btl_eager_limit ); + true, true, 16*1024 - 20, &tmp); + mca_btl_mx_module.super.btl_eager_limit = tmp; mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_mx_component, "min_send_size", "Minimum send fragment size ...", - false, false, 32*1024 - 40, (int*)&mca_btl_mx_module.super.btl_min_send_size ); + false, false, 32*1024 - 40, &tmp); + mca_btl_mx_module.super.btl_min_send_size = tmp; mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_mx_component, "max_send_size", "Maximum send fragment size withour RDMA ...", - false, false, 128*1024, (int*)&mca_btl_mx_module.super.btl_max_send_size ); + false, false, 128*1024, &tmp); + mca_btl_mx_module.super.btl_max_send_size = tmp; mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_mx_component, "min_rdma_size", "Minimum size of fragment for the RDMA protocol", - false, false, 1024*1024, (int*)&mca_btl_mx_module.super.btl_min_rdma_size ); + false, false, 1024*1024, &tmp); + mca_btl_mx_module.super.btl_min_rdma_size = tmp; mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_mx_component, "max_rdma_size", "Maximum size of fragment for the RDMA protocol", - false, false, 1024*1024, (int*)&mca_btl_mx_module.super.btl_max_rdma_size ); + false, false, 1024*1024, &tmp); + mca_btl_mx_module.super.btl_max_rdma_size = tmp; mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_mx_component, "flags", "Flags to activate/deactivate the RDMA", - true, false, MCA_BTL_FLAGS_PUT, (int*)&mca_btl_mx_module.super.btl_max_rdma_size ); + true, false, MCA_BTL_FLAGS_PUT, (int*)&mca_btl_mx_module.super.btl_flags ); return OMPI_SUCCESS; } diff --git a/ompi/mca/btl/self/btl_self_component.c b/ompi/mca/btl/self/btl_self_component.c index e605dca6f0..ecc842a852 100644 --- a/ompi/mca/btl/self/btl_self_component.c +++ b/ompi/mca/btl/self/btl_self_component.c @@ -79,6 +79,8 @@ mca_btl_self_component_t mca_btl_self_component = { int mca_btl_self_component_open(void) { + int tmp; + /* register SELF component parameters */ mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "free_list_num", "Number of fragments by default", false, false, @@ -91,19 +93,24 @@ int mca_btl_self_component_open(void) 32, &mca_btl_self_component.free_list_inc ); mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "eager_limit", "Eager size fragmeng (before the rendez-vous ptotocol)", false, false, - 128 * 1024, (int*)&mca_btl_self.btl_eager_limit ); + 128 * 1024, &tmp); + mca_btl_self.btl_eager_limit = tmp; mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "min_send_size", "Minimum fragment size after the rendez-vous", false, false, - 256 * 1024, (int*)&mca_btl_self.btl_min_send_size ); + 256 * 1024, &tmp); + mca_btl_self.btl_min_send_size = tmp; mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "max_send_size", "Maximum fragment size after the rendez-vous", false, false, - 256 * 1024, (int*)&mca_btl_self.btl_max_send_size ); + 256 * 1024, &tmp); + mca_btl_self.btl_max_send_size = tmp; mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "min_rdma_size", "Maximum fragment size for the RDMA transfer", false, false, - INT_MAX, (int*)&mca_btl_self.btl_min_rdma_size ); + INT_MAX, &tmp); + mca_btl_self.btl_min_rdma_size = tmp; mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "max_rdma_size", "Maximum fragment size for the RDMA transfer", false, false, - INT_MAX, (int*)&mca_btl_self.btl_max_rdma_size ); + INT_MAX, &tmp); + mca_btl_self.btl_max_rdma_size = tmp; mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "exclusivity", "Device exclusivity", false, false, MCA_BTL_EXCLUSIVITY_HIGH, (int*)&mca_btl_self.btl_exclusivity );