1
1

convert openib btl to use new mca_param registration.. Also, change rr_buf_min

and rr_buf_max to rd_min and rd_max 

This commit was SVN r7786.
Этот коммит содержится в:
Galen Shipman 2005-10-17 20:00:34 +00:00
родитель c944988b9e
Коммит 3efecaaeda

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

@ -80,24 +80,34 @@ mca_btl_openib_component_t mca_btl_openib_component = {
* utility routines for parameter registration * utility routines for parameter registration
*/ */
static inline char* mca_btl_openib_param_register_string( static inline void mca_btl_openib_param_register_string(
const char* param_name, const char* param_name,
const char* default_value) const char* param_desc,
const char* default_value,
char** out_value)
{ {
char *param_value; mca_base_param_reg_string(&mca_btl_openib_component.super.btl_version,
int id = mca_base_param_register_string("btl","openib",param_name,NULL,default_value); param_name,
mca_base_param_lookup_string(id, &param_value); param_desc,
return param_value; false,
false,
default_value,
out_value);
} }
static inline int mca_btl_openib_param_register_int( static inline void mca_btl_openib_param_register_int(
const char* param_name, const char* param_name,
int default_value) const char* param_desc,
int default_value,
int* out_value)
{ {
int id = mca_base_param_register_int("btl","openib",param_name,NULL,default_value); mca_base_param_reg_int(&mca_btl_openib_component.super.btl_version,
int param_value = default_value; param_name,
mca_base_param_lookup_int(id,&param_value); param_desc,
return param_value; false,
false,
default_value,
out_value);
} }
/* /*
@ -118,97 +128,71 @@ int mca_btl_openib_component_open(void)
OBJ_CONSTRUCT(&mca_btl_openib_component.ib_procs, opal_list_t); OBJ_CONSTRUCT(&mca_btl_openib_component.ib_procs, opal_list_t);
/* register IB component parameters */ /* register IB component parameters */
mca_btl_openib_component.ib_free_list_num = mca_btl_openib_param_register_int ("free_list_num", "intial size of free lists",
mca_btl_openib_param_register_int ("free_list_num", 8); 8, &mca_btl_openib_component.ib_free_list_num);
mca_btl_openib_component.ib_free_list_max = mca_btl_openib_param_register_int ("free_list_max", "maximum size of free lists",
mca_btl_openib_param_register_int ("free_list_max", 1024); 1024, &mca_btl_openib_component.ib_free_list_max);
mca_btl_openib_component.ib_free_list_inc = mca_btl_openib_param_register_int ("free_list_inc", "increment size of free lists",
mca_btl_openib_param_register_int ("free_list_inc", 32); 32, &mca_btl_openib_component.ib_free_list_inc);
mca_btl_openib_component.ib_mpool_name = mca_btl_openib_param_register_string("mpool", "name of the memory pool to be used",
mca_btl_openib_param_register_string("mpool", "openib"); "openib", &mca_btl_openib_component.ib_mpool_name);
mca_btl_openib_component.ib_rr_buf_max = mca_btl_openib_param_register_int("rd_max", "maximum number of receive descriptors to post to a QP",
mca_btl_openib_param_register_int("rr_buf_max", 16); 16, (int*) &mca_btl_openib_component.ib_rr_buf_max);
mca_btl_openib_component.ib_rr_buf_min = mca_btl_openib_param_register_int("rd_min", "minimum number of receive descriptors before reposting occurs",
mca_btl_openib_param_register_int("rr_buf_min", 8); 8, (int*) &mca_btl_openib_component.ib_rr_buf_min);
mca_btl_openib_component.reg_mru_len = mca_btl_openib_param_register_int("reg_mru_len", "length of the registration cache most recently used list",
mca_btl_openib_param_register_int("reg_mru_len", 16); 16, (int*) &mca_btl_openib_component.reg_mru_len);
mca_btl_openib_component.use_srq = mca_btl_openib_param_register_int("use_srq", "if 1 use the IB shared receive queue to post receive descriptors",
mca_btl_openib_param_register_int("use_srq", 0); 0, (int*) &mca_btl_openib_component.use_srq);
mca_btl_openib_param_register_int("ib_cq_size", "size of the IB completion queue",
mca_btl_openib_component.ib_cq_size = 500, (int*) &mca_btl_openib_component.ib_cq_size);
mca_btl_openib_param_register_int("ib_cq_size", mca_btl_openib_param_register_int("ib_wq_size", "size of the IB work queue",
500); 500, (int*) &mca_btl_openib_component.ib_wq_size);
mca_btl_openib_component.ib_wq_size = mca_btl_openib_param_register_int("ib_sg_list_size", "size of IB segment list",
mca_btl_openib_param_register_int("ib_wq_size", 1, (int*) &mca_btl_openib_component.ib_sg_list_size);
500); mca_btl_openib_param_register_int("ib_pkey_ix", "IB pkey index",
mca_btl_openib_component.ib_sg_list_size = 0, (int*) &mca_btl_openib_component.ib_pkey_ix);
mca_btl_openib_param_register_int("ib_sg_list_size", mca_btl_openib_param_register_int("ib_psn", "IB Packet sequence starting number",
1); 0, (int*) &mca_btl_openib_component.ib_psn);
mca_btl_openib_component.ib_pkey_ix = mca_btl_openib_param_register_int("ib_qp_ous_rd_atom", "IB outstanding atomic reads",
mca_btl_openib_param_register_int("ib_pkey_ix", 1, (int*) &mca_btl_openib_component.ib_qp_ous_rd_atom);
0); mca_btl_openib_param_register_int("ib_mtu", "IB MTU",
mca_btl_openib_component.ib_psn = IBV_MTU_1024, (int*) &mca_btl_openib_component.ib_mtu);
mca_btl_openib_param_register_int("ib_psn", mca_btl_openib_param_register_int("ib_min_rnr_timer", "IB min rnr timer",
0); 5, (int*) &mca_btl_openib_component.ib_min_rnr_timer);
mca_btl_openib_component.ib_qp_ous_rd_atom = mca_btl_openib_param_register_int("ib_timeout", "IB transmit timeout",
mca_btl_openib_param_register_int("ib_qp_ous_rd_atom", 10, (int*) &mca_btl_openib_component.ib_timeout);
1); mca_btl_openib_param_register_int("ib_retry_count", "IB transmit retry count",
mca_btl_openib_component.ib_mtu = 7, (int*) &mca_btl_openib_component.ib_retry_count);
mca_btl_openib_param_register_int("ib_mtu", mca_btl_openib_param_register_int("ib_rnr_retry", "IB rnr retry",
IBV_MTU_1024); 7, (int*) mca_btl_openib_component.ib_rnr_retry);
mca_btl_openib_component.ib_min_rnr_timer = mca_btl_openib_param_register_int("ib_max_rdma_dst_ops", "IB max rdma destination operations",
mca_btl_openib_param_register_int("ib_min_rnr_timer", 16, (int*) &mca_btl_openib_component.ib_max_rdma_dst_ops);
5); mca_btl_openib_param_register_int("ib_service_level", "IB service level",
mca_btl_openib_component.ib_timeout = 0, (int*) &mca_btl_openib_component.ib_service_level);
mca_btl_openib_param_register_int("ib_timeout", mca_btl_openib_param_register_int("ib_static_rate", "IB static rate",
10); 0, (int*) &mca_btl_openib_component.ib_static_rate);
mca_btl_openib_component.ib_retry_count = mca_btl_openib_param_register_int("ib_src_path_bits", "IB source path bits",
mca_btl_openib_param_register_int("ib_retry_count", 0, (int*) &mca_btl_openib_component.ib_src_path_bits);
7); mca_btl_openib_param_register_int("rd_per_peer", "receive descriptors posted per peer, SRQ mode only",
mca_btl_openib_component.ib_rnr_retry = 16, (int*) &mca_btl_openib_component.rd_per_peer);
mca_btl_openib_param_register_int("ib_rnr_retry", mca_btl_openib_param_register_int ("exclusivity", "BTL exclusivity",
7); MCA_BTL_EXCLUSIVITY_DEFAULT, (int*) &mca_btl_openib_module.super.btl_exclusivity);
mca_btl_openib_component.ib_max_rdma_dst_ops = mca_btl_openib_param_register_int ("eager_limit", "eager send limit",
mca_btl_openib_param_register_int("ib_max_rdma_dst_ops", (64*1024),(int*) &mca_btl_openib_module.super.btl_eager_limit);
16); mca_btl_openib_module.super.btl_eager_limit -= sizeof(mca_btl_openib_header_t);
mca_btl_openib_param_register_int ("min_send_size", "minimum send size",
mca_btl_openib_component.ib_service_level = (64*1024),(int*) &mca_btl_openib_module.super.btl_min_send_size);
mca_btl_openib_param_register_int("ib_service_level", mca_btl_openib_module.super.btl_min_send_size -= sizeof(mca_btl_openib_header_t);
0); mca_btl_openib_param_register_int ("max_send_size", "maximum send size",
mca_btl_openib_component.ib_static_rate = (128*1024), (int*) &mca_btl_openib_module.super.btl_max_send_size);
mca_btl_openib_param_register_int("ib_static_rate", mca_btl_openib_module.super.btl_max_send_size -= sizeof(mca_btl_openib_header_t);
0); mca_btl_openib_param_register_int("min_rdma_size", "minimum rdma size",
mca_btl_openib_component.ib_src_path_bits = 1024*1024, (int*) &mca_btl_openib_module.super.btl_min_rdma_size);
mca_btl_openib_param_register_int("ib_src_path_bits", mca_btl_openib_param_register_int("max_rdma_size", "maximium rdma size",
0); 1024*1024, (int*) &mca_btl_openib_module.super.btl_max_rdma_size);
mca_btl_openib_component.rd_per_peer = mca_btl_openib_param_register_int("flags", "BTL flags, SEND=0, PUT=1, GET=2",
mca_btl_openib_param_register_int("rd_per_peer", MCA_BTL_FLAGS_PUT, (int*) &mca_btl_openib_module.super.btl_flags);
16);
mca_btl_openib_module.super.btl_exclusivity =
mca_btl_openib_param_register_int ("exclusivity", MCA_BTL_EXCLUSIVITY_DEFAULT);
mca_btl_openib_module.super.btl_eager_limit =
mca_btl_openib_param_register_int ("eager_limit", (64*1024))
- sizeof(mca_btl_openib_header_t);
mca_btl_openib_module.super.btl_min_send_size =
mca_btl_openib_param_register_int ("min_send_size", (64*1024))
- sizeof(mca_btl_openib_header_t);
mca_btl_openib_module.super.btl_max_send_size =
mca_btl_openib_param_register_int ("max_send_size", (128*1024))
- sizeof(mca_btl_openib_header_t);
mca_btl_openib_module.super.btl_min_rdma_size =
mca_btl_openib_param_register_int("min_rdma_size",
1024*1024);
mca_btl_openib_module.super.btl_max_rdma_size =
mca_btl_openib_param_register_int("max_rdma_size",
1024*1024);
mca_btl_openib_module.super.btl_flags =
mca_btl_openib_param_register_int("flags",
MCA_BTL_FLAGS_PUT);
param = mca_base_param_find("mpi", NULL, "leave_pinned"); param = mca_base_param_find("mpi", NULL, "leave_pinned");
@ -392,7 +376,7 @@ mca_btl_base_module_t** mca_btl_openib_component_init(int *num_btl_modules,
/* Allocate space for btl modules */ /* Allocate space for btl modules */
mca_btl_openib_component.openib_btls = (mca_btl_openib_module_t*) malloc(sizeof(mca_btl_openib_module_t) * mca_btl_openib_component.openib_btls = (mca_btl_openib_module_t*) malloc(sizeof(mca_btl_openib_module_t) *
mca_btl_openib_component.ib_num_btls); mca_btl_openib_component.ib_num_btls);
if(NULL == mca_btl_openib_component.openib_btls) { if(NULL == mca_btl_openib_component.openib_btls) {
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);