Mostly fixes for tabs, spaces and indentations.
Also, some other changes to bring the csum PML up to date with changes that happened in ob1 over the last two years. This includes a few bug fixes and some minor refactoring. This commit was SVN r23757.
Этот коммит содержится в:
родитель
9a47ca1995
Коммит
65e8277add
@ -497,7 +497,7 @@ static void mca_pml_csum_fin_completion( mca_btl_base_module_t* btl,
|
||||
*/
|
||||
int mca_pml_csum_send_fin( ompi_proc_t* proc,
|
||||
mca_bml_base_btl_t* bml_btl,
|
||||
void *hdr_des,
|
||||
ompi_ptr_t hdr_des,
|
||||
uint8_t order,
|
||||
uint32_t status )
|
||||
{
|
||||
@ -520,8 +520,9 @@ int mca_pml_csum_send_fin( ompi_proc_t* proc,
|
||||
hdr->hdr_common.hdr_flags = 0;
|
||||
hdr->hdr_common.hdr_type = MCA_PML_CSUM_HDR_TYPE_FIN;
|
||||
hdr->hdr_common.hdr_csum = 0;
|
||||
hdr->hdr_des.pval = hdr_des;
|
||||
hdr->hdr_des = hdr_des;
|
||||
hdr->hdr_fail = status;
|
||||
|
||||
hdr->hdr_common.hdr_csum = opal_csum16(hdr, sizeof(mca_pml_csum_fin_hdr_t));
|
||||
|
||||
OPAL_OUTPUT_VERBOSE((1, mca_pml_base_output,
|
||||
@ -591,7 +592,7 @@ void mca_pml_csum_process_pending_packets(mca_bml_base_btl_t* bml_btl)
|
||||
break;
|
||||
case MCA_PML_CSUM_HDR_TYPE_FIN:
|
||||
rc = mca_pml_csum_send_fin(pckt->proc, send_dst,
|
||||
pckt->hdr.hdr_fin.hdr_des.pval,
|
||||
pckt->hdr.hdr_fin.hdr_des,
|
||||
pckt->order,
|
||||
pckt->hdr.hdr_fin.hdr_fail);
|
||||
if( OPAL_UNLIKELY(OMPI_ERR_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) ) {
|
||||
|
@ -12,6 +12,7 @@
|
||||
* Copyright (c) 2009 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2009 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -83,6 +84,7 @@ struct mca_pml_csum_t {
|
||||
typedef struct mca_pml_csum_t mca_pml_csum_t;
|
||||
|
||||
extern mca_pml_csum_t mca_pml_csum;
|
||||
extern int mca_pml_csum_output;
|
||||
|
||||
/*
|
||||
* PML interface functions.
|
||||
@ -212,7 +214,7 @@ do { \
|
||||
\
|
||||
MCA_PML_CSUM_PCKT_PENDING_ALLOC(_pckt,_rc); \
|
||||
_pckt->hdr.hdr_common.hdr_type = MCA_PML_CSUM_HDR_TYPE_FIN; \
|
||||
_pckt->hdr.hdr_fin.hdr_des.pval = (D); \
|
||||
_pckt->hdr.hdr_fin.hdr_des = (D); \
|
||||
_pckt->hdr.hdr_fin.hdr_fail = (S); \
|
||||
_pckt->proc = (P); \
|
||||
_pckt->bml_btl = (B); \
|
||||
@ -225,7 +227,7 @@ do { \
|
||||
|
||||
|
||||
int mca_pml_csum_send_fin(ompi_proc_t* proc, mca_bml_base_btl_t* bml_btl,
|
||||
void *hdr_des, uint8_t order, uint32_t status);
|
||||
ompi_ptr_t hdr_des, uint8_t order, uint32_t status);
|
||||
|
||||
/* This function tries to resend FIN/ACK packets from pckt_pending queue.
|
||||
* Packets are added to the queue when sending of FIN or ACK is failed due to
|
||||
|
@ -14,6 +14,7 @@
|
||||
* Copyright (c) 2009 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -51,6 +52,7 @@ static mca_pml_base_module_t*
|
||||
mca_pml_csum_component_init( int* priority, bool enable_progress_threads,
|
||||
bool enable_mpi_threads );
|
||||
static int mca_pml_csum_component_fini(void);
|
||||
int mca_pml_csum_output = 0;
|
||||
|
||||
mca_pml_base_component_2_0_0_t mca_pml_csum_component = {
|
||||
|
||||
@ -96,8 +98,13 @@ static inline int mca_pml_csum_param_register_int(
|
||||
|
||||
static int mca_pml_csum_component_open(void)
|
||||
{
|
||||
int value;
|
||||
mca_allocator_base_component_t* allocator_component;
|
||||
|
||||
value = mca_pml_csum_param_register_int("verbose", 0);
|
||||
mca_pml_csum_output = opal_output_open(NULL);
|
||||
opal_output_set_verbosity(mca_pml_csum_output, value);
|
||||
|
||||
mca_pml_csum.free_list_num =
|
||||
mca_pml_csum_param_register_int("free_list_num", 4);
|
||||
mca_pml_csum.free_list_max =
|
||||
@ -163,7 +170,8 @@ mca_pml_csum_component_init( int* priority,
|
||||
bool enable_progress_threads,
|
||||
bool enable_mpi_threads )
|
||||
{
|
||||
opal_output_verbose( 10, 0, "in csum, my priority is 0\n");
|
||||
opal_output_verbose( 10, mca_pml_csum_output,
|
||||
"in csum, my priority is 0\n");
|
||||
|
||||
/* select us only if we are specified */
|
||||
if((*priority) > 0) {
|
||||
|
@ -7,6 +7,7 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -29,4 +30,5 @@ BEGIN_C_DECLS
|
||||
OMPI_MODULE_DECLSPEC extern mca_pml_base_component_2_0_0_t mca_pml_csum_component;
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -58,7 +59,7 @@ size_t mca_pml_csum_rdma_btls(
|
||||
mca_bml_base_btl_t* bml_btl =
|
||||
mca_bml_base_btl_array_get_index(&bml_endpoint->btl_rdma,
|
||||
(bml_endpoint->btl_rdma_index + n) % num_btls);
|
||||
mca_mpool_base_registration_t* reg = NULL;
|
||||
mca_mpool_base_registration_t* reg = &pml_csum_dummy_reg;
|
||||
mca_mpool_base_module_t *btl_mpool = bml_btl->btl->btl_mpool;
|
||||
|
||||
if( NULL != btl_mpool ) {
|
||||
@ -71,19 +72,14 @@ size_t mca_pml_csum_rdma_btls(
|
||||
}
|
||||
|
||||
if(NULL == reg)
|
||||
bml_btl = NULL; /* skip it */
|
||||
} else {
|
||||
/* if registration is not required use dummy registration */
|
||||
reg = &pml_csum_dummy_reg;
|
||||
continue;
|
||||
}
|
||||
|
||||
if(bml_btl != NULL) {
|
||||
rdma_btls[num_btls_used].bml_btl = bml_btl;
|
||||
rdma_btls[num_btls_used].btl_reg = reg;
|
||||
weight_total += bml_btl->btl_weight;
|
||||
num_btls_used++;
|
||||
}
|
||||
}
|
||||
|
||||
/* if we don't use leave_pinned and all BTLs that already have this memory
|
||||
* registered amount to less then half of available bandwidth - fall back to
|
||||
|
@ -15,6 +15,7 @@
|
||||
* Copyright (c) 2009 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -91,8 +92,8 @@ static void dump_csum_error_data(mca_btl_base_segment_t* segments, size_t num_se
|
||||
|
||||
/**
|
||||
* Append a unexpected descriptor to a queue. This function will allocate and
|
||||
* initialize the fragment (if necessary) and the will added to the specified
|
||||
* queue. The frag will be updated to the allocated fragment if necessary.
|
||||
* initialize the fragment (if necessary) and then will add it to the specified
|
||||
* queue. The allocated fragment is not returned to the caller.
|
||||
*/
|
||||
static void
|
||||
append_frag_to_list(opal_list_t *queue, mca_btl_base_module_t *btl,
|
||||
@ -124,7 +125,8 @@ static int mca_pml_csum_recv_frag_match( mca_btl_base_module_t *btl,
|
||||
size_t num_segments,
|
||||
int type);
|
||||
|
||||
static mca_pml_csum_recv_request_t *match_one(mca_btl_base_module_t *btl,
|
||||
static mca_pml_csum_recv_request_t*
|
||||
match_one(mca_btl_base_module_t *btl,
|
||||
mca_pml_csum_match_hdr_t *hdr, mca_btl_base_segment_t* segments,
|
||||
size_t num_segments, ompi_communicator_t *comm_ptr,
|
||||
mca_pml_csum_comm_proc_t *proc,
|
||||
@ -133,14 +135,14 @@ static mca_pml_csum_recv_request_t *match_one(mca_btl_base_module_t *btl,
|
||||
void mca_pml_csum_recv_frag_callback_match(mca_btl_base_module_t* btl,
|
||||
mca_btl_base_tag_t tag,
|
||||
mca_btl_base_descriptor_t* des,
|
||||
void* cbdata ) {
|
||||
void* cbdata )
|
||||
{
|
||||
mca_btl_base_segment_t* segments = des->des_dst;
|
||||
mca_pml_csum_match_hdr_t* hdr = (mca_pml_csum_match_hdr_t*)segments->seg_addr.pval;
|
||||
ompi_communicator_t *comm_ptr;
|
||||
mca_pml_csum_recv_request_t *match = NULL;
|
||||
mca_pml_csum_comm_t *comm;
|
||||
mca_pml_csum_comm_proc_t *proc;
|
||||
mca_pml_csum_recv_frag_t* frag = NULL;
|
||||
size_t num_segments = des->des_dst_cnt;
|
||||
size_t bytes_received = 0;
|
||||
uint16_t csum_received, csum=0;
|
||||
@ -187,7 +189,7 @@ void mca_pml_csum_recv_frag_callback_match(mca_btl_base_module_t* btl,
|
||||
* moved to the right communicator.
|
||||
*/
|
||||
append_frag_to_list( &mca_pml_csum.non_existing_communicator_pending,
|
||||
btl, hdr, segments, num_segments, frag );
|
||||
btl, hdr, segments, num_segments, NULL );
|
||||
return;
|
||||
}
|
||||
comm = (mca_pml_csum_comm_t *)comm_ptr->c_pml_comm;
|
||||
@ -233,7 +235,7 @@ void mca_pml_csum_recv_frag_callback_match(mca_btl_base_module_t* btl,
|
||||
PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_SEARCH_POSTED_Q_BEGIN, comm_ptr,
|
||||
hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV);
|
||||
|
||||
match = match_one(btl, hdr, segments, num_segments, comm_ptr, proc, frag);
|
||||
match = match_one(btl, hdr, segments, num_segments, comm_ptr, proc, NULL);
|
||||
|
||||
/* The match is over. We generate the SEARCH_POSTED_Q_END here,
|
||||
* before going into the mca_pml_csum_check_cantmatch_for_match so
|
||||
@ -251,7 +253,7 @@ void mca_pml_csum_recv_frag_callback_match(mca_btl_base_module_t* btl,
|
||||
match->req_recv.req_bytes_packed = bytes_received;
|
||||
|
||||
MCA_PML_CSUM_RECV_REQUEST_MATCHED(match, hdr);
|
||||
if(bytes_received > 0) {
|
||||
if(match->req_bytes_expected > 0) {
|
||||
struct iovec iov[2];
|
||||
uint32_t iov_count = 1;
|
||||
|
||||
@ -324,11 +326,8 @@ void mca_pml_csum_recv_frag_callback_match(mca_btl_base_module_t* btl,
|
||||
void mca_pml_csum_recv_frag_callback_rndv(mca_btl_base_module_t* btl,
|
||||
mca_btl_base_tag_t tag,
|
||||
mca_btl_base_descriptor_t* des,
|
||||
void* cbdata ) {
|
||||
|
||||
|
||||
|
||||
|
||||
void* cbdata )
|
||||
{
|
||||
mca_btl_base_segment_t* segments = des->des_dst;
|
||||
mca_pml_csum_hdr_t* hdr = (mca_pml_csum_hdr_t*)segments->seg_addr.pval;
|
||||
uint16_t csum_received, csum;
|
||||
@ -364,7 +363,8 @@ void mca_pml_csum_recv_frag_callback_rndv(mca_btl_base_module_t* btl,
|
||||
void mca_pml_csum_recv_frag_callback_rget(mca_btl_base_module_t* btl,
|
||||
mca_btl_base_tag_t tag,
|
||||
mca_btl_base_descriptor_t* des,
|
||||
void* cbdata ) {
|
||||
void* cbdata )
|
||||
{
|
||||
mca_btl_base_segment_t* segments = des->des_dst;
|
||||
mca_pml_csum_hdr_t* hdr = (mca_pml_csum_hdr_t*)segments->seg_addr.pval;
|
||||
|
||||
@ -382,7 +382,8 @@ void mca_pml_csum_recv_frag_callback_rget(mca_btl_base_module_t* btl,
|
||||
void mca_pml_csum_recv_frag_callback_ack(mca_btl_base_module_t* btl,
|
||||
mca_btl_base_tag_t tag,
|
||||
mca_btl_base_descriptor_t* des,
|
||||
void* cbdata ) {
|
||||
void* cbdata )
|
||||
{
|
||||
mca_btl_base_segment_t* segments = des->des_dst;
|
||||
mca_pml_csum_hdr_t* hdr = (mca_pml_csum_hdr_t*)segments->seg_addr.pval;
|
||||
mca_pml_csum_send_request_t* sendreq;
|
||||
@ -427,7 +428,18 @@ void mca_pml_csum_recv_frag_callback_ack(mca_btl_base_module_t* btl,
|
||||
sendreq->req_send.req_bytes_packed -
|
||||
hdr->hdr_ack.hdr_send_offset);
|
||||
|
||||
if (sendreq->req_state != 0) {
|
||||
/* Typical receipt of an ACK message causes req_state to be
|
||||
* decremented. However, a send request that started as an
|
||||
* RGET request can become a RNDV. For example, when the
|
||||
* receiver determines that its receive buffer is not
|
||||
* contiguous and therefore cannot support the RGET
|
||||
* protocol. A send request that started with the RGET
|
||||
* protocol has req_state == 0 and as such should not be
|
||||
* decremented.
|
||||
*/
|
||||
OPAL_THREAD_ADD32(&sendreq->req_state, -1);
|
||||
}
|
||||
|
||||
if(send_request_pml_complete_check(sendreq) == false)
|
||||
mca_pml_csum_send_request_schedule(sendreq);
|
||||
@ -630,7 +642,8 @@ static mca_pml_csum_recv_request_t *match_incomming(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static mca_pml_csum_recv_request_t *match_one(mca_btl_base_module_t *btl,
|
||||
static mca_pml_csum_recv_request_t*
|
||||
match_one(mca_btl_base_module_t *btl,
|
||||
mca_pml_csum_match_hdr_t *hdr, mca_btl_base_segment_t* segments,
|
||||
size_t num_segments, ompi_communicator_t *comm_ptr,
|
||||
mca_pml_csum_comm_proc_t *proc,
|
||||
@ -643,18 +656,10 @@ static mca_pml_csum_recv_request_t *match_one(mca_btl_base_module_t *btl,
|
||||
match = match_incomming(hdr, comm, proc);
|
||||
|
||||
/* if match found, process data */
|
||||
if(OPAL_UNLIKELY(NULL == match)) {
|
||||
/* if no match found, place on unexpected queue */
|
||||
append_frag_to_list(&proc->unexpected_frags, btl, hdr, segments,
|
||||
num_segments, frag);
|
||||
PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_MSG_INSERT_IN_UNEX_Q, comm_ptr,
|
||||
hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(OPAL_LIKELY(NULL != match)) {
|
||||
match->req_recv.req_base.req_proc = proc->ompi_proc;
|
||||
|
||||
if(MCA_PML_REQUEST_PROBE == match->req_recv.req_base.req_type) {
|
||||
if(OPAL_UNLIKELY(MCA_PML_REQUEST_PROBE == match->req_recv.req_base.req_type)) {
|
||||
/* complete the probe */
|
||||
mca_pml_csum_recv_request_matched_probe(match, btl, segments,
|
||||
num_segments);
|
||||
@ -664,27 +669,28 @@ static mca_pml_csum_recv_request_t *match_one(mca_btl_base_module_t *btl,
|
||||
|
||||
PERUSE_TRACE_COMM_EVENT(PERUSE_COMM_MSG_MATCH_POSTED_REQ,
|
||||
&(match->req_recv.req_base), PERUSE_RECV);
|
||||
break;
|
||||
} while(true);
|
||||
|
||||
return match;
|
||||
}
|
||||
|
||||
static mca_pml_csum_recv_frag_t *check_cantmatch_for_match(
|
||||
mca_pml_csum_comm_proc_t *proc)
|
||||
/* if no match found, place on unexpected queue */
|
||||
append_frag_to_list(&proc->unexpected_frags, btl, hdr, segments,
|
||||
num_segments, frag);
|
||||
PERUSE_TRACE_MSG_EVENT(PERUSE_COMM_MSG_INSERT_IN_UNEX_Q, comm_ptr,
|
||||
hdr->hdr_src, hdr->hdr_tag, PERUSE_RECV);
|
||||
return NULL;
|
||||
} while(true);
|
||||
}
|
||||
|
||||
static mca_pml_csum_recv_frag_t* check_cantmatch_for_match(mca_pml_csum_comm_proc_t *proc)
|
||||
{
|
||||
/* local parameters */
|
||||
mca_pml_csum_recv_frag_t *frag;
|
||||
|
||||
/* search the list for a fragment from the send with sequence
|
||||
* number next_msg_seq_expected
|
||||
*/
|
||||
for(frag = (mca_pml_csum_recv_frag_t *)
|
||||
opal_list_get_first(&proc->frags_cant_match);
|
||||
frag != (mca_pml_csum_recv_frag_t *)
|
||||
opal_list_get_end(&proc->frags_cant_match);
|
||||
frag = (mca_pml_csum_recv_frag_t *)
|
||||
opal_list_get_next(frag))
|
||||
for(frag = (mca_pml_csum_recv_frag_t*)opal_list_get_first(&proc->frags_cant_match);
|
||||
frag != (mca_pml_csum_recv_frag_t*)opal_list_get_end(&proc->frags_cant_match);
|
||||
frag = (mca_pml_csum_recv_frag_t*)opal_list_get_next(frag))
|
||||
{
|
||||
mca_pml_csum_match_hdr_t* hdr = &frag->hdr.hdr_match;
|
||||
/*
|
||||
@ -755,7 +761,7 @@ static int mca_pml_csum_recv_frag_match( mca_btl_base_module_t *btl,
|
||||
* moved to the right communicator.
|
||||
*/
|
||||
append_frag_to_list( &mca_pml_csum.non_existing_communicator_pending,
|
||||
btl, hdr, segments, num_segments, frag );
|
||||
btl, hdr, segments, num_segments, NULL );
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
comm = (mca_pml_csum_comm_t *)comm_ptr->c_pml_comm;
|
||||
|
@ -14,6 +14,7 @@
|
||||
* Copyright (c) 2009 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -348,7 +349,6 @@ static int mca_pml_csum_recv_request_ack(
|
||||
recvreq->req_send_offset == bytes_received);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return resources used by the RDMA
|
||||
*/
|
||||
@ -371,7 +371,7 @@ static void mca_pml_csum_rget_completion( mca_btl_base_module_t* btl,
|
||||
|
||||
mca_pml_csum_send_fin(recvreq->req_recv.req_base.req_proc,
|
||||
bml_btl,
|
||||
frag->rdma_hdr.hdr_rget.hdr_des.pval,
|
||||
frag->rdma_hdr.hdr_rget.hdr_des,
|
||||
des->order, 0);
|
||||
|
||||
/* is receive request complete */
|
||||
@ -453,9 +453,8 @@ void mca_pml_csum_recv_request_progress_frag( mca_pml_csum_recv_request_t* recvr
|
||||
mca_btl_base_segment_t* segments,
|
||||
size_t num_segments )
|
||||
{
|
||||
size_t bytes_received = 0;
|
||||
size_t bytes_received = 0, data_offset = 0;
|
||||
size_t bytes_delivered __opal_attribute_unused__; /* is being set to zero in MCA_PML_CSUM_RECV_REQUEST_UNPACK */
|
||||
size_t data_offset = 0;
|
||||
mca_pml_csum_hdr_t* hdr = (mca_pml_csum_hdr_t*)segments->seg_addr.pval;
|
||||
uint32_t csum = OPAL_CSUM_ZERO;
|
||||
|
||||
@ -764,7 +763,7 @@ void mca_pml_csum_recv_request_matched_probe( mca_pml_csum_recv_request_t* recvr
|
||||
recvreq->req_recv.req_base.req_ompi.req_status.MPI_TAG = hdr->hdr_match.hdr_tag;
|
||||
recvreq->req_recv.req_base.req_ompi.req_status.MPI_SOURCE = hdr->hdr_match.hdr_src;
|
||||
recvreq->req_bytes_received = bytes_packed;
|
||||
recvreq->req_bytes_delivered = bytes_packed;
|
||||
recvreq->req_bytes_expected = bytes_packed;
|
||||
recv_request_pml_complete(recvreq);
|
||||
}
|
||||
|
||||
@ -1032,7 +1031,7 @@ void mca_pml_csum_recv_req_start(mca_pml_csum_recv_request_t *req)
|
||||
req->req_lock = 0;
|
||||
req->req_pipeline_depth = 0;
|
||||
req->req_bytes_received = 0;
|
||||
req->req_bytes_delivered = 0;
|
||||
req->req_bytes_expected = 0;
|
||||
/* What about req_rdma_cnt ? */
|
||||
req->req_rdma_idx = 0;
|
||||
req->req_pending = false;
|
||||
|
@ -10,6 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2008 UT-Battelle, LLC. All rights reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -38,7 +39,7 @@ struct mca_pml_csum_recv_request_t {
|
||||
int32_t req_lock;
|
||||
size_t req_pipeline_depth;
|
||||
size_t req_bytes_received; /**< amount of data transferred into the user buffer */
|
||||
size_t req_bytes_delivered; /**< local size of the data as suggested by the user */
|
||||
size_t req_bytes_expected; /**< local size of the data as suggested by the user */
|
||||
size_t req_rdma_offset;
|
||||
size_t req_send_offset;
|
||||
uint32_t req_rdma_cnt;
|
||||
@ -165,7 +166,7 @@ recv_request_pml_complete(mca_pml_csum_recv_request_t *recvreq)
|
||||
recvreq->req_recv.req_base.req_pml_complete = true;
|
||||
recvreq->req_recv.req_base.req_ompi.req_status._ucount =
|
||||
recvreq->req_bytes_received;
|
||||
if (recvreq->req_recv.req_bytes_packed > recvreq->req_bytes_delivered) {
|
||||
if (recvreq->req_recv.req_bytes_packed > recvreq->req_bytes_expected) {
|
||||
recvreq->req_recv.req_base.req_ompi.req_status._ucount =
|
||||
recvreq->req_recv.req_bytes_packed;
|
||||
recvreq->req_recv.req_base.req_ompi.req_status.MPI_ERROR =
|
||||
@ -195,7 +196,6 @@ recv_request_pml_complete_check(mca_pml_csum_recv_request_t *recvreq)
|
||||
extern void mca_pml_csum_recv_req_start(mca_pml_csum_recv_request_t *req);
|
||||
#define MCA_PML_CSUM_RECV_REQUEST_START(r) mca_pml_csum_recv_req_start(r)
|
||||
|
||||
|
||||
static inline void prepare_recv_req_converter(mca_pml_csum_recv_request_t *req)
|
||||
{
|
||||
if( req->req_recv.req_base.req_datatype->super.size | req->req_recv.req_base.req_count ) {
|
||||
@ -207,7 +207,7 @@ static inline void prepare_recv_req_converter(mca_pml_csum_recv_request_t *req)
|
||||
0,
|
||||
&req->req_recv.req_base.req_convertor);
|
||||
opal_convertor_get_unpacked_size(&req->req_recv.req_base.req_convertor,
|
||||
&req->req_bytes_delivered);
|
||||
&req->req_bytes_expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
* Copyright (c) 2009 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2009 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -687,7 +688,6 @@ int mca_pml_csum_send_request_start_rdma( mca_pml_csum_send_request_t* sendreq,
|
||||
int rc;
|
||||
|
||||
bml_btl = sendreq->req_rdma[0].bml_btl;
|
||||
|
||||
if((sendreq->req_rdma_cnt == 1) && (bml_btl->btl_flags & MCA_BTL_FLAGS_GET)) {
|
||||
mca_mpool_base_registration_t* reg = sendreq->req_rdma[0].btl_reg;
|
||||
mca_btl_base_descriptor_t* src;
|
||||
@ -1180,7 +1180,7 @@ static void mca_pml_csum_put_completion( mca_btl_base_module_t* btl,
|
||||
|
||||
mca_pml_csum_send_fin(sendreq->req_send.req_base.req_proc,
|
||||
bml_btl,
|
||||
frag->rdma_hdr.hdr_rdma.hdr_des.pval,
|
||||
frag->rdma_hdr.hdr_rdma.hdr_des,
|
||||
des->order, 0);
|
||||
|
||||
/* check for request completion */
|
||||
@ -1225,7 +1225,7 @@ int mca_pml_csum_send_request_put_frag( mca_pml_csum_rdma_frag_t* frag )
|
||||
|
||||
/* tell receiver to unregister memory */
|
||||
mca_pml_csum_send_fin(sendreq->req_send.req_base.req_proc,
|
||||
bml_btl, frag->rdma_hdr.hdr_rdma.hdr_des.pval,
|
||||
bml_btl, frag->rdma_hdr.hdr_rdma.hdr_des,
|
||||
MCA_BTL_NO_ORDER, 1);
|
||||
|
||||
/* send fragment by copy in/out */
|
||||
|
@ -12,7 +12,7 @@
|
||||
* Copyright (c) 2009 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2009 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2009-2010 Oracle and/or its affiliates. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -132,6 +132,7 @@ get_request_from_send_pending(mca_pml_csum_send_pending_t *type)
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
#define MCA_PML_CSUM_SEND_REQUEST_INIT(sendreq, \
|
||||
buf, \
|
||||
count, \
|
||||
@ -151,7 +152,7 @@ get_request_from_send_pending(mca_pml_csum_send_pending_t *type)
|
||||
comm, \
|
||||
sendmode, \
|
||||
persistent, \
|
||||
0); \
|
||||
0); /* convertor_flags */ \
|
||||
(sendreq)->req_recv.pval = NULL; \
|
||||
}
|
||||
|
||||
@ -256,7 +257,9 @@ send_request_pml_complete(mca_pml_csum_send_request_t *sendreq)
|
||||
static inline bool
|
||||
send_request_pml_complete_check(mca_pml_csum_send_request_t *sendreq)
|
||||
{
|
||||
#if OPAL_HAVE_THREAD_SUPPORT
|
||||
opal_atomic_rmb();
|
||||
#endif
|
||||
/* if no more events are expected for the request and the whole message is
|
||||
* already sent and send fragment scheduling isn't running in another
|
||||
* thread then complete the request on PML level. From now on, if user
|
||||
@ -349,7 +352,6 @@ mca_pml_csum_send_request_start_btl( mca_pml_csum_send_request_t* sendreq,
|
||||
size_t eager_limit = btl->btl_eager_limit - sizeof(mca_pml_csum_hdr_t);
|
||||
int rc;
|
||||
|
||||
assert(btl->btl_eager_limit >= sizeof(mca_pml_csum_hdr_t));
|
||||
if( OPAL_LIKELY(size <= eager_limit) ) {
|
||||
switch(sendreq->req_send.req_send_mode) {
|
||||
case MCA_PML_BASE_SEND_SYNCHRONOUS:
|
||||
|
@ -864,7 +864,7 @@ void mca_pml_ob1_send_request_copy_in_out( mca_pml_ob1_send_request_t *sendreq,
|
||||
ompi_free_list_item_t *i;
|
||||
mca_bml_base_endpoint_t* bml_endpoint = sendreq->req_endpoint;
|
||||
int num_btls = mca_bml_base_btl_array_get_size(&bml_endpoint->btl_send);
|
||||
int rc = OMPI_SUCCESS, n;
|
||||
int rc, n;
|
||||
double weight_total = 0;
|
||||
|
||||
if( OPAL_UNLIKELY(0 == send_length) )
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user