26 #include "ompi_config.h"
27 #include "ompi/class/ompi_free_list.h"
31 #include "ompi/mca/pml/base/pml_base_bsend.h"
33 #include "ompi/datatype/ompi_datatype.h"
35 #include "ompi/mca/bml/base/base.h"
52 size_t send_pipeline_depth;
53 size_t recv_pipeline_depth;
54 size_t rdma_put_retries_limit;
55 int max_rdma_per_request;
56 int max_send_per_range;
58 int leave_pinned_pipeline;
80 uint32_t unexpected_limit;
85 extern int mca_pml_bfo_output;
91 extern int mca_pml_bfo_add_comm(
95 extern int mca_pml_bfo_del_comm(
99 extern int mca_pml_bfo_add_procs(
104 extern int mca_pml_bfo_del_procs(
111 extern int mca_pml_bfo_progress(
void);
113 extern int mca_pml_bfo_iprobe(
int dst,
119 extern int mca_pml_bfo_probe(
int dst,
124 extern int mca_pml_bfo_improbe(
int dst,
131 extern int mca_pml_bfo_mprobe(
int dst,
137 extern int mca_pml_bfo_isend_init(
void *buf,
142 mca_pml_base_send_mode_t mode,
146 extern int mca_pml_bfo_isend(
void *buf,
151 mca_pml_base_send_mode_t mode,
155 extern int mca_pml_bfo_send(
void *buf,
160 mca_pml_base_send_mode_t mode,
163 extern int mca_pml_bfo_irecv_init(
void *buf,
171 extern int mca_pml_bfo_irecv(
void *buf,
179 extern int mca_pml_bfo_recv(
void *buf,
187 extern int mca_pml_bfo_imrecv(
void *buf,
193 extern int mca_pml_bfo_mrecv(
void *buf,
205 extern int mca_pml_bfo_ft_event(
int state );
219 #define MCA_PML_BFO_PCKT_PENDING_ALLOC(pckt,rc) \
221 ompi_free_list_item_t* item; \
222 OMPI_FREE_LIST_WAIT(&mca_pml_bfo.pending_pckts, item, rc); \
223 pckt = (mca_pml_bfo_pckt_pending_t*)item; \
226 #define MCA_PML_BFO_PCKT_PENDING_RETURN(pckt) \
229 OMPI_FREE_LIST_RETURN(&mca_pml_bfo.pending_pckts, \
230 (ompi_free_list_item_t*)pckt); \
233 #define MCA_PML_BFO_ADD_FIN_TO_PENDING(P, D, B, O, S) \
235 mca_pml_bfo_pckt_pending_t *_pckt; \
238 MCA_PML_BFO_PCKT_PENDING_ALLOC(_pckt,_rc); \
239 _pckt->hdr.hdr_common.hdr_type = MCA_PML_BFO_HDR_TYPE_FIN; \
240 _pckt->hdr.hdr_fin.hdr_des = (D); \
241 _pckt->hdr.hdr_fin.hdr_fail = (S); \
243 _pckt->bml_btl = (B); \
244 _pckt->order = (O); \
245 OPAL_THREAD_LOCK(&mca_pml_bfo.lock); \
246 opal_list_append(&mca_pml_bfo.pckt_pending, \
247 (opal_list_item_t*)_pckt); \
248 OPAL_THREAD_UNLOCK(&mca_pml_bfo.lock); \
254 ompi_ptr_t hdr_des, uint8_t order, uint32_t status,
255 uint16_t seq, uint8_t reqseq, uint16_t ctx, uint32_t src);
257 ompi_ptr_t hdr_des, uint8_t order, uint32_t status);
271 void mca_pml_bfo_process_pending_rdma(
void);
273 #define MCA_PML_BFO_PROGRESS_PENDING(bml_btl) \
275 if(opal_list_get_size(&mca_pml_bfo.pckt_pending)) \
276 mca_pml_bfo_process_pending_packets(bml_btl); \
277 if(opal_list_get_size(&mca_pml_bfo.recv_pending)) \
278 mca_pml_bfo_recv_request_process_pending(); \
279 if(opal_list_get_size(&mca_pml_bfo.send_pending)) \
280 mca_pml_bfo_send_request_process_pending(bml_btl); \
281 if(opal_list_get_size(&mca_pml_bfo.rdma_pending)) \
282 mca_pml_bfo_process_pending_rdma(); \
288 #define MCA_PML_BFO_COMPUTE_SEGMENT_LENGTH(segments, count, hdrlen, length) \
292 for( i = 0; i < count; i++ ) { \
293 length += segments[i].seg_len; \
306 int mca_pml_bfo_com_btl_comp(
const void *v1,
const void *v2);
312 double weight_total )
318 if( OPAL_LIKELY(1 == num_btls) ) {
319 btls[0].length = size;
326 mca_pml_bfo_com_btl_comp );
328 for(length_left = size, i = 0; i < num_btls; i++) {
331 if( OPAL_UNLIKELY(0 != length_left) ) {
333 ((
size_t)(size * (bml_btl->
btl_weight / weight_total))) :
336 if(length > length_left)
337 length = length_left;
338 length_left -= length;
340 btls[i].length = length;
344 btls[0].length += length_left;
int mca_pml_bfo_start(size_t count, ompi_request_t **requests)
Definition: pml_bfo_start.c:29
float btl_weight
BTL weight for scheduling.
Definition: bml.h:60
Definition: pml_bfo.h:299
P2P Management Layer (PML)
Definition: ompi_datatype.h:68
Definition: mutex_unix.h:53
Union of defined hdr types.
Definition: pml_bfo_hdr.h:441
BFO PML module.
Definition: pml_bfo.h:45
Definition: pml_bfo.h:209
Process identification structure interface.
Remote Open MPI process structure.
Definition: proc.h:56
Top-level description of requests.
PML instance.
Definition: pml.h:512
Definition: ompi_free_list.h:39
Definition: ompi_free_list.h:62
Definition: opal_list.h:147
struct mca_btl_base_module_t * btl
BTL module.
Definition: bml.h:61
int mca_pml_bfo_enable(bool enable)
Definition: pml_bfo.c:89
int mca_pml_bfo_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_bfo.c:496
Definition: communicator.h:118
Main top-level request struct definition.
Definition: request.h:100
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