[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-201-ge0e55b7

Service Account noreply at mpich.org
Thu Feb 18 11:25:37 CST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  e0e55b74047115b594681955ce12a50d0d65bedd (commit)
       via  5d1e0e91c33829272e066922d505dae1c6e2b5ff (commit)
       via  e42f060cbad66a42619e88b0122c481e48fc173f (commit)
      from  6fafa6da19a200a6aeb147e58cfadbece3ef6685 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/e0e55b74047115b594681955ce12a50d0d65bedd

commit e0e55b74047115b594681955ce12a50d0d65bedd
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Jan 27 20:52:12 2016 -0600

    Use (u)intptr_t instead of MPIU_(U)PINT.
    
    We now assume the availability of some C99 features in MPICH, including
    fixed-width integers.  Macros that were created in place of these
    capabilities can now be deleted.
    
    This patch also deletes the associated typedefs that simply point to the
    pointer types, such as MPIDI_msg_sz_t.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/configure.ac b/configure.ac
index ff936cf..0c2a789 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4722,49 +4722,6 @@ if test "$ac_cv_sizeof_int" = "$aint_size" ; then
     AC_DEFINE(SIZEOF_INT_IS_AINT,1,[define if sizeof(int) = sizeof(MPI_Aint)])
 fi
 
-# Find a pointer-sized int
-for type in int long long_long short ; do
-    eval len=\$ac_cv_sizeof_$type
-    if test "$len" = "$ac_cv_sizeof_void_p" ; then
-        case $type in
-            int)
-                MPIU_PINT_FMT_DEC_SPEC="\"%d\""
-                MPIU_UPINT_FMT_DEC_SPEC="\"%u\""
-                ;;
-            long)
-                MPIU_PINT_FMT_DEC_SPEC="\"%ld\""
-                MPIU_UPINT_FMT_DEC_SPEC="\"%lu\""
-                ;;
-            long_long)
-                MPIU_PINT_FMT_DEC_SPEC="\"%lld\""
-                MPIU_UPINT_FMT_DEC_SPEC="\"%llu\""
-                ;;
-            short)
-                MPIU_PINT_FMT_DEC_SPEC="\"%hd\""
-                MPIU_UPINT_FMT_DEC_SPEC="\"%hu\""
-                ;;
-            *)
-                AC_MSG_WARN([unable to determine format specifiers for MPIU_Pint, defaulting to int])
-                MPIU_PINT_FMT_DEC_SPEC="\"%d\""
-                MPIU_UPINT_FMT_DEC_SPEC="\"%u\""
-            ;;
-        esac
-        MPIU_PINT=`echo $type | sed -e 's/_/ /'`
-        break
-    fi
-done
-AC_DEFINE_UNQUOTED(MPIU_Pint,$MPIU_PINT,[MPIU_Pint is a pointer-sized integer])
-# allow @MPIU_PINT@ substitution in glue_romio.h
-AC_SUBST([MPIU_PINT])
-
-AC_DEFINE_UNQUOTED(MPIU_PINT_FMT_DEC_SPEC,
-    $MPIU_PINT_FMT_DEC_SPEC,[MPIU_PINT_FMT_DEC_SPEC is the format
-    specifier for printing Pint as a decimal])
-AC_DEFINE_UNQUOTED(MPIU_Upint,unsigned $MPIU_PINT,[MPIU_Upint is an unsigned pointer-sized integer])
-AC_DEFINE_UNQUOTED(MPIU_UPINT_FMT_DEC_SPEC,
-    $MPIU_UPINT_FMT_DEC_SPEC,[MPIU_UPINT_FMT_DEC_SPEC is the format
-    specifier for printing Upint as a decimal])
-
 # ----------------------------------------------------------------------------
 # MPI_AINT datatype
 # ----------------------------------------------------------------------------
diff --git a/src/binding/fortran/mpif_h/buildiface b/src/binding/fortran/mpif_h/buildiface
index 488fb43..596835c 100755
--- a/src/binding/fortran/mpif_h/buildiface
+++ b/src/binding/fortran/mpif_h/buildiface
@@ -2363,7 +2363,7 @@ sub handle_array_in_arg {
 # where an address is larger than an MPI_Fint.  This is correct; these
 # routines are for the MPI-1 routines that use an MPI_Fint where the 
 # C code uses a void * (MPI_Aint in MPI-2).  
-# Instead of using MPI_Aint, we use MPIU_Pint.  This allows the MPI 
+# Instead of using MPI_Aint, we use intptr_t.  This allows the MPI
 # implementation to set MPI_Aint to be *larger* than a pointer-sized-int,
 # which is needed (as a temporary workaround) on systems like Blue Gene, which 
 # have 4 byte pointers but file systems that need 8 byte datatypes (not just 
@@ -2380,7 +2380,7 @@ sub addrint_in_decl {
 }
 sub addrint_in_arg {
     my $count = $_[0];
-    print $OUTFD "(void *)((MPIU_Pint)*(MPI_Fint *)v$count)";
+    print $OUTFD "(void *)((intptr_t)*(MPI_Fint *)v$count)";
 }
 
 sub attrint_ctof {
@@ -2399,7 +2399,7 @@ sub attrint_ctof {
         *(MPI_Fint*)$cvar = 0;
     }
     else {
-        *(MPI_Fint*)$cvar = (MPI_Fint)(MPIU_Pint)attr$cvar;
+        *(MPI_Fint*)$cvar = (MPI_Fint)(intptr_t)attr$cvar;
     }\n";
 }
 
diff --git a/src/include/glue_romio.h.in b/src/include/glue_romio.h.in
index 3dbe5e0..0acc5bd 100644
--- a/src/include/glue_romio.h.in
+++ b/src/include/glue_romio.h.in
@@ -7,11 +7,6 @@
 #ifndef GLUE_ROMIO_H_INCLUDED
 #define GLUE_ROMIO_H_INCLUDED
 
-/* TODO we should probaly eliminate this type entirely and just patch up the
- * environment so that intptr_t and uintptr_t always work. */
-#define MPIU_Pint @MPIU_PINT@
-#define MPIU_Upint unsigned @MPIU_PINT@
-
 int MPIR_Ext_assert_fail(const char *cond, const char *file_name, int line_num);
 
 #if (!defined(NDEBUG) && (@HAVE_ERROR_CHECKING@))
@@ -33,7 +28,7 @@ extern int MPIR_Ext_dbg_romio_verbose_enabled;
 /* a copy of MPIU_Ensure_Aint_fits_in_pointer for external use, slightly
  * modified to use ROMIO's version of the pointer-casting macro */
 #define MPIR_Ext_ensure_Aint_fits_in_pointer(aint) \
-  MPIR_Ext_assert((aint) == (MPI_Aint)(MPIU_Upint) ADIOI_AINT_CAST_TO_VOID_PTR(aint));
+  MPIR_Ext_assert((aint) == (MPI_Aint)(uintptr_t) ADIOI_AINT_CAST_TO_VOID_PTR(aint));
 
 /* to be called early by ROMIO's initialization process in order to setup init-time
  * glue code that cannot be initialized statically */
diff --git a/src/mpi/attr/attr_get.c b/src/mpi/attr/attr_get.c
index 77f8abc..019dddf 100644
--- a/src/mpi/attr/attr_get.c
+++ b/src/mpi/attr/attr_get.c
@@ -93,9 +93,9 @@ int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag)
             /* A common user error is to pass the address of a 4-byte
 	       int when the address of a pointer (or an address-sized int)
 	       should have been used.  We can test for this specific
-	       case.  Note that this code assumes sizeof(MPIU_Pint) is 
+	       case.  Note that this code assumes sizeof(intptr_t) is
 	       a power of 2. */
-            MPIR_ERR_CHKANDJUMP((MPIU_Pint)attribute_val & (sizeof(MPIU_Pint)-1),
+            MPIR_ERR_CHKANDJUMP((intptr_t)attribute_val & (sizeof(intptr_t)-1),
                                 mpi_errno,MPI_ERR_ARG,"**attrnotptr");
 #           endif
         }
diff --git a/src/mpi/attr/attrutil.c b/src/mpi/attr/attrutil.c
index b9abbe6..4f15057 100644
--- a/src/mpi/attr/attrutil.c
+++ b/src/mpi/attr/attrutil.c
@@ -91,7 +91,7 @@ int MPIR_Call_attr_delete( int handle, MPID_Attribute *attr_p )
                 handle,
                 attr_p->keyval->handle,
                 attr_p->attrType,
-                (void *)(MPIU_Pint)attr_p->value,
+                (void *)(intptr_t)attr_p->value,
                 attr_p->keyval->extra_state
                 );
     /* --BEGIN ERROR HANDLING-- */
@@ -149,7 +149,7 @@ int MPIR_Call_attr_copy( int handle, MPID_Attribute *attr_p, void** value_copy,
                 attr_p->keyval->handle,
                 attr_p->keyval->extra_state,
                 attr_p->attrType,
-                (void *)(MPIU_Pint)attr_p->value,
+                (void *)(intptr_t)attr_p->value,
                 value_copy,
                 flag
                 );
@@ -222,8 +222,8 @@ int MPIR_Attr_dup_list( int handle, MPID_Attribute *old_attrs,
         new_p->attrType         = p->attrType;
         new_p->pre_sentinal     = 0;
 	/* FIXME: This is not correct in some cases (size(MPI_Aint)>
-	 sizeof(MPIU_Pint)) */
-        new_p->value            = (MPID_AttrVal_t)(MPIU_Pint)new_value;
+	 sizeof(intptr_t)) */
+        new_p->value            = (MPID_AttrVal_t)(intptr_t)new_value;
         new_p->post_sentinal    = 0;
         new_p->next             = 0;
 
diff --git a/src/mpi/attr/comm_get_attr.c b/src/mpi/attr/comm_get_attr.c
index 74cebc1..400b4bf 100644
--- a/src/mpi/attr/comm_get_attr.c
+++ b/src/mpi/attr/comm_get_attr.c
@@ -61,9 +61,9 @@ int MPIR_CommGetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
             /* A common user error is to pass the address of a 4-byte
 	       int when the address of a pointer (or an address-sized int)
 	       should have been used.  We can test for this specific
-	       case.  Note that this code assumes sizeof(MPIU_Pint) is 
+	       case.  Note that this code assumes sizeof(intptr_t) is
 	       a power of 2. */
-	    if ((MPIU_Pint)attribute_val & (sizeof(MPIU_Pint)-1)) {
+	    if ((intptr_t)attribute_val & (sizeof(intptr_t)-1)) {
 		MPIR_ERR_SETANDSTMT(mpi_errno,MPI_ERR_ARG,goto fn_fail,"**attrnotptr");
 	    }
 #           endif
@@ -105,7 +105,7 @@ int MPIR_CommGetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
 	/* This is an address-sized int instead of a Fortran (MPI_Fint)
 	   integer because, even for the Fortran keyvals, the C interface is 
 	   used which stores the result in a pointer (hence we need a
-	   pointer-sized int).  Thus we use MPIU_Pint instead of MPI_Fint.
+	   pointer-sized int).  Thus we use intptr_t instead of MPI_Fint.
 	   On some 64-bit plaforms, such as Solaris-SPARC, using an MPI_Fint
 	   will cause the value to placed into the high, rather than low,
 	   end of the output value. */
@@ -203,7 +203,7 @@ int MPIR_CommGetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
 	   version of INTEGER (KIND=MPI_ADDRESS_KIND) ) */
 	if (*flag) {
             /* Use the internal pointer-sized-int for systems (e.g., BG/P)
-               that define MPI_Aint as a different size than MPIU_Pint.
+               that define MPI_Aint as a different size than intptr_t.
 	       The casts must be as they are:
 	       On the right, the value is a pointer to an int, so to 
 	       get the correct value, we need to extract the int.
@@ -212,12 +212,12 @@ int MPIR_CommGetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
 	    /* FIXME: This code is broken.  The MPIR_ATTR_INT is for Fortran
 	       MPI_Fint types, not int, and MPIR_ATTR_AINT is for Fortran
 	       INTEGER(KIND=MPI_ADDRESS_KIND), which is probably an MPI_Aint,
-	       and MPIU_Pint is for exactly the case where MPI_Aint is not
-	       the same as MPIU_Pint. 
+	       and intptr_t is for exactly the case where MPI_Aint is not
+	       the same as intptr_t.
 	       This code needs to be fixed in every place that it occurs 
 	       (i.e., see the win and type get_attr routines). */
 	    if (outAttrType == MPIR_ATTR_AINT)
-		*(MPIU_Pint*)attr_val_p = *(int*)*(void **)attr_val_p;
+		*(intptr_t*)attr_val_p = *(int*)*(void **)attr_val_p;
 	    else if (outAttrType == MPIR_ATTR_INT) {
 		/* *(int*)attr_val_p = *(int *)*(void **)attr_val_p;*/
                 /* This is correct, because the cooresponding code 
@@ -226,7 +226,7 @@ int MPIR_CommGetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
                    endian systems. Any changes made here must have
                    corresponding changes in src/binding/f77/attr_getf.c ,
                    which is generated by src/binding/f77/buildiface . */
-                *(MPIU_Pint*)attr_val_p = *(int*)*(void **)attr_val_p;
+                *(intptr_t*)attr_val_p = *(int*)*(void **)attr_val_p;
             }
 	}
     }
@@ -260,11 +260,11 @@ int MPIR_CommGetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
 			*(void**)attribute_val = &(p->value);
 		    }
 		    else {
-			*(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
+			*(void**)attribute_val = (void *)(intptr_t)(p->value);
 		    }
 		}
 		else {
-		    *(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
+		    *(void**)attribute_val = (void *)(intptr_t)(p->value);
                 }
 
 		break;
diff --git a/src/mpi/attr/comm_set_attr.c b/src/mpi/attr/comm_set_attr.c
index bca3a6e..3065901 100644
--- a/src/mpi/attr/comm_set_attr.c
+++ b/src/mpi/attr/comm_set_attr.c
@@ -59,13 +59,13 @@ int MPIR_Comm_set_attr_impl(MPID_Comm *comm_ptr, int comm_keyval, void *attribut
 	    }
 	    p->attrType = attrType;
 	    /* FIXME: This code is incorrect in some cases, particularly
-	       in the case where MPIU_Pint is different from MPI_Aint, 
+	       in the case where intptr_t is different from MPI_Aint,
 	       since in that case, the Fortran 9x interface will provide
 	       more bytes in the attribute_val than this allows. The 
 	       dual casts are a sign that this is faulty. This will 
 	       need to be fixed in the type/win set_attr routines as 
 	       well. */
-	    p->value    = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+	    p->value    = (MPID_AttrVal_t)(intptr_t)attribute_val;
 	    /* printf( "Updating attr at %x\n", &p->value ); */
 	    /* Does not change the reference count on the keyval */
 	    break;
@@ -81,7 +81,7 @@ int MPIR_Comm_set_attr_impl(MPID_Comm *comm_ptr, int comm_keyval, void *attribut
 	new_p->attrType      = attrType;
 	new_p->pre_sentinal  = 0;
 	/* FIXME: See the comment above on this dual cast. */
-	new_p->value	     = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+	new_p->value	     = (MPID_AttrVal_t)(intptr_t)attribute_val;
 	new_p->post_sentinal = 0;
 	new_p->next	     = comm_ptr->attributes;
 	MPIR_Keyval_add_ref( keyval_ptr );
diff --git a/src/mpi/attr/type_get_attr.c b/src/mpi/attr/type_get_attr.c
index a7d736a..8fe8060 100644
--- a/src/mpi/attr/type_get_attr.c
+++ b/src/mpi/attr/type_get_attr.c
@@ -56,9 +56,9 @@ int MPIR_TypeGetAttr( MPI_Datatype datatype, int type_keyval, void *attribute_va
             /* A common user error is to pass the address of a 4-byte
 	       int when the address of a pointer (or an address-sized int)
 	       should have been used.  We can test for this specific
-	       case.  Note that this code assumes sizeof(MPIU_Pint) is 
+	       case.  Note that this code assumes sizeof(intptr_t) is
 	       a power of 2. */
-	    if ((MPIU_Pint)attribute_val & (sizeof(MPIU_Pint)-1)) {
+	    if ((intptr_t)attribute_val & (sizeof(intptr_t)-1)) {
 		MPIR_ERR_SETANDSTMT(mpi_errno,MPI_ERR_ARG,goto fn_fail,"**attrnotptr");
 	    }
 #           endif
@@ -113,11 +113,11 @@ int MPIR_TypeGetAttr( MPI_Datatype datatype, int type_keyval, void *attribute_va
 		    *(void**)attribute_val = &(p->value);
 		}
 		else {
-		    *(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
+		    *(void**)attribute_val = (void *)(intptr_t)(p->value);
 		}
 	    }
 	    else
-		*(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
+		*(void**)attribute_val = (void *)(intptr_t)(p->value);
 	    
 	    break;
 	}
diff --git a/src/mpi/attr/type_set_attr.c b/src/mpi/attr/type_set_attr.c
index e36badd..6f94dae 100644
--- a/src/mpi/attr/type_set_attr.c
+++ b/src/mpi/attr/type_set_attr.c
@@ -95,7 +95,7 @@ int MPIR_TypeSetAttr(MPI_Datatype datatype, int type_keyval, void *attribute_val
 		goto fn_fail;
 	    }
 	    /* --END ERROR HANDLING-- */
-	    p->value    = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+	    p->value    = (MPID_AttrVal_t)(intptr_t)attribute_val;
 	    p->attrType = attrType;
 	    break;
 	}
@@ -106,7 +106,7 @@ int MPIR_TypeSetAttr(MPI_Datatype datatype, int type_keyval, void *attribute_val
 	    new_p->keyval	 = keyval_ptr;
 	    new_p->attrType      = attrType;
 	    new_p->pre_sentinal	 = 0;
-	    new_p->value	 = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+	    new_p->value	 = (MPID_AttrVal_t)(intptr_t)attribute_val;
 	    new_p->post_sentinal = 0;
 	    new_p->next		 = p->next;
 	    MPIR_Keyval_add_ref( keyval_ptr );
@@ -125,7 +125,7 @@ int MPIR_TypeSetAttr(MPI_Datatype datatype, int type_keyval, void *attribute_val
 	new_p->keyval	     = keyval_ptr;
 	new_p->attrType      = attrType;
 	new_p->pre_sentinal  = 0;
-	new_p->value	     = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+	new_p->value	     = (MPID_AttrVal_t)(intptr_t)attribute_val;
 	new_p->post_sentinal = 0;
 	new_p->next	     = 0;
 	MPIR_Keyval_add_ref( keyval_ptr );
diff --git a/src/mpi/attr/win_get_attr.c b/src/mpi/attr/win_get_attr.c
index bf0e94c..dbf4021 100644
--- a/src/mpi/attr/win_get_attr.c
+++ b/src/mpi/attr/win_get_attr.c
@@ -52,9 +52,9 @@ int MPIR_WinGetAttr( MPI_Win win, int win_keyval, void *attribute_val,
             /* A common user error is to pass the address of a 4-byte
 	       int when the address of a pointer (or an address-sized int)
 	       should have been used.  We can test for this specific
-	       case.  Note that this code assumes sizeof(MPIU_Pint) is
+	       case.  Note that this code assumes sizeof(intptr_t) is
 	       a power of 2. */
-	    if ((MPIU_Pint)attribute_val & (sizeof(MPIU_Pint)-1)) {
+	    if ((intptr_t)attribute_val & (sizeof(intptr_t)-1)) {
 		MPIR_ERR_SETANDSTMT(mpi_errno,MPI_ERR_ARG,goto fn_fail,"**attrnotptr");
 	    }
 #           endif
@@ -94,7 +94,7 @@ int MPIR_WinGetAttr( MPI_Win win, int win_keyval, void *attribute_val,
 #ifdef HAVE_FORTRAN_BINDING
 	/* Note that this routine only has a Fortran 90 binding,
 	   so the attribute value is an address-sized int */
-	MPIU_Pint  *attr_int = (MPIU_Pint *)attribute_val;
+	intptr_t  *attr_int = (intptr_t *)attribute_val;
 #endif
 	*flag = 1;
 
@@ -180,11 +180,11 @@ int MPIR_WinGetAttr( MPI_Win win, int win_keyval, void *attribute_val,
 			*(void**)attribute_val = &(p->value);
 		    }
 		    else {
-			*(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
+			*(void**)attribute_val = (void *)(intptr_t)(p->value);
 		    }
 		}
 		else
-		    *(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
+		    *(void**)attribute_val = (void *)(intptr_t)(p->value);
 		
 		break;
 	    }
diff --git a/src/mpi/attr/win_set_attr.c b/src/mpi/attr/win_set_attr.c
index 94d7dc0..66a425c 100644
--- a/src/mpi/attr/win_set_attr.c
+++ b/src/mpi/attr/win_set_attr.c
@@ -100,7 +100,7 @@ int MPIR_WinSetAttr( MPI_Win win, int win_keyval, void *attribute_val,
 		goto fn_fail;
 	    }
 	    /* --END ERROR HANDLING-- */
-	    p->value    = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+	    p->value    = (MPID_AttrVal_t)(intptr_t)attribute_val;
 	    p->attrType = attrType;
 	    /* Does not change the reference count on the keyval */
 	    break;
@@ -112,7 +112,7 @@ int MPIR_WinSetAttr( MPI_Win win, int win_keyval, void *attribute_val,
 	    new_p->keyval	 = keyval_ptr;
 	    new_p->attrType      = attrType;
 	    new_p->pre_sentinal	 = 0;
-	    new_p->value	 = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+	    new_p->value	 = (MPID_AttrVal_t)(intptr_t)attribute_val;
 	    new_p->post_sentinal = 0;
 	    new_p->next		 = p->next;
 	    MPIR_Keyval_add_ref( keyval_ptr );
@@ -131,7 +131,7 @@ int MPIR_WinSetAttr( MPI_Win win, int win_keyval, void *attribute_val,
 	new_p->attrType      = attrType;
 	new_p->keyval	     = keyval_ptr;
 	new_p->pre_sentinal  = 0;
-	new_p->value	     = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
+	new_p->value	     = (MPID_AttrVal_t)(intptr_t)attribute_val;
 	new_p->post_sentinal = 0;
 	new_p->next	     = 0;
 	MPIR_Keyval_add_ref( keyval_ptr );
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index b797e86..7fc4444 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -126,11 +126,11 @@ int MPIR_Localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtyp
     else
     {
 	char * buf;
-	MPIDI_msg_sz_t buf_off;
+	intptr_t buf_off;
 	MPID_Segment sseg;
-	MPIDI_msg_sz_t sfirst;
+	intptr_t sfirst;
 	MPID_Segment rseg;
-	MPIDI_msg_sz_t rfirst;
+	intptr_t rfirst;
 
         MPIU_CHKLMEM_MALLOC(buf, char *, COPY_BUFFER_SZ, mpi_errno, "buf");
 
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c
index 7d82fa2..c5719c9 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c
@@ -719,9 +719,9 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs,
 	    others_req[i].lens =
 		ADIOI_Malloc(count_others_req_per_proc[i]*sizeof(ADIO_Offset));
 
-	    if ( (MPIU_Upint)others_req[i].offsets < (MPIU_Upint)recvBufForOffsets )
+	    if ( (uintptr_t)others_req[i].offsets < (uintptr_t)recvBufForOffsets )
 		recvBufForOffsets = others_req[i].offsets;
-	    if ( (MPIU_Upint)others_req[i].lens < (MPIU_Upint)recvBufForLens )
+	    if ( (uintptr_t)others_req[i].lens < (uintptr_t)recvBufForLens )
 		recvBufForLens = others_req[i].lens;
 
 	    others_req[i].mem_ptrs = (MPI_Aint *)
@@ -750,13 +750,13 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs,
     for (i=0; i<nprocs; i++)
     {
 	if ( (my_req[i].count) &&
-	     ((MPIU_Upint)my_req[i].offsets <= (MPIU_Upint)sendBufForOffsets) )
+	     ((uintptr_t)my_req[i].offsets <= (uintptr_t)sendBufForOffsets) )
        {
 	  sendBufForOffsets = my_req[i].offsets;
     }
 
 	if ( (my_req[i].count) &&
-	     ((MPIU_Upint)my_req[i].lens <= (MPIU_Upint)sendBufForLens) )
+	     ((uintptr_t)my_req[i].lens <= (uintptr_t)sendBufForLens) )
        {
 	    sendBufForLens = my_req[i].lens;
       }
@@ -775,9 +775,9 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs,
 	    sdispls[i] = 0;
 	else
 	    sdispls[i] =  (int)
-	                ( ( (MPIU_Upint)my_req[i].offsets -
-			   (MPIU_Upint)sendBufForOffsets ) /
-			  (MPIU_Upint)sizeof(ADIO_Offset) );
+	                ( ( (uintptr_t)my_req[i].offsets -
+			   (uintptr_t)sendBufForOffsets ) /
+			  (uintptr_t)sizeof(ADIO_Offset) );
 
 	/* Receive these offsets from process i.*/
 	rcounts[i] = count_others_req_per_proc[i];
@@ -785,9 +785,9 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs,
 	    rdispls[i] = 0;
 	else
 	    rdispls[i] = (int)
-	                 ( ( (MPIU_Upint)others_req[i].offsets -
-			     (MPIU_Upint)recvBufForOffsets ) /
-			   (MPIU_Upint)sizeof(ADIO_Offset) );
+	                 ( ( (uintptr_t)others_req[i].offsets -
+			     (uintptr_t)recvBufForOffsets ) /
+			   (uintptr_t)sizeof(ADIO_Offset) );
     }
 
     /* Exchange the offsets */
@@ -809,9 +809,9 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs,
 	    sdispls[i] = 0;
 	else
 	  sdispls[i] = (int)
-	               ( ( (MPIU_Upint)my_req[i].lens -
-			   (MPIU_Upint)sendBufForLens ) /
-			 (MPIU_Upint) sizeof(ADIO_Offset) );
+	               ( ( (uintptr_t)my_req[i].lens -
+			   (uintptr_t)sendBufForLens ) /
+			 (uintptr_t) sizeof(ADIO_Offset) );
 
 	/* Receive these offsets from process i. */
 	rcounts[i] = count_others_req_per_proc[i];
@@ -819,9 +819,9 @@ void ADIOI_GPFS_Calc_others_req(ADIO_File fd, int count_my_req_procs,
 	    rdispls[i] = 0;
 	else
 	    rdispls[i] = (int)
-	                 ( ( (MPIU_Upint)others_req[i].lens -
-			     (MPIU_Upint)recvBufForLens ) /
-			   (MPIU_Upint) sizeof(ADIO_Offset) );
+	                 ( ( (uintptr_t)others_req[i].lens -
+			     (uintptr_t)recvBufForLens ) /
+			   (uintptr_t) sizeof(ADIO_Offset) );
     }
 
     /* Exchange the lengths */
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
index e5c23b7..d504836 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
@@ -692,7 +692,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype
 		    }
 		    if (req_off < real_off + real_size) {
 			count[i]++;
-      ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf)+req_off-real_off) == (ADIO_Offset)(MPIU_Upint)(read_buf+req_off-real_off));
+      ADIOI_Assert((((ADIO_Offset)(uintptr_t)read_buf)+req_off-real_off) == (ADIO_Offset)(uintptr_t)(read_buf+req_off-real_off));
 			MPI_Address(read_buf+req_off-real_off, 
                                &(others_req[i].mem_ptrs[j]));
       ADIOI_Assert((real_off + real_size - req_off) == (int)(real_off + real_size - req_off));
@@ -776,7 +776,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype
 
 	if (for_next_iter) {
 	    tmp_buf = (char *) ADIOI_Malloc(for_next_iter);
-      ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(MPIU_Upint)(read_buf+real_size-for_next_iter));
+      ADIOI_Assert((((ADIO_Offset)(uintptr_t)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(uintptr_t)(read_buf+real_size-for_next_iter));
       ADIOI_Assert((for_next_iter+coll_bufsize) == (size_t)(for_next_iter+coll_bufsize));
 	    memcpy(tmp_buf, read_buf+real_size-for_next_iter, for_next_iter);
 	    ADIOI_Free(fd->io_buf);
@@ -991,7 +991,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node
 { \
     while (size) { \
 	size_in_buf = MPL_MIN(size, flat_buf_sz); \
-  ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)(buf + user_buf_idx)); \
+  ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + user_buf_idx) == (ADIO_Offset)(uintptr_t)(buf + user_buf_idx)); \
   ADIOI_Assert(size_in_buf == (size_t)size_in_buf); \
 	memcpy(((char *) buf) + user_buf_idx, \
 	       &(recv_buf[p][recv_buf_idx[p]]), size_in_buf); \
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
index 19eff8e..f39e4dc 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
@@ -822,7 +822,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype
 		    }
 		    if (req_off < off + size) {
 			count[i]++;
-      ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIU_Upint)(write_buf+req_off-off));
+      ADIOI_Assert((((ADIO_Offset)(uintptr_t)write_buf)+req_off-off) == (ADIO_Offset)(uintptr_t)(write_buf+req_off-off));
 			MPI_Address(write_buf+req_off-off, 
                                &(others_req[i].mem_ptrs[j]));
       ADIOI_Assert((off + size - req_off) == (int)(off + size - req_off));
@@ -1268,7 +1268,7 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf
 { \
     while (size) { \
         size_in_buf = MPL_MIN(size, flat_buf_sz); \
-  ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + user_buf_idx)); \
+  ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + user_buf_idx) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + user_buf_idx)); \
   ADIOI_Assert(size_in_buf == (size_t)size_in_buf); \
         memcpy(&(send_buf[p][send_buf_idx[p]]), \
                ((char *) buf) + user_buf_idx, size_in_buf); \
diff --git a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
index 7250a21..36f5f28 100644
--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
@@ -494,7 +494,7 @@ static void ADIOI_LUSTRE_Exch_and_write(ADIO_File fd, const void *buf,
                     req_len = others_req[i].lens[j];
 		    if (req_off < iter_st_off + max_size) {
 			recv_count[i]++;
-                        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIU_Upint)(write_buf+req_off-off));
+                        ADIOI_Assert((((ADIO_Offset)(uintptr_t)write_buf)+req_off-off) == (ADIO_Offset)(uintptr_t)(write_buf+req_off-off));
 			MPI_Address(write_buf + req_off - off,
 				    &(others_req[i].mem_ptrs[j]));
                         recv_size[i] += req_len;
@@ -856,7 +856,7 @@ static void ADIOI_LUSTRE_W_Exchange_data(ADIO_File fd, const void *buf,
 { \
     while (size) { \
         size_in_buf = MPL_MIN(size, flat_buf_sz); \
-        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + user_buf_idx)); \
+        ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + user_buf_idx) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + user_buf_idx)); \
         ADIOI_Assert(size_in_buf == (size_t)size_in_buf);               \
         memcpy(&(send_buf[p][send_buf_idx[p]]), \
                ((char *) buf) + user_buf_idx, size_in_buf); \
