26 #ifndef MCA_PML_CSUM_H
27 #define MCA_PML_CSUM_H
29 #include "ompi_config.h"
30 #include "ompi/class/ompi_free_list.h"
34 #include "ompi/mca/pml/base/pml_base_bsend.h"
36 #include "ompi/datatype/ompi_datatype.h"
38 #include "ompi/mca/bml/base/base.h"
55 size_t send_pipeline_depth;
56 size_t recv_pipeline_depth;
57 size_t rdma_put_retries_limit;
58 int max_rdma_per_request;
59 int max_send_per_range;
61 int leave_pinned_pipeline;
83 uint32_t unexpected_limit;
88 extern int mca_pml_csum_output;
94 extern int mca_pml_csum_add_comm(
98 extern int mca_pml_csum_del_comm(
102 extern int mca_pml_csum_add_procs(
107 extern int mca_pml_csum_del_procs(
114 extern int mca_pml_csum_progress(
void);
116 extern int mca_pml_csum_iprobe(
int dst,
122 extern int mca_pml_csum_probe(
int dst,
127 extern int mca_pml_csum_improbe(
int dst,
134 extern int mca_pml_csum_mprobe(
int dst,
140 extern int mca_pml_csum_isend_init(
void *buf,
145 mca_pml_base_send_mode_t mode,
149 extern int mca_pml_csum_isend(
void *buf,
154 mca_pml_base_send_mode_t mode,
158 extern int mca_pml_csum_send(
void *buf,
163 mca_pml_base_send_mode_t mode,
166 extern int mca_pml_csum_irecv_init(
void *buf,
174 extern int mca_pml_csum_irecv(
void *buf,
182 extern int mca_pml_csum_recv(
void *buf,
190 extern int mca_pml_csum_imrecv(
void *buf,
196 extern int mca_pml_csum_mrecv(
void *buf,
208 extern int mca_pml_csum_ft_event(
int state );
222 #define MCA_PML_CSUM_PCKT_PENDING_ALLOC(pckt,rc) \
224 ompi_free_list_item_t* item; \
225 OMPI_FREE_LIST_WAIT(&mca_pml_csum.pending_pckts, item, rc); \
226 pckt = (mca_pml_csum_pckt_pending_t*)item; \
229 #define MCA_PML_CSUM_PCKT_PENDING_RETURN(pckt) \
232 OMPI_FREE_LIST_RETURN(&mca_pml_csum.pending_pckts, \
233 (ompi_free_list_item_t*)pckt); \
236 #define MCA_PML_CSUM_ADD_FIN_TO_PENDING(P, D, B, O, S) \
238 mca_pml_csum_pckt_pending_t *_pckt; \
241 MCA_PML_CSUM_PCKT_PENDING_ALLOC(_pckt,_rc); \
242 _pckt->hdr.hdr_common.hdr_type = MCA_PML_CSUM_HDR_TYPE_FIN; \
243 _pckt->hdr.hdr_fin.hdr_des = (D); \
244 _pckt->hdr.hdr_fin.hdr_fail = (S); \
246 _pckt->bml_btl = (B); \
247 _pckt->order = (O); \
248 OPAL_THREAD_LOCK(&mca_pml_csum.lock); \
249 opal_list_append(&mca_pml_csum.pckt_pending, \
250 (opal_list_item_t*)_pckt); \
251 OPAL_THREAD_UNLOCK(&mca_pml_csum.lock); \
256 ompi_ptr_t hdr_des, uint8_t order, uint32_t status);
269 void mca_pml_csum_process_pending_rdma(
void);
271 #define MCA_PML_CSUM_PROGRESS_PENDING(bml_btl) \
273 if(opal_list_get_size(&mca_pml_csum.pckt_pending)) \
274 mca_pml_csum_process_pending_packets(bml_btl); \
275 if(opal_list_get_size(&mca_pml_csum.recv_pending)) \
276 mca_pml_csum_recv_request_process_pending(); \
277 if(opal_list_get_size(&mca_pml_csum.send_pending)) \
278 mca_pml_csum_send_request_process_pending(bml_btl); \
279 if(opal_list_get_size(&mca_pml_csum.rdma_pending)) \
280 mca_pml_csum_process_pending_rdma(); \
286 #define MCA_PML_CSUM_COMPUTE_SEGMENT_LENGTH(segments, count, hdrlen, length) \
290 for( i = 0; i < count; i++ ) { \
291 length += segments[i].seg_len; \
304 int mca_pml_csum_com_btl_comp(
const void *v1,
const void *v2);
310 double weight_total )
316 if( OPAL_LIKELY(1 == num_btls) ) {
317 btls[0].length = size;
324 mca_pml_csum_com_btl_comp );
326 for(length_left = size, i = 0; i < num_btls; i++) {
329 if( OPAL_UNLIKELY(0 != length_left) ) {
331 ((
size_t)(size * (bml_btl->
btl_weight / weight_total))) :
334 if(length > length_left)
335 length = length_left;
336 length_left -= length;
338 btls[i].length = length;
342 btls[0].length += length_left;
Definition: pml_csum.h:212
float btl_weight
BTL weight for scheduling.
Definition: bml.h:60
int mca_pml_csum_enable(bool enable)
Definition: pml_csum.c:90
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.
Definition: pml_csum.c:502
P2P Management Layer (PML)
Definition: ompi_datatype.h:68
Definition: pml_csum.h:297
Union of defined hdr types.
Definition: pml_csum_hdr.h:298
Definition: mutex_unix.h:53
Process identification structure interface.
Remote Open MPI process structure.
Definition: proc.h:56
int mca_pml_csum_start(size_t count, ompi_request_t **requests)
Definition: pml_csum_start.c:29
CSUM PML module.
Definition: pml_csum.h:48
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
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