[mpich-commits] r10770 - in mpich2/trunk/src/mpid/ch3: channels/nemesis/include channels/nemesis/netmod/mx channels/nemesis/netmod/newmad channels/nemesis/netmod/portals4 channels/nemesis/netmod/scif channels/nemesis/netmod/tcp channels/nemesis/netmod/wintcp channels/nemesis/src channels/sock/include channels/sock/src include util/sock

buntinas at mcs.anl.gov buntinas at mcs.anl.gov
Mon Dec 17 13:13:28 CST 2012


Author: buntinas
Date: 2012-12-17 13:13:28 -0600 (Mon, 17 Dec 2012)
New Revision: 10770

Modified:
   mpich2/trunk/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
   mpich2/trunk/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
   mpich2/trunk/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_cancel.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_impl.h
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_init.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_poll.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_impl.h
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_init.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_poll.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/scif/scif_impl.h
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/scif/scif_init.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/scif/scifsm.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/socksm.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_impl.h
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_init.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_lmt.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_init.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c
   mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
   mpich2/trunk/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h
   mpich2/trunk/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h
   mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_init.c
   mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_isend.c
   mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_isendv.c
   mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
   mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
   mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_progress.c
   mpich2/trunk/src/mpid/ch3/include/mpidimpl.h
   mpich2/trunk/src/mpid/ch3/include/mpidpre.h
   mpich2/trunk/src/mpid/ch3/util/sock/ch3u_connect_sock.c
   mpich2/trunk/src/mpid/ch3/util/sock/ch3u_init_sock.c
   mpich2/trunk/src/mpid/ch3/util/sock/ch3usock.h
Log:
removed channel_private field in VC and used MPIDI_CH3_VC_DECL macro which is overridden by channel. Reviewed by Dinan

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -49,7 +49,7 @@
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_cell_ptr_t el;
     int my_rank;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
 
     /*DO_PAPI (PAPI_reset (PAPI_EventSet)); */
 
@@ -173,7 +173,7 @@
     char *cell_buf;
     MPIDI_msg_sz_t payload_len;    
     int my_rank;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_MPICH_SENDV);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_MPICH_SENDV);
@@ -275,7 +275,7 @@
     char *cell_buf;
     MPIDI_msg_sz_t payload_len;    
     int my_rank;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_MPICH_SENDV_HEADER);
     
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_MPICH_SENDV_HEADER);
@@ -421,7 +421,7 @@
     MPIDI_msg_sz_t datalen;
     int my_rank;
     MPIDI_msg_sz_t last;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
 
     MPIU_Assert(vc_ch->is_local); /* netmods will have their own implementation */
     MPIU_Assert(header_sz <= sizeof(MPIDI_CH3_Pkt_t));
@@ -546,7 +546,7 @@
     MPIDI_msg_sz_t datalen;
     int my_rank;
     MPIDI_msg_sz_t last;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
 
     MPIU_Assert(vc_ch->is_local); /* netmods will have their own implementation */    
     
@@ -957,7 +957,7 @@
 MPID_nem_mpich_release_cell (MPID_nem_cell_ptr_t cell, MPIDI_VC_t *vc)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     DO_PAPI (PAPI_reset (PAPI_EventSet));
     MPID_nem_queue_enqueue (vc_ch->free_queue, cell);
     DO_PAPI (PAPI_accum_var (PAPI_EventSet,PAPI_vvalues9));

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -79,100 +79,6 @@
 
 int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen);
 
-/* macro to access the channel_private fields in the vc */
-#define VC_CH(vc) ((MPIDI_CH3I_VC *)(vc)->channel_private)
-
-struct MPIDI_VC;
-struct MPID_Request;
-struct MPID_nem_copy_buf;
-union MPIDI_CH3_Pkt;
-struct MPID_nem_lmt_shm_wait_element;
-
-typedef struct MPIDI_CH3I_VC
-{
-    int pg_rank;
-    struct MPID_Request *recv_active;
-
-    int is_local;
-    unsigned short send_seqno;
-    MPID_nem_fbox_mpich_t *fbox_out;
-    MPID_nem_fbox_mpich_t *fbox_in;
-    MPID_nem_queue_ptr_t recv_queue;
-    MPID_nem_queue_ptr_t free_queue;
-
-#ifdef ENABLE_CHECKPOINTING
-    MPIDI_msg_sz_t ckpt_msg_len;
-    void *ckpt_msg_buf;
-#endif
-
-    /* temp buffer to store partially received header */
-    MPIDI_msg_sz_t pending_pkt_len;
-    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;
-    struct MPIDI_VC *prev;
-
-    /* contig function pointers.  Netmods should set these. */
-    /* iStartContigMsg -- sends a message consisting of a header (hdr) and contiguous data (data), possibly of 0 size.  If the
-       message cannot be sent immediately, the function should create a request and return a pointer in sreq_ptr.  The network
-       module should complete the request once the message has been completely sent. */
-    int (* iStartContigMsg)(struct MPIDI_VC *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz,
-                            struct MPID_Request **sreq_ptr);
-    /* iSentContig -- sends a message consisting of a header (hdr) and contiguous data (data), possibly of 0 size.  The
-       network module should complete the request once the message has been completely sent. */
-    int (* iSendContig)(struct MPIDI_VC *vc, struct MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
-                        void *data, MPIDI_msg_sz_t data_sz);
-
-#ifdef ENABLE_CHECKPOINTING
-    /* ckpt_pause_send -- netmod should stop sending on this vc and queue messages to be sent after ckpt_continue()*/
-    int (* ckpt_pause_send_vc)(struct MPIDI_VC *vc);
-    /* ckpt_continue -- Notify remote side to start sending again. */
-    int (* ckpt_continue_vc)(struct MPIDI_VC *vc);
-    /* ckpt_restart -- similar to ckpt_continue, except that the process has been restarted */
-    int (* ckpt_restart_vc)(struct MPIDI_VC *vc);
-#endif
-
-    /* LMT function pointers */
-    int (* lmt_initiate_lmt)(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *rts_pkt, struct MPID_Request *req);
-    int (* lmt_start_recv)(struct MPIDI_VC *vc, struct MPID_Request *req, MPID_IOV s_cookie);
-    int (* lmt_start_send)(struct MPIDI_VC *vc, struct MPID_Request *sreq, MPID_IOV r_cookie);
-    int (* lmt_handle_cookie)(struct MPIDI_VC *vc, struct MPID_Request *req, MPID_IOV cookie);
-    int (* lmt_done_send)(struct MPIDI_VC *vc, struct MPID_Request *req);
-    int (* lmt_done_recv)(struct MPIDI_VC *vc, struct MPID_Request *req);
-    int (* lmt_vc_terminated)(struct MPIDI_VC *vc);
-
-    /* LMT shared memory copy-buffer ptr */
-    struct MPID_nem_copy_buf *lmt_copy_buf;
-    MPIU_SHMW_Hnd_t lmt_copy_buf_handle;
-    MPIU_SHMW_Hnd_t lmt_recv_copy_buf_handle;
-    int lmt_buf_num;
-    MPIDI_msg_sz_t lmt_surfeit;
-    struct {struct MPID_nem_lmt_shm_wait_element *head, *tail;} lmt_queue;
-    struct MPID_nem_lmt_shm_wait_element *lmt_active_lmt;
-    int lmt_enqueued; /* FIXME: used for debugging */
-
-    /* Pointer to per-vc packet handlers */
-    MPIDI_CH3_PktHandler_Fcn **pkt_handler;
-    int num_pkt_handlers;
-    
-    union
-    {
-        char padding[MPID_NEM_VC_NETMOD_AREA_LEN];
-
-        /* Temporary helper field for ticket #1679.  Should force proper pointer
-         * alignment on finnicky platforms like SPARC.  Proper fix is to stop
-         * this questionable type aliasing altogether. */
-        void *align_helper;
-    } netmod_area;
-    
-
-    /* FIXME: ch3 assumes there is a field called sendq_head in the ch
-       portion of the vc.  This is unused in nemesis and should be set
-       to NULL */
-    void *sendq_head;
-} MPIDI_CH3I_VC;
-
 /* Nemesis-provided RMA implementation */
 int MPIDI_CH3_SHM_Win_shared_query(MPID_Win *win_ptr, int target_rank, MPI_Aint *size, int *disp_unit, void *baseptr);
 int MPIDI_CH3_SHM_Win_free(MPID_Win **win_ptr);

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -33,6 +33,93 @@
 #define MPID_NEM_VC_NETMOD_AREA_LEN 128
 #define MPID_NEM_REQ_NETMOD_AREA_LEN 192
 