diff --git a/src/mpi/romio/adio/common/ad_iread_coll.c b/src/mpi/romio/adio/common/ad_iread_coll.c
index 1fe1a68..9fe2ead 100644
--- a/src/mpi/romio/adio/common/ad_iread_coll.c
+++ b/src/mpi/romio/adio/common/ad_iread_coll.c
@@ -787,7 +787,7 @@ static void ADIOI_Iread_and_exch_l1_begin(ADIOI_NBC_Request *nbc_req,
                 }
                 if (req_off < real_off + real_size) {
                     count[i]++;
-                    ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf) + req_off - real_off) == (ADIO_Offset)(MPIU_Upint)(read_buf + req_off - real_off));
+                    ADIOI_Assert((((ADIO_Offset)(uintptr_t)read_buf) + req_off - real_off) == (ADIO_Offset)(uintptr_t)(read_buf + req_off - real_off));
                     MPI_Address(read_buf + req_off - real_off,
                                 &(others_req[i].mem_ptrs[j]));
                     ADIOI_Assert((real_off + real_size - req_off) == (int)(real_off + real_size - req_off));
@@ -883,7 +883,7 @@ static void ADIOI_Iread_and_exch_l1_end(ADIOI_NBC_Request *nbc_req,
 
     if (for_next_iter) {
         tmp_buf = (char *)ADIOI_Malloc(for_next_iter);
-        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(MPIU_Upint)(read_buf+real_size-for_next_iter));
+        ADIOI_Assert((((ADIO_Offset)(uintptr_t)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(uintptr_t)(read_buf+real_size-for_next_iter));
         ADIOI_Assert((for_next_iter+vars->coll_bufsize) == (size_t)(for_next_iter+vars->coll_bufsize));
         memcpy(tmp_buf, read_buf+real_size-for_next_iter, for_next_iter);
         ADIOI_Free(fd->io_buf);
diff --git a/src/mpi/romio/adio/common/ad_iwrite_coll.c b/src/mpi/romio/adio/common/ad_iwrite_coll.c
index 9d50b2c..62a932c 100644
--- a/src/mpi/romio/adio/common/ad_iwrite_coll.c
+++ b/src/mpi/romio/adio/common/ad_iwrite_coll.c
@@ -817,7 +817,7 @@ static void ADIOI_Iexch_and_write_l1_begin(ADIOI_NBC_Request *nbc_req,
                 }
                 if (req_off < off + size) {
                     count[i]++;
-                    ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIU_Upint)(write_buf+req_off-off));
+                    ADIOI_Assert((((ADIO_Offset)(uintptr_t)write_buf)+req_off-off) == (ADIO_Offset)(uintptr_t)(write_buf+req_off-off));
                     MPI_Address(write_buf + req_off - off,
                                 &(others_req[i].mem_ptrs[j]));
                     ADIOI_Assert((off + size - req_off) == (int)(off + size - req_off));
diff --git a/src/mpi/romio/adio/common/ad_read_coll.c b/src/mpi/romio/adio/common/ad_read_coll.c
index f723a6e..0335374 100644
--- a/src/mpi/romio/adio/common/ad_read_coll.c
+++ b/src/mpi/romio/adio/common/ad_read_coll.c
@@ -679,7 +679,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype
 		    }
 		    if (req_off < real_off + real_size) {
 			count[i]++;
-      ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf)+req_off-real_off) == (ADIO_Offset)(MPIU_Upint)(read_buf+req_off-real_off));
+      ADIOI_Assert((((ADIO_Offset)(uintptr_t)read_buf)+req_off-real_off) == (ADIO_Offset)(uintptr_t)(read_buf+req_off-real_off));
 			MPI_Address(read_buf+req_off-real_off, 
                                &(others_req[i].mem_ptrs[j]));
       ADIOI_Assert((real_off + real_size - req_off) == (int)(real_off + real_size - req_off));
@@ -732,7 +732,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype
 
 	if (for_next_iter) {
 	    tmp_buf = (char *) ADIOI_Malloc(for_next_iter);
-      ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(MPIU_Upint)(read_buf+real_size-for_next_iter));
+      ADIOI_Assert((((ADIO_Offset)(uintptr_t)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(uintptr_t)(read_buf+real_size-for_next_iter));
       ADIOI_Assert((for_next_iter+coll_bufsize) == (size_t)(for_next_iter+coll_bufsize));
 	    memcpy(tmp_buf, read_buf+real_size-for_next_iter, for_next_iter);
 	    ADIOI_Free(fd->io_buf);
@@ -926,7 +926,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node
 { \
     while (size) { \
 	size_in_buf = MPL_MIN(size, flat_buf_sz); \
-  ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + user_buf_idx)); \
+  ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + user_buf_idx) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + user_buf_idx)); \
   ADIOI_Assert(size_in_buf == (size_t)size_in_buf); \
 	memcpy(((char *) buf) + user_buf_idx, \
 	       &(recv_buf[p][recv_buf_idx[p]]), size_in_buf); \
diff --git a/src/mpi/romio/adio/common/ad_read_str_naive.c b/src/mpi/romio/adio/common/ad_read_str_naive.c
index aad8c5e..62a32c5 100644
--- a/src/mpi/romio/adio/common/ad_read_str_naive.c
+++ b/src/mpi/romio/adio/common/ad_read_str_naive.c
@@ -81,7 +81,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count,
 		req_off = off;
 		req_len = flat_buf->blocklens[b_index];
 
-    ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
+    ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + userbuf_off) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + userbuf_off));
     ADIOI_Assert(req_len == (int) req_len);
 		ADIO_ReadContig(fd, 
 				(char *) buf + userbuf_off,
@@ -241,7 +241,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count,
 		    req_off = off;
 		    req_len = frd_size;
 
-        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
+        ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + userbuf_off) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + userbuf_off));
         ADIOI_Assert(req_len == (int) req_len);
 		    ADIO_ReadContig(fd, 
 				    (char *) buf + userbuf_off,
@@ -305,7 +305,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count,
 		    req_len = size;
 		    userbuf_off = i_offset;
 
-        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
+        ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + userbuf_off) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + userbuf_off));
         ADIOI_Assert(req_len == (int) req_len);
 		    ADIO_ReadContig(fd, 
 				    (char *) buf + userbuf_off,
diff --git a/src/mpi/romio/adio/common/ad_write_coll.c b/src/mpi/romio/adio/common/ad_write_coll.c
index 18f70b9..ac5aae7 100644
--- a/src/mpi/romio/adio/common/ad_write_coll.c
+++ b/src/mpi/romio/adio/common/ad_write_coll.c
@@ -463,7 +463,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype
 		    }
 		    if (req_off < off + size) {
 			count[i]++;
-      ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIU_Upint)(write_buf+req_off-off));
+      ADIOI_Assert((((ADIO_Offset)(uintptr_t)write_buf)+req_off-off) == (ADIO_Offset)(uintptr_t)(write_buf+req_off-off));
 			MPI_Address(write_buf+req_off-off, 
                                &(others_req[i].mem_ptrs[j]));
       ADIOI_Assert((off + size - req_off) == (int)(off + size - req_off));
@@ -829,7 +829,7 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf,
 { \
     while (size) { \
         size_in_buf = MPL_MIN(size, flat_buf_sz); \
-  ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + user_buf_idx)); \
+  ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + user_buf_idx) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + user_buf_idx)); \
   ADIOI_Assert(size_in_buf == (size_t)size_in_buf); \
         memcpy(&(send_buf[p][send_buf_idx[p]]), \
                ((char *) buf) + user_buf_idx, size_in_buf); \
diff --git a/src/mpi/romio/adio/common/ad_write_nolock.c b/src/mpi/romio/adio/common/ad_write_nolock.c
index e73e01a..3f0fb6a 100644
--- a/src/mpi/romio/adio/common/ad_write_nolock.c
+++ b/src/mpi/romio/adio/common/ad_write_nolock.c
@@ -141,7 +141,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count,
 				    flat_buf->blocklens[i]);
 #endif
         ADIOI_Assert(flat_buf->blocklens[i] == (unsigned)flat_buf->blocklens[i]);
-        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + (ADIO_Offset)j*(ADIO_Offset)buftype_extent + flat_buf->indices[i]) == (ADIO_Offset)((MPIU_Upint)buf + (ADIO_Offset)j*(ADIO_Offset)buftype_extent + flat_buf->indices[i]));
+        ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + (ADIO_Offset)j*(ADIO_Offset)buftype_extent + flat_buf->indices[i]) == (ADIO_Offset)((uintptr_t)buf + (ADIO_Offset)j*(ADIO_Offset)buftype_extent + flat_buf->indices[i]));
 #ifdef ADIOI_MPE_LOGGING
 		    MPE_Log_event( ADIOI_MPE_write_a, 0, NULL );
 #endif
diff --git a/src/mpi/romio/adio/common/ad_write_str_naive.c b/src/mpi/romio/adio/common/ad_write_str_naive.c
index 74f8121..adcfc35 100644
--- a/src/mpi/romio/adio/common/ad_write_str_naive.c
+++ b/src/mpi/romio/adio/common/ad_write_str_naive.c
@@ -83,7 +83,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count,
 		req_len = flat_buf->blocklens[b_index];
 
     ADIOI_Assert(req_len == (int) req_len);
-    ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
+    ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + userbuf_off) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + userbuf_off));
 		ADIO_WriteContig(fd, 
 				(char *) buf + userbuf_off,
 				(int)req_len, 
@@ -242,7 +242,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count,
 		    req_len = fwr_size;
 
         ADIOI_Assert(req_len == (int) req_len);
-        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
+        ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + userbuf_off) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + userbuf_off));
 		    ADIO_WriteContig(fd, 
 				    (char *) buf + userbuf_off,
 				    (int)req_len, 
@@ -306,7 +306,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count,
 		    userbuf_off = i_offset;
 
         ADIOI_Assert(req_len == (int) req_len);
-        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
+        ADIOI_Assert((((ADIO_Offset)(uintptr_t)buf) + userbuf_off) == (ADIO_Offset)(uintptr_t)((uintptr_t)buf + userbuf_off));
 		    ADIO_WriteContig(fd, 
 				    (char *) buf + userbuf_off,
 				    (int)req_len, 
diff --git a/src/mpi/romio/adio/include/adioi.h b/src/mpi/romio/adio/include/adioi.h
index 91fb770..7cf62fa 100644
--- a/src/mpi/romio/adio/include/adioi.h
+++ b/src/mpi/romio/adio/include/adioi.h
@@ -1011,7 +1011,7 @@ int  ADIOI_MPE_iwrite_b;
          MPIU_AINT_CAST_TO_VOID_PTR from configure (mpi.h) */
   #include "glue_romio.h"
 
-  #define ADIOI_AINT_CAST_TO_VOID_PTR (void*)(MPIU_Pint)
+  #define ADIOI_AINT_CAST_TO_VOID_PTR (void*)(intptr_t)
   /* The next two casts are only used when you don't want sign extension
      when casting a (possible 4 byte) aint to a (8 byte) long long or offset */
   #define ADIOI_AINT_CAST_TO_LONG_LONG (long long)
@@ -1026,7 +1026,6 @@ int  ADIOI_MPE_iwrite_b;
   #define ADIOI_AINT_CAST_TO_OFFSET ADIOI_AINT_CAST_TO_LONG_LONG
   #define ADIOI_ENSURE_AINT_FITS_IN_PTR(aint_value) 
   #define ADIOI_Assert assert
-  #define MPIU_Upint unsigned long
 #endif
 
 #ifdef MPL_USE_DBG_LOGGING    /*todo fix dependency on mpich?*/
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h
index 3d3be04..a38417e 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h
@@ -147,7 +147,7 @@
 #define MPID_NEM_PKT_HEADER_FIELDS   	    \
     int source;                             \
     int dest;                               \
-    MPIU_Pint datalen;                      \
+    intptr_t datalen;                      \
     unsigned short seqno;                   \
     unsigned short type; /* currently used only with checkpointing */
 
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
index 2e8f862..5ceddf0 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
@@ -34,7 +34,7 @@ int MPIDI_CH3I_comm_destroy(MPID_Comm *comm, void *param);
 
 /* rendezvous hooks */
 int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, MPI_Aint count, MPI_Datatype datatype, int dt_contig,
-                          MPIDI_msg_sz_t data_sz, MPI_Aint dt_true_lb, int rank, int tag, MPID_Comm * comm, int context_offset);
+                          intptr_t data_sz, MPI_Aint dt_true_lb, int rank, int tag, MPID_Comm * comm, int context_offset);
 int MPID_nem_lmt_RndvRecv(struct MPIDI_VC *vc, MPID_Request *rreq);
 
 #define MPID_nem_mpich_release_fbox(cell)                               \
@@ -55,8 +55,8 @@ typedef struct MPID_nem_pkt_lmt_rts
     MPIDI_CH3_Pkt_type_t type;
     MPIDI_Message_match match;
     MPI_Request sender_req_id;
-    MPIDI_msg_sz_t data_sz;
-    MPIDI_msg_sz_t cookie_len;
+    intptr_t data_sz;
+    intptr_t cookie_len;
 }
 MPID_nem_pkt_lmt_rts_t;
 
@@ -65,8 +65,8 @@ typedef struct MPID_nem_pkt_lmt_cts
     MPIDI_CH3_Pkt_type_t type;
     MPI_Request sender_req_id;
     MPI_Request receiver_req_id;
-    MPIDI_msg_sz_t data_sz;
-    MPIDI_msg_sz_t cookie_len;
+    intptr_t data_sz;
+    intptr_t cookie_len;
 }
 MPID_nem_pkt_lmt_cts_t;
 
@@ -83,7 +83,7 @@ typedef struct MPID_nem_pkt_lmt_cookie
     int from_sender;
     MPI_Request sender_req_id;
     MPI_Request receiver_req_id;
-    MPIDI_msg_sz_t cookie_len;
+    intptr_t cookie_len;
 }
 MPID_nem_pkt_lmt_cookie_t;
 
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
index 71eda22..84e4be2 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
@@ -20,17 +20,17 @@ static inline int MPID_nem_mpich_sendv (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *v
 static inline void MPID_nem_mpich_dequeue_fastbox (int local_rank);
 static inline void MPID_nem_mpich_enqueue_fastbox (int local_rank);
 static inline int MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov,
-                                               void *ext_header, MPIDI_msg_sz_t ext_header_sz,
+                                               void *ext_header, intptr_t ext_header_sz,
                                                MPIDI_VC_t *vc, int *again);
 static inline int MPID_nem_recv_seqno_matches (MPID_nem_queue_ptr_t qhead);
 static inline int MPID_nem_mpich_test_recv (MPID_nem_cell_ptr_t *cell, int *in_fbox, int in_blocking_progress);
 static inline int MPID_nem_mpich_blocking_recv (MPID_nem_cell_ptr_t *cell, int *in_fbox, int completions);
 static inline int MPID_nem_mpich_test_recv_wait (MPID_nem_cell_ptr_t *cell, int *in_fbox, int timeout);
 static inline int MPID_nem_mpich_release_cell (MPID_nem_cell_ptr_t cell, MPIDI_VC_t *vc);
-static inline void MPID_nem_mpich_send_seg_header (MPID_Segment *segment, MPIDI_msg_sz_t *segment_first,
-                                                   MPIDI_msg_sz_t segment_size, void *header, MPIDI_msg_sz_t header_sz,
-                                                   void *ext_header, MPIDI_msg_sz_t ext_header_sz, MPIDI_VC_t *vc, int *again);
-static inline void MPID_nem_mpich_send_seg (MPID_Segment *segment, MPIDI_msg_sz_t *segment_first, MPIDI_msg_sz_t segment_size,
+static inline void MPID_nem_mpich_send_seg_header (MPID_Segment *segment, intptr_t *segment_first,
+                                                   intptr_t segment_size, void *header, intptr_t header_sz,
+                                                   void *ext_header, intptr_t ext_header_sz, MPIDI_VC_t *vc, int *again);
+static inline void MPID_nem_mpich_send_seg (MPID_Segment *segment, intptr_t *segment_first, intptr_t segment_size,
                                                     MPIDI_VC_t *vc, int *again);
 
 
@@ -226,7 +226,7 @@ MPID_nem_mpich_sendv (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again)
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_cell_ptr_t el;
     char *cell_buf;
-    MPIDI_msg_sz_t payload_len;    
+    intptr_t payload_len;
     int my_rank;
     MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_MPICH_SENDV);
@@ -324,13 +324,13 @@ MPID_nem_mpich_sendv (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again)
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline int
 MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov,
-                             void *ext_hdr_ptr, MPIDI_msg_sz_t ext_hdr_sz,
+                             void *ext_hdr_ptr, intptr_t ext_hdr_sz,
                              MPIDI_VC_t *vc, int *again)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_cell_ptr_t el;
     char *cell_buf;
-    MPIDI_msg_sz_t payload_len;    
+    intptr_t payload_len;
     int my_rank;
     MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPI_Aint buf_offset = 0;
@@ -484,14 +484,14 @@ MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline void
-MPID_nem_mpich_send_seg_header (MPID_Segment *segment, MPIDI_msg_sz_t *segment_first, MPIDI_msg_sz_t segment_size,
-                                void *header, MPIDI_msg_sz_t header_sz, void *ext_header, MPIDI_msg_sz_t ext_header_sz,
+MPID_nem_mpich_send_seg_header (MPID_Segment *segment, intptr_t *segment_first, intptr_t segment_size,
+                                void *header, intptr_t header_sz, void *ext_header, intptr_t ext_header_sz,
                                 MPIDI_VC_t *vc, int *again)
 {
     MPID_nem_cell_ptr_t el;
-    MPIDI_msg_sz_t datalen;
+    intptr_t datalen;
     int my_rank;
-    MPIDI_msg_sz_t last;
+    intptr_t last;
     MPIDI_CH3I_VC *vc_ch = &vc->ch;
     MPI_Aint buf_offset = 0;
 
@@ -630,12 +630,12 @@ MPID_nem_mpich_send_seg_header (MPID_Segment *segment, MPIDI_msg_sz_t *segment_f
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline void
-MPID_nem_mpich_send_seg (MPID_Segment *segment, MPIDI_msg_sz_t *segment_first, MPIDI_msg_sz_t segment_size, MPIDI_VC_t *vc, int *again)
+MPID_nem_mpich_send_seg (MPID_Segment *segment, intptr_t *segment_first, intptr_t segment_size, MPIDI_VC_t *vc, int *again)
 {
     MPID_nem_cell_ptr_t el;
-    MPIDI_msg_sz_t datalen;
+    intptr_t datalen;
     int my_rank;
-    MPIDI_msg_sz_t last;
+    intptr_t last;
     MPIDI_CH3I_VC *vc_ch = &vc->ch;
 
     MPIU_Assert(vc_ch->is_local); /* netmods will have their own implementation */    
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h
index 7e2fea0..22d64a7 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h
@@ -37,7 +37,7 @@ int MPIDI_nem_ckpt_finalize(void);
 int MPIDI_nem_ckpt_start(void);
 int MPIDI_nem_ckpt_finish(void);
 int MPIDI_nem_ckpt_pkthandler_init(int (*pktArray[])(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *pkt,
-				     MPIDI_msg_sz_t *buflen, MPID_Request **req ), int arraySize);
+				     intptr_t *buflen, MPID_Request **req ), int arraySize);
 #endif
 
 /* one-sided */
@@ -96,11 +96,11 @@ int MPID_nem_mpich_getv (MPL_IOV **s_iov, int *s_niov, MPL_IOV **d_iov, int *d_n
 int MPID_nem_mpich_send_header(void* buf, int size, struct MPIDI_VC *vc, int *again);
 int MPID_nem_mpich_sendv(MPL_IOV **iov, int *n_iov, struct MPIDI_VC *vc, int *again);
 int MPID_nem_mpich_sendv_header(MPL_IOV **iov, int *n_iov, void *ext_header,
-                                MPIDI_msg_sz_t ext_header_sz, struct MPIDI_VC *vc, int *again);
-void MPID_nem_mpich_send_seg(MPID_Segment segment, MPIDI_msg_sz_t *segment_first, MPIDI_msg_sz_t segment_sz, struct MPIDI_VC *vc, int *again);
-void MPID_nem_mpich_send_seg_header(MPID_Segment segment, MPIDI_msg_sz_t *segment_first, MPIDI_msg_sz_t segment_size,
-                                    void *header, MPIDI_msg_sz_t header_sz, void *ext_header,
-                                    MPIDI_msg_sz_t ext_header_sz, struct MPIDI_VC *vc, int *again);
+                                intptr_t ext_header_sz, struct MPIDI_VC *vc, int *again);
+void MPID_nem_mpich_send_seg(MPID_Segment segment, intptr_t *segment_first, intptr_t segment_sz, struct MPIDI_VC *vc, int *again);
+void MPID_nem_mpich_send_seg_header(MPID_Segment segment, intptr_t *segment_first, intptr_t segment_size,
+                                    void *header, intptr_t header_sz, void *ext_header,
+                                    intptr_t ext_header_sz, struct MPIDI_VC *vc, int *again);
 int MPID_nem_mpich_test_recv(MPID_nem_cell_ptr_t *cell, int *in_fbox, int in_blocking_progress);
 int MPID_nem_mpich_test_recv_wait(MPID_nem_cell_ptr_t *cell, int *in_fbox, int timeout);
 int MPID_nem_recv_seqno_matches(MPID_nem_queue_ptr_t qhead) ;
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 6e4a55c..f65a192 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
@@ -57,7 +57,7 @@ int MPIDI_CH3I_Progress_deactivate_hook(int id);
 int MPIDI_CH3I_Shm_send_progress(void);
 int MPIDI_CH3I_Complete_sendq_with_error(MPIDI_VC_t * vc);
 
-int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header, MPIDI_msg_sz_t hdr_sz );
+int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header, intptr_t hdr_sz );
 
 int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID_Request *req);
 int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie);
@@ -83,7 +83,7 @@ int MPID_nem_lmt_vmsplice_done_send(MPIDI_VC_t *vc, MPID_Request *req);
 int MPID_nem_lmt_vmsplice_done_recv(MPIDI_VC_t *vc, MPID_Request *req);
 int MPID_nem_lmt_vmsplice_vc_terminated(MPIDI_VC_t *vc);
 
-int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen);
+int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, intptr_t buflen);
 
 /* 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);
diff --git a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
index c1fb527..14de935 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
@@ -85,12 +85,12 @@ typedef struct MPIDI_CH3I_VC
     MPID_nem_queue_ptr_t free_queue;
 
 #ifdef ENABLE_CHECKPOINTING
-    MPIDI_msg_sz_t ckpt_msg_len;
+    intptr_t ckpt_msg_len;
     void *ckpt_msg_buf;
 #endif
 
     /* temp buffer to store partially received header */
-    MPIDI_msg_sz_t pending_pkt_len;
+    intptr_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 */
@@ -101,12 +101,12 @@ typedef struct MPIDI_CH3I_VC
     /* 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,
+    int (* iStartContigMsg)(struct MPIDI_VC *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_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);
+    int (* iSendContig)(struct MPIDI_VC *vc, struct MPID_Request *sreq, void *hdr, intptr_t hdr_sz,
+                        void *data, intptr_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()*/
@@ -131,7 +131,7 @@ typedef struct MPIDI_CH3I_VC
     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;
+    intptr_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 */
@@ -164,11 +164,11 @@ struct MPIDI_CH3I_Request
 {
     struct MPIDI_VC     *vc;
     int                  noncontig;
-    MPIDI_msg_sz_t       header_sz;
+    intptr_t       header_sz;
 
     MPI_Request          lmt_req_id;     /* request id of remote side */
     struct MPID_Request *lmt_req;        /* pointer to original send/recv request */
-    MPIDI_msg_sz_t       lmt_data_sz;    /* data size to be transferred, after checking for truncation */
+    intptr_t       lmt_data_sz;    /* data size to be transferred, after checking for truncation */
     MPL_IOV             lmt_tmp_cookie; /* temporary storage for received cookie */
     void                *s_cookie;       /* temporary storage for the cookie data in case the packet can't be sent immediately */
 
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h
index 9eb64be..dee01a2 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h
@@ -83,14 +83,14 @@ int MPID_nem_llc_anysource_improbe(int tag, MPID_Comm * comm, int context_offset
                                    MPID_Request ** message, MPI_Status * status);
 int MPID_nem_llc_get_ordering(int *ordering);
 
-int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
-                             void *data, MPIDI_msg_sz_t data_sz);
-int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data,
-                                 MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr);
+int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, intptr_t hdr_sz,
+                             void *data, intptr_t data_sz);
+int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data,
+                                 intptr_t data_sz, MPID_Request ** sreq_ptr);
 int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
-                               MPIDI_msg_sz_t hdr_sz);
+                               intptr_t hdr_sz);
 
-int MPIDI_nem_llc_Rqst_iov_update(MPID_Request * mreq, MPIDI_msg_sz_t consume);
+int MPIDI_nem_llc_Rqst_iov_update(MPID_Request * mreq, intptr_t consume);
 int MPID_nem_llc_send_queued(MPIDI_VC_t * vc, rque_t * send_queue);
 
 int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype,
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
index 73ae1b6..93c4545 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
@@ -235,7 +235,7 @@ int MPID_nem_llc_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req)
 {
     int mpi_errno = MPI_SUCCESS, llc_errno;
     int dt_contig;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Datatype *dt_ptr;
     MPI_Aint dt_true_lb;
     int i;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
index 5991a2a..2188f6b 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
@@ -26,7 +26,7 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
 {
     int mpi_errno = MPI_SUCCESS, llc_errno;
     int dt_contig;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Datatype *dt_ptr;
     MPI_Aint dt_true_lb;
     int i;
@@ -125,9 +125,9 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
 #endif /* notdef_leak_0001_hack */
 
         MPID_Segment_init(buf, count, datatype, segment_ptr, 0);
-        MPIDI_msg_sz_t segment_first = 0;
-        MPIDI_msg_sz_t segment_size = data_sz;
-        MPIDI_msg_sz_t last = segment_size;
+        intptr_t segment_first = 0;
+        intptr_t segment_size = data_sz;
+        intptr_t last = segment_size;
         MPIU_Assert(last > 0);
         REQ_FIELD(sreq, pack_buf) = MPL_malloc((size_t) data_sz);
         MPIR_ERR_CHKANDJUMP(!REQ_FIELD(sreq, pack_buf), mpi_errno, MPI_ERR_OTHER, "**outofmemory");
@@ -162,8 +162,8 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
 #define FUNCNAME MPID_nem_llc_iStartContigMsg
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data,
-                                 MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr)
+int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data,
+                                 intptr_t data_sz, MPID_Request ** sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *sreq = NULL;
@@ -254,8 +254,8 @@ int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_
 #define FUNCNAME MPID_nem_llc_iSendContig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
-                             void *data, MPIDI_msg_sz_t data_sz)
+int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, intptr_t hdr_sz,
+                             void *data, intptr_t data_sz)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_llc_vc_area *vc_llc = 0;
@@ -339,7 +339,7 @@ int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, MP
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
-                               MPIDI_msg_sz_t hdr_sz)
+                               intptr_t hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_SENDNONCONTIG);
@@ -348,7 +348,7 @@ int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
 
     MPIU_Assert(hdr_sz <= sizeof(MPIDI_CH3_Pkt_t));
 
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_nem_llc_vc_area *vc_llc = 0;
     int need_to_queue = 0;
 
