ugni: updated parameters and code cleanup
This commit was SVN r26151.
Этот коммит содержится в:
родитель
921176745d
Коммит
99f05d56e3
@ -232,7 +232,7 @@ mca_btl_ugni_alloc(struct mca_btl_base_module_t *btl,
|
||||
uint8_t order, size_t size, uint32_t flags);
|
||||
|
||||
typedef struct mca_btl_ugni_reg_t {
|
||||
mca_mpool_base_registration_t base;
|
||||
mca_mpool_base_registration_t base;
|
||||
gni_mem_handle_t memory_hdl;
|
||||
} mca_btl_ugni_reg_t;
|
||||
|
||||
|
@ -38,7 +38,6 @@ int mca_btl_ugni_add_procs(struct mca_btl_base_module_t* btl,
|
||||
size_t i;
|
||||
int rc;
|
||||
|
||||
|
||||
if (NULL == ugni_module->endpoints) {
|
||||
(void) ompi_proc_world (&ntotal_procs);
|
||||
|
||||
@ -50,6 +49,7 @@ int mca_btl_ugni_add_procs(struct mca_btl_base_module_t* btl,
|
||||
|
||||
rc = mca_btl_ugni_setup_mpools (ugni_module);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) {
|
||||
BTL_ERROR(("btl/ugni error setting up mpools/free lists"));
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
@ -261,6 +261,7 @@ mca_btl_ugni_setup_mpools (mca_btl_ugni_module_t *ugni_module)
|
||||
0, nprocs, mbox_increment,
|
||||
ugni_module->smsg_mpool);
|
||||
if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) {
|
||||
BTL_ERROR(("error creating smsg mailbox free list"));
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ btl_ugni_component_register(void)
|
||||
mca_btl_ugni_component.ugni_free_list_num =
|
||||
mca_btl_ugni_param_register_int("free_list_num", NULL, 8);
|
||||
mca_btl_ugni_component.ugni_free_list_max =
|
||||
mca_btl_ugni_param_register_int("free_list_max", NULL, -1);
|
||||
mca_btl_ugni_param_register_int("free_list_max", NULL, 16384);
|
||||
mca_btl_ugni_component.ugni_free_list_inc =
|
||||
mca_btl_ugni_param_register_int("free_list_inc", NULL, 64);
|
||||
|
||||
@ -99,7 +99,7 @@ btl_ugni_component_register(void)
|
||||
4 * 1024 - 1);
|
||||
|
||||
mca_btl_ugni_component.ugni_get_limit =
|
||||
mca_btl_ugni_param_register_int("get_limit", NULL, 8 * 1024);
|
||||
mca_btl_ugni_param_register_int("get_limit", NULL, 512 * 1024);
|
||||
|
||||
mca_btl_ugni_component.rdma_max_retries =
|
||||
mca_btl_ugni_param_register_int("rdma_max_retries", NULL, 8);
|
||||
@ -117,8 +117,7 @@ btl_ugni_component_register(void)
|
||||
mca_btl_ugni_module.super.btl_min_rdma_pipeline_size = 8 * 1024;
|
||||
|
||||
mca_btl_ugni_module.super.btl_flags = MCA_BTL_FLAGS_SEND |
|
||||
MCA_BTL_FLAGS_RDMA |
|
||||
MCA_BTL_FLAGS_RDMA_MATCHED;
|
||||
MCA_BTL_FLAGS_RDMA;
|
||||
|
||||
mca_btl_ugni_module.super.btl_bandwidth = 40000; /* Mbs */
|
||||
mca_btl_ugni_module.super.btl_latency = 2; /* Microsecs */
|
||||
@ -225,8 +224,6 @@ mca_btl_ugni_component_init (int *num_btl_modules,
|
||||
size_t nprocs;
|
||||
int rc;
|
||||
|
||||
signal (SIGSEGV, SIG_DFL);
|
||||
|
||||
/* Initialize ugni library and create communication domain */
|
||||
rc = ompi_common_ugni_init();
|
||||
if (OMPI_SUCCESS != rc) {
|
||||
@ -278,7 +275,6 @@ mca_btl_ugni_component_init (int *num_btl_modules,
|
||||
sizeof (mca_btl_ugni_send_frag_hdr_t);
|
||||
|
||||
/* module settings */
|
||||
mca_btl_ugni_module.super.btl_max_send_size = mca_btl_ugni_module.super.btl_eager_limit;
|
||||
mca_btl_ugni_module.super.btl_rdma_pipeline_send_length = mca_btl_ugni_module.super.btl_eager_limit;
|
||||
|
||||
rc = mca_btl_ugni_smsg_setup ();
|
||||
|
@ -227,7 +227,6 @@ mca_btl_ugni_alloc(struct mca_btl_base_module_t *btl,
|
||||
frag->base.des_src_cnt = 1;
|
||||
frag->base.des_dst = frag->segments;
|
||||
frag->base.des_dst_cnt = 1;
|
||||
frag->endpoint = endpoint;
|
||||
|
||||
frag->segments[0].seg_len = size;
|
||||
}
|
||||
@ -252,7 +251,6 @@ mca_btl_ugni_prepare_src (struct mca_btl_base_module_t *btl,
|
||||
uint8_t order, size_t reserve, size_t *size,
|
||||
uint32_t flags)
|
||||
{
|
||||
mca_btl_ugni_module_t *ugni_module = (mca_btl_ugni_module_t *) btl;
|
||||
mca_btl_ugni_base_frag_t *frag = NULL;
|
||||
void *data_ptr;
|
||||
int rc;
|
||||
@ -292,12 +290,9 @@ mca_btl_ugni_prepare_src (struct mca_btl_base_module_t *btl,
|
||||
mca_btl_ugni_frag_return (frag);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
frag->segments[0].seg_len = reserve + *size;
|
||||
} else {
|
||||
memmove ((void *)((uintptr_t)frag->segments[0].seg_addr.pval + reserve),
|
||||
data_ptr, *size);
|
||||
frag->segments[0].seg_len = reserve + *size;
|
||||
}
|
||||
} else {
|
||||
(void) MCA_BTL_UGNI_FRAG_ALLOC_RDMA(endpoint, frag);
|
||||
@ -320,7 +315,7 @@ mca_btl_ugni_prepare_src (struct mca_btl_base_module_t *btl,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
frag->registration = (mca_btl_ugni_reg_t*)registration;
|
||||
frag->registration = (mca_btl_ugni_reg_t *) registration;
|
||||
}
|
||||
|
||||
memcpy ((void *) frag->segments[0].seg_key.key64,
|
||||
@ -331,10 +326,11 @@ mca_btl_ugni_prepare_src (struct mca_btl_base_module_t *btl,
|
||||
sizeof (frag->segments[0].seg_key.key64));
|
||||
}
|
||||
|
||||
frag->segments[0].seg_len = *size;
|
||||
frag->segments[0].seg_addr.pval = data_ptr;
|
||||
}
|
||||
|
||||
frag->segments[0].seg_len = reserve + *size;
|
||||
|
||||
frag->base.des_src = frag->segments;
|
||||
frag->base.des_src_cnt = 1;
|
||||
frag->base.order = order;
|
||||
@ -350,7 +346,6 @@ mca_btl_ugni_prepare_dst (mca_btl_base_module_t *btl,
|
||||
opal_convertor_t *convertor, uint8_t order,
|
||||
size_t reserve, size_t *size, uint32_t flags)
|
||||
{
|
||||
mca_btl_ugni_module_t *ugni_module = (mca_btl_ugni_module_t *) btl;
|
||||
mca_btl_ugni_base_frag_t *frag;
|
||||
void *data_ptr;
|
||||
int rc;
|
||||
|
@ -69,7 +69,7 @@ static inline int mca_btl_ugni_post_fma (mca_btl_ugni_base_frag_t *frag, gni_pos
|
||||
|
||||
rc = GNI_PostFma (frag->endpoint->common->ep_handle, &frag->post_desc.base);
|
||||
if (GNI_RC_SUCCESS != rc) {
|
||||
BTL_ERROR(("GNI_PostFma failed with rc = %d", rc));
|
||||
/* BTL_ERROR(("GNI_PostFma failed with rc = %d", rc)); */
|
||||
assert(rc < 4);
|
||||
rc = OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
@ -90,7 +90,6 @@ static inline int mca_btl_ugni_post_bte (mca_btl_ugni_base_frag_t *frag, gni_pos
|
||||
|
||||
rc = GNI_PostRdma (frag->endpoint->common->ep_handle, &frag->post_desc.base);
|
||||
if (GNI_RC_SUCCESS != rc) {
|
||||
assert(rc < 4);
|
||||
rc = ompi_common_rc_ugni_to_ompi (rc);
|
||||
BTL_ERROR(("GNI_PostRdma failed with rc = %d", rc));
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user