+typedef struct MPIDI_CH3I_VC
+{
+    int pg_rank;
+    struct MPID_Request *recv_active;
+
+    int is_local;
+    unsigned short send_seqno;
+    MPID_nem_fbox_mpich_t *fbox_out;
+    MPID_nem_fbox_mpich_t *fbox_in;
+    MPID_nem_queue_ptr_t recv_queue;
+    MPID_nem_queue_ptr_t free_queue;
+
+#ifdef ENABLE_CHECKPOINTING
+    MPIDI_msg_sz_t ckpt_msg_len;
+    void *ckpt_msg_buf;
+#endif
+
+    /* temp buffer to store partially received header */
+    MPIDI_msg_sz_t pending_pkt_len;
+    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;
+    struct MPIDI_VC *prev;
+
+    /* contig function pointers.  Netmods should set these. */
+    /* iStartContigMsg -- sends a message consisting of a header (hdr) and contiguous data (data), possibly of 0 size.  If the
+       message cannot be sent immediately, the function should create a request and return a pointer in sreq_ptr.  The network
+       module should complete the request once the message has been completely sent. */
+    int (* iStartContigMsg)(struct MPIDI_VC *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz,
+                            struct MPID_Request **sreq_ptr);
+    /* iSentContig -- sends a message consisting of a header (hdr) and contiguous data (data), possibly of 0 size.  The
+       network module should complete the request once the message has been completely sent. */
+    int (* iSendContig)(struct MPIDI_VC *vc, struct MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
+                        void *data, MPIDI_msg_sz_t data_sz);
+
+#ifdef ENABLE_CHECKPOINTING
+    /* ckpt_pause_send -- netmod should stop sending on this vc and queue messages to be sent after ckpt_continue()*/
+    int (* ckpt_pause_send_vc)(struct MPIDI_VC *vc);
+    /* ckpt_continue -- Notify remote side to start sending again. */
+    int (* ckpt_continue_vc)(struct MPIDI_VC *vc);
+    /* ckpt_restart -- similar to ckpt_continue, except that the process has been restarted */
+    int (* ckpt_restart_vc)(struct MPIDI_VC *vc);
+#endif
+
+    /* LMT function pointers */
+    int (* lmt_initiate_lmt)(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *rts_pkt, struct MPID_Request *req);
+    int (* lmt_start_recv)(struct MPIDI_VC *vc, struct MPID_Request *req, MPID_IOV s_cookie);
+    int (* lmt_start_send)(struct MPIDI_VC *vc, struct MPID_Request *sreq, MPID_IOV r_cookie);
+    int (* lmt_handle_cookie)(struct MPIDI_VC *vc, struct MPID_Request *req, MPID_IOV cookie);
+    int (* lmt_done_send)(struct MPIDI_VC *vc, struct MPID_Request *req);
+    int (* lmt_done_recv)(struct MPIDI_VC *vc, struct MPID_Request *req);
+    int (* lmt_vc_terminated)(struct MPIDI_VC *vc);
+
+    /* LMT shared memory copy-buffer ptr */
+    struct MPID_nem_copy_buf *lmt_copy_buf;
+    MPIU_SHMW_Hnd_t lmt_copy_buf_handle;
+    MPIU_SHMW_Hnd_t lmt_recv_copy_buf_handle;
+    int lmt_buf_num;
+    MPIDI_msg_sz_t lmt_surfeit;
+    struct {struct MPID_nem_lmt_shm_wait_element *head, *tail;} lmt_queue;
+    struct MPID_nem_lmt_shm_wait_element *lmt_active_lmt;
+    int lmt_enqueued; /* FIXME: used for debugging */
+
+    /* Pointer to per-vc packet handlers */
+    MPIDI_CH3_PktHandler_Fcn **pkt_handler;
+    int num_pkt_handlers;
+    
+    union
+    {
+        char padding[MPID_NEM_VC_NETMOD_AREA_LEN];
+
+        /* Temporary helper field for ticket #1679.  Should force proper pointer
+         * alignment on finnicky platforms like SPARC.  Proper fix is to stop
+         * this questionable type aliasing altogether. */
+        void *align_helper;
+    } netmod_area;
+    
+
+    /* FIXME: ch3 assumes there is a field called sendq_head in the ch
+       portion of the vc.  This is unused in nemesis and should be set
+       to NULL */
+    void *sendq_head;
+} MPIDI_CH3I_VC;
+
+#define MPIDI_CH3_VC_DECL struct MPIDI_CH3I_VC ch;
+
 struct MPIDI_CH3I_Request
 {
     struct MPIDI_VC     *vc;

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_cancel.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_cancel.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_cancel.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -38,7 +38,7 @@
     int mpi_errno = MPI_SUCCESS;
     int handled = FALSE;
    
-     if (!VC_CH(vc)->is_local)
+     if (!vc->ch.is_local)
      {
 	mx_request = &(REQ_FIELD(sreq,mx_request));
 	ret = mx_cancel(MPID_nem_mx_local_endpoint,mx_request,&result);

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_impl.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_impl.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_impl.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -97,7 +97,7 @@
 } MPID_nem_mx_vc_area;
 
 /* accessor macro to private fields in VC */
-#define VC_FIELD(vcp, field) (((MPID_nem_mx_vc_area *)VC_CH(((vcp)))->netmod_area.padding)->field)
+#define VC_FIELD(vcp, field) (((MPID_nem_mx_vc_area *)vcp->ch.netmod_area.padding)->field)
 
 /* The req provides a generic buffer in which network modules can store
    private fields This removes all dependencies from the req structure

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_init.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_init.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_init.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -237,7 +237,7 @@
 MPID_nem_mx_vc_init (MPIDI_VC_t *vc)
 {
    uint32_t threshold;
-   MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+   MPIDI_CH3I_VC *vc_ch = &vc->ch;
    int mpi_errno = MPI_SUCCESS;
 
    /* first make sure that our private fields in the vc fit into the area provided  */

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_poll.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_poll.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/mx/mx_poll.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -254,7 +254,7 @@
   MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_MX_DIRECTRECV);    
   MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_MX_DIRECTRECV);    
   
-  if (!VC_CH(vc)->is_local)
+  if (!vc->ch.is_local)
   {
       uint64_t          match_info = NEM_MX_MATCH_DIRECT;
       uint64_t          match_mask = NEM_MX_MATCH_FULL_MASK;

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_impl.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_impl.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_impl.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -81,7 +81,7 @@
     int                      pending_sends;
 } MPID_nem_newmad_vc_area;
 /* accessor macro to private fields in VC */