@@ -472,10 +472,10 @@ int MPID_nem_llc_send_queued(MPIDI_VC_t * vc, rque_t * send_queue)
 #define FUNCNAME MPIDI_nem_llc_Rqst_iov_update
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_nem_llc_Rqst_iov_update(MPID_Request * mreq, MPIDI_msg_sz_t consume)
+int MPIDI_nem_llc_Rqst_iov_update(MPID_Request * mreq, intptr_t consume)
 {
     int ret = TRUE;
-    /* MPIDI_msg_sz_t oconsume = consume; */
+    /* intptr_t oconsume = consume; */
     int iv, nv;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_NEM_LLC_RQST_IOV_UPDATE);
 
@@ -827,7 +827,7 @@ int llc_poll(int in_blocking_poll, llc_send_f sfnc, llc_recv_f rfnc)
                         /* set_request_info() sets req->dev.recv_data_sz to pkt->data_sz.
                          * pkt->data_sz is sender's request size.
                          */
-                        MPIDI_msg_sz_t unpack_sz = events[0].side.initiator.length;
+                        intptr_t unpack_sz = events[0].side.initiator.length;
                         MPID_Segment seg;
                         MPI_Aint last;
 
@@ -959,7 +959,7 @@ int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Dat
 {
     int mpi_errno = MPI_SUCCESS, llc_errno;
     int dt_contig;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Datatype *dt_ptr;
     MPI_Aint dt_true_lb;
     int i;
@@ -1046,9 +1046,9 @@ int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Dat
         sreq->dev.segment_ptr = segment_ptr;
 
         MPID_Segment_init(buf, count, datatype, segment_ptr, 0);
-        MPIDI_msg_sz_t segment_first = 0;
-        MPIDI_msg_sz_t segment_size = data_sz;
-        MPIDI_msg_sz_t last = segment_size;
+        intptr_t segment_first = 0;
+        intptr_t segment_size = data_sz;
+        intptr_t last = segment_size;
         MPIU_Assert(last > 0);
         REQ_FIELD(sreq, pack_buf) = MPL_malloc((size_t) data_sz);
         MPIR_ERR_CHKANDJUMP(!REQ_FIELD(sreq, pack_buf), mpi_errno, MPI_ERR_OTHER, "**outofmemory");
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
index dd5dcb1..163c253 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
@@ -33,12 +33,12 @@ int MPID_nem_mxm_vc_terminate(MPIDI_VC_t * vc);
 int MPID_nem_mxm_get_ordering(int *ordering);
 
 /* alternate interface */
-int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
-                             void *data, MPIDI_msg_sz_t data_sz);
-int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data,
-                                 MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr);
+int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, intptr_t hdr_sz,
+                             void *data, intptr_t data_sz);
+int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data,
+                                 intptr_t data_sz, MPID_Request ** sreq_ptr);
 int MPID_nem_mxm_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *header,
-                               MPIDI_msg_sz_t hdr_sz);
+                               intptr_t hdr_sz);
 
 /* direct interface */
 int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPID_Request * rreq);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
index 9848062..41dcd62 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
@@ -18,7 +18,7 @@ static void _mxm_recv_completion_cb(void *context);
 static int _mxm_irecv(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req, int id, mxm_mq_h mxm_mq,
                       mxm_tag_t mxm_tag);
 static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
-                               MPID_Datatype * dt_ptr, MPIDI_msg_sz_t data_sz, const void *buf,
+                               MPID_Datatype * dt_ptr, intptr_t data_sz, const void *buf,
                                int count, mxm_req_buffer_t ** iov_buf, int *iov_count);
 
 #undef FUNCNAME
@@ -84,7 +84,7 @@ void MPID_nem_mxm_get_adi_msg(mxm_conn_h conn, mxm_imm_t imm, void *data,
     _dbg_mxm_output(5, "========> Getting ADI msg (from=%d data_size %d) \n", vc->pg_rank, length);
     _dbg_mxm_out_buf(data, (length > 16 ? 16 : length));
 
-    MPID_nem_handle_pkt(vc, data, (MPIDI_msg_sz_t) (length));
+    MPID_nem_handle_pkt(vc, data, (intptr_t) (length));
 }
 
 
@@ -155,7 +155,7 @@ int MPID_nem_mxm_anysource_matched(MPID_Request * req)
 int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPID_Request * rreq)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
     MPID_Datatype *dt_ptr;
@@ -233,9 +233,9 @@ static int _mxm_handle_rreq(MPID_Request * req)
     int complete = FALSE, found = FALSE;
     int dt_contig;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
-    MPIDI_msg_sz_t userbuf_sz;
+    intptr_t userbuf_sz;
     MPID_Datatype *dt_ptr;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_nem_mxm_vc_area *vc_area ATTRIBUTE((unused)) = NULL;
     MPID_nem_mxm_req_area *req_area = NULL;
     void *tmp_buf = NULL;
@@ -275,8 +275,8 @@ static int _mxm_handle_rreq(MPID_Request * req)
         MPIR_STATUS_SET_COUNT(req->status, userbuf_sz);
         MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, VERBOSE, (MPL_DBG_FDEST,
                                               "receive buffer too small; message truncated, msg_sz="
-                                              MPIDI_MSG_SZ_FMT ", userbuf_sz="
-                                              MPIDI_MSG_SZ_FMT, req->dev.recv_data_sz, userbuf_sz));
+                                              PRIdPTR ", userbuf_sz="
+                                              PRIdPTR, req->dev.recv_data_sz, userbuf_sz));
         req->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS,
                                                      MPIR_ERR_RECOVERABLE, FCNAME, __LINE__,
                                                      MPI_ERR_TRUNCATE, "**truncate",
@@ -286,7 +286,7 @@ static int _mxm_handle_rreq(MPID_Request * req)
     }
 
     if (!dt_contig) {
-        MPIDI_msg_sz_t last = 0;
+        intptr_t last = 0;
 
         if (req->dev.tmpbuf != NULL) {
             last = req->dev.recv_data_sz;
@@ -437,12 +437,12 @@ static int _mxm_irecv(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req, int i
 
 
 static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
-                               MPID_Datatype * dt_ptr, MPIDI_msg_sz_t data_sz, const void *buf,
+                               MPID_Datatype * dt_ptr, intptr_t data_sz, const void *buf,
                                int count, mxm_req_buffer_t ** iov_buf, int *iov_count)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *rreq = *rreq_p;
-    MPIDI_msg_sz_t last;
+    intptr_t last;
     MPL_IOV *iov;
     int n_iov = 0;
     int index;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
index cf815cf..01ecd7a 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
@@ -24,7 +24,7 @@ static int _mxm_isend(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req,
                       int type, mxm_mq_h mxm_mq, int mxm_rank, int id, mxm_tag_t tag, int block);
 #if 0   /* Consider using this function in case non contiguous data */
 static int _mxm_process_sdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
-                               MPID_Datatype * dt_ptr, MPIDI_msg_sz_t data_sz, const void *buf,
+                               MPID_Datatype * dt_ptr, intptr_t data_sz, const void *buf,
                                int count, mxm_req_buffer_t ** iov_buf, int *iov_count);
 #endif
 
@@ -32,8 +32,8 @@ static int _mxm_process_sdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
 #define FUNCNAME MPID_nem_mxm_iSendContig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
-                             void *data, MPIDI_msg_sz_t data_sz)
+int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, intptr_t hdr_sz,
+                             void *data, intptr_t data_sz)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_mxm_vc_area *vc_area = NULL;
@@ -97,8 +97,8 @@ int MPID_nem_mxm_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, MP
 #define FUNCNAME MPID_nem_mxm_iStartContigMsg
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data,
-                                 MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr)
+int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz, void *data,
+                                 intptr_t data_sz, MPID_Request ** sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *sreq = NULL;
@@ -163,10 +163,10 @@ int MPID_nem_mxm_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_mxm_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
-                               MPIDI_msg_sz_t hdr_sz)
+                               intptr_t hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_msg_sz_t last;
+    intptr_t last;
     MPID_nem_mxm_vc_area *vc_area = NULL;
     MPID_nem_mxm_req_area *req_area = NULL;
 
@@ -248,7 +248,7 @@ int MPID_nem_mxm_send(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Data
     MPID_Request *sreq = NULL;
     MPID_Datatype *dt_ptr;
     int dt_contig;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPI_Aint dt_true_lb;
     MPID_nem_mxm_vc_area *vc_area = NULL;
     MPID_nem_mxm_req_area *req_area = NULL;
@@ -296,7 +296,7 @@ int MPID_nem_mxm_send(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Data
             req_area->iov_buf[0].length = data_sz;
         }
         else {
-            MPIDI_msg_sz_t last;
+            intptr_t last;
             MPI_Aint packsize = 0;
 
             sreq->dev.segment_ptr = MPID_Segment_alloc();
@@ -351,7 +351,7 @@ int MPID_nem_mxm_ssend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
     MPID_Request *sreq = NULL;
     MPID_Datatype *dt_ptr;
     int dt_contig;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPI_Aint dt_true_lb;
     MPID_nem_mxm_vc_area *vc_area = NULL;
     MPID_nem_mxm_req_area *req_area = NULL;
@@ -399,7 +399,7 @@ int MPID_nem_mxm_ssend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
             req_area->iov_buf[0].length = data_sz;
         }
         else {
-            MPIDI_msg_sz_t last;
+            intptr_t last;
             MPI_Aint packsize = 0;
 
             sreq->dev.segment_ptr = MPID_Segment_alloc();
@@ -454,7 +454,7 @@ int MPID_nem_mxm_isend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
     MPID_Request *sreq = NULL;
     MPID_Datatype *dt_ptr;
     int dt_contig;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPI_Aint dt_true_lb;
     MPID_nem_mxm_vc_area *vc_area = NULL;
     MPID_nem_mxm_req_area *req_area = NULL;
@@ -502,7 +502,7 @@ int MPID_nem_mxm_isend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
             req_area->iov_buf[0].length = data_sz;
         }
         else {
-            MPIDI_msg_sz_t last;
+            intptr_t last;
             MPI_Aint packsize = 0;
 
             sreq->dev.segment_ptr = MPID_Segment_alloc();
@@ -557,7 +557,7 @@ int MPID_nem_mxm_issend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Da
     MPID_Request *sreq = NULL;
     MPID_Datatype *dt_ptr;
     int dt_contig;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPI_Aint dt_true_lb;
     MPID_nem_mxm_vc_area *vc_area = NULL;
     MPID_nem_mxm_req_area *req_area = NULL;
@@ -605,7 +605,7 @@ int MPID_nem_mxm_issend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Da
             req_area->iov_buf[0].length = data_sz;
         }
         else {
-            MPIDI_msg_sz_t last;
+            intptr_t last;
             MPI_Aint packsize = 0;
 
             sreq->ch.noncontig = TRUE;
@@ -787,12 +787,12 @@ static int _mxm_isend(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req,
 
 #if 0   /* Consider using this function in case non contiguous data */
 static int _mxm_process_sdtype(MPID_Request ** sreq_p, MPI_Datatype datatype,
-                               MPID_Datatype * dt_ptr, MPIDI_msg_sz_t data_sz, const void *buf,
+                               MPID_Datatype * dt_ptr, intptr_t data_sz, const void *buf,
                                int count, mxm_req_buffer_t ** iov_buf, int *iov_count)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *sreq = *sreq_p;
-    MPIDI_msg_sz_t last;
+    intptr_t last;
     MPL_IOV *iov;
     int n_iov = 0;
     int index;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
index c780bc0..b66bfae 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
@@ -294,11 +294,11 @@ DECLARE_TWO_API_SETS(void, MPID_nem_ofi_anysource_posted, MPID_Request * rreq);
 int MPID_nem_ofi_anysource_matched(MPID_Request * rreq);
 int MPID_nem_ofi_send_data(cq_tagged_entry_t * wc, MPID_Request * sreq);
 int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq,
-                               void *hdr, MPIDI_msg_sz_t hdr_sz);
-int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_sz,
-                                 void *data, MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr);
+                               void *hdr, intptr_t hdr_sz);
+int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, intptr_t hdr_sz,
+                                 void *data, intptr_t data_sz, MPID_Request ** sreq_ptr);
 int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
-                             MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz);
+                             intptr_t hdr_sz, void *data, intptr_t data_sz);
 
 /* ************************************************************************** */
 /* OFI utility functions : not exposed as a netmod public API                 */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
index fc64d51..3405722 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
@@ -215,16 +215,16 @@ static int MPID_nem_ofi_cts_recv_callback(cq_tagged_entry_t * wc, MPID_Request *
 #define FCNAME DECL_FUNC(MPID_nem_ofi_iSendContig)
 int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc,
                              MPID_Request * sreq,
-                             void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz)
+                             void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz)
 {
     int pgid, c, mpi_errno = MPI_SUCCESS;
     char *pack_buffer = NULL;
     uint64_t match_bits;
     MPID_Request *cts_req;
-    MPIDI_msg_sz_t buf_offset = 0;
+    intptr_t buf_offset = 0;
     size_t         pkt_len;
     BEGIN_FUNC(FCNAME);
-    MPIU_Assert(hdr_sz <= (MPIDI_msg_sz_t) sizeof(MPIDI_CH3_Pkt_t));
+    MPIU_Assert(hdr_sz <= (intptr_t) sizeof(MPIDI_CH3_Pkt_t));
     MPID_nem_ofi_init_req(sreq);
     pkt_len = sizeof(MPIDI_CH3_Pkt_t) + sreq->dev.ext_hdr_sz + data_sz;
     if (sreq->dev.ext_hdr_sz > 0 && gl_data.iov_limit > 2) {
@@ -272,19 +272,19 @@ int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc,
 #undef FCNAME
 #define FCNAME DECL_FUNC(MPID_nem_ofi_SendNoncontig)
 int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc,
-                               MPID_Request * sreq, void *hdr, MPIDI_msg_sz_t hdr_sz)
+                               MPID_Request * sreq, void *hdr, intptr_t hdr_sz)
 {
     int c, pgid, mpi_errno = MPI_SUCCESS;
     char *pack_buffer;
     MPI_Aint data_sz;
     uint64_t match_bits;
     MPID_Request *cts_req;
-    MPIDI_msg_sz_t first, last;
-    MPIDI_msg_sz_t buf_offset = 0;
+    intptr_t first, last;
+    intptr_t buf_offset = 0;
     void          *data       = NULL;
     size_t         pkt_len;
     BEGIN_FUNC(FCNAME);
-    MPIU_Assert(hdr_sz <= (MPIDI_msg_sz_t) sizeof(MPIDI_CH3_Pkt_t));
+    MPIU_Assert(hdr_sz <= (intptr_t) sizeof(MPIDI_CH3_Pkt_t));
     MPID_nem_ofi_init_req(sreq);
     first = sreq->dev.segment_first;
     last = sreq->dev.segment_size;
@@ -309,8 +309,8 @@ int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc,
 #define FCNAME DECL_FUNC(MPID_nem_ofi_iStartContigMsg)
 int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc,
                                  void *hdr,
-                                 MPIDI_msg_sz_t hdr_sz,
-                                 void *data, MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr)
+                                 intptr_t hdr_sz,
+                                 void *data, intptr_t data_sz, MPID_Request ** sreq_ptr)
 {
     int c, pgid, mpi_errno = MPI_SUCCESS;
     MPID_Request *sreq;
@@ -319,7 +319,7 @@ int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc,
     uint64_t match_bits;
     size_t   pkt_len;
     BEGIN_FUNC(FCNAME);
-    MPIU_Assert(hdr_sz <= (MPIDI_msg_sz_t) sizeof(MPIDI_CH3_Pkt_t));
+    MPIU_Assert(hdr_sz <= (intptr_t) sizeof(MPIDI_CH3_Pkt_t));
 
     MPID_nem_ofi_create_req(&sreq, 2);
     sreq->kind = MPID_REQUEST_SEND;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
index 25a6df2..458b455 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
@@ -23,7 +23,7 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_callback)(cq_tagged_entry_t * wc, MPID_Request
 {
     int err0, err1, src, mpi_errno = MPI_SUCCESS;
     uint64_t ssend_bits;
-    MPIDI_msg_sz_t sz;
+    intptr_t sz;
     MPIDI_VC_t *vc;
     MPID_Request *sync_req;
     BEGIN_FUNC(FCNAME);
@@ -122,7 +122,7 @@ ADD_SUFFIX(do_isend)(struct MPIDI_VC *vc,
     uint64_t match_bits, ssend_match, ssend_mask;
     MPI_Aint dt_true_lb;
     MPID_Request *sreq = NULL, *sync_req = NULL;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Datatype *dt_ptr;
     BEGIN_FUNC(FCNAME);
     VC_READY_CHECK(vc);
@@ -282,7 +282,7 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPID_Reques
     int mpi_errno = MPI_SUCCESS, dt_contig, src, tag;
     uint64_t match_bits = 0, mask_bits = 0;
     fi_addr_t remote_proc = 0;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPI_Aint dt_true_lb;
     MPID_Datatype *dt_ptr;
     MPIU_Context_id_t context_id;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
index d37fc99..e72a142 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
@@ -44,7 +44,7 @@ typedef struct {
     int put_done;
     void *recv_ptr;  /* used for reordering in ptl_nm */
     void *chunk_buffer[MPID_NEM_PTL_NUM_CHUNK_BUFFERS];
-    MPIDI_msg_sz_t bytes_put;
+    intptr_t bytes_put;
     int found; /* used in probes with PtlMESearch() */
     event_handler_fn event_handler;
 } MPID_nem_ptl_req_area;
@@ -86,7 +86,7 @@ typedef struct {
     ptl_pt_index_t ptrg;
     ptl_pt_index_t ptrc;
     int id_initialized; /* TRUE iff id and pt have been initialized */
-    MPIDI_msg_sz_t num_queued_sends; /* number of reqs for this vc in sendq */
+    intptr_t num_queued_sends; /* number of reqs for this vc in sendq */
 } MPID_nem_ptl_vc_area;
 
 /* macro for ptl private in VC */
@@ -141,11 +141,11 @@ int MPID_nem_ptl_nm_init(void);
 int MPID_nem_ptl_nm_finalize(void);
 int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e);
 int MPID_nem_ptl_sendq_complete_with_error(MPIDI_VC_t *vc, int req_errno);
-int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz);
-int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz,
+int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz);
+int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
                                    MPID_Request **sreq_ptr);
-int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
-                               void *data, MPIDI_msg_sz_t data_sz);
+int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz,
+                               void *data, intptr_t data_sz);
 int MPID_nem_ptl_poll_init(void);
 int MPID_nem_ptl_poll_finalize(void);
 int MPID_nem_ptl_poll(int is_blocking_poll);
@@ -186,9 +186,9 @@ int MPID_nem_ptl_lmt_done_recv(MPIDI_VC_t *vc, MPID_Request *req);
 /* packet handlers */
 
 int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-                                             MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+                                             intptr_t *buflen, MPID_Request **rreqp);
 int MPID_nem_ptl_pkt_cancel_send_resp_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-                                              MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+                                              intptr_t *buflen, MPID_Request **rreqp);
 
 /* local packet types */
 
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
index fb3ab31..bd2e22e 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
@@ -191,7 +191,7 @@ int MPID_nem_ptl_nm_finalize(void)
 #define FUNCNAME send_pkt
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static inline int send_pkt(MPIDI_VC_t *vc, void *hdr_p, void *data_p, MPIDI_msg_sz_t data_sz,
+static inline int send_pkt(MPIDI_VC_t *vc, void *hdr_p, void *data_p, intptr_t data_sz,
                            MPID_Request *sreq)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -288,8 +288,8 @@ static int send_noncontig_pkt(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr_p)
     REQ_PTL(sreq)->put_done = 0;
 
     if (data_sz) {
-        MPIDI_msg_sz_t first = sreq->dev.segment_first;
-        MPIDI_msg_sz_t last = sreq->dev.segment_first + sent_sz;
+        intptr_t first = sreq->dev.segment_first;
+        intptr_t last = sreq->dev.segment_first + sent_sz;
         MPID_Segment_pack(sreq->dev.segment_ptr, first, &last, sendbuf_ptr);
         sendbuf_ptr += sent_sz;
 
@@ -333,7 +333,7 @@ static int send_noncontig_pkt(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr_p)
 #define FUNCNAME MPID_nem_ptl_SendNoncontig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz)
+int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_SENDNONCONTIG);
@@ -355,8 +355,8 @@ int MPID_nem_ptl_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MP
 #define FUNCNAME MPID_nem_ptl_iStartContigMsg
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data,
-                                 MPIDI_msg_sz_t data_sz, MPID_Request **sreq_ptr)
+int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data,
+                                 intptr_t data_sz, MPID_Request **sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ISTARTCONTIGMSG);
@@ -386,8 +386,8 @@ int MPID_nem_ptl_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_s
 #define FUNCNAME MPID_nem_ptl_iSendContig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
-                               void *data, MPIDI_msg_sz_t data_sz)
+int MPID_nem_ptl_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz,
+                               void *data, intptr_t data_sz)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_PTL_ISENDCONTIG);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
index a21b89c..d8d0f1d 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
@@ -307,7 +307,7 @@ int MPID_nem_ptl_anysource_improbe(int tag, MPID_Comm * comm, int context_offset
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-                                                    MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+                                                    intptr_t *buflen, MPID_Request **rreqp)
 {
     int ret, mpi_errno = MPI_SUCCESS;
     MPIDI_nem_ptl_pkt_cancel_send_req_t *req_pkt = (MPIDI_nem_ptl_pkt_cancel_send_req_t *)pkt;
@@ -383,7 +383,7 @@ int MPID_nem_ptl_pkt_cancel_send_req_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pk
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_ptl_pkt_cancel_send_resp_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-                                              MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+                                              intptr_t *buflen, MPID_Request **rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *sreq;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
index 4623c79..b300af9 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
@@ -93,7 +93,7 @@ static int handler_recv_dequeue_complete(const ptl_event_t *e)
     int is_contig;
     MPI_Aint last;
     MPI_Aint dt_true_lb;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Datatype *dt_ptr ATTRIBUTE((unused));
 
     MPIDI_STATE_DECL(MPID_STATE_HANDLER_RECV_DEQUEUE_COMPLETE);
@@ -278,7 +278,7 @@ static int handler_recv_dequeue_large(const ptl_event_t *e)
     MPID_nem_ptl_vc_area *vc_ptl;
     int ret;
     int dt_contig;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Datatype *dt_ptr;
     MPI_Aint dt_true_lb;
     MPI_Aint last;
@@ -430,7 +430,7 @@ int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
     MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
     ptl_me_t me;
     int dt_contig;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Datatype *dt_ptr;
     MPI_Aint dt_true_lb;
     MPI_Aint last;
@@ -693,7 +693,7 @@ int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPL_IOV s_c
        regular large transfers because we handle them directly on the netmod. */
     int mpi_errno = MPI_SUCCESS;
     int dt_contig;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Datatype *dt_ptr;
     MPI_Aint dt_true_lb;
     ptl_match_bits_t match_bits;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
index 5b82965..b49a22c 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
@@ -106,7 +106,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_ptl_vc_area *const vc_ptl = VC_PTL(vc);
     int ret;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
     MPID_Datatype *dt_ptr;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
index b06106b..06d19e8 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
@@ -1591,7 +1591,7 @@ static int MPID_nem_tcp_recv_handler(sockconn_t *const sc)
             }
         }
     
-        MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "New recv " MPIDI_MSG_SZ_FMT " (fd=%d, vc=%p, sc=%p)", bytes_recvd, sc_fd, sc_vc, sc));
+        MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "New recv %" PRIdPTR " (fd=%d, vc=%p, sc=%p)", bytes_recvd, sc_fd, sc_vc, sc));
 
         mpi_errno = MPID_nem_handle_pkt(sc_vc, recv_buf, bytes_recvd);
         if (mpi_errno) MPIR_ERR_POP_LABEL(mpi_errno, fn_noncomm_fail);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h
index c36f0c0..281ec14 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h
@@ -162,7 +162,7 @@ typedef enum MPIDI_nem_tcp_socksm_pkt_type {
     
 typedef struct MPIDI_nem_tcp_header {
     MPIDI_nem_tcp_socksm_pkt_type_t pkt_type;
-    MPIDI_msg_sz_t datalen;
+    intptr_t datalen;
 } MPIDI_nem_tcp_header_t;
 
 typedef struct MPIDI_nem_tcp_idinfo {
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c
index d398bd2..0e7af16 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c
@@ -37,7 +37,7 @@ fn_fail:
 #define FUNCNAME MPID_nem_tcp_ckpt_unpause_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
index 5d84bb3..56d6aa4 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_impl.h
@@ -97,12 +97,12 @@ int MPID_nem_tcp_ckpt_cleanup(void);
 int MPID_nem_tcp_state_listening_handler(struct pollfd *const l_plfd, sockconn_t *const l_sc);
 int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send_queue);
 
-int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz);
-int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz,
+int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz);
+int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
                                     MPID_Request **sreq_ptr);
-int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz,
+int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
                                         MPID_Request **sreq_ptr);
-int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header, MPIDI_msg_sz_t hdr_sz);
+int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header, intptr_t hdr_sz);
 int MPID_nem_tcp_get_addr_port_from_bc(const char *business_card, struct in_addr *addr, in_port_t *port);
 
 void MPID_nem_tcp_vc_dbg_print_sendq(FILE *stream, MPIDI_VC_t *vc);
@@ -113,7 +113,7 @@ int MPID_nem_tcp_vc_terminated(MPIDI_VC_t *vc);
 int MPID_nem_tcp_get_ordering(int *ordering);
 
 
-int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+int MPID_nem_tcp_pkt_unpause_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
 
 
 /* Macros */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
index 84f475c..53ca9a7 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
@@ -71,7 +71,7 @@ int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *sreq;
-    MPIDI_msg_sz_t offset;
+    intptr_t offset;
     MPL_IOV *iov;
     int complete;
     MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
@@ -118,7 +118,7 @@ int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send
                 goto fn_exit; /* this vc is closed now, just bail out */
             }
         }
-        MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write " MPIDI_MSG_SZ_FMT, offset);
+        MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write %" PRIdPTR, offset);
 
         complete = 1;
         for (iov = &sreq->dev.iov[sreq->dev.iov_offset]; iov < &sreq->dev.iov[sreq->dev.iov_offset + sreq->dev.iov_count]; ++iov)
@@ -231,12 +231,12 @@ int MPID_nem_tcp_conn_est (MPIDI_VC_t *vc)
 #define FUNCNAME MPID_nem_tcp_iStartContigMsg
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz,
+int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
                                  MPID_Request **sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request * sreq = NULL;
-    MPIDI_msg_sz_t offset = 0;
+    intptr_t offset = 0;
     MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
     sockconn_t *sc = vc_tcp->sc;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_ISTARTCONTIGMSG);
@@ -283,7 +283,7 @@ int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_s
                         goto fn_fail;
                     }
                 }
-                MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write " MPIDI_MSG_SZ_FMT, offset);
+                MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write %" PRIdPTR, offset);
                 
                 if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz)
                 {
@@ -371,12 +371,12 @@ fn_fail:
 #define FUNCNAME MPID_nem_tcp_iStartContigMsg_paused
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz,
+int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz,
                                         MPID_Request **sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request * sreq = NULL;
-    MPIDI_msg_sz_t offset = 0;
+    intptr_t offset = 0;
     MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
     sockconn_t *sc = vc_tcp->sc;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_ISTARTCONTIGMSG_PAUSED);
@@ -423,7 +423,7 @@ int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_
                     goto fn_fail;
                 }
             }
-            MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write " MPIDI_MSG_SZ_FMT, offset);
+            MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write %" PRIdPTR, offset);
                 
             if (offset == sizeof(MPIDI_CH3_Pkt_t) + data_sz)
             {
@@ -505,11 +505,11 @@ fn_fail:
 #define FUNCNAME MPID_nem_tcp_iSendContig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz,
-                             void *data, MPIDI_msg_sz_t data_sz)
+int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, intptr_t hdr_sz,
+                             void *data, intptr_t data_sz)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_msg_sz_t offset = 0;
+    intptr_t offset = 0;
     MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
     sockconn_t *sc = vc_tcp->sc;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_ISENDCONTIGMSG);
