OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Typedefs | Functions
pml_csum_recvreq.h File Reference
`#include "pml_csum.h"`
`#include "pml_csum_rdma.h"`
`#include "pml_csum_rdmafrag.h"`
`#include "ompi/proc/proc.h"`
`#include "ompi/mca/pml/csum/pml_csum_comm.h"`
`#include "ompi/mca/mpool/base/base.h"`
`#include "ompi/mca/pml/base/pml_base_recvreq.h"`

Go to the source code of this file.

## Data Structures
struct | mca_pml_csum_recv_request_t

## Macros
#define | MCA_PML_CSUM_RECV_REQUEST_ALLOC(recvreq, rc)
| Allocate a recv request from the modules free list. More...
#define | MCA_PML_CSUM_RECV_REQUEST_INIT(request,addr,count,datatype,src,tag,comm,persistent)
| Initialize a receive request with call parameters. More...
#define | MCA_PML_CSUM_RECV_REQUEST_MPI_COMPLETE(recvreq)
| Mark the request as completed at MPI level for internal purposes. More...
#define | MCA_PML_CSUM_RECV_REQUEST_RETURN(recvreq)
#define | MCA_PML_CSUM_RECV_REQUEST_START(r) mca_pml_csum_recv_req_start(r)
#define | MCA_PML_CSUM_RECV_REQUEST_MATCHED(request, hdr) recv_req_matched(request, hdr)
#define | MCA_PML_CSUM_RECV_REQUEST_UNPACK(request,segments,num_segments,seg_offset,data_offset,bytes_received,bytes_delivered)
#define | MCA_PML_CSUM_ADD_ACK_TO_PENDING(P, S, D, O)

## Typedefs
typedef struct mca_pml_csum_recv_request_t | mca_pml_csum_recv_request_t

## Functions
| OBJ_CLASS_DECLARATION (mca_pml_csum_recv_request_t)
static bool | lock_recv_request (mca_pml_csum_recv_request_t *recvreq)
static bool | unlock_recv_request (mca_pml_csum_recv_request_t *recvreq)
static void | recv_request_pml_complete (mca_pml_csum_recv_request_t *recvreq)
| Complete receive request. More...
static bool | recv_request_pml_complete_check (mca_pml_csum_recv_request_t *recvreq)
void | mca_pml_csum_recv_req_start (mca_pml_csum_recv_request_t *req)
static void | prepare_recv_req_converter (mca_pml_csum_recv_request_t *req)
static void | recv_req_matched (mca_pml_csum_recv_request_t *req, mca_pml_csum_match_hdr_t *hdr)
void | mca_pml_csum_recv_request_progress_match (mca_pml_csum_recv_request_t *req, struct mca_btl_base_module_t *btl, mca_btl_base_segment_t *segments, size_t num_segments)
void | mca_pml_csum_recv_request_progress_frag (mca_pml_csum_recv_request_t *req, struct mca_btl_base_module_t *btl, mca_btl_base_segment_t *segments, size_t num_segments)
void | mca_pml_csum_recv_request_progress_rndv (mca_pml_csum_recv_request_t *req, struct mca_btl_base_module_t *btl, mca_btl_base_segment_t *segments, size_t num_segments)
void | mca_pml_csum_recv_request_progress_rget (mca_pml_csum_recv_request_t *req, struct mca_btl_base_module_t *btl, mca_btl_base_segment_t *segments, size_t num_segments)
void | mca_pml_csum_recv_request_matched_probe (mca_pml_csum_recv_request_t *req, struct mca_btl_base_module_t *btl, mca_btl_base_segment_t *segments, size_t num_segments)
| Handle completion of a probe request.
int | mca_pml_csum_recv_request_schedule_once (mca_pml_csum_recv_request_t *req, mca_bml_base_btl_t *start_bml_btl)
static int | mca_pml_csum_recv_request_schedule_exclusive (mca_pml_csum_recv_request_t *req, mca_bml_base_btl_t *start_bml_btl)
static void | mca_pml_csum_recv_request_schedule (mca_pml_csum_recv_request_t *req, mca_bml_base_btl_t *start_bml_btl)
int | mca_pml_csum_recv_request_ack_send_btl (ompi_proc_t *proc, mca_bml_base_btl_t *bml_btl, uint64_t hdr_src_req, void *hdr_dst_req, uint64_t hdr_rdma_offset, bool nordma)
static int | mca_pml_csum_recv_request_ack_send (ompi_proc_t *proc, uint64_t hdr_src_req, void *hdr_dst_req, uint64_t hdr_send_offset, bool nordma)
int | mca_pml_csum_recv_request_get_frag (mca_pml_csum_rdma_frag_t *frag)
void | mca_pml_csum_recv_request_process_pending (void)