-#define VC_FIELD(vcp, field) (((MPID_nem_newmad_vc_area *)VC_CH(((vcp)))->netmod_area.padding)->field)
+#define VC_FIELD(vcp, field) (((MPID_nem_newmad_vc_area *)vcp->ch.netmod_area.padding)->field)
 
 /* The req provides a generic buffer in which network modules can store
    private fields This removes all dependencies from the req structure

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_init.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_init.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_init.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -238,7 +238,7 @@
 int
 MPID_nem_newmad_vc_init (MPIDI_VC_t *vc)
 {
-   MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+   MPIDI_CH3I_VC *vc_ch = &vc->ch;
    char          *business_card;
    int            mpi_errno = MPI_SUCCESS;   
    int            val_max_sz;

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_poll.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_poll.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_poll.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -90,7 +90,7 @@
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_NEWMAD_DIRECTRECV);    
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_NEWMAD_DIRECTRECV);    
     
-    if (!VC_CH(vc)->is_local)
+    if (!vc->ch.is_local)
     {
 	nm_tag_t          match_info = 0; 
 	nm_tag_t          match_mask = NEM_NMAD_MATCH_FULL_MASK; 	    

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -92,7 +92,7 @@
 } MPID_nem_ptl_vc_area;
 
 /* macro for ptl private in VC */
-#define VC_PTL(vc) ((MPID_nem_ptl_vc_area *)VC_CH((vc))->netmod_area.padding)
+#define VC_PTL(vc) ((MPID_nem_ptl_vc_area *)vc->ch.netmod_area.padding)
 
 /* Header bit fields
    bit   field

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -271,7 +271,7 @@
 static int vc_init(MPIDI_VC_t *vc)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *const vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *const vc_ch = &vc->ch;
     MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
     MPIDI_STATE_DECL(MPID_STATE_VC_INIT);
 

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/scif/scif_impl.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/scif/scif_impl.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/scif/scif_impl.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -37,7 +37,7 @@
 } MPID_nem_scif_vc_area;
 
 /* macro for scif private in VC */
-#define VC_SCIF(vc) ((MPID_nem_scif_vc_area *)VC_CH((vc))->netmod_area.padding)
+#define VC_SCIF(vc) ((MPID_nem_scif_vc_area *)vc->ch.netmod_area.padding)
 
 typedef struct {
     uint64_t seqno;

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/scif/scif_init.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/scif/scif_init.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/scif/scif_init.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -232,7 +232,7 @@
 int MPID_nem_scif_vc_init(MPIDI_VC_t * vc)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPID_nem_scif_vc_area *vc_scif = VC_SCIF(vc);
     int ret;
     size_t s;

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/scif/scifsm.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/scif/scifsm.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/scif/scifsm.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -26,7 +26,7 @@
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_SCIF_RECV_HANDLER);
 
-    if (VC_CH(sc_vc)->recv_active == NULL) {
+    if (sc_vc->ch.recv_active == NULL) {
         /* receive a new message */
         bytes_recvd =
             MPID_nem_scif_read(sc_fd, sc_ch, MPID_nem_scif_recv_buf,
@@ -46,7 +46,7 @@
     else {
         /* there is a pending receive, receive it directly into the
          * user buffer */
-        MPIDI_CH3I_VC *const sc_vc_ch = VC_CH(sc_vc);
+        MPIDI_CH3I_VC *const sc_vc_ch = &sc_vc->ch;
         MPID_Request *const rreq = sc_vc_ch->recv_active;
         MPID_IOV *iov = &rreq->dev.iov[rreq->dev.iov_offset];
         int (*reqFn) (MPIDI_VC_t *, MPID_Request *, int *);

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -1074,7 +1074,7 @@
             continue;
         MPIDI_PG_Get_vc(MPIDI_Process.my_pg, i, &vc);
         {
-            MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+            MPIDI_CH3I_VC *vc_ch = &vc->ch;
             MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
             if (vc_ch->is_local || vc_tcp->sc == NULL)
                 continue;
@@ -1516,7 +1516,7 @@
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TCP_RECV_HANDLER);
 
-    if (VC_CH(sc_vc)->recv_active == NULL)
+    if (sc_vc->ch.recv_active == NULL)
     {
         /* receive a new message */
         CHECK_EINTR(bytes_recvd, recv(sc_fd, recv_buf, MPID_NEM_TCP_RECV_MAX_PKT_LEN, 0));
@@ -1566,7 +1566,7 @@
     else
     {
         /* there is a pending receive, receive it directly into the user buffer */
-        MPIDI_CH3I_VC *const sc_vc_ch = VC_CH(sc_vc);
+        MPIDI_CH3I_VC *const sc_vc_ch = &sc_vc->ch;
         MPID_Request *const rreq = sc_vc_ch->recv_active;
         MPID_IOV *iov = &rreq->dev.iov[rreq->dev.iov_offset];
         int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -47,7 +47,7 @@
 } MPID_nem_tcp_vc_area;
 
 /* macro for tcp private in VC */
-#define VC_TCP(vc) ((MPID_nem_tcp_vc_area *)VC_CH((vc))->netmod_area.padding)
+#define VC_TCP(vc) ((MPID_nem_tcp_vc_area *)vc->ch.netmod_area.padding)
 
 #define ASSIGN_SC_TO_VC(vc_tcp_, sc_) do {      \
         (vc_tcp_)->sc = (sc_);                  \

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -186,7 +186,7 @@
         if (i == MPIDI_Process.my_pg_rank)
             continue;
         MPIDI_PG_Get_vc(MPIDI_Process.my_pg, i, &vc);
-        vc_ch = VC_CH(vc);
+        vc_ch = &vc->ch;
         if (!vc_ch->is_local) {
             mpi_errno = vc_ch->ckpt_restart_vc(vc);
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
@@ -433,7 +433,7 @@
 int MPID_nem_tcp_vc_init (MPIDI_VC_t *vc)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_VC_INIT);
 

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/socksm.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/socksm.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/socksm.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -2287,7 +2287,7 @@
     MPIU_Assert(sc != NULL);
 
     bytes_recvd = ex_read_progress_update(sc, &complete);
-    rreq = ((MPIDI_CH3I_VC *)sc->vc->channel_private)->recv_active;
+    rreq = sc->vc->ch.recv_active;
 
     if (rreq == NULL){
         /* Received a new message on scratch pad, sc->tmp_buf */
@@ -2324,7 +2324,7 @@
 
         /* The pkt handlers can sever the conn btw sc and vc - eg: when vc is terminated*/
         if(sc->vc != NULL){
-            rreq = ((MPIDI_CH3I_VC *)sc->vc->channel_private)->recv_active;
+            rreq = sc->vc->ch.recv_active;
             if (rreq == NULL){
                 /* The packets were completely consumed - post read on scratch pad recv buf */
                 MPIU_DBG_MSG_FMT(CH3_CHANNEL, VERBOSE, (MPIU_DBG_FDEST, "Packets (bytes = %d) on (fd=%d, vc=%p, sc=%p) completely consumed", bytes_recvd, sc->fd, sc->vc, sc));
@@ -2374,7 +2374,7 @@
                 MPIU_Assert(MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_GET_RESP);
                 MPIDI_CH3U_Request_complete(rreq);
                 MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "Req complete...");
-                ((MPIDI_CH3I_VC *)sc->vc->channel_private)->recv_active = NULL;
+                sc->vc->ch.recv_active = NULL;
                 req_complete = 1;
             }
             else{
@@ -2385,7 +2385,7 @@
 
                 if (req_complete){
                     MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "Req complete...");
-                    ((MPIDI_CH3I_VC *)sc->vc->channel_private)->recv_active = NULL;
+                    sc->vc->ch.recv_active = NULL;
                 }
                 else{
                     MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "Req not complete...");

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_impl.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_impl.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_impl.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -66,7 +66,7 @@
 } MPID_nem_newtcp_module_vc_area;
 
 /* accessor macro to private fields in VC */
-#define VC_FIELD(vc, field) (((MPID_nem_newtcp_module_vc_area *)((MPIDI_CH3I_VC *)(vc)->channel_private)->netmod_area.padding)->field)
+#define VC_FIELD(vc, field) (((MPID_nem_newtcp_module_vc_area *)((vc)->ch.netmod_area.padding)->field)
 
 #define ASSIGN_SC_TO_VC(vc_, sc_) do {      \
         VC_FIELD((vc_), sc) = (sc_);        \

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_init.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_init.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_init.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -325,7 +325,7 @@
 {
     int mpi_errno = MPI_SUCCESS;
 
-    MPIDI_CH3I_VC *vc_ch = (MPIDI_CH3I_VC *)vc->channel_private;
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_NEWTCP_MODULE_VC_INIT);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_NEWTCP_MODULE_VC_INIT);

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_lmt.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_lmt.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/netmod/wintcp/wintcp_lmt.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -31,7 +31,7 @@
     int dt_contig;
     MPI_Aint dt_true_lb;
     MPID_Datatype * dt_ptr;
-    MPIDI_CH3I_VC *vc_ch = (MPIDI_CH3I_VC *)vc->channel_private;
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_MODULE_LMT_PRE_SEND);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TCP_MODULE_LMT_PRE_SEND);
@@ -65,7 +65,7 @@
     int dt_contig;
     MPI_Aint dt_true_lb;
     MPID_Datatype * dt_ptr;
-    MPIDI_CH3I_VC *vc_ch = (MPIDI_CH3I_VC *)vc->channel_private;
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_MODULE_LMT_PRE_RECV);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TCP_MODULE_LMT_PRE_RECV);
@@ -135,7 +135,7 @@
     int r_len;
     int r_port;
     char *r_hostname;
