Created
April 12, 2012 19:58
-
-
Save goodell/2370583 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commit e97e6041b9f5fb623b9357f1ff0f73c1b50fb1ef | |
| Author: Dave Goodell <[email protected]> | |
| Date: Thu Apr 12 13:15:03 2012 -0500 | |
| tt#1599: eliminate MPIDI_CH3_PktGeneric_t | |
| Without this change we are vulnerable to a nasty bit of compiler | |
| behavior. MPIDI_CH3_PktGeneric_t sometimes included padding between the | |
| "kind" and "pktptrs" fields. Then whole-structure assignments using the | |
| generic packet (e.g., ch3_istartmsg.c:96) of buffers that are actually | |
| MPIDI_CH3_Pkt_t unions under the hood will can fail to copy key parts of | |
| the MPIDI_CH3_Pkt_t. | |
| This specifically manifested itself for #1599 by transmitting garbage | |
| "source_win_handle" values in a LOCK_GRANTED packet, which in turn | |
| caused segfaults. | |
| Removing this second type and directly using the actual packet union | |
| eliminates this source of bugs. The minor downside is that the | |
| mpidpkt.h header becomes more tightly integrated into the rest of the | |
| device. | |
| Reviewed by buntinas@. | |
| --- | |
| .../ch3/channels/nemesis/include/mpidi_ch3_impl.h | 3 +- | |
| .../channels/nemesis/nemesis/netmod/mx/mx_impl.h | 2 +- | |
| .../channels/nemesis/nemesis/netmod/mx/mx_poll.c | 8 ++-- | |
| .../channels/nemesis/nemesis/netmod/mx/mx_send.c | 12 ++--- | |
| .../channels/nemesis/nemesis/netmod/nd/nd_send.cpp | 14 +++--- | |
| .../nemesis/nemesis/netmod/newmad/newmad_impl.h | 2 +- | |
| .../nemesis/nemesis/netmod/newmad/newmad_poll.c | 4 +- | |
| .../nemesis/nemesis/netmod/newmad/newmad_send.c | 18 +++---- | |
| .../channels/nemesis/nemesis/netmod/tcp/tcp_send.c | 50 ++++++++++---------- | |
| .../nemesis/nemesis/netmod/wintcp/wintcp_send.c | 40 ++++++++-------- | |
| .../channels/nemesis/nemesis/src/mpid_nem_init.c | 4 +- | |
| src/mpid/ch3/channels/nemesis/src/ch3_isend.c | 2 +- | |
| src/mpid/ch3/channels/nemesis/src/ch3_isendv.c | 4 +- | |
| src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c | 8 +++- | |
| src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c | 4 +- | |
| .../ch3/channels/nemesis/src/ch3i_eagernoncontig.c | 4 +- | |
| src/mpid/ch3/channels/sctp/src/ch3_isend.c | 2 +- | |
| src/mpid/ch3/channels/sctp/src/ch3_isendv.c | 2 +- | |
| src/mpid/ch3/channels/sctp/src/ch3_istartmsg.c | 2 +- | |
| src/mpid/ch3/channels/sctp/src/ch3_istartmsgv.c | 2 +- | |
| src/mpid/ch3/channels/sctp/src/sctp_util.c | 2 +- | |
| src/mpid/ch3/channels/sock/src/ch3_isend.c | 2 +- | |
| src/mpid/ch3/channels/sock/src/ch3_isendv.c | 2 +- | |
| src/mpid/ch3/channels/sock/src/ch3_istartmsg.c | 2 +- | |
| src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c | 2 +- | |
| src/mpid/ch3/include/mpidpre.h | 13 ++--- | |
| src/mpid/ch3/src/ch3u_rma_sync.c | 8 ++++ | |
| src/mpid/ch3/src/mpid_init.c | 4 +- | |
| 28 files changed, 114 insertions(+), 108 deletions(-) | |
| diff --git a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h | |
| index c3be96d..086de7f 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h | |
| +++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h | |
| @@ -87,7 +87,6 @@ struct MPID_Request; | |
| struct MPID_nem_copy_buf; | |
| union MPIDI_CH3_Pkt; | |
| struct MPID_nem_lmt_shm_wait_element; | |
| -struct MPIDI_CH3_PktGeneric; | |
| typedef struct MPIDI_CH3I_VC | |
| { | |
| @@ -108,7 +107,7 @@ typedef struct MPIDI_CH3I_VC | |
| /* temp buffer to store partially received header */ | |
| MPIDI_msg_sz_t pending_pkt_len; | |
| - struct MPIDI_CH3_PktGeneric *pending_pkt; | |
| + union MPIDI_CH3_Pkt *pending_pkt; | |
| /* can be used by netmods to put this vc on a send queue or list */ | |
| struct MPIDI_VC *next; | |
| diff --git a/src/mpid/ch3/channels/nemesis/nemesis/netmod/mx/mx_impl.h b/src/mpid/ch3/channels/nemesis/nemesis/netmod/mx/mx_impl.h | |
| index 01e8759..011eb22 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/nemesis/netmod/mx/mx_impl.h | |
| +++ b/src/mpid/ch3/channels/nemesis/nemesis/netmod/mx/mx_impl.h | |
| @@ -117,7 +117,7 @@ struct MPID_nem_mx_internal_req | |
| { | |
| MPIU_OBJECT_HEADER; /* adds (unused) handle and ref_count fields */ | |
| MPID_Request_kind_t kind; /* used */ | |
| - MPIDI_CH3_PktGeneric_t pending_pkt; | |
| + MPIDI_CH3_Pkt_t pending_pkt; | |
| MPIDI_VC_t *vc; | |
| void *tmpbuf; | |
| MPIDI_msg_sz_t tmpbuf_sz; | |
| diff --git a/src/mpid/ch3/channels/nemesis/nemesis/netmod/mx/mx_poll.c b/src/mpid/ch3/channels/nemesis/nemesis/netmod/mx/mx_poll.c | |
| index 24bdd70..76a8fb5 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/nemesis/netmod/mx/mx_poll.c | |
| +++ b/src/mpid/ch3/channels/nemesis/nemesis/netmod/mx/mx_poll.c | |
| @@ -205,7 +205,7 @@ if(type == NEM_MX_DIRECT_TYPE) | |
| mx_get_endpoint_addr_context(source,(void **)(&vc)); | |
| rreq->vc = vc; | |
| - if(length <= sizeof(MPIDI_CH3_PktGeneric_t)) { | |
| + if(length <= sizeof(MPIDI_CH3_Pkt_t)) { | |
| iov.segment_ptr = (char*)&(rreq->pending_pkt); | |
| } | |
| else{ | |
| @@ -268,7 +268,7 @@ int MPID_nem_mx_directRecv(MPIDI_VC_t *vc, MPID_Request *rreq) | |
| int dt_contig; | |
| MPI_Aint dt_true_lb; | |
| MPID_Datatype *dt_ptr; | |
| - /*int threshold = (vc->eager_max_msg_sz - sizeof(MPIDI_CH3_PktGeneric_t));*/ | |
| + /*int threshold = (vc->eager_max_msg_sz - sizeof(MPIDI_CH3_Pkt_t));*/ | |
| NEM_MX_DIRECT_MATCH(match_info,0,source,context); | |
| if (tag == MPI_ANY_TAG) | |
| @@ -338,7 +338,7 @@ MPID_nem_mx_poll(int in_blocking_poll) | |
| MPIU_Assert(status.code != MX_STATUS_TRUNCATED); | |
| if(adi_req->vc == NULL) | |
| mx_get_endpoint_addr_context(status.source,(void **)(&(adi_req->vc))); | |
| - if (status.msg_length <= sizeof(MPIDI_CH3_PktGeneric_t)) | |
| + if (status.msg_length <= sizeof(MPIDI_CH3_Pkt_t)) | |
| { | |
| MPID_nem_handle_pkt(adi_req->vc,(char *)&(adi_req->pending_pkt),(MPIDI_msg_sz_t)(status.msg_length)); | |
| } | |
| @@ -442,7 +442,7 @@ MPID_nem_mx_poll(int in_blocking_progress) | |
| MPIU_Assert(status.code != MX_STATUS_TRUNCATED); | |
| if(adi_req->vc == NULL) | |
| mx_get_endpoint_addr_context(status.source,(void **)(&(adi_req->vc))); | |
| - if (status.msg_length <= sizeof(MPIDI_CH3_PktGeneric_t)) | |
| + if (status.msg_length <= sizeof(MPIDI_CH3_Pkt_t)) | |
| { | |
| MPID_nem_handle_pkt(adi_req->vc,(char *)&(adi_req->pending_pkt),(MPIDI_msg_sz_t)(status.msg_length)); | |
| } | |
| diff --git a/src/mpid/ch3/channels/nemesis/nemesis/netmod/mx/mx_send.c b/src/mpid/ch3/channels/nemesis/nemesis/netmod/mx/mx_send.c | |
| index 4a4e4c1..a8d9cf3 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/nemesis/netmod/mx/mx_send.c | |
| +++ b/src/mpid/ch3/channels/nemesis/nemesis/netmod/mx/mx_send.c | |
| @@ -42,9 +42,9 @@ int MPID_nem_mx_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI | |
| #endif | |
| NEM_MX_ADI_MATCH(match_info); | |
| - MPIU_Memcpy(&(sreq->dev.pending_pkt),(char *)hdr,sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + MPIU_Memcpy(&(sreq->dev.pending_pkt),(char *)hdr,sizeof(MPIDI_CH3_Pkt_t)); | |
| mx_iov[0].segment_ptr = (char *)&(sreq->dev.pending_pkt); | |
| - mx_iov[0].segment_length = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + mx_iov[0].segment_length = sizeof(MPIDI_CH3_Pkt_t); | |
| num_seg = 1; | |
| if(data_sz) | |
| { | |
| @@ -101,9 +101,9 @@ int MPID_nem_mx_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz | |
| NEM_MX_ADI_MATCH(match_info); | |
| /*fprintf(stdout,"[%i]=== Startcontigmsg sending (%lx) to %i... \n",MPID_nem_mem_region.rank,match_info,vc->lpid); */ | |
| - MPIU_Memcpy(&(sreq->dev.pending_pkt),(char *)hdr,sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + MPIU_Memcpy(&(sreq->dev.pending_pkt),(char *)hdr,sizeof(MPIDI_CH3_Pkt_t)); | |
| mx_iov[0].segment_ptr = (char *)&(sreq->dev.pending_pkt); | |
| - mx_iov[0].segment_length = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + mx_iov[0].segment_length = sizeof(MPIDI_CH3_Pkt_t); | |
| num_seg = 1; | |
| if (data_sz) | |
| { | |
| @@ -155,9 +155,9 @@ int MPID_nem_mx_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header, | |
| #endif | |
| NEM_MX_ADI_MATCH(match_info); | |
| - MPIU_Memcpy(&(sreq->dev.pending_pkt),(char *)header,sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + MPIU_Memcpy(&(sreq->dev.pending_pkt),(char *)header,sizeof(MPIDI_CH3_Pkt_t)); | |
| mx_iov[0].segment_ptr = (char *)&(sreq->dev.pending_pkt); | |
| - mx_iov[0].segment_length = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + mx_iov[0].segment_length = sizeof(MPIDI_CH3_Pkt_t); | |
| num_seg = 1; | |
| MPIU_Assert(sreq->dev.segment_first == 0); | |
| diff --git a/src/mpid/ch3/channels/nemesis/nemesis/netmod/nd/nd_send.cpp b/src/mpid/ch3/channels/nemesis/nemesis/netmod/nd/nd_send.cpp | |
| index 6b09361..fdc5e14 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/nemesis/netmod/nd/nd_send.cpp | |
| +++ b/src/mpid/ch3/channels/nemesis/nemesis/netmod/nd/nd_send.cpp | |
| @@ -33,9 +33,9 @@ int MPID_Nem_nd_istart_contig_msg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_ | |
| sreqp->ch.vc = vc; | |
| sreqp->dev.iov_offset = 0; | |
| - sreqp->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *)hdr; | |
| + sreqp->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)hdr; | |
| sreqp->dev.iov[0].MPID_IOV_BUF = (char *)&sreqp->dev.pending_pkt; | |
| - sreqp->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + sreqp->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); | |
| if(data_sz > 0){ | |
| sreqp->dev.iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST )data; | |
| @@ -118,9 +118,9 @@ int MPID_Nem_nd_send_contig(MPIDI_VC_t *vc, MPID_Request *sreqp, void *hdr, MPID | |
| */ | |
| sreqp->ch.vc = vc; | |
| sreqp->dev.iov_offset = 0; | |
| - sreqp->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *)hdr; | |
| + sreqp->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)hdr; | |
| sreqp->dev.iov[0].MPID_IOV_BUF = (char *)&sreqp->dev.pending_pkt; | |
| - sreqp->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + sreqp->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); | |
| if(data_sz > 0){ | |
| sreqp->dev.iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST )data; | |
| @@ -210,9 +210,9 @@ int MPID_Nem_nd_send_noncontig(MPIDI_VC_t *vc, MPID_Request *sreqp, void *header | |
| mpi_errno = MPIDI_CH3U_Request_load_send_iov(sreqp, &(iov[1]), &iov_cnt); | |
| MPIU_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|loadsendiov"); | |
| - sreqp->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *)header; | |
| + sreqp->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)header; | |
| iov[0].MPID_IOV_BUF = (char *)&sreqp->dev.pending_pkt; | |
| - iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); | |
| iov_cnt += 1; | |
| @@ -279,4 +279,4 @@ int MPID_Nem_nd_send_noncontig(MPIDI_VC_t *vc, MPID_Request *sreqp, void *header | |
| fn_fail: | |
| MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "failed, mpi_errno = %d", mpi_errno); | |
| goto fn_exit; | |
| -} | |
| \ No newline at end of file | |
| +} | |
| diff --git a/src/mpid/ch3/channels/nemesis/nemesis/netmod/newmad/newmad_impl.h b/src/mpid/ch3/channels/nemesis/nemesis/netmod/newmad/newmad_impl.h | |
| index 051844b..921fe44 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/nemesis/netmod/newmad/newmad_impl.h | |
| +++ b/src/mpid/ch3/channels/nemesis/nemesis/netmod/newmad/newmad_impl.h | |
| @@ -104,7 +104,7 @@ struct MPID_nem_newmad_internal_req | |
| { | |
| MPIU_OBJECT_HEADER; /* adds (unused) handle and ref_count fields */ | |
| MPID_Request_kind_t kind; /* used */ | |
| - MPIDI_CH3_PktGeneric_t pending_pkt; | |
| + MPIDI_CH3_Pkt_t pending_pkt; | |
| MPIDI_VC_t *vc; | |
| void *tmpbuf; | |
| MPIDI_msg_sz_t tmpbuf_sz; | |
| diff --git a/src/mpid/ch3/channels/nemesis/nemesis/netmod/newmad/newmad_poll.c b/src/mpid/ch3/channels/nemesis/nemesis/netmod/newmad/newmad_poll.c | |
| index 7a2cab5..30c043e 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/nemesis/netmod/newmad/newmad_poll.c | |
| +++ b/src/mpid/ch3/channels/nemesis/nemesis/netmod/newmad/newmad_poll.c | |
| @@ -62,7 +62,7 @@ MPID_nem_newmad_get_adi_msg(nm_sr_event_t event, const nm_sr_event_info_t*info) | |
| rreq->kind = MPID_REQUEST_RECV; | |
| rreq->vc = nm_gate_ref_get(from); | |
| - if(length <= sizeof(MPIDI_CH3_PktGeneric_t)) | |
| + if(length <= sizeof(MPIDI_CH3_Pkt_t)) | |
| { | |
| data = (char*)&(rreq->pending_pkt); | |
| } | |
| @@ -232,7 +232,7 @@ MPID_nem_newmad_poll(int in_blocking_poll) | |
| MPID_nem_newmad_internal_req_t *adi_req = &(ref->nem_newmad_req); | |
| if (kind == MPID_REQUEST_RECV) | |
| { | |
| - if (size <= sizeof(MPIDI_CH3_PktGeneric_t)) | |
| + if (size <= sizeof(MPIDI_CH3_Pkt_t)) | |
| { | |
| MPID_nem_handle_pkt(adi_req->vc,(char *)&(adi_req->pending_pkt),(MPIDI_msg_sz_t)(size)); | |
| } | |
| diff --git a/src/mpid/ch3/channels/nemesis/nemesis/netmod/newmad/newmad_send.c b/src/mpid/ch3/channels/nemesis/nemesis/netmod/newmad/newmad_send.c | |
| index 48e8cd1..f8ec1f4 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/nemesis/netmod/newmad/newmad_send.c | |
| +++ b/src/mpid/ch3/channels/nemesis/nemesis/netmod/newmad/newmad_send.c | |
| @@ -26,7 +26,7 @@ int MPID_nem_newmad_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, M | |
| MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_NEWMAD_ISENDCONTIG); | |
| MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_NEWMAD_ISENDCONTIG); | |
| - MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); | |
| MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "newmad_iSendContig"); | |
| MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *)hdr); | |
| @@ -36,9 +36,9 @@ int MPID_nem_newmad_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, M | |
| fprintf(stdout,"iSendContig ========> Sending ADI msg for req %p (match is %lx) \n",sreq,match_info); | |
| #endif | |
| - MPIU_Memcpy(&(sreq->dev.pending_pkt),(char *)hdr,sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + MPIU_Memcpy(&(sreq->dev.pending_pkt),(char *)hdr,sizeof(MPIDI_CH3_Pkt_t)); | |
| newmad_iov[0].iov_base = (char *)&(sreq->dev.pending_pkt); | |
| - newmad_iov[0].iov_len = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + newmad_iov[0].iov_len = sizeof(MPIDI_CH3_Pkt_t); | |
| if(data_sz) | |
| { | |
| newmad_iov[1].iov_base = data; | |
| @@ -74,7 +74,7 @@ int MPID_nem_newmad_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hd | |
| MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_NEWMAD_ISTARTCONTIGMSG); | |
| MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_NEWMAD_ISTARTCONTIGMSG); | |
| - MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); | |
| MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "newmad_iSendContig"); | |
| MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *)hdr); | |
| @@ -90,9 +90,9 @@ int MPID_nem_newmad_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hd | |
| fprintf(stdout,"StartcontigMsg ========> Sending ADI msg for req %p (match is %lx) \n",sreq,match_info); | |
| #endif | |
| - MPIU_Memcpy(&(sreq->dev.pending_pkt),(char *)hdr,sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + MPIU_Memcpy(&(sreq->dev.pending_pkt),(char *)hdr,sizeof(MPIDI_CH3_Pkt_t)); | |
| newmad_iov[0].iov_base = (char *)&(sreq->dev.pending_pkt); | |
| - newmad_iov[0].iov_len = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + newmad_iov[0].iov_len = sizeof(MPIDI_CH3_Pkt_t); | |
| if (data_sz) | |
| { | |
| newmad_iov[1].iov_base = (char *)data; | |
| @@ -138,14 +138,14 @@ int MPID_nem_newmad_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *head | |
| MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_NEWMAD_SENDNONCONTIGMSG); | |
| MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_NEWMAD_SENDNONCONTIGMSG); | |
| - MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); | |
| MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "MPID_nem_newmad_iSendNoncontig"); | |
| NEM_NMAD_ADI_MATCH(match_info); | |
| - MPIU_Memcpy(&(sreq->dev.pending_pkt),(char *)header,sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + MPIU_Memcpy(&(sreq->dev.pending_pkt),(char *)header,sizeof(MPIDI_CH3_Pkt_t)); | |
| newmad_iov[0].iov_base = (char *)&(sreq->dev.pending_pkt); | |
| - newmad_iov[0].iov_len = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + newmad_iov[0].iov_len = sizeof(MPIDI_CH3_Pkt_t); | |
| MPIU_Assert(sreq->dev.segment_first == 0); | |
| last = sreq->dev.segment_size; | |
| diff --git a/src/mpid/ch3/channels/nemesis/nemesis/netmod/tcp/tcp_send.c b/src/mpid/ch3/channels/nemesis/nemesis/netmod/tcp/tcp_send.c | |
| index 1a24cb4..c1613ae 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/nemesis/netmod/tcp/tcp_send.c | |
| +++ b/src/mpid/ch3/channels/nemesis/nemesis/netmod/tcp/tcp_send.c | |
| @@ -253,7 +253,7 @@ int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_s | |
| MPID_IOV iov[2]; | |
| iov[0].MPID_IOV_BUF = hdr; | |
| - iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); | |
| iov[1].MPID_IOV_BUF = data; | |
| iov[1].MPID_IOV_LEN = data_sz; | |
| @@ -282,7 +282,7 @@ int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_s | |
| } | |
| MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "write " MPIDI_MSG_SZ_FMT, offset); | |
| - if (offset == sizeof(MPIDI_CH3_PktGeneric_t) + data_sz) | |
| + if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz) | |
| { | |
| /* sent whole message */ | |
| *sreq_ptr = NULL; | |
| @@ -312,11 +312,11 @@ int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_s | |
| sreq->ch.vc = vc; | |
| sreq->dev.iov_offset = 0; | |
| - if (offset < sizeof(MPIDI_CH3_PktGeneric_t)) | |
| + if (offset < sizeof(MPIDI_CH3_Pkt_t)) | |
| { | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *)hdr; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)hdr; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset; | |
| - sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t) - offset ; | |
| + sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset ; | |
| if (data_sz) | |
| { | |
| sreq->dev.iov[1].MPID_IOV_BUF = data; | |
| @@ -328,8 +328,8 @@ int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_s | |
| } | |
| else | |
| { | |
| - sreq->dev.iov[0].MPID_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_PktGeneric_t)); | |
| - sreq->dev.iov[0].MPID_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + sreq->dev.iov[0].MPID_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t)); | |
| + sreq->dev.iov[0].MPID_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t)); | |
| sreq->dev.iov_count = 1; | |
| } | |
| @@ -392,7 +392,7 @@ int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_ | |
| MPID_IOV iov[2]; | |
| iov[0].MPID_IOV_BUF = hdr; | |
| - iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); | |
| iov[1].MPID_IOV_BUF = data; | |
| iov[1].MPID_IOV_LEN = data_sz; | |
| @@ -422,7 +422,7 @@ int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_ | |
| } | |
| MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "write " MPIDI_MSG_SZ_FMT, offset); | |
| - if (offset == sizeof(MPIDI_CH3_PktGeneric_t) + data_sz) | |
| + if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz) | |
| { | |
| /* sent whole message */ | |
| *sreq_ptr = NULL; | |
| @@ -451,11 +451,11 @@ int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_ | |
| sreq->ch.vc = vc; | |
| sreq->dev.iov_offset = 0; | |
| - if (offset < sizeof(MPIDI_CH3_PktGeneric_t)) | |
| + if (offset < sizeof(MPIDI_CH3_Pkt_t)) | |
| { | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *)hdr; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)hdr; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset; | |
| - sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t) - offset ; | |
| + sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset ; | |
| if (data_sz) | |
| { | |
| sreq->dev.iov[1].MPID_IOV_BUF = data; | |
| @@ -467,8 +467,8 @@ int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_ | |
| } | |
| else | |
| { | |
| - sreq->dev.iov[0].MPID_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_PktGeneric_t)); | |
| - sreq->dev.iov[0].MPID_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + sreq->dev.iov[0].MPID_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t)); | |
| + sreq->dev.iov[0].MPID_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t)); | |
| sreq->dev.iov_count = 1; | |
| } | |
| @@ -527,7 +527,7 @@ int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPID | |
| MPID_IOV iov[2]; | |
| iov[0].MPID_IOV_BUF = hdr; | |
| - iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); | |
| iov[1].MPID_IOV_BUF = data; | |
| iov[1].MPID_IOV_LEN = data_sz; | |
| @@ -556,7 +556,7 @@ int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPID | |
| } | |
| MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "write " MPIDI_MSG_SZ_FMT, offset); | |
| - if (offset == sizeof(MPIDI_CH3_PktGeneric_t) + data_sz) | |
| + if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz) | |
| { | |
| /* sent whole message */ | |
| int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *); | |
| @@ -599,11 +599,11 @@ int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPID | |
| /* save iov */ | |
| - if (offset < sizeof(MPIDI_CH3_PktGeneric_t)) | |
| + if (offset < sizeof(MPIDI_CH3_Pkt_t)) | |
| { | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *)hdr; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)hdr; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset; | |
| - sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t) - offset; | |
| + sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset; | |
| if (data_sz) | |
| { | |
| sreq->dev.iov[1].MPID_IOV_BUF = data; | |
| @@ -615,8 +615,8 @@ int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPID | |
| } | |
| else | |
| { | |
| - sreq->dev.iov[0].MPID_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_PktGeneric_t)); | |
| - sreq->dev.iov[0].MPID_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + sreq->dev.iov[0].MPID_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t)); | |
| + sreq->dev.iov[0].MPID_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t)); | |
| sreq->dev.iov_count = 1; | |
| } | |
| @@ -672,10 +672,10 @@ int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header, | |
| MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_SENDNONCONTIG); | |
| MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TCP_SENDNONCONTIG); | |
| MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "tcp_SendNoncontig"); | |
| - MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); | |
| iov[0].MPID_IOV_BUF = header; | |
| - iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); | |
| iov_n = MPID_IOV_LIMIT - 1; | |
| @@ -729,9 +729,9 @@ int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header, | |
| if (offset < iov[0].MPID_IOV_LEN) | |
| { | |
| /* header was not yet sent, save it in req */ | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *)header; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)header; | |
| iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)&sreq->dev.pending_pkt; | |
| - iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); | |
| } | |
| /* check if whole iov was sent, and save any unsent portion of iov */ | |
| diff --git a/src/mpid/ch3/channels/nemesis/nemesis/netmod/wintcp/wintcp_send.c b/src/mpid/ch3/channels/nemesis/nemesis/netmod/wintcp/wintcp_send.c | |
| index a84d558..c718b3e 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/nemesis/netmod/wintcp/wintcp_send.c | |
| +++ b/src/mpid/ch3/channels/nemesis/nemesis/netmod/wintcp/wintcp_send.c | |
| @@ -274,7 +274,7 @@ int MPID_nem_newtcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hd | |
| MPID_IOV iov[2]; | |
| iov[0].MPID_IOV_BUF = hdr; | |
| - iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); | |
| iov[1].MPID_IOV_BUF = data; | |
| iov[1].MPID_IOV_LEN = data_sz; | |
| @@ -288,7 +288,7 @@ int MPID_nem_newtcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hd | |
| MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "write %d", offset); | |
| - if (offset == sizeof(MPIDI_CH3_PktGeneric_t) + data_sz) | |
| + if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz) | |
| { | |
| /* sent whole message */ | |
| *sreq_ptr = NULL; | |
| @@ -317,14 +317,14 @@ int MPID_nem_newtcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hd | |
| sreq->ch.vc = vc; | |
| sreq->dev.iov_offset = 0; | |
| -/* printf("&sreq->dev.pending_pkt = %p sizeof(MPIDI_CH3_PktGeneric_t) = %d\n", &sreq->dev.pending_pkt, sizeof(MPIDI_CH3_PktGeneric_t));//DARIUS */ | |
| +/* printf("&sreq->dev.pending_pkt = %p sizeof(MPIDI_CH3_Pkt_t) = %d\n", &sreq->dev.pending_pkt, sizeof(MPIDI_CH3_Pkt_t));//DARIUS */ | |
| /* printf("offset = %d\n", offset);//DARIUS */ | |
| - if (offset < sizeof(MPIDI_CH3_PktGeneric_t)) | |
| + if (offset < sizeof(MPIDI_CH3_Pkt_t)) | |
| { | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *)hdr; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)hdr; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset; | |
| - sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t) - offset ; | |
| + sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset ; | |
| if (data_sz) | |
| { | |
| sreq->dev.iov[1].MPID_IOV_BUF = data; | |
| @@ -336,8 +336,8 @@ int MPID_nem_newtcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hd | |
| } | |
| else | |
| { | |
| - sreq->dev.iov[0].MPID_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_PktGeneric_t)); | |
| - sreq->dev.iov[0].MPID_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + sreq->dev.iov[0].MPID_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t)); | |
| + sreq->dev.iov[0].MPID_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t)); | |
| sreq->dev.iov_count = 1; | |
| } | |
| @@ -392,7 +392,7 @@ int MPID_nem_newtcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, M | |
| int iov_cnt; | |
| iov[0].MPID_IOV_BUF = hdr; | |
| - iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); | |
| if(data_sz > 0){ | |
| iov[1].MPID_IOV_BUF = data; | |
| iov[1].MPID_IOV_LEN = data_sz; | |
| @@ -402,7 +402,7 @@ int MPID_nem_newtcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, M | |
| iov_cnt = 1; | |
| } | |
| - MPIU_DBG_MSG_FMT(CH3_CHANNEL, VERBOSE, (MPIU_DBG_FDEST, "writing hdr (sz = %d) and data (sz = %d)", sizeof(MPIDI_CH3_PktGeneric_t), data_sz)); | |
| + MPIU_DBG_MSG_FMT(CH3_CHANNEL, VERBOSE, (MPIU_DBG_FDEST, "writing hdr (sz = %d) and data (sz = %d)", sizeof(MPIDI_CH3_Pkt_t), data_sz)); | |
| MPIU_OSW_RETRYON_INTR((offset < 0), | |
| (mpi_errno = MPIU_SOCKW_Writev(VC_FIELD(vc, sc)->fd, iov, iov_cnt, &offset))); | |
| @@ -414,7 +414,7 @@ int MPID_nem_newtcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, M | |
| MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "write %d", offset); | |
| - if (offset == sizeof(MPIDI_CH3_PktGeneric_t) + data_sz) | |
| + if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz) | |
| { | |
| /* sent whole message */ | |
| int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *); | |
| @@ -454,11 +454,11 @@ int MPID_nem_newtcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, M | |
| } | |
| /* save iov */ | |
| - if (offset < sizeof(MPIDI_CH3_PktGeneric_t)) | |
| + if (offset < sizeof(MPIDI_CH3_Pkt_t)) | |
| { | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *)hdr; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)hdr; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset; | |
| - sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t) - offset; | |
| + sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset; | |
| if (data_sz) | |
| { | |
| sreq->dev.iov[1].MPID_IOV_BUF = data; | |
| @@ -470,8 +470,8 @@ int MPID_nem_newtcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, M | |
| } | |
| else | |
| { | |
| - sreq->dev.iov[0].MPID_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_PktGeneric_t)); | |
| - sreq->dev.iov[0].MPID_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + sreq->dev.iov[0].MPID_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t)); | |
| + sreq->dev.iov[0].MPID_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t)); | |
| sreq->dev.iov_count = 1; | |
| } | |
| @@ -514,10 +514,10 @@ int MPID_nem_newtcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *head | |
| int complete; | |
| MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "newtcp_SendNoncontig"); | |
| - MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t)); | |
| iov[0].MPID_IOV_BUF = header; | |
| - iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); | |
| iov_n = MPID_IOV_LIMIT - 1; | |
| /* On the initial load of a send iov req, set the OnFinal action (null | |
| @@ -552,9 +552,9 @@ int MPID_nem_newtcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *head | |
| if (offset < iov[0].MPID_IOV_LEN) | |
| { | |
| /* header was not yet sent, save it in req */ | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *)header; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)header; | |
| iov[0].MPID_IOV_BUF = &sreq->dev.pending_pkt; | |
| - iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_PktGeneric_t); | |
| + iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t); | |
| } | |
| /* check if whole iov was sent, and save any unsent portion of iov */ | |
| diff --git a/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_init.c b/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_init.c | |
| index 044c88d..e11738a 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_init.c | |
| +++ b/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_init.c | |
| @@ -68,7 +68,7 @@ MPID_nem_init(int pg_rank, MPIDI_PG_t *pg_p, int has_parent ATTRIBUTE((unused))) | |
| packet. This is needed because we no longer include channel | |
| packet types in the CH3 packet types to allow dynamic channel | |
| loading. */ | |
| - MPIU_Assert(sizeof(MPIDI_CH3_nem_pkt_t) <= sizeof(MPIDI_CH3_PktGeneric_t)); | |
| + MPIU_Assert(sizeof(MPIDI_CH3_nem_pkt_t) <= sizeof(MPIDI_CH3_Pkt_t)); | |
| /* The MPID_nem_cell_rel_ptr_t defined in mpid_nem_datatypes.h | |
| should only contain a OPA_ptr_t. This is to check that | |
| @@ -363,7 +363,7 @@ MPID_nem_vc_init (MPIDI_VC_t *vc) | |
| vc_ch->ckpt_restart_vc = NULL; | |
| #endif | |
| vc_ch->pending_pkt_len = 0; | |
| - MPIU_CHKPMEM_MALLOC (vc_ch->pending_pkt, MPIDI_CH3_PktGeneric_t *, sizeof (MPIDI_CH3_PktGeneric_t), mpi_errno, "pending_pkt"); | |
| + MPIU_CHKPMEM_MALLOC (vc_ch->pending_pkt, MPIDI_CH3_Pkt_t *, sizeof (MPIDI_CH3_Pkt_t), mpi_errno, "pending_pkt"); | |
| /* We do different things for vcs in the COMM_WORLD pg vs other pgs | |
| COMM_WORLD vcs may use shared memory, and already have queues allocated | |
| diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_isend.c b/src/mpid/ch3/channels/nemesis/src/ch3_isend.c | |
| index d46df3f..0aa04da 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/src/ch3_isend.c | |
| +++ b/src/mpid/ch3/channels/nemesis/src/ch3_isend.c | |
| @@ -95,7 +95,7 @@ int MPIDI_CH3_iSend (MPIDI_VC_t *vc, MPID_Request *sreq, void * hdr, MPIDI_msg_s | |
| enqueue_it: | |
| MPIDI_DBG_PRINTF((55, FCNAME, "enqueuing")); | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) hdr; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (char *) &sreq->dev.pending_pkt; | |
| sreq->dev.iov[0].MPID_IOV_LEN = hdr_sz; | |
| sreq->dev.iov_count = 1; | |
| diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c b/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c | |
| index 8067c35..5b743ca 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c | |
| +++ b/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c | |
| @@ -85,7 +85,7 @@ int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV *iov, int n_i | |
| { | |
| /* header was not sent */ | |
| sreq->dev.pending_pkt = | |
| - *(MPIDI_CH3_PktGeneric_t *) iov[0].MPID_IOV_BUF; | |
| + *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (char *) &sreq->dev.pending_pkt; | |
| sreq->dev.iov[0].MPID_IOV_LEN = iov[0].MPID_IOV_LEN; | |
| } | |
| @@ -151,7 +151,7 @@ int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV *iov, int n_i | |
| MPIDI_DBG_PRINTF((55, FCNAME, "enqueuing")); | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) iov[0].MPID_IOV_BUF; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (char *) &sreq->dev.pending_pkt; | |
| sreq->dev.iov[0].MPID_IOV_LEN = iov[0].MPID_IOV_LEN; | |
| diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c | |
| index 96ec4bc..b142359 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c | |
| +++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c | |
| @@ -93,7 +93,13 @@ int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, MPID_ | |
| MPIU_Object_set_ref (sreq, 2); | |
| sreq->kind = MPID_REQUEST_SEND; | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) hdr; | |
| + /* the bug is here in this assignment. Not sure if it's an aliasing | |
| + * violation or not, but there is some compiler padding added in | |
| + * MPIDI_CH3_Pkt_t (between "kind" and "pktptrs") that is not | |
| + * present in the MPIDI_CH3_Pkt_lock-granted. Memcpy is probably the | |
| + * right fix (maybe?), but the hard part will be finding all of the | |
| + * other places we are doing something bad like this. */ | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (char *) &sreq->dev.pending_pkt; | |
| sreq->dev.iov[0].MPID_IOV_LEN = hdr_sz; | |
| sreq->dev.iov_count = 1; | |
| diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c | |
| index b457d43..4d34dd5 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c | |
| +++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c | |
| @@ -132,7 +132,7 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPID_IOV *iov, int n_iov, MPID_Request | |
| if ( iov == remaining_iov ) | |
| { | |
| /* header was not sent, so iov[0] might point to something on the stack */ | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) iov[0].MPID_IOV_BUF; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (char *) &sreq->dev.pending_pkt; | |
| sreq->dev.iov[0].MPID_IOV_LEN = iov[0].MPID_IOV_LEN; | |
| } | |
| @@ -152,7 +152,7 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPID_IOV *iov, int n_iov, MPID_Request | |
| MPIU_Object_set_ref(sreq, 2); | |
| sreq->kind = MPID_REQUEST_SEND; | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) iov[0].MPID_IOV_BUF; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (char *) &sreq->dev.pending_pkt; | |
| sreq->dev.iov[0].MPID_IOV_LEN = iov[0].MPID_IOV_LEN; | |
| diff --git a/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c b/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c | |
| index 1d64ae9..54db6ad 100644 | |
| --- a/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c | |
| +++ b/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c | |
| @@ -37,7 +37,7 @@ int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header, | |
| MPIDI_DBG_PRINTF((55, FCNAME, "enqueuing")); | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *)header; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)header; | |
| sreq->ch.noncontig = TRUE; | |
| sreq->ch.header_sz = hdr_sz; | |
| sreq->ch.vc = vc; | |
| @@ -60,7 +60,7 @@ int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header, | |
| sreq->ch.vc = vc; | |
| if (sreq->dev.segment_first == 0) /* nothing was sent, save header */ | |
| { | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *)header; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)header; | |
| sreq->ch.header_sz = hdr_sz; | |
| } | |
| else | |
| diff --git a/src/mpid/ch3/channels/sctp/src/ch3_isend.c b/src/mpid/ch3/channels/sctp/src/ch3_isend.c | |
| index 3c8c236..abf3b51 100644 | |
| --- a/src/mpid/ch3/channels/sctp/src/ch3_isend.c | |
| +++ b/src/mpid/ch3/channels/sctp/src/ch3_isend.c | |
| @@ -16,7 +16,7 @@ static void update_request(MPID_Request * sreq, void * hdr, MPIDI_msg_sz_t hdr_s | |
| MPIDI_FUNC_ENTER(MPID_STATE_UPDATE_REQUEST); | |
| MPIU_Assert(hdr_sz == sizeof(MPIDI_CH3_Pkt_t)); | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) hdr; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)((char *) &sreq->dev.pending_pkt + nb); | |
| sreq->dev.iov[0].MPID_IOV_LEN = hdr_sz - nb; | |
| sreq->dev.iov_count = 1; | |
| diff --git a/src/mpid/ch3/channels/sctp/src/ch3_isendv.c b/src/mpid/ch3/channels/sctp/src/ch3_isendv.c | |
| index 9c82a9e..7dd3cda 100644 | |
| --- a/src/mpid/ch3/channels/sctp/src/ch3_isendv.c | |
| +++ b/src/mpid/ch3/channels/sctp/src/ch3_isendv.c | |
| @@ -25,7 +25,7 @@ static void update_request(MPID_Request * sreq, MPID_IOV * iov, int iov_count, i | |
| if (iov_offset == 0) | |
| { | |
| MPIU_Assert(iov[0].MPID_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t)); | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) iov[0].MPID_IOV_BUF; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) &sreq->dev.pending_pkt; | |
| } | |
| sreq->dev.iov[iov_offset].MPID_IOV_BUF = | |
| diff --git a/src/mpid/ch3/channels/sctp/src/ch3_istartmsg.c b/src/mpid/ch3/channels/sctp/src/ch3_istartmsg.c | |
| index eed89c4..3b0ec6b 100644 | |
| --- a/src/mpid/ch3/channels/sctp/src/ch3_istartmsg.c | |
| +++ b/src/mpid/ch3/channels/sctp/src/ch3_istartmsg.c | |
| @@ -27,7 +27,7 @@ static MPID_Request * create_request(void * hdr, MPIDI_msg_sz_t hdr_sz, MPIU_Siz | |
| MPIU_Object_set_ref(sreq, 2); | |
| sreq->kind = MPID_REQUEST_SEND; | |
| MPIU_Assert(hdr_sz == sizeof(MPIDI_CH3_Pkt_t)); | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) hdr; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; | |
| sreq->dev.iov[0].MPID_IOV_BUF = | |
| (MPID_IOV_BUF_CAST)((char *) &sreq->dev.pending_pkt + nb); | |
| sreq->dev.iov[0].MPID_IOV_LEN = hdr_sz - nb; | |
| diff --git a/src/mpid/ch3/channels/sctp/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/sctp/src/ch3_istartmsgv.c | |
| index 3e41a95..17aae0a 100644 | |
| --- a/src/mpid/ch3/channels/sctp/src/ch3_istartmsgv.c | |
| +++ b/src/mpid/ch3/channels/sctp/src/ch3_istartmsgv.c | |
| @@ -35,7 +35,7 @@ static MPID_Request * create_request(MPID_IOV * iov, int iov_count, int iov_offs | |
| if (iov_offset == 0) | |
| { | |
| MPIU_Assert(iov[0].MPID_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t)); | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) iov[0].MPID_IOV_BUF; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) &sreq->dev.pending_pkt; | |
| } | |
| sreq->dev.iov[iov_offset].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)((char *) sreq->dev.iov[iov_offset].MPID_IOV_BUF + nb); | |
| diff --git a/src/mpid/ch3/channels/sctp/src/sctp_util.c b/src/mpid/ch3/channels/sctp/src/sctp_util.c | |
| index 736657a..a14ccc9 100644 | |
| --- a/src/mpid/ch3/channels/sctp/src/sctp_util.c | |
| +++ b/src/mpid/ch3/channels/sctp/src/sctp_util.c | |
| @@ -222,7 +222,7 @@ static MPID_Request* create_request(MPID_IOV * iov, int iov_count, int iov_offse | |
| if (iov_offset == 0) | |
| { | |
| MPIU_Assert(iov[0].MPID_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t)); | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) iov[0].MPID_IOV_BUF; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) &sreq->dev.pending_pkt; | |
| } | |
| sreq->dev.iov[iov_offset].MPID_IOV_BUF = | |
| diff --git a/src/mpid/ch3/channels/sock/src/ch3_isend.c b/src/mpid/ch3/channels/sock/src/ch3_isend.c | |
| index 169b927..8aa17ed 100644 | |
| --- a/src/mpid/ch3/channels/sock/src/ch3_isend.c | |
| +++ b/src/mpid/ch3/channels/sock/src/ch3_isend.c | |
| @@ -17,7 +17,7 @@ static void update_request(MPID_Request * sreq, void * hdr, | |
| MPIDI_FUNC_ENTER(MPID_STATE_UPDATE_REQUEST); | |
| MPIU_Assert(hdr_sz == sizeof(MPIDI_CH3_Pkt_t)); | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) hdr; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)((char *) &sreq->dev.pending_pkt + nb); | |
| sreq->dev.iov[0].MPID_IOV_LEN = hdr_sz - nb; | |
| sreq->dev.iov_count = 1; | |
| diff --git a/src/mpid/ch3/channels/sock/src/ch3_isendv.c b/src/mpid/ch3/channels/sock/src/ch3_isendv.c | |
| index 96cb23b..3ec275a 100644 | |
| --- a/src/mpid/ch3/channels/sock/src/ch3_isendv.c | |
| +++ b/src/mpid/ch3/channels/sock/src/ch3_isendv.c | |
| @@ -25,7 +25,7 @@ static void update_request(MPID_Request * sreq, MPID_IOV * iov, int iov_count, | |
| if (iov_offset == 0) | |
| { | |
| MPIU_Assert(iov[0].MPID_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t)); | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) iov[0].MPID_IOV_BUF; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) &sreq->dev.pending_pkt; | |
| } | |
| sreq->dev.iov[iov_offset].MPID_IOV_BUF = | |
| diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c | |
| index 6703e99..1a2e5ca 100644 | |
| --- a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c | |
| +++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c | |
| @@ -26,7 +26,7 @@ static MPID_Request * create_request(void * hdr, MPIDI_msg_sz_t hdr_sz, | |
| MPIU_Object_set_ref(sreq, 2); | |
| sreq->kind = MPID_REQUEST_SEND; | |
| MPIU_Assert(hdr_sz == sizeof(MPIDI_CH3_Pkt_t)); | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) hdr; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr; | |
| sreq->dev.iov[0].MPID_IOV_BUF = | |
| (MPID_IOV_BUF_CAST)((char *) &sreq->dev.pending_pkt + nb); | |
| sreq->dev.iov[0].MPID_IOV_LEN = hdr_sz - nb; | |
| diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c | |
| index 22afe31..9537d0d 100644 | |
| --- a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c | |
| +++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c | |
| @@ -34,7 +34,7 @@ static MPID_Request * create_request(MPID_IOV * iov, int iov_count, | |
| if (iov_offset == 0) | |
| { | |
| MPIU_Assert(iov[0].MPID_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t)); | |
| - sreq->dev.pending_pkt = *(MPIDI_CH3_PktGeneric_t *) iov[0].MPID_IOV_BUF; | |
| + sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF; | |
| sreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) &sreq->dev.pending_pkt; | |
| } | |
| sreq->dev.iov[iov_offset].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)((char *) sreq->dev.iov[iov_offset].MPID_IOV_BUF + nb); | |
| diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h | |
| index 7797907..9e5a901 100644 | |
| --- a/src/mpid/ch3/include/mpidpre.h | |
| +++ b/src/mpid/ch3/include/mpidpre.h | |
| @@ -60,7 +60,6 @@ typedef MPIR_Rank_t MPID_Node_id_t; | |
| /* provides "pre" typedefs and such for NBC scheduling mechanism */ | |
| #include "mpid_sched_pre.h" | |
| - | |
| /* For the typical communication system for which the ch3 channel is | |
| appropriate, 16 bits is sufficient for the rank. By also using 16 | |
| bits for the context, we can reduce the size of the match | |
| @@ -98,14 +97,8 @@ typedef union { | |
| * runtime global value. */ | |
| #define MPIDI_TAG_UB (0x7fffffff) | |
| -/* Packet types are defined in mpidpkt.h . The intent is to remove the | |
| - need for packet definitions outside of the device directories. | |
| - Currently, the request contains a block of storage in which a | |
| - packet header can be copied in the event that a message cannot be | |
| - send immediately. | |
| -*/ | |
| -typedef struct MPIDI_CH3_PktGeneric { int32_t kind; int32_t *pktptrs[1]; int32_t pktwords[6]; } | |
| - MPIDI_CH3_PktGeneric_t; | |
| +/* Provides MPIDI_CH3_Pkt_t. Must come after MPIDI_Message_match definition. */ | |
| +#include "mpidpkt.h" | |
| /* | |
| * THIS IS OBSOLETE AND UNUSED, BUT RETAINED FOR ITS DESCRIPTIONS OF THE | |
| @@ -319,7 +312,7 @@ typedef struct MPIDI_Request { | |
| message packet. This field provide a generic location for that. | |
| Question: do we want to make this a link instead of reserving | |
| a fixed spot in the request? */ | |
| - MPIDI_CH3_PktGeneric_t pending_pkt; | |
| + MPIDI_CH3_Pkt_t pending_pkt; | |
| struct MPID_Request * next; | |
| } MPIDI_Request; | |
| #define MPID_REQUEST_DECL MPIDI_Request dev; | |
| diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c | |
| index c0e0a9d..a9dc862 100644 | |
| --- a/src/mpid/ch3/src/ch3u_rma_sync.c | |
| +++ b/src/mpid/ch3/src/ch3u_rma_sync.c | |
| @@ -2453,6 +2453,10 @@ int MPIDI_CH3I_Send_lock_granted_pkt(MPIDI_VC_t *vc, MPI_Win source_win_handle) | |
| MPIDI_Pkt_init(lock_granted_pkt, MPIDI_CH3_PKT_LOCK_GRANTED); | |
| lock_granted_pkt->source_win_handle = source_win_handle; | |
| + MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE, | |
| + (MPIU_DBG_FDEST, "sending lock granted pkt on vc=%p, source_win_handle=%#08x", | |
| + vc, lock_granted_pkt->source_win_handle)); | |
| + | |
| MPIU_THREAD_CS_ENTER(CH3COMM,vc); | |
| mpi_errno = MPIDI_CH3_iStartMsg(vc, lock_granted_pkt, sizeof(*lock_granted_pkt), &req); | |
| MPIU_THREAD_CS_EXIT(CH3COMM,vc); | |
| @@ -3568,6 +3572,10 @@ int MPIDI_CH3_PktHandler_LockGranted( MPIDI_VC_t *vc ATTRIBUTE((unused)), | |
| MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_PKTHANDLER_LOCKGRANTED); | |
| MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received lock granted pkt"); | |
| + | |
| + if (lock_granted_pkt->source_win_handle == 0xefefefef) { | |
| + printf("XXX DJG bogus source_win_handle detected\n"); | |
| + } | |
| *buflen = sizeof(MPIDI_CH3_Pkt_t); | |
| diff --git a/src/mpid/ch3/src/mpid_init.c b/src/mpid/ch3/src/mpid_init.c | |
| index bcc8841..a4a2bcc 100644 | |
| --- a/src/mpid/ch3/src/mpid_init.c | |
| +++ b/src/mpid/ch3/src/mpid_init.c | |
| @@ -127,8 +127,8 @@ int MPID_Init(int *argc, char ***argv, int requested, int *provided, | |
| #if 1 | |
| /* This is a sanity check because we define a generic packet size | |
| */ | |
| - if (sizeof(MPIDI_CH3_PktGeneric_t) < sizeof(MPIDI_CH3_Pkt_t)) { | |
| - fprintf( stderr, "Internal error - packet definition is too small. Generic is %ld bytes, MPIDI_CH3_Pkt_t is %ld\n", (long int)sizeof(MPIDI_CH3_PktGeneric_t), | |
| + if (sizeof(MPIDI_CH3_Pkt_t) < sizeof(MPIDI_CH3_Pkt_t)) { | |
| + fprintf( stderr, "Internal error - packet definition is too small. Generic is %ld bytes, MPIDI_CH3_Pkt_t is %ld\n", (long int)sizeof(MPIDI_CH3_Pkt_t), | |
| (long int)sizeof(MPIDI_CH3_Pkt_t) ); | |
| exit(1); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment