Check return codes a bit more closely
Fix broken debug output in any_source recv case Other minor code cleanups This commit was SVN r24774.
Этот коммит содержится в:
родитель
90aa9ff09a
Коммит
83154af74d
@ -76,20 +76,15 @@ ompi_mtl_portals4_add_procs(struct mca_mtl_base_module_t *mtl,
|
||||
"Proc %s architecture %x, mine %x.",
|
||||
ORTE_NAME_PRINT(&procs[i]->proc_name),
|
||||
procs[i]->proc_arch, ompi_proc_local()->proc_arch);
|
||||
return OMPI_ERROR;
|
||||
return OMPI_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
mtl_peer_data[i] = malloc(sizeof(struct mca_mtl_base_endpoint_t));
|
||||
if (NULL == mtl_peer_data[i]) {
|
||||
PtlMEUnlink(ompi_mtl_portals4.long_overflow_me_h);
|
||||
PtlMDRelease(ompi_mtl_portals4.zero_md_h);
|
||||
PtlPTFree(ompi_mtl_portals4.ni_h, PTL_READ_TABLE_ID);
|
||||
PtlPTFree(ompi_mtl_portals4.ni_h, PTL_SEND_TABLE_ID);
|
||||
PtlEQFree(ompi_mtl_portals4.eq_h);
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: malloc failed: %d\n",
|
||||
__FILE__, __LINE__, ret);
|
||||
return OMPI_ERROR;
|
||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
ret = ompi_modex_recv(&mca_mtl_portals4_component.mtl_version,
|
||||
@ -103,17 +98,12 @@ ompi_mtl_portals4_add_procs(struct mca_mtl_base_module_t *mtl,
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: ompi_modex_recv failed: %d\n",
|
||||
__FILE__, __LINE__, ret);
|
||||
return ret;
|
||||
return OMPI_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
mtl_peer_data[i]->ptl_proc = *id;
|
||||
mtl_peer_data[i]->send_count = 0;
|
||||
mtl_peer_data[i]->recv_count = 0;
|
||||
|
||||
opal_output_verbose(25, ompi_mtl_base_output,
|
||||
"Peer %d: %x,%x", (int) i,
|
||||
(int) mtl_peer_data[i]->ptl_proc.phys.nid,
|
||||
(int) mtl_peer_data[i]->ptl_proc.phys.pid);
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
@ -145,12 +135,12 @@ ompi_mtl_portals4_finalize(struct mca_mtl_base_module_t *mtl)
|
||||
while (0 != ompi_mtl_portals4_progress()) { }
|
||||
|
||||
ompi_mtl_portals4_recv_short_fini(&ompi_mtl_portals4);
|
||||
|
||||
PtlMEUnlink(ompi_mtl_portals4.long_overflow_me_h);
|
||||
PtlMDRelease(ompi_mtl_portals4.zero_md_h);
|
||||
PtlPTFree(ompi_mtl_portals4.ni_h, ompi_mtl_portals4.read_idx);
|
||||
PtlPTFree(ompi_mtl_portals4.ni_h, ompi_mtl_portals4.send_idx);
|
||||
PtlEQFree(ompi_mtl_portals4.eq_h);
|
||||
PtlPTFree(ompi_mtl_portals4.ni_h, PTL_READ_TABLE_ID);
|
||||
PtlPTFree(ompi_mtl_portals4.ni_h, PTL_SEND_TABLE_ID);
|
||||
|
||||
PtlNIFini(ompi_mtl_portals4.ni_h);
|
||||
PtlFini();
|
||||
|
||||
|
@ -42,6 +42,9 @@ struct mca_mtl_portals4_module_t {
|
||||
int recv_short_num;
|
||||
int queue_size;
|
||||
|
||||
ptl_pt_index_t send_idx;
|
||||
ptl_pt_index_t read_idx;
|
||||
|
||||
/* global handles */
|
||||
ptl_handle_ni_t ni_h;
|
||||
ptl_handle_eq_t eq_h;
|
||||
@ -60,8 +63,8 @@ typedef struct mca_mtl_portals4_module_t mca_mtl_portals4_module_t;
|
||||
|
||||
extern mca_mtl_portals4_module_t ompi_mtl_portals4;
|
||||
|
||||
#define PTL_SEND_TABLE_ID 2
|
||||
#define PTL_READ_TABLE_ID 4
|
||||
#define REQ_SEND_TABLE_ID 2
|
||||
#define REQ_READ_TABLE_ID 3
|
||||
|
||||
|
||||
/* match/ignore bit manipulation
|
||||
|
@ -139,6 +139,8 @@ ompi_mtl_portals4_component_open(void)
|
||||
ompi_mtl_portals4.eq_h = PTL_INVALID_HANDLE;
|
||||
ompi_mtl_portals4.zero_md_h = PTL_INVALID_HANDLE;
|
||||
ompi_mtl_portals4.long_overflow_me_h = PTL_INVALID_HANDLE;
|
||||
ompi_mtl_portals4.send_idx = (ptl_pt_index_t) ~0UL;
|
||||
ompi_mtl_portals4.read_idx = (ptl_pt_index_t) ~0UL;
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -157,17 +159,9 @@ ompi_mtl_portals4_component_init(bool enable_progress_threads,
|
||||
{
|
||||
int ret;
|
||||
ptl_process_t id;
|
||||
ptl_pt_index_t send_pt = -1, read_pt = -1;
|
||||
ptl_md_t md;
|
||||
ptl_me_t me;
|
||||
|
||||
/* BWB: FIX ME */
|
||||
if (enable_mpi_threads || enable_progress_threads) {
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"Portals4 MTL is not yet thread safe. Can not continue");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Initialize Portals and create a physical, matching interface */
|
||||
ret = PtlInit();
|
||||
if (PTL_OK != ret) {
|
||||
@ -214,7 +208,7 @@ ompi_mtl_portals4_component_init(bool enable_progress_threads,
|
||||
/* create event queue */
|
||||
ret = PtlEQAlloc(ompi_mtl_portals4.ni_h,
|
||||
ompi_mtl_portals4.queue_size,
|
||||
&(ompi_mtl_portals4.eq_h));
|
||||
&ompi_mtl_portals4.eq_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: PtlEQAlloc failed: %d\n",
|
||||
@ -226,8 +220,8 @@ ompi_mtl_portals4_component_init(bool enable_progress_threads,
|
||||
ret = PtlPTAlloc(ompi_mtl_portals4.ni_h,
|
||||
PTL_PT_FLOWCTRL,
|
||||
ompi_mtl_portals4.eq_h,
|
||||
PTL_SEND_TABLE_ID,
|
||||
&send_pt);
|
||||
REQ_SEND_TABLE_ID,
|
||||
&ompi_mtl_portals4.send_idx);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: PtlPTAlloc failed: %d\n",
|
||||
@ -237,8 +231,8 @@ ompi_mtl_portals4_component_init(bool enable_progress_threads,
|
||||
ret = PtlPTAlloc(ompi_mtl_portals4.ni_h,
|
||||
PTL_PT_FLOWCTRL,
|
||||
ompi_mtl_portals4.eq_h,
|
||||
PTL_READ_TABLE_ID,
|
||||
&read_pt);
|
||||
REQ_READ_TABLE_ID,
|
||||
&ompi_mtl_portals4.read_idx);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: PtlPTAlloc failed: %d\n",
|
||||
@ -264,27 +258,29 @@ ompi_mtl_portals4_component_init(bool enable_progress_threads,
|
||||
}
|
||||
|
||||
/* Handle long overflows */
|
||||
me.start = NULL;
|
||||
me.length = 0;
|
||||
me.ct_handle = PTL_CT_NONE;
|
||||
me.min_free = 0;
|
||||
me.ac_id.uid = PTL_UID_ANY;
|
||||
me.options = PTL_ME_OP_PUT | PTL_ME_ACK_DISABLE | PTL_ME_EVENT_COMM_DISABLE;
|
||||
me.match_id.phys.nid = PTL_NID_ANY;
|
||||
me.match_id.phys.pid = PTL_PID_ANY;
|
||||
me.match_bits = PTL_LONG_MSG;
|
||||
me.ignore_bits = PTL_CONTEXT_MASK | PTL_SOURCE_MASK | PTL_TAG_MASK;
|
||||
ret = PtlMEAppend(ompi_mtl_portals4.ni_h,
|
||||
PTL_SEND_TABLE_ID,
|
||||
&me,
|
||||
PTL_OVERFLOW,
|
||||
NULL,
|
||||
&ompi_mtl_portals4.long_overflow_me_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: PtlMEAppend failed: %d\n",
|
||||
__FILE__, __LINE__, ret);
|
||||
goto error;
|
||||
if (ompi_mtl_portals4.protocol != triggered) {
|
||||
me.start = NULL;
|
||||
me.length = 0;
|
||||
me.ct_handle = PTL_CT_NONE;
|
||||
me.min_free = 0;
|
||||
me.ac_id.uid = PTL_UID_ANY;
|
||||
me.options = PTL_ME_OP_PUT | PTL_ME_ACK_DISABLE | PTL_ME_EVENT_COMM_DISABLE;
|
||||
me.match_id.phys.nid = PTL_NID_ANY;
|
||||
me.match_id.phys.pid = PTL_PID_ANY;
|
||||
me.match_bits = PTL_LONG_MSG;
|
||||
me.ignore_bits = PTL_CONTEXT_MASK | PTL_SOURCE_MASK | PTL_TAG_MASK;
|
||||
ret = PtlMEAppend(ompi_mtl_portals4.ni_h,
|
||||
ompi_mtl_portals4.send_idx,
|
||||
&me,
|
||||
PTL_OVERFLOW,
|
||||
NULL,
|
||||
&ompi_mtl_portals4.long_overflow_me_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: PtlMEAppend failed: %d\n",
|
||||
__FILE__, __LINE__, ret);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
/* attach short unex recv blocks */
|
||||
@ -297,7 +293,13 @@ ompi_mtl_portals4_component_init(bool enable_progress_threads,
|
||||
}
|
||||
|
||||
/* activate progress callback */
|
||||
opal_progress_register(ompi_mtl_portals4_progress);
|
||||
ret = opal_progress_register(ompi_mtl_portals4_progress);
|
||||
if (OMPI_SUCCESS != ret) {
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: opal_progress_register failed: %d\n",
|
||||
__FILE__, __LINE__, ret);
|
||||
goto error;
|
||||
}
|
||||
|
||||
return &ompi_mtl_portals4.base;
|
||||
|
||||
@ -308,11 +310,11 @@ ompi_mtl_portals4_component_init(bool enable_progress_threads,
|
||||
if (!PtlHandleIsEqual(ompi_mtl_portals4.zero_md_h, PTL_INVALID_HANDLE)) {
|
||||
PtlMDRelease(ompi_mtl_portals4.zero_md_h);
|
||||
}
|
||||
if ((int) read_pt != -1) {
|
||||
PtlPTFree(ompi_mtl_portals4.ni_h, PTL_READ_TABLE_ID);
|
||||
if (ompi_mtl_portals4.read_idx != (ptl_pt_index_t) ~0UL) {
|
||||
PtlPTFree(ompi_mtl_portals4.ni_h, ompi_mtl_portals4.read_idx);
|
||||
}
|
||||
if ((int) send_pt != -1) {
|
||||
PtlPTFree(ompi_mtl_portals4.ni_h, PTL_SEND_TABLE_ID);
|
||||
if (ompi_mtl_portals4.send_idx != (ptl_pt_index_t) ~0UL) {
|
||||
PtlPTFree(ompi_mtl_portals4.ni_h, ompi_mtl_portals4.send_idx);
|
||||
}
|
||||
if (!PtlHandleIsEqual(ompi_mtl_portals4.eq_h, PTL_INVALID_HANDLE)) {
|
||||
PtlEQFree(ompi_mtl_portals4.eq_h);
|
||||
|
@ -78,18 +78,23 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev,
|
||||
0,
|
||||
md.length,
|
||||
ev->initiator,
|
||||
PTL_READ_TABLE_ID,
|
||||
ompi_mtl_portals4.read_idx,
|
||||
ev->hdr_data,
|
||||
ompi_mtl_portals4.eager_limit,
|
||||
ptl_request);
|
||||
if (PTL_OK != ret) {
|
||||
PtlMDRelease(ptl_request->md_h);
|
||||
if (NULL != ptl_request->buffer_ptr) free(ptl_request->buffer_ptr);
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: PtlGet failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
ret = PtlMDRelease(ptl_request->md_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: PtlMDRelease failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
}
|
||||
if (NULL != ptl_request->buffer_ptr) free(ptl_request->buffer_ptr);
|
||||
ptl_request->super.ompi_req->req_status.MPI_ERROR =
|
||||
ompi_mtl_portals4_get_error(ret);;
|
||||
ompi_mtl_portals4_get_error(ret);
|
||||
ptl_request->super.completion_callback(&ptl_request->super);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -159,9 +164,19 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev,
|
||||
__FILE__, __LINE__, ret);
|
||||
ptl_request->super.ompi_req->req_status.MPI_ERROR = OMPI_ERROR;
|
||||
}
|
||||
PtlMDRelease(ptl_request->md_h);
|
||||
ret = PtlMDRelease(ptl_request->md_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: PtlMDRelease failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
}
|
||||
if (ompi_mtl_portals4.protocol == triggered) {
|
||||
PtlCTFree(ptl_request->ct_h);
|
||||
ret = PtlCTFree(ptl_request->ct_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: PtlCTFree failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
}
|
||||
}
|
||||
OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_output, "recv completed"));
|
||||
ptl_request->super.completion_callback(&ptl_request->super);
|
||||
@ -211,7 +226,7 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev,
|
||||
0,
|
||||
PTL_NO_ACK_REQ,
|
||||
ev->initiator,
|
||||
PTL_READ_TABLE_ID,
|
||||
ompi_mtl_portals4.read_idx,
|
||||
ev->hdr_data,
|
||||
0,
|
||||
NULL,
|
||||
@ -282,16 +297,21 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev,
|
||||
0,
|
||||
md.length,
|
||||
ev->initiator,
|
||||
PTL_READ_TABLE_ID,
|
||||
ompi_mtl_portals4.read_idx,
|
||||
ev->hdr_data,
|
||||
ev->mlength,
|
||||
ptl_request);
|
||||
if (PTL_OK != ret) {
|
||||
PtlMDRelease(ptl_request->md_h);
|
||||
if (NULL != ptl_request->buffer_ptr) free(ptl_request->buffer_ptr);
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: PtlGet failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
if (NULL != ptl_request->buffer_ptr) free(ptl_request->buffer_ptr);
|
||||
ret = PtlMDRelease(ptl_request->md_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output(ompi_mtl_base_output,
|
||||
"%s:%d: PtlMDRelease failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
}
|
||||
ptl_request->super.ompi_req->req_status.MPI_ERROR =
|
||||
ompi_mtl_portals4_get_error(ret);;
|
||||
ptl_request->super.completion_callback(&ptl_request->super);
|
||||
@ -368,11 +388,17 @@ ompi_mtl_portals4_irecv(struct mca_mtl_base_module_t* mtl,
|
||||
ptl_request->delivery_len = length;
|
||||
ptl_request->super.ompi_req->req_status.MPI_ERROR = OMPI_SUCCESS;
|
||||
|
||||
OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_output,
|
||||
"Recv %d from %x,%x of length %d\n",
|
||||
endpoint->recv_count,
|
||||
endpoint->ptl_proc.phys.nid, endpoint->ptl_proc.phys.pid,
|
||||
(int)length));
|
||||
if (MPI_ANY_SOURCE == src) {
|
||||
OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_output,
|
||||
"ANY_SOURCE Recv of length %d\n",
|
||||
(int)length));
|
||||
} else {
|
||||
OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_output,
|
||||
"Recv %d from %x,%x of length %d\n",
|
||||
endpoint->recv_count,
|
||||
endpoint->ptl_proc.phys.nid, endpoint->ptl_proc.phys.pid,
|
||||
(int)length));
|
||||
}
|
||||
|
||||
if (ompi_mtl_portals4.protocol == triggered && length > ompi_mtl_portals4.eager_limit) {
|
||||
ptl_md_t md;
|
||||
@ -406,7 +432,7 @@ ompi_mtl_portals4_irecv(struct mca_mtl_base_module_t* mtl,
|
||||
ompi_mtl_portals4.eager_limit,
|
||||
length - ompi_mtl_portals4.eager_limit,
|
||||
remote_proc,
|
||||
PTL_READ_TABLE_ID,
|
||||
ompi_mtl_portals4.read_idx,
|
||||
endpoint->recv_count,
|
||||
ompi_mtl_portals4.eager_limit,
|
||||
ptl_request,
|
||||
@ -438,7 +464,7 @@ ompi_mtl_portals4_irecv(struct mca_mtl_base_module_t* mtl,
|
||||
me.ignore_bits = ignore_bits;
|
||||
|
||||
ret = PtlMEAppend(ompi_mtl_portals4.ni_h,
|
||||
PTL_SEND_TABLE_ID,
|
||||
ompi_mtl_portals4.send_idx,
|
||||
&me,
|
||||
PTL_PRIORITY_LIST,
|
||||
ptl_request,
|
||||
|
@ -86,7 +86,7 @@ ompi_mtl_portals4_activate_block(ompi_mtl_portals4_recv_short_block_t *block)
|
||||
me.ignore_bits = ignore_bits;
|
||||
|
||||
ret = PtlMEAppend(block->mtl->ni_h,
|
||||
PTL_SEND_TABLE_ID,
|
||||
ompi_mtl_portals4.send_idx,
|
||||
&me,
|
||||
PTL_OVERFLOW,
|
||||
block,
|
||||
|
@ -33,6 +33,8 @@
|
||||
static int
|
||||
ompi_mtl_portals4_short_callback(ptl_event_t *ev, ompi_mtl_portals4_request_t *ptl_request)
|
||||
{
|
||||
int ret;
|
||||
|
||||
assert(ev->type == PTL_EVENT_SEND);
|
||||
assert(NULL != ptl_request->super.ompi_req);
|
||||
|
||||
@ -45,7 +47,13 @@ ompi_mtl_portals4_short_callback(ptl_event_t *ev, ompi_mtl_portals4_request_t *p
|
||||
if (NULL != ptl_request->buffer_ptr) {
|
||||
free(ptl_request->buffer_ptr);
|
||||
}
|
||||
PtlMDRelease(ptl_request->md_h);
|
||||
ret = PtlMDRelease(ptl_request->md_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: short send callback PtlMDRelease returned %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
ptl_request->super.ompi_req->req_status.MPI_ERROR = OMPI_ERROR;
|
||||
}
|
||||
OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_output, "send completed"));
|
||||
ptl_request->super.completion_callback(&ptl_request->super);
|
||||
|
||||
@ -57,6 +65,8 @@ ompi_mtl_portals4_short_callback(ptl_event_t *ev, ompi_mtl_portals4_request_t *p
|
||||
static int
|
||||
ompi_mtl_portals4_long_callback(ptl_event_t *ev, struct ompi_mtl_portals4_request_t* ptl_request)
|
||||
{
|
||||
int ret;
|
||||
|
||||
assert(ev->type == PTL_EVENT_SEND || ev->type == PTL_EVENT_ACK || ev->type == PTL_EVENT_GET);
|
||||
assert(NULL != ptl_request->super.ompi_req);
|
||||
|
||||
@ -74,7 +84,13 @@ ompi_mtl_portals4_long_callback(ptl_event_t *ev, struct ompi_mtl_portals4_reques
|
||||
if (NULL != ptl_request->buffer_ptr) {
|
||||
free(ptl_request->buffer_ptr);
|
||||
}
|
||||
PtlMDRelease(ptl_request->md_h);
|
||||
ret = PtlMDRelease(ptl_request->md_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: long send callback PtlMDRelease returned %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
ptl_request->super.ompi_req->req_status.MPI_ERROR = OMPI_ERROR;
|
||||
}
|
||||
OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_output, "send completed"));
|
||||
ptl_request->super.completion_callback(&ptl_request->super);
|
||||
}
|
||||
@ -92,6 +108,8 @@ ompi_mtl_portals4_long_callback(ptl_event_t *ev, struct ompi_mtl_portals4_reques
|
||||
static int
|
||||
ompi_mtl_portals4_sync_callback(ptl_event_t *ev, struct ompi_mtl_portals4_request_t* ptl_request)
|
||||
{
|
||||
int ret;
|
||||
|
||||
assert(ev->type == PTL_EVENT_SEND || ev->type == PTL_EVENT_ACK || ev->type == PTL_EVENT_PUT);
|
||||
assert(NULL != ptl_request->super.ompi_req);
|
||||
|
||||
@ -109,14 +127,26 @@ ompi_mtl_portals4_sync_callback(ptl_event_t *ev, struct ompi_mtl_portals4_reques
|
||||
if (NULL != ptl_request->buffer_ptr) {
|
||||
free(ptl_request->buffer_ptr);
|
||||
}
|
||||
PtlMDRelease(ptl_request->md_h);
|
||||
ret = PtlMDRelease(ptl_request->md_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: sync send callback PtlMDRelease returned %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
ptl_request->super.ompi_req->req_status.MPI_ERROR = OMPI_ERROR;
|
||||
}
|
||||
OPAL_OUTPUT_VERBOSE((50, ompi_mtl_base_output, "send completed"));
|
||||
ptl_request->super.completion_callback(&ptl_request->super);
|
||||
}
|
||||
|
||||
/* received an ack - unlink the me */
|
||||
if (ev->type == PTL_EVENT_ACK) {
|
||||
PtlMEUnlink(ptl_request->me_h);
|
||||
ret = PtlMEUnlink(ptl_request->me_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: sync send callback PtlMEUnlink returned %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
ptl_request->super.ompi_req->req_status.MPI_ERROR = OMPI_ERROR;
|
||||
}
|
||||
}
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -158,7 +188,7 @@ ompi_mtl_portals4_short_isend(mca_pml_base_send_mode_t mode, void *start, int le
|
||||
length,
|
||||
PTL_NO_ACK_REQ,
|
||||
endpoint->ptl_proc,
|
||||
PTL_SEND_TABLE_ID,
|
||||
ompi_mtl_portals4.send_idx,
|
||||
match_bits,
|
||||
0,
|
||||
ptl_request,
|
||||
@ -167,7 +197,12 @@ ompi_mtl_portals4_short_isend(mca_pml_base_send_mode_t mode, void *start, int le
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: PtlPut failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
PtlMDRelease(ptl_request->md_h);
|
||||
ret = PtlMDRelease(ptl_request->md_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: PtlMDRelease failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
}
|
||||
return ompi_mtl_portals4_get_error(ret);
|
||||
}
|
||||
|
||||
@ -220,7 +255,7 @@ ompi_mtl_portals4_long_isend(void *start, int length, int contextid, int localra
|
||||
me.ignore_bits = 0;
|
||||
|
||||
ret = PtlMEAppend(ompi_mtl_portals4.ni_h,
|
||||
PTL_READ_TABLE_ID,
|
||||
ompi_mtl_portals4.read_idx,
|
||||
&me,
|
||||
PTL_PRIORITY_LIST,
|
||||
ptl_request,
|
||||
@ -229,7 +264,12 @@ ompi_mtl_portals4_long_isend(void *start, int length, int contextid, int localra
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: PtlMEAppend failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
PtlMDRelease(ptl_request->md_h);
|
||||
ret = PtlMDRelease(ptl_request->md_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: PtlMDRelease failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
}
|
||||
return ompi_mtl_portals4_get_error(ret);
|
||||
}
|
||||
|
||||
@ -239,7 +279,7 @@ ompi_mtl_portals4_long_isend(void *start, int length, int contextid, int localra
|
||||
ompi_mtl_portals4.eager_limit,
|
||||
PTL_NO_ACK_REQ,
|
||||
endpoint->ptl_proc,
|
||||
PTL_SEND_TABLE_ID,
|
||||
ompi_mtl_portals4.send_idx,
|
||||
match_bits,
|
||||
0,
|
||||
ptl_request,
|
||||
@ -250,7 +290,7 @@ ompi_mtl_portals4_long_isend(void *start, int length, int contextid, int localra
|
||||
ompi_mtl_portals4.eager_limit + 1,
|
||||
PTL_NO_ACK_REQ,
|
||||
endpoint->ptl_proc,
|
||||
PTL_SEND_TABLE_ID,
|
||||
ompi_mtl_portals4.send_idx,
|
||||
match_bits,
|
||||
0,
|
||||
ptl_request,
|
||||
@ -261,7 +301,7 @@ ompi_mtl_portals4_long_isend(void *start, int length, int contextid, int localra
|
||||
length,
|
||||
PTL_ACK_REQ,
|
||||
endpoint->ptl_proc,
|
||||
PTL_SEND_TABLE_ID,
|
||||
ompi_mtl_portals4.send_idx,
|
||||
match_bits,
|
||||
0,
|
||||
ptl_request,
|
||||
@ -271,8 +311,18 @@ ompi_mtl_portals4_long_isend(void *start, int length, int contextid, int localra
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: PtlPut failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
PtlMEUnlink(ptl_request->me_h);
|
||||
PtlMDRelease(ptl_request->md_h);
|
||||
ret = PtlMEUnlink(ptl_request->me_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: PtlMEUnlink failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
}
|
||||
ret = PtlMDRelease(ptl_request->md_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: PtlMDRelease failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
}
|
||||
return ompi_mtl_portals4_get_error(ret);
|
||||
}
|
||||
|
||||
@ -320,7 +370,7 @@ ompi_mtl_portals4_sync_isend(void *start, int length, int contextid, int localra
|
||||
me.ignore_bits = 0;
|
||||
|
||||
ret = PtlMEAppend(ompi_mtl_portals4.ni_h,
|
||||
PTL_READ_TABLE_ID,
|
||||
ompi_mtl_portals4.read_idx,
|
||||
&me,
|
||||
PTL_PRIORITY_LIST,
|
||||
ptl_request,
|
||||
@ -329,7 +379,12 @@ ompi_mtl_portals4_sync_isend(void *start, int length, int contextid, int localra
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: PtlMEAppend failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
PtlMDRelease(ptl_request->md_h);
|
||||
ret = PtlMDRelease(ptl_request->md_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: PtlMDRelease failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
}
|
||||
return ompi_mtl_portals4_get_error(ret);
|
||||
}
|
||||
|
||||
@ -338,7 +393,7 @@ ompi_mtl_portals4_sync_isend(void *start, int length, int contextid, int localra
|
||||
length,
|
||||
PTL_ACK_REQ,
|
||||
endpoint->ptl_proc,
|
||||
PTL_SEND_TABLE_ID,
|
||||
ompi_mtl_portals4.send_idx,
|
||||
match_bits,
|
||||
0,
|
||||
ptl_request,
|
||||
@ -347,8 +402,18 @@ ompi_mtl_portals4_sync_isend(void *start, int length, int contextid, int localra
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: PtlPut failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
PtlMEUnlink(ptl_request->me_h);
|
||||
PtlMDRelease(ptl_request->md_h);
|
||||
ret = PtlMEUnlink(ptl_request->me_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: PtlMEUnlink failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
}
|
||||
ret = PtlMDRelease(ptl_request->md_h);
|
||||
if (PTL_OK != ret) {
|
||||
opal_output_verbose(1, ompi_mtl_base_output,
|
||||
"%s:%d: PtlMDRelease failed: %d",
|
||||
__FILE__, __LINE__, ret);
|
||||
}
|
||||
return ompi_mtl_portals4_get_error(ret);
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user