-    MPIDI_CH3I_VC *vc_ch = (MPIDI_CH3I_VC *)vc->channel_private;
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_MODULE_LMT_START_SEND);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TCP_MODULE_LMT_START_SEND);
@@ -272,7 +272,7 @@
     MPIDI_msg_sz_t last;
     int nb;
     int r_len;
-    MPIDI_CH3I_VC *vc_ch = (MPIDI_CH3I_VC *)vc->channel_private;
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_MODULE_LMT_START_RECV);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TCP_MODULE_LMT_START_RECV);

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_init.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_init.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_init.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -32,8 +32,6 @@
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_INIT);
 
-    MPIU_Assert(sizeof(MPIDI_CH3I_VC) <= sizeof(((MPIDI_VC_t*)0)->channel_private));
-
     mpi_errno = MPID_nem_init (pg_rank, pg_p, has_parent);
     if (mpi_errno) MPIU_ERR_POP (mpi_errno);
 
@@ -132,7 +130,7 @@
     if (vc->pg == MPIDI_CH3I_my_pg && vc->pg_rank == MPIDI_CH3I_my_rank)
         goto fn_exit;
 
-    VC_CH(vc)->recv_active = NULL;
+    vc->ch.recv_active = NULL;
 
     mpi_errno = MPID_nem_vc_init (vc);
     if (mpi_errno) MPIU_ERR_POP (mpi_errno);
@@ -194,7 +192,7 @@
 
     /* init channel portion of vc */
     MPIU_ERR_CHKINTERNAL(!nemesis_initialized, mpi_errno, "Nemesis not initialized");
-    VC_CH(vc)->recv_active = NULL;
+    vc->ch.recv_active = NULL;
     MPIDI_CHANGE_VC_STATE(vc, ACTIVE);
 
     *new_vc = vc; /* we now have a valid, disconnected, temp VC */

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_isend.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_isend.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -31,14 +31,14 @@
         goto fn_fail;
     }
 
-    if (VC_CH(vc)->iSendContig)
+    if (vc->ch.iSendContig)
     {
-        mpi_errno = VC_CH(vc)->iSendContig(vc, sreq, hdr, hdr_sz, NULL, 0);
+        mpi_errno = vc->ch.iSendContig(vc, sreq, hdr, hdr_sz, NULL, 0);
         if(mpi_errno != MPI_SUCCESS) { MPIU_ERR_POP(mpi_errno); }
         goto fn_exit;
     }
 
-    /* MPIU_Assert(VC_CH(vc)->is_local); */
+    /* MPIU_Assert(vc->ch.is_local); */
     MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t));
 
     /* This channel uses a fixed length header, the size of which

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -23,7 +23,7 @@
     int again = 0;
     int j;
     int in_cs = FALSE;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_ISENDV);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_ISENDV);

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -35,13 +35,13 @@
 
     MPIU_ERR_CHKANDJUMP1(vc->state == MPIDI_VC_STATE_MORIBUND, mpi_errno, MPIX_ERR_PROC_FAIL_STOP, "**comm_fail", "**comm_fail %d", vc->pg_rank);
 
-    if (VC_CH(vc)->iStartContigMsg)
+    if (vc->ch.iStartContigMsg)
     {
-        mpi_errno = VC_CH(vc)->iStartContigMsg(vc, hdr, hdr_sz, NULL, 0, sreq_ptr);
+        mpi_errno = vc->ch.iStartContigMsg(vc, hdr, hdr_sz, NULL, 0, sreq_ptr);
         goto fn_exit;
     }
 
-    /*MPIU_Assert(VC_CH(vc)->is_local);*/
+    /*MPIU_Assert(vc->ch.is_local);*/
     MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t));
 
     /* This channel uses a fixed length header, the size of which is

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -43,16 +43,16 @@
 
     MPIU_ERR_CHKANDJUMP1(vc->state == MPIDI_VC_STATE_MORIBUND, mpi_errno, MPIX_ERR_PROC_FAIL_STOP, "**comm_fail", "**comm_fail %d", vc->pg_rank);
 
-    if (VC_CH(vc)->iStartContigMsg)
+    if (vc->ch.iStartContigMsg)
     {
         MPIU_Assert (n_iov > 0);
         switch (n_iov)
         {
         case 1:
-            mpi_errno = VC_CH(vc)->iStartContigMsg(vc, iov[0].MPID_IOV_BUF, iov[0].MPID_IOV_LEN, NULL, 0, sreq_ptr);
+            mpi_errno = vc->ch.iStartContigMsg(vc, iov[0].MPID_IOV_BUF, iov[0].MPID_IOV_LEN, NULL, 0, sreq_ptr);
             break;
         case 2:
-            mpi_errno = VC_CH(vc)->iStartContigMsg(vc, iov[0].MPID_IOV_BUF, iov[0].MPID_IOV_LEN,
+            mpi_errno = vc->ch.iStartContigMsg(vc, iov[0].MPID_IOV_BUF, iov[0].MPID_IOV_LEN,
                                                iov[1].MPID_IOV_BUF, iov[1].MPID_IOV_LEN, sreq_ptr);
             break;
         default:

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_progress.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/src/ch3_progress.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -386,9 +386,9 @@
 
                     MPIDI_PG_Get_vc_set_active(MPIDI_Process.my_pg, MPID_NEM_FBOX_SOURCE(cell), &vc);
 		   
-		    MPIU_Assert(VC_CH(vc)->recv_active == NULL &&
-                                VC_CH(vc)->pending_pkt_len == 0);
-                    vc_ch = VC_CH(vc);
+		    MPIU_Assert(vc->ch.recv_active == NULL &&
+                                vc->ch.pending_pkt_len == 0);
+                    vc_ch = &vc->ch;
 
                     /* invalid pkt data will result in unpredictable behavior */
                     MPIU_Assert(pkt->type >= 0 && pkt->type < MPIDI_NEM_PKT_END);