@@ -567,7 +567,7 @@ int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPID
                         goto fn_fail;
                     }
                 }
-                MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write " MPIDI_MSG_SZ_FMT, offset);
+                MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write %" PRIdPTR, offset);
                 
                 if (offset == sizeof(MPIDI_CH3_Pkt_t) + sreq->dev.ext_hdr_sz + data_sz)
                 {
@@ -695,13 +695,13 @@ fn_fail:
 #define FUNCNAME MPID_nem_tcp_SendNoncontig
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header, MPIDI_msg_sz_t hdr_sz)
+int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header, intptr_t hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
     int iov_n;
     MPL_IOV iov[MPL_IOV_LIMIT];
     MPL_IOV *iov_p;
-    MPIDI_msg_sz_t offset;
+    intptr_t offset;
     int complete;
     MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
     int iov_offset;
@@ -760,7 +760,7 @@ int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header,
                     }
                 }
                 
-                MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write noncontig " MPIDI_MSG_SZ_FMT, offset);
+                MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "write noncontig %" PRIdPTR, offset);
             }
         }
         else
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_isend.c b/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
index b9194bb..6144cc1 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
@@ -15,7 +15,7 @@
 #define FUNCNAME MPIDI_CH3_iSend
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_iSend (MPIDI_VC_t *vc, MPID_Request *sreq, void * hdr, MPIDI_msg_sz_t hdr_sz)
+int MPIDI_CH3_iSend (MPIDI_VC_t *vc, MPID_Request *sreq, void * hdr, intptr_t hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
     int again = 0;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
index 481eeea..6cdec55 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
@@ -24,7 +24,7 @@
 #define FUNCNAME MPIDI_CH3_iStartMsg
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, MPID_Request **sreq_ptr)
+int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, intptr_t hdr_sz, MPID_Request **sreq_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
     int again = 0;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
index a7c403a..99b57af 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
@@ -66,7 +66,7 @@ static int my_sigusr1_count = 0;
 MPIDI_CH3I_shm_sendq_t MPIDI_CH3I_shm_sendq = {NULL, NULL};
 struct MPID_Request *MPIDI_CH3I_shm_active_send = NULL;
 
-static int pkt_NETMOD_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+static int pkt_NETMOD_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
 static int shm_connection_terminated(MPIDI_VC_t * vc);
 static int check_terminating_vcs(void);
 
@@ -514,7 +514,7 @@ int MPIDI_CH3I_Progress (MPID_Progress_state *progress_state, int is_blocking)
             if (cell)
             {
                 char            *cell_buf    = (char *)cell->pkt.mpich.p.payload;
-                MPIDI_msg_sz_t   payload_len = cell->pkt.mpich.datalen;
+                intptr_t   payload_len = cell->pkt.mpich.datalen;
                 MPIDI_CH3_Pkt_t *pkt         = (MPIDI_CH3_Pkt_t *)cell_buf;
 
                 /* Empty packets are not allowed */
@@ -523,7 +523,7 @@ int MPIDI_CH3I_Progress (MPID_Progress_state *progress_state, int is_blocking)
                 if (in_fbox)
                 {
                     MPIDI_CH3I_VC *vc_ch;
-                    MPIDI_msg_sz_t buflen = payload_len;
+                    intptr_t buflen = payload_len;
 
                     /* This packet must be the first packet of a new message */
                     MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Recv pkt from fbox");
@@ -732,7 +732,7 @@ void MPIDI_CH3I_Progress_wakeup(void)
 #define FUNCNAME MPID_nem_handle_pkt
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
+int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, intptr_t buflen)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *rreq = NULL;
@@ -749,7 +749,7 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
             /* handle fast-path first: received a new whole message */
             do
             {
-                MPIDI_msg_sz_t len = buflen;
+                intptr_t len = buflen;
                 MPIDI_CH3_Pkt_t *pkt = (MPIDI_CH3_Pkt_t *)buf;
 
                 MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "received new message");
@@ -781,8 +781,8 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
         else
         {
             /* collect header fragments in vc's pending_pkt */
-            MPIDI_msg_sz_t copylen;
-            MPIDI_msg_sz_t pktlen;
+            intptr_t copylen;
+            intptr_t pktlen;
             MPIDI_CH3_Pkt_t *pkt = (MPIDI_CH3_Pkt_t *)vc_ch->pending_pkt;
 
             MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "received header fragment");
@@ -861,7 +861,7 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
             {
                 if (buflen > 0)
                 {
-		    MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "        " MPIDI_MSG_SZ_FMT, buflen);
+		    MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "        %" PRIdPTR, buflen);
                     if (rreq->dev.drop_data == FALSE) {
                         MPIU_Memcpy (iov->MPL_IOV_BUF, buf, buflen);
                     }
@@ -873,7 +873,7 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
                 rreq->dev.iov_offset = iov - rreq->dev.iov;
                 rreq->dev.iov_count = n_iov;
                 vc_ch->recv_active = rreq;
-		MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "        remaining: " MPIDI_MSG_SZ_FMT " bytes + %d iov entries", iov->MPL_IOV_LEN, n_iov));
+		MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "        remaining: %" PRIdPTR " bytes + %d iov entries", iov->MPL_IOV_LEN, n_iov));
             }
             else
             {
@@ -1191,7 +1191,7 @@ int MPIDI_CH3I_Complete_sendq_with_error(MPIDI_VC_t * vc)
 #define FUNCNAME pkt_NETMOD_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_NETMOD_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+static int pkt_NETMOD_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_pkt_netmod_t * const netmod_pkt = (MPID_nem_pkt_netmod_t *)pkt;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c b/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
index 1909c8b..5247d9e 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
@@ -18,11 +18,11 @@
 /* MPIDI_CH3I_SendNoncontig - Sends a message by packing
    directly into cells.  The caller must initialize sreq->dev.segment
    as well as segment_first and segment_size. */
-int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header, MPIDI_msg_sz_t hdr_sz )
+int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header, intptr_t hdr_sz )
 {
     int mpi_errno = MPI_SUCCESS;
     int again = 0;
-    MPIDI_msg_sz_t orig_segment_first = sreq->dev.segment_first;
+    intptr_t orig_segment_first = sreq->dev.segment_first;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SENDNONCONTIG);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SENDNONCONTIG);
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c
index ae1b927..c3fd575 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c
@@ -197,7 +197,7 @@ int MPIDI_CH3I_Seg_commit(MPID_nem_seg_ptr_t memory, int num_local, int local_ra
         MPIU_CHKPMEM_MALLOC (addr, char *, segment_len + MPID_NEM_CACHE_LINE_LEN, mpi_errno, "segment");
 
         memory->base_addr = addr;
-        current_addr = (char *)(((MPIU_Upint)addr + (MPIU_Upint)MPID_NEM_CACHE_LINE_LEN-1) & (~((MPIU_Upint)MPID_NEM_CACHE_LINE_LEN-1)));
+        current_addr = (char *)(((uintptr_t)addr + (uintptr_t)MPID_NEM_CACHE_LINE_LEN-1) & (~((uintptr_t)MPID_NEM_CACHE_LINE_LEN-1)));
         memory->symmetrical = 0;
 
         /* must come before barrier_init since we use OPA in that function */
@@ -293,7 +293,7 @@ int MPIDI_CH3I_Seg_commit(MPID_nem_seg_ptr_t memory, int num_local, int local_ra
         MPIU_CHKPMEM_MALLOC (addr, char *, segment_len + MPID_NEM_CACHE_LINE_LEN, mpi_errno, "segment");
 
         memory->base_addr = addr;
-        current_addr = (char *)(((MPIU_Upint)addr + (MPIU_Upint)MPID_NEM_CACHE_LINE_LEN-1) & (~((MPIU_Upint)MPID_NEM_CACHE_LINE_LEN-1)));
+        current_addr = (char *)(((uintptr_t)addr + (uintptr_t)MPID_NEM_CACHE_LINE_LEN-1) & (~((uintptr_t)MPID_NEM_CACHE_LINE_LEN-1)));
         memory->symmetrical = 0 ;
 
         /* we still need to call barrier */
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
index 055c01b..5cfc9b2 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
@@ -528,7 +528,7 @@ fn_fail:
 #define FUNCNAME pkt_ckpt_marker_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_ckpt_marker_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **req)
+static int pkt_ckpt_marker_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **req)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_pkt_ckpt_marker_t * const ckpt_pkt = (MPID_nem_pkt_ckpt_marker_t *)pkt;
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
index bdacac4..8f13cee 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
@@ -44,10 +44,10 @@ static int do_send(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete);
 static int do_cookie(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete);
 
 /* packet handlers */
-static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
-static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
-static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
-static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
+static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
+static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
+static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp);
 
 #undef FUNCNAME
 #define FUNCNAME MPID_nem_lmt_pkthandler_init
@@ -84,7 +84,7 @@ int MPID_nem_lmt_pkthandler_init(MPIDI_CH3_PktHandler_Fcn *pktArray[], int array
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, MPI_Aint count,
                           MPI_Datatype datatype, int dt_contig ATTRIBUTE((unused)),
-                          MPIDI_msg_sz_t data_sz, MPI_Aint dt_true_lb ATTRIBUTE((unused)),
+                          intptr_t data_sz, MPI_Aint dt_true_lb ATTRIBUTE((unused)),
                           int rank, int tag, MPID_Comm * comm, int context_offset)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -106,7 +106,7 @@ int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, MPI_Aint coun
     }
 
     MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,VERBOSE,
-		   "sending lmt RTS, data_sz=" MPIDI_MSG_SZ_FMT, data_sz);
+		   "sending lmt RTS, data_sz=%" PRIdPTR, data_sz);
     sreq->partner_request = NULL;
     sreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = 0;
 	
@@ -180,14 +180,14 @@ int MPID_nem_lmt_RndvRecv(MPIDI_VC_t *vc, MPID_Request *rreq)
 #define FUNCNAME pkt_RTS_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request * rreq;
     int found;
     MPID_nem_pkt_lmt_rts_t * const rts_pkt = (MPID_nem_pkt_lmt_rts_t *)pkt;
     char *data_buf;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     MPIU_CHKPMEM_DECL(1);
     MPIDI_STATE_DECL(MPID_STATE_PKT_RTS_HANDLER);
 
@@ -195,7 +195,7 @@ static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
 
     MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_MSGQ_MUTEX);
 
-    MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, "received LMT RTS pkt, sreq=0x%08x, rank=%d, tag=%d, context=%d, data_sz=" MPIDI_MSG_SZ_FMT,
+    MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST, "received LMT RTS pkt, sreq=0x%08x, rank=%d, tag=%d, context=%d, data_sz=%" PRIdPTR,
                                         rts_pkt->sender_req_id, rts_pkt->match.parts.rank, rts_pkt->match.parts.tag, rts_pkt->match.parts.context_id,
                                         rts_pkt->data_sz));
 
@@ -301,13 +301,13 @@ static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
 #define FUNCNAME pkt_CTS_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
 {
     MPID_nem_pkt_lmt_cts_t * const cts_pkt = (MPID_nem_pkt_lmt_cts_t *)pkt;
     MPID_Request *sreq;
     MPID_Request *rts_sreq;
     char *data_buf;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     int mpi_errno = MPI_SUCCESS;
     MPIU_CHKPMEM_DECL(1);
     MPIDI_STATE_DECL(MPID_STATE_PKT_CTS_HANDLER);
@@ -399,7 +399,7 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
 #define FUNCNAME pkt_DONE_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_pkt_lmt_done_t * const done_pkt = (MPID_nem_pkt_lmt_done_t *)pkt;
@@ -445,13 +445,13 @@ static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
 #define FUNCNAME pkt_COOKIE_handler
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPID_Request **rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_pkt_lmt_cookie_t * const cookie_pkt = (MPID_nem_pkt_lmt_cookie_t *)pkt;
     MPID_Request *req;
     char *data_buf;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     MPIU_CHKPMEM_DECL(1);
     MPIDI_STATE_DECL(MPID_STATE_PKT_COOKIE_HANDLER);
 
@@ -535,7 +535,7 @@ static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz
 static int do_cts(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     int dt_contig ATTRIBUTE((unused));
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
     MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c
index e22a137..4f8f3bc 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c
@@ -233,7 +233,7 @@ static int send_sreq_data(MPIDI_VC_t *vc, MPID_Request *sreq, knem_cookie_t *s_c
     int mpi_errno = MPI_SUCCESS;
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Datatype * dt_ptr;
 
     /* MT: this code assumes only one thread can be at this point at a time */
@@ -357,7 +357,7 @@ int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPL_IOV s_co
     int nodma;
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Datatype * dt_ptr;
     volatile knem_status_t *status;
     knem_status_t current_status;
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
index 68beb93..e3091ad 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
@@ -68,7 +68,7 @@ typedef union
 
 typedef union
 {
-    volatile MPIDI_msg_sz_t val;
+    volatile intptr_t val;
     char padding[MPID_NEM_CACHE_LINE_LEN];
 } MPID_nem_cacheline_msg_sz_t;
 
@@ -123,7 +123,7 @@ static int MPID_nem_delete_shm_region(MPID_nem_copy_buf_t **buf, MPIU_SHMW_Hnd_t
 int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPID_Request *req)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     int dt_contig ATTRIBUTE((unused));
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
     MPID_Datatype * dt_ptr;
@@ -445,10 +445,10 @@ 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;
     MPID_nem_copy_buf_t * const copy_buf = vc_ch->lmt_copy_buf;
-    MPIDI_msg_sz_t first;
-    MPIDI_msg_sz_t last;
+    intptr_t first;
+    intptr_t last;
     int buf_num;
-    MPIDI_msg_sz_t data_sz, copy_limit;
+    intptr_t data_sz, copy_limit;
     MPIDI_STATE_DECL(MPID_STATE_LMT_SHM_SEND_PROGRESS);
 
     MPIDI_FUNC_ENTER(MPID_STATE_LMT_SHM_SEND_PROGRESS);
@@ -476,7 +476,7 @@ static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
                 req->dev.segment_first = first;
                 vc_ch->lmt_buf_num = buf_num;
                 *done = FALSE;
-                MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "first=" MPIDI_MSG_SZ_FMT " data_sz="MPIDI_MSG_SZ_FMT, first, data_sz));
+                MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "first=%" PRIdPTR " data_sz=%" PRIdPTR, first, data_sz));
                 MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Waiting on full buffer %d", buf_num);
                 goto fn_exit;
             }
@@ -500,7 +500,7 @@ static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
         first = last;
         buf_num = (buf_num+1) % NUM_BUFS;
 
-        MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "sent data.  last=" MPIDI_MSG_SZ_FMT " data_sz=" MPIDI_MSG_SZ_FMT, last, data_sz));
+        MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "sent data.  last=%" PRIdPTR " data_sz=%" PRIdPTR, last, data_sz));
     }
     while (last < data_sz);
 
@@ -537,12 +537,12 @@ 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;
     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;
+    intptr_t first;
+    intptr_t last, expected_last;
     int buf_num;
-    MPIDI_msg_sz_t data_sz, len;
+    intptr_t data_sz, len;
     int i;
-    MPIDI_msg_sz_t surfeit;
+    intptr_t surfeit;
     char *src_buf;
     char tmpbuf[MPID_NEM_CACHE_LINE_LEN];
     MPIDI_STATE_DECL(MPID_STATE_LMT_SHM_RECV_PROGRESS);
@@ -571,7 +571,7 @@ static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
                 vc_ch->lmt_buf_num = buf_num;
                 vc_ch->lmt_surfeit = surfeit;
                 *done = FALSE;
-                MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "first=" MPIDI_MSG_SZ_FMT " data_sz=" MPIDI_MSG_SZ_FMT, first, data_sz));
+                MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "first=%" PRIdPTR " data_sz=%" PRIdPTR, first, data_sz));
                 MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Waiting on empty buffer %d", buf_num);
                 goto fn_exit;
             }
@@ -587,7 +587,7 @@ static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
 
 	MPID_Segment_unpack(req->dev.segment_ptr, first, &last, src_buf);
 
-        MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "recvd data.  last=" MPIDI_MSG_SZ_FMT " data_sz=" MPIDI_MSG_SZ_FMT, last, data_sz));
+        MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "recvd data.  last=%" PRIdPTR " data_sz=%" PRIdPTR, last, data_sz));
 
         if (surfeit && buf_num > 0)
         {
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c
index 78138ef..dea4739 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_vmsplice.c
@@ -92,7 +92,7 @@ static int populate_iov_from_req(MPID_Request *req)
     int mpi_errno = MPI_SUCCESS;
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Datatype * dt_ptr;
 
     /* find out contig/noncontig, size, and lb for the datatype */
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
index e84e90f..0eff9dc 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
@@ -82,7 +82,7 @@ fn_fail:
 int MPID_nem_send_iov(MPIDI_VC_t *vc, MPID_Request **sreq_ptr, MPL_IOV *iov, int n_iov)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     int i;
     int iov_data_copied;
     MPID_Request *sreq = *sreq_ptr;
diff --git a/src/mpid/ch3/channels/sock/src/ch3_isend.c b/src/mpid/ch3/channels/sock/src/ch3_isend.c
index 34e8116..3773855 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_isend.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_isend.c
@@ -11,7 +11,7 @@
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static void update_request(MPID_Request * sreq, void * hdr, 
-			   MPIDI_msg_sz_t hdr_sz, MPIU_Size_t nb)
+			   intptr_t hdr_sz, MPIU_Size_t nb)
 {
     MPIDI_STATE_DECL(MPID_STATE_UPDATE_REQUEST);
 
@@ -29,7 +29,7 @@ static void update_request(MPID_Request * sreq, void * hdr,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * hdr, 
-		    MPIDI_msg_sz_t hdr_sz)
+		    intptr_t hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
     int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
@@ -70,7 +70,7 @@ int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * hdr,
 		if (nb == hdr_sz)
 		{
 		    MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
-                     "write complete " MPIDI_MSG_SZ_FMT " bytes, calling OnDataAvail fcn", nb);
+                     "write complete %" PRIdPTR " bytes, calling OnDataAvail fcn", nb);
 		    reqFn = sreq->dev.OnDataAvail;
 		    if (!reqFn) {
 			MPIU_Assert(MPIDI_Request_get_type(sreq)!=MPIDI_REQUEST_TYPE_GET_RESP);
@@ -106,7 +106,7 @@ int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * hdr,
 		else
 		{
 		    MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
-                     "partial write of " MPIDI_MSG_SZ_FMT " bytes, request enqueued at head", nb);
+                     "partial write of %" PRIdPTR " bytes, request enqueued at head", nb);
 		    update_request(sreq, hdr, hdr_sz, nb);
 		    MPIDI_CH3I_SendQ_enqueue_head(vcch, sreq);
 		    MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
index 6c21874..e526174 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
@@ -10,7 +10,7 @@
 #define FUNCNAME create_request
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static MPID_Request * create_request(void * hdr, MPIDI_msg_sz_t hdr_sz, 
+static MPID_Request * create_request(void * hdr, intptr_t hdr_sz,
 				     MPIU_Size_t nb)
 {
     MPID_Request * sreq;
@@ -49,7 +49,7 @@ static MPID_Request * create_request(void * hdr, MPIDI_msg_sz_t hdr_sz,
 #define FUNCNAME MPIDI_CH3_iStartMsg
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, MPIDI_msg_sz_t hdr_sz, 
+int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, intptr_t hdr_sz,
 			MPID_Request ** sreq_ptr)
 {
     MPID_Request * sreq = NULL;
@@ -92,13 +92,13 @@ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, MPIDI_msg_sz_t hdr_sz,
 		if (nb == hdr_sz)
 		{ 
 		    MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
-				   "entire write complete, " MPIDI_MSG_SZ_FMT " bytes", nb);
+				   "entire write complete, %" PRIdPTR " bytes", nb);
 		    /* done.  get us out of here as quickly as possible. */
 		}
 		else
 		{
 		    MPL_DBG_MSG_D(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
-                    "partial write of " MPIDI_MSG_SZ_FMT " bytes, request enqueued at head", nb);
+                    "partial write of %" PRIdPTR " bytes, request enqueued at head", nb);
 		    sreq = create_request(hdr, hdr_sz, nb);
 		    if (!sreq) {
 			MPIR_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
diff --git a/src/mpid/ch3/channels/sock/src/ch3_progress.c b/src/mpid/ch3/channels/sock/src/ch3_progress.c
index 08a5dfd..9ff94a5 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_progress.c
@@ -486,7 +486,7 @@ static int MPIDI_CH3I_Progress_handle_sock_event(MPIDU_Sock_event_t * event)
 	    {
 		if (conn->recv_active == NULL)
 		{
-                    MPIDI_msg_sz_t buflen = sizeof (MPIDI_CH3_Pkt_t);
+                    intptr_t buflen = sizeof (MPIDI_CH3_Pkt_t);
 		    MPIU_Assert(conn->pkt.type < MPIDI_CH3_PKT_END_CH3);
                     
 		    mpi_errno = pktArray[conn->pkt.type]( conn->vc, &conn->pkt,
@@ -624,7 +624,7 @@ static int MPIDI_CH3I_Progress_handle_sock_event(MPIDU_Sock_event_t * event)
 			/* --END ERROR HANDLING-- */
 
 			MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
-       (MPL_DBG_FDEST,"immediate writev, vc=%p, sreq=0x%08x, nb=" MPIDI_MSG_SZ_FMT,
+       (MPL_DBG_FDEST,"immediate writev, vc=%p, sreq=0x%08x, nb=%" PRIdPTR,
 	conn->vc, sreq->handle, nb));
 			    
 			if (nb > 0 && adjust_iov(&iovp, &sreq->dev.iov_count, nb))
@@ -899,7 +899,7 @@ static int ReadMoreData( MPIDI_CH3I_Connection_t * conn, MPID_Request *rreq )
 	/* --END ERROR HANDLING-- */
 
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,
-		 (MPL_DBG_FDEST,"immediate readv, vc=%p nb=" MPIDI_MSG_SZ_FMT ", rreq=0x%08x",
+		 (MPL_DBG_FDEST,"immediate readv, vc=%p nb=%" PRIdPTR ", rreq=0x%08x",
 		  conn->vc, nb, rreq->handle));
 				
 	if (nb > 0 && adjust_iov(&iovp, &rreq->dev.iov_count, nb)) {
diff --git a/src/mpid/ch3/include/mpid_rma_issue.h b/src/mpid/ch3/include/mpid_rma_issue.h
index 8c056d5..41c0b29 100644
--- a/src/mpid/ch3/include/mpid_rma_issue.h
+++ b/src/mpid/ch3/include/mpid_rma_issue.h
@@ -100,7 +100,7 @@ static inline void fill_in_derived_dtp_info(MPIDI_RMA_dtype_info * dtype_info, v
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static int init_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags,
-                              MPID_Datatype * target_dtp, MPIDI_msg_sz_t stream_offset,
+                              MPID_Datatype * target_dtp, intptr_t stream_offset,
                               void **ext_hdr_ptr, MPI_Aint * ext_hdr_sz)
 {
     MPI_Aint _ext_hdr_sz = 0, _total_sz = 0;
@@ -183,7 +183,7 @@ static int init_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static int init_get_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags,
-                                  MPID_Datatype * target_dtp, MPIDI_msg_sz_t stream_offset,
+                                  MPID_Datatype * target_dtp, intptr_t stream_offset,
                                   void **ext_hdr_ptr, MPI_Aint * ext_hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -217,7 +217,7 @@ static int init_get_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
                                     void *ext_hdr_ptr, MPI_Aint ext_hdr_sz,
-                                    MPIDI_msg_sz_t stream_offset, MPIDI_msg_sz_t stream_size,
+                                    intptr_t stream_offset, intptr_t stream_size,
                                     MPID_Request ** req_ptr)
 {
     MPI_Datatype target_datatype;
@@ -552,7 +552,7 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
     rest_len = total_len;
     MPIU_Assert(rma_op->issued_stream_count >= 0);
     for (j = 0; j < stream_unit_count; j++) {
-        MPIDI_msg_sz_t stream_offset, stream_size;
+        intptr_t stream_offset, stream_size;
         MPID_Request *curr_req = NULL;
 
         if (j < rma_op->issued_stream_count)
@@ -745,7 +745,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
     MPIU_Assert(rma_op->issued_stream_count >= 0);
 
     for (j = 0; j < stream_unit_count; j++) {
-        MPIDI_msg_sz_t stream_offset, stream_size;
+        intptr_t stream_offset, stream_size;
         MPID_Request *resp_req = NULL;
         MPID_Request *curr_req = NULL;
 
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index c89be45..2ef9bec 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -26,10 +26,6 @@
 /* Add the ch3 packet definitions */
 #include "mpidpkt.h"
 
-/* We need to match the size of MPIU_Pint to the relevant Format control
- */
-#define MPIDI_MSG_SZ_FMT MPIU_PINT_FMT_DEC_SPEC
-
 #if !defined(MPIDI_IOV_DENSITY_MIN)
 #   define MPIDI_IOV_DENSITY_MIN (16 * 1024)
 #endif
@@ -173,17 +169,17 @@ extern MPIDI_Process_t MPIDI_Process;
 	(dt_ptr_) = NULL;						\
 	(dt_contig_out_) = TRUE;					\
         (dt_true_lb_)    = 0;                                           \
-	(data_sz_out_) = (MPIDI_msg_sz_t) (count_) * MPID_Datatype_get_basic_size(datatype_); \
-	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, TERSE, (MPL_DBG_FDEST,"basic datatype: dt_contig=%d, dt_sz=%d, data_sz=" MPIDI_MSG_SZ_FMT, \
+	(data_sz_out_) = (intptr_t) (count_) * MPID_Datatype_get_basic_size(datatype_); \
+	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, TERSE, (MPL_DBG_FDEST,"basic datatype: dt_contig=%d, dt_sz=%d, data_sz=%" PRIdPTR, \
 			  (dt_contig_out_), MPID_Datatype_get_basic_size(datatype_), (data_sz_out_)));\
     }									\
     else								\
     {									\
 	MPID_Datatype_get_ptr((datatype_), (dt_ptr_));			\
 	(dt_contig_out_) = (dt_ptr_)->is_contig;			\
-	(data_sz_out_) = (MPIDI_msg_sz_t) (count_) * (dt_ptr_)->size;	\
+	(data_sz_out_) = (intptr_t) (count_) * (dt_ptr_)->size;	\
         (dt_true_lb_)    = (dt_ptr_)->true_lb;                          \
-	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, TERSE, (MPL_DBG_FDEST, "user defined datatype: dt_contig=%d, dt_sz=" MPI_AINT_FMT_DEC_SPEC ", data_sz=" MPIDI_MSG_SZ_FMT, \
+	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, TERSE, (MPL_DBG_FDEST, "user defined datatype: dt_contig=%d, dt_sz=" MPI_AINT_FMT_DEC_SPEC ", data_sz=%" PRIdPTR, \
 			  (dt_contig_out_), (dt_ptr_)->size, (data_sz_out_)));\
     }									\
 }
@@ -723,7 +719,7 @@ typedef struct MPIDI_VC
     /* rendezvous function pointers.  Called to send a rendevous
        message or when one is matched */
     int (* rndvSend_fn)( struct MPID_Request **sreq_p, const void * buf, MPI_Aint count,
-                         MPI_Datatype datatype, int dt_contig, MPIDI_msg_sz_t data_sz, 
+                         MPI_Datatype datatype, int dt_contig, intptr_t data_sz,
                          MPI_Aint dt_true_lb, int rank, int tag,
                          struct MPID_Comm * comm, int context_offset );
     int (* rndvRecv_fn)( struct MPIDI_VC * vc, struct MPID_Request *rreq );
@@ -738,7 +734,7 @@ typedef struct MPIDI_VC
        sreq->dev.segment, _first and _size.  Contiguous messages are
        called directly from CH3 and cannot be overridden. */
     int (* sendNoncontig_fn)( struct MPIDI_VC *vc, struct MPID_Request *sreq,
-			      void *header, MPIDI_msg_sz_t hdr_sz );
+			      void *header, intptr_t hdr_sz );
 
 #ifdef ENABLE_COMM_OVERRIDES
     MPIDI_Comm_ops_t *comm_ops;
@@ -957,7 +953,7 @@ const char *MPIDI_Pkt_GetDescString( MPIDI_CH3_Pkt_t *pkt );
 /* These macros help trace communication headers */
 #define MPL_DBG_MSGPKT(_vc,_tag,_contextid,_dest,_size,_kind)	\
     MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_MSG,TYPICAL,(MPL_DBG_FDEST,\
-		      "%s: vc=%p, tag=%d, context=%d, dest=%d, datasz=" MPIDI_MSG_SZ_FMT,\
+		      "%s: vc=%p, tag=%d, context=%d, dest=%d, datasz=%" PRIdPTR,\
 		      _kind,_vc,_tag,_contextid,_dest,_size) )
 
 /* FIXME: Switch this to use the common debug code */
@@ -1287,7 +1283,7 @@ int MPID_PG_BCast( MPID_Comm *peercomm_p, MPID_Comm *comm_p, int root );
   If the send completes immediately, the channel implementation should return 
   NULL.
 @*/
-int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * pkt, MPIDI_msg_sz_t pkt_sz, 
+int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * pkt, intptr_t pkt_sz,
 			MPID_Request **sreq_ptr);
 
 
@@ -1353,7 +1349,7 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int iov_n,
   must set the request as complete.
 @*/
 int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * pkt, 
-		    MPIDI_msg_sz_t pkt_sz);
+		    intptr_t pkt_sz);
 
 
 /*@
@@ -1432,12 +1428,12 @@ int MPIDI_CH3U_Request_unpack_srbuf(MPID_Request * rreq);
 void MPIDI_CH3U_Buffer_copy(const void * const sbuf, MPI_Aint scount,
 			    MPI_Datatype sdt, int * smpi_errno,
 			    void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt,
-			    MPIDI_msg_sz_t * rdata_sz, int * rmpi_errno);
+			    intptr_t * rdata_sz, int * rmpi_errno);
 int MPIDI_CH3U_Post_data_receive(int found, MPID_Request ** rreqp);
 int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreqp);
 int MPIDI_CH3U_Post_data_receive_unexpected(MPID_Request * rreqp);
-int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, MPIDI_msg_sz_t *buflen, int *complete);
-int MPIDI_CH3U_Receive_data_unexpected(MPID_Request * rreq, char *buf, MPIDI_msg_sz_t *buflen, int *complete);
+int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, intptr_t *buflen, int *complete);
+int MPIDI_CH3U_Receive_data_unexpected(MPID_Request * rreq, char *buf, intptr_t *buflen, int *complete);
 
 /* Initialization routine for ch3u_comm.c */
 int MPIDI_CH3I_Comm_init(void);
@@ -1545,7 +1541,7 @@ int MPIDI_CH3_Get_business_card(int myRank, char *value, int length);
   if the channel has made guarantees about ordering.
 E*/
 int MPIDI_CH3U_Handle_recv_pkt(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, 
-			       MPIDI_msg_sz_t *buflen, MPID_Request ** rreqp);
+			       intptr_t *buflen, MPID_Request ** rreqp);
 
 /*@
   MPIDI_CH3U_Handle_recv_req - Process a receive request for which all of the 
@@ -1675,69 +1671,69 @@ int MPIDI_GetTagFromPort( const char *, int * );
 
 /* Here are the packet handlers */
 int MPIDI_CH3_PktHandler_EagerSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				   MPIDI_msg_sz_t *, MPID_Request ** );
