1
1

Better encapsulate heterogeneous arch handling in ob1.

This commit was SVN r16970.
Этот коммит содержится в:
Gleb Natapov 2007-12-16 08:45:44 +00:00
родитель 8b511b969d
Коммит 5cd38b8b06
6 изменённых файлов: 109 добавлений и 172 удалений

Просмотреть файл

@ -348,19 +348,7 @@ int mca_pml_ob1_send_fin( ompi_proc_t* proc,
hdr->hdr_des.pval = hdr_des; hdr->hdr_des.pval = hdr_des;
hdr->hdr_fail = status; hdr->hdr_fail = status;
#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_hton(hdr, MCA_PML_OB1_HDR_TYPE_FIN, proc);
#ifdef WORDS_BIGENDIAN
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
#else
/* if we are little endian and the remote side is big endian,
we're responsible for making sure the data is in network byte
order */
if (proc->proc_arch & OMPI_ARCH_ISBIGENDIAN) {
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
MCA_PML_OB1_FIN_HDR_HTON(*hdr);
}
#endif
#endif
/* queue request */ /* queue request */
rc = mca_bml_base_send( rc = mca_bml_base_send(

Просмотреть файл

@ -30,6 +30,7 @@
#endif #endif
#include "opal/types.h" #include "opal/types.h"
#include "ompi/datatype/dt_arch.h"
#define MCA_PML_OB1_HDR_TYPE_MATCH 1 #define MCA_PML_OB1_HDR_TYPE_MATCH 1
#define MCA_PML_OB1_HDR_TYPE_RNDV 2 #define MCA_PML_OB1_HDR_TYPE_RNDV 2
@ -275,5 +276,88 @@ union mca_pml_ob1_hdr_t {
}; };
typedef union mca_pml_ob1_hdr_t mca_pml_ob1_hdr_t; typedef union mca_pml_ob1_hdr_t mca_pml_ob1_hdr_t;
#if !defined(WORDS_BIGENDIAN) && OMPI_ENABLE_HETEROGENEOUS_SUPPORT
static inline __opal_attribute_always_inline__ void
ob1_hdr_ntoh(mca_pml_ob1_hdr_t *hdr, const uint8_t hdr_type)
{
if(!(hdr->hdr_common.hdr_flags & MCA_PML_OB1_HDR_FLAGS_NBO))
return;
switch(hdr_type) {
case MCA_PML_OB1_HDR_TYPE_MATCH:
MCA_PML_OB1_MATCH_HDR_NTOH(hdr->hdr_match);
break;
case MCA_PML_OB1_HDR_TYPE_RNDV:
MCA_PML_OB1_RNDV_HDR_NTOH(hdr->hdr_rndv);
break;
case MCA_PML_OB1_HDR_TYPE_RGET:
MCA_PML_OB1_RGET_HDR_NTOH(hdr->hdr_rget);
break;
case MCA_PML_OB1_HDR_TYPE_ACK:
MCA_PML_OB1_ACK_HDR_NTOH(hdr->hdr_ack);
break;
case MCA_PML_OB1_HDR_TYPE_FRAG:
MCA_PML_OB1_FRAG_HDR_NTOH(hdr->hdr_frag);
break;
case MCA_PML_OB1_HDR_TYPE_PUT:
MCA_PML_OB1_RDMA_HDR_NTOH(hdr->hdr_rdma);
break;
case MCA_PML_OB1_HDR_TYPE_FIN:
MCA_PML_OB1_FIN_HDR_NTOH(hdr->hdr_fin);
break;
default:
assert(0);
break;
}
}
#else
#define ob1_hdr_ntoh(h, t) do{}while(0)
#endif
#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT
#define ob1_hdr_hton(h, t, p) \
ob1_hdr_hton_intr((mca_pml_ob1_hdr_t*)h, t, p)
static inline __opal_attribute_always_inline__ void
ob1_hdr_hton_intr(mca_pml_ob1_hdr_t *hdr, const uint8_t hdr_type,
const ompi_proc_t *proc)
{
#ifdef WORDS_BIGENDIAN
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
#else
if(!(proc->proc_arch & OMPI_ARCH_ISBIGENDIAN))
return;
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
switch(hdr_type) {
case MCA_PML_OB1_HDR_TYPE_MATCH:
MCA_PML_OB1_MATCH_HDR_HTON(hdr->hdr_match);
break;
case MCA_PML_OB1_HDR_TYPE_RNDV:
MCA_PML_OB1_RNDV_HDR_HTON(hdr->hdr_rndv);
break;
case MCA_PML_OB1_HDR_TYPE_RGET:
MCA_PML_OB1_RGET_HDR_HTON(hdr->hdr_rget);
break;
case MCA_PML_OB1_HDR_TYPE_ACK:
MCA_PML_OB1_ACK_HDR_HTON(hdr->hdr_ack);
break;
case MCA_PML_OB1_HDR_TYPE_FRAG:
MCA_PML_OB1_FRAG_HDR_HTON(hdr->hdr_frag);
break;
case MCA_PML_OB1_HDR_TYPE_PUT:
MCA_PML_OB1_RDMA_HDR_HTON(hdr->hdr_rdma);
break;
case MCA_PML_OB1_HDR_TYPE_FIN:
MCA_PML_OB1_FIN_HDR_HTON(hdr->hdr_fin);
break;
default:
assert(0);
break;
}
#endif
}
#else
#define ob1_hdr_hton(h, t, p) do{}while(0)
#endif
#endif #endif

Просмотреть файл

@ -34,7 +34,6 @@
#include "pml_ob1_recvreq.h" #include "pml_ob1_recvreq.h"
#include "pml_ob1_sendreq.h" #include "pml_ob1_sendreq.h"
#include "pml_ob1_hdr.h" #include "pml_ob1_hdr.h"
#include "ompi/datatype/dt_arch.h"
#include "ompi/peruse/peruse-internal.h" #include "ompi/peruse/peruse-internal.h"
OBJ_CLASS_INSTANCE( mca_pml_ob1_buffer_t, OBJ_CLASS_INSTANCE( mca_pml_ob1_buffer_t,
@ -86,42 +85,26 @@ void mca_pml_ob1_recv_frag_callback( mca_btl_base_module_t* btl,
switch(hdr->hdr_common.hdr_type) { switch(hdr->hdr_common.hdr_type) {
case MCA_PML_OB1_HDR_TYPE_MATCH: case MCA_PML_OB1_HDR_TYPE_MATCH:
{ {
#if !defined(WORDS_BIGENDIAN) && OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_ntoh(hdr, MCA_PML_OB1_HDR_TYPE_MATCH);
if (hdr->hdr_common.hdr_flags & MCA_PML_OB1_HDR_FLAGS_NBO) {
MCA_PML_OB1_MATCH_HDR_NTOH(hdr->hdr_match);
}
#endif
mca_pml_ob1_recv_frag_match(btl, &hdr->hdr_match, segments,des->des_dst_cnt); mca_pml_ob1_recv_frag_match(btl, &hdr->hdr_match, segments,des->des_dst_cnt);
break; break;
} }
case MCA_PML_OB1_HDR_TYPE_RNDV: case MCA_PML_OB1_HDR_TYPE_RNDV:
{ {
#if !defined(WORDS_BIGENDIAN) && OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_ntoh(hdr, MCA_PML_OB1_HDR_TYPE_RNDV);
if (hdr->hdr_common.hdr_flags & MCA_PML_OB1_HDR_FLAGS_NBO) {
MCA_PML_OB1_RNDV_HDR_NTOH(hdr->hdr_rndv);
}
#endif
mca_pml_ob1_recv_frag_match(btl, &hdr->hdr_match, segments,des->des_dst_cnt); mca_pml_ob1_recv_frag_match(btl, &hdr->hdr_match, segments,des->des_dst_cnt);
break; break;
} }
case MCA_PML_OB1_HDR_TYPE_RGET: case MCA_PML_OB1_HDR_TYPE_RGET:
{ {
#if !defined(WORDS_BIGENDIAN) && OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_ntoh(hdr, MCA_PML_OB1_HDR_TYPE_RGET);
if (hdr->hdr_common.hdr_flags & MCA_PML_OB1_HDR_FLAGS_NBO) {
MCA_PML_OB1_RGET_HDR_NTOH(hdr->hdr_rget);
}
#endif
mca_pml_ob1_recv_frag_match(btl, &hdr->hdr_match, segments,des->des_dst_cnt); mca_pml_ob1_recv_frag_match(btl, &hdr->hdr_match, segments,des->des_dst_cnt);
break; break;
} }
case MCA_PML_OB1_HDR_TYPE_ACK: case MCA_PML_OB1_HDR_TYPE_ACK:
{ {
mca_pml_ob1_send_request_t* sendreq; mca_pml_ob1_send_request_t* sendreq;
#if !defined(WORDS_BIGENDIAN) && OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_ntoh(hdr, MCA_PML_OB1_HDR_TYPE_ACK);
if (hdr->hdr_common.hdr_flags & MCA_PML_OB1_HDR_FLAGS_NBO) {
MCA_PML_OB1_ACK_HDR_NTOH(hdr->hdr_ack);
}
#endif
sendreq = (mca_pml_ob1_send_request_t*)hdr->hdr_ack.hdr_src_req.pval; sendreq = (mca_pml_ob1_send_request_t*)hdr->hdr_ack.hdr_src_req.pval;
sendreq->req_recv = hdr->hdr_ack.hdr_dst_req; sendreq->req_recv = hdr->hdr_ack.hdr_dst_req;
@ -145,11 +128,7 @@ void mca_pml_ob1_recv_frag_callback( mca_btl_base_module_t* btl,
case MCA_PML_OB1_HDR_TYPE_FRAG: case MCA_PML_OB1_HDR_TYPE_FRAG:
{ {
mca_pml_ob1_recv_request_t* recvreq; mca_pml_ob1_recv_request_t* recvreq;
#if !defined(WORDS_BIGENDIAN) && OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_ntoh(hdr, MCA_PML_OB1_HDR_TYPE_FRAG);
if (hdr->hdr_common.hdr_flags & MCA_PML_OB1_HDR_FLAGS_NBO) {
MCA_PML_OB1_FRAG_HDR_NTOH(hdr->hdr_frag);
}
#endif
recvreq = (mca_pml_ob1_recv_request_t*)hdr->hdr_frag.hdr_dst_req.pval; recvreq = (mca_pml_ob1_recv_request_t*)hdr->hdr_frag.hdr_dst_req.pval;
mca_pml_ob1_recv_request_progress(recvreq,btl,segments,des->des_dst_cnt); mca_pml_ob1_recv_request_progress(recvreq,btl,segments,des->des_dst_cnt);
break; break;
@ -157,11 +136,7 @@ void mca_pml_ob1_recv_frag_callback( mca_btl_base_module_t* btl,
case MCA_PML_OB1_HDR_TYPE_PUT: case MCA_PML_OB1_HDR_TYPE_PUT:
{ {
mca_pml_ob1_send_request_t* sendreq; mca_pml_ob1_send_request_t* sendreq;
#if !defined(WORDS_BIGENDIAN) && OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_ntoh(hdr, MCA_PML_OB1_HDR_TYPE_PUT);
if (hdr->hdr_common.hdr_flags & MCA_PML_OB1_HDR_FLAGS_NBO) {
MCA_PML_OB1_RDMA_HDR_NTOH(hdr->hdr_rdma);
}
#endif
sendreq = (mca_pml_ob1_send_request_t*)hdr->hdr_rdma.hdr_req.pval; sendreq = (mca_pml_ob1_send_request_t*)hdr->hdr_rdma.hdr_req.pval;
mca_pml_ob1_send_request_put(sendreq,btl,&hdr->hdr_rdma); mca_pml_ob1_send_request_put(sendreq,btl,&hdr->hdr_rdma);
break; break;
@ -169,11 +144,7 @@ void mca_pml_ob1_recv_frag_callback( mca_btl_base_module_t* btl,
case MCA_PML_OB1_HDR_TYPE_FIN: case MCA_PML_OB1_HDR_TYPE_FIN:
{ {
mca_btl_base_descriptor_t* rdma; mca_btl_base_descriptor_t* rdma;
#if !defined(WORDS_BIGENDIAN) && OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_ntoh(hdr, MCA_PML_OB1_HDR_TYPE_FIN);
if (hdr->hdr_common.hdr_flags & MCA_PML_OB1_HDR_FLAGS_NBO) {
MCA_PML_OB1_FIN_HDR_NTOH(hdr->hdr_fin);
}
#endif
rdma = (mca_btl_base_descriptor_t*)hdr->hdr_fin.hdr_des.pval; rdma = (mca_btl_base_descriptor_t*)hdr->hdr_fin.hdr_des.pval;
rdma->des_cbfunc(btl, NULL, rdma, rdma->des_cbfunc(btl, NULL, rdma,
hdr->hdr_fin.hdr_fail ? OMPI_ERROR : OMPI_SUCCESS); hdr->hdr_fin.hdr_fail ? OMPI_ERROR : OMPI_SUCCESS);

Просмотреть файл

@ -203,19 +203,7 @@ int mca_pml_ob1_recv_request_ack_send_btl(
ack->hdr_dst_req.pval = hdr_dst_req; ack->hdr_dst_req.pval = hdr_dst_req;
ack->hdr_send_offset = hdr_send_offset; ack->hdr_send_offset = hdr_send_offset;
#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_hton(ack, MCA_PML_OB1_HDR_TYPE_ACK, proc);
#ifdef WORDS_BIGENDIAN
ack->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
#else
/* if we are little endian and the remote side is big endian,
we're responsible for making sure the data is in network byte
order */
if (proc->proc_arch & OMPI_ARCH_ISBIGENDIAN) {
ack->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
MCA_PML_OB1_ACK_HDR_HTON(*ack);
}
#endif
#endif
/* initialize descriptor */ /* initialize descriptor */
des->des_flags |= MCA_BTL_DES_FLAGS_PRIORITY; des->des_flags |= MCA_BTL_DES_FLAGS_PRIORITY;
@ -704,20 +692,8 @@ int mca_pml_ob1_recv_request_schedule_once(
if(!recvreq->req_ack_sent) if(!recvreq->req_ack_sent)
recvreq->req_ack_sent = true; recvreq->req_ack_sent = true;
#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_hton(hdr, MCA_PML_OB1_HDR_TYPE_PUT,
#ifdef WORDS_BIGENDIAN recvreq->req_recv.req_base.req_proc);
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
#else
/* if we are little endian and the remote side is big endian,
we're responsible for making sure the data is in network byte
order */
if(recvreq->req_recv.req_base.req_proc->proc_arch &
OMPI_ARCH_ISBIGENDIAN) {
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
MCA_PML_OB1_RDMA_HDR_HTON(*hdr);
}
#endif
#endif
PERUSE_TRACE_COMM_OMPI_EVENT( PERUSE_COMM_REQ_XFER_CONTINUE, PERUSE_TRACE_COMM_OMPI_EVENT( PERUSE_COMM_REQ_XFER_CONTINUE,
&(recvreq->req_recv.req_base), size, &(recvreq->req_recv.req_base), size,

Просмотреть файл

@ -31,7 +31,6 @@
#include "pml_ob1_rdmafrag.h" #include "pml_ob1_rdmafrag.h"
#include "pml_ob1_recvreq.h" #include "pml_ob1_recvreq.h"
#include "ompi/mca/bml/base/base.h" #include "ompi/mca/bml/base/base.h"
#include "ompi/datatype/dt_arch.h"
OBJ_CLASS_INSTANCE(mca_pml_ob1_send_range_t, ompi_free_list_item_t, OBJ_CLASS_INSTANCE(mca_pml_ob1_send_range_t, ompi_free_list_item_t,
NULL, NULL); NULL, NULL);
@ -361,19 +360,8 @@ int mca_pml_ob1_send_request_start_buffered(
hdr->hdr_rndv.hdr_msg_length = sendreq->req_send.req_bytes_packed; hdr->hdr_rndv.hdr_msg_length = sendreq->req_send.req_bytes_packed;
hdr->hdr_rndv.hdr_src_req.pval = sendreq; hdr->hdr_rndv.hdr_src_req.pval = sendreq;
#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_hton(hdr, MCA_PML_OB1_HDR_TYPE_RNDV,
#ifdef WORDS_BIGENDIAN sendreq->req_send.req_base.req_proc);
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
#else
/* if we are little endian and the remote side is big endian,
we're responsible for making sure the data is in network byte
order */
if (sendreq->req_send.req_base.req_proc->proc_arch & OMPI_ARCH_ISBIGENDIAN) {
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
MCA_PML_OB1_RNDV_HDR_HTON(hdr->hdr_rndv);
}
#endif
#endif
/* update lengths */ /* update lengths */
segment->seg_len = sizeof(mca_pml_ob1_rendezvous_hdr_t) + max_data; segment->seg_len = sizeof(mca_pml_ob1_rendezvous_hdr_t) + max_data;
@ -470,19 +458,8 @@ int mca_pml_ob1_send_request_start_copy( mca_pml_ob1_send_request_t* sendreq,
hdr->hdr_match.hdr_tag = sendreq->req_send.req_base.req_tag; hdr->hdr_match.hdr_tag = sendreq->req_send.req_base.req_tag;
hdr->hdr_match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence; hdr->hdr_match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence;
#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_hton(hdr, MCA_PML_OB1_HDR_TYPE_MATCH,
#ifdef WORDS_BIGENDIAN sendreq->req_send.req_base.req_proc);
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
#else
/* if we are little endian and the remote side is big endian,
we're responsible for making sure the data is in network byte
order */
if (sendreq->req_send.req_base.req_proc->proc_arch & OMPI_ARCH_ISBIGENDIAN) {
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
MCA_PML_OB1_MATCH_HDR_HTON(hdr->hdr_match);
}
#endif
#endif
/* update lengths */ /* update lengths */
segment->seg_len = sizeof(mca_pml_ob1_match_hdr_t) + max_data; segment->seg_len = sizeof(mca_pml_ob1_match_hdr_t) + max_data;
@ -550,19 +527,8 @@ int mca_pml_ob1_send_request_start_prepare( mca_pml_ob1_send_request_t* sendreq,
hdr->hdr_match.hdr_tag = sendreq->req_send.req_base.req_tag; hdr->hdr_match.hdr_tag = sendreq->req_send.req_base.req_tag;
hdr->hdr_match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence; hdr->hdr_match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence;
#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_hton(hdr, MCA_PML_OB1_HDR_TYPE_MATCH,
#ifdef WORDS_BIGENDIAN sendreq->req_send.req_base.req_proc);
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
#else
/* if we are little endian and the remote side is big endian,
we're responsible for making sure the data is in network byte
order */
if (sendreq->req_send.req_base.req_proc->proc_arch & OMPI_ARCH_ISBIGENDIAN) {
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
MCA_PML_OB1_MATCH_HDR_HTON(hdr->hdr_match);
}
#endif
#endif
/* short message */ /* short message */
descriptor->des_cbfunc = mca_pml_ob1_match_completion_free; descriptor->des_cbfunc = mca_pml_ob1_match_completion_free;
@ -654,19 +620,8 @@ int mca_pml_ob1_send_request_start_rdma(
hdr->hdr_rget.hdr_des.pval = src; hdr->hdr_rget.hdr_des.pval = src;
hdr->hdr_rget.hdr_seg_cnt = src->des_src_cnt; hdr->hdr_rget.hdr_seg_cnt = src->des_src_cnt;
#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_hton(hdr, MCA_PML_OB1_HDR_TYPE_RGET,
#ifdef WORDS_BIGENDIAN sendreq->req_send.req_base.req_proc);
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
#else
/* if we are little endian and the remote side is big endian,
we're responsible for making sure the data is in network byte
order */
if (sendreq->req_send.req_base.req_proc->proc_arch & OMPI_ARCH_ISBIGENDIAN) {
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
MCA_PML_OB1_RGET_HDR_HTON(hdr->hdr_rget);
}
#endif
#endif
for( i = 0; i < src->des_src_cnt; i++ ) { for( i = 0; i < src->des_src_cnt; i++ ) {
hdr->hdr_rget.hdr_segs[i].seg_addr.lval = ompi_ptr_ptol(src->des_src[i].seg_addr.pval); hdr->hdr_rget.hdr_segs[i].seg_addr.lval = ompi_ptr_ptol(src->des_src[i].seg_addr.pval);
@ -712,19 +667,8 @@ int mca_pml_ob1_send_request_start_rdma(
hdr->hdr_rndv.hdr_msg_length = sendreq->req_send.req_bytes_packed; hdr->hdr_rndv.hdr_msg_length = sendreq->req_send.req_bytes_packed;
hdr->hdr_rndv.hdr_src_req.pval = sendreq; hdr->hdr_rndv.hdr_src_req.pval = sendreq;
#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_hton(hdr, MCA_PML_OB1_HDR_TYPE_RNDV,
#ifdef WORDS_BIGENDIAN sendreq->req_send.req_base.req_proc);
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
#else
/* if we are little endian and the remote side is big endian,
we're responsible for making sure the data is in network byte
order */
if (sendreq->req_send.req_base.req_proc->proc_arch & OMPI_ARCH_ISBIGENDIAN) {
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
MCA_PML_OB1_RNDV_HDR_HTON(hdr->hdr_rndv);
}
#endif
#endif
/* update lengths with number of bytes actually packed */ /* update lengths with number of bytes actually packed */
segment->seg_len = sizeof(mca_pml_ob1_rendezvous_hdr_t); segment->seg_len = sizeof(mca_pml_ob1_rendezvous_hdr_t);
@ -797,19 +741,8 @@ int mca_pml_ob1_send_request_start_rndv( mca_pml_ob1_send_request_t* sendreq,
hdr->hdr_rndv.hdr_msg_length = sendreq->req_send.req_bytes_packed; hdr->hdr_rndv.hdr_msg_length = sendreq->req_send.req_bytes_packed;
hdr->hdr_rndv.hdr_src_req.pval = sendreq; hdr->hdr_rndv.hdr_src_req.pval = sendreq;
#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_hton(hdr, MCA_PML_OB1_HDR_TYPE_RNDV,
#ifdef WORDS_BIGENDIAN sendreq->req_send.req_base.req_proc);
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
#else
/* if we are little endian and the remote side is big endian,
we're responsible for making sure the data is in network byte
order */
if (sendreq->req_send.req_base.req_proc->proc_arch & OMPI_ARCH_ISBIGENDIAN) {
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
MCA_PML_OB1_RNDV_HDR_HTON(hdr->hdr_rndv);
}
#endif
#endif
/* first fragment of a long message */ /* first fragment of a long message */
des->des_flags |= MCA_BTL_DES_FLAGS_PRIORITY; des->des_flags |= MCA_BTL_DES_FLAGS_PRIORITY;
@ -1010,22 +943,8 @@ cannot_pack:
hdr->hdr_src_req.pval = sendreq; hdr->hdr_src_req.pval = sendreq;
hdr->hdr_dst_req = sendreq->req_recv; hdr->hdr_dst_req = sendreq->req_recv;
#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT ob1_hdr_hton(hdr, MCA_PML_OB1_HDR_TYPE_FRAG,
#ifdef WORDS_BIGENDIAN sendreq->req_send.req_base.req_proc);
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
#else
/*
* if we are little endian and the remote side is big endian,
* we're responsible for making sure the data is in network byte
* order
*/
if(sendreq->req_send.req_base.req_proc->proc_arch &
OMPI_ARCH_ISBIGENDIAN) {
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
MCA_PML_OB1_FRAG_HDR_HTON(*hdr);
}
#endif
#endif
#if OMPI_WANT_PERUSE #if OMPI_WANT_PERUSE
PERUSE_TRACE_COMM_OMPI_EVENT(PERUSE_COMM_REQ_XFER_CONTINUE, PERUSE_TRACE_COMM_OMPI_EVENT(PERUSE_COMM_REQ_XFER_CONTINUE,

Просмотреть файл

@ -27,7 +27,6 @@
#include "pml_ob1_rdma.h" #include "pml_ob1_rdma.h"
#include "pml_ob1_rdmafrag.h" #include "pml_ob1_rdmafrag.h"
#include "ompi/datatype/convertor.h" #include "ompi/datatype/convertor.h"
#include "ompi/datatype/dt_arch.h"
#include "ompi/mca/bml/bml.h" #include "ompi/mca/bml/bml.h"
BEGIN_C_DECLS BEGIN_C_DECLS