@@ -615,7 +615,7 @@
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *rreq = NULL;
     int complete;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_HANDLE_PKT);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_HANDLE_PKT);
@@ -903,14 +903,14 @@
 
     MPIDI_FUNC_ENTER(MPID_STATE_SHM_CONNECTION_TERMINATED);
 
-    if (VC_CH(vc)->lmt_vc_terminated) {
-        mpi_errno = VC_CH(vc)->lmt_vc_terminated(vc);
+    if (vc->ch.lmt_vc_terminated) {
+        mpi_errno = vc->ch.lmt_vc_terminated(vc);
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
     }
     
-    mpi_errno = MPIU_SHMW_Hnd_finalize(&(VC_CH(vc)->lmt_copy_buf_handle));
+    mpi_errno = MPIU_SHMW_Hnd_finalize(&(vc->ch.lmt_copy_buf_handle));
     if(mpi_errno != MPI_SUCCESS) { MPIU_ERR_POP(mpi_errno); }
-    mpi_errno = MPIU_SHMW_Hnd_finalize(&(VC_CH(vc)->lmt_recv_copy_buf_handle));
+    mpi_errno = MPIU_SHMW_Hnd_finalize(&(vc->ch.lmt_recv_copy_buf_handle));
     if(mpi_errno != MPI_SUCCESS) { MPIU_ERR_POP(mpi_errno); }
     
     mpi_errno = MPIDI_CH3U_Handle_connection(vc, MPIDI_VC_EVENT_TERMINATED);
@@ -944,7 +944,7 @@
         vc->state == MPIDI_VC_STATE_INACTIVE_CLOSED)
         goto fn_exit;
 
