1
1

* use a temporary to avoid passing pointers to size_t-sized structures into

the mca param functions, which expect poinrters to integers

This commit was SVN r11262.
Этот коммит содержится в:
Brian Barrett 2006-08-18 21:36:07 +00:00
родитель ee04e04dd0
Коммит 943e7dcfba
2 изменённых файлов: 26 добавлений и 12 удалений

Просмотреть файл

@ -75,6 +75,8 @@ mca_btl_mx_component_t mca_btl_mx_component = {
int mca_btl_mx_component_open(void) int mca_btl_mx_component_open(void)
{ {
int tmp;
/* initialize state */ /* initialize state */
mca_btl_mx_component.mx_num_btls = 0; mca_btl_mx_component.mx_num_btls = 0;
mca_btl_mx_component.mx_btls = NULL; mca_btl_mx_component.mx_btls = NULL;
@ -125,22 +127,27 @@ int mca_btl_mx_component_open(void)
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", 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", "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", mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_mx_component, "min_send_size",
"Minimum send fragment 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", mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_mx_component, "max_send_size",
"Maximum send fragment size withour RDMA ...", "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", mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_mx_component, "min_rdma_size",
"Minimum size of fragment for the RDMA protocol", "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", mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_mx_component, "max_rdma_size",
"Maximum size of fragment for the RDMA protocol", "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", mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_mx_component, "flags",
"Flags to activate/deactivate the RDMA", "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; return OMPI_SUCCESS;
} }

Просмотреть файл

@ -79,6 +79,8 @@ mca_btl_self_component_t mca_btl_self_component = {
int mca_btl_self_component_open(void) int mca_btl_self_component_open(void)
{ {
int tmp;
/* register SELF component parameters */ /* register SELF component parameters */
mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "free_list_num", mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "free_list_num",
"Number of fragments by default", false, false, "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 ); 32, &mca_btl_self_component.free_list_inc );
mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "eager_limit", 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, "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", 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, "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", 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, "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", 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, "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", 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, "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", mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "exclusivity",
"Device exclusivity", false, false, "Device exclusivity", false, false,
MCA_BTL_EXCLUSIVITY_HIGH, (int*)&mca_btl_self.btl_exclusivity ); MCA_BTL_EXCLUSIVITY_HIGH, (int*)&mca_btl_self.btl_exclusivity );