2005-05-24 02:06:50 +04:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2006-03-31 21:09:09 +04:00
|
|
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2005-05-24 02:06:50 +04:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*/
|
2005-05-24 02:22:20 +04:00
|
|
|
#ifndef OMPI_PML_OB1_SEND_REQUEST_H
|
|
|
|
#define OMPI_PML_OB1_SEND_REQUEST_H
|
2005-05-24 02:06:50 +04:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/mca/btl/btl.h"
|
|
|
|
#include "ompi/mca/pml/base/pml_base_sendreq.h"
|
|
|
|
#include "ompi/mca/mpool/base/base.h"
|
2005-05-24 02:06:50 +04:00
|
|
|
#include "pml_ob1_proc.h"
|
|
|
|
#include "pml_ob1_comm.h"
|
2005-06-01 18:34:22 +04:00
|
|
|
#include "pml_ob1_hdr.h"
|
2005-09-13 02:28:23 +04:00
|
|
|
#include "pml_ob1_rdma.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/datatype/convertor.h"
|
2006-02-26 03:45:54 +03:00
|
|
|
#include "ompi/datatype/dt_arch.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/mca/bml/bml.h"
|
2005-05-24 02:06:50 +04:00
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
struct mca_pml_ob1_send_request_t {
|
|
|
|
mca_pml_base_send_request_t req_send;
|
2005-09-13 02:28:23 +04:00
|
|
|
mca_bml_base_endpoint_t* req_endpoint;
|
2005-06-02 01:09:43 +04:00
|
|
|
ompi_ptr_t req_recv;
|
2005-09-14 21:08:08 +04:00
|
|
|
#if OMPI_HAVE_THREAD_SUPPORT
|
|
|
|
volatile int32_t req_state;
|
2005-09-12 00:48:37 +04:00
|
|
|
volatile int32_t req_lock;
|
2005-09-14 21:08:08 +04:00
|
|
|
#else
|
2005-12-06 21:27:56 +03:00
|
|
|
int32_t req_state;
|
|
|
|
int32_t req_lock;
|
2005-09-14 21:08:08 +04:00
|
|
|
#endif
|
2005-06-09 07:11:51 +04:00
|
|
|
size_t req_pipeline_depth;
|
2005-06-09 00:37:19 +04:00
|
|
|
size_t req_bytes_delivered;
|
|
|
|
size_t req_send_offset;
|
|
|
|
size_t req_rdma_offset;
|
2006-06-14 20:55:35 +04:00
|
|
|
bool req_got_put_ack;
|
2005-09-13 02:28:23 +04:00
|
|
|
mca_pml_ob1_rdma_btl_t req_rdma[MCA_PML_OB1_MAX_RDMA_PER_REQUEST];
|
|
|
|
uint32_t req_rdma_cnt;
|
2005-05-24 02:06:50 +04:00
|
|
|
};
|
|
|
|
typedef struct mca_pml_ob1_send_request_t mca_pml_ob1_send_request_t;
|
|
|
|
|
|
|
|
|
|
|
|
OBJ_CLASS_DECLARATION(mca_pml_ob1_send_request_t);
|
|
|
|
|
|
|
|
|
2005-06-01 18:34:22 +04:00
|
|
|
#define MCA_PML_OB1_SEND_REQUEST_ALLOC( \
|
2005-05-24 02:06:50 +04:00
|
|
|
comm, \
|
|
|
|
dst, \
|
|
|
|
sendreq, \
|
|
|
|
rc) \
|
|
|
|
{ \
|
2005-08-12 06:41:14 +04:00
|
|
|
ompi_proc_t *proc = \
|
|
|
|
comm->c_pml_procs[dst]->proc_ompi; \
|
2006-06-13 02:09:03 +04:00
|
|
|
ompi_free_list_item_t* item; \
|
2005-05-24 02:06:50 +04:00
|
|
|
\
|
|
|
|
if(NULL == proc) { \
|
|
|
|
rc = OMPI_ERR_OUT_OF_RESOURCE; \
|
|
|
|
} else { \
|
|
|
|
rc = OMPI_SUCCESS; \
|
2005-06-01 18:34:22 +04:00
|
|
|
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.send_requests, item, rc); \
|
|
|
|
sendreq = (mca_pml_ob1_send_request_t*)item; \
|
2006-02-05 09:13:07 +03:00
|
|
|
sendreq->req_send.req_base.req_proc = proc; \
|
2005-05-24 02:06:50 +04:00
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-06-01 18:34:22 +04:00
|
|
|
#define MCA_PML_OB1_SEND_REQUEST_INIT( \
|
2005-05-24 02:06:50 +04:00
|
|
|
sendreq, \
|
|
|
|
buf, \
|
|
|
|
count, \
|
|
|
|
datatype, \
|
|
|
|
dst, \
|
|
|
|
tag, \
|
|
|
|
comm, \
|
|
|
|
sendmode, \
|
|
|
|
persistent) \
|
|
|
|
{ \
|
|
|
|
MCA_PML_BASE_SEND_REQUEST_INIT(&sendreq->req_send, \
|
|
|
|
buf, \
|
|
|
|
count, \
|
|
|
|
datatype, \
|
|
|
|
dst, \
|
|
|
|
tag, \
|
|
|
|
comm, \
|
|
|
|
sendmode, \
|
|
|
|
persistent); \
|
|
|
|
}
|
|
|
|
|
2005-06-17 22:25:44 +04:00
|
|
|
|
2005-05-24 02:06:50 +04:00
|
|
|
/**
|
|
|
|
* Start a send request.
|
|
|
|
*/
|
|
|
|
|
2006-02-26 03:45:54 +03:00
|
|
|
#ifdef WORDS_BIGENDIAN
|
|
|
|
#define MCA_PML_OB1_SEND_REQUEST_START_MATCH_FIXUP(sendreq, hdr) \
|
|
|
|
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
|
|
|
|
#elif OMPI_ENABLE_HETEROGENEOUS_SUPPORT
|
2006-03-16 01:53:41 +03:00
|
|
|
#define MCA_PML_OB1_SEND_REQUEST_START_MATCH_FIXUP(sendreq, hdr) \
|
|
|
|
do { \
|
|
|
|
if (sendreq->req_send.req_base.req_proc->proc_arch & OMPI_ARCH_ISBIGENDIAN) { \
|
|
|
|
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO; \
|
|
|
|
MCA_PML_OB1_MATCH_HDR_HTON(hdr->hdr_match); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
2006-02-26 03:45:54 +03:00
|
|
|
#else
|
|
|
|
#define MCA_PML_OB1_SEND_REQUEST_START_MATCH_FIXUP(sendreq, hdr)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2006-02-06 22:51:49 +03:00
|
|
|
#define MCA_PML_OB1_SEND_REQUEST_START(sendreq, rc) \
|
|
|
|
do { \
|
|
|
|
mca_pml_ob1_comm_t* comm = sendreq->req_send.req_base.req_comm->c_pml_comm; \
|
2006-03-16 01:53:41 +03:00
|
|
|
mca_bml_base_endpoint_t* endpoint = (mca_bml_base_endpoint_t*) \
|
|
|
|
sendreq->req_send.req_base.req_proc->proc_pml; \
|
2006-02-06 22:51:49 +03:00
|
|
|
mca_bml_base_btl_t* bml_btl; \
|
|
|
|
size_t size = sendreq->req_send.req_bytes_packed; \
|
|
|
|
size_t eager_limit; \
|
|
|
|
\
|
|
|
|
if(endpoint == NULL) { \
|
|
|
|
rc = OMPI_ERR_UNREACH; \
|
|
|
|
break; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
sendreq->req_lock = 0; \
|
|
|
|
sendreq->req_pipeline_depth = 0; \
|
|
|
|
sendreq->req_bytes_delivered = 0; \
|
|
|
|
sendreq->req_state = 0; \
|
|
|
|
sendreq->req_send_offset = 0; \
|
2006-06-14 20:55:35 +04:00
|
|
|
sendreq->req_got_put_ack = false; \
|
2006-02-06 22:51:49 +03:00
|
|
|
sendreq->req_send.req_base.req_sequence = OPAL_THREAD_ADD32( \
|
|
|
|
&comm->procs[sendreq->req_send.req_base.req_peer].send_sequence,1); \
|
|
|
|
sendreq->req_endpoint = endpoint; \
|
|
|
|
\
|
|
|
|
/* select a btl */ \
|
|
|
|
bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager); \
|
|
|
|
eager_limit = bml_btl->btl_eager_limit - sizeof(mca_pml_ob1_hdr_t); \
|
|
|
|
\
|
2006-03-31 21:09:09 +04:00
|
|
|
MCA_PML_BASE_SEND_START( &sendreq->req_send.req_base ); \
|
|
|
|
\
|
2006-02-06 22:51:49 +03:00
|
|
|
/* shortcut for zero byte */ \
|
|
|
|
if(size <= eager_limit) { \
|
|
|
|
switch(sendreq->req_send.req_send_mode) { \
|
|
|
|
case MCA_PML_BASE_SEND_SYNCHRONOUS: \
|
|
|
|
rc = mca_pml_ob1_send_request_start_rndv(sendreq, bml_btl, size, 0); \
|
|
|
|
break; \
|
|
|
|
case MCA_PML_BASE_SEND_BUFFERED: \
|
|
|
|
rc = mca_pml_ob1_send_request_start_copy(sendreq, bml_btl, size); \
|
|
|
|
break; \
|
|
|
|
case MCA_PML_BASE_SEND_COMPLETE: \
|
|
|
|
rc = mca_pml_ob1_send_request_start_prepare(sendreq, bml_btl, size); \
|
|
|
|
break; \
|
|
|
|
default: \
|
|
|
|
if (size == 0) { \
|
|
|
|
mca_btl_base_descriptor_t* descriptor; \
|
|
|
|
mca_btl_base_segment_t* segment; \
|
|
|
|
mca_pml_ob1_hdr_t* hdr; \
|
|
|
|
\
|
|
|
|
/* allocate a descriptor */ \
|
|
|
|
MCA_PML_OB1_DES_ALLOC(bml_btl, descriptor, sizeof(mca_pml_ob1_match_hdr_t)); \
|
|
|
|
if(NULL == descriptor) { \
|
|
|
|
return OMPI_ERR_OUT_OF_RESOURCE; \
|
|
|
|
} \
|
|
|
|
segment = descriptor->des_src; \
|
|
|
|
\
|
|
|
|
/* build hdr */ \
|
|
|
|
hdr = (mca_pml_ob1_hdr_t*)segment->seg_addr.pval; \
|
|
|
|
hdr->hdr_common.hdr_flags = 0; \
|
|
|
|
hdr->hdr_common.hdr_type = MCA_PML_OB1_HDR_TYPE_MATCH; \
|
|
|
|
hdr->hdr_match.hdr_ctx = sendreq->req_send.req_base.req_comm->c_contextid; \
|
|
|
|
hdr->hdr_match.hdr_src = sendreq->req_send.req_base.req_comm->c_my_rank; \
|
|
|
|
hdr->hdr_match.hdr_tag = sendreq->req_send.req_base.req_tag; \
|
|
|
|
hdr->hdr_match.hdr_seq = sendreq->req_send.req_base.req_sequence; \
|
2006-02-26 03:45:54 +03:00
|
|
|
MCA_PML_OB1_SEND_REQUEST_START_MATCH_FIXUP(sendreq, hdr); \
|
2006-02-06 22:51:49 +03:00
|
|
|
\
|
|
|
|
/* short message */ \
|
|
|
|
descriptor->des_cbfunc = mca_pml_ob1_match_completion_cache; \
|
|
|
|
descriptor->des_flags |= MCA_BTL_DES_FLAGS_PRIORITY; \
|
|
|
|
descriptor->des_cbdata = sendreq; \
|
|
|
|
\
|
|
|
|
/* request is complete at mpi level */ \
|
|
|
|
OPAL_THREAD_LOCK(&ompi_request_lock); \
|
|
|
|
MCA_PML_OB1_SEND_REQUEST_MPI_COMPLETE(sendreq); \
|
|
|
|
OPAL_THREAD_UNLOCK(&ompi_request_lock); \
|
|
|
|
\
|
|
|
|
/* send */ \
|
|
|
|
rc = mca_bml_base_send(bml_btl, descriptor, MCA_BTL_TAG_PML); \
|
|
|
|
if(OMPI_SUCCESS != rc) { \
|
|
|
|
mca_bml_base_free(bml_btl, descriptor ); \
|
|
|
|
} \
|
|
|
|
} else if (bml_btl->btl_flags & MCA_BTL_FLAGS_SEND_INPLACE) { \
|
|
|
|
rc = mca_pml_ob1_send_request_start_prepare(sendreq, bml_btl, size); \
|
|
|
|
} else { \
|
|
|
|
rc = mca_pml_ob1_send_request_start_copy(sendreq, bml_btl, size); \
|
|
|
|
} \
|
|
|
|
break; \
|
|
|
|
} \
|
|
|
|
} else { \
|
|
|
|
size = eager_limit; \
|
|
|
|
if(sendreq->req_send.req_send_mode == MCA_PML_BASE_SEND_BUFFERED) { \
|
|
|
|
rc = mca_pml_ob1_send_request_start_buffered(sendreq, bml_btl, size); \
|
|
|
|
} else if \
|
|
|
|
(ompi_convertor_need_buffers(&sendreq->req_send.req_convertor) == false) { \
|
|
|
|
if( 0 != (sendreq->req_rdma_cnt = mca_pml_ob1_rdma_btls( \
|
|
|
|
sendreq->req_endpoint, \
|
|
|
|
sendreq->req_send.req_addr, \
|
|
|
|
sendreq->req_send.req_bytes_packed, \
|
|
|
|
sendreq->req_rdma))) { \
|
2006-02-13 22:02:39 +03:00
|
|
|
rc = mca_pml_ob1_send_request_start_rdma(sendreq, bml_btl, \
|
2006-02-13 20:53:54 +03:00
|
|
|
sendreq->req_send.req_bytes_packed); \
|
2006-02-06 22:51:49 +03:00
|
|
|
} else { \
|
|
|
|
rc = mca_pml_ob1_send_request_start_rndv(sendreq, bml_btl, size, \
|
|
|
|
MCA_PML_OB1_HDR_FLAGS_CONTIG); \
|
|
|
|
} \
|
|
|
|
} else { \
|
|
|
|
rc = mca_pml_ob1_send_request_start_rndv(sendreq, bml_btl, size, 0); \
|
|
|
|
} \
|
|
|
|
} \
|
2005-08-12 23:29:05 +04:00
|
|
|
} while (0)
|
2005-05-24 02:06:50 +04:00
|
|
|
|
2005-06-17 22:25:44 +04:00
|
|
|
|
2005-06-10 00:16:33 +04:00
|
|
|
/*
|
2005-09-15 22:47:59 +04:00
|
|
|
* Mark a send request as completed at the MPI level.
|
|
|
|
*/
|
|
|
|
|
2006-03-16 01:53:41 +03:00
|
|
|
#define MCA_PML_OB1_SEND_REQUEST_MPI_COMPLETE(sendreq) \
|
|
|
|
do { \
|
|
|
|
(sendreq)->req_send.req_base.req_ompi.req_status.MPI_SOURCE = \
|
|
|
|
(sendreq)->req_send.req_base.req_comm->c_my_rank; \
|
|
|
|
(sendreq)->req_send.req_base.req_ompi.req_status.MPI_TAG = \
|
|
|
|
(sendreq)->req_send.req_base.req_tag; \
|
|
|
|
(sendreq)->req_send.req_base.req_ompi.req_status.MPI_ERROR = OMPI_SUCCESS; \
|
|
|
|
(sendreq)->req_send.req_base.req_ompi.req_status._count = \
|
|
|
|
(sendreq)->req_send.req_bytes_packed; \
|
|
|
|
MCA_PML_BASE_REQUEST_MPI_COMPLETE( &((sendreq)->req_send.req_base.req_ompi) ); \
|
2006-03-31 21:09:09 +04:00
|
|
|
\
|
|
|
|
PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_COMPLETE, \
|
|
|
|
&(sendreq->req_send.req_base), PERUSE_SEND); \
|
|
|
|
\
|
2005-09-15 22:47:59 +04:00
|
|
|
} while(0)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The PML has completed a send request. Note that this request
|
|
|
|
* may have been orphaned by the user or have already completed
|
|
|
|
* at the MPI level.
|
2006-03-16 01:53:41 +03:00
|
|
|
* This macro will never be called directly from the upper level, as it should
|
|
|
|
* only be an internal call to the PML.
|
2005-06-10 00:16:33 +04:00
|
|
|
*/
|
2006-03-16 01:53:41 +03:00
|
|
|
|
|
|
|
#define MCA_PML_OB1_SEND_REQUEST_PML_COMPLETE(sendreq) \
|
|
|
|
do { \
|
|
|
|
size_t r; \
|
|
|
|
\
|
|
|
|
assert( false == sendreq->req_send.req_base.req_pml_complete ); \
|
|
|
|
\
|
2006-03-31 21:09:09 +04:00
|
|
|
PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_XFER_END, \
|
|
|
|
&(sendreq->req_send.req_base), \
|
|
|
|
PERUSE_SEND ); \
|
|
|
|
\
|
2006-03-16 01:53:41 +03:00
|
|
|
/* return mpool resources */ \
|
|
|
|
for( r = 0; r < sendreq->req_rdma_cnt; r++ ) { \
|
|
|
|
mca_mpool_base_registration_t* reg = sendreq->req_rdma[r].btl_reg; \
|
|
|
|
if( NULL != reg ) { \
|
|
|
|
reg->mpool->mpool_release(reg->mpool, reg); \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
sendreq->req_rdma_cnt = 0; \
|
|
|
|
\
|
|
|
|
if (sendreq->req_send.req_send_mode == MCA_PML_BASE_SEND_BUFFERED && \
|
|
|
|
sendreq->req_send.req_addr != sendreq->req_send.req_base.req_addr) { \
|
|
|
|
mca_pml_base_bsend_request_fini((ompi_request_t*)sendreq); \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
OPAL_THREAD_LOCK(&ompi_request_lock); \
|
|
|
|
if( false == sendreq->req_send.req_base.req_ompi.req_complete ) { \
|
|
|
|
/* Should only be called for long messages (maybe synchronous) */ \
|
|
|
|
MCA_PML_OB1_SEND_REQUEST_MPI_COMPLETE(sendreq); \
|
|
|
|
} \
|
|
|
|
sendreq->req_send.req_base.req_pml_complete = true; \
|
|
|
|
\
|
|
|
|
if( sendreq->req_send.req_base.req_free_called ) { \
|
|
|
|
MCA_PML_OB1_SEND_REQUEST_RETURN( sendreq ); \
|
|
|
|
} else { \
|
2006-06-12 10:14:35 +04:00
|
|
|
if(sendreq->req_send.req_base.req_ompi.req_persistent && \
|
2006-06-12 10:18:18 +04:00
|
|
|
(0 != sendreq->req_send.req_bytes_packed) ) { \
|
2006-03-16 01:53:41 +03:00
|
|
|
/* rewind convertor */ \
|
|
|
|
size_t offset = 0; \
|
|
|
|
ompi_convertor_set_position(&sendreq->req_send.req_convertor, &offset); \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
OPAL_THREAD_UNLOCK(&ompi_request_lock); \
|
2005-09-15 22:47:59 +04:00
|
|
|
} while (0)
|
2005-06-10 00:16:33 +04:00
|
|
|
|
2005-07-18 22:54:25 +04:00
|
|
|
|
2005-06-01 18:34:22 +04:00
|
|
|
/*
|
2005-07-18 22:54:25 +04:00
|
|
|
* Advance a pending send request. Note that the initial descriptor must complete
|
|
|
|
* and the acknowledment received before the request can complete or be scheduled.
|
|
|
|
* However, these events may occur in either order.
|
2005-06-01 18:34:22 +04:00
|
|
|
*/
|
|
|
|
|
2006-03-16 01:53:41 +03:00
|
|
|
#define MCA_PML_OB1_SEND_REQUEST_ADVANCE(sendreq) \
|
|
|
|
do { \
|
|
|
|
/* has an acknowledgment been received */ \
|
|
|
|
if(OPAL_THREAD_ADD32(&sendreq->req_state, 1) == 2) { \
|
2006-06-13 20:57:41 +04:00
|
|
|
if(sendreq->req_bytes_delivered >= sendreq->req_send.req_bytes_packed) { \
|
2006-03-16 01:53:41 +03:00
|
|
|
MCA_PML_OB1_SEND_REQUEST_PML_COMPLETE(sendreq); \
|
|
|
|
} else { \
|
|
|
|
/* additional data to schedule */ \
|
|
|
|
mca_pml_ob1_send_request_schedule(sendreq); \
|
|
|
|
} \
|
|
|
|
} \
|
2005-07-18 22:54:25 +04:00
|
|
|
} while (0)
|
|
|
|
|
2006-06-13 20:57:41 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Advance a pending send request. Note that the initial descriptor must complete
|
|
|
|
* and the acknowledment received before the request can complete or be scheduled.
|
|
|
|
* However, these events may occur in either order.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define MCA_PML_OB1_SEND_REQUEST_ADVANCE_NO_SCHEDULE(sendreq) \
|
|
|
|
do { \
|
|
|
|
OPAL_THREAD_ADD32(&sendreq->req_state, 1); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
2005-07-18 22:54:25 +04:00
|
|
|
/*
|
|
|
|
* Release resources associated with a request
|
|
|
|
*/
|
2005-05-24 02:06:50 +04:00
|
|
|
|
2005-07-01 21:00:59 +04:00
|
|
|
#define MCA_PML_OB1_SEND_REQUEST_RETURN(sendreq) \
|
|
|
|
{ \
|
2005-09-13 02:28:23 +04:00
|
|
|
/* Let the base handle the reference counts */ \
|
2005-07-01 21:00:59 +04:00
|
|
|
MCA_PML_BASE_SEND_REQUEST_FINI((&(sendreq)->req_send)); \
|
|
|
|
OMPI_FREE_LIST_RETURN( \
|
2006-06-13 02:09:03 +04:00
|
|
|
&mca_pml_ob1.send_requests, (ompi_free_list_item_t*)sendreq); \
|
2005-05-24 02:06:50 +04:00
|
|
|
}
|
2005-07-18 22:54:25 +04:00
|
|
|
|
2005-07-19 01:22:55 +04:00
|
|
|
/*
|
|
|
|
* Attempt to process any pending requests
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define MCA_PML_OB1_SEND_REQUEST_PROCESS_PENDING() \
|
|
|
|
do { \
|
|
|
|
/* advance pending requests */ \
|
|
|
|
while(opal_list_get_size(&mca_pml_ob1.send_pending)) { \
|
|
|
|
mca_pml_ob1_send_request_t* sendreq; \
|
2005-08-02 21:36:01 +04:00
|
|
|
OPAL_THREAD_LOCK(&mca_pml_ob1.lock); \
|
2005-07-19 01:22:55 +04:00
|
|
|
sendreq = (mca_pml_ob1_send_request_t*) \
|
|
|
|
opal_list_remove_first(&mca_pml_ob1.send_pending); \
|
2005-08-02 21:36:01 +04:00
|
|
|
OPAL_THREAD_UNLOCK(&mca_pml_ob1.lock); \
|
2005-07-19 01:22:55 +04:00
|
|
|
if(NULL == sendreq) \
|
|
|
|
break; \
|
|
|
|
mca_pml_ob1_send_request_schedule(sendreq); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
2005-07-18 22:54:25 +04:00
|
|
|
|
2005-06-01 18:34:22 +04:00
|
|
|
/**
|
2005-07-19 01:22:55 +04:00
|
|
|
* Start the specified request
|
2005-06-01 18:34:22 +04:00
|
|
|
*/
|
|
|
|
|
2005-09-14 21:08:08 +04:00
|
|
|
int mca_pml_ob1_send_request_start_buffered(
|
|
|
|
mca_pml_ob1_send_request_t* sendreq,
|
2005-09-15 22:47:59 +04:00
|
|
|
mca_bml_base_btl_t* bml_btl,
|
|
|
|
size_t size);
|
2005-09-14 21:08:08 +04:00
|
|
|
|
2005-08-13 01:33:01 +04:00
|
|
|
int mca_pml_ob1_send_request_start_copy(
|
|
|
|
mca_pml_ob1_send_request_t* sendreq,
|
2005-09-15 22:47:59 +04:00
|
|
|
mca_bml_base_btl_t* bml_btl,
|
|
|
|
size_t size);
|
2005-08-13 01:33:01 +04:00
|
|
|
|
|
|
|
int mca_pml_ob1_send_request_start_prepare(
|
|
|
|
mca_pml_ob1_send_request_t* sendreq,
|
2005-09-15 22:47:59 +04:00
|
|
|
mca_bml_base_btl_t* bml_btl,
|
|
|
|
size_t size);
|
|
|
|
|
|
|
|
int mca_pml_ob1_send_request_start_rdma(
|
|
|
|
mca_pml_ob1_send_request_t* sendreq,
|
|
|
|
mca_bml_base_btl_t* bml_btl,
|
|
|
|
size_t size);
|
|
|
|
|
|
|
|
int mca_pml_ob1_send_request_start_rndv(
|
|
|
|
mca_pml_ob1_send_request_t* sendreq,
|
|
|
|
mca_bml_base_btl_t* bml_btl,
|
2005-11-11 18:33:25 +03:00
|
|
|
size_t size,
|
|
|
|
int flags);
|
2005-06-01 18:34:22 +04:00
|
|
|
|
|
|
|
/**
|
2005-07-19 01:22:55 +04:00
|
|
|
* Schedule additional fragments
|
2005-06-01 18:34:22 +04:00
|
|
|
*/
|
2005-06-02 01:09:43 +04:00
|
|
|
int mca_pml_ob1_send_request_schedule(
|
2005-06-01 18:34:22 +04:00
|
|
|
mca_pml_ob1_send_request_t* sendreq);
|
2005-05-24 02:06:50 +04:00
|
|
|
|
2005-08-12 23:29:05 +04:00
|
|
|
/**
|
|
|
|
* Completion callback on match header
|
2005-09-14 21:08:08 +04:00
|
|
|
* Cache descriptor.
|
|
|
|
*/
|
|
|
|
void mca_pml_ob1_match_completion_cache(
|
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
struct mca_btl_base_endpoint_t* ep,
|
|
|
|
struct mca_btl_base_descriptor_t* descriptor,
|
|
|
|
int status);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Completion callback on match header
|
|
|
|
* Free descriptor.
|
2005-08-12 23:29:05 +04:00
|
|
|
*/
|
2005-09-14 21:08:08 +04:00
|
|
|
void mca_pml_ob1_match_completion_free(
|
2005-08-12 23:29:05 +04:00
|
|
|
struct mca_btl_base_module_t* btl,
|
|
|
|
struct mca_btl_base_endpoint_t* ep,
|
|
|
|
struct mca_btl_base_descriptor_t* descriptor,
|
|
|
|
int status);
|
|
|
|
|
2005-06-09 07:11:51 +04:00
|
|
|
/**
|
2005-07-19 01:22:55 +04:00
|
|
|
* Initiate a put scheduled by the receiver.
|
2005-06-09 07:11:51 +04:00
|
|
|
*/
|
|
|
|
|
2005-06-10 00:16:33 +04:00
|
|
|
void mca_pml_ob1_send_request_put(
|
|
|
|
mca_pml_ob1_send_request_t* sendreq,
|
2005-06-30 09:50:55 +04:00
|
|
|
mca_btl_base_module_t* btl,
|
2005-06-10 00:16:33 +04:00
|
|
|
mca_pml_ob1_rdma_hdr_t* hdr);
|
2005-06-09 07:11:51 +04:00
|
|
|
|
|
|
|
|
2005-05-24 02:06:50 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|