From bb1fec04071f3c6dad29a04f4d623cc367b38108 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Wed, 30 Nov 2011 21:37:23 +0000 Subject: [PATCH] added put/get btl descriptor flags This commit was SVN r25553. --- ompi/mca/btl/btl.h | 5 +++++ ompi/mca/pml/bfo/pml_bfo_recvreq.c | 6 ++++-- ompi/mca/pml/bfo/pml_bfo_sendreq.c | 5 +++-- ompi/mca/pml/csum/pml_csum_recvreq.c | 6 ++++-- ompi/mca/pml/csum/pml_csum_sendreq.c | 5 +++-- ompi/mca/pml/ob1/pml_ob1_recvreq.c | 6 ++++-- ompi/mca/pml/ob1/pml_ob1_sendreq.c | 5 +++-- 7 files changed, 26 insertions(+), 12 deletions(-) diff --git a/ompi/mca/btl/btl.h b/ompi/mca/btl/btl.h index c0a47fd4ab..f028130a23 100644 --- a/ompi/mca/btl/btl.h +++ b/ompi/mca/btl/btl.h @@ -290,6 +290,11 @@ OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_btl_base_descriptor_t); */ #define MCA_BTL_DES_SEND_ALWAYS_CALLBACK 0x0004 +/* Type of transfer that will be done with this frag. + */ +#define MCA_BTL_DES_FLAGS_PUT 0x0010 +#define MCA_BTL_DES_FLAGS_GET 0x0020 + /** * Maximum number of allowed segments in src/dst fields of a descriptor. */ diff --git a/ompi/mca/pml/bfo/pml_bfo_recvreq.c b/ompi/mca/pml/bfo/pml_bfo_recvreq.c index efd804ca6e..b65b1298ed 100644 --- a/ompi/mca/pml/bfo/pml_bfo_recvreq.c +++ b/ompi/mca/pml/bfo/pml_bfo_recvreq.c @@ -405,7 +405,8 @@ int mca_pml_bfo_recv_request_get_frag( mca_pml_bfo_rdma_frag_t* frag ) MCA_BTL_NO_ORDER, 0, &frag->rdma_length, - MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | MCA_BTL_DES_SEND_ALWAYS_CALLBACK, + MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | MCA_BTL_DES_SEND_ALWAYS_CALLBACK | + MCA_BTL_DES_FLAGS_GET, &descriptor ); if( OPAL_UNLIKELY(NULL == descriptor) ) { frag->rdma_length = save_size; @@ -810,7 +811,8 @@ int mca_pml_bfo_recv_request_schedule_once( mca_pml_bfo_recv_request_t* recvreq, /* prepare a descriptor for RDMA */ mca_bml_base_prepare_dst(bml_btl, reg, &recvreq->req_recv.req_base.req_convertor, - MCA_BTL_NO_ORDER, 0, &size, MCA_BTL_DES_FLAGS_BTL_OWNERSHIP, &dst); + MCA_BTL_NO_ORDER, 0, &size, MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | + MCA_BTL_DES_FLAGS_PUT, &dst); OPAL_THREAD_UNLOCK(&recvreq->lock); if(OPAL_UNLIKELY(dst == NULL)) { diff --git a/ompi/mca/pml/bfo/pml_bfo_sendreq.c b/ompi/mca/pml/bfo/pml_bfo_sendreq.c index 7ade6b1e0b..9e61e3ed53 100644 --- a/ompi/mca/pml/bfo/pml_bfo_sendreq.c +++ b/ompi/mca/pml/bfo/pml_bfo_sendreq.c @@ -731,7 +731,7 @@ int mca_pml_bfo_send_request_start_rdma( mca_pml_bfo_send_request_t* sendreq, MCA_BTL_NO_ORDER, 0, &size, - 0, + MCA_BTL_DES_FLAGS_GET, &src ); MEMCHECKER( memchecker_call(&opal_memchecker_base_mem_noaccess, @@ -1252,7 +1252,8 @@ int mca_pml_bfo_send_request_put_frag( mca_pml_bfo_rdma_frag_t* frag ) MCA_BTL_NO_ORDER, 0, &frag->rdma_length, - MCA_BTL_DES_FLAGS_BTL_OWNERSHIP, + MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | + MCA_BTL_DES_FLAGS_PUT, &des ); if( OPAL_UNLIKELY(NULL == des) ) { diff --git a/ompi/mca/pml/csum/pml_csum_recvreq.c b/ompi/mca/pml/csum/pml_csum_recvreq.c index 83f9465b23..e0bc7e8d89 100644 --- a/ompi/mca/pml/csum/pml_csum_recvreq.c +++ b/ompi/mca/pml/csum/pml_csum_recvreq.c @@ -402,7 +402,8 @@ int mca_pml_csum_recv_request_get_frag( mca_pml_csum_rdma_frag_t* frag ) MCA_BTL_NO_ORDER, 0, &frag->rdma_length, - MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | MCA_BTL_DES_SEND_ALWAYS_CALLBACK, + MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | MCA_BTL_DES_SEND_ALWAYS_CALLBACK | + MCA_BTL_DES_FLAGS_GET, &descriptor ); if( OPAL_UNLIKELY(NULL == descriptor) ) { frag->rdma_length = save_size; @@ -846,7 +847,8 @@ int mca_pml_csum_recv_request_schedule_once( mca_pml_csum_recv_request_t* recvre /* prepare a descriptor for RDMA */ mca_bml_base_prepare_dst(bml_btl, reg, &recvreq->req_recv.req_base.req_convertor, - MCA_BTL_NO_ORDER, 0, &size, MCA_BTL_DES_FLAGS_BTL_OWNERSHIP, &dst); + MCA_BTL_NO_ORDER, 0, &size, MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | + MCA_BTL_DES_FLAGS_PUT, &dst); OPAL_THREAD_UNLOCK(&recvreq->lock); if(OPAL_UNLIKELY(dst == NULL)) { diff --git a/ompi/mca/pml/csum/pml_csum_sendreq.c b/ompi/mca/pml/csum/pml_csum_sendreq.c index fcced45d73..aac1a2c462 100644 --- a/ompi/mca/pml/csum/pml_csum_sendreq.c +++ b/ompi/mca/pml/csum/pml_csum_sendreq.c @@ -712,7 +712,7 @@ int mca_pml_csum_send_request_start_rdma( mca_pml_csum_send_request_t* sendreq, MCA_BTL_NO_ORDER, 0, &size, - 0, + MCA_BTL_DES_FLAGS_GET, &src ); MEMCHECKER( memchecker_call(&opal_memchecker_base_mem_noaccess, @@ -1212,7 +1212,8 @@ int mca_pml_csum_send_request_put_frag( mca_pml_csum_rdma_frag_t* frag ) MCA_BTL_NO_ORDER, 0, &frag->rdma_length, - MCA_BTL_DES_FLAGS_BTL_OWNERSHIP, + MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | + MCA_BTL_DES_FLAGS_PUT, &des ); if( OPAL_UNLIKELY(NULL == des) ) { diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.c b/ompi/mca/pml/ob1/pml_ob1_recvreq.c index 8d84fa0418..020de8c377 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.c +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.c @@ -361,7 +361,8 @@ int mca_pml_ob1_recv_request_get_frag( mca_pml_ob1_rdma_frag_t* frag ) MCA_BTL_NO_ORDER, 0, &frag->rdma_length, - MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | MCA_BTL_DES_SEND_ALWAYS_CALLBACK, + MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | MCA_BTL_DES_SEND_ALWAYS_CALLBACK | + MCA_BTL_DES_FLAGS_GET, &descriptor ); if( OPAL_UNLIKELY(NULL == descriptor) ) { frag->rdma_length = save_size; @@ -754,7 +755,8 @@ int mca_pml_ob1_recv_request_schedule_once( mca_pml_ob1_recv_request_t* recvreq, /* prepare a descriptor for RDMA */ mca_bml_base_prepare_dst(bml_btl, reg, &recvreq->req_recv.req_base.req_convertor, - MCA_BTL_NO_ORDER, 0, &size, MCA_BTL_DES_FLAGS_BTL_OWNERSHIP, &dst); + MCA_BTL_NO_ORDER, 0, &size, MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | + MCA_BTL_DES_FLAGS_PUT, &dst); OPAL_THREAD_UNLOCK(&recvreq->lock); if(OPAL_UNLIKELY(dst == NULL)) { diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.c b/ompi/mca/pml/ob1/pml_ob1_sendreq.c index 88ddd0d152..dc47d9410b 100644 --- a/ompi/mca/pml/ob1/pml_ob1_sendreq.c +++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.c @@ -658,7 +658,7 @@ int mca_pml_ob1_send_request_start_rdma( mca_pml_ob1_send_request_t* sendreq, MCA_BTL_NO_ORDER, 0, &size, - 0, + MCA_BTL_DES_FLAGS_GET, &src ); MEMCHECKER( memchecker_call(&opal_memchecker_base_mem_noaccess, @@ -1135,7 +1135,8 @@ int mca_pml_ob1_send_request_put_frag( mca_pml_ob1_rdma_frag_t* frag ) MCA_BTL_NO_ORDER, 0, &frag->rdma_length, - MCA_BTL_DES_FLAGS_BTL_OWNERSHIP, + MCA_BTL_DES_FLAGS_BTL_OWNERSHIP | + MCA_BTL_DES_FLAGS_PUT, &des ); if( OPAL_UNLIKELY(NULL == des) ) {