OpenMPI  0.1.1
pml_ob1.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_ob1_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_ob1_t
 OB1 PML module. More...
 
struct  mca_pml_ob1_pckt_pending_t
 
struct  mca_pml_ob1_com_btl_t
 

Macros

#define MCA_PML_OB1_PCKT_PENDING_ALLOC(pckt, rc)
 
#define MCA_PML_OB1_PCKT_PENDING_RETURN(pckt)
 
#define MCA_PML_OB1_ADD_FIN_TO_PENDING(P, D, B, O, S)
 
#define MCA_PML_OB1_PROGRESS_PENDING(bml_btl)
 
#define MCA_PML_OB1_COMPUTE_SEGMENT_LENGTH(segments, count, hdrlen, length)
 

Typedefs

typedef struct mca_pml_ob1_t mca_pml_ob1_t
 
typedef struct
mca_pml_ob1_pckt_pending_t 
mca_pml_ob1_pckt_pending_t
 
typedef struct
mca_pml_ob1_com_btl_t 
mca_pml_ob1_com_btl_t
 

Functions

int mca_pml_ob1_add_comm (struct ompi_communicator_t *comm)
 
int mca_pml_ob1_del_comm (struct ompi_communicator_t *comm)
 
int mca_pml_ob1_add_procs (struct ompi_proc_t **procs, size_t nprocs)
 
int mca_pml_ob1_del_procs (struct ompi_proc_t **procs, size_t nprocs)
 
int mca_pml_ob1_enable (bool enable)
 
int mca_pml_ob1_progress (void)
 
int mca_pml_ob1_iprobe (int dst, int tag, struct ompi_communicator_t *comm, int *matched, ompi_status_public_t *status)
 
int mca_pml_ob1_probe (int dst, int tag, struct ompi_communicator_t *comm, ompi_status_public_t *status)
 
int mca_pml_ob1_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_ob1_mprobe (int dst, int tag, struct ompi_communicator_t *comm, struct ompi_message_t **message, ompi_status_public_t *status)
 
int mca_pml_ob1_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_ob1_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_ob1_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_ob1_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_ob1_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_ob1_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_ob1_imrecv (void *buf, size_t count, ompi_datatype_t *datatype, struct ompi_message_t **message, struct ompi_request_t **request)
 
int mca_pml_ob1_mrecv (void *buf, size_t count, ompi_datatype_t *datatype, struct ompi_message_t **message, ompi_status_public_t *status)
 
int mca_pml_ob1_dump (struct ompi_communicator_t *comm, int verbose)
 
int mca_pml_ob1_start (size_t count, ompi_request_t **requests)
 
int mca_pml_ob1_ft_event (int state)
 
 OBJ_CLASS_DECLARATION (mca_pml_ob1_pckt_pending_t)
 
int mca_pml_ob1_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_ob1_process_pending_packets (mca_bml_base_btl_t *bml_btl)
 
void mca_pml_ob1_process_pending_rdma (void)
 
int mca_pml_ob1_com_btl_comp (const void *v1, const void *v2)
 
static void mca_pml_ob1_calc_weighted_length (mca_pml_ob1_com_btl_t *btls, int num_btls, size_t size, double weight_total)
 

Variables

mca_pml_ob1_t mca_pml_ob1
 
int mca_pml_ob1_output
 

Macro Definition Documentation

#define MCA_PML_OB1_ADD_FIN_TO_PENDING (   P,
  D,
  B,
  O,
 
)
Value:
do { \
mca_pml_ob1_pckt_pending_t *_pckt; \
int _rc; \
\
MCA_PML_OB1_PCKT_PENDING_ALLOC(_pckt,_rc); \
_pckt->hdr.hdr_common.hdr_type = MCA_PML_OB1_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_ob1.lock); \
opal_list_append(&mca_pml_ob1.pckt_pending, \
(opal_list_item_t*)_pckt); \
OPAL_THREAD_UNLOCK(&mca_pml_ob1.lock); \
(void)_rc; \
} 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_OB1_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_OB1_PCKT_PENDING_ALLOC (   pckt,
  rc 
)
Value:
do { \
ompi_free_list_item_t* item; \
OMPI_FREE_LIST_WAIT(&mca_pml_ob1.pending_pckts, item, rc); \
pckt = (mca_pml_ob1_pckt_pending_t*)item; \
} while (0)
Definition: pml_ob1.h:210
#define MCA_PML_OB1_PCKT_PENDING_RETURN (   pckt)
Value:
do { \
/* return packet */ \
OMPI_FREE_LIST_RETURN(&mca_pml_ob1.pending_pckts, \
} while(0)
Definition: ompi_free_list.h:62
#define MCA_PML_OB1_PROGRESS_PENDING (   bml_btl)
Value:
do { \
if(opal_list_get_size(&mca_pml_ob1.pckt_pending)) \
mca_pml_ob1_process_pending_packets(bml_btl); \
if(opal_list_get_size(&mca_pml_ob1.recv_pending)) \
mca_pml_ob1_recv_request_process_pending(); \
if(opal_list_get_size(&mca_pml_ob1.send_pending)) \
mca_pml_ob1_send_request_process_pending(bml_btl); \
if(opal_list_get_size(&mca_pml_ob1.rdma_pending)) \
mca_pml_ob1_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_ob1_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_ob1_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_ob1_fin_hdr_t::hdr_common, mca_pml_ob1_fin_hdr_t::hdr_des, mca_pml_ob1_fin_hdr_t::hdr_fail, mca_pml_ob1_common_hdr_t::hdr_flags, mca_pml_ob1_common_hdr_t::hdr_type, and mca_btl_base_segment_t::seg_addr.