## Macro Definition Documentation

#define MCA_PML_CSUM_ADD_ACK_TO_PENDING | ( |  | P,
|  |  | S,
|  |  | D,
|  |  | O
| ) |  |

Value:
do { \
mca_pml_csum_pckt_pending_t *_pckt; \
int _rc; \
\
MCA_PML_CSUM_PCKT_PENDING_ALLOC(_pckt,_rc); \
_pckt->hdr.hdr_common.hdr_type = MCA_PML_CSUM_HDR_TYPE_ACK; \
_pckt->hdr.hdr_ack.hdr_src_req.lval = (S); \
_pckt->hdr.hdr_ack.hdr_dst_req.pval = (D); \
_pckt->hdr.hdr_ack.hdr_send_offset = (O); \
_pckt->proc = (P); \
_pckt->bml_btl = NULL; \
OPAL_THREAD_LOCK(&mca_pml_csum.lock); \
opal_list_append(&mca_pml_csum.pckt_pending, \
(opal_list_item_t*)_pckt); \
OPAL_THREAD_UNLOCK(&mca_pml_csum.lock); \
} while(0)
opal_list_item_t
Definition: opal_list.h:98
OPAL_THREAD_LOCK
#define OPAL_THREAD_LOCK(mutex)
Lock a mutex if opal_using_threads() says that multiple threads may be active in the process...
Definition: mutex.h:223
OPAL_THREAD_UNLOCK
#define OPAL_THREAD_UNLOCK(mutex)
Unlock a mutex if opal_using_threads() says that multiple threads may be active in the process...
Definition: mutex.h:309
opal_list_append
#define opal_list_append(l, i)
Append an item to the end of the list.
Definition: opal_list.h:410

#define MCA_PML_CSUM_RECV_REQUEST_ALLOC | ( |  | recvreq,
|  |  | rc
| ) |  |

Value:
do { \
ompi_free_list_item_t* item; \
rc = OMPI_SUCCESS; \
OMPI_FREE_LIST_GET(&mca_pml_base_recv_requests, item, rc); \
recvreq = (mca_pml_csum_recv_request_t*)item; \
} while(0)
mca_pml_csum_recv_request_t
Definition: pml_csum_recvreq.h:36

Allocate a recv request from the modules free list.

Parameters

  rc | (OUT) OMPI_SUCCESS or error status on failure.

Returns
  Receive request.

#define MCA_PML_CSUM_RECV_REQUEST_INIT | ( |  | request,
|  |  | addr,
|  |  | count,
|  |  | datatype,
|  |  | src,
|  |  | tag,
|  |  | comm,
|  |  | persistent
| ) |  |

Value:
do { \
MCA_PML_BASE_RECV_REQUEST_INIT( &(request)->req_recv, \
addr, \
count, \
datatype, \
src, \
tag, \
comm, \
persistent); \
} while(0)
MCA_PML_BASE_RECV_REQUEST_INIT
#define MCA_PML_BASE_RECV_REQUEST_INIT(request,addr,count,datatype,src,tag,comm,persistent)
Initialize a receive request with call parameters.
Definition: pml_base_recvreq.h:56
request
Definition: evdns.c:158

Initialize a receive request with call parameters.

Parameters

  request | (IN) Receive request.
  addr | (IN) User buffer.
  count | (IN) Number of elements of indicated datatype.
  datatype | (IN) User defined datatype.
  src | (IN) Source rank w/in the communicator.
  tag | (IN) User defined tag.
  comm | (IN) Communicator.
  persistent | (IN) Is this a ersistent request.

#define MCA_PML_CSUM_RECV_REQUEST_MPI_COMPLETE | ( |  | recvreq | ) |

Value:
do { \
PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_COMPLETE, \
&(recvreq->req_recv.req_base), PERUSE_RECV ); \
ompi_request_complete( &(recvreq->req_recv.req_base.req_ompi), true ); \
} while (0)
ompi_request_complete
static int ompi_request_complete(ompi_request_t *request, bool with_signal)
Signal or mark a request as complete.
Definition: request.h:399