-    if (VC_CH(vc)->is_local) {
+    if (vc->ch.is_local) {
         MPIU_DBG_MSG(CH3_DISCONNECT, TYPICAL, "VC is local");
 
         if (vc->state != MPIDI_VC_STATE_CLOSED) {
@@ -1055,7 +1055,7 @@
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_pkt_netmod_t * const netmod_pkt = (MPID_nem_pkt_netmod_t *)pkt;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_PKT_NETMOD_HANDLER);
 
     MPIDI_FUNC_ENTER(MPID_STATE_PKT_NETMOD_HANDLER);
@@ -1193,7 +1193,7 @@
             goto fn_exit;
 
         /* don't enqueue non-local processes */
-        if (!VC_CH(vc)->is_local)
+        if (!vc->ch.is_local)
             goto fn_exit;
 
         /* Translate the communicator rank to a local rank.  Note that there is an
@@ -1239,7 +1239,7 @@
         /* don't use MPID_NEM_IS_LOCAL, it doesn't handle dynamic processes */
         MPIDI_Comm_get_vc(rreq->comm, rreq->dev.match.parts.rank, &vc);
         MPIU_Assert(vc != NULL);
-        if (!VC_CH(vc)->is_local)
+        if (!vc->ch.is_local)
             goto fn_exit;
 
         /* Translate the communicator rank to a local rank.  Note that there is an

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -418,7 +418,7 @@
             continue;
        
         MPIDI_PG_Get_vc_set_active(MPIDI_Process.my_pg, i, &vc);
-        vc_ch = VC_CH(vc);
+        vc_ch = &vc->ch;
 
         MPIDI_Pkt_init(ckpt_pkt, MPIDI_NEM_PKT_CKPT_MARKER);
         ckpt_pkt->wave = current_wave;
@@ -488,7 +488,7 @@
                 continue;
 
             MPIDI_PG_Get_vc(MPIDI_Process.my_pg, i, &vc);
-            vc_ch = VC_CH(vc);
+            vc_ch = &vc->ch;
             if (!vc_ch->is_local) {
                 mpi_errno = vc_ch->ckpt_continue_vc(vc);
                 if (mpi_errno) MPIU_ERR_POP(mpi_errno);

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_debug.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -61,7 +61,7 @@
 {
     MPID_Request * sreq;
     int i;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
 
     fprintf(stream, "..VC ptr=%p pg_rank=%d state=%s:\n", vc, vc->pg_rank, vc_state_to_str(vc->state));
     if (vc_ch->is_local) {

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -360,7 +360,7 @@
 MPID_nem_vc_init (MPIDI_VC_t *vc)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIU_CHKPMEM_DECL(1);
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_VC_INIT);
 
@@ -542,7 +542,7 @@
 MPID_nem_vc_destroy(MPIDI_VC_t *vc)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_VC_DESTROY);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_VC_DESTROY);

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -77,7 +77,7 @@
     MPIDI_Comm_get_vc_set_active(comm, rank, &vc);
 
     /* if the lmt functions are not set, fall back to the default rendezvous code */
-    if (VC_CH(vc)->lmt_initiate_lmt == NULL)
+    if (vc->ch.lmt_initiate_lmt == NULL)
     {
         mpi_errno = MPIDI_CH3_RndvSend(sreq_p, buf, count, datatype, dt_contig, data_sz, dt_true_lb, rank, tag, comm, context_offset);
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
@@ -101,7 +101,7 @@
     MPIDI_Request_set_seqnum(sreq, seqnum);
 
     MPIU_THREAD_CS_ENTER(LMT,);
-    mpi_errno = VC_CH(vc)->lmt_initiate_lmt(vc, &upkt.p, sreq);
+    mpi_errno = vc->ch.lmt_initiate_lmt(vc, &upkt.p, sreq);
     MPIU_THREAD_CS_EXIT(LMT,);
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
@@ -129,7 +129,7 @@
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LMT_RNDVRECV);
 
     /* if the lmt functions are not set, fall back to the default rendezvous code */
-    if (VC_CH(vc)->lmt_initiate_lmt == NULL)
+    if (vc->ch.lmt_initiate_lmt == NULL)
     {
         mpi_errno = MPIDI_CH3_RecvRndv(vc, rreq);
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
@@ -308,7 +308,7 @@
             sreq->ch.lmt_tmp_cookie.MPID_IOV_BUF = data_buf;
             sreq->ch.lmt_tmp_cookie.MPID_IOV_LEN = cts_pkt->cookie_len;
             MPIU_THREAD_CS_ENTER(LMT,);
-            mpi_errno = VC_CH(vc)->lmt_start_send(vc, sreq, sreq->ch.lmt_tmp_cookie);
+            mpi_errno = vc->ch.lmt_start_send(vc, sreq, sreq->ch.lmt_tmp_cookie);
             MPIU_THREAD_CS_EXIT(LMT,);
             if (mpi_errno) MPIU_ERR_POP (mpi_errno);
             sreq->ch.lmt_tmp_cookie.MPID_IOV_LEN = 0;
@@ -338,7 +338,7 @@
     {
         MPID_IOV cookie = {0,0};
         MPIU_THREAD_CS_ENTER(LMT,);
-        mpi_errno = VC_CH(vc)->lmt_start_send(vc, sreq, cookie);
+        mpi_errno = vc->ch.lmt_start_send(vc, sreq, cookie);
         MPIU_THREAD_CS_EXIT(LMT,);
         if (mpi_errno) MPIU_ERR_POP (mpi_errno);
         *buflen = sizeof(MPIDI_CH3_Pkt_t);
@@ -375,14 +375,14 @@
     switch (MPIDI_Request_get_type(req))
     {
     case MPIDI_REQUEST_TYPE_RECV:
-        mpi_errno = VC_CH(vc)->lmt_done_recv(vc, req);
+        mpi_errno = vc->ch.lmt_done_recv(vc, req);
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
         break;
     case MPIDI_REQUEST_TYPE_SEND:
     case MPIDI_REQUEST_TYPE_RSEND:
     case MPIDI_REQUEST_TYPE_SSEND:
     case MPIDI_REQUEST_TYPE_BSEND:
-        mpi_errno = VC_CH(vc)->lmt_done_send(vc, req);
+        mpi_errno = vc->ch.lmt_done_send(vc, req);
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
         break;
     default:
@@ -439,7 +439,7 @@
             cookie.MPID_IOV_BUF = data_buf;
             cookie.MPID_IOV_LEN = cookie_pkt->cookie_len;
             MPIU_THREAD_CS_ENTER(LMT,);
-            mpi_errno = VC_CH(vc)->lmt_handle_cookie(vc, req, cookie);
+            mpi_errno = vc->ch.lmt_handle_cookie(vc, req, cookie);
             MPIU_THREAD_CS_EXIT(LMT,);
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
@@ -469,7 +469,7 @@
         MPID_IOV cookie = {0,0};
 
         MPIU_THREAD_CS_ENTER(LMT,);
-        mpi_errno = VC_CH(vc)->lmt_handle_cookie(vc, req, cookie);
+        mpi_errno = vc->ch.lmt_handle_cookie(vc, req, cookie);
         MPIU_THREAD_CS_EXIT(LMT,);
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
         *buflen = sizeof(MPIDI_CH3_Pkt_t);
@@ -515,7 +515,7 @@
     s_cookie = rreq->ch.lmt_tmp_cookie;
 
     MPIU_THREAD_CS_ENTER(LMT,);
-    mpi_errno = VC_CH(vc)->lmt_start_recv(vc, rreq, s_cookie);
+    mpi_errno = vc->ch.lmt_start_recv(vc, rreq, s_cookie);
     MPIU_THREAD_CS_EXIT(LMT,);
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
@@ -551,7 +551,7 @@
     r_cookie = sreq->ch.lmt_tmp_cookie;
 
     MPIU_THREAD_CS_ENTER(LMT,);
-    mpi_errno = VC_CH(vc)->lmt_start_send(vc, sreq, r_cookie);
+    mpi_errno = vc->ch.lmt_start_send(vc, sreq, r_cookie);
     MPIU_THREAD_CS_EXIT(LMT,);
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
@@ -584,7 +584,7 @@
     cookie = req->ch.lmt_tmp_cookie;
 
     MPIU_THREAD_CS_ENTER(LMT,);
-    mpi_errno = VC_CH(vc)->lmt_handle_cookie(vc, req, cookie);
+    mpi_errno = vc->ch.lmt_handle_cookie(vc, req, cookie);
     MPIU_THREAD_CS_EXIT(LMT,);
     if (mpi_errno) MPIU_ERR_POP (mpi_errno);
 

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -167,7 +167,7 @@
     MPIU_CHKPMEM_DECL(2);
     MPID_nem_lmt_shm_wait_element_t *e;
     int queue_initially_empty;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     char *ser_lmt_copy_buf_handle=NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_START_RECV);
 
@@ -246,7 +246,7 @@
     int done = FALSE;
     int queue_initially_empty;
     MPID_nem_lmt_shm_wait_element_t *e;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIU_CHKPMEM_DECL(3);
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_START_SEND);
 
@@ -334,7 +334,7 @@
 static int get_next_req(MPIDI_VC_t *vc)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPID_nem_copy_buf_t * const copy_buf = vc_ch->lmt_copy_buf;
     int prev_owner_rank;
     MPID_Request *req;
@@ -442,7 +442,7 @@
 static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPID_nem_copy_buf_t * const copy_buf = vc_ch->lmt_copy_buf;
     MPIDI_msg_sz_t first;
     MPIDI_msg_sz_t last;
@@ -529,7 +529,7 @@
 static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPID_nem_copy_buf_t * const copy_buf = vc_ch->lmt_copy_buf;
     MPIDI_msg_sz_t first;
     MPIDI_msg_sz_t last, expected_last;
@@ -702,7 +702,7 @@
     int mpi_errno = MPI_SUCCESS;
     int done_req = FALSE;
     MPID_nem_lmt_shm_wait_element_t *we;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_LMT_SHM_PROGRESS_VC);
 
     MPIDI_FUNC_ENTER(MPID_STATE_LMT_SHM_PROGRESS_VC);
@@ -769,10 +769,10 @@
         if (done)
         {
             lmt_shm_prog_element_t *f;
-            MPIU_Assert(LMT_SHM_Q_EMPTY(VC_CH(pe->vc)->lmt_queue));
-            MPIU_Assert(VC_CH(pe->vc)->lmt_active_lmt == NULL);
-            MPIU_Assert(VC_CH(pe->vc)->lmt_enqueued);
-            VC_CH(pe->vc)->lmt_enqueued = FALSE;
+            MPIU_Assert(LMT_SHM_Q_EMPTY(pe->vc->ch.lmt_queue));
+            MPIU_Assert(pe->vc->ch.lmt_active_lmt == NULL);
+            MPIU_Assert(pe->vc->ch.lmt_enqueued);
+            pe->vc->ch.lmt_enqueued = FALSE;
 
             f = pe;
             pe = pe->next;
@@ -800,7 +800,7 @@
 int MPID_nem_lmt_shm_vc_terminated(MPIDI_VC_t *vc)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPID_nem_lmt_shm_wait_element_t *we;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_VC_TERMINATED);
 

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -176,7 +176,7 @@
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_pkt_lmt_rts_t * const rts_pkt = (MPID_nem_pkt_lmt_rts_t *)pkt;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     int complete = 0;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_INITIATE_LMT);
 
@@ -186,7 +186,7 @@
     if (vc_ch->lmt_copy_buf_handle == NULL) {
         int err;
         char *pipe_name;
-        MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+        MPIDI_CH3I_VC *vc_ch = &vc->ch;
 
         pipe_name = tempnam(NULL, "lmt_");
         MPIU_ERR_CHKANDJUMP2(!pipe_name, mpi_errno, MPI_ERR_OTHER, "**tempnam",
@@ -258,7 +258,7 @@
     int i;
     int complete = 0;
     struct lmt_vmsplice_node *node = NULL;
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
     int pipe_fd;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_START_RECV);
 
@@ -382,7 +382,7 @@
     int complete;
     struct lmt_vmsplice_node *node = NULL;
     int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
-    MPIDI_CH3I_VC *vc_ch = VC_CH(vc);
+    MPIDI_CH3I_VC *vc_ch = &vc->ch;
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LMT_VMSPLICE_START_SEND);
 

Modified: mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -131,7 +131,7 @@
         iov_data_copied += data_iov[i].MPID_IOV_LEN;
     }
 
-    mpi_errno = VC_CH(vc)->iSendContig(vc, sreq, iov[0].MPID_IOV_BUF, iov[0].MPID_IOV_LEN, sreq->dev.tmpbuf, data_sz);
+    mpi_errno = vc->ch.iSendContig(vc, sreq, iov[0].MPID_IOV_BUF, iov[0].MPID_IOV_LEN, sreq->dev.tmpbuf, data_sz);
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
     *sreq_ptr = sreq;

Modified: mpich2/trunk/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -10,17 +10,6 @@
 #include "mpidimpl.h"
 #include "ch3usock.h"
 
