Misc fixes for threaded builds..
This commit was SVN r6874.
Этот коммит содержится в:
родитель
3b9cc73d08
Коммит
8e1e2eec3d
@ -150,7 +150,6 @@ int mca_bml_r2_add_procs(
|
||||
size_t p;
|
||||
int rc;
|
||||
size_t p_index;
|
||||
struct mca_bml_base_btl_t** bml_btls = NULL;
|
||||
struct mca_btl_base_endpoint_t ** btl_endpoints = NULL;
|
||||
|
||||
if(nprocs == 0)
|
||||
@ -171,10 +170,12 @@ int mca_bml_r2_add_procs(
|
||||
|
||||
|
||||
/* attempt to add all procs to each r2 */
|
||||
btl_endpoints = (struct mca_btl_base_endpoint_t **) malloc(nprocs * sizeof(struct mca_btl_base_endpoint_t*));
|
||||
bml_endpoints = (struct mca_bml_base_endpoint_t **)malloc(nprocs * sizeof(struct mca_bml_base_endpoint_t*));
|
||||
bml_btls = (struct mca_bml_base_btl_t **) malloc(nprocs * sizeof(struct mca_bml_base_btl_t*));
|
||||
|
||||
btl_endpoints = (struct mca_btl_base_endpoint_t **)
|
||||
malloc(nprocs * sizeof(struct mca_btl_base_endpoint_t*));
|
||||
bml_endpoints = (struct mca_bml_base_endpoint_t **)
|
||||
malloc(nprocs * sizeof(struct mca_bml_base_endpoint_t*));
|
||||
memset(bml_endpoints, 0, nprocs * sizeof(struct mca_bml_base_endpoint_t*));
|
||||
|
||||
for(p_index = 0; p_index < mca_bml_r2.num_btl_modules; p_index++) {
|
||||
mca_btl_base_module_t* btl = mca_bml_r2.btl_modules[p_index];
|
||||
int btl_inuse = 0;
|
||||
@ -185,10 +186,7 @@ int mca_bml_r2_add_procs(
|
||||
* that is passed back to the r2 on data transfer calls
|
||||
*/
|
||||
ompi_bitmap_clear_all_bits(reachable);
|
||||
memset(bml_endpoints, 0, nprocs * sizeof(struct mca_bml_base_endpoint_t*));
|
||||
memset(btl_endpoints, 0, nprocs *sizeof(struct mca_btl_base_endpoint_t*));
|
||||
memset(bml_btls, 0, nprocs * sizeof(struct mca_bml_base_btl_t*));
|
||||
|
||||
|
||||
rc = btl->btl_add_procs(btl, nprocs, procs, btl_endpoints, reachable);
|
||||
if(OMPI_SUCCESS != rc) {
|
||||
@ -303,8 +301,8 @@ int mca_bml_r2_add_procs(
|
||||
if(NULL == bml_endpoint)
|
||||
continue;
|
||||
|
||||
/* (1) determine the total bandwidth available across all r2s
|
||||
* note that we need to do this here, as we may already have r2s configured
|
||||
/* (1) determine the total bandwidth available across all btls
|
||||
* note that we need to do this here, as we may already have btls configured
|
||||
* (2) determine the highest priority ranking for latency
|
||||
*/
|
||||
n_size = mca_bml_base_btl_array_get_size(&bml_endpoint->btl_send);
|
||||
|
@ -98,7 +98,7 @@ int mca_btl_gm_add_procs(
|
||||
*/
|
||||
gm_endpoint = OBJ_NEW(mca_btl_gm_endpoint_t);
|
||||
if(NULL == gm_endpoint) {
|
||||
OPAL_THREAD_UNLOCK(&module_proc->proc_lock);
|
||||
OPAL_THREAD_UNLOCK(&gm_proc->proc_lock);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
@ -106,11 +106,11 @@ int mca_btl_gm_add_procs(
|
||||
rc = mca_btl_gm_proc_insert(gm_proc, gm_endpoint);
|
||||
if(rc != OMPI_SUCCESS) {
|
||||
OBJ_RELEASE(gm_endpoint);
|
||||
OPAL_THREAD_UNLOCK(&module_proc->proc_lock);
|
||||
OPAL_THREAD_UNLOCK(&gm_proc->proc_lock);
|
||||
continue;
|
||||
}
|
||||
ompi_bitmap_set_bit(reachable, i);
|
||||
OPAL_THREAD_UNLOCK(&module_proc->proc_lock);
|
||||
OPAL_THREAD_UNLOCK(&gm_proc->proc_lock);
|
||||
peers[i] = gm_endpoint;
|
||||
}
|
||||
return OMPI_SUCCESS;
|
||||
|
@ -98,7 +98,7 @@ int mca_btl_mvapi_add_procs(
|
||||
*/
|
||||
ib_peer = OBJ_NEW(mca_btl_mvapi_endpoint_t);
|
||||
if(NULL == ib_peer) {
|
||||
OPAL_THREAD_UNLOCK(&module_proc->proc_lock);
|
||||
OPAL_THREAD_UNLOCK(&ib_proc->proc_lock);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
@ -106,12 +106,12 @@ int mca_btl_mvapi_add_procs(
|
||||
rc = mca_btl_mvapi_proc_insert(ib_proc, ib_peer);
|
||||
if(rc != OMPI_SUCCESS) {
|
||||
OBJ_RELEASE(ib_peer);
|
||||
OPAL_THREAD_UNLOCK(&module_proc->proc_lock);
|
||||
OPAL_THREAD_UNLOCK(&ib_proc->proc_lock);
|
||||
continue;
|
||||
}
|
||||
|
||||
ompi_bitmap_set_bit(reachable, i);
|
||||
OPAL_THREAD_UNLOCK(&module_proc->proc_lock);
|
||||
OPAL_THREAD_UNLOCK(&ib_proc->proc_lock);
|
||||
peers[i] = ib_peer;
|
||||
}
|
||||
|
||||
@ -144,10 +144,10 @@ int mca_btl_mvapi_register(
|
||||
mca_btl_mvapi_module_t* mvapi_btl = (mca_btl_mvapi_module_t*) btl;
|
||||
|
||||
|
||||
OPAL_THREAD_LOCK(&ib->btl.ib_lock);
|
||||
OPAL_THREAD_LOCK(&mvapi_btl->ib_lock);
|
||||
mvapi_btl->ib_reg[tag].cbfunc = cbfunc;
|
||||
mvapi_btl->ib_reg[tag].cbdata = cbdata;
|
||||
OPAL_THREAD_UNLOCK(&ib->btl.ib_lock);
|
||||
OPAL_THREAD_UNLOCK(&mvapi_btl->ib_lock);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ struct mca_btl_mvapi_module_t {
|
||||
post_srr_high_mvapi_btl->nic, \
|
||||
post_srr_high_mvapi_btl->srq_hndl_high); \
|
||||
} \
|
||||
OPAL_THREAD_UNLOCK(&post_rr_high_mvapi_btl->ib_lock); \
|
||||
OPAL_THREAD_UNLOCK(&post_srr_high_mvapi_btl->ib_lock); \
|
||||
}
|
||||
|
||||
#define MCA_BTL_MVAPI_POST_SRR_LOW(post_srr_low_mvapi_btl, \
|
||||
|
@ -102,7 +102,7 @@ int mca_btl_openib_add_procs(
|
||||
*/
|
||||
ib_peer = OBJ_NEW(mca_btl_openib_endpoint_t);
|
||||
if(NULL == ib_peer) {
|
||||
OPAL_THREAD_UNLOCK(&module_proc->proc_lock);
|
||||
OPAL_THREAD_UNLOCK(&tb_proc->proc_lock);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
@ -110,12 +110,12 @@ int mca_btl_openib_add_procs(
|
||||
rc = mca_btl_openib_proc_insert(ib_proc, ib_peer);
|
||||
if(rc != OMPI_SUCCESS) {
|
||||
OBJ_RELEASE(ib_peer);
|
||||
OPAL_THREAD_UNLOCK(&module_proc->proc_lock);
|
||||
OPAL_THREAD_UNLOCK(&ib_proc->proc_lock);
|
||||
continue;
|
||||
}
|
||||
|
||||
ompi_bitmap_set_bit(reachable, i);
|
||||
OPAL_THREAD_UNLOCK(&module_proc->proc_lock);
|
||||
OPAL_THREAD_UNLOCK(&ib_proc->proc_lock);
|
||||
peers[i] = ib_peer;
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ int mca_btl_template_add_procs(
|
||||
*/
|
||||
template_endpoint = OBJ_NEW(mca_btl_template_endpoint_t);
|
||||
if(NULL == template_endpoint) {
|
||||
OPAL_THREAD_UNLOCK(&module_proc->proc_lock);
|
||||
OPAL_THREAD_UNLOCK(&template_proc->proc_lock);
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
@ -102,12 +102,12 @@ int mca_btl_template_add_procs(
|
||||
rc = mca_btl_template_proc_insert(template_proc, template_endpoint);
|
||||
if(rc != OMPI_SUCCESS) {
|
||||
OBJ_RELEASE(template_endpoint);
|
||||
OPAL_THREAD_UNLOCK(&module_proc->proc_lock);
|
||||
OPAL_THREAD_UNLOCK(&template_proc->proc_lock);
|
||||
continue;
|
||||
}
|
||||
|
||||
ompi_bitmap_set_bit(reachable, i);
|
||||
OPAL_THREAD_UNLOCK(&module_proc->proc_lock);
|
||||
OPAL_THREAD_UNLOCK(&template_proc->proc_lock);
|
||||
peers[i] = template_endpoint;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ OBJ_CLASS_DECLARATION(mca_pml_teg_send_request_t);
|
||||
if(NULL == proc) { \
|
||||
return OMPI_ERR_OUT_OF_RESOURCE; \
|
||||
} \
|
||||
OPAL_THREAD_SCOPED_LOCK(&proc->proc_lock, \
|
||||
OPAL_THREAD_SCOPED_LOCK(&proc->base.proc_lock, \
|
||||
(ptl_proc = mca_ptl_array_get_next(&proc->proc_ptl_first))); \
|
||||
ptl_base = ptl_proc->ptl_base; \
|
||||
/* \
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user