Add heterogeneous support to message coalescing.
This commit was SVN r16903.
Этот коммит содержится в:
родитель
b4698dc6df
Коммит
493951e09d
@ -607,6 +607,8 @@ mca_btl_base_descriptor_t* mca_btl_openib_alloc(
|
|||||||
clsc_hdr->tag = org_tag;
|
clsc_hdr->tag = org_tag;
|
||||||
clsc_hdr->size = to_base_frag(sfrag)->segment.seg_len;
|
clsc_hdr->size = to_base_frag(sfrag)->segment.seg_len;
|
||||||
clsc_hdr->alloc_size = to_base_frag(sfrag)->segment.seg_len;
|
clsc_hdr->alloc_size = to_base_frag(sfrag)->segment.seg_len;
|
||||||
|
if(ep->nbo)
|
||||||
|
BTL_OPENIB_HEADER_COALESCED_HTON(*clsc_hdr);
|
||||||
sfrag->coalesced_length = sizeof(mca_btl_openib_control_header_t) +
|
sfrag->coalesced_length = sizeof(mca_btl_openib_control_header_t) +
|
||||||
sizeof(mca_btl_openib_header_coalesced_t);
|
sizeof(mca_btl_openib_header_coalesced_t);
|
||||||
to_com_frag(sfrag)->sg_entry.addr = (uint64_t)sfrag->hdr;
|
to_com_frag(sfrag)->sg_entry.addr = (uint64_t)sfrag->hdr;
|
||||||
@ -1073,6 +1075,8 @@ int mca_btl_openib_send(
|
|||||||
if(openib_frag_type(des) == MCA_BTL_OPENIB_FRAG_COALESCED) {
|
if(openib_frag_type(des) == MCA_BTL_OPENIB_FRAG_COALESCED) {
|
||||||
to_coalesced_frag(des)->hdr->tag = tag;
|
to_coalesced_frag(des)->hdr->tag = tag;
|
||||||
to_coalesced_frag(des)->hdr->size = des->des_src->seg_len;
|
to_coalesced_frag(des)->hdr->size = des->des_src->seg_len;
|
||||||
|
if(ep->nbo)
|
||||||
|
BTL_OPENIB_HEADER_COALESCED_HTON(*to_coalesced_frag(des)->hdr);
|
||||||
frag = to_coalesced_frag(des)->send_frag;
|
frag = to_coalesced_frag(des)->send_frag;
|
||||||
} else {
|
} else {
|
||||||
frag = to_send_frag(des);
|
frag = to_send_frag(des);
|
||||||
|
@ -257,12 +257,17 @@ static void btl_openib_control(mca_btl_base_module_t* btl,
|
|||||||
break;
|
break;
|
||||||
case MCA_BTL_OPENIB_CONTROL_COALESCED:
|
case MCA_BTL_OPENIB_CONTROL_COALESCED:
|
||||||
while(len > 0) {
|
while(len > 0) {
|
||||||
size_t skip = (sizeof(*clsc_hdr) + clsc_hdr->alloc_size);
|
size_t skip;
|
||||||
mca_btl_base_descriptor_t tmp_des;
|
mca_btl_base_descriptor_t tmp_des;
|
||||||
mca_btl_base_segment_t tmp_seg;
|
mca_btl_base_segment_t tmp_seg;
|
||||||
|
|
||||||
assert(len >= sizeof(*clsc_hdr));
|
assert(len >= sizeof(*clsc_hdr));
|
||||||
|
|
||||||
|
if(ep->nbo)
|
||||||
|
BTL_OPENIB_HEADER_COALESCED_NTOH(*clsc_hdr);
|
||||||
|
|
||||||
|
skip = (sizeof(*clsc_hdr) + clsc_hdr->alloc_size);
|
||||||
|
|
||||||
tmp_des.des_dst = &tmp_seg;
|
tmp_des.des_dst = &tmp_seg;
|
||||||
tmp_des.des_dst_cnt = 1;
|
tmp_des.des_dst_cnt = 1;
|
||||||
tmp_seg.seg_addr.pval = clsc_hdr + 1;
|
tmp_seg.seg_addr.pval = clsc_hdr + 1;
|
||||||
|
@ -59,6 +59,18 @@ typedef struct mca_btl_openib_header_coalesced_t {
|
|||||||
uint32_t alloc_size;
|
uint32_t alloc_size;
|
||||||
} mca_btl_openib_header_coalesced_t;
|
} mca_btl_openib_header_coalesced_t;
|
||||||
|
|
||||||
|
#define BTL_OPENIB_HEADER_COALESCED_NTOH(h) \
|
||||||
|
do { \
|
||||||
|
(h).size = ntohl((h).size); \
|
||||||
|
(h).alloc_size = ntohl((h).alloc_size); \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
|
#define BTL_OPENIB_HEADER_COALESCED_HTON(h) \
|
||||||
|
do { \
|
||||||
|
(h).size = htonl((h).size); \
|
||||||
|
(h).alloc_size = htonl((h).alloc_size); \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
struct mca_btl_openib_footer_t {
|
struct mca_btl_openib_footer_t {
|
||||||
#if OMPI_ENABLE_DEBUG
|
#if OMPI_ENABLE_DEBUG
|
||||||
uint32_t seq;
|
uint32_t seq;
|
||||||
@ -82,29 +94,24 @@ typedef struct mca_btl_openib_footer_t mca_btl_openib_footer_t;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OMPI_ENABLE_DEBUG
|
#if OMPI_ENABLE_DEBUG
|
||||||
#define BTL_OPENIB_FOOTER_HTON(h) \
|
#define BTL_OPENIB_FOOTER_SEQ_HTON(h) ((h).seq = htonl((h).seq))
|
||||||
do { \
|
#define BTL_OPENIB_FOOTER_SEQ_NTOH(h) ((h).seq = ntohl((h).seq))
|
||||||
(h).seq = htonl((h).seq); \
|
|
||||||
MCA_BTL_OPENIB_FTR_SIZE_REVERSE(h); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define BTL_OPENIB_FOOTER_NTOH(h) \
|
|
||||||
do { \
|
|
||||||
(h).seq = ntohl((h).seq); \
|
|
||||||
MCA_BTL_OPENIB_FTR_SIZE_REVERSE(h); \
|
|
||||||
} while (0)
|
|
||||||
#else
|
#else
|
||||||
#define BTL_OPENIB_FOOTER_HTON(h) \
|
#define BTL_OPENIB_FOOTER_SEQ_HTON(h)
|
||||||
do { \
|
#define BTL_OPENIB_FOOTER_SEQ_NTOH(h)
|
||||||
MCA_BTL_OPENIB_FTR_SIZE_REVERSE(h); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define BTL_OPENIB_FOOTER_NTOH(h) \
|
|
||||||
do { \
|
|
||||||
MCA_BTL_OPENIB_FTR_SIZE_REVERSE(h); \
|
|
||||||
} while (0)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define BTL_OPENIB_FOOTER_HTON(h) \
|
||||||
|
do { \
|
||||||
|
BTL_OPENIB_FOOTER_SEQ_HTON(h); \
|
||||||
|
MCA_BTL_OPENIB_FTR_SIZE_REVERSE(h); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define BTL_OPENIB_FOOTER_NTOH(h) \
|
||||||
|
do { \
|
||||||
|
BTL_OPENIB_FOOTER_SEQ_NTOH(h); \
|
||||||
|
MCA_BTL_OPENIB_FTR_SIZE_REVERSE(h); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#define MCA_BTL_OPENIB_CONTROL_CREDITS 0
|
#define MCA_BTL_OPENIB_CONTROL_CREDITS 0
|
||||||
#define MCA_BTL_OPENIB_CONTROL_RDMA 1
|
#define MCA_BTL_OPENIB_CONTROL_RDMA 1
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user