+				   intptr_t *, MPID_Request ** );
 #ifdef USE_EAGER_SHORT
 int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-					 MPIDI_msg_sz_t *, MPID_Request ** );
+					 intptr_t *, MPID_Request ** );
 #endif
 int MPIDI_CH3_PktHandler_ReadySend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				    MPIDI_msg_sz_t *, MPID_Request ** );
+				    intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_EagerSyncSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-					MPIDI_msg_sz_t *, MPID_Request ** );
+					intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_EagerSyncAck( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				       MPIDI_msg_sz_t *, MPID_Request ** );
+				       intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-					MPIDI_msg_sz_t *, MPID_Request ** );
+					intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-					MPIDI_msg_sz_t *, MPID_Request ** );
+					intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_RndvSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				   MPIDI_msg_sz_t *, MPID_Request ** );
+				   intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_CancelSendReq( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-					MPIDI_msg_sz_t *, MPID_Request ** );
+					intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_CancelSendResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-					 MPIDI_msg_sz_t *, MPID_Request ** );
+					 intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_Put( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-			      MPIDI_msg_sz_t *, MPID_Request ** );
+			      intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				     MPIDI_msg_sz_t *, MPID_Request ** );
+				     intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_GetAccumulate( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-                                        MPIDI_msg_sz_t *, MPID_Request ** );
+                                        intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_CAS( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-                              MPIDI_msg_sz_t *, MPID_Request ** );
+                              intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_CASResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-                                  MPIDI_msg_sz_t *, MPID_Request ** );
+                                  intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_FOP( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-                              MPIDI_msg_sz_t *, MPID_Request ** );
+                              intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_FOPResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-                                  MPIDI_msg_sz_t *, MPID_Request ** );
+                                  intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_Get_AccumResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-                                        MPIDI_msg_sz_t *, MPID_Request ** );
+                                        intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_Get( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-			      MPIDI_msg_sz_t *, MPID_Request ** );
+			      intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_GetResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				 MPIDI_msg_sz_t *, MPID_Request ** );
+				 intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_Lock( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-			      MPIDI_msg_sz_t *, MPID_Request ** );
+			      intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_LockAck( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-				      MPIDI_msg_sz_t *, MPID_Request ** );
+				      intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_LockOpAck( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-                                    MPIDI_msg_sz_t *, MPID_Request ** );
+                                    intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_Unlock( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-                                 MPIDI_msg_sz_t *, MPID_Request ** );
+                                 intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_Flush( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-                                MPIDI_msg_sz_t *, MPID_Request ** );
+                                intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_Ack( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-                              MPIDI_msg_sz_t *, MPID_Request ** );
+                              intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_DecrAtCnt( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-                                    MPIDI_msg_sz_t *, MPID_Request ** );
+                                    intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_FlowCntlUpdate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-					 MPIDI_msg_sz_t *, MPID_Request ** );
+					 intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_Close( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, 
-				MPIDI_msg_sz_t *, MPID_Request ** );
+				intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_EndCH3( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *,
-				 MPIDI_msg_sz_t *, MPID_Request ** );
+				 intptr_t *, MPID_Request ** );
 int MPIDI_CH3_PktHandler_Revoke(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-                                MPIDI_msg_sz_t *buflen, MPID_Request **rreqp);
+                                intptr_t *buflen, MPID_Request **rreqp);
 int MPIDI_CH3_PktHandler_Init( MPIDI_CH3_PktHandler_Fcn *[], int );
 
 int MPIDI_CH3I_RMA_Make_progress_global(int *made_progress);
@@ -1757,29 +1753,29 @@ int MPIDI_CH3_PktPrint_EagerSyncAck( FILE *fp, MPIDI_CH3_Pkt_t *pkt );
 /* Routines to create packets (used in implementing MPI communications */
 int MPIDI_CH3_EagerNoncontigSend( MPID_Request **, MPIDI_CH3_Pkt_type_t, 
 				  const void *, MPI_Aint,
-				  MPI_Datatype, MPIDI_msg_sz_t, int, int, MPID_Comm *, 
+				  MPI_Datatype, intptr_t, int, int, MPID_Comm *,
 				  int );
 int MPIDI_CH3_EagerContigSend( MPID_Request **, MPIDI_CH3_Pkt_type_t, 
-			       const void *, MPIDI_msg_sz_t, int, 
+			       const void *, intptr_t, int,
 			       int, MPID_Comm *, int );
 int MPIDI_CH3_EagerContigShortSend( MPID_Request **, MPIDI_CH3_Pkt_type_t, 
-				    const void *, MPIDI_msg_sz_t, 
+				    const void *, intptr_t,
 				    int, int, MPID_Comm *, int );
 int MPIDI_CH3_EagerContigIsend( MPID_Request **, MPIDI_CH3_Pkt_type_t, 
-				const void *, MPIDI_msg_sz_t, int, 
+				const void *, intptr_t, int,
 				int, MPID_Comm *, int );
 
 
 int MPIDI_CH3_RndvSend( MPID_Request **, const void *, MPI_Aint, MPI_Datatype,
-			int, MPIDI_msg_sz_t, MPI_Aint, int, int, MPID_Comm *, int );
+			int, intptr_t, MPI_Aint, int, int, MPID_Comm *, int );
 
 int MPIDI_CH3_EagerSyncNoncontigSend( MPID_Request **, const void *, int, 
-				      MPI_Datatype, MPIDI_msg_sz_t, int, MPI_Aint,
+				      MPI_Datatype, intptr_t, int, MPI_Aint,
 				      int, int, MPID_Comm *, int );
 int MPIDI_CH3_EagerSyncZero(MPID_Request **, int, int, MPID_Comm *, int );
 
 int MPIDI_CH3_SendNoncontig_iov( struct MPIDI_VC *vc, struct MPID_Request *sreq,
-                                 void *header, MPIDI_msg_sz_t hdr_sz );
+                                 void *header, intptr_t hdr_sz );
 
 /* Routines to ack packets, called in the receive routines when a 
    message is matched */
diff --git a/src/mpid/ch3/include/mpidpkt.h b/src/mpid/ch3/include/mpidpkt.h
index 82a0921..abe83f2 100644
--- a/src/mpid/ch3/include/mpidpkt.h
+++ b/src/mpid/ch3/include/mpidpkt.h
@@ -137,7 +137,7 @@ typedef struct MPIDI_CH3_Pkt_send {
     MPIDI_CH3_Pkt_type_t type;  /* XXX - uint8_t to conserve space ??? */
     MPIDI_Message_match match;
     MPI_Request sender_req_id;  /* needed for ssend and send cancel */
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
 #if defined(MPID_USE_SEQUENCE_NUMBERS)
     MPID_Seqnum_t seqnum;
 #endif
@@ -153,7 +153,7 @@ typedef MPIDI_CH3_Pkt_send_t MPIDI_CH3_Pkt_ready_send_t;
 typedef struct MPIDI_CH3_Pkt_eagershort_send {
     MPIDI_CH3_Pkt_type_t type;  /* XXX - uint8_t to conserve space ??? */
     MPIDI_Message_match match;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
 #if defined(MPID_USE_SEQUENCE_NUMBERS)
     MPID_Seqnum_t seqnum;
 #endif
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 32ae02c..2c0a2d3 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -17,10 +17,6 @@ struct MPID_Request;
 #include <sys/types.h>
 #endif
 
-/* The maximum message size is the size of a pointer; this allows MPI_Aint 
-   to be larger than a pointer */
-typedef MPIU_Pint MPIDI_msg_sz_t;
-
 #include "mpid_dataloop.h"
 
 /* FIXME: Include here? */
@@ -50,7 +46,7 @@ struct MPID_Request;
    (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 );
+				     intptr_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. */
@@ -92,7 +88,7 @@ typedef MPIDI_Rank_t MPID_Node_id_t;
    information, which is beneficial for slower communication
    links. Further, this allows the total structure size to be 64 bits
    and the search operations can be optimized on 64-bit platforms. We
-   use a union of the actual required structure with a MPIU_Upint, so
+   use a union of the actual required structure with a uintptr_t, so
    in this optimized case, the "whole" field can be used for
    comparisons.
 
@@ -115,7 +111,7 @@ typedef struct MPIDI_Message_match_parts {
 } MPIDI_Message_match_parts_t;
 typedef union {
     MPIDI_Message_match_parts_t parts;
-    MPIU_Upint whole;
+    uintptr_t whole;
 } MPIDI_Message_match;
 
 /* Provides MPIDI_CH3_Pkt_t.  Must come after MPIDI_Message_match definition. */
@@ -386,8 +382,8 @@ typedef struct MPIDI_Request {
        non-contiguous datatypes */
     /*    MPID_Segment   segment; */
     struct MPID_Segment *segment_ptr;
-    MPIDI_msg_sz_t segment_first;
-    MPIDI_msg_sz_t segment_size;
+    intptr_t segment_first;
+    intptr_t segment_size;
 
     /* Pointer to datatype for reference counting purposes */
     struct MPID_Datatype * datatype_ptr;
@@ -417,10 +413,10 @@ typedef struct MPIDI_Request {
        unexpected eager messages and packing/unpacking
        buffers.  tmpuf_off is the current offset into the temporary buffer. */
     void          *tmpbuf;
-    MPIDI_msg_sz_t tmpbuf_off;
-    MPIDI_msg_sz_t tmpbuf_sz;
+    intptr_t tmpbuf_off;
+    intptr_t tmpbuf_sz;
 
-    MPIDI_msg_sz_t recv_data_sz;
+    intptr_t recv_data_sz;
     MPI_Request    sender_req_id;
 
     unsigned int   state;
@@ -455,7 +451,7 @@ typedef struct MPIDI_Request {
     void *ext_hdr_ptr; /* Pointer to extended packet header.
                         * It is allocated in RMA issuing/pkt_handler functions,
                         * and freed when release request. */
-    MPIDI_msg_sz_t ext_hdr_sz;
+    intptr_t ext_hdr_sz;
 
     struct MPIDI_RMA_Target *rma_target_ptr;
 
diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h
index 1775417..69a8aa3 100644
--- a/src/mpid/ch3/include/mpidrma.h
+++ b/src/mpid/ch3/include/mpidrma.h
@@ -320,7 +320,7 @@ static inline int send_flush_msg(int dest, MPID_Win * win_ptr)
 /* enqueue an unsatisfied origin in passive target at target side. */
 static inline int enqueue_lock_origin(MPID_Win * win_ptr, MPIDI_VC_t * vc,
                                       MPIDI_CH3_Pkt_t * pkt,
-                                      MPIDI_msg_sz_t * buflen, MPID_Request ** reqp)
+                                      intptr_t * buflen, MPID_Request ** reqp)
 {
     MPIDI_RMA_Target_lock_entry_t *new_ptr = NULL;
     MPIDI_CH3_Pkt_flags_t flag;
@@ -355,13 +355,13 @@ static inline int enqueue_lock_origin(MPID_Win * win_ptr, MPIDI_VC_t * vc,
     else {
         MPI_Aint type_size = 0;
         MPI_Aint type_extent;
-        MPIDI_msg_sz_t recv_data_sz = 0;
-        MPIDI_msg_sz_t buf_size = 0;
+        intptr_t recv_data_sz = 0;
+        intptr_t buf_size = 0;
         MPID_Request *req = NULL;
         MPI_Datatype target_dtp;
         int target_count;
         int complete = 0;
-        MPIDI_msg_sz_t data_len;
+        intptr_t data_len;
         char *data_buf = NULL;
         MPIDI_CH3_Pkt_flags_t flags;
 
@@ -1035,7 +1035,7 @@ static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datat
 
 static inline int check_piggyback_lock(MPID_Win * win_ptr, MPIDI_VC_t * vc,
                                        MPIDI_CH3_Pkt_t * pkt,
-                                       MPIDI_msg_sz_t * buflen,
+                                       intptr_t * buflen,
                                        int *acquire_lock_fail, MPID_Request ** reqp)
 {
     int lock_type;
diff --git a/src/mpid/ch3/src/ch3u_buffer.c b/src/mpid/ch3/src/ch3u_buffer.c
index d601bef..9b586bc 100644
--- a/src/mpid/ch3/src/ch3u_buffer.c
+++ b/src/mpid/ch3/src/ch3u_buffer.c
@@ -34,14 +34,14 @@ Used indirectly by mpid_irecv, mpid_recv (through MPIDI_CH3_RecvFromSelf) and
 #define FCNAME MPL_QUOTE(FUNCNAME)
 void MPIDI_CH3U_Buffer_copy(
     const void * const sbuf, MPI_Aint scount, MPI_Datatype sdt, int * smpi_errno,
-    void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt, MPIDI_msg_sz_t * rsz,
+    void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt, intptr_t * rsz,
     int * rmpi_errno)
 {
     int sdt_contig;
     int rdt_contig;
     MPI_Aint sdt_true_lb, rdt_true_lb;
-    MPIDI_msg_sz_t sdata_sz;
-    MPIDI_msg_sz_t rdata_sz;
+    intptr_t sdata_sz;
+    intptr_t rdata_sz;
     MPID_Datatype * sdt_ptr;
     MPID_Datatype * rdt_ptr;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_BUFFER_COPY);
@@ -58,7 +58,7 @@ void MPIDI_CH3U_Buffer_copy(
     if (sdata_sz > rdata_sz)
     {
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TYPICAL,(MPL_DBG_FDEST,
-	    "message truncated, sdata_sz=" MPIDI_MSG_SZ_FMT " rdata_sz=" MPIDI_MSG_SZ_FMT,
+	    "message truncated, sdata_sz=%" PRIdPTR " rdata_sz=%" PRIdPTR,
 			  sdata_sz, rdata_sz));
 	sdata_sz = rdata_sz;
 	*rmpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE, "**truncate", "**truncate %d %d", sdata_sz, rdata_sz );
@@ -86,10 +86,10 @@ void MPIDI_CH3U_Buffer_copy(
 	MPID_Segment_init(rbuf, rcount, rdt, &seg, 0);
 	last = sdata_sz;
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-                          "pre-unpack last=" MPIDI_MSG_SZ_FMT, last ));
+                          "pre-unpack last=%" PRIdPTR, last ));
 	MPID_Segment_unpack(&seg, 0, &last, (char*)sbuf + sdt_true_lb);
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-			 "pre-unpack last=" MPIDI_MSG_SZ_FMT, last ));
+			 "pre-unpack last=%" PRIdPTR, last ));
 	/* --BEGIN ERROR HANDLING-- */
 	if (last != sdata_sz)
 	{
@@ -107,10 +107,10 @@ void MPIDI_CH3U_Buffer_copy(
 	MPID_Segment_init(sbuf, scount, sdt, &seg, 0);
 	last = sdata_sz;
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-			       "pre-pack last=" MPIDI_MSG_SZ_FMT, last ));
+			       "pre-pack last=%" PRIdPTR, last ));
 	MPID_Segment_pack(&seg, 0, &last, (char*)rbuf + rdt_true_lb);
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-			    "post-pack last=" MPIDI_MSG_SZ_FMT, last ));
+			    "post-pack last=%" PRIdPTR, last ));
 	/* --BEGIN ERROR HANDLING-- */
 	if (last != sdata_sz)
 	{
@@ -123,11 +123,11 @@ void MPIDI_CH3U_Buffer_copy(
     else
     {
 	char * buf;
-	MPIDI_msg_sz_t buf_off;
+	intptr_t buf_off;
 	MPID_Segment sseg;
-	MPIDI_msg_sz_t sfirst;
+	intptr_t sfirst;
 	MPID_Segment rseg;
-	MPIDI_msg_sz_t rfirst;
+	intptr_t rfirst;
 
 	buf = MPL_malloc(MPIDI_COPY_BUFFER_SZ);
 	/* --BEGIN ERROR HANDLING-- */
@@ -163,11 +163,11 @@ void MPIDI_CH3U_Buffer_copy(
 	    }
 	    
 	    MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-               "pre-pack first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT, 
+               "pre-pack first=%" PRIdPTR ", last=%" PRIdPTR,
 						sfirst, last ));
 	    MPID_Segment_pack(&sseg, sfirst, &last, buf + buf_off);
 	    MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-               "post-pack first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT, 
+               "post-pack first=%" PRIdPTR ", last=%" PRIdPTR,
                sfirst, last ));
 	    /* --BEGIN ERROR HANDLING-- */
 	    MPIU_Assert(last > sfirst);
@@ -177,11 +177,11 @@ void MPIDI_CH3U_Buffer_copy(
 	    sfirst = last;
 	    
 	    MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-             "pre-unpack first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT, 
+             "pre-unpack first=%" PRIdPTR ", last=%" PRIdPTR,
 						rfirst, last ));
 	    MPID_Segment_unpack(&rseg, rfirst, &last, buf);
 	    MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-             "post-unpack first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT, 
+             "post-unpack first=%" PRIdPTR ", last=%" PRIdPTR,
 						rfirst, last ));
 	    /* --BEGIN ERROR HANDLING-- */
 	    MPIU_Assert(last > rfirst);
@@ -208,7 +208,7 @@ void MPIDI_CH3U_Buffer_copy(
 	    if (buf_off > 0)
 	    {
 		MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, VERBOSE, (MPL_DBG_FDEST,
-                  "moved " MPIDI_MSG_SZ_FMT " bytes to the beginning of the tmp buffer", buf_off));
+                  "moved %" PRIdPTR " bytes to the beginning of the tmp buffer", buf_off));
 		memmove(buf, buf_end - buf_off, buf_off);
 	    }
 	}
@@ -234,7 +234,7 @@ int MPIDI_CH3_RecvFromSelf( MPID_Request *rreq, void *buf, MPI_Aint count,
 
     if (sreq != NULL)
     {
-	MPIDI_msg_sz_t data_sz;
+	intptr_t data_sz;
 	
 	MPIDI_CH3U_Buffer_copy(sreq->dev.user_buf, sreq->dev.user_count,
 			       sreq->dev.datatype, &sreq->status.MPI_ERROR,
diff --git a/src/mpid/ch3/src/ch3u_eager.c b/src/mpid/ch3/src/ch3u_eager.c
index 4f62505..aa880a5 100644
--- a/src/mpid/ch3/src/ch3u_eager.c
+++ b/src/mpid/ch3/src/ch3u_eager.c
@@ -21,7 +21,7 @@
    IOV and calling iSendv.  The caller must initialize
    sreq->dev.segment as well as segment_first and segment_size. */
 int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPID_Request *sreq,
-                                 void *header, MPIDI_msg_sz_t hdr_sz )
+                                 void *header, intptr_t hdr_sz )
 {
     int mpi_errno = MPI_SUCCESS;
     int iov_n;
@@ -88,7 +88,7 @@ int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPID_Request *sreq,
 int MPIDI_CH3_EagerNoncontigSend( MPID_Request **sreq_p, 
 				  MPIDI_CH3_Pkt_type_t reqtype, 
 				  const void * buf, MPI_Aint count,
-				  MPI_Datatype datatype, MPIDI_msg_sz_t data_sz,
+				  MPI_Datatype datatype, intptr_t data_sz,
 				  int rank, 
 				  int tag, MPID_Comm * comm, 
 				  int context_offset )
@@ -100,7 +100,7 @@ int MPIDI_CH3_EagerNoncontigSend( MPID_Request **sreq_p,
     MPIDI_CH3_Pkt_eager_send_t * const eager_pkt = &upkt.eager_send;
     
     MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-                     "sending non-contiguous eager message, data_sz=" MPIDI_MSG_SZ_FMT,
+                     "sending non-contiguous eager message, data_sz=%" PRIdPTR,
 					data_sz));
     sreq->dev.OnDataAvail = 0;
     sreq->dev.OnFinal = 0;
@@ -153,7 +153,7 @@ int MPIDI_CH3_EagerNoncontigSend( MPID_Request **sreq_p,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_EagerContigSend( MPID_Request **sreq_p, 
 			       MPIDI_CH3_Pkt_type_t reqtype, 
-			       const void * buf, MPIDI_msg_sz_t data_sz, int rank, 
+			       const void * buf, intptr_t data_sz, int rank,
 			       int tag, MPID_Comm * comm, int context_offset )
 {
     int mpi_errno = MPI_SUCCESS;
@@ -174,7 +174,7 @@ int MPIDI_CH3_EagerContigSend( MPID_Request **sreq_p,
     iov[0].MPL_IOV_LEN = sizeof(*eager_pkt);
     
     MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-	       "sending contiguous eager message, data_sz=" MPIDI_MSG_SZ_FMT,
+	       "sending contiguous eager message, data_sz=%" PRIdPTR,
 					data_sz));
 	    
     iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) buf;
@@ -219,7 +219,7 @@ int MPIDI_CH3_EagerContigSend( MPID_Request **sreq_p,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_EagerContigShortSend( MPID_Request **sreq_p, 
 				    MPIDI_CH3_Pkt_type_t reqtype, 
-				    const void * buf, MPIDI_msg_sz_t data_sz, int rank, 
+				    const void * buf, intptr_t data_sz, int rank,
 				    int tag, MPID_Comm * comm, 
 				    int context_offset )
 {
@@ -238,7 +238,7 @@ int MPIDI_CH3_EagerContigShortSend( MPID_Request **sreq_p,
     eagershort_pkt->data_sz	     = data_sz;
     
     MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-       "sending contiguous short eager message, data_sz=" MPIDI_MSG_SZ_FMT,
+       "sending contiguous short eager message, data_sz=%" PRIdPTR,
 					data_sz));
 	    
     MPIDI_Comm_get_vc_set_active(comm, rank, &vc);
@@ -289,7 +289,7 @@ int MPIDI_CH3_EagerContigShortSend( MPID_Request **sreq_p,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, 
-					 MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+					 intptr_t *buflen, MPID_Request **rreqp )
 {
     MPIDI_CH3_Pkt_eagershort_send_t * eagershort_pkt = &pkt->eagershort_send;
     MPID_Request * rreq;
@@ -340,9 +340,9 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 	if (found) {
 	    int            dt_contig;
 	    MPI_Aint       dt_true_lb;
-	    MPIDI_msg_sz_t userbuf_sz;
+	    intptr_t userbuf_sz;
 	    MPID_Datatype *dt_ptr;
-	    MPIDI_msg_sz_t data_sz;
+	    intptr_t data_sz;
 
 	    /* Make sure that we handle the general (non-contiguous)
 	       datatypes correctly while optimizing for the 
@@ -355,9 +355,9 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 	    }
 	    else {
 		MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-		    "receive buffer too small; message truncated, msg_sz=" 
-					  MPIDI_MSG_SZ_FMT ", userbuf_sz="
-				          MPIDI_MSG_SZ_FMT,
+		    "receive buffer too small; message truncated, msg_sz=%"
+					  PRIdPTR ", userbuf_sz=%"
+				          PRIdPTR,
 				 rreq->dev.recv_data_sz, userbuf_sz));
 		rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, 
                      MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE,
@@ -396,7 +396,7 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 		   to fix this, but it will require a sweep of the code */
 	    }
 	    else {
-		MPIDI_msg_sz_t recv_data_sz;
+		intptr_t recv_data_sz;
 		MPI_Aint last;
 		/* user buffer is not contiguous.  Use the segment
 		   code to unpack it, handling various errors and 
@@ -436,7 +436,7 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
              * cool in this case?  No upper layer has a pointer to rreq yet
              * (it's unexpected and freshly allocated) 
              */
-	    MPIDI_msg_sz_t recv_data_sz;
+	    intptr_t recv_data_sz;
 	    /* This is easy; copy the data into a temporary buffer.
 	       To begin with, we use the same temporary location as
 	       is used in receiving eager unexpected data.
@@ -527,7 +527,7 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_EagerContigIsend( MPID_Request **sreq_p, 
 				MPIDI_CH3_Pkt_type_t reqtype, 
-				const void * buf, MPIDI_msg_sz_t data_sz, int rank, 
+				const void * buf, intptr_t data_sz, int rank,
 				int tag, MPID_Comm * comm, int context_offset )
 {
     int mpi_errno = MPI_SUCCESS;
@@ -538,7 +538,7 @@ int MPIDI_CH3_EagerContigIsend( MPID_Request **sreq_p,
     MPL_IOV iov[MPL_IOV_LIMIT];
 
     MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-	       "sending contiguous eager message, data_sz=" MPIDI_MSG_SZ_FMT,
+	       "sending contiguous eager message, data_sz=%" PRIdPTR,
 					data_sz));
 	    
     sreq->dev.OnDataAvail = 0;
@@ -605,14 +605,14 @@ int MPIDI_CH3_EagerContigIsend( MPID_Request **sreq_p,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_EagerSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, 
-				    MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+				    intptr_t *buflen, MPID_Request **rreqp )
 {
     MPIDI_CH3_Pkt_eager_send_t * eager_pkt = &pkt->eager_send;
     MPID_Request * rreq;
     int found;
     int complete;
     char *data_buf;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     int mpi_errno = MPI_SUCCESS;
 
     MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_MSGQ_MUTEX);
@@ -695,14 +695,14 @@ int MPIDI_CH3_PktHandler_EagerSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_ReadySend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-				    MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+				    intptr_t *buflen, MPID_Request **rreqp )
 {
     MPIDI_CH3_Pkt_ready_send_t * ready_pkt = &pkt->ready_send;
     MPID_Request * rreq;
     int found;
     int complete;
     char *data_buf;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     int mpi_errno = MPI_SUCCESS;
     
     MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
diff --git a/src/mpid/ch3/src/ch3u_eagersync.c b/src/mpid/ch3/src/ch3u_eagersync.c
index e1c635e..29157e2 100644
--- a/src/mpid/ch3/src/ch3u_eagersync.c
+++ b/src/mpid/ch3/src/ch3u_eagersync.c
@@ -28,7 +28,7 @@
 */
 int MPIDI_CH3_EagerSyncNoncontigSend( MPID_Request **sreq_p, 
 				      const void * buf, int count, 
-				      MPI_Datatype datatype, MPIDI_msg_sz_t data_sz, 
+				      MPI_Datatype datatype, intptr_t data_sz,
 				      int dt_contig, MPI_Aint dt_true_lb,
 				      int rank, 
 				      int tag, MPID_Comm * comm, 
@@ -65,7 +65,7 @@ int MPIDI_CH3_EagerSyncNoncontigSend( MPID_Request **sreq_p,
     {
         MPL_IOV iov[2];
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-                                            "sending contiguous sync eager message, data_sz=" MPIDI_MSG_SZ_FMT, 
+                                            "sending contiguous sync eager message, data_sz=%" PRIdPTR,
 					    data_sz));
 	
         iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)es_pkt;
@@ -90,7 +90,7 @@ int MPIDI_CH3_EagerSyncNoncontigSend( MPID_Request **sreq_p,
     else
     {
 	MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,VERBOSE,
-		       "sending non-contiguous sync eager message, data_sz=" MPIDI_MSG_SZ_FMT, 
+		       "sending non-contiguous sync eager message, data_sz=%" PRIdPTR,
 		       data_sz);
 	
 	sreq->dev.segment_ptr = MPID_Segment_alloc( );
@@ -145,7 +145,7 @@ int MPIDI_CH3_EagerSyncZero(MPID_Request **sreq_p, int rank, int tag,
     MPIDI_Pkt_set_seqnum(es_pkt, seqnum);
     MPIDI_Request_set_seqnum(sreq, seqnum);
     
-    MPL_DBG_MSGPKT(vc,tag,es_pkt->match.parts.context_id,rank,(MPIDI_msg_sz_t)0,"EagerSync0");
+    MPL_DBG_MSGPKT(vc,tag,es_pkt->match.parts.context_id,rank,(intptr_t)0,"EagerSync0");
     MPID_THREAD_CS_ENTER(POBJ, vc->pobj_mutex);
     mpi_errno = MPIDI_CH3_iSend(vc, sreq, es_pkt, sizeof(*es_pkt));
     MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex);
@@ -213,14 +213,14 @@ int MPIDI_CH3_EagerSyncAck( MPIDI_VC_t *vc, MPID_Request *rreq )
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_EagerSyncSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-					MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+					intptr_t *buflen, MPID_Request **rreqp )
 {
     MPIDI_CH3_Pkt_eager_send_t * es_pkt = &pkt->eager_send;
     MPID_Request * rreq;
     int found;
     int complete;
     char *data_buf;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     int mpi_errno = MPI_SUCCESS;
     
     MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
@@ -346,7 +346,7 @@ int MPIDI_CH3_PktHandler_EagerSyncSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_EagerSyncAck( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-				       MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+				       intptr_t *buflen, MPID_Request **rreqp )
 {
     MPIDI_CH3_Pkt_eager_sync_ack_t * esa_pkt = &pkt->eager_sync_ack;
     MPID_Request * sreq;
diff --git a/src/mpid/ch3/src/ch3u_handle_connection.c b/src/mpid/ch3/src/ch3u_handle_connection.c
index 1d32a3b..37f2381 100644
--- a/src/mpid/ch3/src/ch3u_handle_connection.c
+++ b/src/mpid/ch3/src/ch3u_handle_connection.c
@@ -277,7 +277,7 @@ int MPIDI_CH3U_VC_SendClose( MPIDI_VC_t *vc, int rank )
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_Close( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, 
-				MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+				intptr_t *buflen, MPID_Request **rreqp )
 {
     MPIDI_CH3_Pkt_close_t * close_pkt = &pkt->close;
     int mpi_errno = MPI_SUCCESS;
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_pkt.c b/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
index 87c7604..316bf73 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
@@ -53,7 +53,7 @@
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3U_Handle_ordered_recv_pkt(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, 
-				       MPIDI_msg_sz_t *buflen, MPID_Request ** rreqp)
+				       intptr_t *buflen, MPID_Request ** rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     static MPIDI_CH3_PktHandler_Fcn *pktArray[MPIDI_CH3_PKT_END_CH3+1];
@@ -102,13 +102,13 @@ int MPIDI_CH3U_Handle_ordered_recv_pkt(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 #define FUNCNAME MPIDI_CH3U_Receive_data_found
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, MPIDI_msg_sz_t *buflen, int *complete)
+int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, intptr_t *buflen, int *complete)
 {
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPIDI_msg_sz_t userbuf_sz;
+    intptr_t userbuf_sz;
     MPID_Datatype * dt_ptr = NULL;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_RECEIVE_DATA_FOUND);
 
@@ -124,8 +124,8 @@ int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, MPIDI_msg_sz_t
     }
     else {
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-               "receive buffer too small; message truncated, msg_sz=" MPIDI_MSG_SZ_FMT ", userbuf_sz="
-					    MPIDI_MSG_SZ_FMT,
+               "receive buffer too small; message truncated, msg_sz=%" PRIdPTR ", userbuf_sz=%"
+					    PRIdPTR,
 				 rreq->dev.recv_data_sz, userbuf_sz));
 	rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, 
                      MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE,
@@ -186,7 +186,7 @@ int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, MPIDI_msg_sz_t
            iov and let the channel unpack */
         if (data_sz == rreq->dev.recv_data_sz && *buflen >= data_sz)
         {
-            MPIDI_msg_sz_t last;
+            intptr_t last;
             MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"Copying noncontiguous data to user buffer");
             last = data_sz;
             MPID_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, 
@@ -235,7 +235,7 @@ fn_fail:
 #define FUNCNAME MPIDI_CH3U_Receive_data_unexpected
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-int MPIDI_CH3U_Receive_data_unexpected(MPID_Request * rreq, char *buf, MPIDI_msg_sz_t *buflen, int *complete)
+int MPIDI_CH3U_Receive_data_unexpected(MPID_Request * rreq, char *buf, intptr_t *buflen, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_RECEIVE_DATA_UNEXPECTED);
@@ -298,9 +298,9 @@ int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreq)
     int mpi_errno = MPI_SUCCESS;	
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPIDI_msg_sz_t userbuf_sz;
+    intptr_t userbuf_sz;
     MPID_Datatype * dt_ptr = NULL;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_POST_DATA_RECEIVE_FOUND);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3U_POST_DATA_RECEIVE_FOUND);
@@ -315,8 +315,8 @@ int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreq)
     }
     else {
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-               "receive buffer too small; message truncated, msg_sz=" MPIDI_MSG_SZ_FMT ", userbuf_sz="
-					    MPIDI_MSG_SZ_FMT,
+               "receive buffer too small; message truncated, msg_sz=%" PRIdPTR ", userbuf_sz=%"
+					    PRIdPTR,
 				 rreq->dev.recv_data_sz, userbuf_sz));
 	rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS, 
                      MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE,
