Add multi-threaded support.
Этот коммит содержится в:
родитель
b2cf74cabc
Коммит
67b70bb47a
@ -94,15 +94,21 @@ int mca_pml_ob1_recv(void *addr,
|
||||
struct ompi_communicator_t *comm,
|
||||
ompi_status_public_t * status)
|
||||
{
|
||||
mca_pml_ob1_recv_request_t *recvreq = mca_pml_ob1_recvreq;
|
||||
mca_pml_ob1_recv_request_t *recvreq = NULL;
|
||||
int rc;
|
||||
|
||||
if( NULL == recvreq ) {
|
||||
MCA_PML_OB1_RECV_REQUEST_ALLOC(recvreq);
|
||||
if (NULL == recvreq)
|
||||
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
|
||||
mca_pml_ob1_recvreq = recvreq;
|
||||
}
|
||||
#if !OPAL_ENABLE_MULTI_THREADS
|
||||
recvreq = mca_pml_ob1_recvreq;
|
||||
if( OPAL_UNLIKELY(NULL == recvreq) )
|
||||
#endif /* !OPAL_ENABLE_MULTI_THREADS */
|
||||
{
|
||||
MCA_PML_OB1_RECV_REQUEST_ALLOC(recvreq);
|
||||
if (NULL == recvreq)
|
||||
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
|
||||
#if !OPAL_ENABLE_MULTI_THREADS
|
||||
mca_pml_ob1_recvreq = recvreq;
|
||||
#endif /* !OPAL_ENABLE_MULTI_THREADS */
|
||||
}
|
||||
OBJ_CONSTRUCT(recvreq, mca_pml_ob1_recv_request_t);
|
||||
|
||||
MCA_PML_OB1_RECV_REQUEST_INIT(recvreq, addr, count, datatype,
|
||||
|
@ -183,7 +183,7 @@ int mca_pml_ob1_send(void *buf,
|
||||
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 = mca_pml_ob1_sendreq;
|
||||
mca_pml_ob1_send_request_t *sendreq = NULL;
|
||||
int16_t seqn;
|
||||
int rc;
|
||||
|
||||
@ -220,13 +220,18 @@ int mca_pml_ob1_send(void *buf,
|
||||
}
|
||||
}
|
||||
|
||||
if( NULL == sendreq ) {
|
||||
MCA_PML_OB1_SEND_REQUEST_ALLOC(comm, dst, sendreq);
|
||||
if (NULL == sendreq)
|
||||
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
|
||||
mca_pml_ob1_sendreq = sendreq;
|
||||
}
|
||||
|
||||
#if !OPAL_ENABLE_MULTI_THREADS
|
||||
sendreq = mca_pml_ob1_sendreq;
|
||||
if( OPAL_UNLIKELY(NULL == sendreq) )
|
||||
#endif /* !OPAL_ENABLE_MULTI_THREADS */
|
||||
{
|
||||
MCA_PML_OB1_SEND_REQUEST_ALLOC(comm, dst, sendreq);
|
||||
if (NULL == sendreq)
|
||||
return OMPI_ERR_TEMP_OUT_OF_RESOURCE;
|
||||
#if !OPAL_ENABLE_MULTI_THREADS
|
||||
mca_pml_ob1_sendreq = sendreq;
|
||||
#endif /* !OPAL_ENABLE_MULTI_THREADS */
|
||||
}
|
||||
OBJ_CONSTRUCT(sendreq, mca_pml_ob1_send_request_t);
|
||||
sendreq->req_send.req_base.req_proc = dst_proc;
|
||||
sendreq->rdma_frag = NULL;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user