27 #include "ompi_config.h"
28 #include "ompi/class/ompi_free_list.h"
32 #include "ompi/mca/pml/base/pml_base_bsend.h"
34 #include "ompi/datatype/ompi_datatype.h"
36 #include "ompi/mca/bml/base/base.h"
53 size_t send_pipeline_depth;
54 size_t recv_pipeline_depth;
55 size_t rdma_put_retries_limit;
56 int max_rdma_per_request;
57 int max_send_per_range;
59 int leave_pinned_pipeline;
81 uint32_t unexpected_limit;
86 extern int mca_pml_ob1_output;
92 extern int mca_pml_ob1_add_comm(
96 extern int mca_pml_ob1_del_comm(
100 extern int mca_pml_ob1_add_procs(
105 extern int mca_pml_ob1_del_procs(
112 extern int mca_pml_ob1_progress(
void);
114 extern int mca_pml_ob1_iprobe(
int dst,
120 extern int mca_pml_ob1_probe(
int dst,
125 extern int mca_pml_ob1_improbe(
int dst,
132 extern int mca_pml_ob1_mprobe(
int dst,
138 extern int mca_pml_ob1_isend_init(
void *buf,
143 mca_pml_base_send_mode_t mode,
147 extern int mca_pml_ob1_isend(
void *buf,
152 mca_pml_base_send_mode_t mode,
156 extern int mca_pml_ob1_send(
void *buf,
161 mca_pml_base_send_mode_t mode,
164 extern int mca_pml_ob1_irecv_init(
void *buf,
172 extern int mca_pml_ob1_irecv(
void *buf,
180 extern int mca_pml_ob1_recv(
void *buf,
188 extern int mca_pml_ob1_imrecv(
void *buf,
194 extern int mca_pml_ob1_mrecv(
void *buf,
206 extern int mca_pml_ob1_ft_event(
int state );
220 #define MCA_PML_OB1_PCKT_PENDING_ALLOC(pckt,rc) \
222 ompi_free_list_item_t* item; \
223 OMPI_FREE_LIST_WAIT(&mca_pml_ob1.pending_pckts, item, rc); \
224 pckt = (mca_pml_ob1_pckt_pending_t*)item; \
227 #define MCA_PML_OB1_PCKT_PENDING_RETURN(pckt) \
230 OMPI_FREE_LIST_RETURN(&mca_pml_ob1.pending_pckts, \
231 (ompi_free_list_item_t*)pckt); \
234 #define MCA_PML_OB1_ADD_FIN_TO_PENDING(P, D, B, O, S) \
236 mca_pml_ob1_pckt_pending_t *_pckt; \
239 MCA_PML_OB1_PCKT_PENDING_ALLOC(_pckt,_rc); \
240 _pckt->hdr.hdr_common.hdr_type = MCA_PML_OB1_HDR_TYPE_FIN; \
241 _pckt->hdr.hdr_fin.hdr_des = (D); \
242 _pckt->hdr.hdr_fin.hdr_fail = (S); \
244 _pckt->bml_btl = (B); \
245 _pckt->order = (O); \
246 OPAL_THREAD_LOCK(&mca_pml_ob1.lock); \
247 opal_list_append(&mca_pml_ob1.pckt_pending, \
248 (opal_list_item_t*)_pckt); \
249 OPAL_THREAD_UNLOCK(&mca_pml_ob1.lock); \
255 ompi_ptr_t hdr_des, uint8_t order, uint32_t status);
268 void mca_pml_ob1_process_pending_rdma(
void);
270 #define MCA_PML_OB1_PROGRESS_PENDING(bml_btl) \
272 if(opal_list_get_size(&mca_pml_ob1.pckt_pending)) \
273 mca_pml_ob1_process_pending_packets(bml_btl); \
274 if(opal_list_get_size(&mca_pml_ob1.recv_pending)) \
275 mca_pml_ob1_recv_request_process_pending(); \
276 if(opal_list_get_size(&mca_pml_ob1.send_pending)) \
277 mca_pml_ob1_send_request_process_pending(bml_btl); \
278 if(opal_list_get_size(&mca_pml_ob1.rdma_pending)) \
279 mca_pml_ob1_process_pending_rdma(); \
285 #define MCA_PML_OB1_COMPUTE_SEGMENT_LENGTH(segments, count, hdrlen, length) \
289 for( i = 0; i < count; i++ ) { \
290 length += segments[i].seg_len; \
303 int mca_pml_ob1_com_btl_comp(
const void *v1,
const void *v2);
309 double weight_total )
315 if( OPAL_LIKELY(1 == num_btls) ) {
316 btls[0].length = size;
323 mca_pml_ob1_com_btl_comp );
325 for(length_left = size, i = 0; i < num_btls; i++) {
328 if( OPAL_UNLIKELY(0 != length_left) ) {
330 ((
size_t)(size * (bml_btl->
btl_weight / weight_total))) :
333 if(length > length_left)
334 length = length_left;
335 length_left -= length;
337 btls[i].length = length;
341 btls[0].length += length_left;
float btl_weight
BTL weight for scheduling.
Definition: bml.h:60
P2P Management Layer (PML)
Definition: ompi_datatype.h:68
Definition: mutex_unix.h:53
Definition: pml_ob1.h:296
Process identification structure interface.
Remote Open MPI process structure.
Definition: proc.h:56
Union of defined hdr types.
Definition: pml_ob1_hdr.h:359
Top-level description of requests.
OB1 PML module.
Definition: pml_ob1.h:46
PML instance.
Definition: pml.h:512
Definition: ompi_free_list.h:39
Definition: ompi_free_list.h:62
Definition: opal_list.h:147
Definition: pml_ob1.h:210
struct mca_btl_base_module_t * btl
BTL module.
Definition: bml.h:61
int mca_pml_ob1_start(size_t count, ompi_request_t **requests)
Definition: pml_ob1_start.c:29
Definition: communicator.h:118
Main top-level request struct definition.
Definition: request.h:100
int mca_pml_ob1_enable(bool enable)
Definition: pml_ob1.c:86
size_t btl_eager_limit
maximum size of first fragment – eager send
Definition: btl.h:790
The data structure for each component.
Definition: allocator.h:78
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236
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.
Definition: pml_ob1.c:598