-/* Define the channel-private data structures; these are overlaid on the
-   channel_private scratchpads */
-typedef struct MPIDI_CH3I_VC
-{
-    struct MPID_Request * sendq_head;
-    struct MPID_Request * sendq_tail;
-    MPIDI_CH3I_VC_state_t state;
-    struct MPIDU_Sock *sock;
-    struct MPIDI_CH3I_Connection * conn;
-}
-MPIDI_CH3I_VC;
 
 /* This is all socket connection definitions */
 

Modified: mpich2/trunk/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -40,6 +40,19 @@
 }
 MPIDI_CH3I_VC_state_t;
 
+/* channel-specific fields for the VC structure */
+typedef struct MPIDI_CH3I_VC
+{
+    struct MPID_Request * sendq_head;
+    struct MPID_Request * sendq_tail;
+    MPIDI_CH3I_VC_state_t state;
+    struct MPIDU_Sock *sock;
+    struct MPIDI_CH3I_Connection * conn;
+}
+MPIDI_CH3I_VC;
+
+#define MPIDI_CH3_VC_DECL struct MPIDI_CH3I_VC ch;
+
 /*
  * MPIDI_CH3_REQUEST_DECL (additions to MPID_Request)
  * The socket channel makes no additions

Modified: mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_init.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_init.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_init.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -73,7 +73,7 @@
 
 /* Perform the channel-specific vc initialization */
 int MPIDI_CH3_VC_Init( MPIDI_VC_t *vc ) {
-    MPIDI_CH3I_VC *vcch = (MPIDI_CH3I_VC *)vc->channel_private;
+    MPIDI_CH3I_VC *vcch = &vc->ch;
     vcch->sendq_head         = NULL;
     vcch->sendq_tail         = NULL;
     vcch->state              = MPIDI_CH3I_VC_STATE_UNCONNECTED;

Modified: mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_isend.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_isend.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_isend.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -33,7 +33,7 @@
 {
     int mpi_errno = MPI_SUCCESS;
     int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
-    MPIDI_CH3I_VC *vcch = (MPIDI_CH3I_VC *)vc->channel_private;
+    MPIDI_CH3I_VC *vcch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_ISEND);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_ISEND);

Modified: mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_isendv.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_isendv.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_isendv.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -44,7 +44,7 @@
 		     MPID_IOV * iov, int n_iov)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vcch = (MPIDI_CH3I_VC *)vc->channel_private;
+    MPIDI_CH3I_VC *vcch = &vc->ch;
     int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_ISENDV);
 

Modified: mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -53,7 +53,7 @@
 			MPID_Request ** sreq_ptr)
 {
     MPID_Request * sreq = NULL;
-    MPIDI_CH3I_VC *vcch = (MPIDI_CH3I_VC *)vc->channel_private;
+    MPIDI_CH3I_VC *vcch = &vc->ch;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_ISTARTMSG);
 

Modified: mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -77,7 +77,7 @@
 			 MPID_Request ** sreq_ptr)
 {
     MPID_Request * sreq = NULL;
-    MPIDI_CH3I_VC *vcch = (MPIDI_CH3I_VC *)vc->channel_private;
+    MPIDI_CH3I_VC *vcch = &vc->ch;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_ISTARTMSGV);
 

Modified: mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_progress.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_progress.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/channels/sock/src/ch3_progress.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -264,7 +264,7 @@
 int MPIDI_CH3_Connection_terminate(MPIDI_VC_t * vc)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vcch = (MPIDI_CH3I_VC *)vc->channel_private;
+    MPIDI_CH3I_VC *vcch = &vc->ch;
 
     MPIU_DBG_CONNSTATECHANGE(vc,vcch->conn,CONN_STATE_CLOSING);
     vcch->conn->state = CONN_STATE_CLOSING;
@@ -742,7 +742,7 @@
 static inline int connection_pop_sendq_req(MPIDI_CH3I_Connection_t * conn)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vcch = (MPIDI_CH3I_VC *)conn->vc->channel_private;
+    MPIDI_CH3I_VC *vcch = &conn->vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_CONNECTION_POP_SENDQ_REQ);
 
 

Modified: mpich2/trunk/src/mpid/ch3/include/mpidimpl.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/include/mpidimpl.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/include/mpidimpl.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -796,20 +796,6 @@
     MPIDI_Comm_ops_t *comm_ops;
 #endif
 
-    /* Rather than have each channel define its own fields for the 
-       channel-specific data, we provide a fixed-sized scratchpad.  Currently,
-       this has a very generous size, though this may shrink later (a channel
-       can always allocate storage and hang it off of the end).  This 
-       is necessary to allow dynamic loading of channels at MPI_Init time. */
-    /* The ssm channel needed a *huge* space for the VC.  But now that it's
-       gone, we need to determine the appropriate smaller size to use instead. */
-    /* Note also that for dynamically-loaded channels, the VCs must all be the
-       same size, so MPIDI_CH3_VC_SIZE should not be overridden when building
-       multiple channels that will be used together */
-#ifndef MPIDI_CH3_VC_SIZE
-#define MPIDI_CH3_VC_SIZE 256
-#endif
-    int32_t channel_private[MPIDI_CH3_VC_SIZE];
 # if defined(MPIDI_CH3_VC_DECL)
     MPIDI_CH3_VC_DECL
 # endif
@@ -1823,18 +1809,6 @@
 int MPIDI_CH3_PktHandler_EndCH3( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
 				 MPIDI_msg_sz_t *, MPID_Request ** );
 
-/* PktHandler function:
-   vc  (INPUT) -- vc on which the packet was received
-   pkt (INPUT) -- pointer to packet header at beginning of receive buffer
-   buflen (I/O) -- IN: number of bytes received into receive buffer
-                   OUT: number of bytes processed by the handler function
-   req (OUTPUT) -- NULL, if the whole message has been processed by the handler
-                   function, otherwise, pointer to the receive request for this
-                   message.  The IOV will be set describing where the rest of the
-                   message should be received.
-*/
-typedef int MPIDI_CH3_PktHandler_Fcn(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-				     MPIDI_msg_sz_t *buflen, MPID_Request **req );
 int MPIDI_CH3_PktHandler_Init( MPIDI_CH3_PktHandler_Fcn *[], int );
 
 #ifdef MPICH_DBG_OUTPUT

Modified: mpich2/trunk/src/mpid/ch3/include/mpidpre.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/include/mpidpre.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/include/mpidpre.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -26,6 +26,24 @@
 /* FIXME: Include here? */
 #include "opa_primitives.h"
 
+union MPIDI_CH3_Pkt;
+struct MPIDI_VC;
+struct MPID_Request;
+
+/* PktHandler function:
+   vc  (INPUT) -- vc on which the packet was received
+   pkt (INPUT) -- pointer to packet header at beginning of receive buffer
+   buflen (I/O) -- IN: number of bytes received into receive buffer
+                   OUT: number of bytes processed by the handler function
+   req (OUTPUT) -- NULL, if the whole message has been processed by the handler
+                   function, otherwise, pointer to the receive request for this
+                   message.  The IOV will be set describing where the rest of the
+                   message should be received.
+   (This decl needs to come before mpidi_ch3_pre.h)
+*/
+typedef int MPIDI_CH3_PktHandler_Fcn(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *pkt,
+				     MPIDI_msg_sz_t *buflen, struct MPID_Request **req );
+
 /* Include definitions from the channel which must exist before items in this 
    file (mpidpre.h) or the file it includes (mpiimpl.h) can be defined. */
 #include "mpidi_ch3_pre.h"