@@ -484,7 +484,7 @@ int MPIDI_CH3I_Try_acquire_win_lock(MPID_Win *win_ptr, int requested_lock)
 #define FUNCNAME MPIDI_CH3_PktHandler_FlowCntlUpdate
 #undef FCNAME
 int MPIDI_CH3_PktHandler_FlowCntlUpdate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-					 MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+					 intptr_t *buflen, MPID_Request **rreqp)
 {
     *buflen = sizeof(MPIDI_CH3_Pkt_t);
     return MPI_SUCCESS;
@@ -497,7 +497,7 @@ int MPIDI_CH3_PktHandler_FlowCntlUpdate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_EndCH3( MPIDI_VC_t *vc ATTRIBUTE((unused)), 
 				 MPIDI_CH3_Pkt_t *pkt ATTRIBUTE((unused)),
-				 MPIDI_msg_sz_t *buflen ATTRIBUTE((unused)), 
+				 intptr_t *buflen ATTRIBUTE((unused)),
 				 MPID_Request **rreqp ATTRIBUTE((unused)) )
 {
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_PKTHANDLER_ENDCH3);
diff --git a/src/mpid/ch3/src/ch3u_handle_revoke_pkt.c b/src/mpid/ch3/src/ch3u_handle_revoke_pkt.c
index 3d247fd..3980c76 100644
--- a/src/mpid/ch3/src/ch3u_handle_revoke_pkt.c
+++ b/src/mpid/ch3/src/ch3u_handle_revoke_pkt.c
@@ -11,7 +11,7 @@
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_Revoke(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-                                MPIDI_msg_sz_t *buflen, MPID_Request **rreqp)
+                                intptr_t *buflen, MPID_Request **rreqp)
 {
     MPIDI_CH3_Pkt_revoke_t *revoke_pkt = &pkt->revoke;
     int mpi_errno = MPI_SUCCESS;
diff --git a/src/mpid/ch3/src/ch3u_request.c b/src/mpid/ch3/src/ch3u_request.c
index 6f673a5..17ac413 100644
--- a/src/mpid/ch3/src/ch3u_request.c
+++ b/src/mpid/ch3/src/ch3u_request.c
@@ -148,7 +148,7 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
     MPIU_Assert(sreq->dev.segment_ptr != NULL);
     last = sreq->dev.segment_size;
     MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
-     "pre-pv: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT ", iov_n=%d",
+     "pre-pv: first=%" PRIdPTR ", last=%" PRIdPTR ", iov_n=%d",
 		      sreq->dev.segment_first, last, *iov_n));
     MPIU_Assert(sreq->dev.segment_first < last);
     MPIU_Assert(last > 0);
@@ -156,7 +156,7 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
     MPID_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, 
 			     &last, iov, iov_n);
     MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
-    "post-pv: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT ", iov_n=%d",
+    "post-pv: first=%" PRIdPTR ", last=%" PRIdPTR ", iov_n=%d",
 		      sreq->dev.segment_first, last, *iov_n));
     MPIU_Assert(*iov_n > 0 && *iov_n <= MPL_IOV_LIMIT);
     
@@ -173,7 +173,7 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
     }
     else
     {
-	MPIDI_msg_sz_t data_sz;
+	intptr_t data_sz;
 	int i, iov_data_copied;
 	
 	MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,VERBOSE,"low density.  using SRBuf.");
@@ -207,12 +207,12 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
 	    sreq->dev.segment_size :
 	    sreq->dev.segment_first + sreq->dev.tmpbuf_sz - iov_data_copied;
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
-               "pre-pack: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT,
+               "pre-pack: first=%" PRIdPTR ", last=%" PRIdPTR,
 			  sreq->dev.segment_first, last));
 	MPID_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, 
 			  &last, (char*) sreq->dev.tmpbuf + iov_data_copied);
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
-              "post-pack: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT,
+              "post-pack: first=%" PRIdPTR ", last=%" PRIdPTR,
 			   sreq->dev.segment_first, last));
 	iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)sreq->dev.tmpbuf;
 	iov[0].MPL_IOV_LEN = last - sreq->dev.segment_first + iov_data_copied;
@@ -252,7 +252,7 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
 int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
 {
     MPI_Aint last;
-    static MPIDI_msg_sz_t orig_segment_first = MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET;
+    static intptr_t orig_segment_first = MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_REQUEST_LOAD_RECV_IOV);
 
@@ -270,8 +270,8 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
             MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_GET_ACCUM_RECV &&
             MPIDI_Request_get_srbuf_flag(rreq))
 	{
-	    MPIDI_msg_sz_t data_sz;
-	    MPIDI_msg_sz_t tmpbuf_sz;
+	    intptr_t data_sz;
+	    intptr_t tmpbuf_sz;
 
 	    /* Once a SRBuf is in use, we continue to use it since a small 
 	       amount of data may already be present at the beginning
@@ -317,7 +317,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
 	rreq->dev.iov_count = MPL_IOV_LIMIT;
 	rreq->dev.iov_offset = 0;
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
-   "pre-upv: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT ", iov_n=%d",
+   "pre-upv: first=%" PRIdPTR ", last=%" PRIdPTR ", iov_n=%d",
 			  rreq->dev.segment_first, last, rreq->dev.iov_count));
 	MPIU_Assert(rreq->dev.segment_first < last);
 	MPIU_Assert(last > 0);
@@ -325,7 +325,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
 				   rreq->dev.segment_first,
 				   &last, &rreq->dev.iov[0], &rreq->dev.iov_count);
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
-   "post-upv: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT ", iov_n=%d, iov_offset=%lld",
+   "post-upv: first=%" PRIdPTR ", last=%" PRIdPTR ", iov_n=%d, iov_offset=%lld",
 			  rreq->dev.segment_first, last, rreq->dev.iov_count, (long long)rreq->dev.iov_offset));
 	MPIU_Assert(rreq->dev.iov_count >= 0 && rreq->dev.iov_count <= 
 		    MPL_IOV_LIMIT);
@@ -403,7 +403,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
     {
 	/* receive and toss any extra data that does not fit in the user's 
 	   buffer */
-	MPIDI_msg_sz_t data_sz;
+	intptr_t data_sz;
 
 	data_sz = rreq->dev.recv_data_sz - rreq->dev.segment_first;
 	if (!MPIDI_Request_get_srbuf_flag(rreq))
@@ -539,9 +539,9 @@ int MPIDI_CH3U_Request_unpack_uebuf(MPID_Request * rreq)
 {
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPIDI_msg_sz_t userbuf_sz;
+    intptr_t userbuf_sz;
     MPID_Datatype * dt_ptr;
-    MPIDI_msg_sz_t unpack_sz;
+    intptr_t unpack_sz;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_REQUEST_UNPACK_UEBUF);
     MPIDI_STATE_DECL(MPID_STATE_MEMCPY);
@@ -559,8 +559,8 @@ int MPIDI_CH3U_Request_unpack_uebuf(MPID_Request * rreq)
     {
 	/* --BEGIN ERROR HANDLING-- */
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
-      "receive buffer overflow; message truncated, msg_sz=" MPIDI_MSG_SZ_FMT 
-	      ", buf_sz=" MPIDI_MSG_SZ_FMT, 
+      "receive buffer overflow; message truncated, msg_sz=%" PRIdPTR
+	      ", buf_sz=%" PRIdPTR,
                 rreq->dev.recv_data_sz, userbuf_sz));
 	unpack_sz = userbuf_sz;
 	MPIR_STATUS_SET_COUNT(rreq->status, userbuf_sz);
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index 76de395..514672b 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -47,7 +47,7 @@ int MPIDI_CH3I_Put(const void *origin_addr, int origin_count, MPI_Datatype
     int dt_contig ATTRIBUTE((unused)), rank;
     MPID_Datatype *dtp;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
     int made_progress = 0;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_PUT);
@@ -221,7 +221,7 @@ int MPIDI_CH3I_Get(void *origin_addr, int origin_count, MPI_Datatype
                    MPID_Request * ureq)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_msg_sz_t orig_data_sz, target_data_sz;
+    intptr_t orig_data_sz, target_data_sz;
     int dt_contig ATTRIBUTE((unused)), rank;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
     MPID_Datatype *dtp;