Mark the request as completed at MPI level for internal purposes.

Parameters

  recvreq | (IN) Receive request.

Referenced by recv_request_pml_complete().

#define MCA_PML_CSUM_RECV_REQUEST_RETURN | ( |  | recvreq | ) |

Value:
{ \
MCA_PML_BASE_RECV_REQUEST_FINI(&(recvreq)->req_recv); \
OMPI_FREE_LIST_RETURN( &mca_pml_base_recv_requests, \
(ompi_free_list_item_t*)(recvreq)); \
}
MCA_PML_BASE_RECV_REQUEST_FINI
#define MCA_PML_BASE_RECV_REQUEST_FINI(request)
Return a receive request.
Definition: pml_base_recvreq.h:117
ompi_free_list_item_t
Definition: ompi_free_list.h:62

## Function Documentation

void mca_pml_csum_recv_req_start | ( | mca_pml_csum_recv_request_t * | req | ) |

The laps of time between the ACTIVATE event and the SEARCH_UNEX one include the cost of the request lock.

References mca_pml_csum_match_hdr_t::hdr_src, mca_pml_csum_match_hdr_t::hdr_tag, mca_pml_csum_common_hdr_t::hdr_type, mca_pml_comm_t::matching_lock, mca_pml_csum_recv_request_matched_probe(), mca_pml_csum_recv_request_progress_rndv(), opal_list_remove_item(), OPAL_THREAD_LOCK, OPAL_THREAD_UNLOCK, mca_pml_comm_t::recv_sequence, mca_pml_csum_recv_request_t::req_ack_sent, mca_pml_base_recv_request_t::req_base, mca_pml_csum_recv_request_t::req_bytes_expected, mca_pml_csum_recv_request_t::req_bytes_received, mca_pml_base_request_t::req_comm, mca_pml_csum_recv_request_t::req_match_received, mca_pml_base_request_t::req_peer, mca_pml_base_request_t::req_proc, mca_pml_base_request_t::req_sequence, mca_btl_base_segment_t::seg_addr, mca_pml_csum_comm_proc_t::specific_receives, mca_pml_csum_comm_proc_t::unexpected_frags, and mca_pml_comm_t::wild_receives.

void mca_pml_csum_recv_request_progress_rndv | ( | mca_pml_csum_recv_request_t * | req,
|  | struct mca_btl_base_module_t * | btl,
|  | mca_btl_base_segment_t * | segments,
|  | size_t | num_segments
| ) |  |

The PUT protocol do not attach any data to the original request. Therefore, we might want to avoid unpacking if there is nothing to unpack.

References opal_convertor_t::checksum, dump_csum_error_data(), mca_pml_csum_match_hdr_t::hdr_csum, mca_pml_csum_rendezvous_hdr_t::hdr_msg_length, mca_pml_csum_rendezvous_hdr_t::hdr_src_req, opal_output(), OPAL_OUTPUT_VERBOSE, ORTE_PROC_MY_NAME, mca_pml_base_request_t::req_addr, mca_pml_base_recv_request_t::req_base, mca_pml_base_recv_request_t::req_bytes_packed, mca_pml_csum_recv_request_t::req_bytes_received, mca_pml_base_request_t::req_convertor, mca_pml_base_request_t::req_count, mca_pml_base_request_t::req_datatype, and mca_btl_base_segment_t::seg_addr.

Referenced by mca_pml_csum_recv_frag_match(), and mca_pml_csum_recv_req_start().

static void recv_request_pml_complete | ( | mca_pml_csum_recv_request_t * | recvreq | ) |
| inline static

Complete receive request.

Request structure cannot be accessed after calling this function any more.

Parameters

  recvreq | (IN) Receive request.

References MCA_PML_CSUM_RECV_REQUEST_MPI_COMPLETE, mca_mpool_base_module_t::mpool_deregister, OPAL_THREAD_LOCK, OPAL_THREAD_UNLOCK, mca_pml_base_recv_request_t::req_base, mca_pml_csum_recv_request_t::req_bytes_expected, mca_pml_base_recv_request_t::req_bytes_packed, mca_pml_csum_recv_request_t::req_bytes_received, mca_pml_base_request_t::req_free_called, mca_pml_base_request_t::req_ompi, mca_pml_base_request_t::req_pml_complete, and ompi_request_t::req_status.