OpenMPI 0.1.1

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

- File List
- Globals

Data Structures | Macros | Typedefs | Functions | Variables
pml_csum.h File Reference
`#include "ompi_config.h"`
`#include "ompi/class/ompi_free_list.h"`
`#include "ompi/request/request.h"`
`#include "ompi/mca/pml/pml.h"`
`#include "ompi/mca/pml/base/pml_base_request.h"`
`#include "ompi/mca/pml/base/pml_base_bsend.h"`
`#include "ompi/mca/pml/base/pml_base_sendreq.h"`
`#include "ompi/datatype/ompi_datatype.h"`
`#include "pml_csum_hdr.h"`
`#include "ompi/mca/bml/base/base.h"`
`#include "ompi/proc/proc.h"`
`#include "ompi/mca/allocator/base/base.h"`

Go to the source code of this file.

## Data Structures
struct | mca_pml_csum_t
| CSUM PML module. More...
struct | mca_pml_csum_pckt_pending_t
struct | mca_pml_csum_com_btl_t

## Macros
#define | MCA_PML_CSUM_PCKT_PENDING_ALLOC(pckt, rc)
#define | MCA_PML_CSUM_PCKT_PENDING_RETURN(pckt)
#define | MCA_PML_CSUM_ADD_FIN_TO_PENDING(P, D, B, O, S)
#define | MCA_PML_CSUM_PROGRESS_PENDING(bml_btl)
#define | MCA_PML_CSUM_COMPUTE_SEGMENT_LENGTH(segments, count, hdrlen, length)

## Typedefs
typedef struct mca_pml_csum_t | mca_pml_csum_t
typedef struct mca_pml_csum_pckt_pending_t | mca_pml_csum_pckt_pending_t
typedef struct mca_pml_csum_com_btl_t | mca_pml_csum_com_btl_t

## Functions
int | mca_pml_csum_add_comm (struct ompi_communicator_t *comm)
int | mca_pml_csum_del_comm (struct ompi_communicator_t *comm)
int | mca_pml_csum_add_procs (struct ompi_proc_t **procs, size_t nprocs)
int | mca_pml_csum_del_procs (struct ompi_proc_t **procs, size_t nprocs)
int | mca_pml_csum_enable (bool enable)
int | mca_pml_csum_progress (void)
int | mca_pml_csum_iprobe (int dst, int tag, struct ompi_communicator_t *comm, int *matched, ompi_status_public_t *status)
int | mca_pml_csum_probe (int dst, int tag, struct ompi_communicator_t *comm, ompi_status_public_t *status)
int | mca_pml_csum_improbe (int dst, int tag, struct ompi_communicator_t *comm, int *matched, struct ompi_message_t **message, ompi_status_public_t *status)
int | mca_pml_csum_mprobe (int dst, int tag, struct ompi_communicator_t *comm, struct ompi_message_t **message, ompi_status_public_t *status)
int | mca_pml_csum_isend_init (void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, struct ompi_communicator_t *comm, struct ompi_request_t **request)
int | mca_pml_csum_isend (void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, struct ompi_communicator_t *comm, struct ompi_request_t **request)
int | mca_pml_csum_send (void *buf, size_t count, ompi_datatype_t *datatype, int dst, int tag, mca_pml_base_send_mode_t mode, struct ompi_communicator_t *comm)
int | mca_pml_csum_irecv_init (void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t *comm, struct ompi_request_t **request)
int | mca_pml_csum_irecv (void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t *comm, struct ompi_request_t **request)
int | mca_pml_csum_recv (void *buf, size_t count, ompi_datatype_t *datatype, int src, int tag, struct ompi_communicator_t *comm, ompi_status_public_t *status)
int | mca_pml_csum_imrecv (void *buf, size_t count, ompi_datatype_t *datatype, struct ompi_message_t **message, struct ompi_request_t **request)
int | mca_pml_csum_mrecv (void *buf, size_t count, ompi_datatype_t *datatype, struct ompi_message_t **message, ompi_status_public_t *status)
int | mca_pml_csum_dump (struct ompi_communicator_t *comm, int verbose)
int | mca_pml_csum_start (size_t count, ompi_request_t **requests)
int | mca_pml_csum_ft_event (int state)
| OBJ_CLASS_DECLARATION (mca_pml_csum_pckt_pending_t)
int | mca_pml_csum_send_fin (ompi_proc_t *proc, mca_bml_base_btl_t *bml_btl, ompi_ptr_t hdr_des, uint8_t order, uint32_t status)
| Send an FIN to the peer. More...
void | mca_pml_csum_process_pending_packets (mca_bml_base_btl_t *bml_btl)
void | mca_pml_csum_process_pending_rdma (void)
int | mca_pml_csum_com_btl_comp (const void *v1, const void *v2)
static void | mca_pml_csum_calc_weighted_length (mca_pml_csum_com_btl_t *btls, int num_btls, size_t size, double weight_total)

