1
1
This commit was SVN r25066.
Этот коммит содержится в:
Mike Dubman 2011-08-19 22:18:17 +00:00
родитель 8dd26993fc
Коммит 98f382ba0e
2 изменённых файлов: 42 добавлений и 28 удалений

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

@ -63,19 +63,22 @@ int ompi_mtl_mxm_irecv(struct mca_mtl_base_module_t* mtl,
return ret;
}
/* prepare a receive request embedded in the MTL request */
mxm_recv_req = &mtl_mxm_request->mxm.recv;
/* prepare a receive request embedded in the MTL request */
mxm_recv_req->base.state = MXM_REQ_NEW;
mxm_recv_req->base.mq = (mxm_mq_h)comm->c_pml_comm;
mxm_recv_req->tag = tag;
mxm_recv_req->tag_mask = (tag == MPI_ANY_TAG) ? 0 : 0xffffffffU;
mxm_recv_req->base.conn = (src == MPI_ANY_SOURCE) ? NULL : ompi_mtl_mxm_conn_lookup(comm, src);
mxm_recv_req->base.mq = ompi_mtl_mxm_mq_lookup(comm);
mxm_recv_req->base.conn = (src == MPI_ANY_SOURCE) ? NULL :
ompi_mtl_mxm_conn_lookup(comm, src);
mxm_recv_req->base.flags = 0;
mxm_recv_req->base.data_type = MXM_REQ_DATA_BUFFER;
mxm_recv_req->base.data.buffer.ptr = mtl_mxm_request->buf;
mxm_recv_req->base.data.buffer.length = mtl_mxm_request->length;
mxm_recv_req->base.completed_cb = ompi_mtl_mxm_recv_completion_cb;
mxm_recv_req->base.data.buffer.mkey = MXM_MKEY_NONE;
mxm_recv_req->base.context = mtl_mxm_request;
mxm_recv_req->base.completed_cb = ompi_mtl_mxm_recv_completion_cb;
mxm_recv_req->tag = tag;
mxm_recv_req->tag_mask = (tag == MPI_ANY_TAG) ? 0 : 0xffffffffU;
/* post-recv */
err = mxm_req_recv(mxm_recv_req);

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

@ -44,20 +44,27 @@ int ompi_mtl_mxm_send(struct mca_mtl_base_module_t* mtl,
mxm_send_req.base.state = MXM_REQ_NEW;
mxm_send_req.base.mq = ompi_mtl_mxm_mq_lookup(comm);
mxm_send_req.base.conn = ompi_mtl_mxm_conn_lookup(comm, dest);
mxm_send_req.op.send.tag = tag;
mxm_send_req.op.send.imm_data = ompi_comm_rank(comm);
mxm_send_req.base.completed_cb = NULL;
mxm_send_req.base.flags = MXM_REQ_FLAG_WAIT;
if (mode == MCA_PML_BASE_SEND_SYNCHRONOUS) {
mxm_send_req.base.flags |= MXM_REQ_FLAG_SEND_SYNC;
}
ret = ompi_mtl_datatype_pack(convertor, &mxm_send_req.base.data.buffer.ptr, &mxm_send_req.base.data.buffer.length,
mxm_send_req.base.data_type = MXM_REQ_DATA_BUFFER;
ret = ompi_mtl_datatype_pack(convertor, &mxm_send_req.base.data.buffer.ptr,
&mxm_send_req.base.data.buffer.length,
&free_after);
if (OMPI_SUCCESS != ret) {
return ret;
}
mxm_send_req.base.data.buffer.mkey = MXM_MKEY_NONE;
mxm_send_req.base.context = NULL;
mxm_send_req.base.completed_cb = NULL;
mxm_send_req.opcode = MXM_REQ_OP_SEND;
mxm_send_req.op.send.tag = tag;
mxm_send_req.op.send.imm_data = ompi_comm_rank(comm);
/* post-send */
err = mxm_req_send(&mxm_send_req);
if (MXM_OK != err) {
@ -99,12 +106,16 @@ int ompi_mtl_mxm_isend(struct mca_mtl_base_module_t* mtl,
mxm_send_req->base.state = MXM_REQ_NEW;
mxm_send_req->base.mq = ompi_mtl_mxm_mq_lookup(comm);
mxm_send_req->base.conn = ompi_mtl_mxm_conn_lookup(comm, dest);
mxm_send_req->op.send.tag = tag;
mxm_send_req->op.send.imm_data = ompi_comm_rank(comm);
mxm_send_req->base.flags = 0;
mxm_send_req->base.data_type = MXM_REQ_DATA_BUFFER;
mxm_send_req->base.data.buffer.ptr = mtl_mxm_request->buf;
mxm_send_req->base.data.buffer.length = mtl_mxm_request->length;
mxm_send_req->base.completed_cb = ompi_mtl_mxm_send_completion_cb;
mxm_send_req->base.data.buffer.mkey = MXM_MKEY_NONE;
mxm_send_req->base.context = mtl_mxm_request;
mxm_send_req->base.completed_cb = ompi_mtl_mxm_send_completion_cb;
mxm_send_req->opcode = MXM_REQ_OP_SEND;
mxm_send_req->op.send.tag = tag;
mxm_send_req->op.send.imm_data = ompi_comm_rank(comm);
if (mode == MCA_PML_BASE_SEND_SYNCHRONOUS) {
mxm_send_req->base.flags |= MXM_REQ_FLAG_SEND_SYNC;