本文整理汇总了C++中PERUSE_TRACE_COMM_EVENT函数的典型用法代码示例。如果您正苦于以下问题:C++ PERUSE_TRACE_COMM_EVENT函数的具体用法?C++ PERUSE_TRACE_COMM_EVENT怎么用?C++ PERUSE_TRACE_COMM_EVENT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PERUSE_TRACE_COMM_EVENT函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: mca_pml_ob1_irecv
int mca_pml_ob1_irecv(void *addr,
size_t count,
ompi_datatype_t * datatype,
int src,
int tag,
struct ompi_communicator_t *comm,
struct ompi_request_t **request)
{
mca_pml_ob1_recv_request_t *recvreq;
MCA_PML_OB1_RECV_REQUEST_ALLOC(recvreq);
if (NULL == recvreq)
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV;
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq,
addr,
count, datatype, src, tag, comm, false);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&((recvreq)->req_recv.req_base),
PERUSE_RECV);
MCA_PML_OB1_RECV_REQUEST_START(recvreq);
*request = (ompi_request_t *) recvreq;
return OMPI_SUCCESS;
}
开发者ID:bharatpotnuri,项目名称:ompi,代码行数:26,代码来源:pml_ob1_irecv.c
示例2: mca_pml_ob1_recv
int mca_pml_ob1_recv(void *addr,
size_t count,
ompi_datatype_t * datatype,
int src,
int tag,
struct ompi_communicator_t *comm,
ompi_status_public_t * status)
{
mca_pml_ob1_recv_request_t recvreq;
int rc;
OBJ_CONSTRUCT(&recvreq, mca_pml_ob1_recv_request_t);
MCA_PML_OB1_RECV_REQUEST_INIT(&recvreq, addr, count, datatype,
src, tag, comm, false);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&(recvreq.req_recv.req_base),
PERUSE_RECV);
MCA_PML_OB1_RECV_REQUEST_START(&recvreq);
ompi_request_wait_completion(&recvreq.req_recv.req_base.req_ompi);
if (NULL != status) { /* return status */
*status = recvreq.req_recv.req_base.req_ompi.req_status;
}
rc = recvreq.req_recv.req_base.req_ompi.req_status.MPI_ERROR;
MCA_PML_BASE_RECV_REQUEST_FINI(&recvreq.req_recv);
OBJ_DESTRUCT(&recvreq);
return rc;
}
开发者ID:XuanWang1982,项目名称:gpfs-ompi-v19,代码行数:33,代码来源:pml_ob1_irecv.c
示例3: mca_pml_ob1_isend_init
int mca_pml_ob1_isend_init(const void *buf,
size_t count,
ompi_datatype_t * datatype,
int dst,
int tag,
mca_pml_base_send_mode_t sendmode,
ompi_communicator_t * comm,
ompi_request_t ** request)
{
mca_pml_ob1_send_request_t *sendreq = NULL;
MCA_PML_OB1_SEND_REQUEST_ALLOC(comm, dst, sendreq);
if (NULL == sendreq)
return OMPI_ERR_OUT_OF_RESOURCE;
MCA_PML_OB1_SEND_REQUEST_INIT(sendreq,
buf,
count,
datatype,
dst, tag,
comm, sendmode, true);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&(sendreq)->req_send.req_base,
PERUSE_SEND);
*request = (ompi_request_t *) sendreq;
return OMPI_SUCCESS;
}
开发者ID:rppendya,项目名称:ompi,代码行数:28,代码来源:pml_ob1_isend.c
示例4: mca_pml_ob1_isend_init
int mca_pml_ob1_isend_init(const void *buf,
size_t count,
ompi_datatype_t * datatype,
int dst,
int tag,
mca_pml_base_send_mode_t sendmode,
ompi_communicator_t * comm,
ompi_request_t ** request)
{
mca_pml_ob1_send_request_t *sendreq = NULL;
MCA_PML_OB1_SEND_REQUEST_ALLOC(comm, dst, sendreq);
if (NULL == sendreq)
return OMPI_ERR_OUT_OF_RESOURCE;
MCA_PML_OB1_SEND_REQUEST_INIT(sendreq,
buf,
count,
datatype,
dst, tag,
comm, sendmode, true);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&(sendreq)->req_send.req_base,
PERUSE_SEND);
/* Work around a leak in start by marking this request as complete. The
* problem occured because we do not have a way to differentiate an
* inital request and an incomplete pml request in start. This line
* allows us to detect this state. */
sendreq->req_send.req_base.req_pml_complete = true;
*request = (ompi_request_t *) sendreq;
return OMPI_SUCCESS;
}
开发者ID:00datman,项目名称:ompi,代码行数:34,代码来源:pml_ob1_isend.c
示例5: mca_pml_csum_irecv
int mca_pml_csum_irecv(void *addr,
size_t count,
ompi_datatype_t * datatype,
int src,
int tag,
struct ompi_communicator_t *comm,
struct ompi_request_t **request)
{
int rc;
mca_pml_csum_recv_request_t *recvreq;
MCA_PML_CSUM_RECV_REQUEST_ALLOC(recvreq, rc);
if (NULL == recvreq)
return rc;
MCA_PML_CSUM_RECV_REQUEST_INIT(recvreq,
addr,
count, datatype, src, tag, comm, false);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&((recvreq)->req_recv.req_base),
PERUSE_RECV);
MCA_PML_CSUM_RECV_REQUEST_START(recvreq);
*request = (ompi_request_t *) recvreq;
return OMPI_SUCCESS;
}
开发者ID:315234,项目名称:OpenFOAM-2.2.x-OSX,代码行数:27,代码来源:pml_csum_irecv.c
示例6: mca_pml_ob1_irecv_init
int mca_pml_ob1_irecv_init(void *addr,
size_t count,
ompi_datatype_t * datatype,
int src,
int tag,
struct ompi_communicator_t *comm,
struct ompi_request_t **request)
{
mca_pml_ob1_recv_request_t *recvreq;
MCA_PML_OB1_RECV_REQUEST_ALLOC(recvreq);
if (NULL == recvreq)
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV;
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq,
addr,
count, datatype, src, tag, comm, true);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&((recvreq)->req_recv.req_base),
PERUSE_RECV);
/* Work around a leak in start by marking this request as complete. The
* problem occured because we do not have a way to differentiate an
* inital request and an incomplete pml request in start. This line
* allows us to detect this state. */
recvreq->req_recv.req_base.req_pml_complete = true;
*request = (ompi_request_t *) recvreq;
return OMPI_SUCCESS;
}
开发者ID:bharatpotnuri,项目名称:ompi,代码行数:31,代码来源:pml_ob1_irecv.c
示例7: mca_pml_csum_recv
int mca_pml_csum_recv(void *addr,
size_t count,
ompi_datatype_t * datatype,
int src,
int tag,
struct ompi_communicator_t *comm,
ompi_status_public_t * status)
{
int rc;
mca_pml_csum_recv_request_t *recvreq;
MCA_PML_CSUM_RECV_REQUEST_ALLOC(recvreq, rc);
if (NULL == recvreq)
return rc;
MCA_PML_CSUM_RECV_REQUEST_INIT(recvreq,
addr,
count, datatype, src, tag, comm, false);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&((recvreq)->req_recv.req_base),
PERUSE_RECV);
MCA_PML_CSUM_RECV_REQUEST_START(recvreq);
ompi_request_wait_completion(&recvreq->req_recv.req_base.req_ompi);
if (NULL != status) { /* return status */
OMPI_STATUS_SET(status, &recvreq->req_recv.req_base.req_ompi.req_status);
}
rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR;
ompi_request_free( (ompi_request_t**)&recvreq );
return rc;
}
开发者ID:315234,项目名称:OpenFOAM-2.2.x-OSX,代码行数:32,代码来源:pml_csum_irecv.c
示例8: mca_pml_ob1_isend
int mca_pml_ob1_isend(const void *buf,
size_t count,
ompi_datatype_t * datatype,
int dst,
int tag,
mca_pml_base_send_mode_t sendmode,
ompi_communicator_t * comm,
ompi_request_t ** request)
{
mca_pml_ob1_comm_proc_t *ob1_proc = mca_pml_ob1_peer_lookup (comm, dst);
mca_pml_ob1_send_request_t *sendreq = NULL;
ompi_proc_t *dst_proc = ob1_proc->ompi_proc;
mca_bml_base_endpoint_t* endpoint = mca_bml_base_get_endpoint (dst_proc);
int16_t seqn;
int rc;
if (OPAL_UNLIKELY(NULL == endpoint)) {
return OMPI_ERR_UNREACH;
}
seqn = (uint16_t) OPAL_THREAD_ADD32(&ob1_proc->send_sequence, 1);
if (MCA_PML_BASE_SEND_SYNCHRONOUS != sendmode) {
rc = mca_pml_ob1_send_inline (buf, count, datatype, dst, tag, seqn, dst_proc,
endpoint, comm);
if (OPAL_LIKELY(0 <= rc)) {
/* NTH: it is legal to return ompi_request_empty since the only valid
* field in a send completion status is whether or not the send was
* cancelled (which it can't be at this point anyway). */
*request = &ompi_request_empty;
return OMPI_SUCCESS;
}
}
MCA_PML_OB1_SEND_REQUEST_ALLOC(comm, dst, sendreq);
if (NULL == sendreq)
return OMPI_ERR_OUT_OF_RESOURCE;
MCA_PML_OB1_SEND_REQUEST_INIT(sendreq,
buf,
count,
datatype,
dst, tag,
comm, sendmode, false);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&(sendreq)->req_send.req_base,
PERUSE_SEND);
MCA_PML_OB1_SEND_REQUEST_START_W_SEQ(sendreq, endpoint, seqn, rc);
*request = (ompi_request_t *) sendreq;
return rc;
}
开发者ID:00datman,项目名称:ompi,代码行数:53,代码来源:pml_ob1_isend.c
示例9: mca_pml_ob1_recv
int mca_pml_ob1_recv(void *addr,
size_t count,
ompi_datatype_t * datatype,
int src,
int tag,
struct ompi_communicator_t *comm,
ompi_status_public_t * status)
{
mca_pml_ob1_recv_request_t *recvreq = NULL;
int rc;
#if !OMPI_ENABLE_THREAD_MULTIPLE
recvreq = mca_pml_ob1_recvreq;
mca_pml_ob1_recvreq = NULL;
if( OPAL_UNLIKELY(NULL == recvreq) )
#endif /* !OMPI_ENABLE_THREAD_MULTIPLE */
{
MCA_PML_OB1_RECV_REQUEST_ALLOC(recvreq);
if (NULL == recvreq)
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
}
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq, addr, count, datatype,
src, tag, comm, false);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&(recvreq->req_recv.req_base),
PERUSE_RECV);
MCA_PML_OB1_RECV_REQUEST_START(recvreq);
ompi_request_wait_completion(&recvreq->req_recv.req_base.req_ompi);
if (NULL != status) { /* return status */
*status = recvreq->req_recv.req_base.req_ompi.req_status;
}
rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR;
#if OMPI_ENABLE_THREAD_MULTIPLE
MCA_PML_OB1_RECV_REQUEST_RETURN(recvreq);
#else
if( NULL != mca_pml_ob1_recvreq ) {
MCA_PML_OB1_RECV_REQUEST_RETURN(recvreq);
} else {
mca_pml_ob1_recv_request_fini (recvreq);
mca_pml_ob1_recvreq = recvreq;
}
#endif
return rc;
}
开发者ID:AT95,项目名称:ompi,代码行数:51,代码来源:pml_ob1_irecv.c
示例10: mca_pml_ob1_recv
int mca_pml_ob1_recv(void *addr,
size_t count,
ompi_datatype_t * datatype,
int src,
int tag,
struct ompi_communicator_t *comm,
ompi_status_public_t * status)
{
mca_pml_ob1_recv_request_t *recvreq = NULL;
int rc;
if (OPAL_LIKELY(!ompi_mpi_thread_multiple)) {
recvreq = mca_pml_ob1_recvreq;
mca_pml_ob1_recvreq = NULL;
}
if( OPAL_UNLIKELY(NULL == recvreq) ) {
MCA_PML_OB1_RECV_REQUEST_ALLOC(recvreq);
if (NULL == recvreq)
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
}
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV;
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq, addr, count, datatype,
src, tag, comm, false);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&(recvreq->req_recv.req_base),
PERUSE_RECV);
MCA_PML_OB1_RECV_REQUEST_START(recvreq);
ompi_request_wait_completion(&recvreq->req_recv.req_base.req_ompi);
if (NULL != status) { /* return status */
*status = recvreq->req_recv.req_base.req_ompi.req_status;
}
rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR;
if (OPAL_UNLIKELY(ompi_mpi_thread_multiple || NULL != mca_pml_ob1_recvreq)) {
MCA_PML_OB1_RECV_REQUEST_RETURN(recvreq);
} else {
mca_pml_ob1_recv_request_fini (recvreq);
mca_pml_ob1_recvreq = recvreq;
}
return rc;
}
开发者ID:larrystevenwise,项目名称:ompi,代码行数:48,代码来源:pml_ob1_irecv.c
示例11: mca_pml_ob1_recv
int mca_pml_ob1_recv(void *addr,
size_t count,
ompi_datatype_t * datatype,
int src,
int tag,
struct ompi_communicator_t *comm,
ompi_status_public_t * status)
{
mca_pml_ob1_recv_request_t *recvreq = NULL;
int rc;
if (OPAL_LIKELY(!ompi_mpi_thread_multiple)) {
recvreq = mca_pml_ob1_recvreq;
mca_pml_ob1_recvreq = NULL;
}
if( OPAL_UNLIKELY(NULL == recvreq) ) {
MCA_PML_OB1_RECV_REQUEST_ALLOC(recvreq);
if (NULL == recvreq)
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
}
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV;
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq, addr, count, datatype,
src, tag, comm, false);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&(recvreq->req_recv.req_base),
PERUSE_RECV);
MCA_PML_OB1_RECV_REQUEST_START(recvreq);
ompi_request_wait_completion(&recvreq->req_recv.req_base.req_ompi);
if (NULL != status) { /* return status */
*status = recvreq->req_recv.req_base.req_ompi.req_status;
}
rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR;
if (recvreq->req_recv.req_base.req_pml_complete) {
/* make buffer defined when the request is compeleted,
and before releasing the objects. */
MEMCHECKER(
memchecker_call(&opal_memchecker_base_mem_defined,
recvreq->req_recv.req_base.req_addr,
recvreq->req_recv.req_base.req_count,
recvreq->req_recv.req_base.req_datatype);
);
开发者ID:bharatpotnuri,项目名称:ompi,代码行数:48,代码来源:pml_ob1_irecv.c
示例12: mca_pml_ob1_send_request_free
/*
* The free call mark the final stage in a request life-cycle. Starting from this
* point the request is completed at both PML and user level, and can be used
* for others p2p communications. Therefore, in the case of the OB1 PML it should
* be added to the free request list.
*/
static int mca_pml_ob1_send_request_free(struct ompi_request_t** request)
{
mca_pml_ob1_send_request_t* sendreq = *(mca_pml_ob1_send_request_t**)request;
if(false == sendreq->req_send.req_base.req_free_called) {
sendreq->req_send.req_base.req_free_called = true;
PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_NOTIFY,
&(sendreq->req_send.req_base), PERUSE_SEND );
if( true == sendreq->req_send.req_base.req_pml_complete ) {
/* make buffer defined when the request is compeleted,
and before releasing the objects. */
MEMCHECKER(
memchecker_call(&opal_memchecker_base_mem_defined,
sendreq->req_send.req_base.req_addr,
sendreq->req_send.req_base.req_count,
sendreq->req_send.req_base.req_datatype);
);
开发者ID:brminich,项目名称:ompi,代码行数:24,代码来源:pml_ob1_sendreq.c
示例13: mca_pml_ob1_send
int mca_pml_ob1_send(void *buf,
size_t count,
ompi_datatype_t * datatype,
int dst,
int tag,
mca_pml_base_send_mode_t sendmode,
ompi_communicator_t * comm)
{
mca_pml_ob1_comm_t* ob1_comm = comm->c_pml_comm;
ompi_proc_t *dst_proc = ompi_comm_peer_lookup (comm, dst);
mca_bml_base_endpoint_t* endpoint = (mca_bml_base_endpoint_t*)
dst_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML];
mca_pml_ob1_send_request_t *sendreq =
alloca(mca_pml_base_send_requests.fl_frag_size);
int16_t seqn;
int rc;
if (OPAL_UNLIKELY(MCA_PML_BASE_SEND_BUFFERED == sendmode)) {
/* large buffered sends *need* a real request so use isend instead */
ompi_request_t *brequest;
rc = mca_pml_ob1_isend (buf, count, datatype, dst, tag, sendmode, comm, &brequest);
if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) {
return rc;
}
/* free the request and return. don't care if it completes now */
ompi_request_free (&brequest);
return OMPI_SUCCESS;
}
if (OPAL_UNLIKELY(NULL == endpoint)) {
return OMPI_ERR_UNREACH;
}
seqn = (uint16_t) OPAL_THREAD_ADD32(&ob1_comm->procs[dst].send_sequence, 1);
if (MCA_PML_BASE_SEND_SYNCHRONOUS != sendmode) {
rc = mca_pml_ob1_send_inline (buf, count, datatype, dst, tag, seqn, dst_proc,
endpoint, comm);
if (OPAL_LIKELY(0 <= rc)) {
return OMPI_SUCCESS;
}
}
OBJ_CONSTRUCT(sendreq, mca_pml_ob1_send_request_t);
sendreq->req_send.req_base.req_proc = dst_proc;
sendreq->src_des = NULL;
MCA_PML_OB1_SEND_REQUEST_INIT(sendreq,
buf,
count,
datatype,
dst, tag,
comm, sendmode, false);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&sendreq->req_send.req_base,
PERUSE_SEND);
MCA_PML_OB1_SEND_REQUEST_START_W_SEQ(sendreq, endpoint, seqn, rc);
if (rc != OMPI_SUCCESS) {
return rc;
}
ompi_request_wait_completion(&sendreq->req_send.req_base.req_ompi);
rc = sendreq->req_send.req_base.req_ompi.req_status.MPI_ERROR;
MCA_PML_BASE_SEND_REQUEST_FINI(&sendreq->req_send);
OBJ_DESTRUCT(sendreq);
return rc;
}
开发者ID:urids,项目名称:XSCALAMPI,代码行数:73,代码来源:pml_ob1_isend.c
示例14: mca_pml_ob1_send
int mca_pml_ob1_send(const void *buf,
size_t count,
ompi_datatype_t * datatype,
int dst,
int tag,
mca_pml_base_send_mode_t sendmode,
ompi_communicator_t * comm)
{
mca_pml_ob1_comm_proc_t *ob1_proc = mca_pml_ob1_peer_lookup (comm, dst);
ompi_proc_t *dst_proc = ob1_proc->ompi_proc;
mca_bml_base_endpoint_t* endpoint = mca_bml_base_get_endpoint (dst_proc);
mca_pml_ob1_send_request_t *sendreq = NULL;
int16_t seqn;
int rc;
if (OPAL_UNLIKELY(NULL == endpoint)) {
return OMPI_ERR_UNREACH;
}
if (OPAL_UNLIKELY(MCA_PML_BASE_SEND_BUFFERED == sendmode)) {
/* large buffered sends *need* a real request so use isend instead */
ompi_request_t *brequest;
rc = mca_pml_ob1_isend (buf, count, datatype, dst, tag, sendmode, comm, &brequest);
if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) {
return rc;
}
ompi_request_wait_completion (brequest);
ompi_request_free (&brequest);
return OMPI_SUCCESS;
}
seqn = (uint16_t) OPAL_THREAD_ADD32(&ob1_proc->send_sequence, 1);
/**
* The immediate send will not have a request, so they are
* intracable from the point of view of any debugger attached to
* the parallel application.
*/
if (MCA_PML_BASE_SEND_SYNCHRONOUS != sendmode) {
rc = mca_pml_ob1_send_inline (buf, count, datatype, dst, tag, seqn, dst_proc,
endpoint, comm);
if (OPAL_LIKELY(0 <= rc)) {
return OMPI_SUCCESS;
}
}
if (OPAL_LIKELY(!ompi_mpi_thread_multiple)) {
sendreq = mca_pml_ob1_sendreq;
mca_pml_ob1_sendreq = NULL;
}
if( OPAL_UNLIKELY(NULL == sendreq) ) {
MCA_PML_OB1_SEND_REQUEST_ALLOC(comm, dst, sendreq);
if (NULL == sendreq)
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
}
sendreq->req_send.req_base.req_proc = dst_proc;
sendreq->rdma_frag = NULL;
MCA_PML_OB1_SEND_REQUEST_INIT(sendreq,
buf,
count,
datatype,
dst, tag,
comm, sendmode, false);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&sendreq->req_send.req_base,
PERUSE_SEND);
MCA_PML_OB1_SEND_REQUEST_START_W_SEQ(sendreq, endpoint, seqn, rc);
if (OPAL_LIKELY(rc == OMPI_SUCCESS)) {
ompi_request_wait_completion(&sendreq->req_send.req_base.req_ompi);
rc = sendreq->req_send.req_base.req_ompi.req_status.MPI_ERROR;
}
if (OPAL_UNLIKELY(ompi_mpi_thread_multiple || NULL != mca_pml_ob1_sendreq)) {
MCA_PML_OB1_SEND_REQUEST_RETURN(sendreq);
} else {
mca_pml_ob1_send_request_fini (sendreq);
mca_pml_ob1_sendreq = sendreq;
}
return rc;
}
开发者ID:00datman,项目名称:ompi,代码行数:89,代码来源:pml_ob1_isend.c
示例15: mca_pml_bfo_mrecv
int
mca_pml_bfo_mrecv( void *buf,
size_t count,
ompi_datatype_t *datatype,
struct ompi_message_t **message,
ompi_status_public_t* status )
{
mca_pml_bfo_recv_frag_t* frag;
mca_pml_bfo_recv_request_t *recvreq;
mca_pml_bfo_hdr_t *hdr;
int src, tag, rc;
ompi_communicator_t *comm;
mca_pml_bfo_comm_proc_t* proc;
mca_pml_bfo_comm_t* bfo_comm;
uint64_t seq;
/* get the request from the message and the frag from the request
before we overwrite everything */
comm = (*message)->comm;
recvreq = (mca_pml_bfo_recv_request_t*) (*message)->req_ptr;
frag = (mca_pml_bfo_recv_frag_t*) recvreq->req_recv.req_base.req_addr;
src = recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE;
tag = recvreq->req_recv.req_base.req_ompi.req_status.MPI_TAG;
seq = recvreq->req_recv.req_base.req_sequence;
bfo_comm = recvreq->req_recv.req_base.req_comm->c_pml_comm;
/* make the request a recv request again */
/* The old request kept pointers to comm and the char datatype.
We're about to release those, but need to make sure comm
doesn't go out of scope (we don't care about the char datatype
anymore). So retain comm, then release the frag, then reinit
the frag (which will retain comm), then release comm (but the
frag still has it's ref, so it'll stay in scope). Make
sense? */
OBJ_RETAIN(comm);
MCA_PML_BASE_RECV_REQUEST_FINI(&recvreq->req_recv);
recvreq->req_recv.req_base.req_type = MCA_PML_REQUEST_RECV;
MCA_PML_BFO_RECV_REQUEST_INIT(recvreq,
buf,
count, datatype,
src, tag, comm, false);
OBJ_RELEASE(comm);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&((recvreq)->req_recv.req_base),
PERUSE_RECV);
/* init/re-init the request */
recvreq->req_lock = 0;
recvreq->req_pipeline_depth = 0;
recvreq->req_bytes_received = 0;
recvreq->req_rdma_cnt = 0;
recvreq->req_rdma_idx = 0;
recvreq->req_pending = false;
MCA_PML_BASE_RECV_START(&recvreq->req_recv.req_base);
/* Note - sequence number already assigned */
recvreq->req_recv.req_base.req_sequence = seq;
proc = &bfo_comm->procs[recvreq->req_recv.req_base.req_peer];
recvreq->req_recv.req_base.req_proc = proc->ompi_proc;
prepare_recv_req_converter(recvreq);
/* we can't go through the match, since we already have the match.
Cheat and do what REQUEST_START does, but without the frag
search */
hdr = (mca_pml_bfo_hdr_t*)frag->segments->seg_addr.pval;
switch(hdr->hdr_common.hdr_type) {
case MCA_PML_BFO_HDR_TYPE_MATCH:
mca_pml_bfo_recv_request_progress_match(recvreq, frag->btl, frag->segments,
frag->num_segments);
break;
case MCA_PML_BFO_HDR_TYPE_RNDV:
mca_pml_bfo_recv_request_progress_rndv(recvreq, frag->btl, frag->segments,
frag->num_segments);
break;
case MCA_PML_BFO_HDR_TYPE_RGET:
mca_pml_bfo_recv_request_progress_rget(recvreq, frag->btl, frag->segments,
frag->num_segments);
break;
default:
assert(0);
}
ompi_message_return(*message);
*message = MPI_MESSAGE_NULL;
ompi_request_wait_completion(&(recvreq->req_recv.req_base.req_ompi));
MCA_PML_BFO_RECV_FRAG_RETURN(frag);
if (NULL != status) { /* return status */
*status = recvreq->req_recv.req_base.req_ompi.req_status;
}
rc = recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR;
ompi_request_free( (ompi_request_t**)&recvreq );
return rc;
}
开发者ID:Dissolubilis,项目名称:ompi-svn-mirror,代码行数:98,代码来源:pml_bfo_irecv.c
示例16: mca_pml_ob1_send
int mca_pml_ob1_send(void *buf,
size_t count,
ompi_datatype_t * datatype,
int dst,
int tag,
mca_pml_base_send_mode_t sendmode,
ompi_communicator_t * comm)
{
mca_pml_ob1_comm_t* ob1_comm = comm->c_pml_comm;
ompi_proc_t *dst_proc = ompi_comm_peer_lookup (comm, dst);
mca_bml_base_endpoint_t* endpoint = (mca_bml_base_endpoint_t*)
dst_proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML];
mca_pml_ob1_send_request_t *sendreq = NULL;
int16_t seqn;
int rc;
if (OPAL_UNLIKELY(MCA_PML_BASE_SEND_BUFFERED == sendmode)) {
/* large buffered sends *need* a real request so use isend instead */
ompi_request_t *brequest;
rc = mca_pml_ob1_isend (buf, count, datatype, dst, tag, sendmode, comm, &brequest);
if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) {
return rc;
}
/* free the request and return. don't care if it completes now */
ompi_request_free (&brequest);
return OMPI_SUCCESS;
}
if (OPAL_UNLIKELY(NULL == endpoint)) {
return OMPI_ERR_UNREACH;
}
seqn = (uint16_t) OPAL_THREAD_ADD32(&ob1_comm->procs[dst].send_sequence, 1);
/**
* The immediate send will not have a request, so they are
* intracable from the point of view of any debugger attached to
* the parallel application.
*/
if (MCA_PML_BASE_SEND_SYNCHRONOUS != sendmode) {
rc = mca_pml_ob1_send_inline (buf, count, datatype, dst, tag, seqn, dst_proc,
endpoint, comm);
if (OPAL_LIKELY(0 <= rc)) {
return OMPI_SUCCESS;
}
}
#if !OMPI_ENABLE_THREAD_MULTIPLE
sendreq = mca_pml_ob1_sendreq;
if( OPAL_UNLIKELY(NULL == sendreq) )
#endif /* !OMPI_ENABLE_THREAD_MULTIPLE */
{
MCA_PML_OB1_SEND_REQUEST_ALLOC(comm, dst, sendreq);
if (NULL == sendreq)
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
#if !OMPI_ENABLE_THREAD_MULTIPLE
mca_pml_ob1_sendreq = sendreq;
#endif /* !OMPI_ENABLE_THREAD_MULTIPLE */
}
sendreq->req_send.req_base.req_proc = dst_proc;
sendreq->rdma_frag = NULL;
MCA_PML_OB1_SEND_REQUEST_INIT(sendreq,
buf,
count,
datatype,
dst, tag,
comm, sendmode, false);
PERUSE_TRACE_COMM_EVENT (PERUSE_COMM_REQ_ACTIVATE,
&sendreq->req_send.req_base,
PERUSE_SEND);
MCA_PML_OB1_SEND_REQUEST_START_W_SEQ(sendreq, endpoint, seqn, rc);
if (OPAL_LIKELY(rc == OMPI_SUCCESS)) {
ompi_request_wait_completion(&sendreq->req_send.req_base.req_ompi);
rc = sendreq->req_send.req_base.req_ompi.req_status.MPI_ERROR;
}
#if OMPI_ENABLE_THREAD_MULTIPLE
MCA_PML_OB1_SEND_REQUEST_RETURN(sendreq);
#else
mca_pml_ob1_send_request_fini (sendreq);
#endif
return rc;
}
开发者ID:XuanWang1982,项目名称:ompi,代码行数:90,代码来源:pml_ob1_isend.c
注:本文中的PERUSE_TRACE_COMM_EVENT函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论