OpenMPI  0.1.1
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,
 
)
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)
Definition: opal_list.h:98
#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
#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
#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)
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, \
} while(0)
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)
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 
)