* need to check with Tim, but appears for a received fragment, everything
associated with the descriptor is ours again once the callback function returns. Make it so - probably can optimize out some of the stuff I did when I mistakenly thought the descriptor free() was called on the passed descriptor * Fix some dumb accounting errors with MD usage for unexpected receives This commit was SVN r6555.
Этот коммит содержится в:
родитель
2f67ab82bb
Коммит
f7efce87d8
@ -252,19 +252,14 @@ mca_btl_portals_free(struct mca_btl_base_module_t* btl,
|
||||
mca_btl_portals_module_t* portals_btl = (mca_btl_portals_module_t*) btl;
|
||||
mca_btl_portals_frag_t* frag = (mca_btl_portals_frag_t*) des;
|
||||
|
||||
if (frag->type == MCA_BTL_PORTALS_FRAG_SEND) {
|
||||
if (frag->size == 0) {
|
||||
MCA_BTL_PORTALS_FRAG_RETURN_USER(btl, frag);
|
||||
} else if (frag->size == btl->btl_eager_limit){
|
||||
MCA_BTL_PORTALS_FRAG_RETURN_EAGER(btl, frag);
|
||||
} else if (frag->size == btl->btl_max_send_size) {
|
||||
MCA_BTL_PORTALS_FRAG_RETURN_MAX(btl, frag);
|
||||
} else {
|
||||
return OMPI_ERR_BAD_PARAM;
|
||||
}
|
||||
} else {
|
||||
mca_btl_portals_return_chunk_part(portals_btl, frag);
|
||||
MCA_BTL_PORTALS_FRAG_RETURN_USER(btl, frag);
|
||||
if (frag->size == 0) {
|
||||
MCA_BTL_PORTALS_FRAG_RETURN_USER(btl, frag);
|
||||
} else if (frag->size == btl->btl_eager_limit){
|
||||
MCA_BTL_PORTALS_FRAG_RETURN_EAGER(btl, frag);
|
||||
} else if (frag->size == btl->btl_max_send_size) {
|
||||
MCA_BTL_PORTALS_FRAG_RETURN_MAX(btl, frag);
|
||||
} else {
|
||||
return OMPI_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
|
@ -176,7 +176,7 @@ mca_btl_portals_process_recv(mca_btl_portals_module_t *module,
|
||||
if (ev->ni_fail_type != PTL_NI_OK) {
|
||||
opal_output(mca_btl_portals_component.portals_output,
|
||||
"Failure to start event\n");
|
||||
|
||||
} else {
|
||||
OPAL_THREAD_ADD32(&(chunk->pending), 1);
|
||||
}
|
||||
break;
|
||||
@ -187,7 +187,8 @@ mca_btl_portals_process_recv(mca_btl_portals_module_t *module,
|
||||
|
||||
if (ev->ni_fail_type != PTL_NI_OK) {
|
||||
opal_output(mca_btl_portals_component.portals_output,
|
||||
"Failure to start event\n");
|
||||
"Failure to end event\n");
|
||||
OPAL_THREAD_ADD32(&(chunk->pending), -1);
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
||||
@ -223,6 +224,8 @@ mca_btl_portals_process_recv(mca_btl_portals_module_t *module,
|
||||
tag,
|
||||
&frag->base,
|
||||
module->portals_reg[tag].cbdata);
|
||||
mca_btl_portals_return_chunk_part(module, frag);
|
||||
MCA_BTL_PORTALS_FRAG_RETURN_USER(&module->super, frag);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -116,7 +116,7 @@ mca_btl_portals_activate_chunk(mca_btl_portals_recv_chunk_t *chunk)
|
||||
}
|
||||
|
||||
OPAL_OUTPUT_VERBOSE((100, mca_btl_portals_component.portals_output,
|
||||
"new receive buffer posted"));
|
||||
"*** new receive buffer posted ***"));
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -129,8 +129,11 @@ mca_btl_portals_return_chunk_part(mca_btl_portals_module_t *module,
|
||||
mca_btl_portals_recv_chunk_t *chunk = frag->u.recv_frag.chunk;
|
||||
int ret;
|
||||
|
||||
OPAL_OUTPUT_VERBOSE((100, mca_btl_portals_component.portals_output,
|
||||
"*** return chunk called %d %d ***",
|
||||
chunk->full, chunk->pending));
|
||||
OPAL_THREAD_ADD32(&(chunk->pending), -1);
|
||||
if (chunk->full == true) {
|
||||
OPAL_THREAD_ADD32(&(chunk->pending), -1);
|
||||
if (chunk->pending == 0) {
|
||||
ret = mca_btl_portals_activate_chunk(chunk);
|
||||
if (OMPI_SUCCESS != ret) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user