Use the new memchecker function call which is based on convertor.
Remove one unnecessary call. This commit was SVN r18085.
Этот коммит содержится в:
родитель
a913a60c24
Коммит
a1e5df1cc9
@ -72,10 +72,8 @@ static int mca_pml_ob1_recv_request_free(struct ompi_request_t** request)
|
||||
* Package successfully received, make user buffer accessable.
|
||||
*/
|
||||
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);
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_defined,
|
||||
&recvreq->req_recv.req_base.req_convertor);
|
||||
);
|
||||
*request = MPI_REQUEST_NULL;
|
||||
return OMPI_SUCCESS;
|
||||
@ -91,10 +89,8 @@ static int mca_pml_ob1_recv_request_cancel(struct ompi_request_t* ompi_request,
|
||||
* Receive request completed, make user buffer accessable.
|
||||
*/
|
||||
MEMCHECKER(
|
||||
memchecker_call(&opal_memchecker_base_mem_defined,
|
||||
request->req_recv.req_base.req_addr,
|
||||
request->req_recv.req_base.req_count,
|
||||
request->req_recv.req_base.req_datatype);
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_defined,
|
||||
&request->req_recv.req_base.req_convertor);
|
||||
);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -130,10 +126,8 @@ static int mca_pml_ob1_recv_request_cancel(struct ompi_request_t* ompi_request,
|
||||
* Receive request cancelled, make user buffer accessable.
|
||||
*/
|
||||
MEMCHECKER(
|
||||
memchecker_call(&opal_memchecker_base_mem_defined,
|
||||
request->req_recv.req_base.req_addr,
|
||||
request->req_recv.req_base.req_count,
|
||||
request->req_recv.req_base.req_datatype);
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_defined,
|
||||
&request->req_recv.req_base.req_convertor);
|
||||
);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -484,10 +478,8 @@ void mca_pml_ob1_recv_request_progress( mca_pml_ob1_recv_request_t* recvreq,
|
||||
* Make user buffer accessible (defined) before unpacking.
|
||||
*/
|
||||
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);
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_defined,
|
||||
&recvreq->req_recv.req_base.req_convertor);
|
||||
);
|
||||
MCA_PML_OB1_RECV_REQUEST_UNPACK( recvreq,
|
||||
segments,
|
||||
@ -500,19 +492,17 @@ void mca_pml_ob1_recv_request_progress( mca_pml_ob1_recv_request_t* recvreq,
|
||||
* Unpacking finished, make the user buffer unaccessable again.
|
||||
*/
|
||||
MEMCHECKER(
|
||||
memchecker_call(&opal_memchecker_base_mem_noaccess,
|
||||
recvreq->req_recv.req_base.req_addr,
|
||||
recvreq->req_recv.req_base.req_count,
|
||||
recvreq->req_recv.req_base.req_datatype);
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_noaccess,
|
||||
&recvreq->req_recv.req_base.req_convertor);
|
||||
);
|
||||
break;
|
||||
|
||||
case MCA_PML_OB1_HDR_TYPE_RNDV:
|
||||
|
||||
bytes_received -= sizeof(mca_pml_ob1_rendezvous_hdr_t);
|
||||
recvreq->req_recv.req_bytes_packed = hdr->hdr_rndv.hdr_msg_length;
|
||||
recvreq->req_send = hdr->hdr_rndv.hdr_src_req;
|
||||
recvreq->req_rdma_offset = bytes_received;
|
||||
bytes_received -= sizeof(mca_pml_ob1_rendezvous_hdr_t);
|
||||
recvreq->req_recv.req_bytes_packed = hdr->hdr_rndv.hdr_msg_length;
|
||||
recvreq->req_send = hdr->hdr_rndv.hdr_src_req;
|
||||
recvreq->req_rdma_offset = bytes_received;
|
||||
MCA_PML_OB1_RECV_REQUEST_MATCHED(recvreq, &hdr->hdr_match);
|
||||
mca_pml_ob1_recv_request_ack(recvreq, &hdr->hdr_rndv, bytes_received);
|
||||
/**
|
||||
@ -521,6 +511,10 @@ void mca_pml_ob1_recv_request_progress( mca_pml_ob1_recv_request_t* recvreq,
|
||||
* unpack.
|
||||
*/
|
||||
if( 0 < bytes_received ) {
|
||||
MEMCHECKER(
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_defined,
|
||||
&recvreq->req_recv.req_base.req_convertor);
|
||||
);
|
||||
MCA_PML_OB1_RECV_REQUEST_UNPACK( recvreq,
|
||||
segments,
|
||||
num_segments,
|
||||
@ -528,6 +522,10 @@ void mca_pml_ob1_recv_request_progress( mca_pml_ob1_recv_request_t* recvreq,
|
||||
data_offset,
|
||||
bytes_received,
|
||||
bytes_delivered );
|
||||
MEMCHECKER(
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_noaccess,
|
||||
&recvreq->req_recv.req_base.req_convertor);
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -545,10 +543,8 @@ void mca_pml_ob1_recv_request_progress( mca_pml_ob1_recv_request_t* recvreq,
|
||||
* Make user buffer accessable(defined) before unpacking.
|
||||
*/
|
||||
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);
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_defined,
|
||||
&recvreq->req_recv.req_base.req_convertor);
|
||||
);
|
||||
MCA_PML_OB1_RECV_REQUEST_UNPACK( recvreq,
|
||||
segments,
|
||||
@ -561,10 +557,8 @@ void mca_pml_ob1_recv_request_progress( mca_pml_ob1_recv_request_t* recvreq,
|
||||
* Unpacking finished, make the user buffer unaccessable again.
|
||||
*/
|
||||
MEMCHECKER(
|
||||
memchecker_call(&opal_memchecker_base_mem_noaccess,
|
||||
recvreq->req_recv.req_base.req_addr,
|
||||
recvreq->req_recv.req_base.req_count,
|
||||
recvreq->req_recv.req_base.req_datatype);
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_noaccess,
|
||||
&recvreq->req_recv.req_base.req_convertor);
|
||||
);
|
||||
break;
|
||||
|
||||
|
@ -436,10 +436,8 @@ int mca_pml_ob1_send_request_start_copy( mca_pml_ob1_send_request_t* sendreq,
|
||||
* accessable.
|
||||
*/
|
||||
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);
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_defined,
|
||||
&sendreq->req_send.req_base.req_convertor);
|
||||
);
|
||||
(void)ompi_convertor_pack( &sendreq->req_send.req_base.req_convertor,
|
||||
&iov, &iov_count, &max_data );
|
||||
@ -447,10 +445,8 @@ int mca_pml_ob1_send_request_start_copy( mca_pml_ob1_send_request_t* sendreq,
|
||||
* Packing finished, make the user buffer unaccessable.
|
||||
*/
|
||||
MEMCHECKER(
|
||||
memchecker_call(&opal_memchecker_base_mem_noaccess,
|
||||
sendreq->req_send.req_base.req_addr,
|
||||
sendreq->req_send.req_base.req_count,
|
||||
sendreq->req_send.req_base.req_datatype);
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_noaccess,
|
||||
&sendreq->req_send.req_base.req_convertor);
|
||||
);
|
||||
}
|
||||
|
||||
@ -580,6 +576,10 @@ int mca_pml_ob1_send_request_start_rdma(
|
||||
bml_btl->btl_flags & MCA_BTL_FLAGS_GET) {
|
||||
size_t old_position = sendreq->req_send.req_base.req_convertor.bConverted;
|
||||
|
||||
MEMCHECKER(
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_defined,
|
||||
&sendreq->req_send.req_base.req_convertor);
|
||||
);
|
||||
/* prepare source descriptor/segment(s) */
|
||||
/* PML owns this descriptor and will free it in */
|
||||
/* get_completion */
|
||||
@ -591,6 +591,10 @@ int mca_pml_ob1_send_request_start_rdma(
|
||||
&size,
|
||||
0,
|
||||
&src );
|
||||
MEMCHECKER(
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_noaccess,
|
||||
&sendreq->req_send.req_base.req_convertor);
|
||||
);
|
||||
if( OPAL_UNLIKELY(NULL == src) ) {
|
||||
ompi_convertor_set_position(&sendreq->req_send.req_base.req_convertor,
|
||||
&old_position);
|
||||
@ -719,6 +723,10 @@ int mca_pml_ob1_send_request_start_rndv( mca_pml_ob1_send_request_t* sendreq,
|
||||
sizeof(mca_pml_ob1_rendezvous_hdr_t),
|
||||
MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP );
|
||||
} else {
|
||||
MEMCHECKER(
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_defined,
|
||||
&sendreq->req_send.req_base.req_convertor);
|
||||
);
|
||||
mca_bml_base_prepare_src( bml_btl,
|
||||
NULL,
|
||||
&sendreq->req_send.req_base.req_convertor,
|
||||
@ -727,6 +735,10 @@ int mca_pml_ob1_send_request_start_rndv( mca_pml_ob1_send_request_t* sendreq,
|
||||
&size,
|
||||
MCA_BTL_DES_FLAGS_PRIORITY | MCA_BTL_DES_FLAGS_BTL_OWNERSHIP,
|
||||
&des );
|
||||
MEMCHECKER(
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_noaccess,
|
||||
&sendreq->req_send.req_base.req_convertor);
|
||||
);
|
||||
}
|
||||
|
||||
if( OPAL_UNLIKELY(NULL == des) ) {
|
||||
@ -918,11 +930,19 @@ cannot_pack:
|
||||
range->range_send_offset = (uint64_t)offset;
|
||||
|
||||
data_remaining = size;
|
||||
MEMCHECKER(
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_defined,
|
||||
&sendreq->req_send.req_base.req_convertor);
|
||||
);
|
||||
mca_bml_base_prepare_src(bml_btl, NULL,
|
||||
&sendreq->req_send.req_base.req_convertor,
|
||||
MCA_BTL_NO_ORDER,
|
||||
sizeof(mca_pml_ob1_frag_hdr_t),
|
||||
&size, MCA_BTL_DES_FLAGS_BTL_OWNERSHIP, &des);
|
||||
MEMCHECKER(
|
||||
memchecker_convertor_call(&opal_memchecker_base_mem_noaccess,
|
||||
&sendreq->req_send.req_base.req_convertor);
|
||||
);
|
||||
|
||||
if( OPAL_UNLIKELY(des == NULL || size == 0) ) {
|
||||
if(des) {
|
||||
|
@ -107,15 +107,6 @@ int mca_pml_ob1_start(size_t count, ompi_request_t** requests)
|
||||
return OMPI_ERR_REQUEST;
|
||||
}
|
||||
|
||||
/*
|
||||
* We do not distinguish on SEND or RECV-requests.
|
||||
*/
|
||||
MEMCHECKER (memchecker_call(&opal_memchecker_base_mem_noaccess,
|
||||
pml_request->req_addr,
|
||||
pml_request->req_count,
|
||||
pml_request->req_datatype));
|
||||
|
||||
|
||||
/* start the request */
|
||||
switch(pml_request->req_type) {
|
||||
case MCA_PML_REQUEST_SEND:
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user