Modified: mpich2/trunk/src/mpid/ch3/util/sock/ch3u_connect_sock.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/util/sock/ch3u_connect_sock.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/util/sock/ch3u_connect_sock.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -270,7 +270,7 @@
     {
 	MPIDI_CH3I_Pkt_sc_conn_accept_t *acceptpkt = 
 	    (MPIDI_CH3I_Pkt_sc_conn_accept_t *)&conn->pkt.type;
-    	vcch = VC_CH(vc);
+    	vcch = &vc->ch;
 	vcch->sock = conn->sock;
         vcch->conn = conn;
         vcch->state = MPIDI_CH3I_VC_STATE_CONNECTING;
@@ -303,7 +303,7 @@
         {
 	    MPIU_ERR_POP(mpi_errno);
 	}
-    	vcch = VC_CH(vc);
+    	vcch = &vc->ch;
         vcch->state = MPIDI_CH3I_VC_STATE_FAILED;
         MPIU_Free(conn);
         goto fn_fail;
@@ -659,7 +659,7 @@
 	    MPIU_Assert(conn->send_active == NULL);
 	    MPIU_Assert(conn->recv_active == NULL);
 	    if (conn->vc != NULL) {
-		MPIDI_CH3I_VC *vcch = VC_CH(conn->vc);
+		MPIDI_CH3I_VC *vcch = &conn->vc->ch;
 
                 conn->sock = MPIDU_SOCK_INVALID_SOCK;
                 MPIU_DBG_CONNSTATECHANGE(conn->vc,conn,CONN_STATE_CLOSED);
@@ -757,7 +757,7 @@
 
 	MPIDI_VC_Init(vc, NULL, 0);
 
-	vcch = VC_CH(vc);
+	vcch = &vc->ch;
 	MPIU_DBG_VCCHSTATECHANGE(vc,VC_STATE_CONNECTING);
 	vcch->state = MPIDI_CH3I_VC_STATE_CONNECTING;
 	vcch->sock = conn->sock;
@@ -787,7 +787,7 @@
 	/* FIXME: is this the correct assert? */
 	MPIU_Assert( conn->state == CONN_STATE_OPEN_CRECV );
 	if (openpkt->ack) {
-	    MPIDI_CH3I_VC *vcch = VC_CH(conn->vc);
+	    MPIDI_CH3I_VC *vcch = &conn->vc->ch;
 	    MPIU_DBG_CONNSTATECHANGE(conn->vc,conn,CONN_STATE_CONNECTED);
 	    conn->state = CONN_STATE_CONNECTED;
 	    vcch->state = MPIDI_CH3I_VC_STATE_CONNECTED;
@@ -805,7 +805,7 @@
 	    }
 	}
 	else {
-	    MPIDI_CH3I_VC *vcch = VC_CH(conn->vc);
+	    MPIDI_CH3I_VC *vcch = &conn->vc->ch;
 	    /* FIXME: Should conn->vc be freed? Who allocated? Why not? */
 	    /* FIXME: Should probably reduce ref count on conn->vc */
 	    /* FIXME: What happens to the state of the associated VC? 
@@ -881,7 +881,7 @@
     MPIDI_PG_Get_vc_set_active(pg, pg_rank, &vc);
     MPIU_Assert(vc->pg_rank == pg_rank);
     
-    vcch = VC_CH(vc);
+    vcch = &vc->ch;
     if (vcch->conn == NULL) {
 	/* no head-to-head connects, accept the connection */
 	MPIU_DBG_VCCHSTATECHANGE(vc,VC_STATE_CONNECTING);
@@ -988,7 +988,7 @@
 	    (MPIDI_CH3I_Pkt_sc_open_resp_t *)&conn->pkt.type;
 	/* finished sending open response packet */
 	if (openresp->ack == TRUE) {
-	    MPIDI_CH3I_VC *vcch = VC_CH(conn->vc);
+	    MPIDI_CH3I_VC *vcch = &conn->vc->ch;
 	    /* post receive for packet header */
 	    MPIU_DBG_CONNSTATECHANGE(conn->vc,conn,CONN_STATE_CONNECTED);
 	    conn->state = CONN_STATE_CONNECTED;
@@ -1043,7 +1043,7 @@
 {
     int mpi_errno = MPI_SUCCESS;
     char val[MPIDI_MAX_KVS_VALUE_LEN];
-    MPIDI_CH3I_VC *vcch = VC_CH(vc);
+    MPIDI_CH3I_VC *vcch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_VC_POST_SOCKCONNECT);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_VC_POST_SOCKCONNECT);
@@ -1116,7 +1116,7 @@
     int hasIfaddr = 0, port;
     MPIDI_CH3I_Connection_t * conn = 0;
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vcch = VC_CH(vc);
+    MPIDI_CH3I_VC *vcch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SOCK_CONNECT);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SOCK_CONNECT);
@@ -1294,7 +1294,7 @@
 static int connection_post_sendq_req(MPIDI_CH3I_Connection_t * conn)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_CH3I_VC *vcch = VC_CH(conn->vc);
+    MPIDI_CH3I_VC *vcch = &conn->vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_CONNECTION_POST_SENDQ_REQ);
 
     MPIDI_FUNC_ENTER(MPID_STATE_CONNECTION_POST_SENDQ_REQ);
@@ -1345,7 +1345,7 @@
 {
     const char *name = "unknown";
     static char asdigits[20];
-    MPIDI_CH3I_VC *vcch = VC_CH(vc);
+    MPIDI_CH3I_VC *vcch = &vc->ch;
     int    state = vcch->state;
     
     switch (state) {

Modified: mpich2/trunk/src/mpid/ch3/util/sock/ch3u_init_sock.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/util/sock/ch3u_init_sock.c	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/util/sock/ch3u_init_sock.c	2012-12-17 19:13:28 UTC (rev 10770)
@@ -61,7 +61,7 @@
     /* FIXME: Why isn't this MPIDI_VC_Init( vc, NULL, 0 )? */
     for (p = 0; p < pg_size; p++)
     {
-	MPIDI_CH3I_VC *vcch = (MPIDI_CH3I_VC *)pg_p->vct[p].channel_private;
+	MPIDI_CH3I_VC *vcch = &pg_p->vct[p].ch;
 	vcch->sendq_head = NULL;
 	vcch->sendq_tail = NULL;
 	vcch->state      = MPIDI_CH3I_VC_STATE_UNCONNECTED;
@@ -95,7 +95,7 @@
 /* This routine initializes Sock-specific elements of the VC */
 int MPIDI_VC_InitSock( MPIDI_VC_t *vc ) 
 {
-    MPIDI_CH3I_VC *vcch = VC_CH(vc);
+    MPIDI_CH3I_VC *vcch = &vc->ch;
     vcch->sock               = MPIDU_SOCK_INVALID_SOCK;
     vcch->conn               = NULL;
     return 0;

Modified: mpich2/trunk/src/mpid/ch3/util/sock/ch3usock.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/util/sock/ch3usock.h	2012-12-15 21:49:05 UTC (rev 10769)
+++ mpich2/trunk/src/mpid/ch3/util/sock/ch3usock.h	2012-12-17 19:13:28 UTC (rev 10770)
@@ -75,7 +75,4 @@
 int MPIDU_CH3I_SetupListener( MPIDU_Sock_set_t );
 int MPIDU_CH3I_ShutdownListener( void );
 
-/* macro to access the channel_private fields in the vc */
-#define VC_CH(vc) ((MPIDI_CH3I_VC *)(vc)->channel_private)
-
 #endif



More information about the commits mailing list