diff --git a/ompi/mca/pml/csum/pml_csum_recvfrag.c b/ompi/mca/pml/csum/pml_csum_recvfrag.c index b8acd926b2..47d75b89f5 100644 --- a/ompi/mca/pml/csum/pml_csum_recvfrag.c +++ b/ompi/mca/pml/csum/pml_csum_recvfrag.c @@ -129,7 +129,10 @@ void mca_pml_csum_recv_frag_callback_match(mca_btl_base_module_t* btl, csum_received = hdr->hdr_common.hdr_csum; hdr->hdr_common.hdr_csum = 0; - csum = opal_csum16(hdr, sizeof(mca_pml_csum_match_hdr_t)); +#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT + hdr->hdr_common.hdr_flags &= ~MCA_PML_CSUM_HDR_FLAGS_NBO; +#endif + csum = opal_csum16(hdr, OMPI_PML_CSUM_MATCH_HDR_LEN); hdr->hdr_common.hdr_csum = csum_received; OPAL_OUTPUT_VERBOSE((5, mca_pml_base_output, @@ -303,6 +306,9 @@ void mca_pml_csum_recv_frag_callback_rndv(mca_btl_base_module_t* btl, csum_received = hdr->hdr_common.hdr_csum; hdr->hdr_common.hdr_csum = 0; +#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT + hdr->hdr_common.hdr_flags &= ~MCA_PML_CSUM_HDR_FLAGS_NBO; +#endif csum = opal_csum16(hdr, sizeof(mca_pml_csum_rendezvous_hdr_t)); hdr->hdr_common.hdr_csum = csum_received; if (csum_received != csum) { @@ -351,6 +357,9 @@ void mca_pml_csum_recv_frag_callback_ack(mca_btl_base_module_t* btl, csum_received = hdr->hdr_common.hdr_csum; hdr->hdr_common.hdr_csum = 0; +#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT + hdr->hdr_common.hdr_flags &= ~MCA_PML_CSUM_HDR_FLAGS_NBO; +#endif csum = opal_csum16(hdr, sizeof(mca_pml_csum_ack_hdr_t)); hdr->hdr_common.hdr_csum = csum_received; OPAL_OUTPUT_VERBOSE((1, mca_pml_base_output, @@ -398,6 +407,9 @@ void mca_pml_csum_recv_frag_callback_frag(mca_btl_base_module_t* btl, csum_received = hdr->hdr_common.hdr_csum; hdr->hdr_common.hdr_csum = 0; +#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT + hdr->hdr_common.hdr_flags &= ~MCA_PML_CSUM_HDR_FLAGS_NBO; +#endif csum = opal_csum16(hdr, sizeof(mca_pml_csum_frag_hdr_t)); hdr->hdr_common.hdr_csum = csum_received; if(csum_received != csum) { @@ -430,6 +442,9 @@ void mca_pml_csum_recv_frag_callback_put(mca_btl_base_module_t* btl, csum_received = hdr->hdr_common.hdr_csum; hdr->hdr_common.hdr_csum = 0; +#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT + hdr->hdr_common.hdr_flags &= ~MCA_PML_CSUM_HDR_FLAGS_NBO; +#endif csum = opal_csum16(hdr, sizeof(mca_pml_csum_rdma_hdr_t)); hdr->hdr_common.hdr_csum = csum_received; OPAL_OUTPUT_VERBOSE((1, mca_pml_base_output, @@ -464,6 +479,9 @@ void mca_pml_csum_recv_frag_callback_fin(mca_btl_base_module_t* btl, csum_received = hdr->hdr_common.hdr_csum; hdr->hdr_common.hdr_csum = 0; +#if OMPI_ENABLE_HETEROGENEOUS_SUPPORT + hdr->hdr_common.hdr_flags &= ~MCA_PML_CSUM_HDR_FLAGS_NBO; +#endif csum = opal_csum16(hdr, sizeof(mca_pml_csum_fin_hdr_t)); hdr->hdr_common.hdr_csum = csum_received; OPAL_OUTPUT_VERBOSE((1, mca_pml_base_output, diff --git a/ompi/mca/pml/csum/pml_csum_sendreq.c b/ompi/mca/pml/csum/pml_csum_sendreq.c index 46e5bac888..f02991be15 100644 --- a/ompi/mca/pml/csum/pml_csum_sendreq.c +++ b/ompi/mca/pml/csum/pml_csum_sendreq.c @@ -506,7 +506,7 @@ int mca_pml_csum_send_request_start_copy( mca_pml_csum_send_request_t* sendreq, match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence; match.hdr_csum = (size > 0 ? sendreq->req_send.req_base.req_convertor.checksum : OPAL_CSUM_ZERO); - match.hdr_common.hdr_csum = opal_csum16(&match, sizeof(mca_pml_csum_match_hdr_t)); + match.hdr_common.hdr_csum = opal_csum16(&match, OMPI_PML_CSUM_MATCH_HDR_LEN); OPAL_OUTPUT_VERBOSE((1, mca_pml_base_output, "%s:%s:%d Sending \'match\' with data csum:0x%x, header csum:0x%x, size:%lu \n", @@ -585,7 +585,7 @@ int mca_pml_csum_send_request_start_copy( mca_pml_csum_send_request_t* sendreq, hdr->hdr_match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence; hdr->hdr_match.hdr_csum = (size > 0 ? sendreq->req_send.req_base.req_convertor.checksum : OPAL_CSUM_ZERO); - hdr->hdr_common.hdr_csum = opal_csum16(hdr, sizeof(mca_pml_csum_match_hdr_t)); + hdr->hdr_common.hdr_csum = opal_csum16(hdr, OMPI_PML_CSUM_MATCH_HDR_LEN); OPAL_OUTPUT_VERBOSE((5, mca_pml_base_output, "%s:%s:%d common_hdr: %02x:%02x:%04x match_hdr: %04x:%04x:%08x:%08x:%08x", @@ -667,7 +667,7 @@ int mca_pml_csum_send_request_start_prepare( mca_pml_csum_send_request_t* sendre hdr->hdr_match.hdr_seq = (uint16_t)sendreq->req_send.req_base.req_sequence; hdr->hdr_match.hdr_csum = (size > 0 ? sendreq->req_send.req_base.req_convertor.checksum : OPAL_CSUM_ZERO); - hdr->hdr_common.hdr_csum = opal_csum16(hdr, sizeof(mca_pml_csum_match_hdr_t)); + hdr->hdr_common.hdr_csum = opal_csum16(hdr, OMPI_PML_CSUM_MATCH_HDR_LEN); OPAL_OUTPUT_VERBOSE((1, mca_pml_base_output, "%s:%s:%d Sending \'match\' with data csum:0x%x, header csum:0x%x, size:%lu \n",