@@ -318,7 +318,7 @@ int MPIDI_CH3I_Get(void *origin_addr, int origin_count, MPI_Datatype
         MPID_Datatype_is_contig(target_datatype, &is_target_contig);
 
         MPID_Datatype_get_size_macro(target_datatype, target_type_size);
-        MPIU_Assign_trunc(target_data_sz, target_count * target_type_size, MPIDI_msg_sz_t);
+        MPIU_Assign_trunc(target_data_sz, target_count * target_type_size, intptr_t);
 
         /* Judge if we can use IMMED data response packet */
         if (MPIR_DATATYPE_IS_PREDEFINED(origin_datatype) &&
@@ -391,7 +391,7 @@ int MPIDI_CH3I_Accumulate(const void *origin_addr, int origin_count, MPI_Datatyp
                           MPID_Win * win_ptr, MPID_Request * ureq)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     int dt_contig ATTRIBUTE((unused)), rank;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
     MPID_Datatype *dtp;
@@ -603,7 +603,7 @@ int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count,
                               MPID_Win * win_ptr, MPID_Request * ureq)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIDI_msg_sz_t orig_data_sz, target_data_sz;
+    intptr_t orig_data_sz, target_data_sz;
     int rank;
     int dt_contig ATTRIBUTE((unused));
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
@@ -715,7 +715,7 @@ int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count,
 
         if (is_empty_origin == FALSE) {
             MPID_Datatype_get_size_macro(origin_datatype, origin_type_size);
-            MPIU_Assign_trunc(orig_data_sz, origin_count * origin_type_size, MPIDI_msg_sz_t);
+            MPIU_Assign_trunc(orig_data_sz, origin_count * origin_type_size, intptr_t);
         }
         else {
             /* If origin buffer is empty, set origin data size to 0 */
diff --git a/src/mpid/ch3/src/ch3u_rma_pkthandler.c b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
index 0b87edf..b571027 100644
--- a/src/mpid/ch3/src/ch3u_rma_pkthandler.c
+++ b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
@@ -258,13 +258,13 @@ static int MPIDI_CH3_ExtPktHandler_GetAccumulate(MPIDI_CH3_Pkt_flags_t flags,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
-                             MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                             intptr_t * buflen, MPID_Request ** rreqp)
 {
     MPIDI_CH3_Pkt_put_t *put_pkt = &pkt->put;
     MPID_Request *req = NULL;
     int complete = 0;
     char *data_buf = NULL;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     MPID_Win *win_ptr;
     int acquire_lock_fail = 0;
     int mpi_errno = MPI_SUCCESS;
@@ -432,14 +432,14 @@ int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
-                             MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                             intptr_t * buflen, MPID_Request ** rreqp)
 {
     MPIDI_CH3_Pkt_get_t *get_pkt = &pkt->get;
     MPID_Request *req = NULL;
     MPL_IOV iov[MPL_IOV_LIMIT];
     int complete = 0;
     char *data_buf = NULL;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     MPID_Win *win_ptr;
     int mpi_errno = MPI_SUCCESS;
     MPI_Aint type_size;
@@ -645,14 +645,14 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
-                                    MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                                    intptr_t * buflen, MPID_Request ** rreqp)
 {
     MPIDI_CH3_Pkt_accum_t *accum_pkt = &pkt->accum;
     MPID_Request *req = NULL;
     MPI_Aint extent;
     int complete = 0;
     char *data_buf = NULL;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     MPID_Win *win_ptr;
     int acquire_lock_fail = 0;
     int mpi_errno = MPI_SUCCESS;
@@ -857,14 +857,14 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
-                                       MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                                       intptr_t * buflen, MPID_Request ** rreqp)
 {
     MPIDI_CH3_Pkt_get_accum_t *get_accum_pkt = &pkt->get_accum;
     MPID_Request *req = NULL;
     MPI_Aint extent;
     int complete = 0;
     char *data_buf = NULL;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     MPID_Win *win_ptr;
     int acquire_lock_fail = 0;
     int mpi_errno = MPI_SUCCESS;
@@ -1145,7 +1145,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_CAS(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
-                             MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                             intptr_t * buflen, MPID_Request ** rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3_Pkt_t upkt;
@@ -1258,7 +1258,7 @@ int MPIDI_CH3_PktHandler_CAS(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_CASResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
                                  MPIDI_CH3_Pkt_t * pkt,
-                                 MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                                 intptr_t * buflen, MPID_Request ** rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3_Pkt_cas_resp_t *cas_resp_pkt = &pkt->cas_resp;
@@ -1319,7 +1319,7 @@ int MPIDI_CH3_PktHandler_CASResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
-                             MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                             intptr_t * buflen, MPID_Request ** rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3_Pkt_fop_t *fop_pkt = &pkt->fop;
@@ -1427,7 +1427,7 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 
         MPID_Request *req = NULL;
         char *data_buf = NULL;
-        MPIDI_msg_sz_t data_len;
+        intptr_t data_len;
         MPI_Aint extent;
         int complete = 0;
         int is_empty_origin = FALSE;
@@ -1508,14 +1508,14 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_FOPResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
                                  MPIDI_CH3_Pkt_t * pkt,
-                                 MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                                 intptr_t * buflen, MPID_Request ** rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3_Pkt_fop_resp_t *fop_resp_pkt = &pkt->fop_resp;
     MPID_Request *req = NULL;
     MPID_Win *win_ptr = NULL;
     MPI_Aint type_size;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     char *data_buf = NULL;
     int complete = 0;
     int target_rank = fop_resp_pkt->target_rank;
@@ -1597,13 +1597,13 @@ int MPIDI_CH3_PktHandler_FOPResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
-                                       MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                                       intptr_t * buflen, MPID_Request ** rreqp)
 {
     MPIDI_CH3_Pkt_get_accum_resp_t *get_accum_resp_pkt = &pkt->get_accum_resp;
     MPID_Request *req;
     int complete = 0;
     char *data_buf = NULL;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     int mpi_errno = MPI_SUCCESS;
     MPI_Aint type_size;
     MPID_Win *win_ptr;
@@ -1735,7 +1735,7 @@ int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_Lock(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
-                              MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                              intptr_t * buflen, MPID_Request ** rreqp)
 {
     MPIDI_CH3_Pkt_lock_t *lock_pkt = &pkt->lock;
     MPID_Win *win_ptr = NULL;
@@ -1791,13 +1791,13 @@ int MPIDI_CH3_PktHandler_Lock(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_GetResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
                                  MPIDI_CH3_Pkt_t * pkt,
-                                 MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                                 intptr_t * buflen, MPID_Request ** rreqp)
 {
     MPIDI_CH3_Pkt_get_resp_t *get_resp_pkt = &pkt->get_resp;
     MPID_Request *req;
     int complete = 0;
     char *data_buf = NULL;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     int mpi_errno = MPI_SUCCESS;
     MPI_Aint type_size;
     MPID_Win *win_ptr;
@@ -1877,7 +1877,7 @@ int MPIDI_CH3_PktHandler_GetResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_LockAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
-                                 MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                                 intptr_t * buflen, MPID_Request ** rreqp)
 {
     MPIDI_CH3_Pkt_lock_ack_t *lock_ack_pkt = &pkt->lock_ack;
     MPID_Win *win_ptr = NULL;
@@ -1925,7 +1925,7 @@ int MPIDI_CH3_PktHandler_LockAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_LockOpAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
-                                   MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                                   intptr_t * buflen, MPID_Request ** rreqp)
 {
     MPIDI_CH3_Pkt_lock_op_ack_t *lock_op_ack_pkt = &pkt->lock_op_ack;
     MPID_Win *win_ptr = NULL;
@@ -1980,7 +1980,7 @@ int MPIDI_CH3_PktHandler_LockOpAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_Ack(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
-                             MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                             intptr_t * buflen, MPID_Request ** rreqp)
 {
     MPIDI_CH3_Pkt_ack_t *ack_pkt = &pkt->ack;
     MPID_Win *win_ptr = NULL;
@@ -2021,7 +2021,7 @@ int MPIDI_CH3_PktHandler_Ack(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_DecrAtCnt(MPIDI_VC_t * vc ATTRIBUTE((unused)),
                                    MPIDI_CH3_Pkt_t * pkt,
-                                   MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                                   intptr_t * buflen, MPID_Request ** rreqp)
 {
     MPIDI_CH3_Pkt_decr_at_counter_t *decr_at_cnt_pkt = &pkt->decr_at_cnt;
     MPID_Win *win_ptr;
@@ -2063,7 +2063,7 @@ int MPIDI_CH3_PktHandler_DecrAtCnt(MPIDI_VC_t * vc ATTRIBUTE((unused)),
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_Unlock(MPIDI_VC_t * vc ATTRIBUTE((unused)),
                                 MPIDI_CH3_Pkt_t * pkt,
-                                MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                                intptr_t * buflen, MPID_Request ** rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3_Pkt_unlock_t *unlock_pkt = &pkt->unlock;
@@ -2106,7 +2106,7 @@ int MPIDI_CH3_PktHandler_Unlock(MPIDI_VC_t * vc ATTRIBUTE((unused)),
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_Flush(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
-                               MPIDI_msg_sz_t * buflen, MPID_Request ** rreqp)
+                               intptr_t * buflen, MPID_Request ** rreqp)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3_Pkt_flush_t *flush_pkt = &pkt->flush;
diff --git a/src/mpid/ch3/src/ch3u_rma_reqops.c b/src/mpid/ch3/src/ch3u_rma_reqops.c
index 08b57ff..4882a48 100644
--- a/src/mpid/ch3/src/ch3u_rma_reqops.c
+++ b/src/mpid/ch3/src/ch3u_rma_reqops.c
@@ -21,7 +21,7 @@ int MPID_Rput(const void *origin_addr, int origin_count,
     int dt_contig ATTRIBUTE((unused));
     MPID_Datatype *dtp;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Request *ureq;
     MPIDI_STATE_DECL(MPID_STATE_MPID_RPUT);
 
@@ -84,7 +84,7 @@ int MPID_Rget(void *origin_addr, int origin_count,
     int dt_contig ATTRIBUTE((unused));
     MPID_Datatype *dtp;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Request *ureq;
     MPIDI_STATE_DECL(MPID_STATE_MPID_RGET);
 
@@ -147,7 +147,7 @@ int MPID_Raccumulate(const void *origin_addr, int origin_count,
     int dt_contig ATTRIBUTE((unused));
     MPID_Datatype *dtp;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Request *ureq;
     MPIDI_STATE_DECL(MPID_STATE_MPID_RACCUMULATE);
 
@@ -211,7 +211,7 @@ int MPID_Rget_accumulate(const void *origin_addr, int origin_count,
     int dt_contig ATTRIBUTE((unused));
     MPID_Datatype *dtp;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
-    MPIDI_msg_sz_t data_sz, trg_data_sz;
+    intptr_t data_sz, trg_data_sz;
     MPID_Request *ureq;
     MPIDI_STATE_DECL(MPID_STATE_MPID_RGET_ACCUMULATE);
 
diff --git a/src/mpid/ch3/src/ch3u_rndv.c b/src/mpid/ch3/src/ch3u_rndv.c
index 0410368..96aa8c5 100644
--- a/src/mpid/ch3/src/ch3u_rndv.c
+++ b/src/mpid/ch3/src/ch3u_rndv.c
@@ -17,7 +17,7 @@
 #define FCNAME MPL_QUOTE(FUNCNAME)
 /* MPIDI_CH3_RndvSend - Send a request to perform a rendezvous send */
 int MPIDI_CH3_RndvSend( MPID_Request **sreq_p, const void * buf, MPI_Aint count,
-			MPI_Datatype datatype, int dt_contig, MPIDI_msg_sz_t data_sz, 
+			MPI_Datatype datatype, int dt_contig, intptr_t data_sz,
 			MPI_Aint dt_true_lb,
 			int rank, 
 			int tag, MPID_Comm * comm, int context_offset )
@@ -30,7 +30,7 @@ int MPIDI_CH3_RndvSend( MPID_Request **sreq_p, const void * buf, MPI_Aint count,
     int          mpi_errno = MPI_SUCCESS;
 	
     MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER,VERBOSE,
-		   "sending rndv RTS, data_sz=" MPIDI_MSG_SZ_FMT, data_sz);
+		   "sending rndv RTS, data_sz=%" PRIdPTR, data_sz);
 
     sreq->dev.OnDataAvail = 0;
     
@@ -108,7 +108,7 @@ int MPIDI_CH3_RndvSend( MPID_Request **sreq_p, const void * buf, MPI_Aint count,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-					MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+					intptr_t *buflen, MPID_Request **rreqp )
 {
     MPID_Request * rreq;
     int found;
@@ -116,7 +116,7 @@ int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
     int mpi_errno = MPI_SUCCESS;
     
     MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
- "received rndv RTS pkt, sreq=0x%08x, rank=%d, tag=%d, context=%d, data_sz=" MPIDI_MSG_SZ_FMT,
+ "received rndv RTS pkt, sreq=0x%08x, rank=%d, tag=%d, context=%d, data_sz=%" PRIdPTR,
 	      rts_pkt->sender_req_id, rts_pkt->match.parts.rank, 
 					rts_pkt->match.parts.tag, 
               rts_pkt->match.parts.context_id, rts_pkt->data_sz));
@@ -196,7 +196,7 @@ int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-					MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+					intptr_t *buflen, MPID_Request **rreqp )
 {
     MPIDI_CH3_Pkt_rndv_clr_to_send_t * cts_pkt = &pkt->rndv_clr_to_send;
     MPID_Request * sreq;
@@ -205,7 +205,7 @@ int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
     MPIDI_CH3_Pkt_rndv_send_t * rs_pkt = &upkt.rndv_send;
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     MPID_Datatype * dt_ptr;
     int mpi_errno = MPI_SUCCESS;
     
@@ -242,7 +242,7 @@ int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 	MPL_IOV iov[MPL_IOV_LIMIT];
 
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
-		    "sending contiguous rndv data, data_sz=" MPIDI_MSG_SZ_FMT, 
+		    "sending contiguous rndv data, data_sz=%" PRIdPTR,
 					    data_sz));
 	
 	iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)rs_pkt;
@@ -281,13 +281,13 @@ int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 int MPIDI_CH3_PktHandler_RndvSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, 
-				   MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+				   intptr_t *buflen, MPID_Request **rreqp )
 {
     MPIDI_CH3_Pkt_rndv_send_t * rs_pkt = &pkt->rndv_send;
     int mpi_errno = MPI_SUCCESS;
     int complete;
     char *data_buf;
-    MPIDI_msg_sz_t data_len;
+    intptr_t data_len;
     MPID_Request *req;
     
     MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"received rndv send (data) pkt");
diff --git a/src/mpid/ch3/src/mpid_cancel_send.c b/src/mpid/ch3/src/mpid_cancel_send.c
index 1d159af..dba1fc8 100644
--- a/src/mpid/ch3/src/mpid_cancel_send.c
+++ b/src/mpid/ch3/src/mpid_cancel_send.c
@@ -227,7 +227,7 @@ int MPID_Cancel_send(MPID_Request * sreq)
  */
 
 int MPIDI_CH3_PktHandler_CancelSendReq( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
-					MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+					intptr_t *buflen, MPID_Request **rreqp )
 {
     MPIDI_CH3_Pkt_cancel_send_req_t * req_pkt = &pkt->cancel_send_req;
     MPID_Request * rreq;
@@ -291,7 +291,7 @@ int MPIDI_CH3_PktHandler_CancelSendReq( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 
 int MPIDI_CH3_PktHandler_CancelSendResp( MPIDI_VC_t *vc ATTRIBUTE((unused)), 
 					 MPIDI_CH3_Pkt_t *pkt,
-					 MPIDI_msg_sz_t *buflen, MPID_Request **rreqp )
+					 intptr_t *buflen, MPID_Request **rreqp )
 {
     MPIDI_CH3_Pkt_cancel_send_resp_t * resp_pkt = &pkt->cancel_send_resp;
     MPID_Request * sreq;
diff --git a/src/mpid/ch3/src/mpid_irsend.c b/src/mpid/ch3/src/mpid_irsend.c
index aafe788..b11bb1b 100644
--- a/src/mpid/ch3/src/mpid_irsend.c
+++ b/src/mpid/ch3/src/mpid_irsend.c
@@ -20,7 +20,7 @@ int MPID_Irsend(const void * buf, int count, MPI_Datatype datatype, int rank, in
 {
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_ready_send_t * const ready_pkt = &upkt.ready_send;
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
     MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/src/mpid_isend.c b/src/mpid/ch3/src/mpid_isend.c
index 12b7a31..f823d62 100644
--- a/src/mpid/ch3/src/mpid_isend.c
+++ b/src/mpid/ch3/src/mpid_isend.c
@@ -31,7 +31,7 @@ int MPID_Isend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank
 	       int tag, MPID_Comm * comm, int context_offset,
                MPID_Request ** request)
 {
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
     MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/src/mpid_issend.c b/src/mpid/ch3/src/mpid_issend.c
index 0bb336f..1d71357 100644
--- a/src/mpid/ch3/src/mpid_issend.c
+++ b/src/mpid/ch3/src/mpid_issend.c
@@ -18,7 +18,7 @@
 int MPID_Issend(const void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPID_Comm * comm, int context_offset,
 		MPID_Request ** request)
 {
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
     MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/src/mpid_rsend.c b/src/mpid/ch3/src/mpid_rsend.c
index 933b15a..2b321fc 100644
--- a/src/mpid/ch3/src/mpid_rsend.c
+++ b/src/mpid/ch3/src/mpid_rsend.c
@@ -22,7 +22,7 @@
 int MPID_Rsend(const void * buf, int count, MPI_Datatype datatype, int rank, int tag, MPID_Comm * comm, int context_offset,
 	       MPID_Request ** request)
 {
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
     MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/src/mpid_send.c b/src/mpid/ch3/src/mpid_send.c
index a540c01..81f2416 100644
--- a/src/mpid/ch3/src/mpid_send.c
+++ b/src/mpid/ch3/src/mpid_send.c
@@ -19,7 +19,7 @@ int MPID_Send(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank,
 	      int tag, MPID_Comm * comm, int context_offset,
 	      MPID_Request ** request)
 {
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
     MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/src/mpid_ssend.c b/src/mpid/ch3/src/mpid_ssend.c
index 3dd144b..31957b3 100644
--- a/src/mpid/ch3/src/mpid_ssend.c
+++ b/src/mpid/ch3/src/mpid_ssend.c
@@ -18,7 +18,7 @@
 int MPID_Ssend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int tag, MPID_Comm * comm, int context_offset,
 	       MPID_Request ** request)
 {
-    MPIDI_msg_sz_t data_sz;
+    intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
     MPID_Datatype * dt_ptr;
diff --git a/src/mpid/ch3/src/mpidi_isend_self.c b/src/mpid/ch3/src/mpidi_isend_self.c
index 5336fa9..75e5d22 100644
--- a/src/mpid/ch3/src/mpidi_isend_self.c
+++ b/src/mpid/ch3/src/mpidi_isend_self.c
@@ -82,7 +82,7 @@ int MPIDI_Isend_self(const void * buf, MPI_Aint count, MPI_Datatype datatype, in
     
     if (found)
     {
-	MPIDI_msg_sz_t data_sz;
+	intptr_t data_sz;
 	
         /* we found a posted req, which we now own, so we can release the CS */
         MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_MSGQ_MUTEX);
diff --git a/src/mpid/ch3/src/mpidi_printf.c b/src/mpid/ch3/src/mpidi_printf.c
index 99476ef..57ae376 100644
--- a/src/mpid/ch3/src/mpidi_printf.c
+++ b/src/mpid/ch3/src/mpidi_printf.c
@@ -212,14 +212,14 @@ const char *MPIDI_Pkt_GetDescString(MPIDI_CH3_Pkt_t * pkt)
     switch (pkt->type) {
     case MPIDI_CH3_PKT_EAGER_SEND:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                     "EAGER_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
+                     "EAGER_SEND - (%d,%d,%d,)%" PRIdPTR,
                      pkt->eager_send.match.parts.context_id,
                      (int) pkt->eager_send.match.parts.tag,
                      pkt->eager_send.match.parts.rank, pkt->eager_send.data_sz);
         break;
     case MPIDI_CH3_PKT_EAGER_SYNC_SEND:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                     "EAGER_SYNC_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
+                     "EAGER_SYNC_SEND - (%d,%d,%d,)%" PRIdPTR " req=%d",
                      pkt->eager_sync_send.match.parts.context_id,
                      (int) pkt->eager_sync_send.match.parts.tag,
                      pkt->eager_sync_send.match.parts.rank,
@@ -231,14 +231,14 @@ const char *MPIDI_Pkt_GetDescString(MPIDI_CH3_Pkt_t * pkt)
         break;
     case MPIDI_CH3_PKT_READY_SEND:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                     "READY_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
+                     "READY_SEND - (%d,%d,%d,)%" PRIdPTR,
                      pkt->ready_send.match.parts.context_id,
                      (int) pkt->ready_send.match.parts.tag,
                      pkt->ready_send.match.parts.rank, pkt->ready_send.data_sz);
         break;
     case MPIDI_CH3_PKT_RNDV_REQ_TO_SEND:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                     "RNDV_REQ_TO_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
+                     "RNDV_REQ_TO_SEND - (%d,%d,%d,)%" PRIdPTR " req=%d",
                      pkt->rndv_req_to_send.match.parts.context_id,
                      (int) pkt->rndv_req_to_send.match.parts.tag,
                      pkt->rndv_req_to_send.match.parts.rank,
diff --git a/src/mpid/pamid/include/mpidi_hooks.h b/src/mpid/pamid/include/mpidi_hooks.h
index b4228ca..16df7cb 100644
--- a/src/mpid/pamid/include/mpidi_hooks.h
+++ b/src/mpid/pamid/include/mpidi_hooks.h
@@ -40,7 +40,7 @@ typedef struct MPID_VCR_t * MPID_VCR ;
 typedef struct MPIDI_VCRT * MPID_VCRT;
 
 
-typedef size_t              MPIDI_msg_sz_t;
+typedef size_t              intptr_t;
 
 #define MPID_Irsend     MPID_Isend
 #define MPID_Rsend      MPID_Send
diff --git a/src/mpid/pamid/include/mpidi_prototypes.h b/src/mpid/pamid/include/mpidi_prototypes.h
index d12f241..be09041 100644
--- a/src/mpid/pamid/include/mpidi_prototypes.h
+++ b/src/mpid/pamid/include/mpidi_prototypes.h
@@ -65,7 +65,7 @@ void MPIDI_Buffer_copy(const void     * const sbuf,
                        void           * const rbuf,
                        MPI_Aint               rcount,
                        MPI_Datatype           rdt,
-                       MPIDI_msg_sz_t *       rsz,
+                       intptr_t *       rsz,
                        int            *       rmpi_errno);
 
 pami_result_t MPIDI_Send_handoff (pami_context_t context, void * sreq);
diff --git a/src/mpid/pamid/src/mpid_buffer.c b/src/mpid/pamid/src/mpid_buffer.c
index 367f99f..6e21dea 100644
--- a/src/mpid/pamid/src/mpid_buffer.c
+++ b/src/mpid/pamid/src/mpid_buffer.c
@@ -47,13 +47,13 @@
  */
 void MPIDI_Buffer_copy(
     const void * const sbuf, MPI_Aint scount, MPI_Datatype sdt,                       int * smpi_errno,
-          void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt, MPIDI_msg_sz_t * rsz, int * rmpi_errno)
+          void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt, intptr_t * rsz, int * rmpi_errno)
 {
     int sdt_contig;
     int rdt_contig;
     MPI_Aint sdt_true_lb, rdt_true_lb;
-    MPIDI_msg_sz_t sdata_sz;
-    MPIDI_msg_sz_t rdata_sz;
+    intptr_t sdata_sz;
+    intptr_t rdata_sz;
     MPID_Datatype * sdt_ptr;
     MPID_Datatype * rdt_ptr;
 
@@ -166,11 +166,11 @@ void MPIDI_Buffer_copy(
     else
     {
         char * buf;
-        MPIDI_msg_sz_t buf_off;
+        intptr_t buf_off;
         MPID_Segment sseg;
-        MPIDI_msg_sz_t sfirst;
+        intptr_t sfirst;
         MPID_Segment rseg;
-        MPIDI_msg_sz_t rfirst;
+        intptr_t rfirst;
 
         buf = MPL_malloc(MPIDI_COPY_BUFFER_SZ);
         /* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpid/pamid/src/onesided/mpidi_onesided.h b/src/mpid/pamid/src/onesided/mpidi_onesided.h
index 23e2cf8..e669d31 100644
--- a/src/mpid/pamid/src/onesided/mpidi_onesided.h
+++ b/src/mpid/pamid/src/onesided/mpidi_onesided.h
@@ -188,7 +188,7 @@ typedef struct
   int             count;
   int             contig;
   MPI_Aint        true_lb;
-  MPIDI_msg_sz_t  size;
+  intptr_t  size;
 
   int             num_contig;
   DLOOP_VECTOR  * map;
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_done.c b/src/mpid/pamid/src/pt2pt/mpidi_done.c
index 31b4ac0..91ad3de 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_done.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_done.c
@@ -45,7 +45,7 @@ MPIDI_RecvDoneCB_copy(MPID_Request * rreq)
 {
   int smpi_errno;
   MPID_assert(rreq->mpid.uebuf != NULL);
-  MPIDI_msg_sz_t _count=0;
+  intptr_t _count=0;
   MPIDI_Buffer_copy(rreq->mpid.uebuf,        /* source buffer */
                     rreq->mpid.uebuflen,
                     MPI_CHAR,
@@ -146,7 +146,7 @@ void MPIDI_Recvq_process_out_of_order_msgs(pami_task_t src, pami_context_t conte
    MPIDI_In_cntr_t *in_cntr;
    MPID_Request *ooreq, *rreq, *prev_rreq;
    pami_get_simple_t xferP;
-   MPIDI_msg_sz_t _count=0;
+   intptr_t _count=0;
    int matched;
    void * it;
 
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c b/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
index 6eb7ced..05543bb 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
@@ -84,7 +84,7 @@ MPIDI_RecvMsg_Unexp(MPID_Request  * rreq,
         {
           if (likely(MPIR_STATUS_GET_CANCEL_BIT(rreq->status) == FALSE))
             {
-              MPIDI_msg_sz_t _count=0;
+              intptr_t _count=0;
               MPIDI_Buffer_copy(rreq->mpid.uebuf,
                                 rreq->mpid.uebuflen,
                                 MPI_CHAR,
diff --git a/src/util/pointer/mpiu_pointer.h b/src/util/pointer/mpiu_pointer.h
index 0dd23a6..d6d6597 100644
--- a/src/util/pointer/mpiu_pointer.h
+++ b/src/util/pointer/mpiu_pointer.h
@@ -53,7 +53,7 @@
  * \param[in]  aint  Variable of type MPI_Aint
  */
 #define MPIU_Ensure_Aint_fits_in_pointer(aint) \
-  MPIU_Assert((aint) == (MPI_Aint)(MPIU_Upint) MPIU_AINT_CAST_TO_VOID_PTR(aint));
+  MPIU_Assert((aint) == (MPI_Aint)(uintptr_t) MPIU_AINT_CAST_TO_VOID_PTR(aint));
 
 
 #endif /* !defined(MPIU_POINTER_H_INCLUDED) */
diff --git a/src/util/type/mpiu_type_defs.h b/src/util/type/mpiu_type_defs.h
index 2ae91c7..d04f5ae 100644
--- a/src/util/type/mpiu_type_defs.h
+++ b/src/util/type/mpiu_type_defs.h
@@ -64,7 +64,7 @@ typedef MPIU_SIZE_T MPIU_Size_t;
 /* An MPI_Aint may be *larger* than a pointer.  By using 2 casts, we can
    keep some compilers from complaining about converting a pointer to an
    integer of a different size */
-#define MPIU_PtrToAint(a) ((MPI_Aint)(MPIU_Upint)(a))
+#define MPIU_PtrToAint(a) ((MPI_Aint)(uintptr_t)(a))
 #endif
 
 /* AintToPtr converts an MPI_Aint to a pointer type, extending bits if necessary */
@@ -76,9 +76,9 @@ typedef MPIU_SIZE_T MPIU_Size_t;
 
 /* Adding the 32-bit compute/64-bit I/O related type-casts in here as
  * they are not a part of the MPI standard yet. */
-#define MPIU_AINT_CAST_TO_VOID_PTR (void *)(MPIU_Pint)
-#define MPIU_VOID_PTR_CAST_TO_MPI_AINT (MPI_Aint)(MPIU_Upint)
-#define MPIU_PTR_DISP_CAST_TO_MPI_AINT (MPI_Aint)(MPIU_Pint)
+#define MPIU_AINT_CAST_TO_VOID_PTR (void *)(intptr_t)
+#define MPIU_VOID_PTR_CAST_TO_MPI_AINT (MPI_Aint)(uintptr_t)
+#define MPIU_PTR_DISP_CAST_TO_MPI_AINT (MPI_Aint)(intptr_t)
 
 #define MPIU_CONTEXT_ID_T_DATATYPE MPI_UINT16_T
 typedef uint16_t MPIU_Context_id_t;

http://git.mpich.org/mpich.git/commitdiff/5d1e0e91c33829272e066922d505dae1c6e2b5ff

commit 5d1e0e91c33829272e066922d505dae1c6e2b5ff
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Jan 27 15:59:15 2016 -0600

    Move UNREFERENCED_ARG macro to MPL.
    
    We had multiple versions of this lying around.  One was in the MPIU
    layer.  A second was with the same name as the MPIU layer, but sitting
    in the ROMIO glue code.  A third was in the proper ROMIO code with the
    name ADIOI_UNREFERENCED_ARG.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/include/glue_romio.h.in b/src/include/glue_romio.h.in
index ae0a65d..3dbe5e0 100644
--- a/src/include/glue_romio.h.in
+++ b/src/include/glue_romio.h.in
@@ -12,14 +12,6 @@
 #define MPIU_Pint @MPIU_PINT@
 #define MPIU_Upint unsigned @MPIU_PINT@
 
-/* used by ROMIO, should be handled by a romio-private version of this macro
- * instead */
-#ifdef HAVE_WINDOWS_H
-#define MPIU_UNREFERENCED_ARG(a) a
-#else
-#define MPIU_UNREFERENCED_ARG(a)
-#endif
-
 int MPIR_Ext_assert_fail(const char *cond, const char *file_name, int line_num);
 
 #if (!defined(NDEBUG) && (@HAVE_ERROR_CHECKING@))
diff --git a/src/mpi/attr/dup_fn.c b/src/mpi/attr/dup_fn.c
index 08ccdbe..e6f11da 100644
--- a/src/mpi/attr/dup_fn.c
+++ b/src/mpi/attr/dup_fn.c
@@ -19,9 +19,9 @@ int MPIR_Dup_fn ( MPI_Comm comm ATTRIBUTE((unused)),
 {
     /* No error checking at present */
 
-    MPIU_UNREFERENCED_ARG(comm);
-    MPIU_UNREFERENCED_ARG(keyval);
-    MPIU_UNREFERENCED_ARG(extra_state);
+    MPL_UNREFERENCED_ARG(comm);
+    MPL_UNREFERENCED_ARG(keyval);
+    MPL_UNREFERENCED_ARG(extra_state);
 
     /* Set attr_out, the flag and return success */
     (*(void **)attr_out) = attr_in;
diff --git a/src/mpi/errhan/dynerrutil.c b/src/mpi/errhan/dynerrutil.c
index a4ed589..271b7e8 100644
--- a/src/mpi/errhan/dynerrutil.c
+++ b/src/mpi/errhan/dynerrutil.c
@@ -316,7 +316,7 @@ static int MPIR_Dynerrcodes_finalize( void *p ATTRIBUTE((unused)) )
 {
     int i;
 
-    MPIU_UNREFERENCED_ARG(p);
+    MPL_UNREFERENCED_ARG(p);
 
     if (not_initialized == 0) {
 
diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index a8629d3..fcd5888 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -129,7 +129,7 @@ void mpirinitf_(void);
 /* style: allow:fprintf:1 sig:0 */
 static int assert_hook( int reportType, char *message, int *returnValue )
 {
-    MPIU_UNREFERENCED_ARG(reportType);
+    MPL_UNREFERENCED_ARG(reportType);
     fprintf(stderr, "%s", message);
     if (returnValue != NULL)
 	ExitProcess((UINT)(*returnValue));
diff --git a/src/mpi/pt2pt/bsendutil.c b/src/mpi/pt2pt/bsendutil.c
index 66df682..144d64e 100644
--- a/src/mpi/pt2pt/bsendutil.c
+++ b/src/mpi/pt2pt/bsendutil.c
@@ -630,7 +630,7 @@ static int MPIR_Bsend_finalize( void *p ATTRIBUTE((unused)) )
     void *b;
     int  s;
 
-    MPIU_UNREFERENCED_ARG(p);
+    MPL_UNREFERENCED_ARG(p);
 
     if (BsendBuffer.buffer) {
 	/* Use detach to complete any communication */
diff --git a/src/mpi/pt2pt/ibsend.c b/src/mpi/pt2pt/ibsend.c
index e29644d..b8cc4cf 100644
--- a/src/mpi/pt2pt/ibsend.c
+++ b/src/mpi/pt2pt/ibsend.c
@@ -66,7 +66,7 @@ PMPI_LOCAL int MPIR_Ibsend_cancel( void *extra, int complete )
     /* Note that this value should always be 1 because 
        Grequest_complete is called on this request when it is
        created */
-    MPIU_UNREFERENCED_ARG(complete);
+    MPL_UNREFERENCED_ARG(complete);
 
 
     /* Try to cancel the underlying request */
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
index 755ae63..e5c23b7 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
@@ -1036,8 +1036,8 @@ static void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node
     /* Not sure unsigned is necessary, but it makes the math safer */
     unsigned *curr_from_proc, *done_from_proc, *recv_buf_idx;
 
-    ADIOI_UNREFERENCED_ARG(requests);
-    ADIOI_UNREFERENCED_ARG(statuses);
+    MPL_UNREFERENCED_ARG(requests);
+    MPL_UNREFERENCED_ARG(statuses);
 
 /*  curr_from_proc[p] = amount of data recd from proc. p that has already
                         been accounted for so far
diff --git a/src/mpi/romio/adio/common/ad_aggregate.c b/src/mpi/romio/adio/common/ad_aggregate.c
index 0585562..ccd9764 100644
--- a/src/mpi/romio/adio/common/ad_aggregate.c
+++ b/src/mpi/romio/adio/common/ad_aggregate.c
@@ -81,7 +81,7 @@ int ADIOI_Calc_aggregator(ADIO_File fd,
     int rank_index, rank;
     ADIO_Offset avail_bytes;
 
-    ADIOI_UNREFERENCED_ARG(fd_start);
+    MPL_UNREFERENCED_ARG(fd_start);
 
     /* get an index into our array of aggregators */
     rank_index = (int) ((off - min_off + fd_size)/ fd_size - 1);
diff --git a/src/mpi/romio/adio/common/ad_end.c b/src/mpi/romio/adio/common/ad_end.c
index 88af934..2557c80 100644
--- a/src/mpi/romio/adio/common/ad_end.c
+++ b/src/mpi/romio/adio/common/ad_end.c
@@ -50,9 +50,9 @@ int ADIOI_End_call(MPI_Comm comm, int keyval, void *attribute_val, void
 {
     int error_code;
 
-    ADIOI_UNREFERENCED_ARG(comm);
-    ADIOI_UNREFERENCED_ARG(attribute_val);
-    ADIOI_UNREFERENCED_ARG(extra_state);
+    MPL_UNREFERENCED_ARG(comm);
+    MPL_UNREFERENCED_ARG(attribute_val);
+    MPL_UNREFERENCED_ARG(extra_state);
 
     MPI_Keyval_free(&keyval);
 
diff --git a/src/mpi/romio/adio/common/ad_fstype.c b/src/mpi/romio/adio/common/ad_fstype.c
index 75fb24f..a5f4708 100644
--- a/src/mpi/romio/adio/common/ad_fstype.c
+++ b/src/mpi/romio/adio/common/ad_fstype.c
@@ -460,8 +460,8 @@ static void ADIO_FileSysType_fncall(const char *filename, int *fstype, int *erro
 #endif /* STAT APPROACH */
 
 #ifdef ROMIO_NTFS
-    ADIOI_UNREFERENCED_ARG(filename);
-    ADIOI_UNREFERENCED_ARG(error_code);
+    MPL_UNREFERENCED_ARG(filename);
+    MPL_UNREFERENCED_ARG(error_code);
     *fstype = ADIO_NTFS; /* only supported FS on Windows */
 #elif defined(ROMIO_NFS)
     *fstype = ADIO_NFS;
diff --git a/src/mpi/romio/adio/common/ad_init.c b/src/mpi/romio/adio/common/ad_init.c
index 4fd56c8..fd1b167 100644
--- a/src/mpi/romio/adio/common/ad_init.c
+++ b/src/mpi/romio/adio/common/ad_init.c
@@ -52,8 +52,8 @@ void ADIO_Init(int *argc, char ***argv, int *error_code)
     char *c;
 #endif
 
-    ADIOI_UNREFERENCED_ARG(argc);
-    ADIOI_UNREFERENCED_ARG(argv);
+    MPL_UNREFERENCED_ARG(argc);
+    MPL_UNREFERENCED_ARG(argv);
     
 #ifdef ROMIO_INSIDE_MPICH
     MPIR_Ext_init();
diff --git a/src/mpi/romio/adio/common/ad_read_coll.c b/src/mpi/romio/adio/common/ad_read_coll.c
index 4a73112..f723a6e 100644
--- a/src/mpi/romio/adio/common/ad_read_coll.c
+++ b/src/mpi/romio/adio/common/ad_read_coll.c
@@ -971,8 +971,8 @@ void ADIOI_Fill_user_buffer(ADIO_File fd, void *buf, ADIOI_Flatlist_node
     /* Not sure unsigned is necessary, but it makes the math safer */
     unsigned *curr_from_proc, *done_from_proc, *recv_buf_idx;
 
-    ADIOI_UNREFERENCED_ARG(requests);
-    ADIOI_UNREFERENCED_ARG(statuses);
+    MPL_UNREFERENCED_ARG(requests);
+    MPL_UNREFERENCED_ARG(statuses);
 
 /*  curr_from_proc[p] = amount of data recd from proc. p that has already
                         been accounted for so far
diff --git a/src/mpi/romio/adio/common/ad_seek.c b/src/mpi/romio/adio/common/ad_seek.c
index 78fa5c1..62c67cb 100644
--- a/src/mpi/romio/adio/common/ad_seek.c
+++ b/src/mpi/romio/adio/common/ad_seek.c
@@ -30,7 +30,7 @@ ADIO_Offset ADIOI_GEN_SeekIndividual(ADIO_File fd, ADIO_Offset offset,
     int filetype_is_contig;
     MPI_Aint filetype_extent;
 
-    ADIOI_UNREFERENCED_ARG(whence);
+    MPL_UNREFERENCED_ARG(whence);
 
     ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
     etype_size = fd->etype_size;
diff --git a/src/mpi/romio/adio/common/cb_config_list.c b/src/mpi/romio/adio/common/cb_config_list.c
index d7031ba..d8622c9 100644
--- a/src/mpi/romio/adio/common/cb_config_list.c
+++ b/src/mpi/romio/adio/common/cb_config_list.c
@@ -395,9 +395,9 @@ int ADIOI_cb_copy_name_array(MPI_Comm comm,
 {
     ADIO_cb_name_array array;
 
-    ADIOI_UNREFERENCED_ARG(comm);
-    ADIOI_UNREFERENCED_ARG(keyval); 
-    ADIOI_UNREFERENCED_ARG(extra);
+    MPL_UNREFERENCED_ARG(comm);
+    MPL_UNREFERENCED_ARG(keyval);
+    MPL_UNREFERENCED_ARG(extra);
 
     array = (ADIO_cb_name_array) attr_in;
     if (array != NULL) array->refct++;
@@ -417,8 +417,8 @@ int ADIOI_cb_delete_name_array(MPI_Comm comm,
 {
     ADIO_cb_name_array array;
 
-    ADIOI_UNREFERENCED_ARG(comm);
-    ADIOI_UNREFERENCED_ARG(extra);
+    MPL_UNREFERENCED_ARG(comm);
+    MPL_UNREFERENCED_ARG(extra);
 
     array = (ADIO_cb_name_array) attr_val;
     ADIOI_Assert(array != NULL);
diff --git a/src/mpi/romio/adio/common/lock.c b/src/mpi/romio/adio/common/lock.c
index e428f63..ba9524c 100644
--- a/src/mpi/romio/adio/common/lock.c
+++ b/src/mpi/romio/adio/common/lock.c
@@ -19,7 +19,7 @@ int ADIOI_Set_lock(FDTYPE fd, int cmd, int type, ADIO_Offset offset, int whence,
     OVERLAPPED Overlapped;
     DWORD dwFlags;
 
-    ADIOI_UNREFERENCED_ARG(whence);
+    MPL_UNREFERENCED_ARG(whence);
 
     if (len == 0) return MPI_SUCCESS;
 
diff --git a/src/mpi/romio/adio/common/status_setb.c b/src/mpi/romio/adio/common/status_setb.c
index 0b37cf2..c54d958 100644
--- a/src/mpi/romio/adio/common/status_setb.c
+++ b/src/mpi/romio/adio/common/status_setb.c
@@ -16,7 +16,7 @@
 int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype, 
 			  MPI_Count nbytes)
 {
-    ADIOI_UNREFERENCED_ARG(datatype);
+    MPL_UNREFERENCED_ARG(datatype);
     /* it's ok that ROMIO stores number-of-bytes in status, not 
      * count-of-copies, as long as MPI_GET_COUNT knows what to do */
     if (status != MPI_STATUS_IGNORE)
diff --git a/src/mpi/romio/adio/include/adio.h b/src/mpi/romio/adio/include/adio.h
index da77015..e508452 100644
--- a/src/mpi/romio/adio/include/adio.h
+++ b/src/mpi/romio/adio/include/adio.h
@@ -55,13 +55,6 @@
 # define FORTRAN_API
 #endif
 
-/* Use this macro for each parameter to a function that is not referenced in the body of the function */
-#ifdef HAVE_WINDOWS_H
-#define ADIOI_UNREFERENCED_ARG(a) a
-#else
-#define ADIOI_UNREFERENCED_ARG(a)
-#endif
-
 /* Include romioconf.h if we haven't already (some include files may
    need to include romioconf before some system includes) */
 #ifndef ROMIOCONF_H_INCLUDED
diff --git a/src/mpi/romio/mpi-io/delete.c b/src/mpi/romio/mpi-io/delete.c
index 47b52a0..3272edc 100644
--- a/src/mpi/romio/mpi-io/delete.c
+++ b/src/mpi/romio/mpi-io/delete.c
@@ -46,7 +46,7 @@ int MPI_File_delete(ROMIO_CONST char *filename, MPI_Info info)
                 MPI_FILE_NULL, MPI_DATATYPE_NULL, -1);
 #endif /* MPI_hpux */
 
-    MPIU_UNREFERENCED_ARG(info);
+    MPL_UNREFERENCED_ARG(info);
 
     ROMIO_THREAD_CS_ENTER();
 
diff --git a/src/mpi/romio/mpi-io/mpioimpl.h b/src/mpi/romio/mpi-io/mpioimpl.h
index 074ad42..8f636d3 100644
--- a/src/mpi/romio/mpi-io/mpioimpl.h
+++ b/src/mpi/romio/mpi-io/mpioimpl.h
@@ -37,11 +37,6 @@
 #define ROMIO_THREAD_CS_EXIT()
 #define ROMIO_THREAD_CS_YIELD()
 #define MPIO_DATATYPE_ISCOMMITTED(dtype_, err_) do {} while (0)
-#ifdef HAVE_WINDOWS_H
-#define MPIU_UNREFERENCED_ARG(a) a
-#else
-#define MPIU_UNREFERENCED_ARG(a)
-#endif
 #endif /* ROMIO_INSIDE_MPICH */
 
 /* info is a linked list of these structures */
diff --git a/src/mpi/romio/mpi-io/mpiu_greq.c b/src/mpi/romio/mpi-io/mpiu_greq.c
index cb6e9d2..82cd7c7 100644
--- a/src/mpi/romio/mpi-io/mpiu_greq.c
+++ b/src/mpi/romio/mpi-io/mpiu_greq.c
@@ -41,8 +41,8 @@ int MPIU_Greq_free_fn(void *extra_state)
 }
 int MPIU_Greq_cancel_fn(void *extra_state, int complete)
 {
-    MPIU_UNREFERENCED_ARG(extra_state);
-    MPIU_UNREFERENCED_ARG(complete);
+    MPL_UNREFERENCED_ARG(extra_state);
+    MPL_UNREFERENCED_ARG(complete);
 
     /* can't cancel */
     return MPI_SUCCESS;
diff --git a/src/mpi/romio/mpi-io/read_alle.c b/src/mpi/romio/mpi-io/read_alle.c
index e2853c1..f6f92c6 100644
--- a/src/mpi/romio/mpi-io/read_alle.c
+++ b/src/mpi/romio/mpi-io/read_alle.c
@@ -58,7 +58,7 @@ int MPIOI_File_read_all_end(MPI_File fh,
     int error_code = MPI_SUCCESS;
     ADIO_File adio_fh;
 
-    MPIU_UNREFERENCED_ARG(buf);
+    MPL_UNREFERENCED_ARG(buf);
 
     ROMIO_THREAD_CS_ENTER();
 
diff --git a/src/mpi/romio/mpi-io/read_orde.c b/src/mpi/romio/mpi-io/read_orde.c
index 542f687..a69d51c 100644
--- a/src/mpi/romio/mpi-io/read_orde.c
+++ b/src/mpi/romio/mpi-io/read_orde.c
@@ -43,7 +43,7 @@ int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status)
     ADIO_File adio_fh;
     static char myname[] = "MPI_FILE_READ_ORDERED_END";
 
-    MPIU_UNREFERENCED_ARG(buf);
+    MPL_UNREFERENCED_ARG(buf);
 
     ROMIO_THREAD_CS_ENTER();
 
diff --git a/src/mpi/romio/mpi-io/write_alle.c b/src/mpi/romio/mpi-io/write_alle.c
index 6dc7f6d..e43d9f2 100644
--- a/src/mpi/romio/mpi-io/write_alle.c
+++ b/src/mpi/romio/mpi-io/write_alle.c
@@ -57,7 +57,7 @@ int MPIOI_File_write_all_end(MPI_File fh,
     int error_code;
     ADIO_File adio_fh;
 
-    MPIU_UNREFERENCED_ARG(buf);
+    MPL_UNREFERENCED_ARG(buf);
 
     ROMIO_THREAD_CS_ENTER();
 
diff --git a/src/mpi/romio/mpi-io/write_orde.c b/src/mpi/romio/mpi-io/write_orde.c
index 8cfdba2..7190ffd 100644
--- a/src/mpi/romio/mpi-io/write_orde.c
+++ b/src/mpi/romio/mpi-io/write_orde.c
@@ -43,7 +43,7 @@ int MPI_File_write_ordered_end(MPI_File fh, ROMIO_CONST void *buf, MPI_Status *s
     static char myname[] = "MPI_FILE_WRITE_ORDERED_END";
     ADIO_File adio_fh;
 
-    MPIU_UNREFERENCED_ARG(buf);
+    MPL_UNREFERENCED_ARG(buf);
 
     ROMIO_THREAD_CS_ENTER();
 
diff --git a/src/mpi/topo/cart_map.c b/src/mpi/topo/cart_map.c
index ccdd8d4..29547e4 100644
--- a/src/mpi/topo/cart_map.c
+++ b/src/mpi/topo/cart_map.c
@@ -35,7 +35,7 @@ int MPIR_Cart_map( const MPID_Comm *comm_ptr, int ndims, const int dims[],
 {
     int rank, nranks, i, size, mpi_errno = MPI_SUCCESS;
 
-    MPIU_UNREFERENCED_ARG(periodic);
+    MPL_UNREFERENCED_ARG(periodic);
 
     /* Determine number of processes needed for topology */
     if (ndims == 0) {
diff --git a/src/mpi/topo/graph_map.c b/src/mpi/topo/graph_map.c
index 9e9cd05..6f85545 100644
--- a/src/mpi/topo/graph_map.c
+++ b/src/mpi/topo/graph_map.c
@@ -29,8 +29,8 @@ int MPIR_Graph_map( const MPID_Comm *comm_ptr, int nnodes,
 		    const int indx[] ATTRIBUTE((unused)), 
 		    const int edges[] ATTRIBUTE((unused)), int *newrank )
 {
-    MPIU_UNREFERENCED_ARG(indx);
-    MPIU_UNREFERENCED_ARG(edges);
+    MPL_UNREFERENCED_ARG(indx);
+    MPL_UNREFERENCED_ARG(edges);
 
     /* This is the trivial version that does not remap any processes. */
     if (comm_ptr->rank < nnodes) {
diff --git a/src/mpi/topo/topoutil.c b/src/mpi/topo/topoutil.c
index e97c11a..46ec563 100644
--- a/src/mpi/topo/topoutil.c
+++ b/src/mpi/topo/topoutil.c
@@ -81,7 +81,7 @@ int MPIR_Topology_put( MPID_Comm *comm_ptr, MPIR_Topology *topo_ptr )
 
 static int MPIR_Topology_finalize( void *p ATTRIBUTE((unused)) )
 {
-    MPIU_UNREFERENCED_ARG(p);
+    MPL_UNREFERENCED_ARG(p);
 
     if (MPIR_Topology_keyval != MPI_KEYVAL_INVALID) {
 	/* Just in case */
@@ -136,9 +136,9 @@ static int MPIR_Topology_copy_fn ( MPI_Comm comm ATTRIBUTE((unused)),
     MPIU_CHKPMEM_DECL(5);
     int mpi_errno = 0;
 
-    MPIU_UNREFERENCED_ARG(comm);
-    MPIU_UNREFERENCED_ARG(keyval);
-    MPIU_UNREFERENCED_ARG(extra_data);
+    MPL_UNREFERENCED_ARG(comm);
+    MPL_UNREFERENCED_ARG(keyval);
+    MPL_UNREFERENCED_ARG(extra_data);
 
     *flag = 0;
     *(void **)attr_out = NULL;
@@ -210,9 +210,9 @@ static int MPIR_Topology_delete_fn ( MPI_Comm comm ATTRIBUTE((unused)),
 {
     MPIR_Topology *topology = (MPIR_Topology *)attr_val;
 
-    MPIU_UNREFERENCED_ARG(comm);
-    MPIU_UNREFERENCED_ARG(keyval);
-    MPIU_UNREFERENCED_ARG(extra_data);
+    MPL_UNREFERENCED_ARG(comm);
+    MPL_UNREFERENCED_ARG(keyval);
+    MPL_UNREFERENCED_ARG(extra_data);
 
     /* FIXME - free the attribute data structure */
     
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_init.c b/src/mpid/ch3/channels/nemesis/src/ch3_init.c
index 6a8e393..27fe4da 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_init.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_init.c
@@ -120,7 +120,7 @@ int MPIDI_CH3_PortFnsInit( MPIDI_PortFns *portFns )
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_PORTFNSINIT);
 
-    MPIU_UNREFERENCED_ARG(portFns);
+    MPL_UNREFERENCED_ARG(portFns);
 
     MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PORTFNSINIT);
     return 0;
@@ -282,7 +282,7 @@ int MPIDI_CH3_PG_Init(MPIDI_PG_t *pg_p)
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_PG_INIT);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_PG_INIT);
-    MPIU_UNREFERENCED_ARG(pg_p);
+    MPL_UNREFERENCED_ARG(pg_p);
 
     MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PG_INIT);
     return MPI_SUCCESS;
@@ -293,7 +293,7 @@ int MPIDI_CH3_PG_Destroy(MPIDI_PG_t *pg_p)
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_PG_DESTROY);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_PG_DESTROY);
-    MPIU_UNREFERENCED_ARG(pg_p);
+    MPL_UNREFERENCED_ARG(pg_p);
 
     MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_PG_DESTROY);
     return MPI_SUCCESS;
diff --git a/src/mpid/ch3/channels/sock/src/ch3_init.c b/src/mpid/ch3/channels/sock/src/ch3_init.c
index c0b0f6c..52db566 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_init.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_init.c
@@ -67,7 +67,7 @@ int MPIDI_CH3_Init(int has_parent, MPIDI_PG_t * pg_p, int pg_rank )
    MPI Port functions */
 int MPIDI_CH3_PortFnsInit( MPIDI_PortFns *portFns ATTRIBUTE((unused)) ) 
 {
-    MPIU_UNREFERENCED_ARG(portFns);
+    MPL_UNREFERENCED_ARG(portFns);
     return 0;
 }
 
diff --git a/src/mpid/ch3/util/sock/ch3u_init_sock.c b/src/mpid/ch3/util/sock/ch3u_init_sock.c
index 85e39ef..9dccecf 100644
--- a/src/mpid/ch3/util/sock/ch3u_init_sock.c
+++ b/src/mpid/ch3/util/sock/ch3u_init_sock.c
@@ -41,8 +41,8 @@ int MPIDI_CH3U_Init_sock(int has_parent, MPIDI_PG_t *pg_p, int pg_rank,
     int p;
 
     /* FIXME: Why are these unused? */
-    MPIU_UNREFERENCED_ARG(has_parent);
-    MPIU_UNREFERENCED_ARG(pg_rank);
+    MPL_UNREFERENCED_ARG(has_parent);
+    MPL_UNREFERENCED_ARG(pg_rank);
 
     /*
      * Initialize the VCs associated with this process group (and thus 
diff --git a/src/mpid/common/sock/iocp/sock.c b/src/mpid/common/sock/iocp/sock.c
index cc02e84..48414ab 100644
--- a/src/mpid/common/sock/iocp/sock.c
+++ b/src/mpid/common/sock/iocp/sock.c
@@ -723,7 +723,7 @@ int MPIDU_Sock_get_host_description(int myRank,
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDU_SOCK_GET_HOST_DESCRIPTION);
 
-    MPIU_UNREFERENCED_ARG(myRank);
+    MPL_UNREFERENCED_ARG(myRank);
 
     if (!g_init_called)
     {
@@ -1532,7 +1532,7 @@ int MPIDU_Sock_post_read(MPIDU_Sock_t sock, void * buf, MPIU_Size_t minbr, MPIU_
     MPIDI_STATE_DECL(MPID_STATE_MPIDU_SOCK_POST_READ);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDU_SOCK_POST_READ);
-    MPIU_UNREFERENCED_ARG(maxbr);
+    MPL_UNREFERENCED_ARG(maxbr);
     sock->read.tiov.MPL_IOV_BUF = (MPL_IOV_BUF_CAST)buf;
     sock->read.tiov.MPL_IOV_LEN = minbr;
     mpi_errno = MPIDU_Sock_post_readv(sock, &sock->read.tiov, 1, fn);
@@ -1657,7 +1657,7 @@ int MPIDU_Sock_post_write(MPIDU_Sock_t sock, void * buf, MPIU_Size_t min, MPIU_S
     MPIDI_STATE_DECL(MPID_STATE_MPIDU_SOCK_POST_WRITE);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDU_SOCK_POST_WRITE);
-    MPIU_UNREFERENCED_ARG(max);
+    MPL_UNREFERENCED_ARG(max);
     sock->write.tiov.MPL_IOV_BUF = (MPL_IOV_BUF_CAST)buf;
     sock->write.tiov.MPL_IOV_LEN = min;
     mpi_errno = MPIDU_Sock_post_writev(sock, &sock->write.tiov, 1, fn);
diff --git a/src/mpl/include/mpl_base.h b/src/mpl/include/mpl_base.h
index 698da33..0d9de0c 100644
--- a/src/mpl/include/mpl_base.h
+++ b/src/mpl/include/mpl_base.h
@@ -80,6 +80,14 @@
 #define MPL_MAX(a,b)    (((a) > (b)) ? (a) : (b))
 #define MPL_MIN(a,b)    (((a) < (b)) ? (a) : (b))
 
+/* Use this macro for each parameter to a function that is not referenced in
+   the body of the function */
+#ifdef MPL_HAVE_WINDOWS_H
+#define MPL_UNREFERENCED_ARG(a) a
+#else
+#define MPL_UNREFERENCED_ARG(a)
+#endif
+
 /* This macro is used to silence warnings from the Mac OS X linker when
  * an object file "has no symbols".  The unused attribute prevents a
  * warning about the unused dummy variable while the used attribute
diff --git a/src/nameserv/pmi/pmi_nameserv.c b/src/nameserv/pmi/pmi_nameserv.c
index 03f00c6..5034c9f 100644
--- a/src/nameserv/pmi/pmi_nameserv.c
+++ b/src/nameserv/pmi/pmi_nameserv.c
@@ -30,7 +30,7 @@ int MPID_NS_Create( const MPID_Info *info_ptr, MPID_NS_Handle *handle_ptr )
 {
     static struct MPID_NS_Handle nsHandleWithNoData;
 
-    MPIU_UNREFERENCED_ARG(info_ptr);
+    MPL_UNREFERENCED_ARG(info_ptr);
     /* MPID_NS_Create() should always create a valid handle */
     *handle_ptr = &nsHandleWithNoData;	/* The name service needs no local data */
     return 0;
@@ -45,8 +45,8 @@ int MPID_NS_Publish( MPID_NS_Handle handle, const MPID_Info *info_ptr,
 {
     int mpi_errno = MPI_SUCCESS;
     int rc;
-    MPIU_UNREFERENCED_ARG(info_ptr);
-    MPIU_UNREFERENCED_ARG(handle);
+    MPL_UNREFERENCED_ARG(info_ptr);
+    MPL_UNREFERENCED_ARG(handle);
 
 #ifdef USE_PMI2_API
     /* release the global CS for PMI calls */
@@ -71,8 +71,8 @@ int MPID_NS_Lookup( MPID_NS_Handle handle, const MPID_Info *info_ptr,
 {
     int mpi_errno = MPI_SUCCESS;
     int rc;
-    MPIU_UNREFERENCED_ARG(info_ptr);
-    MPIU_UNREFERENCED_ARG(handle);
+    MPL_UNREFERENCED_ARG(info_ptr);
+    MPL_UNREFERENCED_ARG(handle);
 
 #ifdef USE_PMI2_API
     /* release the global CS for PMI calls */
@@ -97,8 +97,8 @@ int MPID_NS_Unpublish( MPID_NS_Handle handle, const MPID_Info *info_ptr,
 {
     int mpi_errno = MPI_SUCCESS;
     int rc;
-    MPIU_UNREFERENCED_ARG(info_ptr);
-    MPIU_UNREFERENCED_ARG(handle);
+    MPL_UNREFERENCED_ARG(info_ptr);
+    MPL_UNREFERENCED_ARG(handle);
 
 #ifdef USE_PMI2_API
     /* release the global CS for PMI calls */
@@ -119,7 +119,7 @@ fn_fail:
 int MPID_NS_Free( MPID_NS_Handle *handle_ptr )
 {
     /* MPID_NS_Handle is Null */
-    MPIU_UNREFERENCED_ARG(handle_ptr);
+    MPL_UNREFERENCED_ARG(handle_ptr);
     return 0;
 }
 
diff --git a/src/util/type/mpiu_type_defs.h b/src/util/type/mpiu_type_defs.h
index 74a42c7..2ae91c7 100644
--- a/src/util/type/mpiu_type_defs.h
+++ b/src/util/type/mpiu_type_defs.h
@@ -43,13 +43,6 @@
 #define BOOL int
 #endif
 #endif
-/* Use this macro for each parameter to a function that is not referenced in
-   the body of the function */
-#ifdef HAVE_WINDOWS_H
-#define MPIU_UNREFERENCED_ARG(a) a
-#else
-#define MPIU_UNREFERENCED_ARG(a)
-#endif
 
 #include "mpl.h"
 
diff --git a/src/util/wrappers/mpiu_shm_wrappers.h b/src/util/wrappers/mpiu_shm_wrappers.h
index 4534fb6..f5eab06 100644
--- a/src/util/wrappers/mpiu_shm_wrappers.h
+++ b/src/util/wrappers/mpiu_shm_wrappers.h
@@ -795,7 +795,7 @@ static inline int MPIU_SHMW_Seg_detach(
     int mpi_errno = MPI_SUCCESS;
     int rc = -1;
 
-    MPIU_UNREFERENCED_ARG(seg_sz);
+    MPL_UNREFERENCED_ARG(seg_sz);
     MPIR_ERR_CHKANDJUMP(!MPIU_SHMW_Hnd_is_valid(hnd),
         mpi_errno, MPI_ERR_OTHER, "**shmw_badhnd");
     MPIU_Assert(shm_addr_ptr);
diff --git a/src/util/wrappers/mpiu_sock_wrappers.h b/src/util/wrappers/mpiu_sock_wrappers.h
index eac8ba8..1b1236a 100644
--- a/src/util/wrappers/mpiu_sock_wrappers.h
+++ b/src/util/wrappers/mpiu_sock_wrappers.h
@@ -440,7 +440,7 @@ static inline void MPIU_SOCKW_Waitset_curindex_inc_(MPIU_SOCKW_Waitset_hnd_t wai
 static inline void MPIU_SOCKW_Waitset_expand_(MPIU_SOCKW_Waitset_hnd_t waitset_hnd,
     int *index_ptr)
 {
-    MPIU_UNREFERENCED_ARG(index_ptr);
+    MPL_UNREFERENCED_ARG(index_ptr);
     (waitset_hnd)->nfds++;
     MPIU_Assert((waitset_hnd)->nfds < FD_SETSIZE);
 }

http://git.mpich.org/mpich.git/commitdiff/e42f060cbad66a42619e88b0122c481e48fc173f

commit e42f060cbad66a42619e88b0122c481e48fc173f
Author: Pavan Balaji <balaji at anl.gov>
Date:   Thu Jan 28 09:46:40 2016 -0600

    refcount: fix bug in the pobj header inclusion.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/refcount/mpir_refcount.h b/src/util/refcount/mpir_refcount.h
index f7d0e14..5130abc 100644
--- a/src/util/refcount/mpir_refcount.h
+++ b/src/util/refcount/mpir_refcount.h
@@ -15,7 +15,7 @@
 #if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL
 #include "mpir_refcount_global.h"
 #elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT
-#include "mpir_refcount_obj.h"
+#include "mpir_refcount_pobj.h"
 #endif
 
 #else

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                                       |   43 --------
 src/binding/fortran/mpif_h/buildiface              |    6 +-
 src/include/glue_romio.h.in                        |   15 +---
 src/mpi/attr/attr_get.c                            |    4 +-
 src/mpi/attr/attrutil.c                            |    8 +-
 src/mpi/attr/comm_get_attr.c                       |   20 ++--
 src/mpi/attr/comm_set_attr.c                       |    6 +-
 src/mpi/attr/dup_fn.c                              |    6 +-
 src/mpi/attr/type_get_attr.c                       |    8 +-
 src/mpi/attr/type_set_attr.c                       |    6 +-
 src/mpi/attr/win_get_attr.c                        |   10 +-
 src/mpi/attr/win_set_attr.c                        |    6 +-
 src/mpi/coll/helper_fns.c                          |    6 +-
 src/mpi/errhan/dynerrutil.c                        |    2 +-
 src/mpi/init/initthread.c                          |    2 +-
 src/mpi/pt2pt/bsendutil.c                          |    2 +-
 src/mpi/pt2pt/ibsend.c                             |    2 +-
 src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c         |   32 +++---
 src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c        |   10 +-
 src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c        |    4 +-
 src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c    |    4 +-
 src/mpi/romio/adio/common/ad_aggregate.c           |    2 +-
 src/mpi/romio/adio/common/ad_end.c                 |    6 +-
 src/mpi/romio/adio/common/ad_fstype.c              |    4 +-
 src/mpi/romio/adio/common/ad_init.c                |    4 +-
 src/mpi/romio/adio/common/ad_iread_coll.c          |    4 +-
 src/mpi/romio/adio/common/ad_iwrite_coll.c         |    2 +-
 src/mpi/romio/adio/common/ad_read_coll.c           |   10 +-
 src/mpi/romio/adio/common/ad_read_str_naive.c      |    6 +-
 src/mpi/romio/adio/common/ad_seek.c                |    2 +-
 src/mpi/romio/adio/common/ad_write_coll.c          |    4 +-
 src/mpi/romio/adio/common/ad_write_nolock.c        |    2 +-
 src/mpi/romio/adio/common/ad_write_str_naive.c     |    6 +-
 src/mpi/romio/adio/common/cb_config_list.c         |   10 +-
 src/mpi/romio/adio/common/lock.c                   |    2 +-
 src/mpi/romio/adio/common/status_setb.c            |    2 +-
 src/mpi/romio/adio/include/adio.h                  |    7 --
 src/mpi/romio/adio/include/adioi.h                 |    3 +-
 src/mpi/romio/mpi-io/delete.c                      |    2 +-
 src/mpi/romio/mpi-io/mpioimpl.h                    |    5 -
 src/mpi/romio/mpi-io/mpiu_greq.c                   |    4 +-
 src/mpi/romio/mpi-io/read_alle.c                   |    2 +-
 src/mpi/romio/mpi-io/read_orde.c                   |    2 +-
 src/mpi/romio/mpi-io/write_alle.c                  |    2 +-
 src/mpi/romio/mpi-io/write_orde.c                  |    2 +-
 src/mpi/topo/cart_map.c                            |    2 +-
 src/mpi/topo/graph_map.c                           |    4 +-
 src/mpi/topo/topoutil.c                            |   14 ++--
 .../channels/nemesis/include/mpid_nem_datatypes.h  |    2 +-
 .../ch3/channels/nemesis/include/mpid_nem_impl.h   |   12 +-
 .../ch3/channels/nemesis/include/mpid_nem_inline.h |   30 +++---
 .../ch3/channels/nemesis/include/mpid_nem_post.h   |   12 +-
 .../ch3/channels/nemesis/include/mpidi_ch3_impl.h  |    4 +-
 .../ch3/channels/nemesis/include/mpidi_ch3_pre.h   |   16 ++--
 .../ch3/channels/nemesis/netmod/llc/llc_impl.h     |   12 +-
 .../ch3/channels/nemesis/netmod/llc/llc_poll.c     |    2 +-
 .../ch3/channels/nemesis/netmod/llc/llc_send.c     |   34 +++---
 .../ch3/channels/nemesis/netmod/mxm/mxm_impl.h     |   10 +-
 .../ch3/channels/nemesis/netmod/mxm/mxm_poll.c     |   20 ++--
 .../ch3/channels/nemesis/netmod/mxm/mxm_send.c     |   34 +++---
 .../ch3/channels/nemesis/netmod/ofi/ofi_impl.h     |    8 +-
 src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c |   20 ++--
 .../nemesis/netmod/ofi/ofi_tagged_template.c       |    6 +-
 .../channels/nemesis/netmod/portals4/ptl_impl.h    |   16 ++--
 .../ch3/channels/nemesis/netmod/portals4/ptl_nm.c  |   16 ++--
 .../channels/nemesis/netmod/portals4/ptl_probe.c   |    4 +-
 .../channels/nemesis/netmod/portals4/ptl_recv.c    |    8 +-
 .../channels/nemesis/netmod/portals4/ptl_send.c    |    2 +-
 src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c  |    2 +-
 src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.h  |    2 +-
 .../ch3/channels/nemesis/netmod/tcp/tcp_ckpt.c     |    2 +-
 .../ch3/channels/nemesis/netmod/tcp/tcp_impl.h     |   10 +-
 .../ch3/channels/nemesis/netmod/tcp/tcp_send.c     |   30 +++---
 src/mpid/ch3/channels/nemesis/src/ch3_init.c       |    6 +-
 src/mpid/ch3/channels/nemesis/src/ch3_isend.c      |    2 +-
 src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c  |    2 +-
 src/mpid/ch3/channels/nemesis/src/ch3_progress.c   |   20 ++--
 .../ch3/channels/nemesis/src/ch3i_eagernoncontig.c |    4 +-
 src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c |    4 +-
 src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c  |    2 +-
 src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c   |   30 +++---
 .../ch3/channels/nemesis/src/mpid_nem_lmt_dma.c    |    4 +-
 .../ch3/channels/nemesis/src/mpid_nem_lmt_shm.c    |   26 +++---
 .../channels/nemesis/src/mpid_nem_lmt_vmsplice.c   |    2 +-
 src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c |    2 +-
 src/mpid/ch3/channels/sock/src/ch3_init.c          |    2 +-
 src/mpid/ch3/channels/sock/src/ch3_isend.c         |    8 +-
 src/mpid/ch3/channels/sock/src/ch3_istartmsg.c     |    8 +-
 src/mpid/ch3/channels/sock/src/ch3_progress.c      |    6 +-
 src/mpid/ch3/include/mpid_rma_issue.h              |   10 +-
 src/mpid/ch3/include/mpidimpl.h                    |  106 ++++++++++----------
 src/mpid/ch3/include/mpidpkt.h                     |    4 +-
 src/mpid/ch3/include/mpidpre.h                     |   22 ++---
 src/mpid/ch3/include/mpidrma.h                     |   10 +-
 src/mpid/ch3/src/ch3u_buffer.c                     |   34 +++---
 src/mpid/ch3/src/ch3u_eager.c                      |   42 ++++----
 src/mpid/ch3/src/ch3u_eagersync.c                  |   14 ++--
 src/mpid/ch3/src/ch3u_handle_connection.c          |    2 +-
 src/mpid/ch3/src/ch3u_handle_recv_pkt.c            |   28 +++---
 src/mpid/ch3/src/ch3u_handle_revoke_pkt.c          |    2 +-
 src/mpid/ch3/src/ch3u_request.c                    |   30 +++---
 src/mpid/ch3/src/ch3u_rma_ops.c                    |   12 +-
 src/mpid/ch3/src/ch3u_rma_pkthandler.c             |   50 +++++-----
 src/mpid/ch3/src/ch3u_rma_reqops.c                 |    8 +-
 src/mpid/ch3/src/ch3u_rndv.c                       |   18 ++--
 src/mpid/ch3/src/mpid_cancel_send.c                |    4 +-
 src/mpid/ch3/src/mpid_irsend.c                     |    2 +-
 src/mpid/ch3/src/mpid_isend.c                      |    2 +-
 src/mpid/ch3/src/mpid_issend.c                     |    2 +-
 src/mpid/ch3/src/mpid_rsend.c                      |    2 +-
 src/mpid/ch3/src/mpid_send.c                       |    2 +-
 src/mpid/ch3/src/mpid_ssend.c                      |    2 +-
 src/mpid/ch3/src/mpidi_isend_self.c                |    2 +-
 src/mpid/ch3/src/mpidi_printf.c                    |    8 +-
 src/mpid/ch3/util/sock/ch3u_init_sock.c            |    4 +-
 src/mpid/common/sock/iocp/sock.c                   |    6 +-
 src/mpid/pamid/include/mpidi_hooks.h               |    2 +-
 src/mpid/pamid/include/mpidi_prototypes.h          |    2 +-
 src/mpid/pamid/src/mpid_buffer.c                   |   12 +-
 src/mpid/pamid/src/onesided/mpidi_onesided.h       |    2 +-
 src/mpid/pamid/src/pt2pt/mpidi_done.c              |    4 +-
 src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c           |    2 +-
 src/mpl/include/mpl_base.h                         |    8 ++
 src/nameserv/pmi/pmi_nameserv.c                    |   16 ++--
 src/util/pointer/mpiu_pointer.h                    |    2 +-
 src/util/refcount/mpir_refcount.h                  |    2 +-
 src/util/type/mpiu_type_defs.h                     |   15 +--
 src/util/wrappers/mpiu_shm_wrappers.h              |    2 +-
 src/util/wrappers/mpiu_sock_wrappers.h             |    2 +-
 129 files changed, 591 insertions(+), 667 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list