## Variables
mca_pml_csum_t | mca_pml_csum
int | mca_pml_csum_output

## Macro Definition Documentation

#define MCA_PML_CSUM_ADD_FIN_TO_PENDING | ( |  | P,
|  |  | D,
|  |  | B,
|  |  | O,
|  |  | S
| ) |  |

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_FIN; \
_pckt->hdr.hdr_fin.hdr_des = (D); \
_pckt->hdr.hdr_fin.hdr_fail = (S); \
_pckt->proc = (P); \
_pckt->bml_btl = (B); \
_pckt->order = (O); \
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_COMPUTE_SEGMENT_LENGTH | ( |  | segments,
|  |  | count,
|  |  | hdrlen,
|  |  | length
| ) |  |

Value:
do { \
size_t i; \
\
for( i = 0; i < count; i++ ) { \
length += segments[i].seg_len; \
} \
length -= hdrlen; \
} while(0)

#define MCA_PML_CSUM_PCKT_PENDING_ALLOC | ( |  | pckt,
|  |  | rc
| ) |  |

Value:
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_pml_csum.pending_pckts, item, rc); \
pckt = (mca_pml_csum_pckt_pending_t*)item; \
} while (0)
mca_pml_csum_pckt_pending_t
Definition: pml_csum.h:212

#define MCA_PML_CSUM_PCKT_PENDING_RETURN | ( |  | pckt | ) |

Value:
do { \
/* return packet */ \
OMPI_FREE_LIST_RETURN(&mca_pml_csum.pending_pckts, \
(ompi_free_list_item_t*)pckt); \
} while(0)
ompi_free_list_item_t
Definition: ompi_free_list.h:62

#define MCA_PML_CSUM_PROGRESS_PENDING | ( |  | bml_btl | ) |

Value:
do { \
if(opal_list_get_size(&mca_pml_csum.pckt_pending)) \
mca_pml_csum_process_pending_packets(bml_btl); \
if(opal_list_get_size(&mca_pml_csum.recv_pending)) \
mca_pml_csum_recv_request_process_pending(); \
if(opal_list_get_size(&mca_pml_csum.send_pending)) \
mca_pml_csum_send_request_process_pending(bml_btl); \
if(opal_list_get_size(&mca_pml_csum.rdma_pending)) \
mca_pml_csum_process_pending_rdma(); \
} while (0)
opal_list_get_size
static size_t opal_list_get_size(opal_list_t *list)
Return the number of items in a list.
Definition: opal_list.h:299

## Function Documentation

int mca_pml_csum_enable | ( | bool | enable | ) |

If we get here this is the PML who get selected for the run. We should get ownership for the send and receive requests list, and initialize them with the size of our own requests.

References mca_pml_base_send_requests, OBJ_CLASS, and OBJ_CONSTRUCT.

int mca_pml_csum_send_fin | ( | ompi_proc_t * | proc,
|  | mca_bml_base_btl_t * | bml_btl,
|  | ompi_ptr_t | hdr_des,
|  | uint8_t | order,
|  | uint32_t | status
| ) |  |

Send an FIN to the peer.

If we fail to send this ack (no more available fragments or the send failed) this function automatically add the FIN to the list of pending FIN, Which guarantee that the FIN will be sent later.

References mca_btl_base_descriptor_t::des_cbdata, mca_btl_base_descriptor_t::des_cbfunc, mca_btl_base_descriptor_t::des_src, mca_pml_csum_fin_hdr_t::hdr_common, mca_pml_csum_common_hdr_t::hdr_csum, mca_pml_csum_fin_hdr_t::hdr_des, mca_pml_csum_fin_hdr_t::hdr_fail, mca_pml_csum_common_hdr_t::hdr_flags, mca_pml_csum_common_hdr_t::hdr_type, OPAL_OUTPUT_VERBOSE, ORTE_PROC_MY_NAME, and mca_btl_base_segment_t::seg_addr.

int mca_pml_csum_start | ( | size_t | count,
|  | ompi_request_t ** | requests
| ) |  |

Reset the convertor in case we're dealing with the original request, which when completed do not reset the convertor.

References OPAL_THREAD_LOCK, OPAL_THREAD_UNLOCK, mca_pml_base_request_t::req_addr, mca_pml_base_send_request_t::req_base, mca_pml_base_send_request_t::req_bytes_packed, mca_pml_base_request_t::req_comm, mca_pml_base_request_t::req_convertor, mca_pml_base_request_t::req_count, mca_pml_base_request_t::req_datatype, mca_pml_base_request_t::req_free_called, mca_pml_base_request_t::req_ompi, mca_pml_base_request_t::req_peer, mca_pml_base_request_t::req_pml_complete, ompi_request_t::req_state, mca_pml_base_request_t::req_tag, and mca_pml_base_request_t::req_type.