[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b4-106-g380b32a

Service Account noreply at mpich.org
Wed Aug 12 16:11:37 CDT 2015


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  380b32a7a8172c7f5485fc0787ddd6d346617cd2 (commit)
       via  f774b97f2f96f278f15beea7035d849b5cc42a39 (commit)
       via  cb5791b230dde33ea71a11a49c5d90720389f4a4 (commit)
       via  2b8b1bc46842ae5ec5ed4aad409d7f3e1d90b4c1 (commit)
      from  a79f6888751553bb7804b6858ebfd8d5f0df4851 (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/380b32a7a8172c7f5485fc0787ddd6d346617cd2

commit 380b32a7a8172c7f5485fc0787ddd6d346617cd2
Author: Charles J Archer <charles.j.archer at intel.com>
Date:   Mon Aug 10 17:20:04 2015 -0500

    Code refactoring to clear up naming convention.
    
    The naming convention used within MPICH is currently a mess.  This
    patch is a first attempt at cleaning this up.  The following rules are
    applied to a part of the code (still need to be done for the rest of
    the code):
    
    1. MPL_ and OPA_ functions are independent and do not rely on any
    other MPICH or MPI related library.
    
    2. MPIU_ functions only rely on MPL_, OPA_ and the constants and types
    in MPI_.
    
    3. MPIR_ functions rely on MPL_, OPA_, MPIU_ and the device exposed
    functionality in MPID_.
    
    4. MPID_ functions are internal to the device and can use any of the
    above functionality.
    
    This commit includes cleanup to some parts of the threading code,
    debug code, error management code, base constants used in MPICH, IOV
    code, and data types.  It also attempts to move the utility
    functionality to src/util rather than leaking into src/include.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/configure.ac b/configure.ac
index 0ac2285..6959e1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4635,19 +4635,6 @@ fi
 
 PAC_C_MACRO_VA_ARGS
 
-dnl
-dnl If internationalization selected, try to find the needed functions
-dnl if test "$enable_internat" = "yes" ; then
-dnl     AC_CHECK_HEADERS(libintl.h)
-dnl     AC_CHECK_FUNCS(gettext dgettext)
-dnl     if test "$ac_cv_header_libintl" = "yes" -a \
-dnl 	    "$ac_cv_func_gettext" = "yes" -a \
-dnl 	    "$ac_cv_func_dgettext" = "yes" ; then
-dnl 	AC_DEFINE(USE_GETTEXT,1,[Define if messages should use gettext])
-dnl     else
-dnl         AC_MSG_WARN([Cannot use internationalization because necessary headers and functions are not available])
-dnl     fi
-dnl fi
 # Check for alloca function.  May set HAVE_ALLOCA_H and HAVE_ALLOCA
 AC_FUNC_ALLOCA
 # We don't use alloca unless USE_ALLOCA is also set.
@@ -5106,41 +5093,41 @@ for type in int long long_long short ; do
     if test "$len" = "$ac_cv_sizeof_void_p" ; then
         case $type in
             int)
-                MPIR_PINT_FMT_DEC_SPEC="\"%d\""
-                MPIR_UPINT_FMT_DEC_SPEC="\"%u\""
+                MPIU_PINT_FMT_DEC_SPEC="\"%d\""
+                MPIU_UPINT_FMT_DEC_SPEC="\"%u\""
                 ;;
             long)
-                MPIR_PINT_FMT_DEC_SPEC="\"%ld\""
-                MPIR_UPINT_FMT_DEC_SPEC="\"%lu\""
+                MPIU_PINT_FMT_DEC_SPEC="\"%ld\""
+                MPIU_UPINT_FMT_DEC_SPEC="\"%lu\""
                 ;;
             long_long)
-                MPIR_PINT_FMT_DEC_SPEC="\"%lld\""
-                MPIR_UPINT_FMT_DEC_SPEC="\"%llu\""
+                MPIU_PINT_FMT_DEC_SPEC="\"%lld\""
+                MPIU_UPINT_FMT_DEC_SPEC="\"%llu\""
                 ;;
             short)
-                MPIR_PINT_FMT_DEC_SPEC="\"%hd\""
-                MPIR_UPINT_FMT_DEC_SPEC="\"%hu\""
+                MPIU_PINT_FMT_DEC_SPEC="\"%hd\""
+                MPIU_UPINT_FMT_DEC_SPEC="\"%hu\""
                 ;;
             *)
-                AC_MSG_WARN([unable to determine format specifiers for MPIR_Pint, defaulting to int])
-                MPIR_PINT_FMT_DEC_SPEC="\"%d\""
-                MPIR_UPINT_FMT_DEC_SPEC="\"%u\""
+                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
-        MPIR_PINT=`echo $type | sed -e 's/_/ /'`
+        MPIU_PINT=`echo $type | sed -e 's/_/ /'`
         break
     fi
 done
-AC_DEFINE_UNQUOTED(MPIR_Pint,$MPIR_PINT,[MPIR_Pint is a pointer-sized integer])
-# allow @MPIR_PINT@ substitution in glue_romio.h
-AC_SUBST([MPIR_PINT])
+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(MPIR_PINT_FMT_DEC_SPEC,
-    $MPIR_PINT_FMT_DEC_SPEC,[MPIR_PINT_FMT_DEC_SPEC is the format
+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(MPIR_Upint,unsigned $MPIR_PINT,[MPIR_Upint is an unsigned pointer-sized integer])
-AC_DEFINE_UNQUOTED(MPIR_UPINT_FMT_DEC_SPEC,
-    $MPIR_UPINT_FMT_DEC_SPEC,[MPIR_UPINT_FMT_DEC_SPEC is the format
+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])
 
 # ----------------------------------------------------------------------------
@@ -5168,7 +5155,7 @@ export MPI_F77_AINT
 # ----------------------------------------------------------------------------
 
 # define MPIU_Size_t - used to express the size of objects
-# This is used in src/include/mpitypedefs.h to define MPIU_SIZE_T, 
+# This is used in mpiu_type_defs.h to define MPIU_SIZE_T, 
 # and is used in various parts of ch3 and mpid/common/sock.  
 # This is used to handle the potential problem that a message is 
 # too long to fit with an int.  However, we may still need to make
diff --git a/src/binding/fortran/mpif_h/buildiface b/src/binding/fortran/mpif_h/buildiface
index fd6d97d..d644d58 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 MPIR_Pint.  This allows the MPI 
+# Instead of using MPI_Aint, we use MPIU_Pint.  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 *)((MPIR_Pint)*(MPI_Fint *)v$count)";
+    print $OUTFD "(void *)((MPIU_Pint)*(MPI_Fint *)v$count)";
 }
 
 sub attrint_ctof {
@@ -2399,7 +2399,7 @@ sub attrint_ctof {
         *(MPI_Fint*)$cvar = 0;
     }
     else {
-        *(MPI_Fint*)$cvar = (MPI_Fint)(MPIR_Pint)attr$cvar;
+        *(MPI_Fint*)$cvar = (MPI_Fint)(MPIU_Pint)attr$cvar;
     }\n";
 }
 
diff --git a/src/binding/fortran/mpif_h/mpi_fortimpl.h b/src/binding/fortran/mpif_h/mpi_fortimpl.h
index 799c9f7..313a166 100644
--- a/src/binding/fortran/mpif_h/mpi_fortimpl.h
+++ b/src/binding/fortran/mpif_h/mpi_fortimpl.h
@@ -122,7 +122,7 @@
 
 /* mpi.h includes the definitions of MPI_Fint */
 #include "mpi.h"
-#include "mpitypedefs.h"
+#include "mpiutil.h"
 
 /* Include prototypes of helper functions.
    These include MPIR_Keyval_set_fortran, fortran90, and 
diff --git a/src/include/Makefile.mk b/src/include/Makefile.mk
index 12f8098..23a11ab 100644
--- a/src/include/Makefile.mk
+++ b/src/include/Makefile.mk
@@ -5,8 +5,6 @@
 ##     See COPYRIGHT in top-level directory.
 ##
 
-include $(top_srcdir)/src/include/thread/Makefile.mk
-
 # nodist_ b/c these are created by config.status and should not be distributed
 nodist_include_HEADERS += src/include/mpi.h
 
@@ -32,11 +30,9 @@ noinst_HEADERS +=                   \
     src/include/mpi_fortlogical.h   \
     src/include/mpi_lang.h          \
     src/include/mpiallstates.h      \
-    src/include/mpibase.h           \
     src/include/mpibsend.h          \
     src/include/mpich_cvars.h  \
     src/include/mpichconfconst.h    \
-    src/include/mpidbg.h            \
     src/include/mpierror.h          \
     src/include/mpierrs.h           \
     src/include/mpiext.h            \
@@ -45,15 +41,12 @@ noinst_HEADERS +=                   \
     src/include/mpiimpl.h           \
     src/include/mpiimplthread.h     \
     src/include/mpiimplthreadpost.h \
-    src/include/mpiiov.h            \
     src/include/mpimem.h            \
     src/include/mpir_nbc.h          \
+    src/include/mpir_type_defs.h    \
     src/include/mpishared.h         \
     src/include/mpistates.h         \
     src/include/mpitimerimpl.h      \
-    src/include/mpitypedefs.h       \
-    src/include/mpiu_ex.h           \
-    src/include/mpiu_thread.h       \
     src/include/mpiu_utarray.h      \
     src/include/mpiu_uthash.h       \
     src/include/mpiutil.h           \
diff --git a/src/include/glue_romio.h.in b/src/include/glue_romio.h.in
index 16271b1..5f61016 100644
--- a/src/include/glue_romio.h.in
+++ b/src/include/glue_romio.h.in
@@ -9,8 +9,8 @@
 
 /* TODO we should probaly eliminate this type entirely and just patch up the
  * environment so that intptr_t and uintptr_t always work. */
-#define MPIR_Pint @MPIR_PINT@
-#define MPIR_Upint unsigned @MPIR_PINT@
+#define MPIU_Pint @MPIU_PINT@
+#define MPIU_Upint unsigned @MPIU_PINT@
 
 #if @USE_DBG_LOGGING@
 #define USE_DBG_LOGGING 1
@@ -42,10 +42,10 @@ extern int MPIR_Ext_dbg_romio_terse_enabled;
 extern int MPIR_Ext_dbg_romio_typical_enabled;
 extern int MPIR_Ext_dbg_romio_verbose_enabled;
 
-/* a copy of MPID_Ensure_Aint_fits_in_pointer for external use, slightly
+/* 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)(MPIR_Upint) ADIOI_AINT_CAST_TO_VOID_PTR(aint));
+  MPIR_Ext_assert((aint) == (MPI_Aint)(MPIU_Upint) 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/include/mpibase.h b/src/include/mpibase.h
deleted file mode 100644
index 3e77857..0000000
--- a/src/include/mpibase.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*  
- *  (C) 2005 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-#ifndef MPIBASE_H_INCLUDED
-#define MPIBASE_H_INCLUDED
-
-/* This file contains various basis definitions that may be used 
-   by other source files (in particular, ones in src/util) to access
-   debugging and other standard features 
-
-   An appropriate "conf" file produced by configure should be defined before 
-   this file is loaded.  The following CPP definitions are recognized:
-
-   HAVE_GCC_ATTRIBUTE - supports the GCC __attribute__(...) extension
-*/
-
-/* 
-   If we do not have the GCC attribute, then make this empty.  We use
-   the GCC attribute to improve error checking by the compiler, particularly 
-   for printf/sprintf strings 
-*/
-#ifndef ATTRIBUTE
-#ifdef HAVE_GCC_ATTRIBUTE
-#define ATTRIBUTE(a_) __attribute__(a_)
-#else
-#define ATTRIBUTE(a_)
-#endif
-#endif
-
-/* These macros can be used to prevent inlining for utility functions
- * where it might make debugging easier. */
-#if defined(HAVE_ERROR_CHECKING)
-#define MPIU_DBG_ATTRIBUTE_NOINLINE ATTRIBUTE((__noinline__))
-#define MPIU_DBG_INLINE_KEYWORD
-#else
-#define MPIU_DBG_ATTRIBUTE_NOINLINE
-#define MPIU_DBG_INLINE_KEYWORD inline
-#endif
-
-/* These routines are used to ensure that messages are sent to the
-   appropriate output and (eventually) are properly internationalized */
-int MPIU_Usage_printf( const char *str, ... ) ATTRIBUTE((format(printf,1,2)));
-int MPIU_Msg_printf( const char *str, ... ) ATTRIBUTE((format(printf,1,2)));
-int MPIU_Error_printf( const char *str, ... ) ATTRIBUTE((format(printf,1,2)));
-int MPIU_Internal_error_printf( const char *str, ... ) ATTRIBUTE((format(printf,1,2)));
-int MPIU_Internal_sys_error_printf( const char *, int, const char *str, ... ) ATTRIBUTE((format(printf,3,4)));
-void MPIU_Exit( int );
-
-#endif
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 8eb2fb0..575e847 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -15,35 +15,12 @@
 #ifndef MPIIMPL_H_INCLUDED
 #define MPIIMPL_H_INCLUDED
 
-/*
- * This file is the temporary home of most of the definitions used to 
- * implement MPICH.  We will eventually divide this file into logical
- * pieces once we are certain of the relationships between the components.
- */
-
 /* style: define:vsnprintf:1 sig:0 */
 /* style: allow:printf:3 sig:0 */
 
-/* Include the mpi definitions */
-#include "mpi.h"
-
-/* There are a few definitions that must be made *before* the mpichconf.h
-   file is included.  These include the definitions of the error levels and some
-   thread granularity constants */
 #include "mpichconfconst.h"
-
-/* Data computed by configure.  This is included *after* mpi.h because we
-   do not want mpi.h to depend on any other files or configure flags */
 #include "mpichconf.h"
 
-#include "opa_primitives.h"
-
-/* if we are defining this, we must define it before including mpl.h */
-#if defined(MPICH_DEBUG_MEMINIT)
-#define MPL_VG_ENABLED 1
-#endif
-#include "mpl.h"
-
 #include <stdio.h>
 #ifdef STDC_HEADERS
 #include <stdlib.h>
@@ -65,6 +42,33 @@
 #include <limits.h>
 #endif
 
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+/* for MAXHOSTNAMELEN under Linux and OSX */
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#if defined (HAVE_USLEEP)
+#include <unistd.h>
+#if defined (NEEDS_USLEEP_DECL)
+int usleep(useconds_t usec);
+#endif
+#endif
+
+/* if we are defining this, we must define it before including mpl.h */
+#if defined(MPICH_DEBUG_MEMINIT)
+#define MPL_VG_ENABLED 1
+#endif
+
+#include "mpl.h"
+#include "opa_primitives.h"
+#include "mpi.h"
+#include "mpiutil.h"
+#include "mpidpre.h"
+
 #if defined(HAVE_LONG_LONG_INT)
 /* tt#1776: some platforms have "long long" but not a LLONG_MAX/ULLONG_MAX,
  * usually because some feature test macro has turned them off in glibc's
@@ -92,22 +96,6 @@
 #endif
 #endif /* defined(HAVE_LONG_LONG_INT) */
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-/* for MAXHOSTNAMELEN under Linux and OSX */
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
-#if defined (HAVE_USLEEP)
-#include <unistd.h>
-#if defined (NEEDS_USLEEP_DECL)
-int usleep(useconds_t usec);
-#endif
-#endif
-
 #if (!defined MAXHOSTNAMELEN) && (!defined MAX_HOSTNAME_LEN)
 #define MAX_HOSTNAME_LEN 256
 #elif !defined MAX_HOSTNAME_LEN
@@ -132,24 +120,7 @@ int usleep(useconds_t usec);
 #endif
 #endif
 
-/* Include some basic (and easily shared) definitions */
-#include "mpibase.h"
-
-/* 
-   Include the implementation definitions (e.g., error reporting, thread
-   portability)
-   More detailed documentation is contained in the MPICH and ADI3 manuals.
- */
-/* FIXME: ... to do ... */
-#include "mpitypedefs.h"
-
-/* Include definitions from the device which must exist before items in this
-   file (mpiimpl.h) can be defined. mpidpre.h must be included before any
-   files that allow the device to override or extend any terms; this includes
-   mpiimplthread.h and mpiutil.h */
-/* ------------------------------------------------------------------------- */
-#include "mpidpre.h"
-/* ------------------------------------------------------------------------- */
+#include "mpir_type_defs.h"
 
 /* Overriding memcpy:
      This is a utility function for memory copy.  The device might use
@@ -166,7 +137,6 @@ int usleep(useconds_t usec);
 #endif
 
 #include "mpiimplthread.h"
-#include "mpiutil.h"
 
 /* ------------------------------------------------------------------------- */
 /* mpidebug.h */
@@ -1213,8 +1183,8 @@ int MPIR_Comm_map_free(struct MPID_Comm *comm);
   S*/
 typedef struct MPID_Comm {
     MPIU_OBJECT_HEADER; /* adds handle and ref_count fields */
-    MPIR_Context_id_t context_id; /* Send context id.  See notes */
-    MPIR_Context_id_t recvcontext_id; /* Send context id.  See notes */
+    MPIU_Context_id_t context_id; /* Send context id.  See notes */
+    MPIU_Context_id_t recvcontext_id; /* Send context id.  See notes */
     int           remote_size;   /* Value of MPI_Comm_(remote)_size */
     int           rank;          /* Value of MPI_Comm_rank */
     MPID_Attribute *attributes;  /* List of attributes */
@@ -1419,7 +1389,7 @@ extern MPID_Comm MPID_Comm_direct[];
 
 /* should probably be (sizeof(int)*CHAR_BITS) once we make the code CHAR_BITS-clean */
 #define MPIR_CONTEXT_INT_BITS (32)
-#define MPIR_CONTEXT_ID_BITS (sizeof(MPIR_Context_id_t)*8) /* 8 --> CHAR_BITS eventually */
+#define MPIR_CONTEXT_ID_BITS (sizeof(MPIU_Context_id_t)*8) /* 8 --> CHAR_BITS eventually */
 #define MPIR_MAX_CONTEXT_MASK \
     ((1 << (MPIR_CONTEXT_ID_BITS - (MPID_CONTEXT_PREFIX_SHIFT + MPID_CONTEXT_DYNAMIC_PROC_WIDTH))) / MPIR_CONTEXT_INT_BITS)
 
@@ -1427,9 +1397,9 @@ extern MPID_Comm MPID_Comm_direct[];
    with the other comm routines (src/mpi/comm, in mpicomm.h).  However,
    to create a new communicator after a spawn or connect-accept operation, 
    the device may need to create a new contextid */
-int MPIR_Get_contextid_sparse(MPID_Comm *comm_ptr, MPIR_Context_id_t *context_id, int ignore_id);
-int MPIR_Get_contextid_sparse_group(MPID_Comm *comm_ptr, MPID_Group *group_ptr, int tag, MPIR_Context_id_t *context_id, int ignore_id);
-void MPIR_Free_contextid( MPIR_Context_id_t );
+int MPIR_Get_contextid_sparse(MPID_Comm *comm_ptr, MPIU_Context_id_t *context_id, int ignore_id);
+int MPIR_Get_contextid_sparse_group(MPID_Comm *comm_ptr, MPID_Group *group_ptr, int tag, MPIU_Context_id_t *context_id, int ignore_id);
+void MPIR_Free_contextid( MPIU_Context_id_t );
 
 /* ------------------------------------------------------------------------- */
 
@@ -1528,7 +1498,7 @@ typedef struct MPID_Request {
     struct MPIR_Sendq *dbg_next;
 
     /* Errflag for NBC requests. Not used by other requests. */
-    mpir_errflag_t errflag;
+    MPIR_Errflag_t errflag;
 
     /* Notes about request_completed_cb:
      *
@@ -1913,37 +1883,37 @@ extern MPIU_Object_alloc_t MPID_Op_mem;
 typedef struct MPID_Collops {
     int ref_count;   /* Supports lazy copies */
     /* Contains pointers to the functions for the MPI collectives */
-    int (*Barrier) (MPID_Comm *, mpir_errflag_t *);
-    int (*Bcast) (void*, int, MPI_Datatype, int, MPID_Comm *, mpir_errflag_t *);
+    int (*Barrier) (MPID_Comm *, MPIR_Errflag_t *);
+    int (*Bcast) (void*, int, MPI_Datatype, int, MPID_Comm *, MPIR_Errflag_t *);
     int (*Gather) (const void*, int, MPI_Datatype, void*, int, MPI_Datatype,
-                   int, MPID_Comm *, mpir_errflag_t *);
+                   int, MPID_Comm *, MPIR_Errflag_t *);
     int (*Gatherv) (const void*, int, MPI_Datatype, void*, const int *, const int *,
-                    MPI_Datatype, int, MPID_Comm *, mpir_errflag_t *);
+                    MPI_Datatype, int, MPID_Comm *, MPIR_Errflag_t *);
     int (*Scatter) (const void*, int, MPI_Datatype, void*, int, MPI_Datatype,
-                    int, MPID_Comm *, mpir_errflag_t *);
+                    int, MPID_Comm *, MPIR_Errflag_t *);
     int (*Scatterv) (const void*, const int *, const int *, MPI_Datatype,
-                     void*, int, MPI_Datatype, int, MPID_Comm *, mpir_errflag_t *);
+                     void*, int, MPI_Datatype, int, MPID_Comm *, MPIR_Errflag_t *);
     int (*Allgather) (const void*, int, MPI_Datatype, void*, int,
-                      MPI_Datatype, MPID_Comm *, mpir_errflag_t *);
+                      MPI_Datatype, MPID_Comm *, MPIR_Errflag_t *);
     int (*Allgatherv) (const void*, int, MPI_Datatype, void*, const int *,
-                       const int *, MPI_Datatype, MPID_Comm *, mpir_errflag_t *);
+                       const int *, MPI_Datatype, MPID_Comm *, MPIR_Errflag_t *);
     int (*Alltoall) (const void*, int, MPI_Datatype, void*, int, MPI_Datatype,
-                               MPID_Comm *, mpir_errflag_t *);
+                               MPID_Comm *, MPIR_Errflag_t *);
     int (*Alltoallv) (const void*, const int *, const int *, MPI_Datatype,
                       void*, const int *, const int *, MPI_Datatype, MPID_Comm *,
-                      mpir_errflag_t *);
+                      MPIR_Errflag_t *);
     int (*Alltoallw) (const void*, const int *, const int *, const MPI_Datatype *, void*,
-                      const int *, const int *, const MPI_Datatype *, MPID_Comm *, mpir_errflag_t *);
+                      const int *, const int *, const MPI_Datatype *, MPID_Comm *, MPIR_Errflag_t *);
     int (*Reduce) (const void*, void*, int, MPI_Datatype, MPI_Op, int,
-                   MPID_Comm *, mpir_errflag_t *);
+                   MPID_Comm *, MPIR_Errflag_t *);
     int (*Allreduce) (const void*, void*, int, MPI_Datatype, MPI_Op,
-                      MPID_Comm *, mpir_errflag_t *);
+                      MPID_Comm *, MPIR_Errflag_t *);
     int (*Reduce_scatter) (const void*, void*, const int *, MPI_Datatype, MPI_Op,
-                           MPID_Comm *, mpir_errflag_t *);
-    int (*Scan) (const void*, void*, int, MPI_Datatype, MPI_Op, MPID_Comm *, mpir_errflag_t * );
-    int (*Exscan) (const void*, void*, int, MPI_Datatype, MPI_Op, MPID_Comm *, mpir_errflag_t * );
+                           MPID_Comm *, MPIR_Errflag_t *);
+    int (*Scan) (const void*, void*, int, MPI_Datatype, MPI_Op, MPID_Comm *, MPIR_Errflag_t * );
+    int (*Exscan) (const void*, void*, int, MPI_Datatype, MPI_Op, MPID_Comm *, MPIR_Errflag_t * );
     int (*Reduce_scatter_block) (const void*, void*, int, MPI_Datatype, MPI_Op,
-                           MPID_Comm *, mpir_errflag_t *);
+                           MPID_Comm *, MPIR_Errflag_t *);
 
     /* MPI-3 nonblocking collectives */
     int (*Ibarrier_sched)(MPID_Comm *comm_ptr, MPID_Sched_t s);
@@ -3824,31 +3794,31 @@ int MPID_Comm_get_lpid(MPID_Comm *comm_ptr, int idx, int * lpid_ptr, MPIU_BOOL i
    MPID_CONTEXT_INTRA(INTER)_COLL. */
 int MPIR_Localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
                    void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype);
-int MPIC_Wait(MPID_Request * request_ptr, mpir_errflag_t *errflag);
+int MPIC_Wait(MPID_Request * request_ptr, MPIR_Errflag_t *errflag);
 int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status);
 
 /* FT versions of te MPIC_ functions */
 int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
-                 MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                 MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag,
-                 MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag);
+                 MPID_Comm *comm_ptr, MPI_Status *status, MPIR_Errflag_t *errflag);
 int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
-                  MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                  MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
                      int dest, int sendtag, void *recvbuf, MPI_Aint recvcount,
                      MPI_Datatype recvtype, int source, int recvtag,
-                     MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag);
+                     MPID_Comm *comm_ptr, MPI_Status *status, MPIR_Errflag_t *errflag);
 int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
                              int dest, int sendtag,
                              int source, int recvtag,
-                             MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag);
+                             MPID_Comm *comm_ptr, MPI_Status *status, MPIR_Errflag_t *errflag);
 int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-                  MPID_Comm *comm_ptr, MPID_Request **request, mpir_errflag_t *errflag);
+                  MPID_Comm *comm_ptr, MPID_Request **request, MPIR_Errflag_t *errflag);
 int MPIC_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-                  MPID_Comm *comm_ptr, MPID_Request **request, mpir_errflag_t *errflag);
+                  MPID_Comm *comm_ptr, MPID_Request **request, MPIR_Errflag_t *errflag);
 int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
                   int tag, MPID_Comm *comm_ptr, MPID_Request **request);
-int MPIC_Waitall(int numreq, MPID_Request *requests[], MPI_Status statuses[], mpir_errflag_t *errflag);
+int MPIC_Waitall(int numreq, MPID_Request *requests[], MPI_Status statuses[], MPIR_Errflag_t *errflag);
 
 
 void MPIR_MAXF  ( void *, void *, int *, MPI_Datatype * ) ;
@@ -3903,166 +3873,166 @@ int MPIR_Compare_equal(const void *a, const void *b, MPI_Datatype type);
 
 int MPIR_Allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                         void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                        MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                        MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                    void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                   MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                   MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Allgather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                          void *recvbuf, int recvcount, MPI_Datatype recvtype, 
-                         MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                         MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Allgather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                          void *recvbuf, int recvcount, MPI_Datatype recvtype, 
-                         MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                         MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                          void *recvbuf, const int *recvcounts, const int *displs,
-                         MPI_Datatype recvtype, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                         MPI_Datatype recvtype, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     void *recvbuf, const int *recvcounts, const int *displs,
-                    MPI_Datatype recvtype, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                    MPI_Datatype recvtype, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Allgatherv_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                           void *recvbuf, const int *recvcounts, const int *displs,
-                          MPI_Datatype recvtype, MPID_Comm *comm_pt, mpir_errflag_t *errflag );
+                          MPI_Datatype recvtype, MPID_Comm *comm_pt, MPIR_Errflag_t *errflag );
 int MPIR_Allgatherv_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                           void *recvbuf, const int *recvcounts, const int *displs,
-                          MPI_Datatype recvtype, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                          MPI_Datatype recvtype, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, int count,
-                        MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                        MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Allreduce(const void *sendbuf, void *recvbuf, int count,
-                   MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                   MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Allreduce_intra(const void *sendbuf, void *recvbuf, int count,
-                         MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                         MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Allreduce_inter(const void *sendbuf, void *recvbuf, int count,
-                        MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                        MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                        void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                       MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                       MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                   void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                  MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                  MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Alltoall_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                         void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                        MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                        MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Alltoall_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                         void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                        MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                        MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Alltoallv_impl(const void *sendbuf, const int *sendcnts, const int *sdispls,
                         MPI_Datatype sendtype, void *recvbuf, const int *recvcnts,
                         const int *rdispls, MPI_Datatype recvtype, MPID_Comm *comm_ptr,
-                        mpir_errflag_t *errflag);
+                        MPIR_Errflag_t *errflag);
 int MPIR_Alltoallv(const void *sendbuf, const int *sendcnts, const int *sdispls,
                    MPI_Datatype sendtype, void *recvbuf, const int *recvcnts,
-                   const int *rdispls, MPI_Datatype recvtype, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                   const int *rdispls, MPI_Datatype recvtype, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcnts, const int *sdispls,
                          MPI_Datatype sendtype, void *recvbuf, const int *recvcnts,
                          const int *rdispls, MPI_Datatype recvtype, MPID_Comm *comm_ptr,
-                         mpir_errflag_t *errflag);
+                         MPIR_Errflag_t *errflag);
 int MPIR_Alltoallv_inter(const void *sendbuf, const int *sendcnts, const int *sdispls,
                          MPI_Datatype sendtype, void *recvbuf, const int *recvcnts,
                          const int *rdispls, MPI_Datatype recvtype,
-                         MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                         MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Alltoallw_impl(const void *sendbuf, const int *sendcnts, const int *sdispls,
                         const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcnts,
                         const int *rdispls, const MPI_Datatype *recvtypes, MPID_Comm *comm_ptr,
-                        mpir_errflag_t *errflag);
+                        MPIR_Errflag_t *errflag);
 int MPIR_Alltoallw(const void *sendbuf, const int *sendcnts, const int *sdispls,
                    const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcnts,
                    const int *rdispls, const MPI_Datatype *recvtypes, MPID_Comm *comm_ptr,
-                   mpir_errflag_t *errflag);
+                   MPIR_Errflag_t *errflag);
 int MPIR_Alltoallw_intra(const void *sendbuf, const int *sendcnts, const int *sdispls,
                          const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcnts,
                          const int *rdispls, const MPI_Datatype *recvtypes, MPID_Comm *comm_ptr,
-                         mpir_errflag_t *errflag);
+                         MPIR_Errflag_t *errflag);
 int MPIR_Alltoallw_inter(const void *sendbuf, const int *sendcnts, const int *sdispls,
                          const MPI_Datatype *sendtypes, void *recvbuf,
                          const int *recvcnts, const int *rdispls, const MPI_Datatype *recvtypes,
-                         MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                         MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Bcast_inter(void *buffer, int count, MPI_Datatype datatype,
-		     int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+		     int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Bcast_intra (void *buffer, int count, MPI_Datatype datatype, int
-                      root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                      root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Bcast (void *buffer, int count, MPI_Datatype datatype, int
-                root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Bcast_impl (void *buffer, int count, MPI_Datatype datatype, int
-                root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Exscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                     MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                     MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Gather_impl (const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
                       void *recvbuf, int recvcnt, MPI_Datatype recvtype,
-                      int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                      int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Gather (const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
                  void *recvbuf, int recvcnt, MPI_Datatype recvtype,
-                 int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                 int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Gather_intra (const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
                        void *recvbuf, int recvcnt, MPI_Datatype recvtype,
-                       int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                       int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Gather_inter (const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
                        void *recvbuf, int recvcnt, MPI_Datatype recvtype,
-                       int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                       int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Gatherv (const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
                   void *recvbuf, const int *recvcnts, const int *displs,
-                  MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                  MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Gatherv_impl (const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
                        void *recvbuf, const int *recvcnts, const int *displs,
-                       MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                       MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Reduce_scatter_impl(const void *sendbuf, void *recvbuf, const int *recvcnts,
-                             MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                             MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Reduce_scatter(const void *sendbuf, void *recvbuf, const int *recvcnts,
-                        MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                        MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int *recvcnts,
-                              MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                              MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int *recvcnts,
                               MPI_Datatype datatype, MPI_Op op,
-                              MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                              MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Reduce_scatter_block_impl(const void *sendbuf, void *recvbuf, int recvcount,
                                    MPI_Datatype datatype, MPI_Op op, MPID_Comm
-                                   *comm_ptr, mpir_errflag_t *errflag );
+                                   *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount,
                               MPI_Datatype datatype, MPI_Op op, MPID_Comm
-                              *comm_ptr, mpir_errflag_t *errflag );
+                              *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Reduce_scatter_block_intra(const void *sendbuf, void *recvbuf, int recvcount,
                                     MPI_Datatype datatype, MPI_Op op, MPID_Comm
-                                    *comm_ptr, mpir_errflag_t *errflag );
+                                    *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Reduce_scatter_block_inter(const void *sendbuf, void *recvbuf, int recvcount,
                                     MPI_Datatype datatype, MPI_Op op, MPID_Comm
-                                    *comm_ptr, mpir_errflag_t *errflag);
+                                    *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Reduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                     MPI_Op op, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                     MPI_Op op, int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                MPI_Op op, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                MPI_Op op, int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Reduce_intra(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                      MPI_Op op, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                      MPI_Op op, int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Reduce_inter (const void *sendbuf, void *recvbuf, int count, MPI_Datatype
-                       datatype, MPI_Op op, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                       datatype, MPI_Op op, int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Scan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                   MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                   MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-              MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+              MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Scatter_impl(const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
                       void *recvbuf, int recvcnt, MPI_Datatype recvtype,
-                      int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                      int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Scatter(const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
                  void *recvbuf, int recvcnt, MPI_Datatype recvtype,
-                 int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                 int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Scatter_intra(const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
                        void *recvbuf, int recvcnt, MPI_Datatype recvtype,
-                       int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                       int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Scatter_inter(const void *sendbuf, int sendcnt, MPI_Datatype sendtype,
                        void *recvbuf, int recvcnt, MPI_Datatype recvtype,
-                       int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag );
+                       int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag );
 int MPIR_Scatterv_impl (const void *sendbuf, const int *sendcnts, const int *displs,
                         MPI_Datatype sendtype, void *recvbuf, int recvcnt,
                         MPI_Datatype recvtype, int root, MPID_Comm
-                        *comm_ptr, mpir_errflag_t *errflag);
+                        *comm_ptr, MPIR_Errflag_t *errflag);
 int MPIR_Scatterv (const void *sendbuf, const int *sendcnts, const int *displs,
                    MPI_Datatype sendtype, void *recvbuf, int recvcnt,
                    MPI_Datatype recvtype, int root, MPID_Comm
-                   *comm_ptr, mpir_errflag_t *errflag);
-int MPIR_Barrier_impl( MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
-int MPIR_Barrier( MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
-int MPIR_Barrier_intra( MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
-int MPIR_Barrier_inter( MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+                   *comm_ptr, MPIR_Errflag_t *errflag);
+int MPIR_Barrier_impl( MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
+int MPIR_Barrier( MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
+int MPIR_Barrier_intra( MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
+int MPIR_Barrier_inter( MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 
 int MPIR_Reduce_local_impl(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op);
 
@@ -4105,13 +4075,13 @@ int MPIR_Comm_agree(MPID_Comm *comm_ptr, int *flag);
 
 int MPIR_Allreduce_group(void *sendbuf, void *recvbuf, int count,
                          MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
-                         MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag);
+                         MPID_Group *group_ptr, int tag, MPIR_Errflag_t *errflag);
 int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
                                MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
-                               MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag);
+                               MPID_Group *group_ptr, int tag, MPIR_Errflag_t *errflag);
 
 
-int MPIR_Barrier_group(MPID_Comm *comm_ptr, MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag);
+int MPIR_Barrier_group(MPID_Comm *comm_ptr, MPID_Group *group_ptr, int tag, MPIR_Errflag_t *errflag);
 
 
 /* topology impl functions */
@@ -4420,7 +4390,7 @@ int MPIR_Comm_set_attr_impl(MPID_Comm *comm_ptr, int comm_keyval, void *attribut
 #define FUNCNAME MPIR_process_status
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-static inline void MPIR_Process_status(MPI_Status *status, mpir_errflag_t *errflag)
+static inline void MPIR_Process_status(MPI_Status *status, MPIR_Errflag_t *errflag)
 {
     if (MPI_PROC_NULL != status->MPI_SOURCE &&
         (MPIX_ERR_REVOKED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) ||
diff --git a/src/include/mpiimplthread.h b/src/include/mpiimplthread.h
index 4adcdf8..4e5a0d7 100644
--- a/src/include/mpiimplthread.h
+++ b/src/include/mpiimplthread.h
@@ -944,7 +944,7 @@ static inline void MPID_cc_set(MPID_cc_t *cc_ptr, int val)
 }
 
 ATTRIBUTE((unused))
-static MPIU_DBG_INLINE_KEYWORD int MPID_cc_is_complete(MPID_cc_t *cc_ptr)
+static MPL_DBG_INLINE_KEYWORD int MPID_cc_is_complete(MPID_cc_t *cc_ptr)
 {
     int complete;
     complete = (0 == OPA_load_int(cc_ptr));
diff --git a/src/include/mpiimplthreadpost.h b/src/include/mpiimplthreadpost.h
index fe1cf99..afdfa7f 100644
--- a/src/include/mpiimplthreadpost.h
+++ b/src/include/mpiimplthreadpost.h
@@ -21,9 +21,9 @@
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 /* these are inline functions instead of macros to avoid some of the
  * MPIU_THREADPRIV_DECL scoping issues */
-MPIU_DBG_ATTRIBUTE_NOINLINE
+MPL_DBG_ATTRIBUTE_NOINLINE
 ATTRIBUTE((unused))
-static MPIU_DBG_INLINE_KEYWORD void
+static MPL_DBG_INLINE_KEYWORD void
 MPIU_Thread_CS_enter_lockname_impl_(enum MPIU_Nest_mutexes kind,
                                     const char *lockname,
                                     MPID_Thread_mutex_t *mutex)
@@ -40,9 +40,9 @@ MPIU_Thread_CS_enter_lockname_impl_(enum MPIU_Nest_mutexes kind,
 #define FUNCNAME MPIU_Thread_CS_exit_lockname_impl_
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-MPIU_DBG_ATTRIBUTE_NOINLINE
+MPL_DBG_ATTRIBUTE_NOINLINE
 ATTRIBUTE((unused))
-static MPIU_DBG_INLINE_KEYWORD void
+static MPL_DBG_INLINE_KEYWORD void
 MPIU_Thread_CS_exit_lockname_impl_(enum MPIU_Nest_mutexes kind,
                                    const char *lockname,
                                    MPID_Thread_mutex_t *mutex)
@@ -59,9 +59,9 @@ MPIU_Thread_CS_exit_lockname_impl_(enum MPIU_Nest_mutexes kind,
 #define FUNCNAME MPIU_Thread_CS_yield_lockname_impl_
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-MPIU_DBG_ATTRIBUTE_NOINLINE
+MPL_DBG_ATTRIBUTE_NOINLINE
 ATTRIBUTE((unused))
-static MPIU_DBG_INLINE_KEYWORD void
+static MPL_DBG_INLINE_KEYWORD void
 MPIU_Thread_CS_yield_lockname_impl_(enum MPIU_Nest_mutexes kind,
                                     const char *lockname,
                                     MPID_Thread_mutex_t *mutex)
@@ -82,9 +82,9 @@ MPIU_Thread_CS_yield_lockname_impl_(enum MPIU_Nest_mutexes kind,
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 /* these are inline functions instead of macros to avoid some of the
  * MPIU_THREADPRIV_DECL scoping issues */
-MPIU_DBG_ATTRIBUTE_NOINLINE
+MPL_DBG_ATTRIBUTE_NOINLINE
 ATTRIBUTE((unused))
-static MPIU_DBG_INLINE_KEYWORD void
+static MPL_DBG_INLINE_KEYWORD void
 MPIU_Thread_CS_enter_lockname_recursive_impl_(enum MPIU_Nest_mutexes kind,
                                               const char *lockname,
                                               MPID_Thread_mutex_t *mutex)
@@ -110,9 +110,9 @@ MPIU_Thread_CS_enter_lockname_recursive_impl_(enum MPIU_Nest_mutexes kind,
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 /* these are inline functions instead of macros to avoid some of the
  * MPIU_THREADPRIV_DECL scoping issues */
-MPIU_DBG_ATTRIBUTE_NOINLINE
+MPL_DBG_ATTRIBUTE_NOINLINE
 ATTRIBUTE((unused))
-static MPIU_DBG_INLINE_KEYWORD void
+static MPL_DBG_INLINE_KEYWORD void
 MPIU_Thread_CS_try_lockname_recursive_impl_(enum MPIU_Nest_mutexes kind,
                                             const char *lockname,
                                             MPID_Thread_mutex_t *mutex,
@@ -145,9 +145,9 @@ MPIU_Thread_CS_try_lockname_recursive_impl_(enum MPIU_Nest_mutexes kind,
 #define FUNCNAME MPIU_Thread_CS_exit_lockname_recursive_impl_
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-MPIU_DBG_ATTRIBUTE_NOINLINE
+MPL_DBG_ATTRIBUTE_NOINLINE
 ATTRIBUTE((unused))
-static MPIU_DBG_INLINE_KEYWORD void
+static MPL_DBG_INLINE_KEYWORD void
 MPIU_Thread_CS_exit_lockname_recursive_impl_(enum MPIU_Nest_mutexes kind,
                                              const char *lockname,
                                              MPID_Thread_mutex_t *mutex)
@@ -171,9 +171,9 @@ MPIU_Thread_CS_exit_lockname_recursive_impl_(enum MPIU_Nest_mutexes kind,
 #define FUNCNAME MPIU_Thread_CS_yield_lockname_recursive_impl_
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-MPIU_DBG_ATTRIBUTE_NOINLINE
+MPL_DBG_ATTRIBUTE_NOINLINE
 ATTRIBUTE((unused))
-static MPIU_DBG_INLINE_KEYWORD void
+static MPL_DBG_INLINE_KEYWORD void
 MPIU_Thread_CS_yield_lockname_recursive_impl_(enum MPIU_Nest_mutexes kind,
                                               const char *lockname,
                                               MPID_Thread_mutex_t *mutex)
diff --git a/src/include/mpimem.h b/src/include/mpimem.h
index 9bd5a8f..1694bbc 100644
--- a/src/include/mpimem.h
+++ b/src/include/mpimem.h
@@ -24,9 +24,6 @@ extern "C" {
 #include "mpichconf.h"
 #include "mpl.h"
 
-/* ensure that we weren't included out of order */
-#include "mpibase.h"
-
 /* Define attribute as empty if it has no definition */
 #ifndef ATTRIBUTE
 #define ATTRIBUTE(a)
@@ -444,8 +441,6 @@ if (pointer_) { \
 #   error "No function defined for case-insensitive strncmp"
 #endif
 
-#define MPIU_Snprintf MPL_snprintf
-
 /* MPIU_Basename(path, basename)
    This function finds the basename in a path (ala "man 1 basename").
    *basename will point to an element in path.
diff --git a/src/include/mpir_type_defs.h b/src/include/mpir_type_defs.h
new file mode 100644
index 0000000..e34b29e
--- /dev/null
+++ b/src/include/mpir_type_defs.h
@@ -0,0 +1,21 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2001 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+#if !defined(MPIR_TYPE_DEFS_H_INCLUDED)
+#define MPIR_TYPE_DEFS_H_INCLUDED
+
+#include "mpichconf.h"
+
+/* Define a typedef for the errflag value used by many internal functions.
+ * If an error needs to be returned, these values can be used to signal such.
+ * More details can be found further down in the code with the bitmasking logic */
+typedef enum {
+    MPIR_ERR_NONE = MPI_SUCCESS,
+    MPIR_ERR_PROC_FAILED = MPIX_ERR_PROC_FAILED,
+    MPIR_ERR_OTHER = MPI_ERR_OTHER
+} MPIR_Errflag_t;
+
+#endif /* !defined(MPIR_TYPE_DEFS_H_INCLUDED) */
diff --git a/src/include/mpitypedefs.h b/src/include/mpitypedefs.h
deleted file mode 100644
index 91e6207..0000000
--- a/src/include/mpitypedefs.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- *  (C) 2001 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-#if !defined(MPITYPEDEFS_H_INCLUDED)
-#define MPITYPEDEFS_H_INCLUDED
-
-#include "mpichconf.h"
-
-/* ------------------------------------------------------------------------- */
-/* mpitypedefs.h */
-/* ------------------------------------------------------------------------- */
-/* Basic typedefs */
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-
-/* inttypes.h is supposed to include stdint.h but this is here as
-   belt-and-suspenders for platforms that aren't fully compliant */
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-/* stdint.h gives us fixed-width C99 types like int16_t, among others */
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-/* stdbool.h gives us the C boolean type */
-#ifdef HAVE_STDBOOL_H
-#include <stdbool.h>
-#endif
-/* complex.h gives us the C complex type */
-#ifdef HAVE_COMPLEX_H
-#include <complex.h>
-#endif
-
-#ifdef HAVE_WINDOWS_H
-#include <winsock2.h>
-#include <windows.h>
-#else
-#ifndef BOOL
-#define BOOL int
-#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#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
-
-#define MPIU_MAX(a,b)    (((a) > (b)) ? (a) : (b))
-#define MPIU_MIN(a,b)    (((a) < (b)) ? (a) : (b))
-
-#include "mpiiov.h"
-
-#define MPIR_CONTEXT_ID_T_DATATYPE MPI_UINT16_T
-typedef uint16_t MPIR_Context_id_t;
-#define MPIR_INVALID_CONTEXT_ID ((MPIR_Context_id_t)0xffff)
-
-typedef MPIU_SIZE_T MPIU_Size_t;
-
-/* Define a typedef for the errflag value used by many internal functions.
- * If an error needs to be returned, these values can be used to signal such.
- * More details can be found further down in the code with the bitmasking logic */
-typedef enum {MPIR_ERR_NONE = MPI_SUCCESS,
-              MPIR_ERR_PROC_FAILED = MPIX_ERR_PROC_FAILED,
-              MPIR_ERR_OTHER = MPI_ERR_OTHER}
-mpir_errflag_t;
-
-/* Use the MPIU_PtrToXXX macros to convert pointers to and from integer types */
-
-/* The Microsoft compiler will not allow casting of different sized types 
- * without
- * printing a compiler warning.  Using these macros allows compiler specific
- * type casting and avoids the warning output.  These macros should only be used
- * in code that can handle loss of bits.
- */
-
-/* PtrToLong converts a pointer to a long type, truncating bits if necessary */
-#ifdef HAVE_PTRTOLONG
-#define MPIU_PtrToLong PtrToLong
-#else
-#define MPIU_PtrToLong(a) (long)(a)
-#endif
-/* PtrToInt converts a pointer to a int type, truncating bits if necessary */
-#ifdef HAVE_PTRTOINT
-#define MPIU_PtrToInt PtrToInt
-#else
-#define MPIU_PtrToInt(a) (int)(a)
-#endif
-/* PtrToAint converts a pointer to an MPI_Aint type, truncating bits if necessary */
-#ifdef HAVE_PTRTOAINT
-#define MPIU_PtrToAint(a) ((MPI_Aint)(INT_PTR) (a) )
-#else
-/* 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)(MPIR_Upint)(a))
-#endif
-/* LongToPtr converts a long to a pointer type, extending bits if necessary */
-#ifdef HAVE_LONGTOPTR
-#define MPIU_LongToPtr LongToPtr
-#else
-#define MPIU_LongToPtr(a) (void*)(a)
-#endif
-/* IntToPtr converts a int to a pointer type, extending bits if necessary */
-#ifdef HAVE_INTTOPTR
-#define MPIU_IntToPtr IntToPtr
-#else
-#define MPIU_IntToPtr(a) (void*)(a)
-#endif
-/* AintToPtr converts an MPI_Aint to a pointer type, extending bits if necessary */
-#ifdef HAVE_AINTTOPTR
-#define MPIU_AintToPtr(a) ((VOID *)(INT_PTR)((MPI_Aint)a))
-#else
-#define MPIU_AintToPtr(a) (void*)(a)
-#endif
-
-/* 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 MPI_AINT_CAST_TO_VOID_PTR (void *)(MPIR_Pint)
-#define MPI_VOID_PTR_CAST_TO_MPI_AINT (MPI_Aint)(MPIR_Upint)
-#define MPI_PTR_DISP_CAST_TO_MPI_AINT (MPI_Aint)(MPIR_Pint)
-
-/* ------------------------------------------------------------------------- */
-/* end of mpitypedefs.h */
-/* ------------------------------------------------------------------------- */
-
-#endif /* !defined(MPITYPEDEFS_H_INCLUDED) */
diff --git a/src/include/mpiutil.h b/src/include/mpiutil.h
index 95fec2f..96768de 100644
--- a/src/include/mpiutil.h
+++ b/src/include/mpiutil.h
@@ -6,6 +6,11 @@
 #if !defined(MPIUTIL_H_INCLUDED)
 #define MPIUTIL_H_INCLUDED
 
+#include "mpiu_strerror.h"
+#include "mpiu_thread.h"
+#include "mpiu_type_defs.h"
+#include "mpidbg.h"
+
 /*
 === BEGIN_MPI_T_CVAR_INFO_BLOCK ===
 
@@ -48,12 +53,6 @@ cvars:
 /* -------------------------------------------------------------------------- */
 
 /*
- * MPIU_Sterror()
- *
- * Thread safe implementation of strerror(), whenever possible. */
-const char *MPIU_Strerror(int errnum);
-
-/*
  * MPIU_Busy_wait()
  *
  * Call this in every busy wait loop to periodically yield the processor.  The
@@ -136,7 +135,7 @@ int MPIR_Assert_fail_fmt(const char *cond, const char *file_name, int line_num,
  *    a backtrace, if valgrind client requests are available and the process is
  *    running under valgrind.  It will also evaluate and print the supplied
  *    message.
- * 2) It will emit an "Assertion failed..." message via MPIU_Internal_error_printf.
+ * 2) It will emit an "Assertion failed..." message via MPL_internal_error_printf.
  *    The supplied error message will also be evaluated and printed.
  * 3) It will similarly emit the assertion failure and caller supplied messages
  *    to the debug log, if enabled, via MPIU_DBG_MSG_FMT.
@@ -250,7 +249,7 @@ int MPIR_Assert_fail_fmt(const char *cond, const char *file_name, int line_num,
  *
  * \param[in]  aint  Variable of type MPI_Aint
  */
-#define MPID_Ensure_Aint_fits_in_int(aint) \
+#define MPIU_Ensure_Aint_fits_in_int(aint) \
   MPIU_Assert((aint) == (MPI_Aint)(int)(aint));
 
 /*
@@ -260,7 +259,7 @@ int MPIR_Assert_fail_fmt(const char *cond, const char *file_name, int line_num,
  *
  * \param[in]  aint  Variable of type MPI_Aint
  */
-#define MPID_Ensure_Aint_fits_in_uint(aint) \
+#define MPIU_Ensure_Aint_fits_in_uint(aint) \
   MPIU_Assert((aint) == (MPI_Aint)(unsigned int)(aint));
 
 /*
@@ -269,8 +268,8 @@ int MPIR_Assert_fail_fmt(const char *cond, const char *file_name, int line_num,
  *
  * \param[in]  aint  Variable of type MPI_Aint
  */
-#define MPID_Ensure_Aint_fits_in_pointer(aint) \
-  MPIU_Assert((aint) == (MPI_Aint)(MPIR_Upint) MPI_AINT_CAST_TO_VOID_PTR(aint));
+#define MPIU_Ensure_Aint_fits_in_pointer(aint) \
+  MPIU_Assert((aint) == (MPI_Aint)(MPIU_Upint) MPI_AINT_CAST_TO_VOID_PTR(aint));
 
 /* -------------------------------------------------------------------------- */
 /* static assertions
diff --git a/src/include/thread/Makefile.mk b/src/include/thread/Makefile.mk
deleted file mode 100644
index b152cd3..0000000
--- a/src/include/thread/Makefile.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-## -*- Mode: Makefile; -*-
-## vim: set ft=automake :
-##
-## (C) 2011 by Argonne National Laboratory.
-##     See COPYRIGHT in top-level directory.
-##
-
-noinst_HEADERS +=                                  \
-    src/include/thread/mpiu_thread_posix_funcs.h   \
-    src/include/thread/mpiu_thread_posix_types.h   \
-    src/include/thread/mpiu_thread_solaris_funcs.h \
-    src/include/thread/mpiu_thread_solaris_types.h \
-    src/include/thread/mpiu_thread_win_funcs.h     \
-    src/include/thread/mpiu_thread_win_types.h
-
diff --git a/src/mpi/attr/attr_get.c b/src/mpi/attr/attr_get.c
index eee5394..1851e52 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(MPIR_Pint) is 
+	       case.  Note that this code assumes sizeof(MPIU_Pint) is 
 	       a power of 2. */
-            MPIU_ERR_CHKANDJUMP((MPIR_Pint)attribute_val & (sizeof(MPIR_Pint)-1),
+            MPIU_ERR_CHKANDJUMP((MPIU_Pint)attribute_val & (sizeof(MPIU_Pint)-1),
                                 mpi_errno,MPI_ERR_ARG,"**attrnotptr");
 #           endif
         }
diff --git a/src/mpi/attr/attrutil.c b/src/mpi/attr/attrutil.c
index f04c1f7..4658657 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 *)(MPIR_Pint)attr_p->value,
+                (void *)(MPIU_Pint)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 *)(MPIR_Pint)attr_p->value,
+                (void *)(MPIU_Pint)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(MPIR_Pint)) */
-        new_p->value            = (MPID_AttrVal_t)(MPIR_Pint)new_value;
+	 sizeof(MPIU_Pint)) */
+        new_p->value            = (MPID_AttrVal_t)(MPIU_Pint)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 28a8e19..5ddeb01 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(MPIR_Pint) is 
+	       case.  Note that this code assumes sizeof(MPIU_Pint) is 
 	       a power of 2. */
-	    if ((MPIR_Pint)attribute_val & (sizeof(MPIR_Pint)-1)) {
+	    if ((MPIU_Pint)attribute_val & (sizeof(MPIU_Pint)-1)) {
 		MPIU_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 MPIR_Pint instead of MPI_Fint.
+	   pointer-sized int).  Thus we use MPIU_Pint 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 MPIR_Pint.
+               that define MPI_Aint as a different size than MPIU_Pint.
 	       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 MPIR_Pint is for exactly the case where MPI_Aint is not
-	       the same as MPIR_Pint. 
+	       and MPIU_Pint is for exactly the case where MPI_Aint is not
+	       the same as MPIU_Pint. 
 	       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)
-		*(MPIR_Pint*)attr_val_p = *(int*)*(void **)attr_val_p;
+		*(MPIU_Pint*)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 . */
-                *(MPIR_Pint*)attr_val_p = *(int*)*(void **)attr_val_p;
+                *(MPIU_Pint*)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 *)(MPIR_Pint)(p->value);
+			*(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
 		    }
 		}
 		else {
-		    *(void**)attribute_val = (void *)(MPIR_Pint)(p->value);
+		    *(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
                 }
 
 		break;
diff --git a/src/mpi/attr/comm_set_attr.c b/src/mpi/attr/comm_set_attr.c
index 2aa9457..8da5935 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 MPIR_Pint is different from MPI_Aint, 
+	       in the case where MPIU_Pint 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)(MPIR_Pint)attribute_val;
+	    p->value    = (MPID_AttrVal_t)(MPIU_Pint)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)(MPIR_Pint)attribute_val;
+	new_p->value	     = (MPID_AttrVal_t)(MPIU_Pint)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 6190d90..ac62d75 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(MPIR_Pint) is 
+	       case.  Note that this code assumes sizeof(MPIU_Pint) is 
 	       a power of 2. */
-	    if ((MPIR_Pint)attribute_val & (sizeof(MPIR_Pint)-1)) {
+	    if ((MPIU_Pint)attribute_val & (sizeof(MPIU_Pint)-1)) {
 		MPIU_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 *)(MPIR_Pint)(p->value);
+		    *(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
 		}
 	    }
 	    else
-		*(void**)attribute_val = (void *)(MPIR_Pint)(p->value);
+		*(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
 	    
 	    break;
 	}
diff --git a/src/mpi/attr/type_set_attr.c b/src/mpi/attr/type_set_attr.c
index c1a8f1a..1239d5a 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)(MPIR_Pint)attribute_val;
+	    p->value    = (MPID_AttrVal_t)(MPIU_Pint)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)(MPIR_Pint)attribute_val;
+	    new_p->value	 = (MPID_AttrVal_t)(MPIU_Pint)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)(MPIR_Pint)attribute_val;
+	new_p->value	     = (MPID_AttrVal_t)(MPIU_Pint)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 b766058..c6cc3a2 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(MPIR_Pint) is
+	       case.  Note that this code assumes sizeof(MPIU_Pint) is
 	       a power of 2. */
-	    if ((MPIR_Pint)attribute_val & (sizeof(MPIR_Pint)-1)) {
+	    if ((MPIU_Pint)attribute_val & (sizeof(MPIU_Pint)-1)) {
 		MPIU_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 */
-	MPIR_Pint  *attr_int = (MPIR_Pint *)attribute_val;
+	MPIU_Pint  *attr_int = (MPIU_Pint *)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 *)(MPIR_Pint)(p->value);
+			*(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
 		    }
 		}
 		else
-		    *(void**)attribute_val = (void *)(MPIR_Pint)(p->value);
+		    *(void**)attribute_val = (void *)(MPIU_Pint)(p->value);
 		
 		break;
 	    }
diff --git a/src/mpi/attr/win_set_attr.c b/src/mpi/attr/win_set_attr.c
index 8522d40..6135db4 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)(MPIR_Pint)attribute_val;
+	    p->value    = (MPID_AttrVal_t)(MPIU_Pint)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)(MPIR_Pint)attribute_val;
+	    new_p->value	 = (MPID_AttrVal_t)(MPIU_Pint)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)(MPIR_Pint)attribute_val;
+	new_p->value	     = (MPID_AttrVal_t)(MPIU_Pint)attribute_val;
 	new_p->post_sentinal = 0;
 	new_p->next	     = 0;
 	MPIR_Keyval_add_ref( keyval_ptr );
diff --git a/src/mpi/coll/allgather.c b/src/mpi/coll/allgather.c
index 24f0817..877ccfa 100644
--- a/src/mpi/coll/allgather.c
+++ b/src/mpi/coll/allgather.c
@@ -117,7 +117,7 @@ int MPIR_Allgather_intra (
     int recvcount,
     MPI_Datatype recvtype,
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
     int comm_size, rank;
     int mpi_errno = MPI_SUCCESS;
@@ -147,7 +147,7 @@ int MPIR_Allgather_intra (
     MPID_Datatype_get_size_macro( recvtype, type_size );
 
     /* This is the largest offset we add to recvbuf */
-    MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+    MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
 				     (comm_size * recvcount * recvtype_extent));
 
     /* check if multiple threads are calling this collective function */
@@ -655,7 +655,7 @@ int MPIR_Allgather_inter (
     int recvcount,
     MPI_Datatype recvtype,
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag)
+    MPIR_Errflag_t *errflag)
 {
     /* Intercommunicator Allgather.
        Each group does a gather to local root with the local
@@ -682,7 +682,7 @@ int MPIR_Allgather_inter (
         MPID_Datatype_get_extent_macro( sendtype, send_extent );
         extent = MPIR_MAX(send_extent, true_extent);
 
-	MPID_Ensure_Aint_fits_in_pointer(extent * sendcount * local_size);
+	MPIU_Ensure_Aint_fits_in_pointer(extent * sendcount * local_size);
         MPIU_CHKLMEM_MALLOC(tmp_buf, void*, extent*sendcount*local_size, mpi_errno, "tmp_buf");
 
         /* adjust for potential negative lower bound in datatype */
@@ -787,7 +787,7 @@ int MPIR_Allgather_inter (
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                    void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                   MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                   MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -821,7 +821,7 @@ fn_fail:
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                         void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                        MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                        MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -902,7 +902,7 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_ALLGATHER);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/allgatherv.c b/src/mpi/coll/allgatherv.c
index b3fcfbf..3cefcbe 100644
--- a/src/mpi/coll/allgatherv.c
+++ b/src/mpi/coll/allgatherv.c
@@ -98,7 +98,7 @@ int MPIR_Allgatherv_intra (
     const int *displs,
     MPI_Datatype recvtype,
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
     int        comm_size, rank, j, i, left, right;
     int mpi_errno = MPI_SUCCESS;
@@ -149,7 +149,7 @@ int MPIR_Allgatherv_intra (
 
             MPIR_Type_get_true_extent_impl(recvtype, &recvtype_true_lb, &recvtype_true_extent);
 
-            MPID_Ensure_Aint_fits_in_pointer(total_count *
+            MPIU_Ensure_Aint_fits_in_pointer(total_count *
                            (MPIR_MAX(recvtype_true_extent, recvtype_extent)));
             MPIU_CHKLMEM_MALLOC(tmp_buf, void *, total_count*(MPIR_MAX(recvtype_true_extent,recvtype_extent)), mpi_errno, "tmp_buf");
 
@@ -539,7 +539,7 @@ int MPIR_Allgatherv_intra (
         /* get true extent of recvtype */
         MPIR_Type_get_true_extent_impl(recvtype, &recvtype_true_lb, &recvtype_true_extent);
             
-        MPID_Ensure_Aint_fits_in_pointer(total_count *
+        MPIU_Ensure_Aint_fits_in_pointer(total_count *
                         MPIR_MAX(recvtype_true_extent, recvtype_extent));
         recvbuf_extent = total_count *
             (MPIR_MAX(recvtype_true_extent, recvtype_extent));
@@ -769,7 +769,7 @@ int MPIR_Allgatherv_inter (
     const int *displs,
     MPI_Datatype recvtype,
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
 /* Intercommunicator Allgatherv.
    This is done differently from the intercommunicator allgather
@@ -892,7 +892,7 @@ int MPIR_Allgatherv_inter (
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                     void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype,
-                    MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                    MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -928,7 +928,7 @@ int MPIR_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                          void *recvbuf, const int *recvcounts, const int *displs,
-                         MPI_Datatype recvtype, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                         MPI_Datatype recvtype, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -1013,7 +1013,7 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_ALLGATHERV);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/allred_group.c b/src/mpi/coll/allred_group.c
index ecc9a17..18cd2bc 100644
--- a/src/mpi/coll/allred_group.c
+++ b/src/mpi/coll/allred_group.c
@@ -9,7 +9,7 @@
 
 int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
                                MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
-                               MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag);
+                               MPID_Group *group_ptr, int tag, MPIR_Errflag_t *errflag);
 
 /* Local utility macro: takes an two args and sets lvalue cr_ equal to the rank
  * in comm_ptr corresponding to rvalue gr_ */
@@ -27,7 +27,7 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
                                MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
-                               MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag)
+                               MPID_Group *group_ptr, int tag, MPIR_Errflag_t *errflag)
 {
     MPI_Aint type_size;
     int mpi_errno = MPI_SUCCESS;
@@ -58,7 +58,7 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
     MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent);
     MPID_Datatype_get_extent_macro(datatype, extent);
 
-    MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+    MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
     MPIU_CHKLMEM_MALLOC(tmp_buf, void *, count*(MPIR_MAX(extent,true_extent)), mpi_errno, "temporary buffer");
 
     /* adjust for potential negative lower bound in datatype */
@@ -366,7 +366,7 @@ int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count,
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Allreduce_group(void *sendbuf, void *recvbuf, int count,
                          MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
-                         MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag)
+                         MPID_Group *group_ptr, int tag, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
diff --git a/src/mpi/coll/allreduce.c b/src/mpi/coll/allreduce.c
index 5da27b3..75dab4b 100644
--- a/src/mpi/coll/allreduce.c
+++ b/src/mpi/coll/allreduce.c
@@ -149,7 +149,7 @@ MPIR_Op_check_dtype_fn *MPIR_Op_check_dtype_table[] = {
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 static inline int allreduce_intra_or_coll_fn(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op,
-                                             MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                                             MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -183,7 +183,7 @@ int MPIR_Allreduce_intra (
     MPI_Datatype datatype, 
     MPI_Op op, 
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
 #ifdef MPID_HAS_HETERO
     int is_homogeneous;
@@ -315,7 +315,7 @@ int MPIR_Allreduce_intra (
         MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent);
         MPID_Datatype_get_extent_macro(datatype, extent);
 
-        MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+        MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
         MPIU_CHKLMEM_MALLOC(tmp_buf, void *, count*(MPIR_MAX(extent,true_extent)), mpi_errno, "temporary buffer");
 	
         /* adjust for potential negative lower bound in datatype */
@@ -624,7 +624,7 @@ int MPIR_Allreduce_inter (
     MPI_Datatype datatype, 
     MPI_Op op, 
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
 /* Intercommunicator Allreduce.
    We first do intracommunicator reduces to rank 0 on left and right
@@ -646,7 +646,7 @@ int MPIR_Allreduce_inter (
         /* I think this is the worse case, so we can avoid an assert()
          * inside the for loop */
         /* Should MPIU_CHKLMEM_MALLOC do this? */
-        MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+        MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
         MPIU_CHKLMEM_MALLOC(tmp_buf, void *, count*(MPIR_MAX(extent,true_extent)), mpi_errno, "temporary buffer");
         /* adjust for potential negative lower bound in datatype */
         tmp_buf = (void *)((char*)tmp_buf - true_lb);
@@ -714,7 +714,7 @@ int MPIR_Allreduce_inter (
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                   MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                   MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -745,7 +745,7 @@ fn_fail:
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
-                        mpir_errflag_t *errflag)
+                        MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -816,7 +816,7 @@ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count,
     static const char FCNAME[] = "MPI_Allreduce";
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_ALLREDUCE);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index 5a465a5..a495944 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -135,7 +135,7 @@ int MPIR_Alltoall_intra(
     int recvcount, 
     MPI_Datatype recvtype, 
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
     int          comm_size, i, j, pof2;
     MPI_Aint     sendtype_extent, recvtype_extent;
@@ -469,7 +469,7 @@ int MPIR_Alltoall_inter(
     int recvcount, 
     MPI_Datatype recvtype, 
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
 /* Intercommunicator alltoall. We use a pairwise exchange algorithm
    similar to the one used in intracommunicator alltoall for long
@@ -501,9 +501,9 @@ int MPIR_Alltoall_inter(
 
     /* Do the pairwise exchanges */
     max_size = MPIR_MAX(local_size, remote_size);
-    MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+    MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
 				     max_size*recvcount*recvtype_extent);
-    MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
+    MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
 				     max_size*sendcount*sendtype_extent);
     for (i=0; i<max_size; i++) {
         src = (rank - i + max_size) % max_size;
@@ -555,7 +555,7 @@ int MPIR_Alltoall_inter(
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                   void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                  MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                  MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -585,7 +585,7 @@ int MPIR_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                        void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                       MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                       MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     if (comm_ptr->coll_fns != NULL && comm_ptr->coll_fns->Alltoall != NULL) {
@@ -645,7 +645,7 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_ALLTOALL);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/alltoallv.c b/src/mpi/coll/alltoallv.c
index fa53196..9c6b8d9 100644
--- a/src/mpi/coll/alltoallv.c
+++ b/src/mpi/coll/alltoallv.c
@@ -63,7 +63,7 @@ int MPI_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls
 int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *sdispls,
                          MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
                          const int *rdispls, MPI_Datatype recvtype, MPID_Comm *comm_ptr,
-                         mpir_errflag_t *errflag)
+                         MPIR_Errflag_t *errflag)
 {
     int        comm_size, i, j;
     MPI_Aint   send_extent, recv_extent;
@@ -152,7 +152,7 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
                 if (recvcounts[dst]) {
                     MPID_Datatype_get_size_macro(recvtype, type_size);
                     if (type_size) {
-                        MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+                        MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
                                                          rdispls[dst]*recv_extent);
                         mpi_errno = MPIC_Irecv((char *)recvbuf+rdispls[dst]*recv_extent,
                                                   recvcounts[dst], recvtype, dst,
@@ -174,7 +174,7 @@ int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcounts, const int *
                 if (sendcounts[dst]) {
                     MPID_Datatype_get_size_macro(sendtype, type_size);
                     if (type_size) {
-                        MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
+                        MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
                                                          sdispls[dst]*send_extent);
                         mpi_errno = MPIC_Isend((char *)sendbuf+sdispls[dst]*send_extent,
                                                   sendcounts[dst], sendtype, dst,
@@ -238,7 +238,7 @@ fn_fail:
 int MPIR_Alltoallv_inter(const void *sendbuf, const int *sendcounts, const int *sdispls,
                          MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
                          const int *rdispls, MPI_Datatype recvtype, MPID_Comm *comm_ptr,
-                         mpir_errflag_t *errflag)
+                         MPIR_Errflag_t *errflag)
 {
 /* Intercommunicator alltoallv. We use a pairwise exchange algorithm
    similar to the one used in intracommunicator alltoallv. Since the
@@ -282,7 +282,7 @@ int MPIR_Alltoallv_inter(const void *sendbuf, const int *sendcounts, const int *
             recvcount = 0;
         }
         else {
-            MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+            MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
 					     rdispls[src]*recv_extent);
             recvaddr = (char *)recvbuf + rdispls[src]*recv_extent;
             recvcount = recvcounts[src];
@@ -293,7 +293,7 @@ int MPIR_Alltoallv_inter(const void *sendbuf, const int *sendcounts, const int *
             sendcount = 0;
         }
         else {
-            MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
+            MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
 					     sdispls[dst]*send_extent);
             sendaddr = (char *)sendbuf + sdispls[dst]*send_extent;
             sendcount = sendcounts[dst];
@@ -330,7 +330,7 @@ int MPIR_Alltoallv_inter(const void *sendbuf, const int *sendcounts, const int *
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls,
                    MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls,
-                   MPI_Datatype recvtype, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                   MPI_Datatype recvtype, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -361,7 +361,7 @@ int MPIR_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispl
 int MPIR_Alltoallv_impl(const void *sendbuf, const int *sendcounts, const int *sdispls,
                         MPI_Datatype sendtype, void *recvbuf, const int *recvcounts,
                         const int *rdispls, MPI_Datatype recvtype,
-                        MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                        MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -436,7 +436,7 @@ int MPI_Alltoallv(const void *sendbuf, const int *sendcounts,
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_ALLTOALLV);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/alltoallw.c b/src/mpi/coll/alltoallw.c
index e4b534b..a9f551c 100644
--- a/src/mpi/coll/alltoallw.c
+++ b/src/mpi/coll/alltoallw.c
@@ -57,7 +57,7 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls
 int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int sdispls[],
                          const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[],
                          const int rdispls[], const MPI_Datatype recvtypes[], MPID_Comm *comm_ptr,
-                         mpir_errflag_t *errflag)
+                         MPIR_Errflag_t *errflag)
 {
     int        comm_size, i, j;
     int mpi_errno = MPI_SUCCESS;
@@ -238,7 +238,7 @@ int MPIR_Alltoallw_intra(const void *sendbuf, const int sendcounts[], const int
 int MPIR_Alltoallw_inter(const void *sendbuf, const int sendcounts[], const int sdispls[],
                          const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[],
                          const int rdispls[], const MPI_Datatype recvtypes[], MPID_Comm *comm_ptr,
-                         mpir_errflag_t *errflag)
+                         MPIR_Errflag_t *errflag)
 {
 /* Intercommunicator alltoallw. We use a pairwise exchange algorithm
    similar to the one used in intracommunicator alltoallw. Since the
@@ -325,7 +325,7 @@ int MPIR_Alltoallw_inter(const void *sendbuf, const int sendcounts[], const int
 int MPIR_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[],
                    const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[],
                    const int rdispls[], const MPI_Datatype recvtypes[],
-                   MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                   MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -356,7 +356,7 @@ int MPIR_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispl
 int MPIR_Alltoallw_impl(const void *sendbuf, const int sendcounts[], const int sdispls[],
                         const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[],
                         const int rdispls[], const MPI_Datatype recvtypes[],
-                        MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                        MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -431,7 +431,7 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[],
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_ALLTOALLW);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/barrier.c b/src/mpi/coll/barrier.c
index 821d77a..8d624e1 100644
--- a/src/mpi/coll/barrier.c
+++ b/src/mpi/coll/barrier.c
@@ -67,7 +67,7 @@ int MPI_Barrier(MPI_Comm comm) __attribute__((weak,alias("PMPI_Barrier")));
 #define FUNCNAME barrier_smp_intra
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-static int barrier_smp_intra(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+static int barrier_smp_intra(MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno=MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
@@ -128,7 +128,7 @@ static int barrier_smp_intra(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
 #define FUNCNAME MPIR_Barrier_intra
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIR_Barrier_intra( MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
+int MPIR_Barrier_intra( MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag )
 {
     int size, rank, src, dst, mask, mpi_errno=MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
@@ -189,7 +189,7 @@ int MPIR_Barrier_intra( MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
 #define FUNCNAME MPIR_Barrier_inter
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIR_Barrier_inter( MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
+int MPIR_Barrier_inter( MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag )
 {
     int rank, mpi_errno = MPI_SUCCESS, root;
     int mpi_errno_ret = MPI_SUCCESS;
@@ -282,7 +282,7 @@ t-to-point messages.
 #define FUNCNAME MPIR_Barrier
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIR_Barrier(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+int MPIR_Barrier(MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -311,7 +311,7 @@ int MPIR_Barrier(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
 #define FUNCNAME MPIR_Barrier_impl
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIR_Barrier_impl(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+int MPIR_Barrier_impl(MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     if (comm_ptr->coll_fns != NULL && comm_ptr->coll_fns->Barrier != NULL)
@@ -370,7 +370,7 @@ int MPI_Barrier( MPI_Comm comm )
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_BARRIER);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/barrier_group.c b/src/mpi/coll/barrier_group.c
index d55f097..e7e5840 100644
--- a/src/mpi/coll/barrier_group.c
+++ b/src/mpi/coll/barrier_group.c
@@ -13,7 +13,7 @@
    This is an intracommunicator barrier only!
 */
 
-int MPIR_Barrier_group( MPID_Comm *comm_ptr, MPID_Group *group_ptr, int tag, mpir_errflag_t *errflag )
+int MPIR_Barrier_group( MPID_Comm *comm_ptr, MPID_Group *group_ptr, int tag, MPIR_Errflag_t *errflag )
 {
     int src = 0;
     int dst, mpi_errno = MPI_SUCCESS;
diff --git a/src/mpi/coll/bcast.c b/src/mpi/coll/bcast.c
index f50b941..5ea65e5 100644
--- a/src/mpi/coll/bcast.c
+++ b/src/mpi/coll/bcast.c
@@ -127,7 +127,7 @@ static int MPIR_Bcast_binomial(
     MPI_Datatype datatype, 
     int root, 
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag)
+    MPIR_Errflag_t *errflag)
 {
     int        rank, comm_size, src, dst;
     int        relative_rank, mask;
@@ -338,7 +338,7 @@ static int scatter_for_bcast(
     void *tmp_buf,
     int is_contig,
     int is_homogeneous,
-    mpir_errflag_t *errflag)
+    MPIR_Errflag_t *errflag)
 {
     MPI_Status status;
     int        rank, comm_size, src, dst;
@@ -480,7 +480,7 @@ static int MPIR_Bcast_scatter_doubling_allgather(
     MPI_Datatype datatype, 
     int root, 
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag)
+    MPIR_Errflag_t *errflag)
 {
     MPI_Status status;
     int rank, comm_size, dst;
@@ -788,7 +788,7 @@ static int MPIR_Bcast_scatter_ring_allgather(
     MPI_Datatype datatype, 
     int root, 
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag)
+    MPIR_Errflag_t *errflag)
 {
     int rank, comm_size;
     int mpi_errno = MPI_SUCCESS;
@@ -994,7 +994,7 @@ static int MPIR_SMP_Bcast(
         MPI_Datatype datatype, 
         int root, 
         MPID_Comm *comm_ptr,
-        mpir_errflag_t *errflag)
+        MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
@@ -1221,7 +1221,7 @@ int MPIR_Bcast_intra (
         MPI_Datatype datatype, 
         int root, 
         MPID_Comm *comm_ptr,
-        mpir_errflag_t *errflag )
+        MPIR_Errflag_t *errflag )
 {
     int mpi_errno = MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
@@ -1345,7 +1345,7 @@ int MPIR_Bcast_inter (
     MPI_Datatype datatype, 
     int root, 
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag)
+    MPIR_Errflag_t *errflag)
 {
 /*  Intercommunicator broadcast.
     Root sends to rank 0 in remote group. Remote group does local
@@ -1434,7 +1434,7 @@ fn_fail:
 #define FUNCNAME MPIR_Bcast_impl
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIR_Bcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+int MPIR_Bcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -1466,7 +1466,7 @@ int MPIR_Bcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MP
 #define FUNCNAME MPIR_Bcast
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-inline int MPIR_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+inline int MPIR_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -1525,7 +1525,7 @@ int MPI_Bcast( void *buffer, int count, MPI_Datatype datatype, int root,
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_BCAST);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/exscan.c b/src/mpi/coll/exscan.c
index 856dddd..6cf6b52 100644
--- a/src/mpi/coll/exscan.c
+++ b/src/mpi/coll/exscan.c
@@ -91,7 +91,7 @@ int MPIR_Exscan (
     MPI_Datatype datatype,
     MPI_Op op,
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
     MPI_Status status;
     int        rank, comm_size;
@@ -238,7 +238,7 @@ fn_fail:
 #define FUNCNAME MPIR_Exscan_impl
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIR_Exscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+int MPIR_Exscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -305,7 +305,7 @@ int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_EXSCAN);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/gather.c b/src/mpi/coll/gather.c
index 964546c..6ee0c3b 100644
--- a/src/mpi/coll/gather.c
+++ b/src/mpi/coll/gather.c
@@ -87,7 +87,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
                       int recvcount, MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr,
-                      mpir_errflag_t *errflag)
+                      MPIR_Errflag_t *errflag)
 {
     int        comm_size, rank;
     int mpi_errno = MPI_SUCCESS;
@@ -135,7 +135,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
     if (rank == root) 
     {
         MPID_Datatype_get_extent_macro(recvtype, extent);
-        MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf+
+        MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf+
 					 (extent*recvcount*comm_size));
     }
 
@@ -503,7 +503,7 @@ int MPIR_Gather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
                       int recvcount, MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr,
-                      mpir_errflag_t *errflag)
+                      MPIR_Errflag_t *errflag)
 {
 /*  Intercommunicator gather.
     For short messages, remote group does a local intracommunicator
@@ -577,7 +577,7 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 MPIR_Type_get_true_extent_impl(sendtype, &true_lb, &true_extent);
                 MPID_Datatype_get_extent_macro(sendtype, extent);
  
-		MPID_Ensure_Aint_fits_in_pointer(sendcount*local_size*
+		MPIU_Ensure_Aint_fits_in_pointer(sendcount*local_size*
 						 (MPIR_MAX(extent, true_extent)));
                 MPIU_CHKLMEM_MALLOC(tmp_buf, void *, sendcount*local_size*(MPIR_MAX(extent,true_extent)), mpi_errno, "tmp_buf");
                 /* adjust for potential negative lower bound in datatype */
@@ -623,7 +623,7 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
         if (root == MPI_ROOT)
 	{
             MPID_Datatype_get_extent_macro(recvtype, extent);
-            MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+            MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
 					     (recvcount*remote_size*extent));
 
             for (i=0; i<remote_size; i++)
@@ -674,7 +674,7 @@ int MPIR_Gather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                 void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -708,7 +708,7 @@ int MPIR_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Gather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                      void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                     int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                     int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -774,7 +774,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_GATHER);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/gatherv.c b/src/mpi/coll/gatherv.c
index 0f8d81a..6efca0a 100644
--- a/src/mpi/coll/gatherv.c
+++ b/src/mpi/coll/gatherv.c
@@ -83,7 +83,7 @@ int MPIR_Gatherv (
 	MPI_Datatype recvtype,
 	int root,
 	MPID_Comm *comm_ptr,
-        mpir_errflag_t *errflag )
+        MPIR_Errflag_t *errflag )
 {
     int        comm_size, rank;
     int        mpi_errno = MPI_SUCCESS;
@@ -110,7 +110,7 @@ int MPIR_Gatherv (
 
         MPID_Datatype_get_extent_macro(recvtype, extent);
 	/* each node can make sure it is not going to overflow aint */
-        MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+        MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
 					 displs[rank] * extent);
 
         MPIU_CHKLMEM_MALLOC(reqarray, MPID_Request **, comm_size * sizeof(MPID_Request *), mpi_errno, "reqarray");
@@ -217,7 +217,7 @@ fn_fail:
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Gatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                       void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype,
-                      int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                      int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -287,7 +287,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_GATHERV);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/helper_fns.c b/src/mpi/coll/helper_fns.c
index b78d6b6..42808ff 100644
--- a/src/mpi/coll/helper_fns.c
+++ b/src/mpi/coll/helper_fns.c
@@ -203,7 +203,7 @@ int MPIR_Localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtyp
 #define FUNCNAME MPIC_Wait
 #undef FCNAME
 #define FCNAME "MPIC_Wait"
-int MPIC_Wait(MPID_Request * request_ptr, mpir_errflag_t *errflag)
+int MPIC_Wait(MPID_Request * request_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIC_WAIT);
@@ -269,7 +269,7 @@ int MPIC_Wait(MPID_Request * request_ptr, mpir_errflag_t *errflag)
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
-                 MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                 MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
@@ -327,7 +327,7 @@ int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest,
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag,
-                 MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag)
+                 MPID_Comm *comm_ptr, MPI_Status *status, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
@@ -385,7 +385,7 @@ int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag,
-                  MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                  MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
@@ -445,7 +445,7 @@ int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest,
 int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype,
                      int dest, int sendtag, void *recvbuf, MPI_Aint recvcount,
                      MPI_Datatype recvtype, int source, int recvtag,
-                     MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag)
+                     MPID_Comm *comm_ptr, MPI_Status *status, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
@@ -523,11 +523,11 @@ int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype
 int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
                              int dest, int sendtag,
                              int source, int recvtag,
-                             MPID_Comm *comm_ptr, MPI_Status *status, mpir_errflag_t *errflag)
+                             MPID_Comm *comm_ptr, MPI_Status *status, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     MPI_Status mystatus;
-    MPIR_Context_id_t context_id_offset;
+    MPIU_Context_id_t context_id_offset;
     MPID_Request *sreq = NULL;
     MPID_Request *rreq = NULL;
     void *tmpbuf = NULL;
@@ -619,7 +619,7 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-                  MPID_Comm *comm_ptr, MPID_Request **request_ptr, mpir_errflag_t *errflag)
+                  MPID_Comm *comm_ptr, MPID_Request **request_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
@@ -660,7 +660,7 @@ int MPIC_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIC_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag,
-                  MPID_Comm *comm_ptr, MPID_Request **request_ptr, mpir_errflag_t *errflag)
+                  MPID_Comm *comm_ptr, MPID_Request **request_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     int context_id;
@@ -731,7 +731,7 @@ int MPIC_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
 #define FUNCNAME MPIC_Waitall
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIC_Waitall(int numreq, MPID_Request *requests[], MPI_Status statuses[], mpir_errflag_t *errflag)
+int MPIC_Waitall(int numreq, MPID_Request *requests[], MPI_Status statuses[], MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     int i;
diff --git a/src/mpi/coll/iallgather.c b/src/mpi/coll/iallgather.c
index c89f98b..c23d638 100644
--- a/src/mpi/coll/iallgather.c
+++ b/src/mpi/coll/iallgather.c
@@ -79,7 +79,7 @@ int MPIR_Iallgather_rec_dbl(const void *sendbuf, int sendcount, MPI_Datatype sen
     MPID_Datatype_get_extent_macro( recvtype, recvtype_extent );
 
     /* This is the largest offset we add to recvbuf */
-    MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+    MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
                                      (comm_size * recvcount * recvtype_extent));
 
     /*  copy local data into recvbuf */
@@ -250,7 +250,7 @@ int MPIR_Iallgather_bruck(const void *sendbuf, int sendcount, MPI_Datatype sendt
     MPIR_Type_get_true_extent_impl(recvtype, &recvtype_true_lb, &recvtype_true_extent);
 
     /* This is the largest offset we add to recvbuf */
-    MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+    MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
                                      (comm_size * recvcount * recvtype_extent));
 
     /* allocate a temporary buffer of the same size as recvbuf. */
@@ -355,7 +355,7 @@ int MPIR_Iallgather_ring(const void *sendbuf, int sendcount, MPI_Datatype sendty
     MPID_Datatype_get_extent_macro(recvtype, recvtype_extent);
 
     /* This is the largest offset we add to recvbuf */
-    MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+    MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
                                      (comm_size * recvcount * recvtype_extent));
 
     /* First, load the "local" version in the recvbuf. */
@@ -511,7 +511,7 @@ int MPIR_Iallgather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendt
         MPID_Datatype_get_extent_macro( sendtype, send_extent );
         extent = MPIR_MAX(send_extent, true_extent);
 
-        MPID_Ensure_Aint_fits_in_pointer(extent * sendcount * local_size);
+        MPIU_Ensure_Aint_fits_in_pointer(extent * sendcount * local_size);
         MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void*, extent*sendcount*local_size, mpi_errno, "tmp_buf");
 
         /* adjust for potential negative lower bound in datatype */
diff --git a/src/mpi/coll/iallgatherv.c b/src/mpi/coll/iallgatherv.c
index 39b88d6..584ee77 100644
--- a/src/mpi/coll/iallgatherv.c
+++ b/src/mpi/coll/iallgatherv.c
@@ -66,7 +66,7 @@ int MPIR_Iallgatherv_rec_dbl(const void *sendbuf, int sendcount, MPI_Datatype se
     if (total_count == 0)
         goto fn_exit;
 
-    MPID_Ensure_Aint_fits_in_pointer(total_count*(MPIR_MAX(recvtype_true_extent, recvtype_extent)));
+    MPIU_Ensure_Aint_fits_in_pointer(total_count*(MPIR_MAX(recvtype_true_extent, recvtype_extent)));
     MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, total_count*(MPIR_MAX(recvtype_true_extent,recvtype_extent)), mpi_errno, "tmp_buf");
 
     /* adjust for potential negative lower bound in datatype */
@@ -302,7 +302,7 @@ int MPIR_Iallgatherv_bruck(const void *sendbuf, int sendcount, MPI_Datatype send
     /* get true extent of recvtype */
     MPIR_Type_get_true_extent_impl(recvtype, &recvtype_true_lb, &recvtype_true_extent);
 
-    MPID_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(recvtype_true_extent, recvtype_extent));
+    MPIU_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(recvtype_true_extent, recvtype_extent));
     recvbuf_extent = total_count * (MPIR_MAX(recvtype_true_extent, recvtype_extent));
 
     MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, recvbuf_extent, mpi_errno, "tmp_buf");
diff --git a/src/mpi/coll/iallreduce.c b/src/mpi/coll/iallreduce.c
index 3ff69f4..1ba3a98 100644
--- a/src/mpi/coll/iallreduce.c
+++ b/src/mpi/coll/iallreduce.c
@@ -88,7 +88,7 @@ int MPIR_Iallreduce_redscat_allgather(const void *sendbuf, void *recvbuf, int co
     MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent);
     MPID_Datatype_get_extent_macro(datatype, extent);
 
-    MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+    MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
     MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, count*(MPIR_MAX(extent,true_extent)), mpi_errno, "temporary buffer");
 
     /* adjust for potential negative lower bound in datatype */
@@ -309,7 +309,7 @@ int MPIR_Iallreduce_rec_dbl(const void *sendbuf, void *recvbuf, int count, MPI_D
     MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent);
     MPID_Datatype_get_extent_macro(datatype, extent);
 
-    MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+    MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
     MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, count*(MPIR_MAX(extent,true_extent)), mpi_errno, "temporary buffer");
 
     /* adjust for potential negative lower bound in datatype */
diff --git a/src/mpi/coll/ialltoall.c b/src/mpi/coll/ialltoall.c
index 6b18b47..846032e 100644
--- a/src/mpi/coll/ialltoall.c
+++ b/src/mpi/coll/ialltoall.c
@@ -480,9 +480,9 @@ int MPIR_Ialltoall_inter(const void *sendbuf, int sendcount, MPI_Datatype sendty
 
     /* Do the pairwise exchanges */
     max_size = MPIR_MAX(local_size, remote_size);
-    MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+    MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
                                      max_size*recvcount*recvtype_extent);
-    MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
+    MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
                                      max_size*sendcount*sendtype_extent);
     for (i = 0; i < max_size; i++) {
         src = (rank - i + max_size) % max_size;
diff --git a/src/mpi/coll/ialltoallv.c b/src/mpi/coll/ialltoallv.c
index 93b1f63..e68dfc3 100644
--- a/src/mpi/coll/ialltoallv.c
+++ b/src/mpi/coll/ialltoallv.c
@@ -126,7 +126,7 @@ int MPIR_Ialltoallv_intra(const void *sendbuf, const int sendcounts[], const int
             for (i=0; i < ss; i++) {
                 dst = (rank+i+ii) % comm_size;
                 if (recvcounts[dst] && recvtype_size) {
-                    MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+                    MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
                                                      rdispls[dst]*recv_extent);
                     mpi_errno = MPID_Sched_recv((char *)recvbuf+rdispls[dst]*recv_extent,
                                                 recvcounts[dst], recvtype, dst, comm_ptr, s);
@@ -137,7 +137,7 @@ int MPIR_Ialltoallv_intra(const void *sendbuf, const int sendcounts[], const int
             for (i=0; i < ss; i++) {
                 dst = (rank-i-ii+comm_size) % comm_size;
                 if (sendcounts[dst] && sendtype_size) {
-                    MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
+                    MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
                                                      sdispls[dst]*send_extent);
                     mpi_errno = MPID_Sched_send((char *)sendbuf+sdispls[dst]*send_extent,
                                                 sendcounts[dst], sendtype, dst, comm_ptr, s);
@@ -205,7 +205,7 @@ int MPIR_Ialltoallv_inter(const void *sendbuf, const int sendcounts[], const int
             recvcount = 0;
         }
         else {
-            MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+            MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
                                              rdispls[src]*recv_extent);
             recvaddr = (char *)recvbuf + rdispls[src]*recv_extent;
             recvcount = recvcounts[src];
@@ -216,7 +216,7 @@ int MPIR_Ialltoallv_inter(const void *sendbuf, const int sendcounts[], const int
             sendcount = 0;
         }
         else {
-            MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
+            MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
                                              sdispls[dst]*send_extent);
             sendaddr = (char *)sendbuf + sdispls[dst]*send_extent;
             sendcount = sendcounts[dst];
diff --git a/src/mpi/coll/igather.c b/src/mpi/coll/igather.c
index 7e126fc..0b51f39 100644
--- a/src/mpi/coll/igather.c
+++ b/src/mpi/coll/igather.c
@@ -91,7 +91,7 @@ int MPIR_Igather_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendt
     if (rank == root)
     {
         MPID_Datatype_get_extent_macro(recvtype, extent);
-        MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf+
+        MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf+
                                          (extent*recvcount*comm_size));
     }
 
@@ -453,7 +453,7 @@ int MPIR_Igather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
                 MPIR_Type_get_true_extent_impl(sendtype, &true_lb, &true_extent);
                 MPID_Datatype_get_extent_macro(sendtype, extent);
 
-                MPID_Ensure_Aint_fits_in_pointer(sendcount*local_size*(MPIR_MAX(extent, true_extent)));
+                MPIU_Ensure_Aint_fits_in_pointer(sendcount*local_size*(MPIR_MAX(extent, true_extent)));
                 MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, sendcount*local_size*(MPIR_MAX(extent,true_extent)),
                                           mpi_errno, "tmp_buf");
                 /* adjust for potential negative lower bound in datatype */
@@ -485,7 +485,7 @@ int MPIR_Igather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
         /* long message. use linear algorithm. */
         if (root == MPI_ROOT) {
             MPID_Datatype_get_extent_macro(recvtype, extent);
-            MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+            MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
                                              (recvcount*remote_size*extent));
 
             for (i=0; i<remote_size; i++) {
diff --git a/src/mpi/coll/igatherv.c b/src/mpi/coll/igatherv.c
index c5d7426..7f64179 100644
--- a/src/mpi/coll/igatherv.c
+++ b/src/mpi/coll/igatherv.c
@@ -56,7 +56,7 @@ int MPIR_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, voi
 
         MPID_Datatype_get_extent_macro(recvtype, extent);
         /* each node can make sure it is not going to overflow aint */
-        MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf + displs[rank] * extent);
+        MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf + displs[rank] * extent);
 
         for (i = 0; i < comm_size; i++) {
             if (recvcounts[i]) {
diff --git a/src/mpi/coll/ired_scat.c b/src/mpi/coll/ired_scat.c
index 423e25f..741e758 100644
--- a/src/mpi/coll/ired_scat.c
+++ b/src/mpi/coll/ired_scat.c
@@ -298,7 +298,7 @@ int MPIR_Ireduce_scatter_pairwise(const void *sendbuf, void *recvbuf, const int
     }
     /* total_count*extent eventually gets malloced. it isn't added to
      * a user-passed in buffer */
-    MPID_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(true_extent, extent));
+    MPIU_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(true_extent, extent));
 
     if (sendbuf != MPI_IN_PLACE) {
         /* copy local data into recvbuf */
@@ -440,7 +440,7 @@ int MPIR_Ireduce_scatter_rec_dbl(const void *sendbuf, void *recvbuf, const int r
 
     /* total_count*extent eventually gets malloced. it isn't added to
      * a user-passed in buffer */
-    MPID_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(true_extent, extent));
+    MPIU_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(true_extent, extent));
 
 
     /* need to allocate temporary buffer to receive incoming data*/
diff --git a/src/mpi/coll/ired_scat_block.c b/src/mpi/coll/ired_scat_block.c
index 3368ea4..17042c2 100644
--- a/src/mpi/coll/ired_scat_block.c
+++ b/src/mpi/coll/ired_scat_block.c
@@ -290,7 +290,7 @@ int MPIR_Ireduce_scatter_block_pairwise(const void *sendbuf, void *recvbuf, int
     }
     /* total_count*extent eventually gets malloced. it isn't added to
      * a user-passed in buffer */
-    MPID_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(true_extent, extent));
+    MPIU_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(true_extent, extent));
 
     if (sendbuf != MPI_IN_PLACE) {
         /* copy local data into recvbuf */
@@ -430,7 +430,7 @@ int MPIR_Ireduce_scatter_block_rec_dbl(const void *sendbuf, void *recvbuf, int r
 
     /* total_count*extent eventually gets malloced. it isn't added to
      * a user-passed in buffer */
-    MPID_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(true_extent, extent));
+    MPIU_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(true_extent, extent));
 
 
     /* need to allocate temporary buffer to receive incoming data*/
diff --git a/src/mpi/coll/ireduce.c b/src/mpi/coll/ireduce.c
index e5736ce..a4a659e 100644
--- a/src/mpi/coll/ireduce.c
+++ b/src/mpi/coll/ireduce.c
@@ -64,7 +64,7 @@ int MPIR_Ireduce_binomial(const void *sendbuf, void *recvbuf, int count, MPI_Dat
     /* I think this is the worse case, so we can avoid an assert()
      * inside the for loop */
     /* should be buf+{this}? */
-    MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+    MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
 
     MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, count*(MPIR_MAX(extent,true_extent)),
                         mpi_errno, "temporary buffer");
@@ -253,7 +253,7 @@ int MPIR_Ireduce_redscat_gather(const void *sendbuf, void *recvbuf, int count, M
     /* I think this is the worse case, so we can avoid an assert()
      * inside the for loop */
     /* should be buf+{this}? */
-    MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+    MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
 
     MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, count*(MPIR_MAX(extent,true_extent)),
                               mpi_errno, "temporary buffer");
@@ -605,7 +605,7 @@ int MPIR_Ireduce_SMP(const void *sendbuf, void *recvbuf, int count, MPI_Datatype
         MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent);
         MPID_Datatype_get_extent_macro(datatype, extent);
 
-        MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+        MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
 
         MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, count*(MPIR_MAX(extent,true_extent)),
                                   mpi_errno, "temporary buffer");
@@ -725,7 +725,7 @@ int MPIR_Ireduce_inter(const void *sendbuf, void *recvbuf, int count, MPI_Dataty
             /* I think this is the worse case, so we can avoid an assert()
              * inside the for loop */
             /* Should MPIR_SCHED_CHKPMEM_MALLOC do this? */
-            MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+            MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
             MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, count*(MPIR_MAX(extent,true_extent)), mpi_errno, "temporary buffer");
             /* adjust for potential negative lower bound in datatype */
             tmp_buf = (void *)((char*)tmp_buf - true_lb);
diff --git a/src/mpi/coll/iscan.c b/src/mpi/coll/iscan.c
index ff7f6b2..588c921 100644
--- a/src/mpi/coll/iscan.c
+++ b/src/mpi/coll/iscan.c
@@ -95,7 +95,7 @@ int MPIR_Iscan_rec_dbl(const void *sendbuf, void *recvbuf, int count, MPI_Dataty
 
     /* This eventually gets malloc()ed as a temp buffer, not added to
      * any user buffers */
-    MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+    MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
 
     /* adjust for potential negative lower bound in datatype */
     partial_scan = (void *)((char*)partial_scan - true_lb);
@@ -208,7 +208,7 @@ int MPIR_Iscan_SMP(const void *sendbuf, void *recvbuf, int count, MPI_Datatype d
     MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent);
     MPID_Datatype_get_extent_macro(datatype, extent);
 
-    MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+    MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
 
     MPIR_SCHED_CHKPMEM_MALLOC(tempbuf, void *, count*(MPIR_MAX(extent, true_extent)),
                         mpi_errno, "temporary buffer");
diff --git a/src/mpi/coll/iscatter.c b/src/mpi/coll/iscatter.c
index 9710a9f..fcdd2d3 100644
--- a/src/mpi/coll/iscatter.c
+++ b/src/mpi/coll/iscatter.c
@@ -131,14 +131,14 @@ int MPIR_Iscatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtyp
                in the event of recvbuf=MPI_IN_PLACE on the root,
                recvcount and recvtype are not valid */
             MPID_Datatype_get_size_macro(sendtype, sendtype_size);
-            MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
+            MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
                                              extent*sendcount*comm_size);
 
             ss->nbytes = sendtype_size * sendcount;
         }
         else {
             MPID_Datatype_get_size_macro(recvtype, recvtype_size);
-            MPID_Ensure_Aint_fits_in_pointer(extent*recvcount*comm_size);
+            MPIU_Ensure_Aint_fits_in_pointer(extent*recvcount*comm_size);
             ss->nbytes = recvtype_size * recvcount;
         }
 
@@ -485,8 +485,8 @@ int MPIR_Iscatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtyp
                 MPIR_Type_get_true_extent_impl(recvtype, &true_lb, &true_extent);
 
                 MPID_Datatype_get_extent_macro(recvtype, extent);
-                MPID_Ensure_Aint_fits_in_pointer(extent*recvcount*local_size);
-                MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
+                MPIU_Ensure_Aint_fits_in_pointer(extent*recvcount*local_size);
+                MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
                                                  sendcount*remote_size*extent);
 
                 MPIR_SCHED_CHKPMEM_MALLOC(tmp_buf, void *, recvcount*local_size*(MPIR_MAX(extent,true_extent)),
diff --git a/src/mpi/coll/iscatterv.c b/src/mpi/coll/iscatterv.c
index 56257b4..6e229f7 100644
--- a/src/mpi/coll/iscatterv.c
+++ b/src/mpi/coll/iscatterv.c
@@ -77,7 +77,7 @@ int MPIR_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs
          * a minimal sanity check. Maybe add a global var since we do
          * loop over sendcount[] in MPI_Scatterv before calling
          * this? */
-        MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf + extent);
+        MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf + extent);
 
         for (i = 0; i < comm_size; i++) {
             if (sendcounts[i]) {
diff --git a/src/mpi/coll/red_scat.c b/src/mpi/coll/red_scat.c
index 40d9ad6..b907811 100644
--- a/src/mpi/coll/red_scat.c
+++ b/src/mpi/coll/red_scat.c
@@ -57,7 +57,7 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 static int MPIR_Reduce_scatter_noncomm(const void *sendbuf, void *recvbuf, const int recvcounts[],
                                        MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
-                                       mpir_errflag_t *errflag)
+                                       MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
@@ -240,7 +240,7 @@ fn_fail:
 
 /* not declared static because a machine-specific function may call this one in some cases */
 int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recvcounts[],
-                              MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                              MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int   rank, comm_size, i;
     MPI_Aint extent, true_extent, true_lb; 
@@ -300,7 +300,7 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
 
     /* total_count*extent eventually gets malloced. it isn't added to
      * a user-passed in buffer */
-    MPID_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(true_extent, extent));
+    MPIU_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(true_extent, extent));
 
     if ((is_commutative) && (nbytes < MPIR_CVAR_REDSCAT_COMMUTATIVE_LONG_MSG_SIZE)) {
         /* commutative and short. use recursive halving algorithm */
@@ -894,7 +894,7 @@ fn_fail:
 /* not declared static because a machine-specific function may call this one in some cases */
 int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int recvcounts[],
                               MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr,
-                              mpir_errflag_t *errflag)
+                              MPIR_Errflag_t *errflag)
 {
 /* Intercommunicator Reduce_scatter.
    We first do an intercommunicator reduce to rank 0 on left group,
@@ -1024,7 +1024,7 @@ int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int recv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[],
-                        MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                        MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -1055,7 +1055,7 @@ int MPIR_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Reduce_scatter_impl(const void *sendbuf, void *recvbuf, const int recvcounts[],
-                             MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                             MPI_Datatype datatype, MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -1120,7 +1120,7 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_REDUCE_SCATTER);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/red_scat_block.c b/src/mpi/coll/red_scat_block.c
index 3f28151..1f5e92f 100644
--- a/src/mpi/coll/red_scat_block.c
+++ b/src/mpi/coll/red_scat_block.c
@@ -53,7 +53,7 @@ static int MPIR_Reduce_scatter_block_noncomm (
     MPI_Datatype datatype,
     MPI_Op op,
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
     int mpi_errno = MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
@@ -240,7 +240,7 @@ int MPIR_Reduce_scatter_block_intra (
     MPI_Datatype datatype, 
     MPI_Op op, 
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
     int   rank, comm_size, i;
     MPI_Aint extent, true_extent, true_lb; 
@@ -299,7 +299,7 @@ int MPIR_Reduce_scatter_block_intra (
 
     /* total_count*extent eventually gets malloced. it isn't added to
      * a user-passed in buffer */
-    MPID_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(true_extent, extent));
+    MPIU_Ensure_Aint_fits_in_pointer(total_count * MPIR_MAX(true_extent, extent));
 
     if ((is_commutative) && (nbytes < MPIR_CVAR_REDSCAT_COMMUTATIVE_LONG_MSG_SIZE)) {
         /* commutative and short. use recursive halving algorithm */
@@ -871,7 +871,7 @@ int MPIR_Reduce_scatter_block_inter (
     int recvcount, 
     MPI_Datatype datatype, 
     MPI_Op op, 
-    MPID_Comm *comm_ptr, mpir_errflag_t *errflag )
+    MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag )
 {
 /* Intercommunicator Reduce_scatter_block.
    We first do an intercommunicator reduce to rank 0 on left group,
@@ -992,7 +992,7 @@ int MPIR_Reduce_scatter_block_inter (
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Reduce_scatter_block(const void *sendbuf, void *recvbuf, 
                               int recvcount, MPI_Datatype datatype,
-                              MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                              MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -1023,7 +1023,7 @@ int MPIR_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Reduce_scatter_block_impl(const void *sendbuf, void *recvbuf, 
                                    int recvcount, MPI_Datatype datatype,
-                                   MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                                   MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -1092,7 +1092,7 @@ int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_REDUCE_SCATTER_BLOCK);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index 1be40f9..fb3f574 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -84,7 +84,7 @@ static int MPIR_Reduce_binomial (
     MPI_Op op,
     int root,
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
     int mpi_errno = MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
@@ -110,7 +110,7 @@ static int MPIR_Reduce_binomial (
     /* I think this is the worse case, so we can avoid an assert() 
      * inside the for loop */
     /* should be buf+{this}? */
-    MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+    MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
 
     MPIU_CHKLMEM_MALLOC(tmp_buf, void *, count*(MPIR_MAX(extent,true_extent)),
                         mpi_errno, "temporary buffer");
@@ -290,7 +290,7 @@ static int MPIR_Reduce_redscat_gather (
     MPI_Op op,
     int root,
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
     int mpi_errno = MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
@@ -319,7 +319,7 @@ static int MPIR_Reduce_redscat_gather (
     /* I think this is the worse case, so we can avoid an assert() 
      * inside the for loop */
     /* should be buf+{this}? */
-    MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+    MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
 
     MPIU_CHKLMEM_MALLOC(tmp_buf, void *, count*(MPIR_MAX(extent,true_extent)),
                         mpi_errno, "temporary buffer");
@@ -720,7 +720,7 @@ int MPIR_Reduce_intra (
     MPI_Op op,
     int root,
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
     int mpi_errno = MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
@@ -756,7 +756,7 @@ int MPIR_Reduce_intra (
             MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent);
             MPID_Datatype_get_extent_macro(datatype, extent);
 
-            MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+            MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
 
             MPIU_CHKLMEM_MALLOC(tmp_buf, void *, count*(MPIR_MAX(extent,true_extent)),
                                 mpi_errno, "temporary buffer");
@@ -911,7 +911,7 @@ int MPIR_Reduce_inter (
     MPI_Op op,
     int root,
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
 /*  Intercommunicator reduce.
     Remote group does a local intracommunicator
@@ -961,7 +961,7 @@ int MPIR_Reduce_inter (
 	    /* I think this is the worse case, so we can avoid an assert() 
 	     * inside the for loop */
 	    /* Should MPIU_CHKLMEM_MALLOC do this? */
-	    MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+	    MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
 	    MPIU_CHKLMEM_MALLOC(tmp_buf, void *, count*(MPIR_MAX(extent,true_extent)), mpi_errno, "temporary buffer");
             /* adjust for potential negative lower bound in datatype */
             tmp_buf = (void *)((char*)tmp_buf - true_lb);
@@ -1021,7 +1021,7 @@ int MPIR_Reduce_inter (
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                MPI_Op op, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                MPI_Op op, int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -1052,7 +1052,7 @@ int MPIR_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Reduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                     MPI_Op op, int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                     MPI_Op op, int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -1127,7 +1127,7 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_REDUCE);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/scan.c b/src/mpi/coll/scan.c
index 0c08fdf..2e4a080 100644
--- a/src/mpi/coll/scan.c
+++ b/src/mpi/coll/scan.c
@@ -76,7 +76,7 @@ static int MPIR_Scan_generic (
     MPI_Datatype datatype,
     MPI_Op op,
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
     MPI_Status status;
     int        rank, comm_size;
@@ -120,7 +120,7 @@ static int MPIR_Scan_generic (
 
     /* This eventually gets malloc()ed as a temp buffer, not added to
      * any user buffers */
-    MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+    MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
 
     /* adjust for potential negative lower bound in datatype */
     partial_scan = (void *)((char*)partial_scan - true_lb);
@@ -228,7 +228,7 @@ int MPIR_Scan(
     MPI_Datatype datatype,
     MPI_Op op,
     MPID_Comm *comm_ptr,
-    mpir_errflag_t *errflag )
+    MPIR_Errflag_t *errflag )
 {
     int mpi_errno = MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
@@ -256,7 +256,7 @@ int MPIR_Scan(
 
     MPID_Datatype_get_extent_macro(datatype, extent);
 
-    MPID_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
+    MPIU_Ensure_Aint_fits_in_pointer(count * MPIR_MAX(extent, true_extent));
 
     MPIU_CHKLMEM_MALLOC(tempbuf, void *, count*(MPIR_MAX(extent, true_extent)),
                         mpi_errno, "temporary buffer");
@@ -426,7 +426,7 @@ int MPIR_Scan(
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Scan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                   MPI_Op op, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                   MPI_Op op, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -489,7 +489,7 @@ int MPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_SCAN);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/scatter.c b/src/mpi/coll/scatter.c
index ee5f0b7..c0e1295 100644
--- a/src/mpi/coll/scatter.c
+++ b/src/mpi/coll/scatter.c
@@ -74,7 +74,7 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                        void *recvbuf, int recvcount, MPI_Datatype recvtype, int root,
-                       MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                       MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     MPI_Status status;
     MPI_Aint   extent=0;
@@ -118,14 +118,14 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
                in the event of recvbuf=MPI_IN_PLACE on the root,
                recvcount and recvtype are not valid */
             MPID_Datatype_get_size_macro(sendtype, sendtype_size);
-            MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
+            MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
 					     extent*sendcount*comm_size);
 
             nbytes = sendtype_size * sendcount;
         }
         else {
             MPID_Datatype_get_size_macro(recvtype, recvtype_size);
-            MPID_Ensure_Aint_fits_in_pointer(extent*recvcount*comm_size);
+            MPIU_Ensure_Aint_fits_in_pointer(extent*recvcount*comm_size);
             nbytes = recvtype_size * recvcount;
         }
         
@@ -422,7 +422,7 @@ int MPIR_Scatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
                        int recvcount, MPI_Datatype recvtype, int root, MPID_Comm *comm_ptr,
-                       mpir_errflag_t *errflag)
+                       MPIR_Errflag_t *errflag)
 {
 /*  Intercommunicator scatter.
     For short messages, root sends to rank 0 in remote group. rank 0
@@ -484,8 +484,8 @@ int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
                 MPIR_Type_get_true_extent_impl(recvtype, &true_lb, &true_extent);
 
                 MPID_Datatype_get_extent_macro(recvtype, extent);
-		MPID_Ensure_Aint_fits_in_pointer(extent*recvcount*local_size);
-		MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
+		MPIU_Ensure_Aint_fits_in_pointer(extent*recvcount*local_size);
+		MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
 						 sendcount*remote_size*extent);
 
                 MPIU_CHKLMEM_MALLOC(tmp_buf, void *, recvcount*local_size*(MPIR_MAX(extent,true_extent)), mpi_errno, "tmp_buf");
@@ -573,7 +573,7 @@ int MPIR_Scatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                  void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                 int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                 int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -608,7 +608,7 @@ int MPIR_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Scatter_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
                       void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                      int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                      int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
 
@@ -673,7 +673,7 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_SCATTER);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/scatterv.c b/src/mpi/coll/scatterv.c
index 16fc7cb..bbcf201 100644
--- a/src/mpi/coll/scatterv.c
+++ b/src/mpi/coll/scatterv.c
@@ -55,7 +55,7 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
                   MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                  int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                  int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int rank, comm_size, mpi_errno = MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
@@ -85,7 +85,7 @@ int MPIR_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
          * a minimal sanity check. Maybe add a global var since we do
          * loop over sendcount[] in MPI_Scatterv before calling
          * this? */
-        MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf + extent);
+        MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf + extent);
 
         MPIU_CHKLMEM_MALLOC(reqarray, MPID_Request **, comm_size * sizeof(MPID_Request *), mpi_errno, "reqarray");
         MPIU_CHKLMEM_MALLOC(starray, MPI_Status *, comm_size * sizeof(MPI_Status), mpi_errno, "starray");
@@ -166,7 +166,7 @@ fn_fail:
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Scatterv_impl(const void *sendbuf, const int *sendcounts, const int *displs,
                        MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                       int root, MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+                       int root, MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
         
@@ -234,7 +234,7 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_SCATTERV);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/comm/comm_agree.c b/src/mpi/comm/comm_agree.c
index e3594f2..2149fdb 100644
--- a/src/mpi/comm/comm_agree.c
+++ b/src/mpi/comm/comm_agree.c
@@ -36,7 +36,7 @@ int MPIR_Comm_agree(MPID_Comm *comm_ptr, int *flag)
     int mpi_errno = MPI_SUCCESS, mpi_errno_tmp = MPI_SUCCESS;
     MPID_Group *comm_grp, *failed_grp, *new_group_ptr, *global_failed;
     int result, success = 1;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     int values[2];
 
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_AGREE);
diff --git a/src/mpi/comm/comm_create.c b/src/mpi/comm/comm_create.c
index c1c2400..d5e9615 100644
--- a/src/mpi/comm/comm_create.c
+++ b/src/mpi/comm/comm_create.c
@@ -191,7 +191,7 @@ int MPIR_Comm_create_intra(MPID_Comm *comm_ptr, MPID_Group *group_ptr,
                            MPID_Comm **newcomm_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIR_Context_id_t new_context_id = 0;
+    MPIU_Context_id_t new_context_id = 0;
     int *mapping = NULL;
     int n;
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_CREATE_INTRA);
@@ -287,13 +287,13 @@ PMPI_LOCAL int MPIR_Comm_create_inter(MPID_Comm *comm_ptr, MPID_Group *group_ptr
                                       MPID_Comm **newcomm_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIR_Context_id_t new_context_id;
+    MPIU_Context_id_t new_context_id;
     int *mapping = NULL;
     int *remote_mapping = NULL;
     MPID_Comm *mapping_comm = NULL;
     int remote_size = -1;
     int rinfo[2];
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIU_CHKLMEM_DECL(1);
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_CREATE_INTER);
 
diff --git a/src/mpi/comm/comm_create_group.c b/src/mpi/comm/comm_create_group.c
index b04e02e..2f28e11 100644
--- a/src/mpi/comm/comm_create_group.c
+++ b/src/mpi/comm/comm_create_group.c
@@ -37,7 +37,7 @@ int MPIR_Comm_create_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr, int tag
                            MPID_Comm ** newcomm_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIR_Context_id_t new_context_id = 0;
+    MPIU_Context_id_t new_context_id = 0;
     int *mapping = NULL;
     int n;
 
diff --git a/src/mpi/comm/comm_shrink.c b/src/mpi/comm/comm_shrink.c
index 3436ad9..40a04ea 100644
--- a/src/mpi/comm/comm_shrink.c
+++ b/src/mpi/comm/comm_shrink.c
@@ -52,7 +52,7 @@ int MPIR_Comm_shrink(MPID_Comm *comm_ptr, MPID_Comm **newcomm_ptr)
     int mpi_errno = MPI_SUCCESS;
     MPID_Group *global_failed, *comm_grp, *new_group_ptr;
     int attempts = 0;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
 
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_SHRINK);
     MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_SHRINK);
diff --git a/src/mpi/comm/comm_split.c b/src/mpi/comm/comm_split.c
index ac5ec6f..1d11b69 100644
--- a/src/mpi/comm/comm_split.c
+++ b/src/mpi/comm/comm_split.c
@@ -136,8 +136,8 @@ int MPIR_Comm_split_impl(MPID_Comm *comm_ptr, int color, int key, MPID_Comm **ne
     int rank, size, remote_size, i, new_size, new_remote_size,
 	first_entry = 0, first_remote_entry = 0, *last_ptr;
     int in_newcomm; /* TRUE iff *newcomm should be populated */
-    MPIR_Context_id_t   new_context_id, remote_context_id;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIU_Context_id_t   new_context_id, remote_context_id;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIR_Comm_map_t *mapper;
     MPIU_CHKLMEM_DECL(4);
 
@@ -255,17 +255,17 @@ int MPIR_Comm_split_impl(MPID_Comm *comm_ptr, int color, int key, MPID_Comm **ne
     /* In the intercomm case, we need to exchange the context ids */
     if (comm_ptr->comm_kind == MPID_INTERCOMM) {
 	if (comm_ptr->rank == 0) {
-	    mpi_errno = MPIC_Sendrecv( &new_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, 0,
-				       &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 
+	    mpi_errno = MPIC_Sendrecv( &new_context_id, 1, MPIU_CONTEXT_ID_T_DATATYPE, 0, 0,
+				       &remote_context_id, 1, MPIU_CONTEXT_ID_T_DATATYPE, 
 				       0, 0, comm_ptr, MPI_STATUS_IGNORE, &errflag );
 	    if (mpi_errno) { MPIU_ERR_POP( mpi_errno ); }
-	    mpi_errno = MPIR_Bcast_impl( &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, local_comm_ptr, &errflag );
+	    mpi_errno = MPIR_Bcast_impl( &remote_context_id, 1, MPIU_CONTEXT_ID_T_DATATYPE, 0, local_comm_ptr, &errflag );
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
             MPIU_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail");
 	}
 	else {
 	    /* Broadcast to the other members of the local group */
-	    mpi_errno = MPIR_Bcast_impl( &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, local_comm_ptr, &errflag );
+	    mpi_errno = MPIR_Bcast_impl( &remote_context_id, 1, MPIU_CONTEXT_ID_T_DATATYPE, 0, local_comm_ptr, &errflag );
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
             MPIU_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail");
 	}
diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index 22e929c..b733eae 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -722,7 +722,7 @@ int MPIR_Comm_is_node_consecutive(MPID_Comm * comm)
 int MPIR_Comm_copy(MPID_Comm * comm_ptr, int size, MPID_Comm ** outcomm_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIR_Context_id_t new_context_id, new_recvcontext_id;
+    MPIU_Context_id_t new_context_id, new_recvcontext_id;
     MPID_Comm *newcomm_ptr = NULL;
     MPIR_Comm_map_t *map;
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_COMM_COPY);
diff --git a/src/mpi/comm/contextid.c b/src/mpi/comm/contextid.c
index 3de7511..18feb18 100644
--- a/src/mpi/comm/contextid.c
+++ b/src/mpi/comm/contextid.c
@@ -45,7 +45,7 @@ static int initialize_context_mask = 1;
 /* utility function to pretty print a context ID for debugging purposes, see
  * mpiimpl.h for more info on the various fields */
 #ifdef USE_DBG_LOGGING
-static void dump_context_id(MPIR_Context_id_t context_id, char *out_str, int len)
+static void dump_context_id(MPIU_Context_id_t context_id, char *out_str, int len)
 {
     int subcomm_type = MPID_CONTEXT_READ_FIELD(SUBCOMM, context_id);
     const char *subcomm_type_name = NULL;
@@ -64,7 +64,7 @@ static void dump_context_id(MPIR_Context_id_t context_id, char *out_str, int len
         MPIU_Assert(FALSE);
         break;
     }
-    MPIU_Snprintf(out_str, len,
+    MPL_snprintf(out_str, len,
                   "context_id=%d (%#x): DYNAMIC_PROC=%d PREFIX=%#x IS_LOCALCOMM=%d SUBCOMM=%s SUFFIX=%s",
                   context_id,
                   context_id,
@@ -102,7 +102,7 @@ static char *context_mask_to_str(void)
     }
 
     for (i = 0; i < maxset; i++) {
-        MPIU_Snprintf(&bufstr[i * 8], 9, "%.8x", context_mask[i]);
+        MPL_snprintf(&bufstr[i * 8], 9, "%.8x", context_mask[i]);
     }
     return bufstr;
 }
@@ -232,7 +232,7 @@ static int locate_context_bit(uint32_t local_mask[])
 /* Allocates a context ID from the given mask by clearing the bit
  * corresponding to the the given id.  Returns 0 on failure, id on
  * success. */
-static int allocate_context_bit(uint32_t mask[], MPIR_Context_id_t id)
+static int allocate_context_bit(uint32_t mask[], MPIU_Context_id_t id)
 {
     int raw_prefix, idx, bitpos;
     raw_prefix = MPID_CONTEXT_READ_FIELD(PREFIX, id);
@@ -258,7 +258,7 @@ static int allocate_context_bit(uint32_t mask[], MPIR_Context_id_t id)
  * Returns 0 on failure.  Returns the allocated context ID on success. */
 static int find_and_allocate_context_id(uint32_t local_mask[])
 {
-    MPIR_Context_id_t context_id;
+    MPIU_Context_id_t context_id;
     context_id = locate_context_bit(local_mask);
     if (context_id != 0) {
         context_id = allocate_context_bit(context_mask, context_id);
@@ -295,7 +295,7 @@ static volatile int lowest_tag = -1;
 #define FUNCNAME MPIR_Get_contextid_sparse
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIR_Get_contextid_sparse(MPID_Comm * comm_ptr, MPIR_Context_id_t * context_id, int ignore_id)
+int MPIR_Get_contextid_sparse(MPID_Comm * comm_ptr, MPIU_Context_id_t * context_id, int ignore_id)
 {
     return MPIR_Get_contextid_sparse_group(comm_ptr, NULL /*group_ptr */ ,
                                            MPIR_Process.attrs.tag_ub /*tag */ ,
@@ -311,7 +311,7 @@ int MPIR_Get_contextid_sparse(MPID_Comm * comm_ptr, MPIR_Context_id_t * context_
  * obtain the best performance and utilization of the context ID space.
  *
  * Processes that pass ignore_id==TRUE will receive
- * (*context_id==MPIR_INVALID_CONTEXT_ID) and should not attempt to use it.
+ * (*context_id==MPIU_INVALID_CONTEXT_ID) and should not attempt to use it.
  *
  * If a group pointer is given, the call is _not_ sparse, and only processes
  * in the group should call this routine.  That is, it is collective only over
@@ -322,14 +322,14 @@ int MPIR_Get_contextid_sparse(MPID_Comm * comm_ptr, MPIR_Context_id_t * context_
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr, int tag,
-                                    MPIR_Context_id_t * context_id, int ignore_id)
+                                    MPIU_Context_id_t * context_id, int ignore_id)
 {
     int mpi_errno = MPI_SUCCESS;
     const int ALL_OWN_MASK_FLAG = MPIR_MAX_CONTEXT_MASK;
     uint32_t local_mask[MPIR_MAX_CONTEXT_MASK + 1];
     int own_mask = 0;
     int own_eager_mask = 0;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     int first_iter = 1;
     int seqnum = 0;
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_GET_CONTEXTID);
@@ -571,7 +571,7 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
 
   fn_exit:
     if (ignore_id)
-        *context_id = MPIR_INVALID_CONTEXT_ID;
+        *context_id = MPIU_INVALID_CONTEXT_ID;
     MPIU_DBG_MSG_S(COMM, VERBOSE, "Context mask = %s", context_mask_to_str());
     MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_GET_CONTEXTID);
     return mpi_errno;
@@ -588,8 +588,8 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
 }
 
 struct gcn_state {
-    MPIR_Context_id_t *ctx0;
-    MPIR_Context_id_t *ctx1;
+    MPIU_Context_id_t *ctx0;
+    MPIU_Context_id_t *ctx1;
     int own_mask;
     int own_eager_mask;
     int first_iter;
@@ -635,12 +635,12 @@ static int sched_cb_gcn_bcast(MPID_Comm * comm, int tag, void *state)
     if (st->gcn_cid_kind == MPID_INTERCOMM) {
         if (st->comm_ptr_inter->rank == 0) {
             mpi_errno =
-                MPID_Sched_recv(st->ctx1, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, st->comm_ptr_inter,
+                MPID_Sched_recv(st->ctx1, 1, MPIU_CONTEXT_ID_T_DATATYPE, 0, st->comm_ptr_inter,
                                 st->s);
             if (mpi_errno)
                 MPIU_ERR_POP(mpi_errno);
             mpi_errno =
-                MPID_Sched_send(st->ctx0, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, st->comm_ptr_inter,
+                MPID_Sched_send(st->ctx0, 1, MPIU_CONTEXT_ID_T_DATATYPE, 0, st->comm_ptr_inter,
                                 st->s);
             if (mpi_errno)
                 MPIU_ERR_POP(mpi_errno);
@@ -648,7 +648,7 @@ static int sched_cb_gcn_bcast(MPID_Comm * comm, int tag, void *state)
         }
 
         mpi_errno = st->comm_ptr->coll_fns->Ibcast_sched(st->ctx1, 1,
-                                                         MPIR_CONTEXT_ID_T_DATATYPE, 0,
+                                                         MPIU_CONTEXT_ID_T_DATATYPE, 0,
                                                          st->comm_ptr, st->s);
         if (mpi_errno)
             MPIU_ERR_POP(mpi_errno);
@@ -687,7 +687,7 @@ static int sched_cb_gcn_allocate_cid(MPID_Comm * comm, int tag, void *state)
 {
     int mpi_errno = MPI_SUCCESS;
     struct gcn_state *st = state;
-    MPIR_Context_id_t newctxid;
+    MPIU_Context_id_t newctxid;
 
     if (st->own_eager_mask) {
         newctxid = find_and_allocate_context_id(st->local_mask);
@@ -856,7 +856,7 @@ static int sched_cb_gcn_copy_mask(MPID_Comm * comm, int tag, void *state)
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 static int sched_get_cid_nonblock(MPID_Comm * comm_ptr, MPID_Comm * newcomm,
-                                  MPIR_Context_id_t * ctx0, MPIR_Context_id_t * ctx1,
+                                  MPIU_Context_id_t * ctx0, MPIU_Context_id_t * ctx1,
                                   MPID_Sched_t s, MPID_Comm_kind_t gcn_cid_kind)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -1029,17 +1029,17 @@ int MPIR_Get_intercomm_contextid_nonblock(MPID_Comm * comm_ptr, MPID_Comm * newc
 #define FUNCNAME MPIR_Get_intercomm_contextid
 #undef FCNAME
 #define FCNAME "MPIR_Get_intercomm_contextid"
-int MPIR_Get_intercomm_contextid(MPID_Comm * comm_ptr, MPIR_Context_id_t * context_id,
-                                 MPIR_Context_id_t * recvcontext_id)
+int MPIR_Get_intercomm_contextid(MPID_Comm * comm_ptr, MPIU_Context_id_t * context_id,
+                                 MPIU_Context_id_t * recvcontext_id)
 {
-    MPIR_Context_id_t mycontext_id, remote_context_id;
+    MPIU_Context_id_t mycontext_id, remote_context_id;
     int mpi_errno = MPI_SUCCESS;
     int tag = 31567;            /* FIXME  - we need an internal tag or
                                  * communication channel.  Can we use a different
                                  * context instead?.  Or can we use the tag
                                  * provided in the intercomm routine? (not on a dup,
                                  * but in that case it can use the collective context) */
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_GET_INTERCOMM_CONTEXTID);
 
     MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_GET_INTERCOMM_CONTEXTID);
@@ -1060,8 +1060,8 @@ int MPIR_Get_intercomm_contextid(MPID_Comm * comm_ptr, MPIR_Context_id_t * conte
      * exchange data */
     remote_context_id = -1;
     if (comm_ptr->rank == 0) {
-        mpi_errno = MPIC_Sendrecv(&mycontext_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, tag,
-                                  &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, tag,
+        mpi_errno = MPIC_Sendrecv(&mycontext_id, 1, MPIU_CONTEXT_ID_T_DATATYPE, 0, tag,
+                                  &remote_context_id, 1, MPIU_CONTEXT_ID_T_DATATYPE, 0, tag,
                                   comm_ptr, MPI_STATUS_IGNORE, &errflag);
         if (mpi_errno)
             MPIU_ERR_POP(mpi_errno);
@@ -1069,7 +1069,7 @@ int MPIR_Get_intercomm_contextid(MPID_Comm * comm_ptr, MPIR_Context_id_t * conte
 
     /* Make sure that all of the local processes now have this
      * id */
-    mpi_errno = MPIR_Bcast_impl(&remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE,
+    mpi_errno = MPIR_Bcast_impl(&remote_context_id, 1, MPIU_CONTEXT_ID_T_DATATYPE,
                                 0, comm_ptr->local_comm, &errflag);
     if (mpi_errno)
         MPIU_ERR_POP(mpi_errno);
@@ -1089,7 +1089,7 @@ int MPIR_Get_intercomm_contextid(MPID_Comm * comm_ptr, MPIR_Context_id_t * conte
 #define FUNCNAME MPIR_Free_contextid
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-void MPIR_Free_contextid(MPIR_Context_id_t context_id)
+void MPIR_Free_contextid(MPIU_Context_id_t context_id)
 {
     int idx, bitpos, raw_prefix;
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_FREE_CONTEXTID);
diff --git a/src/mpi/comm/intercomm_create.c b/src/mpi/comm/intercomm_create.c
index 73b0ed8..24faf6c 100644
--- a/src/mpi/comm/intercomm_create.c
+++ b/src/mpi/comm/intercomm_create.c
@@ -124,13 +124,13 @@ int MPIR_Intercomm_create_impl(MPID_Comm *local_comm_ptr, int local_leader,
                                MPID_Comm **new_intercomm_ptr)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPIR_Context_id_t final_context_id, recvcontext_id;
+    MPIU_Context_id_t final_context_id, recvcontext_id;
     int remote_size, *remote_lpids=0, *remote_gpids=0, singlePG;
     int local_size, *local_gpids=0, *local_lpids=0;
     int comm_info[3];
     int is_low_group = 0;
     int cts_tag;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIU_CHKLMEM_DECL(4);
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_INTERCOMM_CREATE_IMPL);
 
@@ -242,10 +242,10 @@ int MPIR_Intercomm_create_impl(MPID_Comm *local_comm_ptr, int local_leader,
     /* Leaders can now swap context ids and then broadcast the value
        to the local group of processes */
     if (local_comm_ptr->rank == local_leader) {
-        MPIR_Context_id_t remote_context_id;
+        MPIU_Context_id_t remote_context_id;
 
-        mpi_errno = MPIC_Sendrecv( &recvcontext_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, remote_leader, cts_tag,
-                                      &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, remote_leader, cts_tag,
+        mpi_errno = MPIC_Sendrecv( &recvcontext_id, 1, MPIU_CONTEXT_ID_T_DATATYPE, remote_leader, cts_tag,
+                                      &remote_context_id, 1, MPIU_CONTEXT_ID_T_DATATYPE, remote_leader, cts_tag,
                                       peer_comm_ptr, MPI_STATUS_IGNORE, &errflag );
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
diff --git a/src/mpi/comm/intercomm_merge.c b/src/mpi/comm/intercomm_merge.c
index 48d7064..2e5d234 100644
--- a/src/mpi/comm/intercomm_merge.c
+++ b/src/mpi/comm/intercomm_merge.c
@@ -73,8 +73,8 @@ int MPIR_Intercomm_merge_impl(MPID_Comm *comm_ptr, int high, MPID_Comm **new_int
 {
     int mpi_errno = MPI_SUCCESS;
     int  local_high, remote_high, new_size;
-    MPIR_Context_id_t new_context_id;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIU_Context_id_t new_context_id;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPID_MPI_STATE_DECL(MPID_STATE_MPIR_INTERCOMM_MERGE_IMPL);
 
     MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_INTERCOMM_MERGE_IMPL);
@@ -309,7 +309,7 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm)
         MPID_BEGIN_ERROR_CHECKS;
         {
 	    int acthigh;
-            mpir_errflag_t errflag = MPIR_ERR_NONE;
+            MPIR_Errflag_t errflag = MPIR_ERR_NONE;
 	    /* Check for consistent valus of high in each local group.
                The Intel test suite checks for this; it is also an easy
                error to make */
diff --git a/src/mpi/comm/mpicomm.h b/src/mpi/comm/mpicomm.h
index 17b2437..03b7873 100644
--- a/src/mpi/comm/mpicomm.h
+++ b/src/mpi/comm/mpicomm.h
@@ -5,4 +5,4 @@
  */
 
 /* Function prototypes for communicator helper functions */
-int MPIR_Get_intercomm_contextid( MPID_Comm *, MPIR_Context_id_t *, MPIR_Context_id_t * );
+int MPIR_Get_intercomm_contextid( MPID_Comm *, MPIU_Context_id_t *, MPIU_Context_id_t * );
diff --git a/src/mpi/datatype/pack.c b/src/mpi/datatype/pack.c
index fba8b94..5be1767 100644
--- a/src/mpi/datatype/pack.c
+++ b/src/mpi/datatype/pack.c
@@ -85,7 +85,7 @@ int MPIR_Pack_impl(const void *inbuf,
     last  = SEGMENT_IGNORE_LAST;
 
     /* Ensure that pointer increment fits in a pointer */
-    MPID_Ensure_Aint_fits_in_pointer((MPI_VOID_PTR_CAST_TO_MPI_AINT outbuf) +
+    MPIU_Ensure_Aint_fits_in_pointer((MPI_VOID_PTR_CAST_TO_MPI_AINT outbuf) +
 				     (MPI_Aint) *position);
 
     MPID_Segment_pack(segp,
@@ -94,7 +94,7 @@ int MPIR_Pack_impl(const void *inbuf,
 		      (void *) ((char *) outbuf + *position));
 
     /* Ensure that calculation fits into an int datatype. */
-    MPID_Ensure_Aint_fits_in_int((MPI_Aint)*position + last);
+    MPIU_Ensure_Aint_fits_in_int((MPI_Aint)*position + last);
 
     *position = (int)((MPI_Aint)*position + last);
 
diff --git a/src/mpi/datatype/pack_external.c b/src/mpi/datatype/pack_external.c
index 7cb36a4..081ac81 100644
--- a/src/mpi/datatype/pack_external.c
+++ b/src/mpi/datatype/pack_external.c
@@ -137,7 +137,7 @@ int MPI_Pack_external(const char datarep[],
     last  = SEGMENT_IGNORE_LAST;
 
     /* Ensure that pointer increment fits in a pointer */
-    MPID_Ensure_Aint_fits_in_pointer((MPI_VOID_PTR_CAST_TO_MPI_AINT outbuf) + *position);
+    MPIU_Ensure_Aint_fits_in_pointer((MPI_VOID_PTR_CAST_TO_MPI_AINT outbuf) + *position);
 
     MPID_Segment_pack_external32(segp,
 				 first,
diff --git a/src/mpi/datatype/unpack.c b/src/mpi/datatype/unpack.c
index f5594ea..869faf7 100644
--- a/src/mpi/datatype/unpack.c
+++ b/src/mpi/datatype/unpack.c
@@ -76,7 +76,7 @@ int MPIR_Unpack_impl(const void *inbuf, MPI_Aint insize, MPI_Aint *position,
     last  = SEGMENT_IGNORE_LAST;
 
     /* Ensure that pointer increment fits in a pointer */
-    MPID_Ensure_Aint_fits_in_pointer((MPI_VOID_PTR_CAST_TO_MPI_AINT inbuf) +
+    MPIU_Ensure_Aint_fits_in_pointer((MPI_VOID_PTR_CAST_TO_MPI_AINT inbuf) +
 				     (MPI_Aint) *position);
 
     MPID_Segment_unpack(segp,
@@ -85,7 +85,7 @@ int MPIR_Unpack_impl(const void *inbuf, MPI_Aint insize, MPI_Aint *position,
 			(void *) ((char *) inbuf + *position));
 
     /* Ensure that calculation fits into an int datatype. */
-    MPID_Ensure_Aint_fits_in_int((MPI_Aint)*position + last);
+    MPIU_Ensure_Aint_fits_in_int((MPI_Aint)*position + last);
 
     *position = (int)((MPI_Aint)*position + last);
 
diff --git a/src/mpi/datatype/unpack_external.c b/src/mpi/datatype/unpack_external.c
index df96ebe..abed09d 100644
--- a/src/mpi/datatype/unpack_external.c
+++ b/src/mpi/datatype/unpack_external.c
@@ -122,7 +122,7 @@ int MPI_Unpack_external(const char datarep[],
     last  = SEGMENT_IGNORE_LAST;
 
     /* Ensure that pointer increment fits in a pointer */
-    MPID_Ensure_Aint_fits_in_pointer((MPI_VOID_PTR_CAST_TO_MPI_AINT inbuf) + *position);
+    MPIU_Ensure_Aint_fits_in_pointer((MPI_VOID_PTR_CAST_TO_MPI_AINT inbuf) + *position);
 
     MPID_Segment_unpack_external32(segp,
 				   first,
diff --git a/src/mpi/debugger/dbginit.c b/src/mpi/debugger/dbginit.c
index b2184d5..115720b 100644
--- a/src/mpi/debugger/dbginit.c
+++ b/src/mpi/debugger/dbginit.c
@@ -458,7 +458,7 @@ void MPIR_CommL_remember( MPID_Comm *comm_ptr )
 		   "Remember list structure address is %p",&MPIR_All_communicators);
     MPIU_THREAD_CS_ENTER(HANDLE,comm_ptr);
     if (comm_ptr == MPIR_All_communicators.head) {
-	MPIU_Internal_error_printf( "Internal error: communicator is already on free list\n" );
+	MPL_internal_error_printf( "Internal error: communicator is already on free list\n" );
 	return;
     }
     comm_ptr->comm_next = MPIR_All_communicators.head;
@@ -486,7 +486,7 @@ void MPIR_CommL_forget( MPID_Comm *comm_ptr )
 	    break;
 	}
 	if (p == p->comm_next) {
-	    MPIU_Internal_error_printf( "Mangled pointers to communicators - next is itself for %p\n", p );
+	    MPL_internal_error_printf( "Mangled pointers to communicators - next is itself for %p\n", p );
 	    break;
 	}
 	prev = p;
diff --git a/src/mpi/errhan/errutil.c b/src/mpi/errhan/errutil.c
index ca3ff40..6469190 100644
--- a/src/mpi/errhan/errutil.c
+++ b/src/mpi/errhan/errutil.c
@@ -211,13 +211,13 @@ void MPIR_Errhandler_set_fc( MPI_Errhandler errhand )
 void MPIR_Err_preOrPostInit( void )
 {
     if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_PRE_INIT) {
-	MPIU_Error_printf("Attempting to use an MPI routine before initializing MPICH\n");
+	MPL_error_printf("Attempting to use an MPI routine before initializing MPICH\n");
     }
     else if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_POST_FINALIZED) {
-	MPIU_Error_printf("Attempting to use an MPI routine after finalizing MPICH\n");
+	MPL_error_printf("Attempting to use an MPI routine after finalizing MPICH\n");
     }
     else {
-	MPIU_Error_printf("Internal Error: Unknown state of MPI (neither initialized nor finalized)\n" );
+	MPL_error_printf("Internal Error: Unknown state of MPI (neither initialized nor finalized)\n" );
     }
     exit(1);
 }
@@ -450,7 +450,7 @@ void MPIR_Handle_fatal_error( MPID_Comm *comm_ptr,
     /* FIXME: Not internationalized.  Since we are using MPIR_Err_get_string,
        we are assuming that the code is still able to execute a full 
        MPICH error code to message conversion. */
-    MPIU_Snprintf(error_msg, MAX_ERRMSG_STRING, "Fatal error in %s: ", fcname);
+    MPL_snprintf(error_msg, MAX_ERRMSG_STRING, "Fatal error in %s: ", fcname);
     len = (int)strlen(error_msg);
     MPIR_Err_get_string(errcode, &error_msg[len], MAX_ERRMSG_STRING-len, NULL);
 
@@ -476,7 +476,7 @@ static int checkValidErrcode( int error_class, const char fcname[],
 	/* --BEGIN ERROR HANDLING-- */
 	if (errcode & ~ERROR_CLASS_MASK)
 	{
-	    MPIU_Error_printf("INTERNAL ERROR: Invalid error class (%d) encountered while returning from\n"
+	    MPL_error_printf("INTERNAL ERROR: Invalid error class (%d) encountered while returning from\n"
 			      "%s.  Please file a bug report.\n", error_class, fcname);
 	    /* Note that we don't try to print the error stack; if the 
 	       error code is invalid, it can't be used to find
@@ -487,7 +487,7 @@ static int checkValidErrcode( int error_class, const char fcname[],
 	else
 	{
             /* FIXME: The error stack comment only applies to MSG_ALL */
-	    MPIU_Error_printf("INTERNAL ERROR: Invalid error class (%d) encountered while returning from\n"
+	    MPL_error_printf("INTERNAL ERROR: Invalid error class (%d) encountered while returning from\n"
 			      "%s.  Please file a bug report.  No error stack is available.\n", error_class, fcname);
 	}
 	/* FIXME: We probably want to set this to MPI_ERR_UNKNOWN
@@ -638,7 +638,7 @@ void MPIR_Err_get_string( int errorcode, char * msg, int length,
 	    generic_idx = ((errorcode & ERROR_GENERIC_MASK) >> ERROR_GENERIC_SHIFT) - 1;
 	    
 	    if (generic_idx >= 0) {
-		MPIU_Snprintf(msg, num_remaining, ", %s", generic_err_msgs[generic_idx].long_name);
+		MPL_snprintf(msg, num_remaining, ", %s", generic_err_msgs[generic_idx].long_name);
 		msg[num_remaining - 1] = '\0';
 		goto fn_exit;
 	    }
@@ -893,7 +893,7 @@ int MPIR_Err_create_code_valist( int lastcode, int fatal, const char fcname[],
 	reason = checkErrcodeIsValid(lastcode);
 	if (reason) {
 	    /* --BEGIN ERROR HANDLING-- */
-	    MPIU_Error_printf( "INTERNAL ERROR: invalid error code %x (%s) in %s:%d\n", 
+	    MPL_error_printf( "INTERNAL ERROR: invalid error code %x (%s) in %s:%d\n", 
 			       lastcode, ErrcodeInvalidReasonStr( reason ), 
 			       fcname, line );
 	    lastcode = MPI_SUCCESS;
@@ -953,7 +953,7 @@ int MPIR_Err_create_code_valist( int lastcode, int fatal, const char fcname[],
 		else {
 		    specific_fmt = specific_msg;
 		}
-		MPIU_Snprintf( user_ring_msg, sizeof(user_ring_msg),
+		MPL_snprintf( user_ring_msg, sizeof(user_ring_msg),
 			       specific_fmt, user_error_code );
 	    }
 	    else {
@@ -970,7 +970,7 @@ int MPIR_Err_create_code_valist( int lastcode, int fatal, const char fcname[],
 	{
 	    if (generic_msg[0] == '*' && generic_msg[1] == '*')
 		{
-                    MPIU_Error_printf( "INTERNAL ERROR: Could not find %s in list of messages\n", generic_msg );
+                    MPL_error_printf( "INTERNAL ERROR: Could not find %s in list of messages\n", generic_msg );
 		}
 	}
 #           endif /* DBG_OUTPUT */
@@ -1049,7 +1049,7 @@ int MPIR_Err_create_code_valist( int lastcode, int fatal, const char fcname[],
 					     &last_ring_id,
 					     &last_generic_idx ) != 0) {
 		    /* --BEGIN ERROR HANDLING-- */
-		    MPIU_Error_printf( 
+		    MPL_error_printf( 
 		  "Invalid error code (%d) (error ring index %d invalid)\n", 
 		  lastcode, last_ring_idx );
 		    /* --END ERROR HANDLING-- */
@@ -1068,7 +1068,7 @@ int MPIR_Err_create_code_valist( int lastcode, int fatal, const char fcname[],
 
 	    if (fcname != NULL)
 	    {
-		MPIU_Snprintf(ErrorRing[ring_idx].location, MAX_LOCATION_LEN, "%s(%d)", fcname, line);
+		MPL_snprintf(ErrorRing[ring_idx].location, MAX_LOCATION_LEN, "%s(%d)", fcname, line);
 		ErrorRing[ring_idx].location[MAX_LOCATION_LEN] = '\0';
 	    }
 	    else
@@ -1117,7 +1117,7 @@ static void MPIR_Err_print_stack_string(int errcode, char *str, int maxlen )
 	    if (convertErrcodeToIndexes( tmp_errcode, &ring_idx, &ring_id,
 					 &generic_idx ) != 0) {
 		/* --BEGIN ERROR HANDLING-- */
-		MPIU_Error_printf( 
+		MPL_error_printf( 
 		    "Invalid error code (%d) (error ring index %d invalid)\n", 
 		    errcode, ring_idx );
 		break;
@@ -1150,7 +1150,7 @@ static void MPIR_Err_print_stack_string(int errcode, char *str, int maxlen )
 	    if (convertErrcodeToIndexes( errcode, &ring_idx, &ring_id,
 					 &generic_idx ) != 0) {
 		/* --BEGIN ERROR HANDLING-- */
-		MPIU_Error_printf( 
+		MPL_error_printf( 
 		    "Invalid error code (%d) (error ring index %d invalid)\n", 
 		    errcode, ring_idx );
 		/* --END ERROR HANDLING-- */
@@ -1163,7 +1163,7 @@ static void MPIR_Err_print_stack_string(int errcode, char *str, int maxlen )
 	    
 	    if (ErrorRing[ring_idx].id == ring_id) {
 		int nchrs;
-		MPIU_Snprintf(str, maxlen, "%s", ErrorRing[ring_idx].location);
+		MPL_snprintf(str, maxlen, "%s", ErrorRing[ring_idx].location);
 		len     = (int)strlen(str);
 		maxlen -= len;
 		str    += len;
@@ -1198,7 +1198,7 @@ static void MPIR_Err_print_stack_string(int errcode, char *str, int maxlen )
 			    if (len > maxlen)
 				break;
 			    /* FIXME: Don't use Snprint to append a string ! */
-			    MPIU_Snprintf(str, MPIR_CVAR_CHOP_ERROR_STACK - 1 - max_location_len, "%s", cur_pos);
+			    MPL_snprintf(str, MPIR_CVAR_CHOP_ERROR_STACK - 1 - max_location_len, "%s", cur_pos);
 			    str[MPIR_CVAR_CHOP_ERROR_STACK - 1 - max_location_len] = '\n';
 			    cur_pos += MPIR_CVAR_CHOP_ERROR_STACK - 1 - max_location_len;
 			    str += MPIR_CVAR_CHOP_ERROR_STACK - max_location_len;
@@ -1207,7 +1207,7 @@ static void MPIR_Err_print_stack_string(int errcode, char *str, int maxlen )
 				break;
 			    for (i=0; i<max_location_len; i++)
 			    {
-				MPIU_Snprintf(str, maxlen, " ");
+				MPL_snprintf(str, maxlen, " ");
 				maxlen--;
 				str++;
 			    }
@@ -1215,7 +1215,7 @@ static void MPIR_Err_print_stack_string(int errcode, char *str, int maxlen )
 			}
 			else
 			{
-			    MPIU_Snprintf(str, maxlen, "%s\n", cur_pos);
+			    MPL_snprintf(str, maxlen, "%s\n", cur_pos);
 			    len = (int)strlen(str);
 			    maxlen -= len;
 			    str += len;
@@ -1225,7 +1225,7 @@ static void MPIR_Err_print_stack_string(int errcode, char *str, int maxlen )
 		}
 		else
 		{
-		    MPIU_Snprintf(str, maxlen, "%s\n", ErrorRing[ring_idx].msg);
+		    MPL_snprintf(str, maxlen, "%s\n", ErrorRing[ring_idx].msg);
 		    len = (int)strlen(str);
 		    maxlen -= len;
 		    str += len;
@@ -1259,7 +1259,7 @@ static void MPIR_Err_print_stack_string(int errcode, char *str, int maxlen )
 	       non-null before you use it */
 	    p = generic_err_msgs[generic_idx].long_name;
 	    if (!p) { p = "<NULL>"; }
-	    MPIU_Snprintf(str, maxlen, "(unknown)(): %s\n", p );
+	    MPL_snprintf(str, maxlen, "(unknown)(): %s\n", p );
 	    len = (int)strlen(str);
 	    maxlen -= len;
 	    str += len;
@@ -1274,7 +1274,7 @@ static void MPIR_Err_print_stack_string(int errcode, char *str, int maxlen )
 	
 	if (error_class <= MPICH_ERR_LAST_MPIX)
 	{
-	    MPIU_Snprintf(str, maxlen, "(unknown)(): %s\n", 
+	    MPL_snprintf(str, maxlen, "(unknown)(): %s\n", 
 			  get_class_msg(ERROR_GET_CLASS(errcode)));
 	    len = (int)strlen(str);
 	    maxlen -= len;
@@ -1283,7 +1283,7 @@ static void MPIR_Err_print_stack_string(int errcode, char *str, int maxlen )
 	else
 	{
 	    /* FIXME: Not internationalized */
-	    MPIU_Snprintf(str, maxlen, 
+	    MPL_snprintf(str, maxlen, 
 			  "Error code contains an invalid class (%d)\n",
 			  error_class);
 	    len = (int)strlen(str);
@@ -1432,9 +1432,9 @@ static const char * GetAssertString(int d)
     if (d)
     {
 	if (len < ASSERT_STR_MAXLEN)
-	    MPIU_Snprintf(cur, len, " | 0x%x", d);
+	    MPL_snprintf(cur, len, " | 0x%x", d);
 	else
-	    MPIU_Snprintf(cur, len, "assert=0x%x", d);
+	    MPL_snprintf(cur, len, "assert=0x%x", d);
     }
     return str;
 }
@@ -1467,7 +1467,7 @@ static const char * GetDTypeString(MPI_Datatype d)
 	str = MPIDU_Datatype_builtin_to_string(d);
 	if (str == NULL)
 	{
-	    MPIU_Snprintf(default_str, sizeof(default_str), "dtype=0x%08x", d);
+	    MPL_snprintf(default_str, sizeof(default_str), "dtype=0x%08x", d);
 	    return default_str;
 	}
 	return str;
@@ -1477,10 +1477,10 @@ static const char * GetDTypeString(MPI_Datatype d)
     str = MPIDU_Datatype_combiner_to_string(combiner);
     if (str == NULL)
     {
-	MPIU_Snprintf(default_str, sizeof(default_str), "dtype=USER<0x%08x>", d);
+	MPL_snprintf(default_str, sizeof(default_str), "dtype=USER<0x%08x>", d);
 	return default_str;
     }
-    MPIU_Snprintf(default_str, sizeof(default_str), "dtype=USER<%s>", str);
+    MPL_snprintf(default_str, sizeof(default_str), "dtype=USER<%s>", str);
     return default_str;
 }
 
@@ -1522,7 +1522,7 @@ static const char * GetMPIOpString(MPI_Op o)
         return "MPI_NO_OP";
     }
     /* FIXME: default is not thread safe */
-    MPIU_Snprintf(default_str, sizeof(default_str), "op=0x%x", o);
+    MPL_snprintf(default_str, sizeof(default_str), "op=0x%x", o);
     return default_str;
 }
 
@@ -1592,19 +1592,19 @@ static int vsnprintf_mpi(char *str, size_t maxlen, const char *fmt_orig,
 	    break;
 	case (int)'d':
 	    d = va_arg(list, int);
-	    MPIU_Snprintf(str, maxlen, "%d", d);
+	    MPL_snprintf(str, maxlen, "%d", d);
 	    break;
 	case (int)'L':
 	    ll = va_arg(list, long long);
-	    MPIU_Snprintf(str, maxlen, "%lld", ll);
+	    MPL_snprintf(str, maxlen, "%lld", ll);
 	    break;
         case (int)'x':
             d = va_arg(list, int);
-            MPIU_Snprintf(str, maxlen, "%x", d);
+            MPL_snprintf(str, maxlen, "%x", d);
             break;
         case (int)'X':
             ll = va_arg(list, long long);
-            MPIU_Snprintf(str, maxlen, "%llx", ll);
+            MPL_snprintf(str, maxlen, "%llx", ll);
             break;
 	case (int)'i':
 	    i = va_arg(list, int);
@@ -1620,7 +1620,7 @@ static int vsnprintf_mpi(char *str, size_t maxlen, const char *fmt_orig,
 		MPIU_Strncpy(str, "MPI_ROOT", maxlen);
 		break;
 	    default:
-		MPIU_Snprintf(str, maxlen, "%d", i);
+		MPL_snprintf(str, maxlen, "%d", i);
 		break;
 	    }
 	    break;
@@ -1636,7 +1636,7 @@ static int vsnprintf_mpi(char *str, size_t maxlen, const char *fmt_orig,
                    though there is one example in the MPI-3.0 standard
                    that sets status.MPI_TAG to MPI_UNDEFINED in a 
                    generalized request example. */
-		MPIU_Snprintf(str, maxlen, "%d", t);
+		MPL_snprintf(str, maxlen, "%d", t);
 		break;
 	    }
 	    break;
@@ -1654,7 +1654,7 @@ static int vsnprintf_mpi(char *str, size_t maxlen, const char *fmt_orig,
 		   (including Windows) that don't prefix %p with 0x. 
 		   This must be done with a capability, not a test on
 		   particular OS or header files */
-		MPIU_Snprintf(str, maxlen, "%p", p);
+		MPL_snprintf(str, maxlen, "%p", p);
 	    }
 	    break;
 	case (int)'C':
@@ -1671,7 +1671,7 @@ static int vsnprintf_mpi(char *str, size_t maxlen, const char *fmt_orig,
 		MPIU_Strncpy(str, "MPI_COMM_NULL", maxlen);
 		break;
 	    default:
-		MPIU_Snprintf(str, maxlen, "comm=0x%x", C);
+		MPL_snprintf(str, maxlen, "comm=0x%x", C);
 		break;
 	    }
 	    break;
@@ -1683,12 +1683,12 @@ static int vsnprintf_mpi(char *str, size_t maxlen, const char *fmt_orig,
 	    }
 	    else
 	    {
-		MPIU_Snprintf(str, maxlen, "info=0x%x", info);
+		MPL_snprintf(str, maxlen, "info=0x%x", info);
 	    }
 	    break;
 	case (int)'D':
 	    D = va_arg(list, MPI_Datatype);
-	    MPIU_Snprintf(str, maxlen, "%s", GetDTypeString(D));
+	    MPL_snprintf(str, maxlen, "%s", GetDTypeString(D));
 	    break;
 	    /* Include support for %F only if MPI-IO is enabled */
 #ifdef MPI_MODE_RDWR
@@ -1702,7 +1702,7 @@ static int vsnprintf_mpi(char *str, size_t maxlen, const char *fmt_orig,
 	    }
 	    else
 	    {
-		MPIU_Snprintf(str, maxlen, "file=0x%lx", (unsigned long)F);
+		MPL_snprintf(str, maxlen, "file=0x%lx", (unsigned long)F);
 	    }
 	    }
 	    break;
@@ -1715,12 +1715,12 @@ static int vsnprintf_mpi(char *str, size_t maxlen, const char *fmt_orig,
 	    }
 	    else
 	    {
-		MPIU_Snprintf(str, maxlen, "win=0x%x", W);
+		MPL_snprintf(str, maxlen, "win=0x%x", W);
 	    }
 	    break;
 	case (int)'A':
 	    d = va_arg(list, int);
-	    MPIU_Snprintf(str, maxlen, "%s", GetAssertString(d));
+	    MPL_snprintf(str, maxlen, "%s", GetAssertString(d));
 	    break;
 	case (int)'G':
 	    G = va_arg(list, MPI_Group);
@@ -1730,12 +1730,12 @@ static int vsnprintf_mpi(char *str, size_t maxlen, const char *fmt_orig,
 	    }
 	    else
 	    {
-		MPIU_Snprintf(str, maxlen, "group=0x%x", G);
+		MPL_snprintf(str, maxlen, "group=0x%x", G);
 	    }
 	    break;
 	case (int)'O':
 	    O = va_arg(list, MPI_Op);
-	    MPIU_Snprintf(str, maxlen, "%s", GetMPIOpString(O));
+	    MPL_snprintf(str, maxlen, "%s", GetMPIOpString(O));
 	    break;
 	case (int)'R':
 	    R = va_arg(list, MPI_Request);
@@ -1745,7 +1745,7 @@ static int vsnprintf_mpi(char *str, size_t maxlen, const char *fmt_orig,
 	    }
 	    else
 	    {
-		MPIU_Snprintf(str, maxlen, "req=0x%x", R);
+		MPL_snprintf(str, maxlen, "req=0x%x", R);
 	    }
 	    break;
 	case (int)'E':
@@ -1756,13 +1756,13 @@ static int vsnprintf_mpi(char *str, size_t maxlen, const char *fmt_orig,
 	    }
 	    else
 	    {
-		MPIU_Snprintf(str, maxlen, "errh=0x%x", E);
+		MPL_snprintf(str, maxlen, "errh=0x%x", E);
 	    }
 	    break;
         case (int)'c':
             c = va_arg(list, MPI_Count);
             MPIU_Assert(sizeof(long long) >= sizeof(MPI_Count));
-            MPIU_Snprintf(str, maxlen, "%lld", (long long)c);
+            MPL_snprintf(str, maxlen, "%lld", (long long)c);
             break;
 	default:
 	    /* Error: unhandled output type */
@@ -1904,7 +1904,7 @@ static int checkForUserErrcode( int errcode )
 	    if (convertErrcodeToIndexes( errcode, &ring_idx, &ring_id,
 					 &generic_idx ) != 0) {
 		/* --BEGIN ERROR HANDLING-- */
-		MPIU_Error_printf( 
+		MPL_error_printf( 
 		  "Invalid error code (%d) (error ring index %d invalid)\n", 
 		  errcode, ring_idx );
 		/* --END ERROR HANDLING-- */
@@ -2017,7 +2017,7 @@ static int ErrGetInstanceString( int errorcode, char msg[], int num_remaining )
 					     &ring_id,
 					     &generic_idx ) != 0) {
 		    /* --BEGIN ERROR HANDLING-- */
-		    MPIU_Error_printf( 
+		    MPL_error_printf( 
 	      "Invalid error code (%d) (error ring index %d invalid)\n", 
 	      errorcode, ring_idx );
 		    break;
@@ -2031,7 +2031,7 @@ static int ErrGetInstanceString( int errorcode, char msg[], int num_remaining )
 		if (ErrorRing[ring_idx].id == ring_id) {
 		    /* just keep clobbering old values until the 
 		       end of the stack is reached */
-		    MPIU_Snprintf(msg, num_remaining, ", %s", 
+		    MPL_snprintf(msg, num_remaining, ", %s", 
 				  ErrorRing[ring_idx].msg);
 		    msg[num_remaining - 1] = '\0';
 		    errorcode = ErrorRing[ring_idx].prev_error;
diff --git a/src/mpi/init/abort.c b/src/mpi/init/abort.c
index be2ce16..2acf9b3 100644
--- a/src/mpi/init/abort.c
+++ b/src/mpi/init/abort.c
@@ -129,11 +129,11 @@ int MPI_Abort(MPI_Comm comm, int errorcode)
     MPIR_Comm_get_name_impl(comm_ptr, comm_name, &len);
     if (len == 0)
     {
-	MPIU_Snprintf(comm_name, MPI_MAX_OBJECT_NAME, "comm=0x%X", comm);
+	MPL_snprintf(comm_name, MPI_MAX_OBJECT_NAME, "comm=0x%X", comm);
     }
     if (!MPIR_CVAR_SUPPRESS_ABORT_MESSAGE)
         /* FIXME: This is not internationalized */
-        MPIU_Snprintf(abort_str, 100, "application called MPI_Abort(%s, %d) - process %d", comm_name, errorcode, comm_ptr->rank);
+        MPL_snprintf(abort_str, 100, "application called MPI_Abort(%s, %d) - process %d", comm_name, errorcode, comm_ptr->rank);
     mpi_errno = MPID_Abort( comm_ptr, mpi_errno, errorcode, abort_str );
     /* --BEGIN ERROR HANDLING-- */
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
diff --git a/src/mpi/init/finalize.c b/src/mpi/init/finalize.c
index 3aeeca7..53d854a 100644
--- a/src/mpi/init/finalize.c
+++ b/src/mpi/init/finalize.c
@@ -76,7 +76,7 @@ void MPIR_Add_finalize( int (*f)( void * ), void *extra_data, int priority )
     if (fstack_sp >= MAX_FINALIZE_FUNC) {
 	/* This is a little tricky.  We may want to check the state of
 	   MPIR_Process.mpich_state to decide how to signal the error */
-	(void)MPIU_Internal_error_printf( "overflow in finalize stack! "
+	(void)MPL_internal_error_printf( "overflow in finalize stack! "
 		"Is MAX_FINALIZE_FUNC too small?\n" );
     if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_IN_INIT ||
         OPA_load_int(&MPIR_Process.mpich_state) == MPICH_POST_INIT)
diff --git a/src/mpi/init/init.c b/src/mpi/init/init.c
index e182ffc..d5e01dc 100644
--- a/src/mpi/init/init.c
+++ b/src/mpi/init/init.c
@@ -163,7 +163,7 @@ int MPI_Init( int *argc, char ***argv )
     else if (!strcmp(MPIR_CVAR_DEFAULT_THREAD_LEVEL, "MPI_THREAD_SINGLE"))
         threadLevel = MPI_THREAD_SINGLE;
     else {
-        MPIU_Error_printf("Unrecognized thread level %s\n", MPIR_CVAR_DEFAULT_THREAD_LEVEL);
+        MPL_error_printf("Unrecognized thread level %s\n", MPIR_CVAR_DEFAULT_THREAD_LEVEL);
         exit(1);
     }
 
diff --git a/src/mpi/rma/alloc_mem.c b/src/mpi/rma/alloc_mem.c
index cdfad3f..b68ee5a 100644
--- a/src/mpi/rma/alloc_mem.c
+++ b/src/mpi/rma/alloc_mem.c
@@ -89,7 +89,7 @@ int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr)
 
     /* ... body of routine ...  */
 
-    MPID_Ensure_Aint_fits_in_pointer(size);
+    MPIU_Ensure_Aint_fits_in_pointer(size);
     ap = MPID_Alloc_mem(size, info_ptr);
 
     /* --BEGIN ERROR HANDLING-- */
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 e403d9b..3eb3d84 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 ( (MPIR_Upint)others_req[i].offsets < (MPIR_Upint)recvBufForOffsets )
+	    if ( (MPIU_Upint)others_req[i].offsets < (MPIU_Upint)recvBufForOffsets )
 		recvBufForOffsets = others_req[i].offsets;
-	    if ( (MPIR_Upint)others_req[i].lens < (MPIR_Upint)recvBufForLens )
+	    if ( (MPIU_Upint)others_req[i].lens < (MPIU_Upint)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) &&
-	     ((MPIR_Upint)my_req[i].offsets <= (MPIR_Upint)sendBufForOffsets) )
+	     ((MPIU_Upint)my_req[i].offsets <= (MPIU_Upint)sendBufForOffsets) )
        {
 	  sendBufForOffsets = my_req[i].offsets;
     }
 
 	if ( (my_req[i].count) &&
-	     ((MPIR_Upint)my_req[i].lens <= (MPIR_Upint)sendBufForLens) )
+	     ((MPIU_Upint)my_req[i].lens <= (MPIU_Upint)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)
-	                ( ( (MPIR_Upint)my_req[i].offsets -
-			   (MPIR_Upint)sendBufForOffsets ) /
-			  (MPIR_Upint)sizeof(ADIO_Offset) );
+	                ( ( (MPIU_Upint)my_req[i].offsets -
+			   (MPIU_Upint)sendBufForOffsets ) /
+			  (MPIU_Upint)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)
-	                 ( ( (MPIR_Upint)others_req[i].offsets -
-			     (MPIR_Upint)recvBufForOffsets ) /
-			   (MPIR_Upint)sizeof(ADIO_Offset) );
+	                 ( ( (MPIU_Upint)others_req[i].offsets -
+			     (MPIU_Upint)recvBufForOffsets ) /
+			   (MPIU_Upint)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)
-	               ( ( (MPIR_Upint)my_req[i].lens -
-			   (MPIR_Upint)sendBufForLens ) /
-			 (MPIR_Upint) sizeof(ADIO_Offset) );
+	               ( ( (MPIU_Upint)my_req[i].lens -
+			   (MPIU_Upint)sendBufForLens ) /
+			 (MPIU_Upint) 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)
-	                 ( ( (MPIR_Upint)others_req[i].lens -
-			     (MPIR_Upint)recvBufForLens ) /
-			   (MPIR_Upint) sizeof(ADIO_Offset) );
+	                 ( ( (MPIU_Upint)others_req[i].lens -
+			     (MPIU_Upint)recvBufForLens ) /
+			   (MPIU_Upint) 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 18d92d1..355ad22 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
@@ -624,7 +624,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)(MPIR_Upint)read_buf)+req_off-real_off) == (ADIO_Offset)(MPIR_Upint)(read_buf+req_off-real_off));
+      ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf)+req_off-real_off) == (ADIO_Offset)(MPIU_Upint)(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));
@@ -708,7 +708,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)(MPIR_Upint)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(MPIR_Upint)(read_buf+real_size-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((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);
@@ -923,7 +923,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node
 { \
     while (size) { \
 	size_in_buf = ADIOI_MIN(size, flat_buf_sz); \
-  ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIR_Upint)(buf + user_buf_idx)); \
+  ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)(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 4fcb14c..b5b7be6 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
@@ -733,7 +733,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)(MPIR_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIR_Upint)(write_buf+req_off-off));
+      ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIU_Upint)(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));
@@ -1179,7 +1179,7 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, const void *buf, char *write_buf
 { \
     while (size) { \
         size_in_buf = ADIOI_MIN(size, flat_buf_sz); \
-  ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + user_buf_idx)); \
+  ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)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 3299ad5..774cb53 100644
--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
@@ -500,7 +500,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)(MPIR_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIR_Upint)(write_buf+req_off-off));
+                        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIU_Upint)(write_buf+req_off-off));
 			MPI_Address(write_buf + req_off - off,
 				    &(others_req[i].mem_ptrs[j]));
                         recv_size[i] += req_len;
@@ -862,7 +862,7 @@ static void ADIOI_LUSTRE_W_Exchange_data(ADIO_File fd, const void *buf,
 { \
     while (size) { \
         size_in_buf = ADIOI_MIN(size, flat_buf_sz); \
-        ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + user_buf_idx)); \
+        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)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 76eebef..0ec9dc1 100644
--- a/src/mpi/romio/adio/common/ad_iread_coll.c
+++ b/src/mpi/romio/adio/common/ad_iread_coll.c
@@ -793,7 +793,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)(MPIR_Upint)read_buf) + req_off - real_off) == (ADIO_Offset)(MPIR_Upint)(read_buf + req_off - real_off));
+                    ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf) + req_off - real_off) == (ADIO_Offset)(MPIU_Upint)(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));
@@ -889,7 +889,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)(MPIR_Upint)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(MPIR_Upint)(read_buf+real_size-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((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 7832ab4..83da6ef 100644
--- a/src/mpi/romio/adio/common/ad_iwrite_coll.c
+++ b/src/mpi/romio/adio/common/ad_iwrite_coll.c
@@ -824,7 +824,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)(MPIR_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIR_Upint)(write_buf+req_off-off));
+                    ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIU_Upint)(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 6577637..5aa38e4 100644
--- a/src/mpi/romio/adio/common/ad_read_coll.c
+++ b/src/mpi/romio/adio/common/ad_read_coll.c
@@ -684,7 +684,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)(MPIR_Upint)read_buf)+req_off-real_off) == (ADIO_Offset)(MPIR_Upint)(read_buf+req_off-real_off));
+      ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)read_buf)+req_off-real_off) == (ADIO_Offset)(MPIU_Upint)(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));
@@ -737,7 +737,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)(MPIR_Upint)read_buf)+real_size-for_next_iter) == (ADIO_Offset)(MPIR_Upint)(read_buf+real_size-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((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);
@@ -931,7 +931,7 @@ static void ADIOI_R_Exchange_data(ADIO_File fd, void *buf, ADIOI_Flatlist_node
 { \
     while (size) { \
 	size_in_buf = ADIOI_MIN(size, flat_buf_sz); \
-  ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + user_buf_idx)); \
+  ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)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 d616bd8..93dc0ea 100644
--- a/src/mpi/romio/adio/common/ad_read_str_naive.c
+++ b/src/mpi/romio/adio/common/ad_read_str_naive.c
@@ -83,7 +83,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)(MPIR_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + userbuf_off));
+    ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
     ADIOI_Assert(req_len == (int) req_len);
 		ADIO_ReadContig(fd, 
 				(char *) buf + userbuf_off,
@@ -245,7 +245,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count,
 		    req_off = off;
 		    req_len = frd_size;
 
-        ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + userbuf_off));
+        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
         ADIOI_Assert(req_len == (int) req_len);
 		    ADIO_ReadContig(fd, 
 				    (char *) buf + userbuf_off,
@@ -311,7 +311,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count,
 		    req_len = size;
 		    userbuf_off = i_offset;
 
-        ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + userbuf_off));
+        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)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 56dfdd2..3207085 100644
--- a/src/mpi/romio/adio/common/ad_write_coll.c
+++ b/src/mpi/romio/adio/common/ad_write_coll.c
@@ -467,7 +467,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)(MPIR_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIR_Upint)(write_buf+req_off-off));
+      ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)write_buf)+req_off-off) == (ADIO_Offset)(MPIU_Upint)(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));
@@ -833,7 +833,7 @@ static void ADIOI_W_Exchange_data(ADIO_File fd, void *buf, char *write_buf,
 { \
     while (size) { \
         size_in_buf = ADIOI_MIN(size, flat_buf_sz); \
-  ADIOI_Assert((((ADIO_Offset)(MPIR_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + user_buf_idx)); \
+  ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + user_buf_idx) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)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 7048198..f22ba7f 100644
--- a/src/mpi/romio/adio/common/ad_write_nolock.c
+++ b/src/mpi/romio/adio/common/ad_write_nolock.c
@@ -143,7 +143,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)(MPIR_Upint)buf) + (ADIO_Offset)j*(ADIO_Offset)buftype_extent + flat_buf->indices[i]) == (ADIO_Offset)((MPIR_Upint)buf + (ADIO_Offset)j*(ADIO_Offset)buftype_extent + flat_buf->indices[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]));
 #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 f59c02d..935753d 100644
--- a/src/mpi/romio/adio/common/ad_write_str_naive.c
+++ b/src/mpi/romio/adio/common/ad_write_str_naive.c
@@ -85,7 +85,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)(MPIR_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + userbuf_off));
+    ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
 		ADIO_WriteContig(fd, 
 				(char *) buf + userbuf_off,
 				(int)req_len, 
@@ -246,7 +246,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)(MPIR_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + userbuf_off));
+        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)buf + userbuf_off));
 		    ADIO_WriteContig(fd, 
 				    (char *) buf + userbuf_off,
 				    (int)req_len, 
@@ -312,7 +312,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)(MPIR_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIR_Upint)((MPIR_Upint)buf + userbuf_off));
+        ADIOI_Assert((((ADIO_Offset)(MPIU_Upint)buf) + userbuf_off) == (ADIO_Offset)(MPIU_Upint)((MPIU_Upint)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 555af6d..c813090 100644
--- a/src/mpi/romio/adio/include/adioi.h
+++ b/src/mpi/romio/adio/include/adioi.h
@@ -1014,11 +1014,11 @@ int  ADIOI_MPE_iwrite_b;
    (no loss of (meaningful) high order bytes in 8 byte MPI_Aint 
       to (possible) 4 byte ptr cast)                              */
 /* Should work even on 64bit or old 32bit configs                 */
-  /* Use MPID_Ensure_Aint_fits_in_pointer from mpiutil.h and 
+  /* Use MPIU_Ensure_Aint_fits_in_pointer from mpiutil.h and 
          MPI_AINT_CAST_TO_VOID_PTR from configure (mpi.h) */
   #include "glue_romio.h"
 
-  #define ADIOI_AINT_CAST_TO_VOID_PTR (void*)(MPIR_Pint)
+  #define ADIOI_AINT_CAST_TO_VOID_PTR (void*)(MPIU_Pint)
   /* 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)
@@ -1033,7 +1033,7 @@ 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 MPIR_Upint unsigned long
+  #define MPIU_Upint unsigned long
   #define MPIU_THREADPRIV_DECL
 #endif
 
diff --git a/src/mpi/topo/dist_gr_create.c b/src/mpi/topo/dist_gr_create.c
index 495d00a..a34b485 100644
--- a/src/mpi/topo/dist_gr_create.c
+++ b/src/mpi/topo/dist_gr_create.c
@@ -92,7 +92,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
     int *rout_idx;
     int *rs;
     int in_out_peers[2] = {-1, -1};
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIU_CHKLMEM_DECL(9);
     MPIU_CHKPMEM_DECL(1);
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_DIST_GRAPH_CREATE);
diff --git a/src/mpi/topo/inhb_allgather.c b/src/mpi/topo/inhb_allgather.c
index b310890..635425a 100644
--- a/src/mpi/topo/inhb_allgather.c
+++ b/src/mpi/topo/inhb_allgather.c
@@ -46,7 +46,7 @@ int MPIR_Ineighbor_allgather_default(const void *sendbuf, int sendcount, MPI_Dat
     MPID_Datatype_get_extent_macro(recvtype, recvtype_extent);
 
     /* This is the largest offset we add to recvbuf */
-    MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+    MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
                                      (comm_ptr->local_size * recvcount * recvtype_extent));
 
     mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted);
diff --git a/src/mpi/topo/inhb_allgatherv.c b/src/mpi/topo/inhb_allgatherv.c
index 7513582..820bc4c 100644
--- a/src/mpi/topo/inhb_allgatherv.c
+++ b/src/mpi/topo/inhb_allgatherv.c
@@ -49,7 +49,7 @@ int MPIR_Ineighbor_allgatherv_default(const void *sendbuf, int sendcount, MPI_Da
     MPID_Datatype_get_extent_macro(recvtype, recvtype_extent);
 
     for (i = 0; i < comm_size; ++i) {
-        MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+        MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
                                          (displs[i] * recvtype_extent));
     }
 
diff --git a/src/mpi/topo/inhb_alltoall.c b/src/mpi/topo/inhb_alltoall.c
index 5539a32..dcd06cd 100644
--- a/src/mpi/topo/inhb_alltoall.c
+++ b/src/mpi/topo/inhb_alltoall.c
@@ -47,10 +47,10 @@ int MPIR_Ineighbor_alltoall_default(const void *sendbuf, int sendcount, MPI_Data
     MPID_Datatype_get_extent_macro(recvtype, recvtype_extent);
 
     /* This is the largest offset we add to sendbuf */
-    MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
+    MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
                                      (comm_ptr->local_size * sendcount * sendtype_extent));
     /* This is the largest offset we add to recvbuf */
-    MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+    MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
                                      (comm_ptr->local_size * recvcount * recvtype_extent));
 
     mpi_errno = MPIR_Topo_canon_nhb_count(comm_ptr, &indegree, &outdegree, &weighted);
diff --git a/src/mpi/topo/inhb_alltoallv.c b/src/mpi/topo/inhb_alltoallv.c
index 2874522..ee8c4c9 100644
--- a/src/mpi/topo/inhb_alltoallv.c
+++ b/src/mpi/topo/inhb_alltoallv.c
@@ -51,9 +51,9 @@ int MPIR_Ineighbor_alltoallv_default(const void *sendbuf, const int sendcounts[]
     MPID_Datatype_get_extent_macro(recvtype, recvtype_extent);
 
     for (i = 0; i < comm_size; ++i) {
-        MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
+        MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
                                          (sdispls[i] * sendtype_extent));
-        MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+        MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
                                          (rdispls[i] * recvtype_extent));
     }
 
diff --git a/src/mpi/topo/inhb_alltoallw.c b/src/mpi/topo/inhb_alltoallw.c
index 46b9db2..d30c702 100644
--- a/src/mpi/topo/inhb_alltoallw.c
+++ b/src/mpi/topo/inhb_alltoallw.c
@@ -53,7 +53,7 @@ int MPIR_Ineighbor_alltoallw_default(const void *sendbuf, const int sendcounts[]
 
     for (k = 0; k < outdegree; ++k) {
         char *sb;
-        MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf + sdispls[k]);
+        MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf + sdispls[k]);
 
         sb = ((char *)sendbuf) + sdispls[k];
         mpi_errno = MPID_Sched_send(sb, sendcounts[k], sendtypes[k], dsts[k], comm_ptr, s);
@@ -62,7 +62,7 @@ int MPIR_Ineighbor_alltoallw_default(const void *sendbuf, const int sendcounts[]
 
     for (l = 0; l < indegree; ++l) {
         char *rb;
-        MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf + rdispls[l]);
+        MPIU_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf + rdispls[l]);
 
         rb = ((char *)recvbuf) + rdispls[l];
         mpi_errno = MPID_Sched_recv(rb, recvcounts[l], recvtypes[l], srcs[l], comm_ptr, s);
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 51d06ef..3d3be04 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;                               \
-    MPIR_Pint datalen;                      \
+    MPIU_Pint datalen;                      \
     unsigned short seqno;                   \
     unsigned short type; /* currently used only with checkpointing */
 
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h
index 4e73875..3a352b7 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h
@@ -7,9 +7,9 @@
 #ifndef MPID_NEM_DEFS_H
 #define MPID_NEM_DEFS_H
 
-#include "mpitypedefs.h"
 #include "mpid_nem_datatypes.h"
 #include "mpi.h"
+#include "mpiutil.h"
 #include "mpiu_os_wrappers_pre.h"
 
 #define MPID_NEM_MAX_FNAME_LEN 256
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 628a11f..9c2fdc9 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
@@ -25,7 +25,7 @@ int MPIDI_CH3I_Seg_destroy(void);
 int MPID_nem_check_alloc(int);
 int MPID_nem_mpich_init(void);
 int MPID_nem_coll_init (void);
-int MPID_nem_send_iov(MPIDI_VC_t *vc, MPID_Request **sreq_ptr, MPID_IOV *iov, int n_iov);
+int MPID_nem_send_iov(MPIDI_VC_t *vc, MPID_Request **sreq_ptr, MPL_IOV *iov, int n_iov);
 int MPID_nem_lmt_pkthandler_init(MPIDI_CH3_PktHandler_Fcn *pktArray[], int arraySize);
 int MPID_nem_register_initcomp_cb(int (* callback)(void));
 int MPID_nem_choose_netmod(void);
@@ -138,15 +138,15 @@ typedef union MPIDI_CH3_nem_pkt
 
 #define MPID_nem_lmt_send_RTS(vc, rts_pkt, s_cookie_buf, s_cookie_len) do {                             \
         MPID_Request *_rts_req;                                                                         \
-        MPID_IOV _iov[2];                                                                               \
+        MPL_IOV _iov[2];                                                                               \
                                                                                                         \
         MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"sending rndv RTS packet");                                      \
         (rts_pkt)->cookie_len = (s_cookie_len);                                                         \
                                                                                                         \
-        _iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)(rts_pkt);                                            \
-        _iov[0].MPID_IOV_LEN = sizeof(*(rts_pkt));                                                      \
-        _iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)(s_cookie_buf);                                       \
-        _iov[1].MPID_IOV_LEN = (s_cookie_len);                                                          \
+        _iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)(rts_pkt);                                            \
+        _iov[0].MPL_IOV_LEN = sizeof(*(rts_pkt));                                                      \
+        _iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)(s_cookie_buf);                                       \
+        _iov[1].MPL_IOV_LEN = (s_cookie_len);                                                          \
                                                                                                         \
         MPIU_DBG_MSGPKT((vc), (rts_pkt)->match.parts.tag, (rts_pkt)->match.parts.context_id, (rts_pkt)->match.parts.rank, \
                         (rts_pkt)->data_sz, "Rndv");                                                    \
@@ -182,7 +182,7 @@ typedef union MPIDI_CH3_nem_pkt
 #define MPID_nem_lmt_send_CTS(vc, rreq, r_cookie_buf, r_cookie_len) do {                                \
         MPID_PKT_DECL_CAST(_upkt, MPID_nem_pkt_lmt_cts_t, _cts_pkt);                                    \
         MPID_Request *_cts_req;                                                                         \
-        MPID_IOV _iov[2];                                                                               \
+        MPL_IOV _iov[2];                                                                               \
                                                                                                         \
         MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"sending rndv CTS packet");                                      \
         MPIDI_Pkt_init(_cts_pkt, MPIDI_NEM_PKT_LMT_CTS);                                                \
@@ -191,10 +191,10 @@ typedef union MPIDI_CH3_nem_pkt
         _cts_pkt->cookie_len = (r_cookie_len);                                                          \
         _cts_pkt->data_sz = (rreq)->ch.lmt_data_sz;                                                     \
                                                                                                         \
-        _iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)_cts_pkt;                                             \
-        _iov[0].MPID_IOV_LEN = sizeof(*_cts_pkt);                                                       \
-        _iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)(r_cookie_buf);                                       \
-        _iov[1].MPID_IOV_LEN = (r_cookie_len);                                                          \
+        _iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)_cts_pkt;                                             \
+        _iov[0].MPL_IOV_LEN = sizeof(*_cts_pkt);                                                       \
+        _iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)(r_cookie_buf);                                       \
+        _iov[1].MPL_IOV_LEN = (r_cookie_len);                                                          \
                                                                                                         \
         mpi_errno = MPIDI_CH3_iStartMsgv((vc), _iov, (r_cookie_len) ? 2 : 1, &_cts_req);                \
         MPIU_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ctspkt");                           \
@@ -215,7 +215,7 @@ static inline int MPID_nem_lmt_send_COOKIE(MPIDI_VC_t *vc, MPID_Request *req,
     int mpi_errno = MPI_SUCCESS;
     MPID_PKT_DECL_CAST(_upkt, MPID_nem_pkt_lmt_cookie_t, cookie_pkt);
     MPID_Request *cookie_req;
-    MPID_IOV iov[2];
+    MPL_IOV iov[2];
 
     MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"sending rndv COOKIE packet");
     MPIDI_Pkt_init(cookie_pkt, MPIDI_NEM_PKT_LMT_COOKIE);
@@ -242,10 +242,10 @@ static inline int MPID_nem_lmt_send_COOKIE(MPIDI_VC_t *vc, MPID_Request *req,
             break;
     }
 
-    iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) cookie_pkt;
-    iov[0].MPID_IOV_LEN = sizeof(*cookie_pkt);
-    iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) cookie_buf;
-    iov[1].MPID_IOV_LEN = cookie_len;
+    iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) cookie_pkt;
+    iov[0].MPL_IOV_LEN = sizeof(*cookie_pkt);
+    iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) cookie_buf;
+    iov[1].MPL_IOV_LEN = cookie_len;
 
     mpi_errno = MPIDI_CH3_iStartMsgv(vc, iov, (cookie_len ? 2 : 1), &cookie_req);
     MPIU_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**cookiepkt");
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 799d5ba..22af4d6 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
@@ -8,7 +8,7 @@
 #define _MPID_NEM_INLINE_H
 
 #include "my_papi_defs.h"
-#include "mpiiov.h"
+#include "mpl.h"
 #include "mpidi_nem_statistics.h"
 #include "mpit.h"
 
@@ -16,10 +16,10 @@ extern int MPID_nem_lmt_shm_pending;
 extern MPID_nem_cell_ptr_t MPID_nem_prefetched_cell;
 
 static inline int MPID_nem_mpich_send_header (void* buf, int size, MPIDI_VC_t *vc, int *again);
-static inline int MPID_nem_mpich_sendv (MPID_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again);
+static inline int MPID_nem_mpich_sendv (MPL_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again);
 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 (MPID_IOV **iov, int *n_iov,
+static inline int MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov,
                                                void *ext_header, MPIDI_msg_sz_t ext_header_sz,
                                                MPIDI_VC_t *vc, int *again);
 static inline int MPID_nem_recv_seqno_matches (MPID_nem_queue_ptr_t qhead);
@@ -171,7 +171,7 @@ MPID_nem_mpich_send_header (void* buf, int size, MPIDI_VC_t *vc, int *again)
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 static inline int
-MPID_nem_mpich_sendv (MPID_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again)
+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;
@@ -183,7 +183,7 @@ MPID_nem_mpich_sendv (MPID_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again)
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_MPICH_SENDV);
 
-    MPIU_Assert (*n_iov > 0 && (*iov)->MPID_IOV_LEN > 0);
+    MPIU_Assert (*n_iov > 0 && (*iov)->MPL_IOV_LEN > 0);
     MPIU_Assert(vc_ch->is_local);
 
     DO_PAPI (PAPI_reset (PAPI_EventSet));
@@ -216,10 +216,10 @@ MPID_nem_mpich_sendv (MPID_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again)
     payload_len = MPID_NEM_MPICH_DATA_LEN;
     cell_buf    = (char *) el->pkt.mpich.p.payload; /* cast away volatile */
     
-    while (*n_iov && payload_len >= (*iov)->MPID_IOV_LEN)
+    while (*n_iov && payload_len >= (*iov)->MPL_IOV_LEN)
     {
-	size_t _iov_len = (*iov)->MPID_IOV_LEN;
-	MPIU_Memcpy (cell_buf, (*iov)->MPID_IOV_BUF, _iov_len);
+	size_t _iov_len = (*iov)->MPL_IOV_LEN;
+	MPIU_Memcpy (cell_buf, (*iov)->MPL_IOV_BUF, _iov_len);
 	payload_len -= _iov_len;
 	cell_buf += _iov_len;
 	--(*n_iov);
@@ -228,9 +228,9 @@ MPID_nem_mpich_sendv (MPID_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again)
     
     if (*n_iov && payload_len > 0)
     {
-	MPIU_Memcpy (cell_buf, (*iov)->MPID_IOV_BUF, payload_len);
-	(*iov)->MPID_IOV_BUF = (char *)(*iov)->MPID_IOV_BUF + payload_len;
-	(*iov)->MPID_IOV_LEN -= payload_len;
+	MPIU_Memcpy (cell_buf, (*iov)->MPL_IOV_BUF, payload_len);
+	(*iov)->MPL_IOV_BUF = (char *)(*iov)->MPL_IOV_BUF + payload_len;
+	(*iov)->MPL_IOV_LEN -= payload_len;
  	payload_len = 0;
     }
 
@@ -273,7 +273,7 @@ MPID_nem_mpich_sendv (MPID_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again)
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 static inline int
-MPID_nem_mpich_sendv_header (MPID_IOV **iov, int *n_iov,
+MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov,
                              void *ext_hdr_ptr, MPIDI_msg_sz_t ext_hdr_sz,
                              MPIDI_VC_t *vc, int *again)
 {
@@ -291,13 +291,13 @@ MPID_nem_mpich_sendv_header (MPID_IOV **iov, int *n_iov,
     MPIU_Assert(vc_ch->is_local);
 
     DO_PAPI (PAPI_reset (PAPI_EventSet));
-    MPIU_Assert (*n_iov > 0 && (*iov)->MPID_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t));
+    MPIU_Assert (*n_iov > 0 && (*iov)->MPL_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t));
 
     my_rank = MPID_nem_mem_region.rank;
 
 #ifdef USE_FASTBOX
     /* Note: use fastbox only when there is no streaming optimization. */
-    if (ext_hdr_sz == 0 && *n_iov == 2 && (*iov)[1].MPID_IOV_LEN + sizeof(MPIDI_CH3_Pkt_t) <= MPID_NEM_FBOX_DATALEN)
+    if (ext_hdr_sz == 0 && *n_iov == 2 && (*iov)[1].MPL_IOV_LEN + sizeof(MPIDI_CH3_Pkt_t) <= MPID_NEM_FBOX_DATALEN)
     {
 	MPID_nem_fbox_mpich_t *pbox = vc_ch->fbox_out;
 
@@ -305,12 +305,12 @@ MPID_nem_mpich_sendv_header (MPID_IOV **iov, int *n_iov,
             goto usequeue_l;
 
         pbox->cell.pkt.mpich.source  = MPID_nem_mem_region.local_rank;
-        pbox->cell.pkt.mpich.datalen = (*iov)[1].MPID_IOV_LEN + sizeof(MPIDI_CH3_Pkt_t);
+        pbox->cell.pkt.mpich.datalen = (*iov)[1].MPL_IOV_LEN + sizeof(MPIDI_CH3_Pkt_t);
         pbox->cell.pkt.mpich.seqno   = vc_ch->send_seqno++;
         MPIU_DBG_STMT (CH3_CHANNEL, VERBOSE, pbox->cell.pkt.mpich.type = MPID_NEM_PKT_MPICH_HEAD);
         
-        MPIU_Memcpy((void *)pbox->cell.pkt.mpich.p.payload, (*iov)[0].MPID_IOV_BUF, (*iov)[0].MPID_IOV_LEN);
-        MPIU_Memcpy ((char *)pbox->cell.pkt.mpich.p.payload + (*iov)[0].MPID_IOV_LEN, (*iov)[1].MPID_IOV_BUF, (*iov)[1].MPID_IOV_LEN);
+        MPIU_Memcpy((void *)pbox->cell.pkt.mpich.p.payload, (*iov)[0].MPL_IOV_BUF, (*iov)[0].MPL_IOV_LEN);
+        MPIU_Memcpy ((char *)pbox->cell.pkt.mpich.p.payload + (*iov)[0].MPL_IOV_LEN, (*iov)[1].MPL_IOV_BUF, (*iov)[1].MPL_IOV_LEN);
         
         OPA_store_release_int(&pbox->flag.value, 1);
         *n_iov = 0;
@@ -348,7 +348,7 @@ MPID_nem_mpich_sendv_header (MPID_IOV **iov, int *n_iov,
     MPID_nem_queue_dequeue (MPID_nem_mem_region.my_freeQ, &el);
 #endif /*PREFETCH_CELL */
 
-    MPIU_Memcpy((void *)el->pkt.mpich.p.payload, (*iov)->MPID_IOV_BUF, sizeof(MPIDI_CH3_Pkt_t));
+    MPIU_Memcpy((void *)el->pkt.mpich.p.payload, (*iov)->MPL_IOV_BUF, sizeof(MPIDI_CH3_Pkt_t));
     buf_offset += sizeof(MPIDI_CH3_Pkt_t);
 
     if (ext_hdr_sz > 0) {
@@ -365,10 +365,10 @@ MPID_nem_mpich_sendv_header (MPID_IOV **iov, int *n_iov,
     --(*n_iov);
 
     payload_len = MPID_NEM_MPICH_DATA_LEN - buf_offset;
-    while (*n_iov && payload_len >= (*iov)->MPID_IOV_LEN)
+    while (*n_iov && payload_len >= (*iov)->MPL_IOV_LEN)
     {
-	size_t _iov_len = (*iov)->MPID_IOV_LEN;
-	MPIU_Memcpy (cell_buf, (*iov)->MPID_IOV_BUF, _iov_len);
+	size_t _iov_len = (*iov)->MPL_IOV_LEN;
+	MPIU_Memcpy (cell_buf, (*iov)->MPL_IOV_BUF, _iov_len);
 	payload_len -= _iov_len;
 	cell_buf += _iov_len;
 	--(*n_iov);
@@ -377,9 +377,9 @@ MPID_nem_mpich_sendv_header (MPID_IOV **iov, int *n_iov,
     
     if (*n_iov && payload_len > 0)
     {
-	MPIU_Memcpy (cell_buf, (*iov)->MPID_IOV_BUF, payload_len);
-	(*iov)->MPID_IOV_BUF = (char *)(*iov)->MPID_IOV_BUF + payload_len;
-	(*iov)->MPID_IOV_LEN -= payload_len;
+	MPIU_Memcpy (cell_buf, (*iov)->MPL_IOV_BUF, payload_len);
+	(*iov)->MPL_IOV_BUF = (char *)(*iov)->MPL_IOV_BUF + payload_len;
+	(*iov)->MPL_IOV_LEN -= payload_len;
 	payload_len = 0;
     }
 
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 07415e9..7e2fea0 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h
@@ -60,18 +60,18 @@ int MPID_nem_mpich_serialize_win (void *buf, int buf_len, MPID_nem_mpich_win_t *
 int MPID_nem_mpich_deserialize_win (void *buf, int buf_len, MPID_nem_mpich_win_t **win);
 
 int MPID_nem_mpich_win_put (void *s_buf, void *d_buf, int len, MPID_nem_mpich_win_t *remote_win);
-int MPID_nem_mpich_win_putv (MPID_IOV **s_iov, int *s_niov, MPID_IOV **d_iov, int *d_niov, MPID_nem_mpich_win_t *remote_win);
+int MPID_nem_mpich_win_putv (MPL_IOV **s_iov, int *s_niov, MPL_IOV **d_iov, int *d_niov, MPID_nem_mpich_win_t *remote_win);
 int MPID_nem_mpich_win_get (void *s_buf, void *d_buf, int len, MPID_nem_mpich_win_t *remote_win);
-int MPID_nem_mpich_win_getv (MPID_IOV **s_iov, int *s_niov, MPID_IOV **d_iov, int *d_niov, MPID_nem_mpich_win_t *remote_win);
+int MPID_nem_mpich_win_getv (MPL_IOV **s_iov, int *s_niov, MPL_IOV **d_iov, int *d_niov, MPID_nem_mpich_win_t *remote_win);
 
 int MPID_nem_mpich_register_memory (void *buf, int len);
 int MPID_nem_mpich_deregister_memory (void *buf, int len);
 
 int MPID_nem_mpich_put (void *s_buf, void *d_buf, int len, int proc, int *completion_ctr);
-int MPID_nem_mpich_putv (MPID_IOV **s_iov, int *s_niov, MPID_IOV **d_iov, int *d_niov, int proc,
+int MPID_nem_mpich_putv (MPL_IOV **s_iov, int *s_niov, MPL_IOV **d_iov, int *d_niov, int proc,
 		       int *completion_ctr);
 int MPID_nem_mpich_get (void *s_buf, void *d_buf, int len, int proc, int *completion_ctr);
-int MPID_nem_mpich_getv (MPID_IOV **s_iov, int *s_niov, MPID_IOV **d_iov, int *d_niov, int proc,
+int MPID_nem_mpich_getv (MPL_IOV **s_iov, int *s_niov, MPL_IOV **d_iov, int *d_niov, int proc,
 		       int *completion_ctr);
 
      
@@ -94,8 +94,8 @@ int MPID_nem_mpich_getv (MPID_IOV **s_iov, int *s_niov, MPID_IOV **d_iov, int *d
 
 #if !defined (MPID_NEM_INLINE) || !MPID_NEM_INLINE
 int MPID_nem_mpich_send_header(void* buf, int size, struct MPIDI_VC *vc, int *again);
-int MPID_nem_mpich_sendv(MPID_IOV **iov, int *n_iov, struct MPIDI_VC *vc, int *again);
-int MPID_nem_mpich_sendv_header(MPID_IOV **iov, int *n_iov, void *ext_header,
+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,
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 bef6b72..d883ea9 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_impl.h
@@ -60,25 +60,25 @@ 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 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, MPID_IOV s_cookie);
-int MPID_nem_lmt_shm_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV r_cookie);
-int MPID_nem_lmt_shm_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV cookie);
+int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie);
+int MPID_nem_lmt_shm_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV r_cookie);
+int MPID_nem_lmt_shm_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV cookie);
 int MPID_nem_lmt_shm_done_send(MPIDI_VC_t *vc, MPID_Request *req);
 int MPID_nem_lmt_shm_done_recv(MPIDI_VC_t *vc, MPID_Request *req);
 int MPID_nem_lmt_shm_vc_terminated(MPIDI_VC_t *vc);
 
 int MPID_nem_lmt_dma_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID_Request *req);
-int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV s_cookie);
-int MPID_nem_lmt_dma_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV r_cookie);
-int MPID_nem_lmt_dma_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV cookie);
+int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie);
+int MPID_nem_lmt_dma_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV r_cookie);
+int MPID_nem_lmt_dma_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV cookie);
 int MPID_nem_lmt_dma_done_send(MPIDI_VC_t *vc, MPID_Request *req);
 int MPID_nem_lmt_dma_done_recv(MPIDI_VC_t *vc, MPID_Request *req);
 int MPID_nem_lmt_dma_vc_terminated(MPIDI_VC_t *vc);
 
 int MPID_nem_lmt_vmsplice_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID_Request *req);
-int MPID_nem_lmt_vmsplice_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV s_cookie);
-int MPID_nem_lmt_vmsplice_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV r_cookie);
-int MPID_nem_lmt_vmsplice_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV cookie);
+int MPID_nem_lmt_vmsplice_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie);
+int MPID_nem_lmt_vmsplice_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV r_cookie);
+int MPID_nem_lmt_vmsplice_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV cookie);
 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);
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 1b909de..dbce2dd 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
@@ -119,9 +119,9 @@ typedef struct MPIDI_CH3I_VC
 
     /* LMT function pointers */
     int (* lmt_initiate_lmt)(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *rts_pkt, struct MPID_Request *req);
-    int (* lmt_start_recv)(struct MPIDI_VC *vc, struct MPID_Request *req, MPID_IOV s_cookie);
-    int (* lmt_start_send)(struct MPIDI_VC *vc, struct MPID_Request *sreq, MPID_IOV r_cookie);
-    int (* lmt_handle_cookie)(struct MPIDI_VC *vc, struct MPID_Request *req, MPID_IOV cookie);
+    int (* lmt_start_recv)(struct MPIDI_VC *vc, struct MPID_Request *req, MPL_IOV s_cookie);
+    int (* lmt_start_send)(struct MPIDI_VC *vc, struct MPID_Request *sreq, MPL_IOV r_cookie);
+    int (* lmt_handle_cookie)(struct MPIDI_VC *vc, struct MPID_Request *req, MPL_IOV cookie);
     int (* lmt_done_send)(struct MPIDI_VC *vc, struct MPID_Request *req);
     int (* lmt_done_recv)(struct MPIDI_VC *vc, struct MPID_Request *req);
     int (* lmt_vc_terminated)(struct MPIDI_VC *vc);
@@ -169,7 +169,7 @@ struct MPIDI_CH3I_Request
     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 */
-    MPID_IOV             lmt_tmp_cookie; /* temporary storage for received cookie */
+    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 */
 
     union
@@ -198,8 +198,8 @@ struct MPIDI_CH3I_Request
         MPIDI_DBG_PRINTF((55, FCNAME, "  cc = %d\n", (req)->cc));			\
         for (i = 0; i < (req)->iov_count; ++i)                                          \
             MPIDI_DBG_PRINTF((55, FCNAME, "  dev.iov[%d] = (%p, %d)\n", i,		\
-                              (req)->dev.iov[i+(req)->dev.iov_offset].MPID_IOV_BUF,     \
-                              (req)->dev.iov[i+(req)->dev.iov_offset].MPID_IOV_LEN));  \
+                              (req)->dev.iov[i+(req)->dev.iov_offset].MPL_IOV_BUF,     \
+                              (req)->dev.iov[i+(req)->dev.iov_offset].MPL_IOV_LEN));  \
     MPIDI_DBG_PRINTF((55, FCNAME, "  dev.iov_count = %d\n",                             \
                       (req)->dev.iov_count));                                           \
     MPIDI_DBG_PRINTF((55, FCNAME, "  dev.state = 0x%x\n", (req)->dev.state));           \
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 e4b02e5..1a900de 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
@@ -300,11 +300,11 @@ int MPID_nem_llc_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req)
         *(int32_t *) ((uint8_t *) & cmd[0].tag) = req->dev.match.parts.tag;
     }
 
-    *(MPIR_Context_id_t *) ((uint8_t *) & cmd[0].tag + sizeof(int32_t)) =
+    *(MPIU_Context_id_t *) ((uint8_t *) & cmd[0].tag + sizeof(int32_t)) =
         req->dev.match.parts.context_id;
-    MPIU_Assert(sizeof(LLC_tag_t) >= sizeof(int32_t) + sizeof(MPIR_Context_id_t));
-    memset((uint8_t *) & cmd[0].tag + sizeof(int32_t) + sizeof(MPIR_Context_id_t),
-           0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIR_Context_id_t));
+    MPIU_Assert(sizeof(LLC_tag_t) >= sizeof(int32_t) + sizeof(MPIU_Context_id_t));
+    memset((uint8_t *) & cmd[0].tag + sizeof(int32_t) + sizeof(MPIU_Context_id_t),
+           0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIU_Context_id_t));
 
 
     dprintf("llc_recv_posted,tag=");
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
index 9100a1a..f491121 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c
@@ -66,10 +66,10 @@ int MPID_nem_llc_iprobe(MPIDI_VC_t * vc, int source, int tag, MPID_Comm * comm,
         *(int32_t *) ((uint8_t *) & _tag) = tag;
     }
 
-    *(MPIR_Context_id_t *) ((uint8_t *) & _tag + sizeof(int32_t)) =
+    *(MPIU_Context_id_t *) ((uint8_t *) & _tag + sizeof(int32_t)) =
         comm->recvcontext_id + context_offset;
-    memset((uint8_t *) & _tag + sizeof(int32_t) + sizeof(MPIR_Context_id_t),
-           0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIR_Context_id_t));
+    memset((uint8_t *) & _tag + sizeof(int32_t) + sizeof(MPIU_Context_id_t),
+           0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIU_Context_id_t));
 
     if (source == MPI_ANY_SOURCE) {
         rank = LLC_ANY_SOURCE;
@@ -137,10 +137,10 @@ int MPID_nem_llc_improbe(MPIDI_VC_t * vc, int source, int tag, MPID_Comm * comm,
         *(int32_t *) ((uint8_t *) & _tag) = tag;
     }
 
-    *(MPIR_Context_id_t *) ((uint8_t *) & _tag + sizeof(int32_t)) =
+    *(MPIU_Context_id_t *) ((uint8_t *) & _tag + sizeof(int32_t)) =
         comm->recvcontext_id + context_offset;
-    memset((uint8_t *) & _tag + sizeof(int32_t) + sizeof(MPIR_Context_id_t),
-           0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIR_Context_id_t));
+    memset((uint8_t *) & _tag + sizeof(int32_t) + sizeof(MPIU_Context_id_t),
+           0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIU_Context_id_t));
 
     if (source == MPI_ANY_SOURCE) {
         rank = LLC_ANY_SOURCE;
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 a7d93ce..3fffc69 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
@@ -90,11 +90,11 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
     /* Prepare bit-vector to perform tag-match. We use the same bit-vector as in CH3 layer. */
     /* See src/mpid/ch3/src/mpid_isend.c */
     *(int32_t *) ((uint8_t *) & cmd[0].tag) = tag;
-    *(MPIR_Context_id_t *) ((uint8_t *) & cmd[0].tag + sizeof(int32_t)) =
+    *(MPIU_Context_id_t *) ((uint8_t *) & cmd[0].tag + sizeof(int32_t)) =
         comm->context_id + context_offset;
-    MPIU_Assert(sizeof(LLC_tag_t) >= sizeof(int32_t) + sizeof(MPIR_Context_id_t));
-    memset((uint8_t *) & cmd[0].tag + sizeof(int32_t) + sizeof(MPIR_Context_id_t),
-           0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIR_Context_id_t));
+    MPIU_Assert(sizeof(LLC_tag_t) >= sizeof(int32_t) + sizeof(MPIU_Context_id_t));
+    memset((uint8_t *) & cmd[0].tag + sizeof(int32_t) + sizeof(MPIU_Context_id_t),
+           0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIU_Context_id_t));
 
     dprintf("llc_isend,tag=");
     for (i = 0; i < sizeof(LLC_tag_t); i++) {
@@ -199,16 +199,16 @@ int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_
 
     /* sreq: src/mpid/ch3/include/mpidpre.h */
     sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr;
-    sreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) & sreq->dev.pending_pkt;
-    sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
+    sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) & sreq->dev.pending_pkt;
+    sreq->dev.iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
     sreq->dev.iov_count = 1;
-    MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "IOV_LEN    = %d", (int) sreq->dev.iov[0].MPID_IOV_LEN);
+    MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "IOV_LEN    = %d", (int) sreq->dev.iov[0].MPL_IOV_LEN);
     if (data_sz > 0) {
-        sreq->dev.iov[1].MPID_IOV_BUF = data;
-        sreq->dev.iov[1].MPID_IOV_LEN = data_sz;
+        sreq->dev.iov[1].MPL_IOV_BUF = data;
+        sreq->dev.iov[1].MPL_IOV_LEN = data_sz;
         sreq->dev.iov_count = 2;
         MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE,
-                       "IOV_LEN    = %d", (int) sreq->dev.iov[0].MPID_IOV_LEN);
+                       "IOV_LEN    = %d", (int) sreq->dev.iov[0].MPL_IOV_LEN);
     }
 
     vc_llc = VC_LLC(vc);
@@ -228,12 +228,12 @@ int MPID_nem_llc_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_
             MPIU_ERR_POP(mpi_errno);
         }
         MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE,
-                       "IOV_LEN    = %d", (int) sreq->dev.iov[0].MPID_IOV_LEN);
+                       "IOV_LEN    = %d", (int) sreq->dev.iov[0].MPL_IOV_LEN);
         if (!MPIDI_nem_llc_Rqst_iov_update(sreq, ret)) {
             need_to_queue = 2;  /* YYY */
         }
         MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE,
-                       "IOV_LEN    = %d", (int) sreq->dev.iov[0].MPID_IOV_LEN);
+                       "IOV_LEN    = %d", (int) sreq->dev.iov[0].MPL_IOV_LEN);
     }
 
   queue_it:
@@ -287,16 +287,16 @@ int MPID_nem_llc_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr, MP
 
     /* sreq: src/mpid/ch3/include/mpidpre.h */
     sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr;
-    sreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) & sreq->dev.pending_pkt;
-    sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
+    sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) & sreq->dev.pending_pkt;
+    sreq->dev.iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
     sreq->dev.iov_count = 1;
-    MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "IOV_LEN    = %d", (int) sreq->dev.iov[0].MPID_IOV_LEN);
+    MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "IOV_LEN    = %d", (int) sreq->dev.iov[0].MPL_IOV_LEN);
     if (data_sz > 0) {
-        sreq->dev.iov[1].MPID_IOV_BUF = data;
-        sreq->dev.iov[1].MPID_IOV_LEN = data_sz;
+        sreq->dev.iov[1].MPL_IOV_BUF = data;
+        sreq->dev.iov[1].MPL_IOV_LEN = data_sz;
         sreq->dev.iov_count = 2;
         MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE,
-                       "IOV_LEN    = %d", (int) sreq->dev.iov[1].MPID_IOV_LEN);
+                       "IOV_LEN    = %d", (int) sreq->dev.iov[1].MPL_IOV_LEN);
     }
 
     vc_llc = VC_LLC(vc);
@@ -356,10 +356,10 @@ int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
     REQ_FIELD(sreq, rma_buf) = NULL;
 
     sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr;
-    sreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) & sreq->dev.pending_pkt;
-    sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
+    sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) & sreq->dev.pending_pkt;
+    sreq->dev.iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
     sreq->dev.iov_count = 1;
-    MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "IOV_LEN = %d", (int) sreq->dev.iov[0].MPID_IOV_LEN);
+    MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "IOV_LEN = %d", (int) sreq->dev.iov[0].MPL_IOV_LEN);
 
     data_sz = sreq->dev.segment_size;
     if (data_sz > 0) {
@@ -368,10 +368,10 @@ int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
         MPID_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, &data_sz,
                           (char *) REQ_FIELD(sreq, rma_buf));
 
-        sreq->dev.iov[1].MPID_IOV_BUF = REQ_FIELD(sreq, rma_buf);
-        sreq->dev.iov[1].MPID_IOV_LEN = data_sz;
+        sreq->dev.iov[1].MPL_IOV_BUF = REQ_FIELD(sreq, rma_buf);
+        sreq->dev.iov[1].MPL_IOV_LEN = data_sz;
         sreq->dev.iov_count = 2;
-        MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "IOV_LEN = %d", (int) sreq->dev.iov[1].MPID_IOV_LEN);
+        MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "IOV_LEN = %d", (int) sreq->dev.iov[1].MPL_IOV_LEN);
     }
 
     sreq->ch.vc = vc;
@@ -430,7 +430,7 @@ int MPID_nem_llc_send_queued(MPIDI_VC_t * vc, rque_t * send_queue)
         ssize_t ret = 0;
         MPID_Request *sreq;
         void *endpt = vc_llc->endpoint;
-        MPID_IOV *iovs;
+        MPL_IOV *iovs;
         int niov;
 
         sreq = MPIDI_CH3I_Sendq_head(*send_queue);
@@ -488,21 +488,21 @@ int MPIDI_nem_llc_Rqst_iov_update(MPID_Request * mreq, MPIDI_msg_sz_t consume)
 
     nv = mreq->dev.iov_count;
     for (iv = mreq->dev.iov_offset; iv < nv; iv++) {
-        MPID_IOV *iov = &mreq->dev.iov[iv];
+        MPL_IOV *iov = &mreq->dev.iov[iv];
 
         MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "iov_update() : iov[iv]    %d", iv);
         MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "iov_update() : consume b  %d", (int) consume);
         MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE,
-                       "iov_update() : iov_len b  %d", (int) iov->MPID_IOV_LEN);
-        if (iov->MPID_IOV_LEN > consume) {
-            iov->MPID_IOV_BUF = ((char *) iov->MPID_IOV_BUF) + consume;
-            iov->MPID_IOV_LEN -= consume;
+                       "iov_update() : iov_len b  %d", (int) iov->MPL_IOV_LEN);
+        if (iov->MPL_IOV_LEN > consume) {
+            iov->MPL_IOV_BUF = ((char *) iov->MPL_IOV_BUF) + consume;
+            iov->MPL_IOV_LEN -= consume;
             consume = 0;
             ret = FALSE;
             break;
         }
-        consume -= iov->MPID_IOV_LEN;
-        iov->MPID_IOV_LEN = 0;
+        consume -= iov->MPL_IOV_LEN;
+        iov->MPL_IOV_LEN = 0;
     }
     MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "iov_update() : consume %d", (int) consume);
 
@@ -1015,11 +1015,11 @@ int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Dat
     /* Prepare bit-vector to perform tag-match. We use the same bit-vector as in CH3 layer. */
     /* See src/mpid/ch3/src/mpid_isend.c */
     *(int32_t *) ((uint8_t *) & cmd[0].tag) = tag;
-    *(MPIR_Context_id_t *) ((uint8_t *) & cmd[0].tag + sizeof(int32_t)) =
+    *(MPIU_Context_id_t *) ((uint8_t *) & cmd[0].tag + sizeof(int32_t)) =
         comm->context_id + context_offset;
-    MPIU_Assert(sizeof(LLC_tag_t) >= sizeof(int32_t) + sizeof(MPIR_Context_id_t));
-    memset((uint8_t *) & cmd[0].tag + sizeof(int32_t) + sizeof(MPIR_Context_id_t),
-           0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIR_Context_id_t));
+    MPIU_Assert(sizeof(LLC_tag_t) >= sizeof(int32_t) + sizeof(MPIU_Context_id_t));
+    memset((uint8_t *) & cmd[0].tag + sizeof(int32_t) + sizeof(MPIU_Context_id_t),
+           0, sizeof(LLC_tag_t) - sizeof(int32_t) - sizeof(MPIU_Context_id_t));
 
     dprintf("llc_isend,tag=");
     for (i = 0; i < sizeof(LLC_tag_t); i++) {
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 faa95b8..2e9eba5 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_impl.h
@@ -299,7 +299,7 @@ static inline int _mxm_eager_threshold(void)
 /*
  * Tag management section
  */
-static inline mxm_tag_t _mxm_tag_mpi2mxm(int mpi_tag, MPIR_Context_id_t context_id)
+static inline mxm_tag_t _mxm_tag_mpi2mxm(int mpi_tag, MPIU_Context_id_t context_id)
 {
     mxm_tag_t mxm_tag;
 
@@ -374,19 +374,19 @@ static inline void _dbg_mxm_hexdump(void *ptr, int buflen)
     len = 80 * (buflen / 16 + 1);
     str = (char *) MPIU_Malloc(len);
     for (i = 0; i < buflen; i += 16) {
-        cur_len += MPIU_Snprintf(str + cur_len, len - cur_len, "%06x: ", i);
+        cur_len += MPL_snprintf(str + cur_len, len - cur_len, "%06x: ", i);
         for (j = 0; j < 16; j++)
             if (i + j < buflen)
-                cur_len += MPIU_Snprintf(str + cur_len, len - cur_len, "%02x ", buf[i + j]);
+                cur_len += MPL_snprintf(str + cur_len, len - cur_len, "%02x ", buf[i + j]);
             else
-                cur_len += MPIU_Snprintf(str + cur_len, len - cur_len, "   ");
-        cur_len += MPIU_Snprintf(str + cur_len, len - cur_len, " ");
+                cur_len += MPL_snprintf(str + cur_len, len - cur_len, "   ");
+        cur_len += MPL_snprintf(str + cur_len, len - cur_len, " ");
         for (j = 0; j < 16; j++)
             if (i + j < buflen)
                 cur_len +=
-                    MPIU_Snprintf(str + cur_len, len - cur_len, "%c",
+                    MPL_snprintf(str + cur_len, len - cur_len, "%c",
                                   isprint(buf[i + j]) ? buf[i + j] : '.');
-        cur_len += MPIU_Snprintf(str + cur_len, len - cur_len, "\n");
+        cur_len += MPL_snprintf(str + cur_len, len - cur_len, "\n");
     }
     _dbg_mxm_out(8, NULL, 1, NULL, NULL, -1, "%s", str);
     MPIU_Free(str);
@@ -398,7 +398,7 @@ static inline char *_tag_val_to_str(int tag, char *out, int max)
         MPIU_Strncpy(out, "MPI_ANY_TAG", max);
     }
     else {
-        MPIU_Snprintf(out, max, "%d", tag);
+        MPL_snprintf(out, max, "%d", tag);
     }
     return out;
 }
@@ -409,7 +409,7 @@ static inline char *_rank_val_to_str(int rank, char *out, int max)
         MPIU_Strncpy(out, "MPI_ANY_SOURCE", max);
     }
     else {
-        MPIU_Snprintf(out, max, "%d", rank);
+        MPL_snprintf(out, max, "%d", rank);
     }
     return out;
 }
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 0b7a651..770aacb 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
@@ -167,7 +167,7 @@ int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPID_Request * rreq)
                             dt_ptr, dt_true_lb);
 
     {
-        MPIR_Context_id_t context_id = rreq->dev.match.parts.context_id;
+        MPIU_Context_id_t context_id = rreq->dev.match.parts.context_id;
         int tag = rreq->dev.match.parts.tag;
         MPID_nem_mxm_vc_area *vc_area = NULL;
         MPID_nem_mxm_req_area *req_area = NULL;
@@ -291,7 +291,7 @@ static int _mxm_handle_rreq(MPID_Request * req)
         }
         else {
             mxm_req_buffer_t *iov_buf;
-            MPID_IOV *iov;
+            MPL_IOV *iov;
             int n_iov = 0;
             int index;
 
@@ -303,8 +303,8 @@ static int _mxm_handle_rreq(MPID_Request * req)
                 MPIU_Assert(iov);
 
                 for (index = 0; index < n_iov; index++) {
-                    iov[index].MPID_IOV_BUF = iov_buf[index].ptr;
-                    iov[index].MPID_IOV_LEN = iov_buf[index].length;
+                    iov[index].MPL_IOV_BUF = iov_buf[index].ptr;
+                    iov[index].MPL_IOV_LEN = iov_buf[index].length;
                 }
 
                 MPID_Segment_unpack_vector(req->dev.segment_ptr, req->dev.segment_first, &last, iov,
@@ -439,7 +439,7 @@ static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *rreq = *rreq_p;
     MPIDI_msg_sz_t last;
-    MPID_IOV *iov;
+    MPL_IOV *iov;
     int n_iov = 0;
     int index;
 
@@ -468,7 +468,7 @@ static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
                     MXM_REQ_DATA_MAX_IOV);
     for (index = 0; index < n_iov; index++) {
         _dbg_mxm_output(7, "======= Recv iov[%i] = ptr : %p, len : %i \n",
-                        index, iov[index].MPID_IOV_BUF, iov[index].MPID_IOV_LEN);
+                        index, iov[index].MPL_IOV_BUF, iov[index].MPL_IOV_LEN);
     }
 #endif
 
@@ -479,8 +479,8 @@ static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
         }
 
         for (index = 0; index < n_iov; index++) {
-            (*iov_buf)[index].ptr = iov[index].MPID_IOV_BUF;
-            (*iov_buf)[index].length = iov[index].MPID_IOV_LEN;
+            (*iov_buf)[index].ptr = iov[index].MPL_IOV_BUF;
+            (*iov_buf)[index].length = iov[index].MPL_IOV_LEN;
         }
         rreq->dev.tmpbuf = NULL;
         rreq->dev.tmpbuf_sz = 0;
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 7e321bd..1bd254b 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
@@ -789,7 +789,7 @@ static int _mxm_process_sdtype(MPID_Request ** sreq_p, MPI_Datatype datatype,
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *sreq = *sreq_p;
     MPIDI_msg_sz_t last;
-    MPID_IOV *iov;
+    MPL_IOV *iov;
     int n_iov = 0;
     int index;
     int size_to_copy = 0;
@@ -818,7 +818,7 @@ static int _mxm_process_sdtype(MPID_Request ** sreq_p, MPI_Datatype datatype,
                     MXM_REQ_DATA_MAX_IOV);
     for (index = 0; index < n_iov; index++) {
         _dbg_mxm_output(7, "======= Recv iov[%i] = ptr : %p, len : %i \n",
-                        index, iov[index].MPID_IOV_BUF, iov[index].MPID_IOV_LEN);
+                        index, iov[index].MPL_IOV_BUF, iov[index].MPL_IOV_LEN);
     }
 #endif
 
@@ -829,11 +829,11 @@ static int _mxm_process_sdtype(MPID_Request ** sreq_p, MPI_Datatype datatype,
 
     for (index = 0; index < n_iov; index++) {
         if (index < (MXM_REQ_DATA_MAX_IOV - 1)) {
-            (*iov_buf)[index].ptr = iov[index].MPID_IOV_BUF;
-            (*iov_buf)[index].length = iov[index].MPID_IOV_LEN;
+            (*iov_buf)[index].ptr = iov[index].MPL_IOV_BUF;
+            (*iov_buf)[index].length = iov[index].MPL_IOV_LEN;
         }
         else {
-            size_to_copy += iov[index].MPID_IOV_LEN;
+            size_to_copy += iov[index].MPL_IOV_LEN;
         }
     }
 
@@ -848,9 +848,9 @@ static int _mxm_process_sdtype(MPID_Request ** sreq_p, MPI_Datatype datatype,
         sreq->dev.tmpbuf_sz = size_to_copy;
         MPIU_Assert(sreq->dev.tmpbuf);
         for (index = (MXM_REQ_DATA_MAX_IOV - 1); index < n_iov; index++) {
-            MPIU_Memcpy((char *) (sreq->dev.tmpbuf) + offset, iov[index].MPID_IOV_BUF,
-                        iov[index].MPID_IOV_LEN);
-            offset += iov[index].MPID_IOV_LEN;
+            MPIU_Memcpy((char *) (sreq->dev.tmpbuf) + offset, iov[index].MPL_IOV_BUF,
+                        iov[index].MPL_IOV_LEN);
+            offset += iov[index].MPL_IOV_LEN;
         }
         (*iov_buf)[MXM_REQ_DATA_MAX_IOV - 1].ptr = sreq->dev.tmpbuf;
         (*iov_buf)[MXM_REQ_DATA_MAX_IOV - 1].length = size_to_copy;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
index bf1291f..bb5530e 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
@@ -305,7 +305,7 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
 int MPID_nem_ofi_finalize(void)
 {
     int mpi_errno = MPI_SUCCESS;
-    mpir_errflag_t ret = MPIR_ERR_NONE;
+    MPIR_Errflag_t ret = MPIR_ERR_NONE;
     BEGIN_FUNC(FCNAME);
 
     while(gl_data.rts_cts_in_flight) {
@@ -338,12 +338,12 @@ static inline int compile_time_checking()
 {
     OFI_COMPILE_TIME_ASSERT(sizeof(MPID_nem_ofi_vc_t) <= MPIDI_NEM_VC_NETMOD_AREA_LEN);
     OFI_COMPILE_TIME_ASSERT(sizeof(MPID_nem_ofi_req_t) <= MPIDI_NEM_REQ_NETMOD_AREA_LEN);
-    OFI_COMPILE_TIME_ASSERT(sizeof(iovec_t) == sizeof(MPID_IOV));
+    OFI_COMPILE_TIME_ASSERT(sizeof(iovec_t) == sizeof(MPL_IOV));
     MPIU_Assert(((void *) &(((iovec_t *) 0)->iov_base)) ==
-                ((void *) &(((MPID_IOV *) 0)->MPID_IOV_BUF)));
+                ((void *) &(((MPL_IOV *) 0)->MPL_IOV_BUF)));
     MPIU_Assert(((void *) &(((iovec_t *) 0)->iov_len)) ==
-                ((void *) &(((MPID_IOV *) 0)->MPID_IOV_LEN)));
-    MPIU_Assert(sizeof(((iovec_t *) 0)->iov_len) == sizeof(((MPID_IOV *) 0)->MPID_IOV_LEN));
+                ((void *) &(((MPL_IOV *) 0)->MPL_IOV_LEN)));
+    MPIU_Assert(sizeof(((iovec_t *) 0)->iov_len) == sizeof(((MPL_IOV *) 0)->MPL_IOV_LEN));
 
     /* ------------------------------------------------------------------------ */
     /* Generate the MPICH catalog files                                         */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tag_layout.h b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tag_layout.h
index 33a5d6d..d925d74 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tag_layout.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tag_layout.h
@@ -39,7 +39,7 @@
 /* ******************************** */
 /* Tag Manipulation inlines         */
 /* ******************************** */
-static inline uint64_t init_sendtag(MPIR_Context_id_t contextid, int source, int tag, uint64_t type)
+static inline uint64_t init_sendtag(MPIU_Context_id_t contextid, int source, int tag, uint64_t type)
 {
     uint64_t match_bits = 0;
     match_bits |= ((uint64_t)source) << MPID_SOURCE_SHIFT;
@@ -50,7 +50,7 @@ static inline uint64_t init_sendtag(MPIR_Context_id_t contextid, int source, int
 
 /* receive posting */
 static inline uint64_t init_recvtag(uint64_t * mask_bits,
-                                    MPIR_Context_id_t contextid, int source, int tag)
+                                    MPIU_Context_id_t contextid, int source, int tag)
 {
     uint64_t match_bits = 0;
     *mask_bits = MPID_SYNC_SEND;
@@ -112,7 +112,7 @@ static inline int get_port(uint64_t match_bits)
 /* ******************************** */
 /* Tag Manipulation inlines         */
 /* ******************************** */
-static inline uint64_t init_sendtag_2(MPIR_Context_id_t contextid, int tag, uint64_t type)
+static inline uint64_t init_sendtag_2(MPIU_Context_id_t contextid, int tag, uint64_t type)
 {
     uint64_t match_bits = 0;
     match_bits |= ((uint64_t)contextid) << MPID_CTXID_SHIFT;
@@ -122,7 +122,7 @@ static inline uint64_t init_sendtag_2(MPIR_Context_id_t contextid, int tag, uint
 
 /* receive posting */
 static inline uint64_t init_recvtag_2(uint64_t * mask_bits,
-                                    MPIR_Context_id_t contextid, int tag)
+                                    MPIU_Context_id_t contextid, int tag)
 {
     uint64_t match_bits = 0;
     *mask_bits = MPID_SYNC_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 02ffcb1..d7003f0 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
@@ -276,7 +276,7 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPID_Reques
     MPIDI_msg_sz_t data_sz;
     MPI_Aint dt_true_lb;
     MPID_Datatype *dt_ptr;
-    MPIR_Context_id_t context_id;
+    MPIU_Context_id_t context_id;
     char *recv_buffer;
     BEGIN_FUNC(FCNAME);
 
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 0f0cc64..43f6020 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
@@ -177,9 +177,9 @@ int MPID_nem_ptl_init_id(MPIDI_VC_t *vc);
 int MPID_nem_ptl_get_ordering(int *ordering);
 
 int MPID_nem_ptl_lmt_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID_Request *req);
-int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPID_IOV s_cookie);
-int MPID_nem_ptl_lmt_start_send(MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV r_cookie);
-int MPID_nem_ptl_lmt_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV s_cookie);
+int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPL_IOV s_cookie);
+int MPID_nem_ptl_lmt_start_send(MPIDI_VC_t *vc, MPID_Request *sreq, MPL_IOV r_cookie);
+int MPID_nem_ptl_lmt_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie);
 int MPID_nem_ptl_lmt_done_send(MPIDI_VC_t *vc, MPID_Request *req);
 int MPID_nem_ptl_lmt_done_recv(MPIDI_VC_t *vc, MPID_Request *req);
 
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c
index 2a41823..88dd68d 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_init.c
@@ -160,10 +160,10 @@ static int ptl_init(MPIDI_PG_t *pg_p, int pg_rank, char **bc_val_p, int *val_max
     MPIU_Assert(sizeof(MPID_nem_ptl_req_area) <= MPIDI_NEM_REQ_NETMOD_AREA_LEN);
 
     /* Make sure our IOV is the same as portals4's IOV */
-    MPIU_Assert(sizeof(ptl_iovec_t) == sizeof(MPID_IOV));
-    MPIU_Assert(((void*)&(((ptl_iovec_t*)0)->iov_base)) == ((void*)&(((MPID_IOV*)0)->MPID_IOV_BUF)));
-    MPIU_Assert(((void*)&(((ptl_iovec_t*)0)->iov_len))  == ((void*)&(((MPID_IOV*)0)->MPID_IOV_LEN)));
-    MPIU_Assert(sizeof(((ptl_iovec_t*)0)->iov_len) == sizeof(((MPID_IOV*)0)->MPID_IOV_LEN));
+    MPIU_Assert(sizeof(ptl_iovec_t) == sizeof(MPL_IOV));
+    MPIU_Assert(((void*)&(((ptl_iovec_t*)0)->iov_base)) == ((void*)&(((MPL_IOV*)0)->MPL_IOV_BUF)));
+    MPIU_Assert(((void*)&(((ptl_iovec_t*)0)->iov_len))  == ((void*)&(((MPL_IOV*)0)->MPL_IOV_LEN)));
+    MPIU_Assert(sizeof(((ptl_iovec_t*)0)->iov_len) == sizeof(((MPL_IOV*)0)->MPL_IOV_LEN));
             
 
     mpi_errno = MPIDI_CH3I_Register_anysource_notification(MPID_nem_ptl_anysource_posted, MPID_nem_ptl_anysource_matched);
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_lmt.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_lmt.c
index 7979db8..3847617 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_lmt.c
@@ -22,7 +22,7 @@ int MPID_nem_ptl_lmt_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID
 
 
 /* The following function is implemented in ptl_recv.c to make use of the handlers defined there */
-/* int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPID_IOV s_cookie) */
+/* int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPL_IOV s_cookie) */
 
 
 
@@ -30,7 +30,7 @@ int MPID_nem_ptl_lmt_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *rts_pkt, MPID
 #define FUNCNAME MPID_nem_ptl_lmt_start_send
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_nem_ptl_lmt_start_send(MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV r_cookie)
+int MPID_nem_ptl_lmt_start_send(MPIDI_VC_t *vc, MPID_Request *sreq, MPL_IOV r_cookie)
 {
     MPIU_Assertp(0 && "This function shouldn't be called.");
     return MPI_ERR_INTERN;
@@ -41,7 +41,7 @@ int MPID_nem_ptl_lmt_start_send(MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV r_c
 #define FUNCNAME MPID_nem_ptl_lmt_handle_cookie
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_nem_ptl_lmt_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV s_cookie)
+int MPID_nem_ptl_lmt_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie)
 {
     MPIU_Assertp(0 && "This function shouldn't be called.");
     return MPI_ERR_INTERN;
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 8d87025..41f0d5d 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
@@ -615,7 +615,7 @@ int MPID_nem_ptl_nm_ctl_event_handler(const ptl_event_t *e)
         break;
 
     default:
-        MPIU_Error_printf("Received unexpected event type: %d %s\n", e->type, MPID_nem_ptl_strevent(e));
+        MPL_error_printf("Received unexpected event type: %d %s\n", e->type, MPID_nem_ptl_strevent(e));
         MPIU_ERR_INTERNALANDJUMP(mpi_errno, "Unexpected event type");
         break;
     }
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c
index 1ba997e..e726610 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_poll.c
@@ -204,7 +204,7 @@ int MPID_nem_ptl_poll(int is_blocking_poll)
             break;
         case PTL_EVENT_ACK:
         default:
-            MPIU_Error_printf("Received unexpected event type: %d %s", event.type, MPID_nem_ptl_strevent(&event));
+            MPL_error_printf("Received unexpected event type: %d %s", event.type, MPID_nem_ptl_strevent(&event));
             MPIU_ERR_INTERNALANDJUMP(mpi_errno, "Unexpected event type");
         }
     }
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 588fc0a..2282ea9 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
@@ -324,7 +324,7 @@ static int handler_recv_dequeue_large(const ptl_event_t *e)
     /* noncontig recv buffer */
     
     last = rreq->dev.segment_size;
-    rreq->dev.iov_count = MPID_IOV_LIMIT;
+    rreq->dev.iov_count = MPL_IOV_LIMIT;
     MPID_Segment_pack_vector(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.iov, &rreq->dev.iov_count);
 
     if (last == rreq->dev.segment_size && rreq->dev.segment_size <= MPIDI_nem_ptl_ni_limits.max_msg_size + PTL_LARGE_THRESHOLD) {
@@ -492,7 +492,7 @@ int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
             rreq->dev.segment_size = data_sz;
 
             last = rreq->dev.segment_size;
-            rreq->dev.iov_count = MPID_IOV_LIMIT;
+            rreq->dev.iov_count = MPL_IOV_LIMIT;
             MPID_Segment_pack_vector(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.iov, &rreq->dev.iov_count);
 
             if (last == rreq->dev.segment_size) {
@@ -530,7 +530,7 @@ int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
             rreq->dev.segment_size = data_sz;
 
             last = PTL_LARGE_THRESHOLD;
-            rreq->dev.iov_count = MPID_IOV_LIMIT;
+            rreq->dev.iov_count = MPL_IOV_LIMIT;
             MPID_Segment_pack_vector(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.iov, &rreq->dev.iov_count);
 
             if (last == PTL_LARGE_THRESHOLD) {
@@ -681,7 +681,7 @@ int MPID_nem_ptl_cancel_recv(MPIDI_VC_t *vc,  MPID_Request *rreq)
 #define FUNCNAME MPID_nem_ptl_lmt_start_recv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPID_IOV s_cookie)
+int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPL_IOV s_cookie)
 {
     /* This function should only be called as a result of an Mrecv because of the CH3 protocol for
        Rendezvous Mrecvs. The regular CH3 protocol is not optimal for portals, since we don't need
@@ -737,7 +737,7 @@ int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPID_IOV s_
         MPIU_Assert(last == PTL_LARGE_THRESHOLD);
         rreq->dev.segment_first = PTL_LARGE_THRESHOLD;
         last = rreq->dev.segment_size;
-        rreq->dev.iov_count = MPID_IOV_LIMIT;
+        rreq->dev.iov_count = MPL_IOV_LIMIT;
         MPID_Segment_pack_vector(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.iov,
                                  &rreq->dev.iov_count);
         if (last == rreq->dev.segment_size && last <= MPIDI_nem_ptl_ni_limits.max_msg_size + PTL_LARGE_THRESHOLD) {
@@ -768,7 +768,7 @@ int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPID_IOV s_
         }
     }
     MPIU_Free(rreq->dev.tmpbuf);
-    rreq->ch.lmt_tmp_cookie.MPID_IOV_LEN = 0;  /* Required for do_cts in mpid_nem_lmt.c */
+    rreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = 0;  /* Required for do_cts in mpid_nem_lmt.c */
 
  fn_exit:
     MPIU_CHKPMEM_COMMIT();
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 959f278..e0e432b 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
@@ -171,7 +171,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
         sreq->dev.segment_size = data_sz;
 
         last = sreq->dev.segment_size;
-        sreq->dev.iov_count = MPID_IOV_LIMIT;
+        sreq->dev.iov_count = MPL_IOV_LIMIT;
         MPID_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, sreq->dev.iov, &sreq->dev.iov_count);
 
         if (last == sreq->dev.segment_size) {
@@ -236,7 +236,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
     sreq->dev.segment_size = data_sz;
 
     last = PTL_LARGE_THRESHOLD;
-    sreq->dev.iov_count = MPID_IOV_LIMIT;
+    sreq->dev.iov_count = MPL_IOV_LIMIT;
     MPID_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, sreq->dev.iov, &sreq->dev.iov_count);
 
     initial_iov_count = sreq->dev.iov_count;
@@ -245,9 +245,9 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
     if (last == PTL_LARGE_THRESHOLD) {
         /* first chunk of message fits into IOV */
         MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "    first chunk fits in IOV");
-        if (initial_iov_count < MPID_IOV_LIMIT) {
+        if (initial_iov_count < MPL_IOV_LIMIT) {
             /* There may be space for the rest of the message in this IOV */
-            sreq->dev.iov_count = MPID_IOV_LIMIT - sreq->dev.iov_count;
+            sreq->dev.iov_count = MPL_IOV_LIMIT - sreq->dev.iov_count;
             last = sreq->dev.segment_size;
                     
             MPID_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, &last,
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/rptl.h b/src/mpid/ch3/channels/nemesis/netmod/portals4/rptl.h
index c57b8dd..a35e9ac 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/rptl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/rptl.h
@@ -24,8 +24,8 @@
 #define RPTLU_ERR_POP(ret, ...)                                         \
     {                                                                   \
         if (ret) {                                                      \
-            MPIU_Error_printf("%s (%d): ", RPTLU_FUNC, __LINE__);       \
-            MPIU_Error_printf(__VA_ARGS__);                             \
+            MPL_error_printf("%s (%d): ", RPTLU_FUNC, __LINE__);       \
+            MPL_error_printf(__VA_ARGS__);                             \
             goto fn_fail;                                               \
         }                                                               \
     }
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
index 337fa4e..0b66ef6 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c
@@ -480,9 +480,9 @@ static int send_id_info(const sockconn_t *const sc)
     hdr.datalen = sizeof(MPIDI_nem_tcp_idinfo_t) + pg_id_len;    
     id_info.pg_rank = MPIDI_Process.my_pg_rank;
 
-    iov[0].iov_base = (MPID_IOV_BUF_CAST)&hdr;
+    iov[0].iov_base = (MPL_IOV_BUF_CAST)&hdr;
     iov[0].iov_len = sizeof(hdr);
-    iov[1].iov_base = (MPID_IOV_BUF_CAST)&id_info;
+    iov[1].iov_base = (MPL_IOV_BUF_CAST)&id_info;
     iov[1].iov_len = sizeof(id_info);
     buf_size = sizeof(hdr) + sizeof(id_info);
 
@@ -537,9 +537,9 @@ static int send_tmpvc_info(const sockconn_t *const sc)
     hdr.datalen = sizeof(MPIDI_nem_tcp_portinfo_t);
     port_info.port_name_tag = sc->vc->port_name_tag;
 
-    iov[0].iov_base = (MPID_IOV_BUF_CAST)&hdr;
+    iov[0].iov_base = (MPL_IOV_BUF_CAST)&hdr;
     iov[0].iov_len = sizeof(hdr);
-    iov[1].iov_base = (MPID_IOV_BUF_CAST)&port_info;
+    iov[1].iov_base = (MPL_IOV_BUF_CAST)&port_info;
     iov[1].iov_len = sizeof(port_info);
     buf_size = sizeof(hdr) + sizeof(port_info);
     
@@ -1575,11 +1575,11 @@ static int MPID_nem_tcp_recv_handler(sockconn_t *const sc)
         /* there is a pending receive, receive it directly into the user buffer */
         MPIDI_CH3I_VC *const sc_vc_ch = &sc_vc->ch;
         MPID_Request *const rreq = sc_vc_ch->recv_active;
-        MPID_IOV *iov = &rreq->dev.iov[rreq->dev.iov_offset];
+        MPL_IOV *iov = &rreq->dev.iov[rreq->dev.iov_offset];
         int (*reqFn)(MPIDI_VC_t *, MPID_Request *, int *);
 
         MPIU_Assert(rreq->dev.iov_count > 0);
-        MPIU_Assert(rreq->dev.iov_count + rreq->dev.iov_offset <= MPID_IOV_LIMIT);
+        MPIU_Assert(rreq->dev.iov_count + rreq->dev.iov_offset <= MPL_IOV_LIMIT);
 
         bytes_recvd = MPL_large_readv(sc_fd, iov, rreq->dev.iov_count);
         if (bytes_recvd <= 0)
@@ -1599,18 +1599,18 @@ static int MPID_nem_tcp_recv_handler(sockconn_t *const sc)
         /* update the iov */
         for (iov = &rreq->dev.iov[rreq->dev.iov_offset]; iov < &rreq->dev.iov[rreq->dev.iov_offset + rreq->dev.iov_count]; ++iov)
         {
-            if (bytes_recvd < iov->MPID_IOV_LEN)
+            if (bytes_recvd < iov->MPL_IOV_LEN)
             {
-                iov->MPID_IOV_BUF = (char *)iov->MPID_IOV_BUF + bytes_recvd;
-                iov->MPID_IOV_LEN -= bytes_recvd;
+                iov->MPL_IOV_BUF = (char *)iov->MPL_IOV_BUF + bytes_recvd;
+                iov->MPL_IOV_LEN -= bytes_recvd;
                 rreq->dev.iov_count = (int)(&rreq->dev.iov[rreq->dev.iov_offset + rreq->dev.iov_count] - iov);
                 rreq->dev.iov_offset = iov - rreq->dev.iov;
                 MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "bytes_recvd = %ld", (long int)bytes_recvd);
-                MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "iov len = %ld", (long int)iov->MPID_IOV_LEN);
+                MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "iov len = %ld", (long int)iov->MPL_IOV_LEN);
                 MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "iov_offset = %lld", (long long)rreq->dev.iov_offset);
                 goto fn_exit;
             }
-            bytes_recvd -= iov->MPID_IOV_LEN;
+            bytes_recvd -= iov->MPL_IOV_LEN;
         }
         
         /* the whole iov has been received */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
index 9cbcf5b..9cb8115 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c
@@ -329,7 +329,7 @@ static int GetSockInterfaceAddr(int myRank, char *ifname, int maxIfname,
 	   environment to each process.  There's no way to do this with
            the param interface, so we need to use getenv() here. */
 	char namebuf[1024];
-	MPIU_Snprintf( namebuf, sizeof(namebuf), 
+	MPL_snprintf( namebuf, sizeof(namebuf), 
 		       "MPICH_INTERFACE_HOSTNAME_R%d", myRank );
 	ifname_string = getenv( namebuf );
 
@@ -440,7 +440,7 @@ int MPID_nem_tcp_get_business_card (int my_rank, char **bc_val_p, int *val_max_s
     {
         unsigned char *p;
         p = (unsigned char *)(ifaddr.ifaddr);
-        MPIU_Snprintf( ifname, sizeof(ifname), "%u.%u.%u.%u", p[0], p[1], p[2], p[3] );
+        MPL_snprintf( ifname, sizeof(ifname), "%u.%u.%u.%u", p[0], p[1], p[2], p[3] );
         MPIU_DBG_MSG_S(CH3_CONNECT,VERBOSE,"ifname = %s",ifname );
         str_errno = MPIU_Str_add_string_arg(bc_val_p, val_max_sz_p, MPIDI_CH3I_IFNAME_KEY, ifname);
         if (str_errno) {
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 f590442..81f0850 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_send.c
@@ -72,7 +72,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;
-    MPID_IOV *iov;
+    MPL_IOV *iov;
     int complete;
     MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TCP_SEND_QUEUED);
@@ -123,17 +123,17 @@ int MPID_nem_tcp_send_queued(MPIDI_VC_t *vc, MPIDI_nem_tcp_request_queue_t *send
         complete = 1;
         for (iov = &sreq->dev.iov[sreq->dev.iov_offset]; iov < &sreq->dev.iov[sreq->dev.iov_offset + sreq->dev.iov_count]; ++iov)
         {
-            if (offset < iov->MPID_IOV_LEN)
+            if (offset < iov->MPL_IOV_LEN)
             {
-                iov->MPID_IOV_BUF = (char *)iov->MPID_IOV_BUF + offset;
-                iov->MPID_IOV_LEN -= offset;
+                iov->MPL_IOV_BUF = (char *)iov->MPL_IOV_BUF + offset;
+                iov->MPL_IOV_LEN -= offset;
                 /* iov_count should be equal to the number of iov's remaining */
                 sreq->dev.iov_count -= ((iov - sreq->dev.iov) - sreq->dev.iov_offset);
                 sreq->dev.iov_offset = iov - sreq->dev.iov;
                 complete = 0;
                 break;
             }
-            offset -= iov->MPID_IOV_LEN;
+            offset -= iov->MPL_IOV_LEN;
         }
         if (!complete)
         {
@@ -253,12 +253,12 @@ int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_s
         {
             if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue))
             {
-                MPID_IOV iov[2];
+                MPL_IOV iov[2];
                 
-                iov[0].MPID_IOV_BUF = hdr;
-                iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
-                iov[1].MPID_IOV_BUF = data;
-                iov[1].MPID_IOV_LEN = data_sz;
+                iov[0].MPL_IOV_BUF = hdr;
+                iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
+                iov[1].MPL_IOV_BUF = data;
+                iov[1].MPL_IOV_LEN = data_sz;
                 
                 offset = MPL_large_writev(sc->fd, iov, 2);
                 if (offset == 0) {
@@ -318,12 +318,12 @@ int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_s
     if (offset < sizeof(MPIDI_CH3_Pkt_t))
     {
         sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)hdr;
-        sreq->dev.iov[0].MPID_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset;
-        sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset ;
+        sreq->dev.iov[0].MPL_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset;
+        sreq->dev.iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset ;
         if (data_sz)
         {
-            sreq->dev.iov[1].MPID_IOV_BUF = data;
-            sreq->dev.iov[1].MPID_IOV_LEN = data_sz;
+            sreq->dev.iov[1].MPL_IOV_BUF = data;
+            sreq->dev.iov[1].MPL_IOV_LEN = data_sz;
             sreq->dev.iov_count = 2;
         }
         else
@@ -331,12 +331,12 @@ int MPID_nem_tcp_iStartContigMsg(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_s
     }
     else
     {
-        sreq->dev.iov[0].MPID_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t));
-        sreq->dev.iov[0].MPID_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t));
+        sreq->dev.iov[0].MPL_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t));
+        sreq->dev.iov[0].MPL_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t));
         sreq->dev.iov_count = 1;
     }
     
-    MPIU_Assert(sreq->dev.iov_count >= 1 && sreq->dev.iov[0].MPID_IOV_LEN > 0);
+    MPIU_Assert(sreq->dev.iov_count >= 1 && sreq->dev.iov[0].MPL_IOV_LEN > 0);
 
     if (MPID_nem_tcp_vc_send_paused(vc_tcp)) {
         MPIDI_CH3I_Sendq_enqueue(&vc_tcp->paused_send_queue, sreq);
@@ -392,12 +392,12 @@ int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_
     {
         if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue))
         {
-            MPID_IOV iov[2];
+            MPL_IOV iov[2];
                 
-            iov[0].MPID_IOV_BUF = hdr;
-            iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
-            iov[1].MPID_IOV_BUF = data;
-            iov[1].MPID_IOV_LEN = data_sz;
+            iov[0].MPL_IOV_BUF = hdr;
+            iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
+            iov[1].MPL_IOV_BUF = data;
+            iov[1].MPL_IOV_LEN = data_sz;
                 
             offset = MPL_large_writev(sc->fd, iov, 2);
             if (offset == 0) {
@@ -457,12 +457,12 @@ int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_
     if (offset < sizeof(MPIDI_CH3_Pkt_t))
     {
         sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)hdr;
-        sreq->dev.iov[0].MPID_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset;
-        sreq->dev.iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset ;
+        sreq->dev.iov[0].MPL_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset;
+        sreq->dev.iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset ;
         if (data_sz)
         {
-            sreq->dev.iov[1].MPID_IOV_BUF = data;
-            sreq->dev.iov[1].MPID_IOV_LEN = data_sz;
+            sreq->dev.iov[1].MPL_IOV_BUF = data;
+            sreq->dev.iov[1].MPL_IOV_LEN = data_sz;
             sreq->dev.iov_count = 2;
         }
         else
@@ -470,12 +470,12 @@ int MPID_nem_tcp_iStartContigMsg_paused(MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_
     }
     else
     {
-        sreq->dev.iov[0].MPID_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t));
-        sreq->dev.iov[0].MPID_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t));
+        sreq->dev.iov[0].MPL_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t));
+        sreq->dev.iov[0].MPL_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t));
         sreq->dev.iov_count = 1;
     }
     
-    MPIU_Assert(sreq->dev.iov_count >= 1 && sreq->dev.iov[0].MPID_IOV_LEN > 0);
+    MPIU_Assert(sreq->dev.iov_count >= 1 && sreq->dev.iov[0].MPL_IOV_LEN > 0);
 
     if (MPID_nem_tcp_vc_is_connected(vc_tcp)) {
         if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue)) {
@@ -527,21 +527,21 @@ int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPID
         {
             if (MPIDI_CH3I_Sendq_empty(vc_tcp->send_queue))
             {
-                MPID_IOV iov[3];
+                MPL_IOV iov[3];
                 int iov_n = 0;
 
-                iov[iov_n].MPID_IOV_BUF = hdr;
-                iov[iov_n].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
+                iov[iov_n].MPL_IOV_BUF = hdr;
+                iov[iov_n].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
                 iov_n++;
 
                 if (sreq->dev.ext_hdr_sz != 0) {
-                    iov[iov_n].MPID_IOV_BUF = sreq->dev.ext_hdr_ptr;
-                    iov[iov_n].MPID_IOV_LEN = sreq->dev.ext_hdr_sz;
+                    iov[iov_n].MPL_IOV_BUF = sreq->dev.ext_hdr_ptr;
+                    iov[iov_n].MPL_IOV_LEN = sreq->dev.ext_hdr_sz;
                     iov_n++;
                 }
 
-                iov[iov_n].MPID_IOV_BUF = data;
-                iov[iov_n].MPID_IOV_LEN = data_sz;
+                iov[iov_n].MPL_IOV_BUF = data;
+                iov[iov_n].MPL_IOV_LEN = data_sz;
                 iov_n++;
                 
                 offset = MPL_large_writev(sc->fd, iov, iov_n);
@@ -620,46 +620,46 @@ int MPID_nem_tcp_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPID
     {
         sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)hdr;
 
-        sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset;
-        sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset;
+        sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = (char *)&sreq->dev.pending_pkt + offset;
+        sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t) - offset;
         sreq->dev.iov_count++;
 
         if (sreq->dev.ext_hdr_sz > 0) {
-            sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_BUF = sreq->dev.ext_hdr_ptr;
-            sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_LEN = sreq->dev.ext_hdr_sz;
+            sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = sreq->dev.ext_hdr_ptr;
+            sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = sreq->dev.ext_hdr_sz;
             sreq->dev.iov_count++;
         }
 
         if (data_sz)
         {
-            sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_BUF = data;
-            sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_LEN = data_sz;
+            sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = data;
+            sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = data_sz;
             sreq->dev.iov_count++;
         }
     }
     else if (offset < sizeof(MPIDI_CH3_Pkt_t) + sreq->dev.ext_hdr_sz) {
         MPIU_Assert(sreq->dev.ext_hdr_sz > 0);
-        sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_BUF = sreq->dev.ext_hdr_ptr;
-        sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_LEN = sreq->dev.ext_hdr_sz;
+        sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = sreq->dev.ext_hdr_ptr;
+        sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = sreq->dev.ext_hdr_sz;
         sreq->dev.iov_count++;
 
         if (data_sz) {
-            sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_BUF = data;
-            sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_LEN = data_sz;
+            sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = data;
+            sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = data_sz;
             sreq->dev.iov_count++;
         }
     }
     else
     {
-        sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t) - sreq->dev.ext_hdr_sz);
-        sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t) - sreq->dev.ext_hdr_sz);
+        sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = (char *)data + (offset - sizeof(MPIDI_CH3_Pkt_t) - sreq->dev.ext_hdr_sz);
+        sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = data_sz - (offset - sizeof(MPIDI_CH3_Pkt_t) - sreq->dev.ext_hdr_sz);
         sreq->dev.iov_count++;
     }
 
 enqueue_request:
     /* enqueue request */
     MPIU_DBG_MSG (CH3_CHANNEL, VERBOSE, "enqueuing");
-    MPIU_Assert(sreq->dev.iov_count >= 1 && sreq->dev.iov[0].MPID_IOV_LEN > 0);
+    MPIU_Assert(sreq->dev.iov_count >= 1 && sreq->dev.iov[0].MPL_IOV_LEN > 0);
 
     sreq->ch.vc = vc;
     sreq->dev.iov_offset = 0;
@@ -699,8 +699,8 @@ int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header,
 {
     int mpi_errno = MPI_SUCCESS;
     int iov_n;
-    MPID_IOV iov[MPID_IOV_LIMIT];
-    MPID_IOV *iov_p;
+    MPL_IOV iov[MPL_IOV_LIMIT];
+    MPL_IOV *iov_p;
     MPIDI_msg_sz_t offset;
     int complete;
     MPID_nem_tcp_vc_area *vc_tcp = VC_TCP(vc);
@@ -713,13 +713,13 @@ int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header,
 
     iov_n = 0;
 
-    iov[iov_n].MPID_IOV_BUF = header;
-    iov[iov_n].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
+    iov[iov_n].MPL_IOV_BUF = header;
+    iov[iov_n].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
     iov_n++;
 
     if (sreq->dev.ext_hdr_ptr != NULL) {
-        iov[iov_n].MPID_IOV_BUF = sreq->dev.ext_hdr_ptr;
-        iov[iov_n].MPID_IOV_LEN = sreq->dev.ext_hdr_sz;
+        iov[iov_n].MPL_IOV_BUF = sreq->dev.ext_hdr_ptr;
+        iov[iov_n].MPL_IOV_LEN = sreq->dev.ext_hdr_sz;
         iov_n++;
     }
 
@@ -772,12 +772,12 @@ int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header,
         }
     }
     
-    if (offset < iov[0].MPID_IOV_LEN)
+    if (offset < iov[0].MPL_IOV_LEN)
     {
         /* header was not yet sent, save it in req */
         sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *)header;
-        iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)&sreq->dev.pending_pkt;
-        iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
+        iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)&sreq->dev.pending_pkt;
+        iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
     }
 
     /* check if whole iov was sent, and save any unsent portion of iov */
@@ -785,16 +785,16 @@ int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header,
     complete = 1;
     for (iov_p = &iov[0]; iov_p < &iov[iov_n]; ++iov_p)
     {
-        if (offset < iov_p->MPID_IOV_LEN)
+        if (offset < iov_p->MPL_IOV_LEN)
         {
-            sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)((char *)iov_p->MPID_IOV_BUF + offset);
-            sreq->dev.iov[sreq->dev.iov_count].MPID_IOV_LEN = iov_p->MPID_IOV_LEN - offset;
+            sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)((char *)iov_p->MPL_IOV_BUF + offset);
+            sreq->dev.iov[sreq->dev.iov_count].MPL_IOV_LEN = iov_p->MPL_IOV_LEN - offset;
             offset = 0;
             ++sreq->dev.iov_count;
             complete = 0;
         }
         else
-            offset -= iov_p->MPID_IOV_LEN;
+            offset -= iov_p->MPL_IOV_LEN;
     }
         
     if (complete)
@@ -826,7 +826,7 @@ int MPID_nem_tcp_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *header,
         
     /* enqueue request */
     MPIU_DBG_MSG (CH3_CHANNEL, VERBOSE, "enqueuing");
-    MPIU_Assert(sreq->dev.iov_count >= 1 && sreq->dev.iov[0].MPID_IOV_LEN > 0);
+    MPIU_Assert(sreq->dev.iov_count >= 1 && sreq->dev.iov[0].MPL_IOV_LEN > 0);
         
     sreq->ch.vc = vc;
     sreq->dev.iov_offset = 0;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_isend.c b/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
index 267d4ed..4a1dee3 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
@@ -100,8 +100,8 @@ int MPIDI_CH3_iSend (MPIDI_VC_t *vc, MPID_Request *sreq, void * hdr, MPIDI_msg_s
     MPIDI_DBG_PRINTF((55, FCNAME, "enqueuing"));
 
     sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr;
-    sreq->dev.iov[0].MPID_IOV_BUF = (char *) &sreq->dev.pending_pkt;
-    sreq->dev.iov[0].MPID_IOV_LEN = hdr_sz;
+    sreq->dev.iov[0].MPL_IOV_BUF = (char *) &sreq->dev.pending_pkt;
+    sreq->dev.iov[0].MPL_IOV_LEN = hdr_sz;
     sreq->dev.iov_count = 1;
     sreq->dev.iov_offset = 0;
     sreq->ch.noncontig = FALSE;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c b/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
index 765b9ed..0ccacf4 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
@@ -17,7 +17,7 @@ extern void *MPIDI_CH3_packet_buffer;
 #define FUNCNAME MPIDI_CH3_iSendv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV *iov, int n_iov)
+int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPL_IOV *iov, int n_iov)
 {
     int mpi_errno = MPI_SUCCESS;
     int again = 0;
@@ -42,10 +42,10 @@ int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV *iov, int n_i
         switch (n_iov)
         {
         case 1:
-            mpi_errno = vc_ch->iSendContig(vc, sreq, iov[0].MPID_IOV_BUF, iov[0].MPID_IOV_LEN, NULL, 0);
+            mpi_errno = vc_ch->iSendContig(vc, sreq, iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN, NULL, 0);
             break;
         case 2:
-            mpi_errno = vc_ch->iSendContig(vc, sreq, iov[0].MPID_IOV_BUF, iov[0].MPID_IOV_LEN, iov[1].MPID_IOV_BUF, iov[1].MPID_IOV_LEN);
+            mpi_errno = vc_ch->iSendContig(vc, sreq, iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN, iov[1].MPL_IOV_BUF, iov[1].MPL_IOV_LEN);
             break;
         default:
             mpi_errno = MPID_nem_send_iov(vc, &sreq, iov, n_iov);
@@ -55,20 +55,20 @@ int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV *iov, int n_i
     }
 
     /*MPIU_Assert(vc_ch->is_local); */
-    MPIU_Assert(n_iov <= MPID_IOV_LIMIT);
-    MPIU_Assert(iov[0].MPID_IOV_LEN <= sizeof(MPIDI_CH3_Pkt_t));
+    MPIU_Assert(n_iov <= MPL_IOV_LIMIT);
+    MPIU_Assert(iov[0].MPL_IOV_LEN <= sizeof(MPIDI_CH3_Pkt_t));
 
     /* The channel uses a fixed length header, the size of which is
      * the maximum of all possible packet headers */
-    iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
-    MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *)iov[0].MPID_IOV_BUF);
+    iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
+    MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *)iov[0].MPL_IOV_BUF);
 
     MPIU_THREAD_CS_ENTER(MPIDCOMM,);
     in_cs = TRUE;
 
     if (MPIDI_CH3I_Sendq_empty(MPIDI_CH3I_shm_sendq))
     {
-	MPID_IOV *remaining_iov = iov;
+	MPL_IOV *remaining_iov = iov;
 	int remaining_n_iov = n_iov;
 
         MPIU_DBG_MSG (CH3_CHANNEL, VERBOSE, "iSendv");
@@ -88,21 +88,21 @@ int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV *iov, int n_i
 	    {
 		/* header was not sent */
 		sreq->dev.pending_pkt =
-		    *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF;
-		sreq->dev.iov[0].MPID_IOV_BUF = (char *) &sreq->dev.pending_pkt;
-		sreq->dev.iov[0].MPID_IOV_LEN = iov[0].MPID_IOV_LEN;
+		    *(MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF;
+		sreq->dev.iov[0].MPL_IOV_BUF = (char *) &sreq->dev.pending_pkt;
+		sreq->dev.iov[0].MPL_IOV_LEN = iov[0].MPL_IOV_LEN;
 	    }
 	    else
 	    {
 		sreq->dev.iov[0] = remaining_iov[0];
 	    }
             MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "  out of cells. remaining iov:");
-            MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "    %ld", (long int)sreq->dev.iov[0].MPID_IOV_LEN);
+            MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "    %ld", (long int)sreq->dev.iov[0].MPL_IOV_LEN);
 
 	    for (j = 1; j < remaining_n_iov; ++j)
 	    {
 		sreq->dev.iov[j] = remaining_iov[j];
-                MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "    %ld", (long int)remaining_iov[j].MPID_IOV_LEN);
+                MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "    %ld", (long int)remaining_iov[j].MPL_IOV_LEN);
 	    }
 	    sreq->dev.iov_offset = 0;
 	    sreq->dev.iov_count = remaining_n_iov;
@@ -162,9 +162,9 @@ int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV *iov, int n_i
 	
 	MPIDI_DBG_PRINTF((55, FCNAME, "enqueuing"));
 	
-	sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF;
-	sreq->dev.iov[0].MPID_IOV_BUF = (char *) &sreq->dev.pending_pkt;
-	sreq->dev.iov[0].MPID_IOV_LEN = iov[0].MPID_IOV_LEN;
+	sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF;
+	sreq->dev.iov[0].MPL_IOV_BUF = (char *) &sreq->dev.pending_pkt;
+	sreq->dev.iov[0].MPL_IOV_LEN = iov[0].MPL_IOV_LEN;
 
 	for (i = 1; i < n_iov; i++)
 	{
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
index 3bb91aa..f5d0ebb 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
@@ -95,8 +95,8 @@ int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, MPID_
 	sreq->kind = MPID_REQUEST_SEND;
 
 	sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr;
-	sreq->dev.iov[0].MPID_IOV_BUF = (char *) &sreq->dev.pending_pkt;
-	sreq->dev.iov[0].MPID_IOV_LEN = hdr_sz;
+	sreq->dev.iov[0].MPL_IOV_BUF = (char *) &sreq->dev.pending_pkt;
+	sreq->dev.iov[0].MPL_IOV_LEN = hdr_sz;
 	sreq->dev.iov_count = 1;
 	sreq->dev.iov_offset = 0;
         sreq->ch.noncontig = FALSE;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
index 54835c2..22d2666 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
@@ -24,13 +24,13 @@
 
 /* NOTE - The completion action associated with a request created by CH3_iStartMsgv() is alway null (onDataAvail = 0).  This
    implies that CH3_iStartMsgv() can only be used when the entire message can be described by a single iovec of size
-   MPID_IOV_LIMIT. */
+   MPL_IOV_LIMIT. */
 
 #undef FUNCNAME
 #define FUNCNAME MPIDI_CH3_iStartMsgv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPID_IOV *iov, int n_iov, MPID_Request **sreq_ptr)
+int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPL_IOV *iov, int n_iov, MPID_Request **sreq_ptr)
 {
     MPID_Request * sreq = *sreq_ptr = NULL;
     int mpi_errno = MPI_SUCCESS;
@@ -49,11 +49,11 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPID_IOV *iov, int n_iov, MPID_Request
         switch (n_iov)
         {
         case 1:
-            mpi_errno = vc->ch.iStartContigMsg(vc, iov[0].MPID_IOV_BUF, iov[0].MPID_IOV_LEN, NULL, 0, sreq_ptr);
+            mpi_errno = vc->ch.iStartContigMsg(vc, iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN, NULL, 0, sreq_ptr);
             break;
         case 2:
-            mpi_errno = vc->ch.iStartContigMsg(vc, iov[0].MPID_IOV_BUF, iov[0].MPID_IOV_LEN,
-                                               iov[1].MPID_IOV_BUF, iov[1].MPID_IOV_LEN, sreq_ptr);
+            mpi_errno = vc->ch.iStartContigMsg(vc, iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN,
+                                               iov[1].MPL_IOV_BUF, iov[1].MPL_IOV_LEN, sreq_ptr);
             break;
         default:
             mpi_errno = MPID_nem_send_iov(vc, &sreq, iov, n_iov);
@@ -63,13 +63,13 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPID_IOV *iov, int n_iov, MPID_Request
         goto fn_exit;
     }
 
-    MPIU_Assert (n_iov <= MPID_IOV_LIMIT);
-    MPIU_Assert (iov[0].MPID_IOV_LEN <= sizeof(MPIDI_CH3_Pkt_t));
+    MPIU_Assert (n_iov <= MPL_IOV_LIMIT);
+    MPIU_Assert (iov[0].MPL_IOV_LEN <= sizeof(MPIDI_CH3_Pkt_t));
 
     /* The channel uses a fixed length header, the size of which is
      * the maximum of all possible packet headers */
-    iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
-    MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t*)iov[0].MPID_IOV_BUF);
+    iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
+    MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t*)iov[0].MPL_IOV_BUF);
 
     MPIU_THREAD_CS_ENTER(MPIDCOMM,);
     in_cs = TRUE;
@@ -77,7 +77,7 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPID_IOV *iov, int n_iov, MPID_Request
     if (MPIDI_CH3I_Sendq_empty(MPIDI_CH3I_shm_sendq))
         /* MT */
     {
-	MPID_IOV *remaining_iov = iov;
+	MPL_IOV *remaining_iov = iov;
 	int remaining_n_iov = n_iov;
 
         MPIU_DBG_MSG (CH3_CHANNEL, VERBOSE, "iStartMsgv");
@@ -85,7 +85,7 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPID_IOV *iov, int n_iov, MPID_Request
                 int total = 0;
                 int i;
                 for (i = 0; i < n_iov; ++i)
-                    total += iov[i].MPID_IOV_LEN;
+                    total += iov[i].MPL_IOV_LEN;
 
                 MPIU_DBG_MSG_D (CH3_CHANNEL, VERBOSE, "   + len=%d ", total);
             });
@@ -98,7 +98,7 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPID_IOV *iov, int n_iov, MPID_Request
                     int total = 0;
                     int i;
                     for (i = 0; i < remaining_n_iov; ++i)
-                        total += remaining_iov[i].MPID_IOV_LEN;
+                        total += remaining_iov[i].MPL_IOV_LEN;
                     MPIU_DBG_MSG_D (CH3_CHANNEL, VERBOSE, "   + len=%d ", total);
                 });
 
@@ -109,7 +109,7 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPID_IOV *iov, int n_iov, MPID_Request
                 int total = 0;
                 int i;
                 for (i = 0; i < remaining_n_iov; ++i)
-                    total += remaining_iov[i].MPID_IOV_LEN;
+                    total += remaining_iov[i].MPL_IOV_LEN;
                 MPIU_DBG_MSG_D (CH3_CHANNEL, VERBOSE, "   - len=%d ", total);
             });
 
@@ -133,9 +133,9 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPID_IOV *iov, int n_iov, MPID_Request
 	    if ( iov == remaining_iov )
 	    {
 		/* header was not sent, so iov[0] might point to something on the stack */
-		sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF;
-		sreq->dev.iov[0].MPID_IOV_BUF = (char *) &sreq->dev.pending_pkt;
-		sreq->dev.iov[0].MPID_IOV_LEN = iov[0].MPID_IOV_LEN;
+		sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF;
+		sreq->dev.iov[0].MPL_IOV_BUF = (char *) &sreq->dev.pending_pkt;
+		sreq->dev.iov[0].MPL_IOV_LEN = iov[0].MPL_IOV_LEN;
 	    }
 	    MPIDI_CH3I_Sendq_enqueue(&MPIDI_CH3I_shm_sendq, sreq);
 	    MPIU_Assert (MPIDI_CH3I_shm_active_send == NULL);
@@ -153,9 +153,9 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPID_IOV *iov, int n_iov, MPID_Request
 	MPIU_Object_set_ref(sreq, 2);
 	sreq->kind = MPID_REQUEST_SEND;
 
-	sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF;
-	sreq->dev.iov[0].MPID_IOV_BUF = (char *) &sreq->dev.pending_pkt;
-	sreq->dev.iov[0].MPID_IOV_LEN = iov[0].MPID_IOV_LEN;
+	sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF;
+	sreq->dev.iov[0].MPL_IOV_BUF = (char *) &sreq->dev.pending_pkt;
+	sreq->dev.iov[0].MPL_IOV_LEN = iov[0].MPL_IOV_LEN;
 
 	/* copy iov */
 	for (i = 1; i < n_iov; ++i)
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
index e65f82c..ccf4f59 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
@@ -144,7 +144,7 @@ static int check_terminating_vcs(void)
 int MPIDI_CH3I_Shm_send_progress(void)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_IOV *iov;
+    MPL_IOV *iov;
     int n_iov;
     MPID_Request *sreq;
     int again = 0;
@@ -159,7 +159,7 @@ int MPIDI_CH3I_Shm_send_progress(void)
     {
         if (!sreq->ch.noncontig)
         {
-            MPIU_Assert(sreq->dev.iov_count > 0 && sreq->dev.iov[sreq->dev.iov_offset].MPID_IOV_LEN > 0);
+            MPIU_Assert(sreq->dev.iov_count > 0 && sreq->dev.iov[sreq->dev.iov_offset].MPL_IOV_LEN > 0);
 
             iov = &sreq->dev.iov[sreq->dev.iov_offset];
             n_iov = sreq->dev.iov_count;
@@ -200,7 +200,7 @@ int MPIDI_CH3I_Shm_send_progress(void)
 
         if (!sreq->ch.noncontig)
         {
-            MPIU_Assert(sreq->dev.iov_count > 0 && sreq->dev.iov[sreq->dev.iov_offset].MPID_IOV_LEN > 0);
+            MPIU_Assert(sreq->dev.iov_count > 0 && sreq->dev.iov[sreq->dev.iov_offset].MPL_IOV_LEN > 0);
 
             iov = &sreq->dev.iov[sreq->dev.iov_offset];
             n_iov = sreq->dev.iov_count;
@@ -836,7 +836,7 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
 
         /* copy data into user buffer described by iov in rreq */
         MPIU_Assert(rreq);
-        MPIU_Assert(rreq->dev.iov_count > 0 && rreq->dev.iov[rreq->dev.iov_offset].MPID_IOV_LEN > 0);
+        MPIU_Assert(rreq->dev.iov_count > 0 && rreq->dev.iov[rreq->dev.iov_offset].MPL_IOV_LEN > 0);
 
         MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "    copying into user buffer from IOV");
 
@@ -850,18 +850,18 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
 
         while (buflen && !complete)
         {
-            MPID_IOV *iov;
+            MPL_IOV *iov;
             int n_iov;
 
             iov = &rreq->dev.iov[rreq->dev.iov_offset];
             n_iov = rreq->dev.iov_count;
 		
-            while (n_iov && buflen >= iov->MPID_IOV_LEN)
+            while (n_iov && buflen >= iov->MPL_IOV_LEN)
             {
-                size_t iov_len = iov->MPID_IOV_LEN;
+                size_t iov_len = iov->MPL_IOV_LEN;
 		MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "        %d", (int)iov_len);
                 if (rreq->dev.drop_data == FALSE) {
-                    MPIU_Memcpy (iov->MPID_IOV_BUF, buf, iov_len);
+                    MPIU_Memcpy (iov->MPL_IOV_BUF, buf, iov_len);
                 }
 
                 buflen -= iov_len;
@@ -876,17 +876,17 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
                 {
 		    MPIU_DBG_MSG_D(CH3_CHANNEL, VERBOSE, "        " MPIDI_MSG_SZ_FMT, buflen);
                     if (rreq->dev.drop_data == FALSE) {
-                        MPIU_Memcpy (iov->MPID_IOV_BUF, buf, buflen);
+                        MPIU_Memcpy (iov->MPL_IOV_BUF, buf, buflen);
                     }
-                    iov->MPID_IOV_BUF = (void *)((char *)iov->MPID_IOV_BUF + buflen);
-                    iov->MPID_IOV_LEN -= buflen;
+                    iov->MPL_IOV_BUF = (void *)((char *)iov->MPL_IOV_BUF + buflen);
+                    iov->MPL_IOV_LEN -= buflen;
                     buflen = 0;
                 }
 
                 rreq->dev.iov_offset = iov - rreq->dev.iov;
                 rreq->dev.iov_count = n_iov;
                 vc_ch->recv_active = rreq;
-		MPIU_DBG_MSG_FMT(CH3_CHANNEL, VERBOSE, (MPIU_DBG_FDEST, "        remaining: " MPIDI_MSG_SZ_FMT " bytes + %d iov entries", iov->MPID_IOV_LEN, n_iov));
+		MPIU_DBG_MSG_FMT(CH3_CHANNEL, VERBOSE, (MPIU_DBG_FDEST, "        remaining: " MPIDI_MSG_SZ_FMT " bytes + %d iov entries", iov->MPL_IOV_LEN, n_iov));
             }
             else
             {
@@ -915,7 +915,7 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
                 if (!complete)
                 {
                     rreq->dev.iov_offset = 0;
-                    MPIU_Assert(rreq->dev.iov_count > 0 && rreq->dev.iov[rreq->dev.iov_offset].MPID_IOV_LEN > 0);
+                    MPIU_Assert(rreq->dev.iov_count > 0 && rreq->dev.iov[rreq->dev.iov_offset].MPL_IOV_LEN > 0);
                     vc_ch->recv_active = rreq;
                     MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "...not complete");
                 }
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
index 0eb6c6a..53af651 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
@@ -156,7 +156,7 @@ static int MPIDI_CH3I_SHM_Wins_match(MPID_Win ** win_ptr, MPID_Win ** matched_wi
     MPID_Comm *node_comm_ptr = NULL, *shm_node_comm_ptr = NULL;
     int *node_ranks = NULL, *node_ranks_in_shm_node = NULL;
     MPID_Group *node_group_ptr = NULL, *shm_node_group_ptr = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPI_Aint *base_shm_offs;
 
     MPIDI_SHM_Win_t *elem = shm_wins_list;
@@ -355,7 +355,7 @@ static int MPIDI_CH3I_Win_gather_info(void *base, MPI_Aint size, int disp_unit,
     int comm_rank, comm_size;
     MPI_Aint *tmp_buf = NULL;
     int i, k;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     int mpi_errno = MPI_SUCCESS;
     MPIU_CHKLMEM_DECL(1);
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_WIN_GATHER_INFO);
@@ -498,7 +498,7 @@ static int MPIDI_CH3I_Win_allocate_shm(MPI_Aint size, int disp_unit, MPID_Info *
     int i, node_size, node_rank;
     MPID_Comm *node_comm_ptr;
     MPI_Aint *node_sizes;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     int noncontig = FALSE;
     MPIU_CHKPMEM_DECL(1);
     MPIU_CHKLMEM_DECL(1);
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c b/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c
index 4ff26cd..b8cbdde 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3i_comm.c
@@ -11,7 +11,7 @@
 
 #define NULL_CONTEXT_ID -1
 
-static int barrier (MPID_Comm *comm_ptr, mpir_errflag_t *errflag);
+static int barrier (MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag);
 static int alloc_barrier_vars (MPID_Comm *comm, MPID_nem_barrier_vars_t **vars);
 
 UT_array *coll_fns_array = NULL;
@@ -161,7 +161,7 @@ static int alloc_barrier_vars (MPID_Comm *comm, MPID_nem_barrier_vars_t **vars)
 #define FUNCNAME barrier
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-static int barrier(MPID_Comm *comm_ptr, mpir_errflag_t *errflag)
+static int barrier(MPID_Comm *comm_ptr, MPIR_Errflag_t *errflag)
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_nem_barrier_vars_t *barrier_vars;
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 0494bf3..778298c 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 *)(((MPIR_Upint)addr + (MPIR_Upint)MPID_NEM_CACHE_LINE_LEN-1) & (~((MPIR_Upint)MPID_NEM_CACHE_LINE_LEN-1)));
+        current_addr = (char *)(((MPIU_Upint)addr + (MPIU_Upint)MPID_NEM_CACHE_LINE_LEN-1) & (~((MPIU_Upint)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 *)(((MPIR_Upint)addr + (MPIR_Upint)MPID_NEM_CACHE_LINE_LEN-1) & (~((MPIR_Upint)MPID_NEM_CACHE_LINE_LEN-1)));
+        current_addr = (char *)(((MPIU_Upint)addr + (MPIU_Upint)MPID_NEM_CACHE_LINE_LEN-1) & (~((MPIU_Upint)MPID_NEM_CACHE_LINE_LEN-1)));
         memory->symmetrical = 0 ;
 
         /* we still need to call barrier */
@@ -328,7 +328,7 @@ int MPIDI_CH3I_Seg_commit(MPID_nem_seg_ptr_t memory, int num_local, int local_ra
 
             /* post name of shared file */
             MPIU_Assert (MPID_nem_mem_region.local_procs[0] == MPID_nem_mem_region.rank);
-            MPIU_Snprintf (key, key_max_sz, "sharedFilename[%i]", MPID_nem_mem_region.rank);
+            MPL_snprintf (key, key_max_sz, "sharedFilename[%i]", MPID_nem_mem_region.rank);
 
             mpi_errno = MPIU_SHMW_Hnd_get_serialized_by_ref(memory->hnd, &serialized_hnd);
             if (mpi_errno != MPI_SUCCESS) MPIU_ERR_POP (mpi_errno);
@@ -358,7 +358,7 @@ int MPIDI_CH3I_Seg_commit(MPID_nem_seg_ptr_t memory, int num_local, int local_ra
             MPIU_ERR_CHKANDJUMP1 (pmi_errno != PMI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**pmi_barrier", "**pmi_barrier %d", pmi_errno);
 
             /* get name of shared file */
-            MPIU_Snprintf (key, key_max_sz, "sharedFilename[%i]", MPID_nem_mem_region.local_procs[0]);
+            MPL_snprintf (key, key_max_sz, "sharedFilename[%i]", MPID_nem_mem_region.local_procs[0]);
             pmi_errno = PMI_KVS_Get (kvs_name, key, val, val_max_sz);
             MPIU_ERR_CHKANDJUMP1 (pmi_errno != PMI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**pmi_kvs_get", "**pmi_kvs_get %d", pmi_errno);
 
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 3438287..4cbab6c 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c
@@ -281,7 +281,7 @@ static int restore_env(pid_t parent_pid, int rank)
     int ret;
     
 
-    MPIU_Snprintf(env_filename, MAX_STR_LEN, "/tmp/hydra-env-file-%d:%d", parent_pid, rank); 
+    MPL_snprintf(env_filename, MAX_STR_LEN, "/tmp/hydra-env-file-%d:%d", parent_pid, rank); 
 
     f = fopen(env_filename, "r");
     CHECK_ERR(!f, MPIU_Strerror (errno));
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 6fe1bd7..cc25615 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
@@ -108,7 +108,7 @@ int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, MPI_Aint coun
     MPIU_DBG_MSG_D(CH3_OTHER,VERBOSE,
 		   "sending lmt RTS, data_sz=" MPIDI_MSG_SZ_FMT, data_sz);
     sreq->partner_request = NULL;
-    sreq->ch.lmt_tmp_cookie.MPID_IOV_LEN = 0;
+    sreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = 0;
 	
     MPIDI_Pkt_init(rts_pkt, MPIDI_NEM_PKT_LMT_RTS);
     rts_pkt->match.parts.rank	      = comm->rank;
@@ -224,8 +224,8 @@ static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
     {
         /* set for the cookie to be received into the tmp_cookie in the request */
         MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"haven't received entire cookie");
-        MPIU_CHKPMEM_MALLOC(rreq->ch.lmt_tmp_cookie.MPID_IOV_BUF, char *, rts_pkt->cookie_len, mpi_errno, "tmp cookie buf");
-        rreq->ch.lmt_tmp_cookie.MPID_IOV_LEN = rts_pkt->cookie_len;
+        MPIU_CHKPMEM_MALLOC(rreq->ch.lmt_tmp_cookie.MPL_IOV_BUF, char *, rts_pkt->cookie_len, mpi_errno, "tmp cookie buf");
+        rreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = rts_pkt->cookie_len;
 
         rreq->dev.iov[0] = rreq->ch.lmt_tmp_cookie;
         rreq->dev.iov_count = 1;
@@ -251,7 +251,7 @@ static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
         if (rts_pkt->cookie_len == 0)
         {
             /* there's no cookie to receive */
-            rreq->ch.lmt_tmp_cookie.MPID_IOV_LEN = 0;
+            rreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = 0;
             rreq->dev.iov_count = 0;
             *buflen = sizeof(MPIDI_CH3_Pkt_t);
             *rreqp = NULL;
@@ -260,10 +260,10 @@ static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
         {
             /* receive cookie into tmp_cookie in the request */
             MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"received entire cookie");
-            MPIU_CHKPMEM_MALLOC(rreq->ch.lmt_tmp_cookie.MPID_IOV_BUF, char *, rts_pkt->cookie_len, mpi_errno, "tmp cookie buf");
-            rreq->ch.lmt_tmp_cookie.MPID_IOV_LEN = rts_pkt->cookie_len;
+            MPIU_CHKPMEM_MALLOC(rreq->ch.lmt_tmp_cookie.MPL_IOV_BUF, char *, rts_pkt->cookie_len, mpi_errno, "tmp cookie buf");
+            rreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = rts_pkt->cookie_len;
         
-            MPIU_Memcpy(rreq->ch.lmt_tmp_cookie.MPID_IOV_BUF, data_buf, rts_pkt->cookie_len);
+            MPIU_Memcpy(rreq->ch.lmt_tmp_cookie.MPL_IOV_BUF, data_buf, rts_pkt->cookie_len);
             *buflen = sizeof(MPIDI_CH3_Pkt_t) + rts_pkt->cookie_len;
             *rreqp = NULL;
         }
@@ -346,13 +346,13 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
         if (data_len >= cts_pkt->cookie_len)
         {
             /* if whole cookie has been received, start the send */
-            sreq->ch.lmt_tmp_cookie.MPID_IOV_BUF = data_buf;
-            sreq->ch.lmt_tmp_cookie.MPID_IOV_LEN = cts_pkt->cookie_len;
+            sreq->ch.lmt_tmp_cookie.MPL_IOV_BUF = data_buf;
+            sreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = cts_pkt->cookie_len;
             MPIU_THREAD_CS_ENTER(LMT,);
             mpi_errno = vc->ch.lmt_start_send(vc, sreq, sreq->ch.lmt_tmp_cookie);
             MPIU_THREAD_CS_EXIT(LMT,);
             if (mpi_errno) MPIU_ERR_POP (mpi_errno);
-            sreq->ch.lmt_tmp_cookie.MPID_IOV_LEN = 0;
+            sreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = 0;
             *buflen = sizeof(MPIDI_CH3_Pkt_t) + cts_pkt->cookie_len;
             *rreqp = NULL;
         }
@@ -361,8 +361,8 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
             /* create a recv req and set up to receive the cookie into the sreq's tmp_cookie */
             MPID_Request *rreq;
 
-            MPIU_CHKPMEM_MALLOC(sreq->ch.lmt_tmp_cookie.MPID_IOV_BUF, char *, cts_pkt->cookie_len, mpi_errno, "tmp cookie buf");
-            sreq->ch.lmt_tmp_cookie.MPID_IOV_LEN = cts_pkt->cookie_len;
+            MPIU_CHKPMEM_MALLOC(sreq->ch.lmt_tmp_cookie.MPL_IOV_BUF, char *, cts_pkt->cookie_len, mpi_errno, "tmp cookie buf");
+            sreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = cts_pkt->cookie_len;
 
             MPIDI_Request_create_rreq(rreq, mpi_errno, goto fn_fail);
             /* FIXME:  where does this request get freed? */
@@ -377,7 +377,7 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
     }
     else
     {
-        MPID_IOV cookie = {0,0};
+        MPL_IOV cookie = {0,0};
         MPIU_THREAD_CS_ENTER(LMT,);
         mpi_errno = vc->ch.lmt_start_send(vc, sreq, cookie);
         MPIU_THREAD_CS_EXIT(LMT,);
@@ -476,10 +476,10 @@ static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz
         if (data_len >= cookie_pkt->cookie_len)
         {
             /* call handle cookie with cookie data in receive buffer */
-            MPID_IOV cookie;
+            MPL_IOV cookie;
 
-            cookie.MPID_IOV_BUF = data_buf;
-            cookie.MPID_IOV_LEN = cookie_pkt->cookie_len;
+            cookie.MPL_IOV_BUF = data_buf;
+            cookie.MPL_IOV_LEN = cookie_pkt->cookie_len;
             MPIU_THREAD_CS_ENTER(LMT,);
             mpi_errno = vc->ch.lmt_handle_cookie(vc, req, cookie);
             MPIU_THREAD_CS_EXIT(LMT,);
@@ -494,9 +494,9 @@ static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz
             MPID_Request *rreq;
 
             MPIDI_Request_create_rreq(rreq, mpi_errno, goto fn_fail);
-            MPIU_CHKPMEM_MALLOC(rreq->ch.lmt_tmp_cookie.MPID_IOV_BUF, char *, cookie_pkt->cookie_len, mpi_errno, "tmp cookie buf");
+            MPIU_CHKPMEM_MALLOC(rreq->ch.lmt_tmp_cookie.MPL_IOV_BUF, char *, cookie_pkt->cookie_len, mpi_errno, "tmp cookie buf");
             /* FIXME:  where does this request get freed? */
-            rreq->ch.lmt_tmp_cookie.MPID_IOV_LEN = cookie_pkt->cookie_len;
+            rreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = cookie_pkt->cookie_len;
 
             rreq->dev.iov[0] = rreq->ch.lmt_tmp_cookie;
             rreq->dev.iov_count = 1;
@@ -508,7 +508,7 @@ static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz
     }
     else
     {
-        MPID_IOV cookie = {0,0};
+        MPL_IOV cookie = {0,0};
 
         MPIU_THREAD_CS_ENTER(LMT,);
         mpi_errno = vc->ch.lmt_handle_cookie(vc, req, cookie);
@@ -539,7 +539,7 @@ static int do_cts(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
     int dt_contig ATTRIBUTE((unused));
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
     MPID_Datatype * dt_ptr;
-    MPID_IOV s_cookie;
+    MPL_IOV s_cookie;
     MPIDI_STATE_DECL(MPID_STATE_DO_CTS);
 
     MPIDI_FUNC_ENTER(MPID_STATE_DO_CTS);
@@ -562,10 +562,10 @@ static int do_cts(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
     /* free cookie buffer allocated in RTS handler */
-    if (rreq->ch.lmt_tmp_cookie.MPID_IOV_LEN)
+    if (rreq->ch.lmt_tmp_cookie.MPL_IOV_LEN)
     {
-        MPIU_Free(rreq->ch.lmt_tmp_cookie.MPID_IOV_BUF);
-        rreq->ch.lmt_tmp_cookie.MPID_IOV_LEN = 0;
+        MPIU_Free(rreq->ch.lmt_tmp_cookie.MPL_IOV_BUF);
+        rreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = 0;
     }
 
     *complete = TRUE;
@@ -584,7 +584,7 @@ static int do_cts(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
 static int do_send(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_IOV r_cookie;
+    MPL_IOV r_cookie;
     MPID_Request * const sreq = rreq->ch.lmt_req;
     MPIDI_STATE_DECL(MPID_STATE_DO_SEND);
 
@@ -598,8 +598,8 @@ static int do_send(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
     /* free cookie buffer allocated in CTS handler */
-    MPIU_Free(sreq->ch.lmt_tmp_cookie.MPID_IOV_BUF);
-    sreq->ch.lmt_tmp_cookie.MPID_IOV_LEN = 0;
+    MPIU_Free(sreq->ch.lmt_tmp_cookie.MPL_IOV_BUF);
+    sreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = 0;
 
     *complete = TRUE;
 
@@ -617,7 +617,7 @@ 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)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_IOV cookie;
+    MPL_IOV cookie;
     MPID_Request *req = rreq->ch.lmt_req;
     MPIDI_STATE_DECL(MPID_STATE_DO_COOKIE);
 
@@ -631,8 +631,8 @@ static int do_cookie(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
     if (mpi_errno) MPIU_ERR_POP (mpi_errno);
 
     /* free cookie buffer allocated in COOKIE handler */
-    MPIU_Free(req->ch.lmt_tmp_cookie.MPID_IOV_BUF);
-    req->ch.lmt_tmp_cookie.MPID_IOV_LEN = 0;
+    MPIU_Free(req->ch.lmt_tmp_cookie.MPL_IOV_BUF);
+    req->ch.lmt_tmp_cookie.MPL_IOV_LEN = 0;
 
     *complete = TRUE;
 
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 2c4cc03..3cfd400 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
@@ -114,7 +114,7 @@ fn_fail:
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 static int do_dma_send(MPIDI_VC_t *vc,  MPID_Request *sreq, int send_iov_n,
-                       MPID_IOV send_iov[], knem_cookie_t *s_cookiep)
+                       MPL_IOV send_iov[], knem_cookie_t *s_cookiep)
 {
     int mpi_errno = MPI_SUCCESS;
     int i, err;
@@ -123,15 +123,15 @@ static int do_dma_send(MPIDI_VC_t *vc,  MPID_Request *sreq, int send_iov_n,
 #else
     struct knem_cmd_create_region cr;
 #endif
-    struct knem_cmd_param_iovec knem_iov[MPID_IOV_LIMIT];
+    struct knem_cmd_param_iovec knem_iov[MPL_IOV_LIMIT];
 
     /* FIXME The knem module iovec is potentially different from the system
        iovec.  This causes all sorts of fun if you don't realize it and use the
        system iovec directly instead.  Eventually we need to either unify them
        or avoid this extra copy. */
     for (i = 0; i < send_iov_n; ++i) {
-        knem_iov[i].base = (uintptr_t)send_iov[i] .MPID_IOV_BUF;
-        knem_iov[i].len  = send_iov[i] .MPID_IOV_LEN;
+        knem_iov[i].base = (uintptr_t)send_iov[i] .MPL_IOV_BUF;
+        knem_iov[i].len  = send_iov[i] .MPL_IOV_LEN;
     }
 
 #if KNEM_ABI_VERSION < MPICH_NEW_KNEM_ABI_VERSION
@@ -164,7 +164,7 @@ fn_exit:
 #define FUNCNAME do_dma_recv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-static int do_dma_recv(int iov_n, MPID_IOV iov[], knem_cookie_t s_cookie, int nodma, volatile knem_status_t **status_p_p, knem_status_t *current_status_p)
+static int do_dma_recv(int iov_n, MPL_IOV iov[], knem_cookie_t s_cookie, int nodma, volatile knem_status_t **status_p_p, knem_status_t *current_status_p)
 {
     int mpi_errno = MPI_SUCCESS;
     int i, err;
@@ -174,15 +174,15 @@ static int do_dma_recv(int iov_n, MPID_IOV iov[], knem_cookie_t s_cookie, int no
 #else
     struct knem_cmd_inline_copy icopy;
 #endif
-    struct knem_cmd_param_iovec knem_iov[MPID_IOV_LIMIT];
+    struct knem_cmd_param_iovec knem_iov[MPL_IOV_LIMIT];
 
     /* FIXME The knem module iovec is potentially different from the system
        iovec.  This causes all sorts of fun if you don't realize it and use the
        system iovec directly instead.  Eventually we need to either unify them
        or avoid this extra copy. */
     for (i = 0; i < iov_n; ++i) {
-        knem_iov[i].base = (uintptr_t)iov[i] .MPID_IOV_BUF;
-        knem_iov[i].len  = iov[i] .MPID_IOV_LEN;
+        knem_iov[i].base = (uintptr_t)iov[i] .MPL_IOV_BUF;
+        knem_iov[i].len  = iov[i] .MPL_IOV_LEN;
     }
 
 #if KNEM_ABI_VERSION < MPICH_NEW_KNEM_ABI_VERSION
@@ -248,14 +248,14 @@ static int send_sreq_data(MPIDI_VC_t *vc, MPID_Request *sreq, knem_cookie_t *s_c
 
     if (dt_contig) {
         /* handle the iov creation ourselves */
-        sreq->dev.iov[0].MPID_IOV_BUF = (char *)sreq->dev.user_buf + dt_true_lb;
-        sreq->dev.iov[0].MPID_IOV_LEN = data_sz;
+        sreq->dev.iov[0].MPL_IOV_BUF = (char *)sreq->dev.user_buf + dt_true_lb;
+        sreq->dev.iov[0].MPL_IOV_LEN = data_sz;
         sreq->dev.iov_count = 1;
     }
     else {
         /* use the segment routines to handle the iovec creation */
         if (sreq->dev.segment_ptr == NULL) {
-            sreq->dev.iov_count = MPID_IOV_LIMIT;
+            sreq->dev.iov_count = MPL_IOV_LIMIT;
             sreq->dev.iov_offset = 0;
 
             /* segment_ptr may be non-null when this is a continuation of a
@@ -273,7 +273,7 @@ static int send_sreq_data(MPIDI_VC_t *vc, MPID_Request *sreq, knem_cookie_t *s_c
 
             /* FIXME we should write our own function that isn't dependent on
                the in-request iov array.  This will let us use IOVs that are
-               larger than MPID_IOV_LIMIT. */
+               larger than MPL_IOV_LIMIT. */
             mpi_errno = MPIDI_CH3U_Request_load_send_iov(sreq, &sreq->dev.iov[0],
                                                          &sreq->dev.iov_count);
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
@@ -351,7 +351,7 @@ fn_fail:
 #define FUNCNAME MPID_nem_lmt_dma_start_recv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPID_IOV s_cookie)
+int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPL_IOV s_cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     int nodma;
@@ -380,8 +380,8 @@ int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPID_IOV s_c
 
     if (dt_contig) {
         /* handle the iov creation ourselves */
-        rreq->dev.iov[0].MPID_IOV_BUF = (char *)rreq->dev.user_buf + dt_true_lb;
-        rreq->dev.iov[0].MPID_IOV_LEN = data_sz;
+        rreq->dev.iov[0].MPL_IOV_BUF = (char *)rreq->dev.user_buf + dt_true_lb;
+        rreq->dev.iov[0].MPL_IOV_LEN = data_sz;
         rreq->dev.iov_count = 1;
     }
     else {
@@ -405,10 +405,10 @@ int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPID_IOV s_c
         }
     }
 
-    MPIU_Assert(s_cookie.MPID_IOV_LEN == sizeof(knem_cookie_t));
-    MPIU_Assert(s_cookie.MPID_IOV_BUF != NULL);
+    MPIU_Assert(s_cookie.MPL_IOV_LEN == sizeof(knem_cookie_t));
+    MPIU_Assert(s_cookie.MPL_IOV_BUF != NULL);
     mpi_errno = do_dma_recv(rreq->dev.iov_count, rreq->dev.iov,
-                            *((knem_cookie_t *)s_cookie.MPID_IOV_BUF), nodma,
+                            *((knem_cookie_t *)s_cookie.MPL_IOV_BUF), nodma,
                             &status, &current_status);
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
@@ -515,14 +515,14 @@ fn_fail:
 #define FUNCNAME MPID_nem_lmt_dma_handle_cookie
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_nem_lmt_dma_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV cookie)
+int MPID_nem_lmt_dma_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_HANDLE_COOKIE);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LMT_DMA_HANDLE_COOKIE);
 
-    if (cookie.MPID_IOV_LEN == 0 && cookie.MPID_IOV_BUF == NULL) {
+    if (cookie.MPL_IOV_LEN == 0 && cookie.MPL_IOV_BUF == NULL) {
         /* req is a send request, we need to initiate another knem request and
            send a COOKIE message back to the receiver indicating the lid
            returned from the ioctl. */
@@ -689,7 +689,7 @@ int MPID_nem_lmt_dma_vc_terminated(MPIDI_VC_t *vc)
 #define FUNCNAME MPID_nem_lmt_dma_start_send
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_nem_lmt_dma_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV r_cookie)
+int MPID_nem_lmt_dma_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV r_cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_DMA_START_SEND);
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 5a232fd..b28e4a6 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
@@ -160,7 +160,7 @@ int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPID_Req
 #define FUNCNAME MPID_nem_lmt_shm_start_recv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV s_cookie)
+int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV s_cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     int done = FALSE;
@@ -240,7 +240,7 @@ int MPID_nem_lmt_shm_start_recv(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV s_co
 #define FUNCNAME MPID_nem_lmt_shm_start_send
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_nem_lmt_shm_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV r_cookie)
+int MPID_nem_lmt_shm_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV r_cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     int done = FALSE;
@@ -253,7 +253,7 @@ int MPID_nem_lmt_shm_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV r_co
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LMT_SHM_START_SEND);
 
     if (vc_ch->lmt_copy_buf == NULL){
-        mpi_errno = MPIU_SHMW_Hnd_deserialize(vc_ch->lmt_copy_buf_handle, r_cookie.MPID_IOV_BUF, strlen(r_cookie.MPID_IOV_BUF));
+        mpi_errno = MPIU_SHMW_Hnd_deserialize(vc_ch->lmt_copy_buf_handle, r_cookie.MPL_IOV_BUF, strlen(r_cookie.MPL_IOV_BUF));
         if(mpi_errno != MPI_SUCCESS) { MPIU_ERR_POP(mpi_errno); }
 
         mpi_errno = MPID_nem_attach_shm_region(&vc_ch->lmt_copy_buf, vc_ch->lmt_copy_buf_handle);
@@ -264,7 +264,7 @@ int MPID_nem_lmt_shm_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV r_co
         char *ser_lmt_copy_buf_handle=NULL;
         mpi_errno = MPIU_SHMW_Hnd_get_serialized_by_ref(vc_ch->lmt_copy_buf_handle, &ser_lmt_copy_buf_handle);
         if(mpi_errno != MPI_SUCCESS) { MPIU_ERR_POP(mpi_errno); }
-        if (strncmp(ser_lmt_copy_buf_handle, r_cookie.MPID_IOV_BUF, r_cookie.MPID_IOV_LEN) < 0){
+        if (strncmp(ser_lmt_copy_buf_handle, r_cookie.MPL_IOV_BUF, r_cookie.MPL_IOV_LEN) < 0){
             /* Each side allocated its own buffer, lexicographically lower valued buffer handle is deleted */
             mpi_errno = MPID_nem_delete_shm_region(&(vc_ch->lmt_copy_buf), &(vc_ch->lmt_copy_buf_handle));
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
@@ -275,7 +275,7 @@ int MPID_nem_lmt_shm_start_send(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV r_co
             mpi_errno = MPIU_SHMW_Hnd_init(&vc_ch->lmt_copy_buf_handle);
             if(mpi_errno != MPI_SUCCESS) { MPIU_ERR_POP(mpi_errno); }
 
-            mpi_errno = MPIU_SHMW_Hnd_deserialize(vc_ch->lmt_copy_buf_handle, r_cookie.MPID_IOV_BUF, strlen(r_cookie.MPID_IOV_BUF));
+            mpi_errno = MPIU_SHMW_Hnd_deserialize(vc_ch->lmt_copy_buf_handle, r_cookie.MPL_IOV_BUF, strlen(r_cookie.MPL_IOV_BUF));
             if(mpi_errno != MPI_SUCCESS) { MPIU_ERR_POP(mpi_errno); }
 
             mpi_errno = MPID_nem_attach_shm_region(&vc_ch->lmt_copy_buf, vc_ch->lmt_copy_buf_handle);
@@ -665,7 +665,7 @@ static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
 #define FUNCNAME MPID_nem_lmt_shm_handle_cookie
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_nem_lmt_shm_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV cookie)
+int MPID_nem_lmt_shm_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV cookie)
 {
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_HANDLE_COOKIE);
 
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 8c33ddf..33b1add 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
@@ -34,7 +34,7 @@ static struct lmt_vmsplice_node *outstanding_head = NULL;
   
    iov_count and iov_offset are pointers so that this function can manipulate
    them */
-static int adjust_partially_xferred_iov(MPID_IOV iov[], int *iov_offset,
+static int adjust_partially_xferred_iov(MPL_IOV iov[], int *iov_offset,
                                         int *iov_count, int bytes_xferred)
 {
     int i;
@@ -42,17 +42,17 @@ static int adjust_partially_xferred_iov(MPID_IOV iov[], int *iov_offset,
 
     for (i = *iov_offset; i < (*iov_offset + *iov_count); ++i)
     {
-        if (bytes_xferred < iov[i].MPID_IOV_LEN)
+        if (bytes_xferred < iov[i].MPL_IOV_LEN)
         {
-            iov[i].MPID_IOV_BUF = (char *)iov[i].MPID_IOV_BUF + bytes_xferred;
-            iov[i].MPID_IOV_LEN -= bytes_xferred;
+            iov[i].MPL_IOV_BUF = (char *)iov[i].MPL_IOV_BUF + bytes_xferred;
+            iov[i].MPL_IOV_LEN -= bytes_xferred;
             /* iov_count should be equal to the number of iov's remaining */
             *iov_count -= (i - *iov_offset);
             *iov_offset = i;
             complete = 0;
             break;
         }
-        bytes_xferred -= iov[i].MPID_IOV_LEN;
+        bytes_xferred -= iov[i].MPL_IOV_LEN;
     }
 
     return complete;
@@ -67,7 +67,7 @@ static inline int check_req_complete(MPIDI_VC_t *vc, MPID_Request *req, int *com
         *complete = 0;
 
         /* XXX DJG FIXME this feels like a hack */
-        req->dev.iov_count = MPID_IOV_LIMIT;
+        req->dev.iov_count = MPL_IOV_LIMIT;
         req->dev.iov_offset = 0;
 
         mpi_errno = reqFn(vc, req, complete);
@@ -101,15 +101,15 @@ static int populate_iov_from_req(MPID_Request *req)
 
     if (dt_contig) {
         /* handle the iov creation ourselves */
-        req->dev.iov[0].MPID_IOV_BUF = (char *)req->dev.user_buf + dt_true_lb;
-        req->dev.iov[0].MPID_IOV_LEN = data_sz;
+        req->dev.iov[0].MPL_IOV_BUF = (char *)req->dev.user_buf + dt_true_lb;
+        req->dev.iov[0].MPL_IOV_LEN = data_sz;
         req->dev.iov_count = 1;
     }
     else {
         /* use the segment routines to handle the iovec creation */
         MPIU_Assert(req->dev.segment_ptr == NULL);
 
-        req->dev.iov_count = MPID_IOV_LIMIT;
+        req->dev.iov_count = MPL_IOV_LIMIT;
         req->dev.iov_offset = 0;
 
         /* XXX DJG FIXME where is this segment freed? */
@@ -125,7 +125,7 @@ static int populate_iov_from_req(MPID_Request *req)
 
         /* FIXME we should write our own function that isn't dependent on
            the in-request iov array.  This will let us use IOVs that are
-           larger than MPID_IOV_LIMIT. */
+           larger than MPL_IOV_LIMIT. */
         mpi_errno = MPIDI_CH3U_Request_load_send_iov(req, &req->dev.iov[0],
                                                      &req->dev.iov_count);
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
@@ -135,7 +135,7 @@ fn_fail:
     return mpi_errno;
 }
 
-static int do_vmsplice(MPID_Request *sreq, int pipe_fd, MPID_IOV iov[],
+static int do_vmsplice(MPID_Request *sreq, int pipe_fd, MPL_IOV iov[],
                        int *iov_offset, int *iov_count, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -216,7 +216,7 @@ fn_exit:
     return mpi_errno;
 }
 
-static int do_readv(MPID_Request *rreq, int pipe_fd, MPID_IOV iov[],
+static int do_readv(MPID_Request *rreq, int pipe_fd, MPL_IOV iov[],
                     int *iov_offset, int *iov_count, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -255,7 +255,7 @@ fn_exit:
 #define FUNCNAME MPID_nem_lmt_vmsplice_start_recv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_nem_lmt_vmsplice_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPID_IOV s_cookie)
+int MPID_nem_lmt_vmsplice_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPL_IOV s_cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     int i;
@@ -268,8 +268,8 @@ int MPID_nem_lmt_vmsplice_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPID_IO
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LMT_VMSPLICE_START_RECV);
 
     if (vc_ch->lmt_recv_copy_buf_handle == NULL) {
-        MPIU_Assert(s_cookie.MPID_IOV_BUF != NULL);
-        vc_ch->lmt_recv_copy_buf_handle = MPIU_Strdup(s_cookie.MPID_IOV_BUF);
+        MPIU_Assert(s_cookie.MPL_IOV_BUF != NULL);
+        vc_ch->lmt_recv_copy_buf_handle = MPIU_Strdup(s_cookie.MPL_IOV_BUF);
     }
 
     /* XXX DJG FIXME in a real version we would want to cache the fd on the vc
@@ -377,7 +377,7 @@ fn_fail:
 #define FUNCNAME MPID_nem_lmt_vmsplice_start_send
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_nem_lmt_vmsplice_start_send(MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV r_cookie)
+int MPID_nem_lmt_vmsplice_start_send(MPIDI_VC_t *vc, MPID_Request *sreq, MPL_IOV r_cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_START_SEND);
@@ -489,7 +489,7 @@ int MPID_nem_lmt_vmsplice_done_send(MPIDI_VC_t *vc, MPID_Request *sreq)
 #define FUNCNAME MPID_nem_lmt_vmsplice_handle_cookie
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_nem_lmt_vmsplice_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPID_IOV cookie)
+int MPID_nem_lmt_vmsplice_handle_cookie(MPIDI_VC_t *vc, MPID_Request *req, MPL_IOV cookie)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_VMSPLICE_HANDLE_COOKIE);
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 35e56e6..085c518 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
@@ -79,14 +79,14 @@ fn_fail:
 #define FUNCNAME MPID_nem_send_iov
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_nem_send_iov(MPIDI_VC_t *vc, MPID_Request **sreq_ptr, MPID_IOV *iov, int n_iov)
+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;
     int i;
     int iov_data_copied;
     MPID_Request *sreq = *sreq_ptr;
-    MPID_IOV *data_iov = &iov[1]; /* iov of just the data, not the header */
+    MPL_IOV *data_iov = &iov[1]; /* iov of just the data, not the header */
     int data_n_iov = n_iov - 1;
 
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_SEND_IOV);
@@ -105,7 +105,7 @@ int MPID_nem_send_iov(MPIDI_VC_t *vc, MPID_Request **sreq_ptr, MPID_IOV *iov, in
 
     data_sz = 0;
     for (i = 0; i < data_n_iov; ++i)
-        data_sz += data_iov[i].MPID_IOV_LEN;
+        data_sz += data_iov[i].MPL_IOV_LEN;
 
 
     if (!MPIDI_Request_get_srbuf_flag(sreq))
@@ -127,11 +127,11 @@ int MPID_nem_send_iov(MPIDI_VC_t *vc, MPID_Request **sreq_ptr, MPID_IOV *iov, in
 
     iov_data_copied = 0;
     for (i = 0; i < data_n_iov; ++i) {
-        MPIU_Memcpy((char*) sreq->dev.tmpbuf + iov_data_copied, data_iov[i].MPID_IOV_BUF, data_iov[i].MPID_IOV_LEN);
-        iov_data_copied += data_iov[i].MPID_IOV_LEN;
+        MPIU_Memcpy((char*) sreq->dev.tmpbuf + iov_data_copied, data_iov[i].MPL_IOV_BUF, data_iov[i].MPL_IOV_LEN);
+        iov_data_copied += data_iov[i].MPL_IOV_LEN;
     }
 
-    mpi_errno = vc->ch.iSendContig(vc, sreq, iov[0].MPID_IOV_BUF, iov[0].MPID_IOV_LEN, sreq->dev.tmpbuf, data_sz);
+    mpi_errno = vc->ch.iSendContig(vc, sreq, iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN, sreq->dev.tmpbuf, data_sz);
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
     *sreq_ptr = sreq;
diff --git a/src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c b/src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c
index 7bd9932..15a7e3a 100644
--- a/src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c
+++ b/src/mpid/ch3/channels/nemesis/utils/monitor/papi_defs.c
@@ -6,7 +6,8 @@
 
 /* for ATTRIBUTE */
 #include "mpichconf.h"
-#include "mpibase.h"
+#include "mpl.h"
+
 /* here to prevent "has no symbols" warnings from ranlib on OS X */
 static int dummy ATTRIBUTE((unused,used)) = 0;
 
diff --git a/src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c b/src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c
index 73b7407..8d65873 100644
--- a/src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c
+++ b/src/mpid/ch3/channels/nemesis/utils/replacements/mkstemp.c
@@ -12,7 +12,8 @@
 
 /* for ATTRIBUTE */
 #include "mpichconf.h"
-#include "mpibase.h"
+#include "mpl.h"
+
 /* here to prevent "has no symbols" warnings from ranlib on OS X */
 static int dummy ATTRIBUTE((unused,used)) = 0;
 
diff --git a/src/mpid/ch3/channels/sock/src/ch3_isend.c b/src/mpid/ch3/channels/sock/src/ch3_isend.c
index a4f885d..169fc63 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_isend.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_isend.c
@@ -18,8 +18,8 @@ static void update_request(MPID_Request * sreq, void * hdr,
     MPIDI_FUNC_ENTER(MPID_STATE_UPDATE_REQUEST);
     MPIU_Assert(hdr_sz == sizeof(MPIDI_CH3_Pkt_t));
     sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr;
-    sreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)((char *) &sreq->dev.pending_pkt + nb);
-    sreq->dev.iov[0].MPID_IOV_LEN = hdr_sz - nb;
+    sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)((char *) &sreq->dev.pending_pkt + nb);
+    sreq->dev.iov[0].MPL_IOV_LEN = hdr_sz - nb;
     sreq->dev.iov_count = 1;
     MPIDI_FUNC_EXIT(MPID_STATE_UPDATE_REQUEST);
 }
@@ -113,9 +113,9 @@ int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * hdr,
      (MPIU_DBG_FDEST,"posting write, vc=0x%p, sreq=0x%08x", vc, sreq->handle));
 		    vcch->conn->send_active = sreq;
 		    mpi_errno = MPIDU_Sock_post_write(vcch->conn->sock, 
-					  sreq->dev.iov[0].MPID_IOV_BUF,
-				          sreq->dev.iov[0].MPID_IOV_LEN, 
-					  sreq->dev.iov[0].MPID_IOV_LEN, NULL);
+					  sreq->dev.iov[0].MPL_IOV_BUF,
+				          sreq->dev.iov[0].MPL_IOV_LEN, 
+					  sreq->dev.iov[0].MPL_IOV_LEN, NULL);
 		    /* --BEGIN ERROR HANDLING-- */
 		    if (mpi_errno != MPI_SUCCESS)
 		    {
diff --git a/src/mpid/ch3/channels/sock/src/ch3_isendv.c b/src/mpid/ch3/channels/sock/src/ch3_isendv.c
index 6041627..e7d0add 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_isendv.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_isendv.c
@@ -10,7 +10,7 @@
 #define FUNCNAME update_request
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-static void update_request(MPID_Request * sreq, MPID_IOV * iov, int iov_count,
+static void update_request(MPID_Request * sreq, MPL_IOV * iov, int iov_count,
 			   int iov_offset, MPIU_Size_t nb)
 {
     int i;
@@ -24,13 +24,13 @@ static void update_request(MPID_Request * sreq, MPID_IOV * iov, int iov_count,
     }
     if (iov_offset == 0)
     {
-	MPIU_Assert(iov[0].MPID_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t));
-	sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF;
-	sreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) &sreq->dev.pending_pkt;
+	MPIU_Assert(iov[0].MPL_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t));
+	sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF;
+	sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) &sreq->dev.pending_pkt;
     }
-    sreq->dev.iov[iov_offset].MPID_IOV_BUF = 
-	(MPID_IOV_BUF_CAST)((char *) sreq->dev.iov[iov_offset].MPID_IOV_BUF + nb );
-    sreq->dev.iov[iov_offset].MPID_IOV_LEN -= nb;
+    sreq->dev.iov[iov_offset].MPL_IOV_BUF = 
+	(MPL_IOV_BUF_CAST)((char *) sreq->dev.iov[iov_offset].MPL_IOV_BUF + nb );
+    sreq->dev.iov[iov_offset].MPL_IOV_LEN -= nb;
     sreq->dev.iov_count = iov_count;
 
     MPIDI_FUNC_EXIT(MPID_STATE_UPDATE_REQUEST);
@@ -41,7 +41,7 @@ static void update_request(MPID_Request * sreq, MPID_IOV * iov, int iov_count,
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPID_Request * sreq, 
-		     MPID_IOV * iov, int n_iov)
+		     MPL_IOV * iov, int n_iov)
 {
     int mpi_errno = MPI_SUCCESS;
     MPIDI_CH3I_VC *vcch = &vc->ch;
@@ -53,22 +53,22 @@ int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPID_Request * sreq,
     if (sreq->dev.ext_hdr_sz > 0) {
         int i;
         for (i = n_iov-1; i >= 1; i--) {
-            iov[i+1].MPID_IOV_BUF = iov[i].MPID_IOV_BUF;
-            iov[i+1].MPID_IOV_LEN = iov[i].MPID_IOV_LEN;
+            iov[i+1].MPL_IOV_BUF = iov[i].MPL_IOV_BUF;
+            iov[i+1].MPL_IOV_LEN = iov[i].MPL_IOV_LEN;
         }
-        iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) sreq->dev.ext_hdr_ptr;
-        iov[1].MPID_IOV_LEN = sreq->dev.ext_hdr_sz;
+        iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) sreq->dev.ext_hdr_ptr;
+        iov[1].MPL_IOV_LEN = sreq->dev.ext_hdr_sz;
         n_iov++;
     }
 
-    MPIU_Assert(n_iov <= MPID_IOV_LIMIT);
-    MPIU_Assert(iov[0].MPID_IOV_LEN <= sizeof(MPIDI_CH3_Pkt_t));
+    MPIU_Assert(n_iov <= MPL_IOV_LIMIT);
+    MPIU_Assert(iov[0].MPL_IOV_LEN <= sizeof(MPIDI_CH3_Pkt_t));
 
     /* The sock channel uses a fixed length header, the size of which is the 
        maximum of all possible packet headers */
-    iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
+    iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
     MPIU_DBG_STMT(CH3_CHANNEL,VERBOSE,
-	 MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *)iov[0].MPID_IOV_BUF));
+	 MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *)iov[0].MPL_IOV_BUF));
 
     if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTED) /* MT */
     {
@@ -82,7 +82,7 @@ int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPID_Request * sreq,
 	    MPIU_DBG_MSG(CH3_CHANNEL,VERBOSE,
 			 "send queue empty, attempting to write");
 	    
-	    MPIU_DBG_PKT(vcch->conn,(MPIDI_CH3_Pkt_t*)iov[0].MPID_IOV_BUF,
+	    MPIU_DBG_PKT(vcch->conn,(MPIDI_CH3_Pkt_t*)iov[0].MPL_IOV_BUF,
 			 "isendv");
 	    /* MT - need some signalling to lock down our right to use the 
 	       channel, thus insuring that the progress engine does
@@ -102,9 +102,9 @@ int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPID_Request * sreq,
 		
 		while (offset < n_iov)
 		{
-		    if (iov[offset].MPID_IOV_LEN <= nb)
+		    if (iov[offset].MPL_IOV_LEN <= nb)
 		    {
-			nb -= iov[offset].MPID_IOV_LEN;
+			nb -= iov[offset].MPL_IOV_LEN;
 			offset++;
 		    }
 		    else
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
index 88bfd0d..29723a6 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
@@ -27,9 +27,9 @@ static MPID_Request * create_request(void * hdr, MPIDI_msg_sz_t hdr_sz,
     sreq->kind = MPID_REQUEST_SEND;
     MPIU_Assert(hdr_sz == sizeof(MPIDI_CH3_Pkt_t));
     sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) hdr;
-    sreq->dev.iov[0].MPID_IOV_BUF = 
-	(MPID_IOV_BUF_CAST)((char *) &sreq->dev.pending_pkt + nb);
-    sreq->dev.iov[0].MPID_IOV_LEN = hdr_sz - nb;
+    sreq->dev.iov[0].MPL_IOV_BUF = 
+	(MPL_IOV_BUF_CAST)((char *) &sreq->dev.pending_pkt + nb);
+    sreq->dev.iov[0].MPL_IOV_LEN = hdr_sz - nb;
     sreq->dev.iov_count = 1;
     sreq->dev.OnDataAvail = 0;
     
@@ -108,8 +108,8 @@ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, MPIDI_msg_sz_t hdr_sz,
 		    MPIU_DBG_MSG_FMT(CH3_CHANNEL,VERBOSE,
      (MPIU_DBG_FDEST,"posting write, vc=0x%p, sreq=0x%08x", vc, sreq->handle));
 		    vcch->conn->send_active = sreq;
-		    mpi_errno = MPIDU_Sock_post_write(vcch->conn->sock, sreq->dev.iov[0].MPID_IOV_BUF,
-						      sreq->dev.iov[0].MPID_IOV_LEN, sreq->dev.iov[0].MPID_IOV_LEN, NULL);
+		    mpi_errno = MPIDU_Sock_post_write(vcch->conn->sock, sreq->dev.iov[0].MPL_IOV_BUF,
+						      sreq->dev.iov[0].MPL_IOV_LEN, sreq->dev.iov[0].MPL_IOV_LEN, NULL);
 		    /* --BEGIN ERROR HANDLING-- */
 		    if (mpi_errno != MPI_SUCCESS)
 		    {
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
index eda2c53..79cb681 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
@@ -10,7 +10,7 @@
 #define FUNCNAME create_request
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-static MPID_Request * create_request(MPID_IOV * iov, int iov_count, 
+static MPID_Request * create_request(MPL_IOV * iov, int iov_count, 
 				     int iov_offset, MPIU_Size_t nb)
 {
     MPID_Request * sreq;
@@ -33,12 +33,12 @@ static MPID_Request * create_request(MPID_IOV * iov, int iov_count,
     }
     if (iov_offset == 0)
     {
-	MPIU_Assert(iov[0].MPID_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t));
-	sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPID_IOV_BUF;
-	sreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) &sreq->dev.pending_pkt;
+	MPIU_Assert(iov[0].MPL_IOV_LEN == sizeof(MPIDI_CH3_Pkt_t));
+	sreq->dev.pending_pkt = *(MPIDI_CH3_Pkt_t *) iov[0].MPL_IOV_BUF;
+	sreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) &sreq->dev.pending_pkt;
     }
-    sreq->dev.iov[iov_offset].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)((char *) sreq->dev.iov[iov_offset].MPID_IOV_BUF + nb);
-    sreq->dev.iov[iov_offset].MPID_IOV_LEN -= nb;
+    sreq->dev.iov[iov_offset].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)((char *) sreq->dev.iov[iov_offset].MPL_IOV_BUF + nb);
+    sreq->dev.iov[iov_offset].MPL_IOV_LEN -= nb;
     sreq->dev.iov_count = iov_count;
     sreq->dev.OnDataAvail = 0;
 
@@ -67,13 +67,13 @@ static MPID_Request * create_request(MPID_IOV * iov, int iov_count,
    CH3_iStartMsgv() is alway MPIDI_CH3_CA_COMPLETE.  This
    implies that CH3_iStartMsgv() can only be used when the entire message can 
    be described by a single iovec of size
-   MPID_IOV_LIMIT. */
+   MPL_IOV_LIMIT. */
     
 #undef FUNCNAME
 #define FUNCNAME MPIDI_CH3_iStartMsgv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPID_IOV * iov, int n_iov, 
+int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int n_iov, 
 			 MPID_Request ** sreq_ptr)
 {
     MPID_Request * sreq = NULL;
@@ -83,13 +83,13 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPID_IOV * iov, int n_iov,
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_ISTARTMSGV);
 
-    MPIU_Assert( n_iov <= MPID_IOV_LIMIT);
+    MPIU_Assert( n_iov <= MPL_IOV_LIMIT);
 
     /* The SOCK channel uses a fixed length header, the size of which is the 
        maximum of all possible packet headers */
-    iov[0].MPID_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
+    iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
     MPIU_DBG_STMT(CH3_CHANNEL,VERBOSE,
-	   MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t*)iov[0].MPID_IOV_BUF));
+	   MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t*)iov[0].MPL_IOV_BUF));
     
     if (vcch->state == MPIDI_CH3I_VC_STATE_CONNECTED) /* MT */
     {
@@ -102,7 +102,7 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPID_IOV * iov, int n_iov,
 
 	    MPIU_DBG_MSG(CH3_CHANNEL,VERBOSE,
 			 "send queue empty, attempting to write");
-	    MPIU_DBG_PKT(vcch->conn,(MPIDI_CH3_Pkt_t*)iov[0].MPID_IOV_BUF,"isend");
+	    MPIU_DBG_PKT(vcch->conn,(MPIDI_CH3_Pkt_t*)iov[0].MPL_IOV_BUF,"isend");
 	    
 	    /* MT - need some signalling to lock down our right to use the 
 	       channel, thus insuring that the progress engine does
@@ -117,9 +117,9 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPID_IOV * iov, int n_iov,
 		
 		while (offset < n_iov)
 		{
-		    if (nb >= (int)iov[offset].MPID_IOV_LEN)
+		    if (nb >= (int)iov[offset].MPL_IOV_LEN)
 		    {
-			nb -= iov[offset].MPID_IOV_LEN;
+			nb -= iov[offset].MPL_IOV_LEN;
 			offset++;
 		    }
 		    else
diff --git a/src/mpid/ch3/channels/sock/src/ch3_progress.c b/src/mpid/ch3/channels/sock/src/ch3_progress.c
index 77236b1..46d1108 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_progress.c
@@ -43,7 +43,7 @@ static int MPIDI_CH3I_Progress_handle_sock_event(MPIDU_Sock_event_t * event);
 static inline int connection_pop_sendq_req(MPIDI_CH3I_Connection_t * conn);
 static inline int connection_post_recv_pkt(MPIDI_CH3I_Connection_t * conn);
 
-static int adjust_iov(MPID_IOV ** iovp, int * countp, MPIU_Size_t nb);
+static int adjust_iov(MPL_IOV ** iovp, int * countp, MPIU_Size_t nb);
 
 #define MAX_PROGRESS_HOOKS 16
 typedef int (*progress_func_ptr_t) (int* made_progress);
@@ -620,7 +620,7 @@ static int MPIDI_CH3I_Progress_handle_sock_event(MPIDU_Sock_event_t * event)
 		{
 		    for(;;)
 		    {
-			MPID_IOV * iovp;
+			MPL_IOV * iovp;
 			MPIU_Size_t nb;
 				
 			iovp = sreq->dev.iov;
@@ -860,24 +860,24 @@ static inline int connection_post_recv_pkt(MPIDI_CH3I_Connection_t * conn)
 #define FUNCNAME adjust_iov
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-static int adjust_iov(MPID_IOV ** iovp, int * countp, MPIU_Size_t nb)
+static int adjust_iov(MPL_IOV ** iovp, int * countp, MPIU_Size_t nb)
 {
-    MPID_IOV * const iov = *iovp;
+    MPL_IOV * const iov = *iovp;
     const int count = *countp;
     int offset = 0;
     
     while (offset < count)
     {
-	if (iov[offset].MPID_IOV_LEN <= nb)
+	if (iov[offset].MPL_IOV_LEN <= nb)
 	{
-	    nb -= iov[offset].MPID_IOV_LEN;
+	    nb -= iov[offset].MPL_IOV_LEN;
 	    offset++;
 	}
 	else
 	{
-	    iov[offset].MPID_IOV_BUF = 
-		(MPID_IOV_BUF_CAST)((char *) iov[offset].MPID_IOV_BUF + nb);
-	    iov[offset].MPID_IOV_LEN -= nb;
+	    iov[offset].MPL_IOV_BUF = 
+		(MPL_IOV_BUF_CAST)((char *) iov[offset].MPL_IOV_BUF + nb);
+	    iov[offset].MPL_IOV_LEN -= nb;
 	    break;
 	}
     }
@@ -895,7 +895,7 @@ static int ReadMoreData( MPIDI_CH3I_Connection_t * conn, MPID_Request *rreq )
     int mpi_errno = MPI_SUCCESS;
     
     while (1) {
-	MPID_IOV * iovp;
+	MPL_IOV * iovp;
 	MPIU_Size_t nb;
 	
 	iovp = rreq->dev.iov;
diff --git a/src/mpid/ch3/include/mpid_rma_issue.h b/src/mpid/ch3/include/mpid_rma_issue.h
index c5f9d69..5862ae0 100644
--- a/src/mpid/ch3/include/mpid_rma_issue.h
+++ b/src/mpid/ch3/include/mpid_rma_issue.h
@@ -223,7 +223,7 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
     MPI_Datatype target_datatype;
     MPID_Datatype *target_dtp = NULL, *origin_dtp = NULL;
     int is_origin_contig;
-    MPID_IOV iov[MPID_IOV_LIMIT];
+    MPL_IOV iov[MPL_IOV_LIMIT];
     int iovcnt = 0;
     MPID_Request *req = NULL;
     MPI_Aint dt_true_lb;
@@ -268,8 +268,8 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
         dt_true_lb = 0;
     }
 
-    iov[iovcnt].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) & (rma_op->pkt);
-    iov[iovcnt].MPID_IOV_LEN = sizeof(rma_op->pkt);
+    iov[iovcnt].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) & (rma_op->pkt);
+    iov[iovcnt].MPL_IOV_LEN = sizeof(rma_op->pkt);
     iovcnt++;
 
     MPIDI_CH3_PKT_RMA_GET_FLAGS(rma_op->pkt, flags, mpi_errno);
@@ -282,9 +282,9 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
          */
 
         if (is_empty_origin == FALSE) {
-            iov[iovcnt].MPID_IOV_BUF =
-                (MPID_IOV_BUF_CAST) ((char *) rma_op->origin_addr + dt_true_lb + stream_offset);
-            iov[iovcnt].MPID_IOV_LEN = stream_size;
+            iov[iovcnt].MPL_IOV_BUF =
+                (MPL_IOV_BUF_CAST) ((char *) rma_op->origin_addr + dt_true_lb + stream_offset);
+            iov[iovcnt].MPL_IOV_LEN = stream_size;
             iovcnt++;
         }
 
@@ -333,9 +333,9 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
         /* origin data is contiguous */
 
         if (is_empty_origin == FALSE) {
-            iov[iovcnt].MPID_IOV_BUF =
-                (MPID_IOV_BUF_CAST) ((char *) rma_op->origin_addr + dt_true_lb + stream_offset);
-            iov[iovcnt].MPID_IOV_LEN = stream_size;
+            iov[iovcnt].MPL_IOV_BUF =
+                (MPL_IOV_BUF_CAST) ((char *) rma_op->origin_addr + dt_true_lb + stream_offset);
+            iov[iovcnt].MPL_IOV_LEN = stream_size;
             iovcnt++;
         }
 
@@ -359,7 +359,7 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
         req->dev.OnDataAvail = 0;
 
         MPIU_THREAD_CS_ENTER(CH3COMM, vc);
-        mpi_errno = vc->sendNoncontig_fn(vc, req, iov[0].MPID_IOV_BUF, iov[0].MPID_IOV_LEN);
+        mpi_errno = vc->sendNoncontig_fn(vc, req, iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN);
         MPIU_THREAD_CS_EXIT(CH3COMM, vc);
         MPIU_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
     }
@@ -884,7 +884,7 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
     MPID_Request *curr_req = NULL;
     MPIDI_CH3_Ext_pkt_get_derived_t *ext_hdr_ptr = NULL;
     MPI_Aint ext_hdr_sz = 0;
-    MPID_IOV iov[MPID_IOV_LIMIT];
+    MPL_IOV iov[MPL_IOV_LIMIT];
     MPIDI_STATE_DECL(MPID_STATE_ISSUE_GET_OP);
 
     MPIDI_RMA_FUNC_ENTER(MPID_STATE_ISSUE_GET_OP);
@@ -949,10 +949,10 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
         /* Set dataloop size in pkt header */
         MPIDI_CH3_PKT_RMA_SET_DATALOOP_SIZE(rma_op->pkt, dtp->dataloop_size, mpi_errno);
 
-        iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) get_pkt;
-        iov[0].MPID_IOV_LEN = sizeof(*get_pkt);
-        iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) ext_hdr_ptr;
-        iov[1].MPID_IOV_LEN = ext_hdr_sz;
+        iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_pkt;
+        iov[0].MPL_IOV_LEN = sizeof(*get_pkt);
+        iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ext_hdr_ptr;
+        iov[1].MPL_IOV_LEN = ext_hdr_sz;
 
         MPIU_THREAD_CS_ENTER(CH3COMM, vc);
         mpi_errno = MPIDI_CH3_iStartMsgv(vc, iov, 2, &req);
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index fcf5f33..e456b9c 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -32,9 +32,9 @@
 
 #include "mpid_sched.h"
 
-/* We need to match the size of MPIR_Pint to the relevant Format control
+/* We need to match the size of MPIU_Pint to the relevant Format control
  */
-#define MPIDI_MSG_SZ_FMT MPIR_PINT_FMT_DEC_SPEC
+#define MPIDI_MSG_SZ_FMT MPIU_PINT_FMT_DEC_SPEC
 
 #if !defined(MPIDI_IOV_DENSITY_MIN)
 #   define MPIDI_IOV_DENSITY_MIN (16 * 1024)
@@ -1016,7 +1016,7 @@ extern char *MPIDI_DBG_parent_str;
     }
 #   define MPIDI_err_printf(func, fmt, ...)				\
     {									\
-        MPIU_Error_printf("[%d] ERROR - %s(): " fmt "\n", MPIR_Process.comm_world->rank, func, __VA_ARGS__);    \
+        MPL_error_printf("[%d] ERROR - %s(): " fmt "\n", MPIR_Process.comm_world->rank, func, __VA_ARGS__);    \
         fflush(stdout);							\
     }
 #endif
@@ -1363,7 +1363,7 @@ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * pkt, MPIDI_msg_sz_t pkt_sz,
   If the send completes immediately, the channel implementation should return 
   NULL.
 @*/
-int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPID_IOV * iov, int iov_n, 
+int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int iov_n, 
 			 MPID_Request **sreq_ptr);
 
 
@@ -1427,7 +1427,7 @@ int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPID_Request * sreq, void * pkt,
   If the send completes immediately, the channel implementation still must 
   call the OnDataAvail routine in the request, if any.
 @*/
-int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPID_Request * sreq, MPID_IOV * iov, 
+int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPID_Request * sreq, MPL_IOV * iov, 
 		     int iov_n);
 
 /*@
@@ -1467,7 +1467,7 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr);
 
 
 int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq, 
-				     MPID_IOV * const iov, int * const iov_n);
+				     MPL_IOV * const iov, int * const iov_n);
 int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq);
 int MPIDI_CH3U_Request_unpack_uebuf(MPID_Request * rreq);
 int MPIDI_CH3U_Request_unpack_srbuf(MPID_Request * rreq);
@@ -1486,7 +1486,7 @@ int MPIDI_CH3U_Receive_data_unexpected(MPID_Request * rreq, char *buf, MPIDI_msg
 int MPIDI_CH3I_Comm_init(void);
 
 int MPIDI_CH3I_Comm_handle_failed_procs(MPID_Group *new_failed_procs);
-void MPIDI_CH3I_Comm_find(MPIR_Context_id_t context_id, MPID_Comm **comm);
+void MPIDI_CH3I_Comm_find(MPIU_Context_id_t context_id, MPID_Comm **comm);
 
 /* The functions below allow channels to register functions to be
    called immediately after a communicator has been created, and
diff --git a/src/mpid/ch3/include/mpidpkt.h b/src/mpid/ch3/include/mpidpkt.h
index 5dc1001..b3f1c38 100644
--- a/src/mpid/ch3/include/mpidpkt.h
+++ b/src/mpid/ch3/include/mpidpkt.h
@@ -842,7 +842,7 @@ typedef struct MPIDI_CH3_Pkt_close {
 
 typedef struct MPIDI_CH3_Pkt_revoke {
     MPIDI_CH3_Pkt_type_t type;
-    MPIR_Context_id_t revoked_comm;
+    MPIU_Context_id_t revoked_comm;
 } MPIDI_CH3_Pkt_revoke_t;
 
 typedef union MPIDI_CH3_Pkt {
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 19df355..1c6d5c5 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -19,7 +19,7 @@ struct MPID_Request;
 
 /* The maximum message size is the size of a pointer; this allows MPI_Aint 
    to be larger than a pointer */
-typedef MPIR_Pint MPIDI_msg_sz_t;
+typedef MPIU_Pint MPIDI_msg_sz_t;
 
 #include "mpid_dataloop.h"
 
@@ -87,7 +87,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 MPIR_Upint, so
+   use a union of the actual required structure with a MPIU_Upint, so
    in this optimized case, the "whole" field can be used for
    comparisons.
 
@@ -106,11 +106,11 @@ typedef MPIDI_Rank_t MPID_Node_id_t;
 typedef struct MPIDI_Message_match_parts {
     int32_t tag;
     MPIDI_Rank_t rank;
-    MPIR_Context_id_t context_id;
+    MPIU_Context_id_t context_id;
 } MPIDI_Message_match_parts_t;
 typedef union {
     MPIDI_Message_match_parts_t parts;
-    MPIR_Upint whole;
+    MPIU_Upint whole;
 } MPIDI_Message_match;
 
 /* Provides MPIDI_CH3_Pkt_t.  Must come after MPIDI_Message_match definition. */
@@ -387,7 +387,7 @@ typedef struct MPIDI_Request {
 
     /* iov and iov_count define the data to be transferred/received.  
        iov_offset points to the current head element in the IOV */
-    MPID_IOV iov[MPID_IOV_LIMIT];
+    MPL_IOV iov[MPL_IOV_LIMIT];
     int iov_count;
     size_t iov_offset;
 
diff --git a/src/mpid/ch3/src/ch3u_comm.c b/src/mpid/ch3/src/ch3u_comm.c
index 13e94c3..b355ce2 100644
--- a/src/mpid/ch3/src/ch3u_comm.c
+++ b/src/mpid/ch3/src/ch3u_comm.c
@@ -572,7 +572,7 @@ int MPIDI_CH3I_Comm_handle_failed_procs(MPID_Group *new_failed_procs)
     goto fn_exit;
 }
 
-void MPIDI_CH3I_Comm_find(MPIR_Context_id_t context_id, MPID_Comm **comm)
+void MPIDI_CH3I_Comm_find(MPIU_Context_id_t context_id, MPID_Comm **comm)
 {
     MPIDI_STATE_DECL(MPIDI_STATE_MPIDI_CH3I_COMM_FIND);
     MPIDI_FUNC_ENTER(MPIDI_STATE_MPIDI_CH3I_COMM_FIND);
diff --git a/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c b/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c
index a959b7f..658cd4d 100644
--- a/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c
+++ b/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c
@@ -256,7 +256,7 @@ int MPIDI_Comm_spawn_multiple(int count, char **commands,
     }
 
     if (errcodes != MPI_ERRCODES_IGNORE) {
-        mpir_errflag_t errflag = MPIR_ERR_NONE;
+        MPIR_Errflag_t errflag = MPIR_ERR_NONE;
         mpi_errno = MPIR_Bcast_impl(&should_accept, 1, MPI_INT, root, comm_ptr, &errflag);
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
diff --git a/src/mpid/ch3/src/ch3u_eager.c b/src/mpid/ch3/src/ch3u_eager.c
index 843db2f..4f37aa0 100644
--- a/src/mpid/ch3/src/ch3u_eager.c
+++ b/src/mpid/ch3/src/ch3u_eager.c
@@ -25,15 +25,15 @@ int MPIDI_CH3_SendNoncontig_iov( MPIDI_VC_t *vc, MPID_Request *sreq,
 {
     int mpi_errno = MPI_SUCCESS;
     int iov_n;
-    MPID_IOV iov[MPID_IOV_LIMIT];
+    MPL_IOV iov[MPL_IOV_LIMIT];
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_SENDNONCONTIG_IOV);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_SENDNONCONTIG_IOV);
 
-    iov[0].MPID_IOV_BUF = header;
-    iov[0].MPID_IOV_LEN = hdr_sz;
+    iov[0].MPL_IOV_BUF = header;
+    iov[0].MPL_IOV_LEN = hdr_sz;
 
-    iov_n = MPID_IOV_LIMIT - 1;
+    iov_n = MPL_IOV_LIMIT - 1;
 
     if (sreq->dev.ext_hdr_sz > 0) {
         /* When extended packet header exists, here we leave one IOV slot
@@ -161,7 +161,7 @@ int MPIDI_CH3_EagerContigSend( MPID_Request **sreq_p,
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_eager_send_t * const eager_pkt = &upkt.eager_send;
     MPID_Request *sreq = *sreq_p;
-    MPID_IOV iov[2];
+    MPL_IOV iov[2];
     
     MPIDI_Pkt_init(eager_pkt, reqtype);
     eager_pkt->match.parts.rank	= comm->rank;
@@ -170,15 +170,15 @@ int MPIDI_CH3_EagerContigSend( MPID_Request **sreq_p,
     eager_pkt->sender_req_id	= MPI_REQUEST_NULL;
     eager_pkt->data_sz		= data_sz;
     
-    iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)eager_pkt;
-    iov[0].MPID_IOV_LEN = sizeof(*eager_pkt);
+    iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)eager_pkt;
+    iov[0].MPL_IOV_LEN = sizeof(*eager_pkt);
     
     MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
 	       "sending contiguous eager message, data_sz=" MPIDI_MSG_SZ_FMT,
 					data_sz));
 	    
-    iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) buf;
-    iov[1].MPID_IOV_LEN = data_sz;
+    iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) buf;
+    iov[1].MPL_IOV_LEN = data_sz;
     
     MPIDI_Comm_get_vc_set_active(comm, rank, &vc);
     MPIDI_VC_FAI_send_seqnum(vc, seqnum);
@@ -535,7 +535,7 @@ int MPIDI_CH3_EagerContigIsend( MPID_Request **sreq_p,
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_eager_send_t * const eager_pkt = &upkt.eager_send;
     MPID_Request *sreq = *sreq_p;
-    MPID_IOV iov[MPID_IOV_LIMIT];
+    MPL_IOV iov[MPL_IOV_LIMIT];
 
     MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
 	       "sending contiguous eager message, data_sz=" MPIDI_MSG_SZ_FMT,
@@ -550,11 +550,11 @@ int MPIDI_CH3_EagerContigIsend( MPID_Request **sreq_p,
     eager_pkt->sender_req_id	= sreq->handle;
     eager_pkt->data_sz		= data_sz;
     
-    iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)eager_pkt;
-    iov[0].MPID_IOV_LEN = sizeof(*eager_pkt);
+    iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)eager_pkt;
+    iov[0].MPL_IOV_LEN = sizeof(*eager_pkt);
     
-    iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) buf;
-    iov[1].MPID_IOV_LEN = data_sz;
+    iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) buf;
+    iov[1].MPL_IOV_LEN = data_sz;
     
     MPIDI_Comm_get_vc_set_active(comm, rank, &vc);
     MPIDI_VC_FAI_send_seqnum(vc, seqnum);
@@ -854,7 +854,7 @@ int MPIDI_CH3_PktPrint_EagerShortSend( FILE *fp, MPIDI_CH3_Pkt_t *pkt )
 	int i;
 	if (datalen > 32) datalen = 32;
 	for (i=0; i<datalen; i++) {
-	    MPIU_Snprintf( &databytes[2*i], 64 - 2*i, "%2x", p[i] );
+	    MPL_snprintf( &databytes[2*i], 64 - 2*i, "%2x", p[i] );
 	}
 	MPIU_DBG_PRINTF((" data ......... %s\n", databytes));
     }
diff --git a/src/mpid/ch3/src/ch3u_eagersync.c b/src/mpid/ch3/src/ch3u_eagersync.c
index 32d3877..3a1b9d9 100644
--- a/src/mpid/ch3/src/ch3u_eagersync.c
+++ b/src/mpid/ch3/src/ch3u_eagersync.c
@@ -63,15 +63,15 @@ int MPIDI_CH3_EagerSyncNoncontigSend( MPID_Request **sreq_p,
 
     if (dt_contig)
     {
-        MPID_IOV iov[2];
+        MPL_IOV iov[2];
 	MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
                                             "sending contiguous sync eager message, data_sz=" MPIDI_MSG_SZ_FMT, 
 					    data_sz));
 	
-        iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)es_pkt;
-        iov[0].MPID_IOV_LEN = sizeof(*es_pkt);
-	iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) ((char *)buf + dt_true_lb);
-	iov[1].MPID_IOV_LEN = data_sz;	
+        iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)es_pkt;
+        iov[0].MPL_IOV_LEN = sizeof(*es_pkt);
+	iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ((char *)buf + dt_true_lb);
+	iov[1].MPL_IOV_LEN = data_sz;	
 	
 	MPIU_THREAD_CS_ENTER(CH3COMM,vc);
 	mpi_errno = MPIDI_CH3_iSendv(vc, sreq, iov, 2);
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_pkt.c b/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
index f5d5c8d..45b3ea1 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
@@ -158,9 +158,9 @@ int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, MPIDI_msg_sz_t
         {
             MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"IOV loaded for contiguous read");
             
-            rreq->dev.iov[0].MPID_IOV_BUF = 
-                (MPID_IOV_BUF_CAST)((char*)(rreq->dev.user_buf) + dt_true_lb);
-            rreq->dev.iov[0].MPID_IOV_LEN = data_sz;
+            rreq->dev.iov[0].MPL_IOV_BUF = 
+                (MPL_IOV_BUF_CAST)((char*)(rreq->dev.user_buf) + dt_true_lb);
+            rreq->dev.iov[0].MPL_IOV_LEN = data_sz;
             rreq->dev.iov_count = 1;
             *buflen = 0;
             *complete = FALSE;
@@ -266,8 +266,8 @@ int MPIDI_CH3U_Receive_data_unexpected(MPID_Request * rreq, char *buf, MPIDI_msg
     }
     else
     {
-        rreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)((char *)rreq->dev.tmpbuf);
-        rreq->dev.iov[0].MPID_IOV_LEN = rreq->dev.recv_data_sz;
+        rreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)((char *)rreq->dev.tmpbuf);
+        rreq->dev.iov[0].MPL_IOV_LEN = rreq->dev.recv_data_sz;
         rreq->dev.iov_count = 1;
         rreq->dev.recv_pending_count = 2;
         *buflen = 0;
@@ -333,9 +333,9 @@ int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreq)
 	   entire message.  However, we haven't yet *read* the data 
 	   (this code describes how to read the data into the destination) */
 	MPIU_DBG_MSG(CH3_OTHER,VERBOSE,"IOV loaded for contiguous read");
-	rreq->dev.iov[0].MPID_IOV_BUF = 
-	    (MPID_IOV_BUF_CAST)((char*)(rreq->dev.user_buf) + dt_true_lb);
-	rreq->dev.iov[0].MPID_IOV_LEN = data_sz;
+	rreq->dev.iov[0].MPL_IOV_BUF = 
+	    (MPL_IOV_BUF_CAST)((char*)(rreq->dev.user_buf) + dt_true_lb);
+	rreq->dev.iov[0].MPL_IOV_LEN = data_sz;
 	rreq->dev.iov_count = 1;
 	/* FIXME: We want to set the OnDataAvail to the appropriate 
 	   function, which depends on whether this is an RMA 
@@ -390,8 +390,8 @@ int MPIDI_CH3U_Post_data_receive_unexpected(MPID_Request * rreq)
     }
     rreq->dev.tmpbuf_sz = rreq->dev.recv_data_sz;
     
-    rreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)rreq->dev.tmpbuf;
-    rreq->dev.iov[0].MPID_IOV_LEN = rreq->dev.recv_data_sz;
+    rreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)rreq->dev.tmpbuf;
+    rreq->dev.iov[0].MPL_IOV_LEN = rreq->dev.recv_data_sz;
     rreq->dev.iov_count = 1;
     rreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_UnpackUEBufComplete;
     rreq->dev.recv_pending_count = 2;
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index 5b3923e..f985300 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -258,7 +258,7 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_get_accum_resp_t *get_accum_resp_pkt = &upkt.get_accum_resp;
     MPID_Request *resp_req;
-    MPID_IOV iov[MPID_IOV_LIMIT];
+    MPL_IOV iov[MPL_IOV_LIMIT];
     int iovcnt;
     int is_contig;
     MPI_Datatype basic_type;
@@ -376,10 +376,10 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq
      * operation are completed when counter reaches zero. */
     win_ptr->at_completion_counter++;
 
-    iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) get_accum_resp_pkt;
-    iov[0].MPID_IOV_LEN = sizeof(*get_accum_resp_pkt);
-    iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) ((char *) resp_req->dev.user_buf);
-    iov[1].MPID_IOV_LEN = stream_data_len;
+    iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_accum_resp_pkt;
+    iov[0].MPL_IOV_LEN = sizeof(*get_accum_resp_pkt);
+    iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ((char *) resp_req->dev.user_buf);
+    iov[1].MPL_IOV_LEN = stream_data_len;
     iovcnt = 2;
 
     MPIU_THREAD_CS_ENTER(CH3COMM, vc);
@@ -430,7 +430,7 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq, i
     MPID_Win *win_ptr = NULL;
     MPI_Aint type_size;
     MPID_Request *resp_req = NULL;
-    MPID_IOV iov[MPID_IOV_LIMIT];
+    MPL_IOV iov[MPL_IOV_LIMIT];
     int iovcnt;
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_fop_resp_t *fop_resp_pkt = &upkt.fop_resp;
@@ -516,10 +516,10 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq, i
         (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
         fop_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
 
-    iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) fop_resp_pkt;
-    iov[0].MPID_IOV_LEN = sizeof(*fop_resp_pkt);
-    iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) ((char *) resp_req->dev.user_buf);
-    iov[1].MPID_IOV_LEN = type_size;
+    iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) fop_resp_pkt;
+    iov[0].MPL_IOV_LEN = sizeof(*fop_resp_pkt);
+    iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ((char *) resp_req->dev.user_buf);
+    iov[1].MPL_IOV_LEN = type_size;
     iovcnt = 2;
 
     MPIU_THREAD_CS_ENTER(CH3COMM, vc);
@@ -1188,7 +1188,7 @@ static inline int perform_get_in_lock_queue(MPID_Win * win_ptr,
     MPI_Aint type_size;
     size_t len;
     int iovcnt;
-    MPID_IOV iov[MPID_IOV_LIMIT];
+    MPL_IOV iov[MPL_IOV_LIMIT];
     int is_contig;
     int mpi_errno = MPI_SUCCESS;
 
@@ -1245,8 +1245,8 @@ static inline int perform_get_in_lock_queue(MPID_Win * win_ptr,
             MPIU_ERR_POP(mpi_errno);
 
         /* All origin data is in packet header, issue the header. */
-        iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) get_resp_pkt;
-        iov[0].MPID_IOV_LEN = sizeof(*get_resp_pkt);
+        iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_resp_pkt;
+        iov[0].MPL_IOV_LEN = sizeof(*get_resp_pkt);
         iovcnt = 1;
 
         mpi_errno = MPIDI_CH3_iSendv(target_lock_entry->vc, sreq, iov, iovcnt);
@@ -1256,10 +1256,10 @@ static inline int perform_get_in_lock_queue(MPID_Win * win_ptr,
         }
     }
     else if (is_contig) {
-        iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) get_resp_pkt;
-        iov[0].MPID_IOV_LEN = sizeof(*get_resp_pkt);
-        iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) (get_pkt->addr);
-        iov[1].MPID_IOV_LEN = get_pkt->count * type_size;
+        iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_resp_pkt;
+        iov[0].MPL_IOV_LEN = sizeof(*get_resp_pkt);
+        iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) (get_pkt->addr);
+        iov[1].MPL_IOV_LEN = get_pkt->count * type_size;
         iovcnt = 2;
 
         mpi_errno = MPIDI_CH3_iSendv(target_lock_entry->vc, sreq, iov, iovcnt);
@@ -1269,8 +1269,8 @@ static inline int perform_get_in_lock_queue(MPID_Win * win_ptr,
         }
     }
     else {
-        iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) get_resp_pkt;
-        iov[0].MPID_IOV_LEN = sizeof(*get_resp_pkt);
+        iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_resp_pkt;
+        iov[0].MPL_IOV_LEN = sizeof(*get_resp_pkt);
 
         sreq->dev.segment_ptr = MPID_Segment_alloc();
         MPIU_ERR_CHKANDJUMP1(sreq->dev.segment_ptr == NULL, mpi_errno,
@@ -1282,8 +1282,8 @@ static inline int perform_get_in_lock_queue(MPID_Win * win_ptr,
         sreq->dev.segment_size = get_pkt->count * type_size;
 
         mpi_errno = target_lock_entry->vc->sendNoncontig_fn(target_lock_entry->vc, sreq,
-                                                            iov[0].MPID_IOV_BUF,
-                                                            iov[0].MPID_IOV_LEN);
+                                                            iov[0].MPL_IOV_BUF,
+                                                            iov[0].MPL_IOV_LEN);
         MPIU_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
     }
 
@@ -1363,7 +1363,7 @@ static inline int perform_get_acc_in_lock_queue(MPID_Win * win_ptr,
     MPI_Aint type_size;
     size_t len;
     int iovcnt;
-    MPID_IOV iov[MPID_IOV_LIMIT];
+    MPL_IOV iov[MPL_IOV_LIMIT];
     int is_contig;
     int mpi_errno = MPI_SUCCESS;
     MPI_Aint type_extent;
@@ -1443,8 +1443,8 @@ static inline int perform_get_acc_in_lock_queue(MPID_Win * win_ptr,
         win_ptr->at_completion_counter++;
 
         /* All origin data is in packet header, issue the header. */
-        iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) get_accum_resp_pkt;
-        iov[0].MPID_IOV_LEN = sizeof(*get_accum_resp_pkt);
+        iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_accum_resp_pkt;
+        iov[0].MPL_IOV_LEN = sizeof(*get_accum_resp_pkt);
         iovcnt = 1;
 
         mpi_errno = MPIDI_CH3_iSendv(target_lock_entry->vc, sreq, iov, iovcnt);
@@ -1526,10 +1526,10 @@ static inline int perform_get_acc_in_lock_queue(MPID_Win * win_ptr,
         get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
     get_accum_resp_pkt->target_rank = win_ptr->comm_ptr->rank;
 
-    iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) get_accum_resp_pkt;
-    iov[0].MPID_IOV_LEN = sizeof(*get_accum_resp_pkt);
-    iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) ((char *) sreq->dev.user_buf);
-    iov[1].MPID_IOV_LEN = recv_count * type_size;
+    iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_accum_resp_pkt;
+    iov[0].MPL_IOV_LEN = sizeof(*get_accum_resp_pkt);
+    iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ((char *) sreq->dev.user_buf);
+    iov[1].MPL_IOV_LEN = recv_count * type_size;
     iovcnt = 2;
 
     mpi_errno = MPIDI_CH3_iSendv(target_lock_entry->vc, sreq, iov, iovcnt);
@@ -1553,7 +1553,7 @@ static inline int perform_fop_in_lock_queue(MPID_Win * win_ptr,
     MPIDI_CH3_Pkt_fop_t *fop_pkt = &((target_lock_entry->pkt).fop);
     MPID_Request *resp_req = NULL;
     MPI_Aint type_size;
-    MPID_IOV iov[MPID_IOV_LIMIT];
+    MPL_IOV iov[MPL_IOV_LIMIT];
     int iovcnt;
     int is_contig;
     int mpi_errno = MPI_SUCCESS;
@@ -1689,10 +1689,10 @@ static inline int perform_fop_in_lock_queue(MPID_Win * win_ptr,
         }
     }
     else {
-        iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) fop_resp_pkt;
-        iov[0].MPID_IOV_LEN = sizeof(*fop_resp_pkt);
-        iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) ((char *) resp_req->dev.user_buf);
-        iov[1].MPID_IOV_LEN = type_size;
+        iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) fop_resp_pkt;
+        iov[0].MPL_IOV_LEN = sizeof(*fop_resp_pkt);
+        iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ((char *) resp_req->dev.user_buf);
+        iov[1].MPL_IOV_LEN = type_size;
         iovcnt = 2;
 
         mpi_errno = MPIDI_CH3_iSendv(target_lock_entry->vc, resp_req, iov, iovcnt);
diff --git a/src/mpid/ch3/src/ch3u_handle_send_req.c b/src/mpid/ch3/src/ch3u_handle_send_req.c
index 47cfb3c..201f900 100644
--- a/src/mpid/ch3/src/ch3u_handle_send_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_send_req.c
@@ -317,7 +317,7 @@ int MPIDI_CH3_ReqHandler_SendReloadIOV(MPIDI_VC_t * vc ATTRIBUTE((unused)), MPID
     /* setting the iov_offset to 0 here is critical, since it is intentionally
      * not set in the _load_send_iov function */
     sreq->dev.iov_offset = 0;
-    sreq->dev.iov_count = MPID_IOV_LIMIT;
+    sreq->dev.iov_count = MPL_IOV_LIMIT;
     mpi_errno = MPIDI_CH3U_Request_load_send_iov(sreq, sreq->dev.iov, &sreq->dev.iov_count);
     if (mpi_errno != MPI_SUCCESS) {
         MPIU_ERR_SETFATALANDJUMP(mpi_errno, MPI_ERR_OTHER, "**ch3|loadsendiov");
diff --git a/src/mpid/ch3/src/ch3u_port.c b/src/mpid/ch3/src/ch3u_port.c
index 29a1f6c..3850c62 100644
--- a/src/mpid/ch3/src/ch3u_port.c
+++ b/src/mpid/ch3/src/ch3u_port.c
@@ -264,8 +264,8 @@ static int MPIDI_CH3I_Initialize_tmp_comm(MPID_Comm **comm_pptr,
 
     /* sanity: the INVALID context ID value could potentially conflict with the
      * dynamic proccess space */
-    MPIU_Assert(tmp_comm->context_id     != MPIR_INVALID_CONTEXT_ID);
-    MPIU_Assert(tmp_comm->recvcontext_id != MPIR_INVALID_CONTEXT_ID);
+    MPIU_Assert(tmp_comm->context_id     != MPIU_INVALID_CONTEXT_ID);
+    MPIU_Assert(tmp_comm->recvcontext_id != MPIU_INVALID_CONTEXT_ID);
 
     /* FIXME - we probably need a unique context_id. */
     tmp_comm->remote_size = 1;
@@ -343,8 +343,8 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
     pg_translation *local_translation = NULL, *remote_translation = NULL;
     pg_node *pg_list = NULL;
     MPIDI_PG_t **remote_pg = NULL;
-    MPIR_Context_id_t recvcontext_id = MPIR_INVALID_CONTEXT_ID;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIU_Context_id_t recvcontext_id = MPIU_INVALID_CONTEXT_ID;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIU_CHKLMEM_DECL(3);
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_COMM_CONNECT);
 
@@ -528,7 +528,7 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
             if (mpi_errno2) MPIU_ERR_SET(mpi_errno2, MPI_ERR_OTHER, "**fail");
         }
 
-        if (recvcontext_id != MPIR_INVALID_CONTEXT_ID)
+        if (recvcontext_id != MPIU_INVALID_CONTEXT_ID)
             MPIR_Free_contextid(recvcontext_id);
         
         if (mpi_errno2) MPIU_ERR_ADD(mpi_errno, mpi_errno2);
@@ -690,7 +690,7 @@ static int ReceivePGAndDistribute( MPID_Comm *tmp_comm, MPID_Comm *comm_ptr,
     int  rank = comm_ptr->rank;
     int  mpi_errno = 0;
     int  recvtag = *recvtag_p;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIDI_STATE_DECL(MPID_STATE_RECEIVEPGANDDISTRIBUTE);
 
     MPIDI_FUNC_ENTER(MPID_STATE_RECEIVEPGANDDISTRIBUTE);
@@ -766,7 +766,7 @@ int MPID_PG_BCast( MPID_Comm *peercomm_p, MPID_Comm *comm_p, int root )
     pg_translation *local_translation = 0;
     pg_node *pg_list, *pg_next, *pg_head = 0;
     int rank, i, peer_comm_size;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIU_CHKLMEM_DECL(1);
 
     peer_comm_size = comm_p->local_size;
@@ -870,7 +870,7 @@ static int SendPGtoPeerAndFree( MPID_Comm *tmp_comm, int *sendtag_p,
     int mpi_errno = 0;
     int sendtag = *sendtag_p, i;
     pg_node *pg_iter;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIDI_STATE_DECL(MPID_STATE_SENDPGTOPEERANDFREE);
 
     MPIDI_FUNC_ENTER(MPID_STATE_SENDPGTOPEERANDFREE);
@@ -939,7 +939,7 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
     pg_translation *local_translation = NULL, *remote_translation = NULL;
     pg_node *pg_list = NULL;
     MPIDI_PG_t **remote_pg = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIU_CHKLMEM_DECL(3);
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_COMM_ACCEPT);
 
@@ -1149,7 +1149,7 @@ static int SetupNewIntercomm( MPID_Comm *comm_ptr, int remote_comm_size,
 			      MPID_Comm *intercomm )
 {
     int mpi_errno = MPI_SUCCESS, i;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     /* FIXME: How much of this could/should be common with the
        upper level (src/mpi/comm/ *.c) code? For best robustness, 
        this should use the same routine (not copy/paste code) as
diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index 3f59267..3b15262 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -1179,7 +1179,7 @@ static char *tag_val_to_str(int tag, char *out, int max)
         MPIU_Strncpy(out, "MPI_ANY_TAG", max);
     }
     else {
-        MPIU_Snprintf(out, max, "%d", tag);
+        MPL_snprintf(out, max, "%d", tag);
     }
     return out;
 }
@@ -1191,7 +1191,7 @@ static char *rank_val_to_str(int rank, char *out, int max)
         MPIU_Strncpy(out, "MPI_ANY_SOURCE", max);
     }
     else {
-        MPIU_Snprintf(out, max, "%d", rank);
+        MPL_snprintf(out, max, "%d", rank);
     }
     return out;
 }
diff --git a/src/mpid/ch3/src/ch3u_request.c b/src/mpid/ch3/src/ch3u_request.c
index fe7bfd3..67a04d3 100644
--- a/src/mpid/ch3/src/ch3u_request.c
+++ b/src/mpid/ch3/src/ch3u_request.c
@@ -138,7 +138,7 @@ MPID_Request * MPID_Request_create(void)
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq, 
-				     MPID_IOV * const iov, int * const iov_n)
+				     MPL_IOV * const iov, int * const iov_n)
 {
     MPI_Aint last;
     int mpi_errno = MPI_SUCCESS;
@@ -152,13 +152,13 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
 		      sreq->dev.segment_first, last, *iov_n));
     MPIU_Assert(sreq->dev.segment_first < last);
     MPIU_Assert(last > 0);
-    MPIU_Assert(*iov_n > 0 && *iov_n <= MPID_IOV_LIMIT);
+    MPIU_Assert(*iov_n > 0 && *iov_n <= MPL_IOV_LIMIT);
     MPID_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, 
 			     &last, iov, iov_n);
     MPIU_DBG_MSG_FMT(CH3_CHANNEL,VERBOSE,(MPIU_DBG_FDEST,
     "post-pv: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT ", iov_n=%d",
 		      sreq->dev.segment_first, last, *iov_n));
-    MPIU_Assert(*iov_n > 0 && *iov_n <= MPID_IOV_LIMIT);
+    MPIU_Assert(*iov_n > 0 && *iov_n <= MPL_IOV_LIMIT);
     
     if (last == sreq->dev.segment_size)
     {
@@ -198,8 +198,8 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
 	iov_data_copied = 0;
 	for (i = 0; i < *iov_n; i++) {
 	    MPIU_Memcpy((char*) sreq->dev.tmpbuf + iov_data_copied, 
-		   iov[i].MPID_IOV_BUF, iov[i].MPID_IOV_LEN);
-	    iov_data_copied += iov[i].MPID_IOV_LEN;
+		   iov[i].MPL_IOV_BUF, iov[i].MPL_IOV_LEN);
+	    iov_data_copied += iov[i].MPL_IOV_LEN;
 	}
 	sreq->dev.segment_first = last;
 
@@ -214,8 +214,8 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
 	MPIU_DBG_MSG_FMT(CH3_CHANNEL,VERBOSE,(MPIU_DBG_FDEST,
               "post-pack: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT,
 			   sreq->dev.segment_first, last));
-	iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)sreq->dev.tmpbuf;
-	iov[0].MPID_IOV_LEN = last - sreq->dev.segment_first + iov_data_copied;
+	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;
 	*iov_n = 1;
 	if (last == sreq->dev.segment_size)
 	{
@@ -288,10 +288,10 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
 	    {
 		data_sz = tmpbuf_sz;
 	    }
-	    rreq->dev.iov[0].MPID_IOV_BUF = 
-		(MPID_IOV_BUF_CAST)((char *) rreq->dev.tmpbuf + 
+	    rreq->dev.iov[0].MPL_IOV_BUF = 
+		(MPL_IOV_BUF_CAST)((char *) rreq->dev.tmpbuf + 
 				    rreq->dev.tmpbuf_off);
-	    rreq->dev.iov[0].MPID_IOV_LEN = data_sz;
+	    rreq->dev.iov[0].MPL_IOV_LEN = data_sz;
             rreq->dev.iov_offset = 0;
 	    rreq->dev.iov_count = 1;
 	    MPIU_Assert(rreq->dev.segment_first - orig_segment_first + data_sz +
@@ -314,7 +314,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
 	}
 	
 	last = rreq->dev.segment_size;
-	rreq->dev.iov_count = MPID_IOV_LIMIT;
+	rreq->dev.iov_count = MPL_IOV_LIMIT;
 	rreq->dev.iov_offset = 0;
 	MPIU_DBG_MSG_FMT(CH3_CHANNEL,VERBOSE,(MPIU_DBG_FDEST,
    "pre-upv: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT ", iov_n=%d",
@@ -328,7 +328,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
    "post-upv: first=" MPIDI_MSG_SZ_FMT ", last=" MPIDI_MSG_SZ_FMT ", 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 <= 
-		    MPID_IOV_LIMIT);
+		    MPL_IOV_LIMIT);
 
 	/* --BEGIN ERROR HANDLING-- */
 	if (rreq->dev.iov_count == 0)
@@ -425,7 +425,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
 	{
 	    MPIU_DBG_MSG(CH3_CHANNEL,VERBOSE,
 	    "updating rreq to read overflow data into the SRBuf and complete");
-	    rreq->dev.iov[0].MPID_IOV_LEN = data_sz;
+	    rreq->dev.iov[0].MPL_IOV_LEN = data_sz;
 	    MPIU_Assert(MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_RECV);
 	    /* Eventually, use OnFinal for this instead */
 	    rreq->dev.OnDataAvail = rreq->dev.OnFinal;
@@ -435,12 +435,12 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
 	{
 	    MPIU_DBG_MSG(CH3_CHANNEL,VERBOSE,
 	  "updating rreq to read overflow data into the SRBuf and reload IOV");
-	    rreq->dev.iov[0].MPID_IOV_LEN = rreq->dev.tmpbuf_sz;
+	    rreq->dev.iov[0].MPL_IOV_LEN = rreq->dev.tmpbuf_sz;
 	    rreq->dev.segment_first += rreq->dev.tmpbuf_sz;
 	    rreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_ReloadIOV;
 	}
 	
-	rreq->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)rreq->dev.tmpbuf;
+	rreq->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)rreq->dev.tmpbuf;
 	rreq->dev.iov_count = 1;
     }
     
diff --git a/src/mpid/ch3/src/ch3u_rma_pkthandler.c b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
index c4f631e..615f3ff 100644
--- a/src/mpid/ch3/src/ch3u_rma_pkthandler.c
+++ b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
@@ -397,10 +397,10 @@ int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
                 }
             }
             else {
-                req->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) ((char *) req->dev.ext_hdr_ptr);
-                req->dev.iov[0].MPID_IOV_LEN = req->dev.ext_hdr_sz;
-                req->dev.iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) req->dev.dataloop;
-                req->dev.iov[1].MPID_IOV_LEN = put_pkt->info.dataloop_size;
+                req->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ((char *) req->dev.ext_hdr_ptr);
+                req->dev.iov[0].MPL_IOV_LEN = req->dev.ext_hdr_sz;
+                req->dev.iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.dataloop;
+                req->dev.iov[1].MPL_IOV_LEN = put_pkt->info.dataloop_size;
                 req->dev.iov_count = 2;
 
                 *buflen = sizeof(MPIDI_CH3_Pkt_t);
@@ -436,7 +436,7 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 {
     MPIDI_CH3_Pkt_get_t *get_pkt = &pkt->get;
     MPID_Request *req = NULL;
-    MPID_IOV iov[MPID_IOV_LIMIT];
+    MPL_IOV iov[MPL_IOV_LIMIT];
     int complete = 0;
     char *data_buf = NULL;
     MPIDI_msg_sz_t data_len;
@@ -521,8 +521,8 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
             if (mpi_errno != MPI_SUCCESS)
                 MPIU_ERR_POP(mpi_errno);
 
-            iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) get_resp_pkt;
-            iov[0].MPID_IOV_LEN = sizeof(*get_resp_pkt);
+            iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_resp_pkt;
+            iov[0].MPL_IOV_LEN = sizeof(*get_resp_pkt);
             iovcnt = 1;
 
             MPIU_THREAD_CS_ENTER(CH3COMM, vc);
@@ -536,10 +536,10 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
             /* --END ERROR HANDLING-- */
         }
         else if (is_contig) {
-            iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) get_resp_pkt;
-            iov[0].MPID_IOV_LEN = sizeof(*get_resp_pkt);
-            iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) ((char *) get_pkt->addr);
-            iov[1].MPID_IOV_LEN = get_pkt->count * type_size;
+            iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_resp_pkt;
+            iov[0].MPL_IOV_LEN = sizeof(*get_resp_pkt);
+            iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ((char *) get_pkt->addr);
+            iov[1].MPL_IOV_LEN = get_pkt->count * type_size;
             iovcnt = 2;
 
             MPIU_THREAD_CS_ENTER(CH3COMM, vc);
@@ -553,8 +553,8 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
             /* --END ERROR HANDLING-- */
         }
         else {
-            iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) get_resp_pkt;
-            iov[0].MPID_IOV_LEN = sizeof(*get_resp_pkt);
+            iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_resp_pkt;
+            iov[0].MPL_IOV_LEN = sizeof(*get_resp_pkt);
 
             req->dev.segment_ptr = MPID_Segment_alloc();
             MPIU_ERR_CHKANDJUMP1(req->dev.segment_ptr == NULL, mpi_errno,
@@ -566,7 +566,7 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
             req->dev.segment_size = get_pkt->count * type_size;
 
             MPIU_THREAD_CS_ENTER(CH3COMM, vc);
-            mpi_errno = vc->sendNoncontig_fn(vc, req, iov[0].MPID_IOV_BUF, iov[0].MPID_IOV_LEN);
+            mpi_errno = vc->sendNoncontig_fn(vc, req, iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN);
             MPIU_THREAD_CS_EXIT(CH3COMM, vc);
             MPIU_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
         }
@@ -621,10 +621,10 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
                 *rreqp = NULL;
         }
         else {
-            req->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) ((char *) req->dev.ext_hdr_ptr);
-            req->dev.iov[0].MPID_IOV_LEN = req->dev.ext_hdr_sz;
-            req->dev.iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) req->dev.dataloop;
-            req->dev.iov[1].MPID_IOV_LEN = get_pkt->info.dataloop_size;
+            req->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) ((char *) req->dev.ext_hdr_ptr);
+            req->dev.iov[0].MPL_IOV_LEN = req->dev.ext_hdr_sz;
+            req->dev.iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.dataloop;
+            req->dev.iov[1].MPL_IOV_LEN = get_pkt->info.dataloop_size;
             req->dev.iov_count = 2;
 
             *buflen = sizeof(MPIDI_CH3_Pkt_t);
@@ -739,8 +739,8 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
                 req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete;
 
                 /* if this is a streamed op pkt, set iov to receive extended pkt header. */
-                req->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) req->dev.ext_hdr_ptr;
-                req->dev.iov[0].MPID_IOV_LEN = req->dev.ext_hdr_sz;
+                req->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.ext_hdr_ptr;
+                req->dev.iov[0].MPL_IOV_LEN = req->dev.ext_hdr_sz;
                 req->dev.iov_count = 1;
 
                 *buflen = sizeof(MPIDI_CH3_Pkt_t);
@@ -826,10 +826,10 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
             else {
                 /* Prepare to receive extended header.
                  * All variable-length data can be received in separate iovs. */
-                req->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) req->dev.ext_hdr_ptr;
-                req->dev.iov[0].MPID_IOV_LEN = req->dev.ext_hdr_sz;
-                req->dev.iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) req->dev.dataloop;
-                req->dev.iov[1].MPID_IOV_LEN = accum_pkt->info.dataloop_size;
+                req->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.ext_hdr_ptr;
+                req->dev.iov[0].MPL_IOV_LEN = req->dev.ext_hdr_sz;
+                req->dev.iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.dataloop;
+                req->dev.iov[1].MPL_IOV_LEN = accum_pkt->info.dataloop_size;
                 req->dev.iov_count = 2;
 
                 *buflen = sizeof(MPIDI_CH3_Pkt_t);
@@ -895,7 +895,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         MPID_Request *resp_req = NULL;
         MPIDI_CH3_Pkt_t upkt;
         MPIDI_CH3_Pkt_get_accum_resp_t *get_accum_resp_pkt = &upkt.get_accum_resp;
-        MPID_IOV iov[MPID_IOV_LIMIT];
+        MPL_IOV iov[MPL_IOV_LIMIT];
         int iovcnt;
         MPI_Aint type_size;
 
@@ -959,8 +959,8 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         if (mpi_errno)
             MPIU_ERR_POP(mpi_errno);
 
-        iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) get_accum_resp_pkt;
-        iov[0].MPID_IOV_LEN = sizeof(*get_accum_resp_pkt);
+        iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) get_accum_resp_pkt;
+        iov[0].MPL_IOV_LEN = sizeof(*get_accum_resp_pkt);
         iovcnt = 1;
 
         MPIU_THREAD_CS_ENTER(CH3COMM, vc);
@@ -1013,8 +1013,8 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
                 req->dev.OnDataAvail = MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete;
 
                 /* if this is a streamed op pkt, set iov to receive extended pkt header. */
-                req->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) req->dev.ext_hdr_ptr;
-                req->dev.iov[0].MPID_IOV_LEN = req->dev.ext_hdr_sz;
+                req->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.ext_hdr_ptr;
+                req->dev.iov[0].MPL_IOV_LEN = req->dev.ext_hdr_sz;
                 req->dev.iov_count = 1;
 
                 *buflen = sizeof(MPIDI_CH3_Pkt_t);
@@ -1113,10 +1113,10 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
             else {
                 /* Prepare to receive extended header.
                  * All variable-length data can be received in separate iovs. */
-                req->dev.iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) req->dev.ext_hdr_ptr;
-                req->dev.iov[0].MPID_IOV_LEN = req->dev.ext_hdr_sz;
-                req->dev.iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) req->dev.dataloop;
-                req->dev.iov[1].MPID_IOV_LEN = get_accum_pkt->info.dataloop_size;
+                req->dev.iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.ext_hdr_ptr;
+                req->dev.iov[0].MPL_IOV_LEN = req->dev.ext_hdr_sz;
+                req->dev.iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) req->dev.dataloop;
+                req->dev.iov[1].MPL_IOV_LEN = get_accum_pkt->info.dataloop_size;
                 req->dev.iov_count = 2;
 
                 *buflen = sizeof(MPIDI_CH3_Pkt_t);
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 9782422..4c28fee 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -482,7 +482,7 @@ int MPID_Win_fence(int assert, MPID_Win * win_ptr)
 {
     int i;
     MPIDI_RMA_Target_t *curr_target = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     int comm_size = win_ptr->comm_ptr->local_size;
     int scalable_fence_enabled = 0;
     int *rma_target_marks = NULL;
diff --git a/src/mpid/ch3/src/ch3u_rndv.c b/src/mpid/ch3/src/ch3u_rndv.c
index 249b063..8f6b05e 100644
--- a/src/mpid/ch3/src/ch3u_rndv.c
+++ b/src/mpid/ch3/src/ch3u_rndv.c
@@ -239,17 +239,17 @@ int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
     
     if (dt_contig) 
     {
-	MPID_IOV iov[MPID_IOV_LIMIT];
+	MPL_IOV iov[MPL_IOV_LIMIT];
 
 	MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
 		    "sending contiguous rndv data, data_sz=" MPIDI_MSG_SZ_FMT, 
 					    data_sz));
 	
-	iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)rs_pkt;
-	iov[0].MPID_IOV_LEN = sizeof(*rs_pkt);
+	iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)rs_pkt;
+	iov[0].MPL_IOV_LEN = sizeof(*rs_pkt);
 	
-	iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)((char *)sreq->dev.user_buf + dt_true_lb);
-	iov[1].MPID_IOV_LEN = data_sz;
+	iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)((char *)sreq->dev.user_buf + dt_true_lb);
+	iov[1].MPL_IOV_LEN = data_sz;
 
         MPIU_THREAD_CS_ENTER(CH3COMM,vc);
 	mpi_errno = MPIDI_CH3_iSendv(vc, sreq, iov, 2);
diff --git a/src/mpid/ch3/src/ch3u_win_fns.c b/src/mpid/ch3/src/ch3u_win_fns.c
index b155b17..f2a5840 100644
--- a/src/mpid/ch3/src/ch3u_win_fns.c
+++ b/src/mpid/ch3/src/ch3u_win_fns.c
@@ -43,7 +43,7 @@ int MPIDI_CH3U_Win_gather_info(void *base, MPI_Aint size, int disp_unit,
 {
     int mpi_errno = MPI_SUCCESS, i, k, comm_size, rank;
     MPI_Aint *tmp_buf;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIU_CHKPMEM_DECL(1);
     MPIU_CHKLMEM_DECL(1);
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_WIN_GATHER_INFO);
diff --git a/src/mpid/ch3/src/mpid_abort.c b/src/mpid/ch3/src/mpid_abort.c
index e4a9369..edf416a 100644
--- a/src/mpid/ch3/src/mpid_abort.c
+++ b/src/mpid/ch3/src/mpid_abort.c
@@ -15,7 +15,7 @@
 /* FIXME: We should move this into a header file so that we don't
    need the ifdef.  Also, don't use exit (add to coding check) since
    not safe in windows.  To avoid confusion, define a RobustExit? or
-   MPIU_Exit? */
+   MPL_exit? */
 #ifdef HAVE_WINDOWS_H
 /* exit can hang if libc fflushes output while in/out/err buffers are locked
    (this must be a bug in exit?).  ExitProcess does not hang (what does this
@@ -67,12 +67,12 @@ int MPID_Abort(MPID_Comm * comm, int mpi_errno, int exit_code,
 	{
 	    MPIR_Err_get_string(mpi_errno, msg, MPI_MAX_ERROR_STRING, NULL);
 	    /* FIXME: Not internationalized */
-	    MPIU_Snprintf(error_str, sizeof(error_str), "internal ABORT - process %d: %s", rank, msg);
+	    MPL_snprintf(error_str, sizeof(error_str), "internal ABORT - process %d: %s", rank, msg);
 	}
 	else
 	{
 	    /* FIXME: Not internationalized */
-	    MPIU_Snprintf(error_str, sizeof(error_str), "internal ABORT - process %d", rank);
+	    MPL_snprintf(error_str, sizeof(error_str), "internal ABORT - process %d", rank);
 	}
     }
     
@@ -90,7 +90,7 @@ int MPID_Abort(MPID_Comm * comm, int mpi_errno, int exit_code,
      * where the stdout/stderr pipes from MPICH to the PM are
      * broken), but not all PMs might display respect the message
      * (this problem was noticed with SLURM). */
-    MPIU_Error_printf("%s\n", error_msg);
+    MPL_error_printf("%s\n", error_msg);
     fflush(stderr);
 
     /* FIXME: What is the scope for PMI_Abort?  Shouldn't it be one or more
@@ -107,7 +107,7 @@ int MPID_Abort(MPID_Comm * comm, int mpi_errno, int exit_code,
     /* pmi_abort should not return but if it does, exit here.  If it does,
        add the function exit code before calling the final exit.  */
     MPIDI_FUNC_EXIT(MPID_STATE_MPID_ABORT);
-    MPIU_Exit(exit_code);
+    MPL_exit(exit_code);
 
     return MPI_ERR_INTERN;
 }
diff --git a/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c b/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c
index b2cf6bb..c7ef355 100644
--- a/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c
+++ b/src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c
@@ -89,7 +89,7 @@ static MPID_Group *bitarray_to_group(MPID_Comm *comm_ptr, int *bitarray)
 int MPID_Comm_get_all_failed_procs(MPID_Comm *comm_ptr, MPID_Group **failed_group, int tag)
 {
     int mpi_errno = MPI_SUCCESS, ret_errno;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     int i, j, bitarray_size;
     int *bitarray, *remote_bitarray;
     MPID_Group *local_fail;
diff --git a/src/mpid/ch3/src/mpid_comm_revoke.c b/src/mpid/ch3/src/mpid_comm_revoke.c
index c0e5304..0e8fc86 100644
--- a/src/mpid/ch3/src/mpid_comm_revoke.c
+++ b/src/mpid/ch3/src/mpid_comm_revoke.c
@@ -22,7 +22,7 @@
 int MPID_Comm_revoke(MPID_Comm *comm_ptr, int is_remote)
 {
     MPIDI_VC_t *vc;
-    MPID_IOV iov[MPID_IOV_LIMIT];
+    MPL_IOV iov[MPL_IOV_LIMIT];
     int mpi_errno = MPI_SUCCESS;
     int i, size, my_rank;
     MPID_Request *request;
@@ -59,8 +59,8 @@ int MPID_Comm_revoke(MPID_Comm *comm_ptr, int is_remote)
 
             MPIDI_Comm_get_vc_set_active(comm_ptr, i, &vc);
 
-            iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) revoke_pkt;
-            iov[0].MPID_IOV_LEN = sizeof(*revoke_pkt);
+            iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) revoke_pkt;
+            iov[0].MPL_IOV_LEN = sizeof(*revoke_pkt);
 
             MPIU_THREAD_CS_ENTER(CH3COMM, vc);
             mpi_errno = MPIDI_CH3_iStartMsgv(vc, iov, 1, &request);
diff --git a/src/mpid/ch3/src/mpid_getpname.c b/src/mpid/ch3/src/mpid_getpname.c
index 87dcbe5..e8dcc70 100644
--- a/src/mpid/ch3/src/mpid_getpname.c
+++ b/src/mpid/ch3/src/mpid_getpname.c
@@ -100,7 +100,7 @@ static inline void setupProcessorName( void );
 static inline void setupProcessorName( void );
 {
     /* Set the name as the rank of the process */
-    MPIU_Snprintf( processorName, MPI_MAX_PROCESSOR_NAME, "%d", 
+    MPL_snprintf( processorName, MPI_MAX_PROCESSOR_NAME, "%d", 
 		   MPIDI_Process.my_pg_rank );
     processorNameLen = (int)strlen( processorName );
 }
diff --git a/src/mpid/ch3/src/mpid_vc.c b/src/mpid/ch3/src/mpid_vc.c
index 4715fdb..83ef54b 100644
--- a/src/mpid/ch3/src/mpid_vc.c
+++ b/src/mpid/ch3/src/mpid_vc.c
@@ -410,7 +410,7 @@ int MPID_GPID_ToLpidArray( int size, int gpid[], int lpid[] )
 		/* Internal error.  This gpid is unknown on this process */
 		/* A printf is NEVER valid in code that might be executed
 		   by the user, even in an error case (use 
-		   MPIU_Internal_error_printf if you need to print
+		   MPL_internal_error_printf if you need to print
 		   an error message and its not appropriate to use the
 		   regular error code system */
 		/* printf("No matching pg foung for id = %d\n", pgid ); */
@@ -552,7 +552,7 @@ int MPID_PG_ForwardPGInfo( MPID_Comm *peer_ptr, MPID_Comm *comm_ptr,
     int i, allfound = 1, pgid, pgidWorld;
     MPIDI_PG_t *pg = 0;
     MPIDI_PG_iterator iter;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     
     /* Get the pgid for CommWorld (always attached to the first process 
        group) */
@@ -710,7 +710,7 @@ static int publish_node_id(MPIDI_PG_t *pg, int our_pg_rank)
     if (pg->size > 1)
     {
         memset(key, 0, key_max_sz);
-        MPIU_Snprintf(key, key_max_sz, "hostname[%d]", our_pg_rank);
+        MPL_snprintf(key, key_max_sz, "hostname[%d]", our_pg_rank);
 
         pmi_errno = PMI_KVS_Put(kvs_name, key, MPIU_hostname);
         MPIU_ERR_CHKANDJUMP1(pmi_errno != PMI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**pmi_kvs_put", "**pmi_kvs_put %d", pmi_errno);
@@ -1202,12 +1202,12 @@ int MPIDI_Populate_vc_node_ids(MPIDI_PG_t *pg, int our_pg_rank)
         if (i == our_pg_rank)
         {
             /* This is us, no need to perform a get */
-            MPIU_Snprintf(node_names[g_num_nodes], key_max_sz, "%s", MPIU_hostname);
+            MPL_snprintf(node_names[g_num_nodes], key_max_sz, "%s", MPIU_hostname);
         }
         else
         {
             memset(key, 0, key_max_sz);
-            MPIU_Snprintf(key, key_max_sz, "hostname[%d]", i);
+            MPL_snprintf(key, key_max_sz, "hostname[%d]", i);
 
             pmi_errno = PMI_KVS_Get(kvs_name, key, node_names[g_num_nodes], key_max_sz);
             MPIU_ERR_CHKANDJUMP1(pmi_errno != PMI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**pmi_kvs_get", "**pmi_kvs_get %d", pmi_errno);
diff --git a/src/mpid/ch3/src/mpidi_pg.c b/src/mpid/ch3/src/mpidi_pg.c
index f31cc27..e58cc15 100644
--- a/src/mpid/ch3/src/mpidi_pg.c
+++ b/src/mpid/ch3/src/mpidi_pg.c
@@ -595,7 +595,7 @@ int MPIDI_PG_SetConnInfo( int rank, const char *connString )
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_PG_SetConnInfo);
 
-    len = MPIU_Snprintf(key, sizeof(key), "P%d-businesscard", rank);
+    len = MPL_snprintf(key, sizeof(key), "P%d-businesscard", rank);
     MPIU_ERR_CHKANDJUMP1(len < 0 || len > sizeof(key), mpi_errno, MPI_ERR_OTHER, "**snprintf", "**snprintf %d", len);
 
     mpi_errno = PMI2_KVS_Put(key, connString);
@@ -620,7 +620,7 @@ int MPIDI_PG_SetConnInfo( int rank, const char *connString )
 
     MPIU_Assert(pg_world->connData);
     
-    len = MPIU_Snprintf(key, sizeof(key), "P%d-businesscard", rank);
+    len = MPL_snprintf(key, sizeof(key), "P%d-businesscard", rank);
     if (len < 0 || len > sizeof(key)) {
 	MPIU_ERR_SETANDJUMP1(mpi_errno,MPI_ERR_OTHER, "**snprintf",
 			     "**snprintf %d", len);
@@ -682,7 +682,7 @@ static int getConnInfoKVS( int rank, char *buf, int bufsize, MPIDI_PG_t *pg )
     int  mpi_errno = MPI_SUCCESS, rc;
     int vallen;
 
-    rc = MPIU_Snprintf(key, MPIDI_MAX_KVS_KEY_LEN, "P%d-businesscard", rank );
+    rc = MPL_snprintf(key, MPIDI_MAX_KVS_KEY_LEN, "P%d-businesscard", rank );
     if (rc < 0 || rc > MPIDI_MAX_KVS_KEY_LEN) {
 	MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
     }
@@ -701,7 +701,7 @@ static int getConnInfoKVS( int rank, char *buf, int bufsize, MPIDI_PG_t *pg )
     char key[MPIDI_MAX_KVS_KEY_LEN];
     int  mpi_errno = MPI_SUCCESS, rc, pmi_errno;
 
-    rc = MPIU_Snprintf(key, MPIDI_MAX_KVS_KEY_LEN, "P%d-businesscard", rank );
+    rc = MPL_snprintf(key, MPIDI_MAX_KVS_KEY_LEN, "P%d-businesscard", rank );
     if (rc < 0 || rc > MPIDI_MAX_KVS_KEY_LEN) {
 	MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
     }
@@ -747,14 +747,14 @@ static int connToStringKVS( char **buf_p, int *slen, MPIDI_PG_t *pg )
     string[len++] = 0;
     
     /* Add the size of the pg */
-    MPIU_Snprintf( &string[len], curSlen - len, "%d", pg->size );
+    MPL_snprintf( &string[len], curSlen - len, "%d", pg->size );
     while (string[len]) len++;
     len++;
 
     for (i=0; i<pg->size; i++) {
 	rc = getConnInfoKVS( i, buf, MPIDI_MAX_KVS_VALUE_LEN, pg );
 	if (rc) {
-	    MPIU_Internal_error_printf( 
+	    MPL_internal_error_printf( 
 		    "Panic: getConnInfoKVS failed for %s (rc=%d)\n", 
 		    (char *)pg->id, rc );
 	}
@@ -946,7 +946,7 @@ static int connToString( char **buf_p, int *slen, MPIDI_PG_t *pg )
     while (*pg_id) str[len++] = *pg_id++;
     str[len++] = 0;
     
-    MPIU_Snprintf( &str[len], 20, "%d", pg->size);
+    MPL_snprintf( &str[len], 20, "%d", pg->size);
     /* Skip over the length */
     while (str[len++]);
 
@@ -1098,7 +1098,7 @@ int MPIDI_PG_GetConnString( MPIDI_PG_t *pg, int rank, char *val, int vallen )
 	mpi_errno = (*pg->getConnInfo)( rank, val, vallen, pg );
     }
     else {
-	MPIU_Internal_error_printf( "Panic: no getConnInfo defined!\n" );
+	MPL_internal_error_printf( "Panic: no getConnInfo defined!\n" );
     }
 
     return mpi_errno;
diff --git a/src/mpid/ch3/src/mpidi_printf.c b/src/mpid/ch3/src/mpidi_printf.c
index da0ddd8..83be2dc 100644
--- a/src/mpid/ch3/src/mpidi_printf.c
+++ b/src/mpid/ch3/src/mpidi_printf.c
@@ -237,14 +237,14 @@ const char *MPIDI_Pkt_GetDescString(MPIDI_CH3_Pkt_t * pkt)
     /* For data messages, the string (...) is (context,tag,rank,size) */
     switch (pkt->type) {
     case MPIDI_CH3_PKT_EAGER_SEND:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg),
+        MPL_snprintf(pktmsg, sizeof(pktmsg),
                       "EAGER_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
                       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:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg),
+        MPL_snprintf(pktmsg, sizeof(pktmsg),
                       "EAGER_SYNC_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
                       pkt->eager_sync_send.match.parts.context_id,
                       (int) pkt->eager_sync_send.match.parts.tag,
@@ -252,18 +252,18 @@ const char *MPIDI_Pkt_GetDescString(MPIDI_CH3_Pkt_t * pkt)
                       pkt->eager_sync_send.data_sz, pkt->eager_sync_send.sender_req_id);
         break;
     case MPIDI_CH3_PKT_EAGER_SYNC_ACK:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg),
+        MPL_snprintf(pktmsg, sizeof(pktmsg),
                       "EAGER_SYNC_ACK - req=%d", pkt->eager_sync_ack.sender_req_id);
         break;
     case MPIDI_CH3_PKT_READY_SEND:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg),
+        MPL_snprintf(pktmsg, sizeof(pktmsg),
                       "READY_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
                       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:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg),
+        MPL_snprintf(pktmsg, sizeof(pktmsg),
                       "RNDV_REQ_TO_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
                       pkt->rndv_req_to_send.match.parts.context_id,
                       (int) pkt->rndv_req_to_send.match.parts.tag,
@@ -271,61 +271,61 @@ const char *MPIDI_Pkt_GetDescString(MPIDI_CH3_Pkt_t * pkt)
                       pkt->rndv_req_to_send.data_sz, pkt->rndv_req_to_send.sender_req_id);
         break;
     case MPIDI_CH3_PKT_RNDV_CLR_TO_SEND:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg),
+        MPL_snprintf(pktmsg, sizeof(pktmsg),
                       "RNDV_CLRTO_SEND - req=%d, recv req=%d",
                       pkt->rndv_clr_to_send.sender_req_id, pkt->rndv_clr_to_send.receiver_req_id);
         break;
     case MPIDI_CH3_PKT_RNDV_SEND:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg),
+        MPL_snprintf(pktmsg, sizeof(pktmsg),
                       "RNDV_SEND - recv req=%d", pkt->rndv_send.receiver_req_id);
         break;
     case MPIDI_CH3_PKT_CANCEL_SEND_REQ:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg),
+        MPL_snprintf(pktmsg, sizeof(pktmsg),
                       "CANCEL_SEND_REQ - req=%d", pkt->cancel_send_req.sender_req_id);
         break;
     case MPIDI_CH3_PKT_CANCEL_SEND_RESP:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg),
+        MPL_snprintf(pktmsg, sizeof(pktmsg),
                       "CANCEL_SEND_RESP - req=%d ack=%d",
                       pkt->cancel_send_resp.sender_req_id, pkt->cancel_send_resp.ack);
         break;
     case MPIDI_CH3_PKT_PUT:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg),
+        MPL_snprintf(pktmsg, sizeof(pktmsg),
                       "PUT - (%p,%d,0x%08X)",
                       pkt->put.addr, pkt->put.count, pkt->put.target_win_handle);
         break;
     case MPIDI_CH3_PKT_GET:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg),
+        MPL_snprintf(pktmsg, sizeof(pktmsg),
                       "GET - (%p,%d,0x%08X) req=%d",
                       pkt->get.addr,
                       pkt->get.count, pkt->get.target_win_handle, pkt->get.request_handle);
         break;
     case MPIDI_CH3_PKT_GET_RESP:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg), "GET_RESP - req=%d", pkt->get_resp.request_handle);
+        MPL_snprintf(pktmsg, sizeof(pktmsg), "GET_RESP - req=%d", pkt->get_resp.request_handle);
         break;
     case MPIDI_CH3_PKT_ACCUMULATE:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg),
+        MPL_snprintf(pktmsg, sizeof(pktmsg),
                       "ACCUMULATE - (%p,%d,0x%08X)",
                       pkt->accum.addr, pkt->accum.count, pkt->accum.target_win_handle);
         break;
     case MPIDI_CH3_PKT_LOCK:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg), "LOCK - %d", pkt->lock.target_win_handle);
+        MPL_snprintf(pktmsg, sizeof(pktmsg), "LOCK - %d", pkt->lock.target_win_handle);
         break;
     case MPIDI_CH3_PKT_ACK:
         /* There is no rma_done packet type */
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg), "RMA_DONE - 0x%08X", pkt->ack.source_win_handle);
+        MPL_snprintf(pktmsg, sizeof(pktmsg), "RMA_DONE - 0x%08X", pkt->ack.source_win_handle);
         break;
     case MPIDI_CH3_PKT_LOCK_ACK:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg), "LOCK_ACK - 0x%08X", pkt->lock_ack.source_win_handle);
+        MPL_snprintf(pktmsg, sizeof(pktmsg), "LOCK_ACK - 0x%08X", pkt->lock_ack.source_win_handle);
         break;
     case MPIDI_CH3_PKT_FLOW_CNTL_UPDATE:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg), "FLOW_CNTL_UPDATE");
+        MPL_snprintf(pktmsg, sizeof(pktmsg), "FLOW_CNTL_UPDATE");
         break;
     case MPIDI_CH3_PKT_CLOSE:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg), "CLOSE ack=%d", pkt->close.ack);
+        MPL_snprintf(pktmsg, sizeof(pktmsg), "CLOSE ack=%d", pkt->close.ack);
         break;
 
     default:
-        MPIU_Snprintf(pktmsg, sizeof(pktmsg), "INVALID PACKET type=%d", pkt->type);
+        MPL_snprintf(pktmsg, sizeof(pktmsg), "INVALID PACKET type=%d", pkt->type);
         break;
     }
 
diff --git a/src/mpid/ch3/src/mpidi_rma.c b/src/mpid/ch3/src/mpidi_rma.c
index a114c3c..43f4948 100644
--- a/src/mpid/ch3/src/mpidi_rma.c
+++ b/src/mpid/ch3/src/mpidi_rma.c
@@ -148,7 +148,7 @@ int MPID_Win_free(MPID_Win ** win_ptr)
     int mpi_errno = MPI_SUCCESS;
     int in_use;
     MPID_Comm *comm_ptr;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_FREE);
 
     MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_FREE);
diff --git a/src/mpid/ch3/util/ftb/ftb.c b/src/mpid/ch3/util/ftb/ftb.c
index 5d8693c..ecf4e16 100644
--- a/src/mpid/ch3/util/ftb/ftb.c
+++ b/src/mpid/ch3/util/ftb/ftb.c
@@ -103,7 +103,7 @@ void MPIDU_Ftb_publish_vc(const char *event_name, struct MPIDI_VC *vc)
     char payload[FTB_MAX_PAYLOAD_DATA] = "";
 
     if (vc && vc->pg)  /* pg can be null for temp VCs (dynamic processes) */
-        MPIU_Snprintf(payload, sizeof(payload), "[id: {%s:{%d}}]", (char*)vc->pg->id, vc->pg_rank);
+        MPL_snprintf(payload, sizeof(payload), "[id: {%s:{%d}}]", (char*)vc->pg->id, vc->pg_rank);
     MPIDU_Ftb_publish(event_name, payload);
     return;
 }
@@ -117,7 +117,7 @@ void MPIDU_Ftb_publish_me(const char *event_name)
 {
     char payload[FTB_MAX_PAYLOAD_DATA] = "";
 
-    MPIU_Snprintf(payload, sizeof(payload), "[id: {%s:{%d}}]", (char *)MPIDI_Process.my_pg->id, MPIDI_Process.my_pg_rank);
+    MPL_snprintf(payload, sizeof(payload), "[id: {%s:{%d}}]", (char *)MPIDI_Process.my_pg->id, MPIDI_Process.my_pg_rank);
     MPIDU_Ftb_publish(event_name, payload);
     return;
 }
diff --git a/src/mpid/ch3/util/sock/ch3u_connect_sock.c b/src/mpid/ch3/util/sock/ch3u_connect_sock.c
index 3f2f486..89835b3 100644
--- a/src/mpid/ch3/util/sock/ch3u_connect_sock.c
+++ b/src/mpid/ch3/util/sock/ch3u_connect_sock.c
@@ -479,7 +479,7 @@ int MPIDI_CH3U_Get_business_card_sock(int myRank,
 	info = gethostbyname( ifname );
 	if (info && info->h_addr_list) {
 	    p = (unsigned char *)(info->h_addr_list[0]);
-	    MPIU_Snprintf( ifname, sizeof(ifname), "%u.%u.%u.%u", 
+	    MPL_snprintf( ifname, sizeof(ifname), "%u.%u.%u.%u", 
 			   p[0], p[1], p[2], p[3] );
 	    MPIU_DBG_MSG_S(CH3_CONNECT,VERBOSE,"ifname = %s",ifname );
 	    str_errno = MPIU_Str_add_string_arg( bc_val_p,
@@ -500,7 +500,7 @@ int MPIDI_CH3U_Get_business_card_sock(int myRank,
 	unsigned char *p;
 	if (ifaddr.len > 0 && ifaddr.type == AF_INET) {
 	    p = (unsigned char *)(ifaddr.ifaddr);
-	    MPIU_Snprintf( ifname, sizeof(ifname), "%u.%u.%u.%u", 
+	    MPL_snprintf( ifname, sizeof(ifname), "%u.%u.%u.%u", 
 			   p[0], p[1], p[2], p[3] );
 	    MPIU_DBG_MSG_S(CH3_CONNECT,VERBOSE,"ifname = %s",ifname );
 	    str_errno = MPIU_Str_add_string_arg( bc_val_p,
@@ -1315,11 +1315,11 @@ static int connection_post_send_pkt_and_pgid(MPIDI_CH3I_Connection_t * conn)
 
     MPIDI_FUNC_ENTER(MPID_STATE_CONNECTION_POST_SEND_PKT_AND_PGID);
     
-    conn->iov[0].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) &conn->pkt;
-    conn->iov[0].MPID_IOV_LEN = (int) sizeof(conn->pkt);
+    conn->iov[0].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) &conn->pkt;
+    conn->iov[0].MPL_IOV_LEN = (int) sizeof(conn->pkt);
 
-    conn->iov[1].MPID_IOV_BUF = (MPID_IOV_BUF_CAST) MPIDI_Process.my_pg->id;
-    conn->iov[1].MPID_IOV_LEN = (int) strlen(MPIDI_Process.my_pg->id) + 1;
+    conn->iov[1].MPL_IOV_BUF = (MPL_IOV_BUF_CAST) MPIDI_Process.my_pg->id;
+    conn->iov[1].MPL_IOV_LEN = (int) strlen(MPIDI_Process.my_pg->id) + 1;
 
     MPIU_DBG_PKT(conn,&conn->pkt,"connect-pgid");
     mpi_errno = MPIDU_Sock_post_writev(conn->sock, conn->iov, 2, NULL);
@@ -1400,7 +1400,7 @@ const char * MPIDI_CH3_VC_SockGetStateString( struct MPIDI_VC *vc )
     case MPIDI_CH3I_VC_STATE_CONNECTED:   name = "CH3I_VC_STATE_CONNECTED"; break;
     case MPIDI_CH3I_VC_STATE_FAILED:      name = "CH3I_VC_STATE_FAILED"; break;
     default:
-	MPIU_Snprintf( asdigits, sizeof(asdigits), "%d", state );
+	MPL_snprintf( asdigits, sizeof(asdigits), "%d", state );
 	asdigits[20-1] = 0;
 	name = (const char *)asdigits;
     }
diff --git a/src/mpid/ch3/util/sock/ch3u_getinterfaces.c b/src/mpid/ch3/util/sock/ch3u_getinterfaces.c
index 2719799..4e849d7 100644
--- a/src/mpid/ch3/util/sock/ch3u_getinterfaces.c
+++ b/src/mpid/ch3/util/sock/ch3u_getinterfaces.c
@@ -87,7 +87,7 @@ int MPIDU_CH3U_GetSockInterfaceAddr( int myRank, char *ifname, int maxIfname,
 	   the process manager only delievers the same values for the 
 	   environment to each process */
 	char namebuf[1024];
-	MPIU_Snprintf( namebuf, sizeof(namebuf), 
+	MPL_snprintf( namebuf, sizeof(namebuf), 
 		       "MPICH_INTERFACE_HOSTNAME_R%d", myRank );
 	ifname_string = getenv( namebuf );
 	if (dbg_ifname && ifname_string) {
diff --git a/src/mpid/ch3/util/sock/ch3usock.h b/src/mpid/ch3/util/sock/ch3usock.h
index 8de0f22..e29bb2f 100644
--- a/src/mpid/ch3/util/sock/ch3usock.h
+++ b/src/mpid/ch3/util/sock/ch3usock.h
@@ -38,7 +38,7 @@ typedef struct MPIDI_CH3I_Connection
     struct MPID_Request * recv_active;
     MPIDI_CH3_Pkt_t pkt;
     char * pg_id;
-    MPID_IOV iov[2];
+    MPL_IOV iov[2];
 } MPIDI_CH3I_Connection_t;
 
 
diff --git a/src/mpid/common/datatype/mpid_dataloop.h b/src/mpid/common/datatype/mpid_dataloop.h
index 0bb2456..9cdd623 100644
--- a/src/mpid/common/datatype/mpid_dataloop.h
+++ b/src/mpid/common/datatype/mpid_dataloop.h
@@ -23,9 +23,9 @@
 #define DLOOP_Handle     MPI_Datatype
 #define DLOOP_Type       MPI_Datatype
 #define DLOOP_Buffer     void *
-#define DLOOP_VECTOR     MPID_IOV
-#define DLOOP_VECTOR_LEN MPID_IOV_LEN
-#define DLOOP_VECTOR_BUF MPID_IOV_BUF
+#define DLOOP_VECTOR     MPL_IOV
+#define DLOOP_VECTOR_LEN MPL_IOV_LEN
+#define DLOOP_VECTOR_BUF MPL_IOV_BUF
 #define DLOOP_Size       MPI_Aint
 
 /* The following accessor functions must also be defined:
@@ -74,7 +74,7 @@
     ((HANDLE_GET_KIND(handle_) == HANDLE_KIND_BUILTIN) ? 0 : 1)
 
 #define DLOOP_Ensure_Offset_fits_in_pointer(value_) \
-    MPID_Ensure_Aint_fits_in_pointer(value_)
+    MPIU_Ensure_Aint_fits_in_pointer(value_)
 
 /* allocate and free functions must also be defined. */
 #define DLOOP_Malloc MPIU_Malloc
diff --git a/src/mpid/common/datatype/mpid_ext32_segment.c b/src/mpid/common/datatype/mpid_ext32_segment.c
index d7898c6..d1fe2fa 100644
--- a/src/mpid/common/datatype/mpid_ext32_segment.c
+++ b/src/mpid/common/datatype/mpid_ext32_segment.c
@@ -111,7 +111,7 @@ static int external32_basic_convert(char *dest_buf,
     else
     {
         /* TODO */
-	MPIU_Error_printf( "Conversion of types whose size is not the same as the size in external32 is not supported\n" );
+	MPL_error_printf( "Conversion of types whose size is not the same as the size in external32 is not supported\n" );
 	MPID_Abort( 0, MPI_SUCCESS, 1, "Aborting with internal error" );
 	/* There is no way to return an error code, so an abort is the 
 	   only choice (the return value of this routine is not 
@@ -159,7 +159,7 @@ static int external32_float_convert(char *dest_buf,
     else
     {
         /* TODO */
-	MPIU_Error_printf( "Conversion of types whose size is not the same as the size in external32 is not supported\n" );
+	MPL_error_printf( "Conversion of types whose size is not the same as the size in external32 is not supported\n" );
 	MPID_Abort( 0, MPI_SUCCESS, 1, "Aborting with internal error" );
 	/* There is no way to return an error code, so an abort is the 
 	   only choice (the return value of this routine is not 
diff --git a/src/mpid/common/datatype/mpid_segment.c b/src/mpid/common/datatype/mpid_segment.c
index 2debdcb..9283186 100644
--- a/src/mpid/common/datatype/mpid_segment.c
+++ b/src/mpid/common/datatype/mpid_segment.c
@@ -248,7 +248,7 @@ static int MPID_Segment_contig_pack_to_iov(DLOOP_Offset *blocks_p,
 	    paramp->u.pack_vector.vectorp[last_idx].DLOOP_VECTOR_LEN;
     }
 
-    MPID_Ensure_Aint_fits_in_pointer((MPI_VOID_PTR_CAST_TO_MPI_AINT (bufp)) + rel_off);
+    MPIU_Ensure_Aint_fits_in_pointer((MPI_VOID_PTR_CAST_TO_MPI_AINT (bufp)) + rel_off);
     if ((last_idx == paramp->u.pack_vector.length-1) &&
 	(last_end != ((char *) bufp + rel_off)))
     {
@@ -348,7 +348,7 @@ static int MPID_Segment_vector_pack_to_iov(DLOOP_Offset *blocks_p,
 		paramp->u.pack_vector.vectorp[last_idx].DLOOP_VECTOR_LEN;
 	}
 
-	MPID_Ensure_Aint_fits_in_pointer((MPI_VOID_PTR_CAST_TO_MPI_AINT (bufp)) + rel_off);
+	MPIU_Ensure_Aint_fits_in_pointer((MPI_VOID_PTR_CAST_TO_MPI_AINT (bufp)) + rel_off);
 	if ((last_idx == paramp->u.pack_vector.length-1) &&
 	    (last_end != ((char *) bufp + rel_off)))
 	{
diff --git a/src/mpid/common/datatype/mpid_type_indexed.c b/src/mpid/common/datatype/mpid_type_indexed.c
index 6674335..69e23a1 100644
--- a/src/mpid/common/datatype/mpid_type_indexed.c
+++ b/src/mpid/common/datatype/mpid_type_indexed.c
@@ -124,7 +124,7 @@ int MPID_Type_indexed(int count,
 	MPID_Datatype_get_ptr(oldtype, old_dtp);
 
 	/* Ensure that "builtin_element_size" fits into an int datatype. */
-	MPID_Ensure_Aint_fits_in_int(old_dtp->builtin_element_size);
+	MPIU_Ensure_Aint_fits_in_int(old_dtp->builtin_element_size);
 
 	el_sz   = old_dtp->builtin_element_size;
 	old_sz  = old_dtp->size;
diff --git a/src/mpid/common/datatype/mpid_type_struct.c b/src/mpid/common/datatype/mpid_type_struct.c
index 057959c..cabd164 100644
--- a/src/mpid/common/datatype/mpid_type_struct.c
+++ b/src/mpid/common/datatype/mpid_type_struct.c
@@ -249,7 +249,7 @@ int MPID_Type_struct(int count,
 	    MPID_Datatype_get_ptr(oldtype_array[i], old_dtp);
 
 	    /* Ensure that "builtin_element_size" fits into an int datatype. */
-	    MPID_Ensure_Aint_fits_in_int(old_dtp->builtin_element_size);
+	    MPIU_Ensure_Aint_fits_in_int(old_dtp->builtin_element_size);
 
 	    tmp_el_sz   = old_dtp->builtin_element_size;
 	    tmp_el_type = old_dtp->basic_type;
diff --git a/src/mpid/common/hcoll/hcoll.h b/src/mpid/common/hcoll/hcoll.h
index 7956b6d..16a9452 100644
--- a/src/mpid/common/hcoll/hcoll.h
+++ b/src/mpid/common/hcoll/hcoll.h
@@ -10,13 +10,13 @@ extern int world_comm_destroying;
 int hcoll_comm_create(MPID_Comm * comm, void *param);
 int hcoll_comm_destroy(MPID_Comm * comm, void *param);
 
-int hcoll_Barrier(MPID_Comm * comm_ptr, mpir_errflag_t *err);
+int hcoll_Barrier(MPID_Comm * comm_ptr, MPIR_Errflag_t *err);
 int hcoll_Bcast(void *buffer, int count, MPI_Datatype datatype, int root,
-                MPID_Comm * comm_ptr, mpir_errflag_t *err);
+                MPID_Comm * comm_ptr, MPIR_Errflag_t *err);
 int hcoll_Allgather(const void *sbuf, int scount, MPI_Datatype sdtype,
-                    void *rbuf, int rcount, MPI_Datatype rdtype, MPID_Comm * comm_ptr, mpir_errflag_t *err);
+                    void *rbuf, int rcount, MPI_Datatype rdtype, MPID_Comm * comm_ptr, MPIR_Errflag_t *err);
 int hcoll_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                    MPI_Op op, MPID_Comm * comm_ptr, mpir_errflag_t *err);
+                    MPI_Op op, MPID_Comm * comm_ptr, MPIR_Errflag_t *err);
 
 int hcoll_Ibarrier_req(MPID_Comm * comm_ptr, MPID_Request ** request);
 int hcoll_Ibcast_req(void *buffer, int count, MPI_Datatype datatype, int root,
diff --git a/src/mpid/common/hcoll/hcoll_ops.c b/src/mpid/common/hcoll/hcoll_ops.c
index 13523fc..304d722 100644
--- a/src/mpid/common/hcoll/hcoll_ops.c
+++ b/src/mpid/common/hcoll/hcoll_ops.c
@@ -5,7 +5,7 @@
 #define FUNCNAME hcoll_Barrier
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int hcoll_Barrier(MPID_Comm * comm_ptr, mpir_errflag_t *err)
+int hcoll_Barrier(MPID_Comm * comm_ptr, MPIR_Errflag_t *err)
 {
     int rc;
     MPI_Comm comm = comm_ptr->handle;
@@ -29,7 +29,7 @@ int hcoll_Barrier(MPID_Comm * comm_ptr, mpir_errflag_t *err)
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int hcoll_Bcast(void *buffer, int count, MPI_Datatype datatype, int root,
-                MPID_Comm * comm_ptr, mpir_errflag_t *err)
+                MPID_Comm * comm_ptr, MPIR_Errflag_t *err)
 {
     dte_data_representation_t dtype;
     int rc;
@@ -73,7 +73,7 @@ int hcoll_Bcast(void *buffer, int count, MPI_Datatype datatype, int root,
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int hcoll_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
-                    MPI_Op op, MPID_Comm * comm_ptr, mpir_errflag_t *err)
+                    MPI_Op op, MPID_Comm * comm_ptr, MPIR_Errflag_t *err)
 {
     dte_data_representation_t Dtype;
     hcoll_dte_op_t *Op;
@@ -124,7 +124,7 @@ int hcoll_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int hcoll_Allgather(const void *sbuf, int scount, MPI_Datatype sdtype,
-                    void *rbuf, int rcount, MPI_Datatype rdtype, MPID_Comm * comm_ptr, mpir_errflag_t *err)
+                    void *rbuf, int rcount, MPI_Datatype rdtype, MPID_Comm * comm_ptr, MPIR_Errflag_t *err)
 {
     int is_homogeneous = 1, use_fallback = 0;
     MPI_Comm comm = comm_ptr->handle;
diff --git a/src/mpid/common/sched/mpid_sched.c b/src/mpid/common/sched/mpid_sched.c
index f4865e5..b95adcb 100644
--- a/src/mpid/common/sched/mpid_sched.c
+++ b/src/mpid/common/sched/mpid_sched.c
@@ -731,7 +731,7 @@ int MPID_Sched_copy(const void *inbuf,  int incount,  MPI_Datatype intype,
         MPID_Datatype_get_size_macro(intype, intype_size);
         MPID_Datatype_get_size_macro(outtype, outtype_size);
         if (incount * intype_size > outcount * outtype_size) {
-            MPIU_Error_printf("truncation: intype=%#x, intype_size=%lld, incount=%d, outtype=%#x, outtype_size=%lld outcount=%d\n",
+            MPL_error_printf("truncation: intype=%#x, intype_size=%lld, incount=%d, outtype=%#x, outtype_size=%lld outcount=%d\n",
                               intype, (long long)intype_size, incount, outtype, (long long)outtype_size, outcount);
         }
     }
diff --git a/src/mpid/common/sock/iocp/mpidu_socki.h b/src/mpid/common/sock/iocp/mpidu_socki.h
index 802a023..6450360 100644
--- a/src/mpid/common/sock/iocp/mpidu_socki.h
+++ b/src/mpid/common/sock/iocp/mpidu_socki.h
@@ -35,7 +35,7 @@ typedef HANDLE MPIDU_Sock_set_t;
 typedef struct sock_state_t * MPIDU_Sock_t;
 typedef DWORD MPIDU_Sock_size_t;
 
-#include "mpiiov.h"
+#include "mpl.h"
 #include "mpi.h"
 
 #endif
diff --git a/src/mpid/common/sock/iocp/sock.c b/src/mpid/common/sock/iocp/sock.c
index 6bcd579..b4b0e4d 100644
--- a/src/mpid/common/sock/iocp/sock.c
+++ b/src/mpid/common/sock/iocp/sock.c
@@ -26,11 +26,11 @@ typedef struct sock_buffer
 {
     DWORD num_bytes;
     OVERLAPPED ovl;
-    MPID_IOV tiov;
+    MPL_IOV tiov;
 #ifdef USE_SOCK_IOV_COPY
-    MPID_IOV iov[MPID_IOV_MAXLEN];
+    MPL_IOV iov[MPL_IOV_MAXLEN];
 #else
-    MPID_IOV *iov;
+    MPL_IOV *iov;
 #endif
     int iovlen;
     int index;
@@ -106,7 +106,7 @@ static void translate_error(int error, char *msg, char *prepend)
 	if (prepend == NULL)
 	    memcpy(msg, str, num_bytes+1);
 	else
-	    MPIU_Snprintf(msg, 1024, "%s%s", prepend, (const char*)str);
+	    MPL_snprintf(msg, 1024, "%s%s", prepend, (const char*)str);
 	LocalFree(str);
 	strtok(msg, "\r\n");
     }
@@ -334,7 +334,7 @@ static inline void init_state_struct(sock_state_t *p)
     p->pending_operations = 0;
     p->read.total = 0;
     p->read.num_bytes = 0;
-    p->read.tiov.MPID_IOV_BUF = NULL;
+    p->read.tiov.MPL_IOV_BUF = NULL;
 #ifndef USE_SOCK_IOV_COPY
     p->read.iov = NULL;
 #endif
@@ -345,7 +345,7 @@ static inline void init_state_struct(sock_state_t *p)
     p->read.progress_update = NULL;
     p->write.total = 0;
     p->write.num_bytes = 0;
-    p->write.tiov.MPID_IOV_BUF = NULL;
+    p->write.tiov.MPL_IOV_BUF = NULL;
 #ifndef USE_SOCK_IOV_COPY
     p->write.iov = NULL;
 #endif
@@ -396,7 +396,7 @@ static inline int post_next_accept(sock_state_t * context)
 	mpi_errno = WSAGetLastError();
 	if (mpi_errno == ERROR_IO_PENDING)
 	    return MPI_SUCCESS;
-	/*MPIU_Error_printf("AcceptEx failed with error %d\n", error);fflush(stdout);*/
+	/*MPL_error_printf("AcceptEx failed with error %d\n", error);fflush(stdout);*/
 	mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDU_SOCK_ERR_FAIL, "**fail", "**fail %s %d", get_error_string(mpi_errno), mpi_errno);
 	return mpi_errno;
     }
@@ -1417,7 +1417,7 @@ int MPIDU_Sock_post_close(MPIDU_Sock_t sock)
 	{
 	    int i, n = 0;
 	    for (i=0; i<sock->read.iovlen; i++)
-		n += sock->read.iov[i].MPID_IOV_LEN;
+		n += sock->read.iov[i].MPL_IOV_LEN;
 	    MPIU_DBG_PRINTF(("sock_post_close(%d) called while sock is reading: %d bytes out of %d, index %d, iovlen %d.\n",
 		MPIDU_Sock_get_sock_id(sock), sock->read.total, n, sock->read.index, sock->read.iovlen));
 	}
@@ -1425,7 +1425,7 @@ int MPIDU_Sock_post_close(MPIDU_Sock_t sock)
 	{
 	    int i, n = 0;
 	    for (i=0; i<sock->write.iovlen; i++)
-		n += sock->write.iov[i].MPID_IOV_LEN;
+		n += sock->write.iov[i].MPL_IOV_LEN;
 	    MPIU_DBG_PRINTF(("sock_post_close(%d) called while sock is writing: %d bytes out of %d, index %d, iovlen %d.\n",
 		MPIDU_Sock_get_sock_id(sock), sock->write.total, n, sock->write.index, sock->write.iovlen));
 	}
@@ -1533,8 +1533,8 @@ int MPIDU_Sock_post_read(MPIDU_Sock_t sock, void * buf, MPIU_Size_t minbr, MPIU_
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDU_SOCK_POST_READ);
     MPIU_UNREFERENCED_ARG(maxbr);
-    sock->read.tiov.MPID_IOV_BUF = (MPID_IOV_BUF_CAST)buf;
-    sock->read.tiov.MPID_IOV_LEN = minbr;
+    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);
     MPIDI_FUNC_EXIT(MPID_STATE_MPIDU_SOCK_POST_READ);
     return mpi_errno;
@@ -1544,7 +1544,7 @@ int MPIDU_Sock_post_read(MPIDU_Sock_t sock, void * buf, MPIU_Size_t minbr, MPIU_
 #define FUNCNAME MPIDU_Sock_post_readv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDU_Sock_post_readv(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIDU_Sock_progress_update_func_t fn)
+int MPIDU_Sock_post_readv(MPIDU_Sock_t sock, MPL_IOV * iov, int iov_n, MPIDU_Sock_progress_update_func_t fn)
 {
     int iter;
     int mpi_errno = MPI_SUCCESS;
@@ -1567,12 +1567,12 @@ int MPIDU_Sock_post_readv(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIDU_So
     }
     /*sock->rt1 = PMPI_Wtime();*/
     /* strip any trailing empty buffers */
-    while (iov_n && iov[iov_n-1].MPID_IOV_LEN == 0)
+    while (iov_n && iov[iov_n-1].MPL_IOV_LEN == 0)
 	iov_n--;
     sock->read.total = 0;
 #ifdef USE_SOCK_IOV_COPY
     MPIDI_FUNC_ENTER(MPID_STATE_MEMCPY);
-    memcpy(sock->read.iov, iov, sizeof(MPID_IOV) * n);
+    memcpy(sock->read.iov, iov, sizeof(MPL_IOV) * n);
     MPIDI_FUNC_EXIT(MPID_STATE_MEMCPY);
 #else
     sock->read.iov = iov;
@@ -1584,7 +1584,7 @@ int MPIDU_Sock_post_readv(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIDU_So
 #ifdef MPICH_DBG_OUTPUT
     for (i=0; i<iov_n; i++)
     {
-	MPIU_DBG_PRINTF(("sock_post_readv - iov[%d].len = %d\n", i, iov[i].MPID_IOV_LEN));
+	MPIU_DBG_PRINTF(("sock_post_readv - iov[%d].len = %d\n", i, iov[i].MPL_IOV_LEN));
     }
 #endif
     for (iter=0; iter<10; iter++)
@@ -1658,8 +1658,8 @@ int MPIDU_Sock_post_write(MPIDU_Sock_t sock, void * buf, MPIU_Size_t min, MPIU_S
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDU_SOCK_POST_WRITE);
     MPIU_UNREFERENCED_ARG(max);
-    sock->write.tiov.MPID_IOV_BUF = (MPID_IOV_BUF_CAST)buf;
-    sock->write.tiov.MPID_IOV_LEN = min;
+    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);
     MPIDI_FUNC_EXIT(MPID_STATE_MPIDU_SOCK_POST_WRITE);
     return mpi_errno;
@@ -1669,7 +1669,7 @@ int MPIDU_Sock_post_write(MPIDU_Sock_t sock, void * buf, MPIU_Size_t min, MPIU_S
 #define FUNCNAME MPIDU_Sock_post_writev
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDU_Sock_post_writev(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIDU_Sock_progress_update_func_t fn)
+int MPIDU_Sock_post_writev(MPIDU_Sock_t sock, MPL_IOV * iov, int iov_n, MPIDU_Sock_progress_update_func_t fn)
 {
     int mpi_errno = MPI_SUCCESS;
     int iter;
@@ -1686,7 +1686,7 @@ int MPIDU_Sock_post_writev(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIDU_S
     sock->write.total = 0;
 #ifdef USE_SOCK_IOV_COPY
     MPIDI_FUNC_ENTER(MPID_STATE_MEMCPY);
-    memcpy(sock->write.iov, iov, sizeof(MPID_IOV) * iov_n);
+    memcpy(sock->write.iov, iov, sizeof(MPL_IOV) * iov_n);
     MPIDI_FUNC_EXIT(MPID_STATE_MEMCPY);
 #else
     sock->write.iov = iov;
@@ -1698,7 +1698,7 @@ int MPIDU_Sock_post_writev(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIDU_S
 #ifdef MPICH_DBG_OUTPUT
     for (i=0; i<iov_n; i++)
     {
-	MPIU_DBG_PRINTF(("sock_post_writev - iov[%d].len = %d\n", i, iov[i].MPID_IOV_LEN));
+	MPIU_DBG_PRINTF(("sock_post_writev - iov[%d].len = %d\n", i, iov[i].MPL_IOV_LEN));
     }
 #endif
     for (iter=0; iter<10; iter++)
@@ -1889,17 +1889,17 @@ int MPIDU_Sock_wait(MPIDU_Sock_set_t set, int timeout, MPIDU_Sock_event_t * out)
 		    sock->read.total += num_bytes;
 		    while (num_bytes)
 		    {
-			if (sock->read.iov[sock->read.index].MPID_IOV_LEN <= num_bytes)
+			if (sock->read.iov[sock->read.index].MPL_IOV_LEN <= num_bytes)
 			{
-			    num_bytes -= sock->read.iov[sock->read.index].MPID_IOV_LEN;
+			    num_bytes -= sock->read.iov[sock->read.index].MPL_IOV_LEN;
 			    sock->read.index++;
 			    sock->read.iovlen--;
 			}
 			else
 			{
-			    sock->read.iov[sock->read.index].MPID_IOV_LEN -= num_bytes;
-			    sock->read.iov[sock->read.index].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)(
-				(char*)(sock->read.iov[sock->read.index].MPID_IOV_BUF) + num_bytes);
+			    sock->read.iov[sock->read.index].MPL_IOV_LEN -= num_bytes;
+			    sock->read.iov[sock->read.index].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)(
+				(char*)(sock->read.iov[sock->read.index].MPL_IOV_BUF) + num_bytes);
 			    num_bytes = 0;
 			}
 		    }
@@ -2122,21 +2122,21 @@ int MPIDU_Sock_wait(MPIDU_Sock_set_t set, int timeout, MPIDU_Sock_event_t * out)
 			sock->write.total += num_bytes;
 			while (num_bytes)
 			{
-			    if (sock->write.iov[sock->write.index].MPID_IOV_LEN <= num_bytes)
+			    if (sock->write.iov[sock->write.index].MPL_IOV_LEN <= num_bytes)
 			    {
 				/*MPIU_DBG_PRINTF(("sock_wait: write.index %d, len %d\n", sock->write.index, 
-				sock->write.iov[sock->write.index].MPID_IOV_LEN));*/
-				num_bytes -= sock->write.iov[sock->write.index].MPID_IOV_LEN;
+				sock->write.iov[sock->write.index].MPL_IOV_LEN));*/
+				num_bytes -= sock->write.iov[sock->write.index].MPL_IOV_LEN;
 				sock->write.index++;
 				sock->write.iovlen--;
 			    }
 			    else
 			    {
 				/*MPIU_DBG_PRINTF(("sock_wait: partial data written [%d].len = %d, num_bytes = %d\n", sock->write.index,
-				sock->write.iov[sock->write.index].MPID_IOV_LEN, num_bytes));*/
-				sock->write.iov[sock->write.index].MPID_IOV_LEN -= num_bytes;
-				sock->write.iov[sock->write.index].MPID_IOV_BUF = (MPID_IOV_BUF_CAST)(
-				    (char*)(sock->write.iov[sock->write.index].MPID_IOV_BUF) + num_bytes);
+				sock->write.iov[sock->write.index].MPL_IOV_LEN, num_bytes));*/
+				sock->write.iov[sock->write.index].MPL_IOV_LEN -= num_bytes;
+				sock->write.iov[sock->write.index].MPL_IOV_BUF = (MPL_IOV_BUF_CAST)(
+				    (char*)(sock->write.iov[sock->write.index].MPL_IOV_BUF) + num_bytes);
 				num_bytes = 0;
 			    }
 			}
@@ -2321,8 +2321,8 @@ int MPIDU_Sock_wait(MPIDU_Sock_set_t set, int timeout, MPIDU_Sock_event_t * out)
 		    if (sock->sock != INVALID_SOCKET)
 		    {
 			MPIU_DBG_PRINTF(("unmatched ovl: pending: %d, state = %d\n", sock->pending_operations, sock->state));
-			/*MPIU_Error_printf("In sock_wait(), returned overlapped structure does not match the current read or write ovl: 0x%x\n", ovl);*/
-			MPIU_Snprintf(error_msg, 1024, "In sock_wait(), returned overlapped structure does not match the current read or write ovl: 0x%p\n", ovl);
+			/*MPL_error_printf("In sock_wait(), returned overlapped structure does not match the current read or write ovl: 0x%x\n", ovl);*/
+			MPL_snprintf(error_msg, 1024, "In sock_wait(), returned overlapped structure does not match the current read or write ovl: 0x%p\n", ovl);
 			MPIDI_FUNC_EXIT(MPID_STATE_MPIDU_SOCK_WAIT);
 			return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDU_SOCK_ERR_FAIL, "**fail", "**fail %s", error_msg);
 		    }
@@ -2377,7 +2377,7 @@ int MPIDU_Sock_wait(MPIDU_Sock_set_t set, int timeout, MPIDU_Sock_event_t * out)
 		out->op_type = MPIDU_SOCK_OP_ACCEPT;
 		if (sock->listen_sock == INVALID_SOCKET)
 		{
-		    MPIU_Error_printf("returning MPIDU_SOCK_OP_ACCEPT with an INVALID_SOCKET for the listener\n");
+		    MPL_error_printf("returning MPIDU_SOCK_OP_ACCEPT with an INVALID_SOCKET for the listener\n");
 		}
 		out->num_bytes = num_bytes;
 		out->error = MPI_SUCCESS;
@@ -2387,8 +2387,8 @@ int MPIDU_Sock_wait(MPIDU_Sock_set_t set, int timeout, MPIDU_Sock_event_t * out)
 	    }
 	    else
 	    {
-		/*MPIU_Error_printf("sock type is not a SOCKET or a LISTENER, it's %d\n", sock->type);*/
-		MPIU_Snprintf(error_msg, 1024, "sock type is not a SOCKET or a LISTENER, it's %d\n", sock->type);
+		/*MPL_error_printf("sock type is not a SOCKET or a LISTENER, it's %d\n", sock->type);*/
+		MPL_snprintf(error_msg, 1024, "sock type is not a SOCKET or a LISTENER, it's %d\n", sock->type);
 		MPIDI_FUNC_EXIT(MPID_STATE_MPIDU_SOCK_WAIT);
 		return MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDU_SOCK_ERR_FAIL, "**fail", "**fail %s", error_msg);
 	    }
@@ -2652,7 +2652,7 @@ int MPIDU_Sock_wakeup(MPIDU_Sock_set_t set)
 int MPIDU_Sock_read(MPIDU_Sock_t sock, void * buf, MPIU_Size_t len, MPIU_Size_t * num_read)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_IOV iov;
+    MPL_IOV iov;
     MPIDI_STATE_DECL(MPID_STATE_MPIDU_SOCK_READ);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDU_SOCK_READ);
@@ -2667,7 +2667,7 @@ int MPIDU_Sock_read(MPIDU_Sock_t sock, void * buf, MPIU_Size_t len, MPIU_Size_t
 #define FUNCNAME MPIDU_Sock_readv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDU_Sock_readv(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIU_Size_t * num_read)
+int MPIDU_Sock_readv(MPIDU_Sock_t sock, MPL_IOV * iov, int iov_n, MPIU_Size_t * num_read)
 {
     int mpi_errno = MPI_SUCCESS;
     DWORD nFlags = 0;
@@ -2739,7 +2739,7 @@ int MPIDU_Sock_readv(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIU_Size_t *
 int MPIDU_Sock_write(MPIDU_Sock_t sock, void * buf, MPIU_Size_t len, MPIU_Size_t * num_written)
 {
     int mpi_errno;
-    MPID_IOV iov;
+    MPL_IOV iov;
     MPIDI_STATE_DECL(MPID_STATE_MPIDU_SOCK_WRITE);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDU_SOCK_WRITE);
@@ -2754,7 +2754,7 @@ int MPIDU_Sock_write(MPIDU_Sock_t sock, void * buf, MPIU_Size_t len, MPIU_Size_t
 #define FUNCNAME MPIDU_Sock_writev
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDU_Sock_writev(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIU_Size_t * num_written)
+int MPIDU_Sock_writev(MPIDU_Sock_t sock, MPL_IOV * iov, int iov_n, MPIU_Size_t * num_written)
 {
     int mpi_errno;
     DWORD num_written_local;
@@ -2908,7 +2908,7 @@ int MPIDU_Sock_get_error_class_string(int error, char *error_string, int length)
 	MPIU_Strncpy(error_string, "no new connection available", length);
 	break;
     default:
-	MPIU_Snprintf(error_string, length, "unknown socket error %d", error);
+	MPL_snprintf(error_string, length, "unknown socket error %d", error);
 	break;
     }
     MPIDI_FUNC_EXIT(MPID_STATE_MPIDU_SOCK_GET_ERROR_CLASS_STRING);
diff --git a/src/mpid/common/sock/mpidu_sock.h b/src/mpid/common/sock/mpidu_sock.h
index 9f752a9..e061b88 100644
--- a/src/mpid/common/sock/mpidu_sock.h
+++ b/src/mpid/common/sock/mpidu_sock.h
@@ -21,9 +21,8 @@ CPLUSPLUS_BEGIN
 
 /* Load just the utility definitions that we need */
 #include "mpichconf.h"
-#include "mpibase.h"
+#include "mpl.h"
 #include "mpiutil.h"
-#include "mpitypedefs.h"
 #include "mpich_cvars.h"
 /* implementation specific header file */    
 #include "mpidu_socki.h"
@@ -630,7 +629,7 @@ MPIDU_Sock_post_readv - request that a vector of data be read from a sock
 Input Parameters:
 + sock - sock object from which the data is to read
 . iov - I/O vector describing buffers into which the data is placed
-. iov_n - number of elements in I/O vector (must be less than MPID_IOV_LIMIT)
+. iov_n - number of elements in I/O vector (must be less than MPL_IOV_LIMIT)
 + upate_fn - application progress update function (may be NULL)
 
 Return value: a MPI error code with a Sock extended error class
@@ -679,7 +678,7 @@ that one thread is not attempting to post a new operation while another thread i
 Module:
 Utility-Sock
 @*/
-int MPIDU_Sock_post_readv(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIDU_Sock_progress_update_func_t fn);
+int MPIDU_Sock_post_readv(MPIDU_Sock_t sock, MPL_IOV * iov, int iov_n, MPIDU_Sock_progress_update_func_t fn);
 
 
 /*@
@@ -749,7 +748,7 @@ MPIDU_Sock_post_writev - request that a vector of data be written to a sock
 Input Parameters:
 + sock - sock object which the data is to be written
 . iov - I/O vector describing buffers of data to be written
-. iov_n - number of elements in I/O vector (must be less than MPID_IOV_LIMIT)
+. iov_n - number of elements in I/O vector (must be less than MPL_IOV_LIMIT)
 + upate_fn - application progress update function (may be NULL)
 
 Return value: a MPI error code with a Sock extended error class
@@ -798,7 +797,7 @@ that one thread is not attempting to post a new operation while another thread i
 Module:
 Utility-Sock
 @*/
-int MPIDU_Sock_post_writev(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIDU_Sock_progress_update_func_t fn);
+int MPIDU_Sock_post_writev(MPIDU_Sock_t sock, MPL_IOV * iov, int iov_n, MPIDU_Sock_progress_update_func_t fn);
 
 
 /*@
@@ -917,7 +916,7 @@ MPIDU_Sock_readv - perform an immediate vector read
 Input Parameters:
 + sock - sock object from which data is to be read
 . iov - I/O vector describing buffers into which the data is placed
-- iov_n - number of elements in I/O vector (must be less than MPID_IOV_LIMIT)
+- iov_n - number of elements in I/O vector (must be less than MPL_IOV_LIMIT)
 
 Output Parameter:
 . num_read - number of bytes actually read
@@ -927,7 +926,7 @@ Return value: a MPI error code with a Sock extended error class
 . MPIDU_SOCK_ERR_INIT - Sock module not initialized
 . MPIDU_SOCK_ERR_BAD_SOCK - invalid sock object
 . MPIDU_SOCK_ERR_BAD_BUF - using the buffer described by iov and iov_n resulted in a memory fault
-. MPIDU_SOCK_ERR_BAD_LEN - iov_n parameter must be greater than zero and not greater than MPID_IOV_LIMIT
+. MPIDU_SOCK_ERR_BAD_LEN - iov_n parameter must be greater than zero and not greater than MPL_IOV_LIMIT
 . MPIDU_SOCK_ERR_SOCK_CLOSED - the sock object was closed locally
 . MPIDU_SOCK_ERR_CONN_CLOSED - the connection was closed by the peer
 . MPIDU_SOCK_ERR_CONN_FAILED - the connection failed
@@ -958,7 +957,7 @@ not attempting to perform an immediate read while another thread is attempting t
 Module:
 Utility-Sock
 @*/
-int MPIDU_Sock_readv(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIU_Size_t * num_read);
+int MPIDU_Sock_readv(MPIDU_Sock_t sock, MPL_IOV * iov, int iov_n, MPIU_Size_t * num_read);
 
 
 /*@
@@ -1016,7 +1015,7 @@ MPIDU_Sock_writev - perform an immediate vector write
 Input Parameters:
 + sock - sock object to which data is to be written
 . iov - I/O vector describing buffers of data to be written
-- iov_n - number of elements in I/O vector (must be less than MPID_IOV_LIMIT)
+- iov_n - number of elements in I/O vector (must be less than MPL_IOV_LIMIT)
 
 Output Parameter:
 . num_written - actual number of bytes written
@@ -1026,7 +1025,7 @@ Return value: a MPI error code with a Sock extended error class
 . MPIDU_SOCK_ERR_INIT - Sock module not initialized
 . MPIDU_SOCK_ERR_BAD_SOCK - invalid sock object
 . MPIDU_SOCK_ERR_BAD_BUF - using the buffer described by iov and iov_n resulted in a memory fault
-. MPIDU_SOCK_ERR_BAD_LEN - iov_n parameter must be greater than zero and not greater than MPID_IOV_LIMIT
+. MPIDU_SOCK_ERR_BAD_LEN - iov_n parameter must be greater than zero and not greater than MPL_IOV_LIMIT
 . MPIDU_SOCK_ERR_SOCK_CLOSED - the sock object was closed locally
 . MPIDU_SOCK_ERR_CONN_CLOSED - the connection was closed by the peer
 . MPIDU_SOCK_ERR_CONN_FAILED - the connection failed
@@ -1056,7 +1055,7 @@ not attempting to perform an immediate write while another thread is attempting
 Module:
 Utility-Sock
 @*/
-int MPIDU_Sock_writev(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIU_Size_t * num_written);
+int MPIDU_Sock_writev(MPIDU_Sock_t sock, MPL_IOV * iov, int iov_n, MPIU_Size_t * num_written);
 
 
 /*@
diff --git a/src/mpid/common/sock/poll/sock.c b/src/mpid/common/sock/poll/sock.c
index 709607e..9188ad2 100644
--- a/src/mpid/common/sock/poll/sock.c
+++ b/src/mpid/common/sock/poll/sock.c
@@ -106,7 +106,7 @@ struct pollinfo
     {
 	struct
 	{
-	    MPID_IOV * ptr;
+	    MPL_IOV * ptr;
 	    int count;
 	    int offset;
 	} iov;
@@ -124,7 +124,7 @@ struct pollinfo
     {
 	struct
 	{
-	    MPID_IOV * ptr;
+	    MPL_IOV * ptr;
 	    int count;
 	    int offset;
 	} iov;
diff --git a/src/mpid/common/sock/poll/sock_immed.i b/src/mpid/common/sock/poll/sock_immed.i
index 4f87d1b..6e2245e 100644
--- a/src/mpid/common/sock/poll/sock_immed.i
+++ b/src/mpid/common/sock/poll/sock_immed.i
@@ -180,7 +180,7 @@ int MPIDU_Sock_accept(struct MPIDU_Sock * listener,
 	    if (bufsz < MPIDU_Socki_socket_bufsz * 0.9 || 
 		bufsz < MPIDU_Socki_socket_bufsz * 1.0)
 	    {
-		MPIU_Msg_printf("WARNING: send socket buffer size differs from requested size (requested=%d, actual=%d)\n",
+		MPL_msg_printf("WARNING: send socket buffer size differs from requested size (requested=%d, actual=%d)\n",
 				MPIDU_Socki_socket_bufsz, bufsz);
 	    }
 	}
@@ -200,7 +200,7 @@ int MPIDU_Sock_accept(struct MPIDU_Sock * listener,
 	    if (bufsz < MPIDU_Socki_socket_bufsz * 0.9 || 
 		bufsz < MPIDU_Socki_socket_bufsz * 1.0)
 	    {
-		MPIU_Msg_printf("WARNING: receive socket buffer size differs from requested size (requested=%d, actual=%d)\n",
+		MPL_msg_printf("WARNING: receive socket buffer size differs from requested size (requested=%d, actual=%d)\n",
 				MPIDU_Socki_socket_bufsz, bufsz);
 	    }
 	}
@@ -377,7 +377,7 @@ int MPIDU_Sock_read(MPIDU_Sock_t sock, void * buf, MPIU_Size_t len,
 #define FUNCNAME MPIDU_Sock_readv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDU_Sock_readv(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, 
+int MPIDU_Sock_readv(MPIDU_Sock_t sock, MPL_IOV * iov, int iov_n, 
 		     MPIU_Size_t * num_read)
 {
     struct pollfd * pollfd;
@@ -577,7 +577,7 @@ int MPIDU_Sock_write(MPIDU_Sock_t sock, void * buf, MPIU_Size_t len,
 #define FUNCNAME MPIDU_Sock_writev
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDU_Sock_writev(MPIDU_Sock_t sock, MPID_IOV * iov, int iov_n, MPIU_Size_t * num_written)
+int MPIDU_Sock_writev(MPIDU_Sock_t sock, MPL_IOV * iov, int iov_n, MPIU_Size_t * num_written)
 {
     struct pollfd * pollfd;
     struct pollinfo * pollinfo;
diff --git a/src/mpid/common/sock/poll/sock_misc.i b/src/mpid/common/sock/poll/sock_misc.i
index 9a19b24..e6c6bd8 100644
--- a/src/mpid/common/sock/poll/sock_misc.i
+++ b/src/mpid/common/sock/poll/sock_misc.i
@@ -46,7 +46,7 @@ int MPIDU_Sock_get_host_description(int myRank,
 	   the process manager only delievers the same values for the 
 	   environment to each process */
 	char namebuf[1024];
-	MPIU_Snprintf( namebuf, sizeof(namebuf), 
+	MPL_snprintf( namebuf, sizeof(namebuf), 
 		       "MPICH_INTERFACE_HOSTNAME_R_%d", myRank );
 	env_hostname = getenv( namebuf );
     }
@@ -335,7 +335,7 @@ int MPIDU_Sock_get_error_class_string(int error, char *error_string, size_t leng
 	MPIU_Strncpy(error_string, "no new connection available", length);
 	break;
     default:
-	MPIU_Snprintf(error_string, length, "unknown socket error %d", error);
+	MPL_snprintf(error_string, length, "unknown socket error %d", error);
 	break;
     }
     MPIDI_FUNC_EXIT(MPID_STATE_MPIDU_SOCK_GET_ERROR_CLASS_STRING);
diff --git a/src/mpid/common/sock/poll/sock_post.i b/src/mpid/common/sock/poll/sock_post.i
index f32ddd3..b248197 100644
--- a/src/mpid/common/sock/poll/sock_post.i
+++ b/src/mpid/common/sock/poll/sock_post.i
@@ -503,7 +503,7 @@ int MPIDU_Sock_post_read(struct MPIDU_Sock * sock, void * buf, MPIU_Size_t minle
 #define FUNCNAME MPIDU_Sock_post_readv
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDU_Sock_post_readv(struct MPIDU_Sock * sock, MPID_IOV * iov, int iov_n, MPIDU_Sock_progress_update_func_t fn)
+int MPIDU_Sock_post_readv(struct MPIDU_Sock * sock, MPL_IOV * iov, int iov_n, MPIDU_Sock_progress_update_func_t fn)
 {
     struct pollfd * pollfd;
     struct pollinfo * pollinfo;
@@ -523,7 +523,7 @@ int MPIDU_Sock_post_readv(struct MPIDU_Sock * sock, MPID_IOV * iov, int iov_n, M
     MPIDU_SOCKI_VERIFY_NO_POSTED_READ(pollfd, pollinfo, mpi_errno, fn_exit);
 
     /* --BEGIN ERROR HANDLING-- */
-    if (iov_n < 1 || iov_n > MPID_IOV_LIMIT)
+    if (iov_n < 1 || iov_n > MPL_IOV_LIMIT)
     {
 	mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDU_SOCK_ERR_BAD_LEN,
 					 "**sock|badiovn", "**sock|badiovn %d %d %d",
@@ -602,7 +602,7 @@ int MPIDU_Sock_post_write(struct MPIDU_Sock * sock, void * buf, MPIU_Size_t minl
 #define FUNCNAME MPIDU_Sock_post_writev
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDU_Sock_post_writev(struct MPIDU_Sock * sock, MPID_IOV * iov, int iov_n, MPIDU_Sock_progress_update_func_t fn)
+int MPIDU_Sock_post_writev(struct MPIDU_Sock * sock, MPL_IOV * iov, int iov_n, MPIDU_Sock_progress_update_func_t fn)
 {
     struct pollfd * pollfd;
     struct pollinfo * pollinfo;
@@ -622,7 +622,7 @@ int MPIDU_Sock_post_writev(struct MPIDU_Sock * sock, MPID_IOV * iov, int iov_n,
     MPIDU_SOCKI_VERIFY_NO_POSTED_WRITE(pollfd, pollinfo, mpi_errno, fn_exit);
 
     /* --BEGIN ERROR HANDLING-- */
-    if (iov_n < 1 || iov_n > MPID_IOV_LIMIT)
+    if (iov_n < 1 || iov_n > MPL_IOV_LIMIT)
     {
 	mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPIDU_SOCK_ERR_BAD_LEN,
 					 "**sock|badiovn", "**sock|badiovn %d %d %d",
diff --git a/src/mpid/common/sock/poll/socki_util.i b/src/mpid/common/sock/poll/socki_util.i
index aea2554..5ad18c0 100644
--- a/src/mpid/common/sock/poll/socki_util.i
+++ b/src/mpid/common/sock/poll/socki_util.i
@@ -14,7 +14,7 @@ int MPIDI_Sock_update_sock_set( struct MPIDU_Sock_set *, int );
 static int MPIDU_Socki_os_to_mpi_errno(struct pollinfo * pollinfo, 
 		     int os_errno, const char * fcname, int line, int * conn_failed);
 
-static int MPIDU_Socki_adjust_iov(ssize_t nb, MPID_IOV * const iov, 
+static int MPIDU_Socki_adjust_iov(ssize_t nb, MPL_IOV * const iov, 
 				  const int count, int * const offsetp);
 
 static int MPIDU_Socki_sock_alloc(struct MPIDU_Sock_set * sock_set, 
@@ -524,7 +524,7 @@ static int MPIDU_Socki_os_to_mpi_errno(struct pollinfo * pollinfo, int os_errno,
  * values.  If the iovec has been consumed, return
  * true; otherwise return false.
  *
- * The input is an iov (MPID_IOV is just an iov) and the offset into which 
+ * The input is an iov (MPL_IOV is just an iov) and the offset into which 
  * to start (start with entry iov[*offsetp]) and remove nb bytes from the iov.
  * The use of the offsetp term allows use to remove values from the iov without
  * making a copy to shift down elements when only part of the iov is
@@ -534,21 +534,21 @@ static int MPIDU_Socki_os_to_mpi_errno(struct pollinfo * pollinfo, int os_errno,
 #define FUNCNAME MPIDU_Socki_adjust_iov
 #undef FCNAME
 #define FCNAME MPIU_QUOTE(FUNCNAME)
-static int MPIDU_Socki_adjust_iov(ssize_t nb, MPID_IOV * const iov, const int count, int * const offsetp)
+static int MPIDU_Socki_adjust_iov(ssize_t nb, MPL_IOV * const iov, const int count, int * const offsetp)
 {
     int offset = *offsetp;
     
     while (offset < count)
     {
-	if (iov[offset].MPID_IOV_LEN <= nb)
+	if (iov[offset].MPL_IOV_LEN <= nb)
 	{
-	    nb -= iov[offset].MPID_IOV_LEN;
+	    nb -= iov[offset].MPL_IOV_LEN;
 	    offset++;
 	}
 	else
 	{
-	    iov[offset].MPID_IOV_BUF = (char *) iov[offset].MPID_IOV_BUF + nb;
-	    iov[offset].MPID_IOV_LEN -= nb;
+	    iov[offset].MPL_IOV_BUF = (char *) iov[offset].MPL_IOV_BUF + nb;
+	    iov[offset].MPL_IOV_LEN -= nb;
 	    *offsetp = offset;
 	    return FALSE;
 	}
@@ -1020,7 +1020,7 @@ int MPIDU_Sock_SetSockBufferSize( int fd, int firm )
 	    /* --BEGIN ERROR HANDLING-- */
 	    if (rc == 0) {
 		if (bufsz < sockBufSize * 0.9) {
-		MPIU_Msg_printf("WARNING: send socket buffer size differs from requested size (requested=%d, actual=%d)\n",
+		MPL_msg_printf("WARNING: send socket buffer size differs from requested size (requested=%d, actual=%d)\n",
 				sockBufSize, bufsz);
 		}
 	    }
@@ -1031,7 +1031,7 @@ int MPIDU_Sock_SetSockBufferSize( int fd, int firm )
 	    /* --BEGIN ERROR HANDLING-- */
 	    if (rc == 0) {
 		if (bufsz < sockBufSize * 0.9) {
-		    MPIU_Msg_printf("WARNING: receive socket buffer size differs from requested size (requested=%d, actual=%d)\n",
+		    MPL_msg_printf("WARNING: receive socket buffer size differs from requested size (requested=%d, actual=%d)\n",
 				    sockBufSize, bufsz);
 		}
 	    }
diff --git a/src/mpid/common/thread/Makefile.mk b/src/mpid/common/thread/Makefile.mk
index 283994c..05238da 100644
--- a/src/mpid/common/thread/Makefile.mk
+++ b/src/mpid/common/thread/Makefile.mk
@@ -12,7 +12,6 @@ if THREAD_SERIALIZED_OR_MULTIPLE
 AM_CPPFLAGS += -I$(top_srcdir)/src/mpid/common/thread
 
 noinst_HEADERS += src/mpid/common/thread/mpid_thread.h
-mpi_core_sources += src/mpid/common/thread/mpid_thread.c
 
 endif THREAD_SERIALIZED_OR_MULTIPLE
 endif BUILD_MPID_COMMON_THREAD
diff --git a/src/mpid/common/thread/mpid_thread.c b/src/mpid/common/thread/mpid_thread.c
deleted file mode 100644
index f34ed65..0000000
--- a/src/mpid/common/thread/mpid_thread.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- *
- *  (C) 2001 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-
-#include "mpiimpl.h"
-
-MPIU_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
-
diff --git a/src/mpid/common/thread/mpid_thread.h b/src/mpid/common/thread/mpid_thread.h
index 969134f..49a7853 100644
--- a/src/mpid/common/thread/mpid_thread.h
+++ b/src/mpid/common/thread/mpid_thread.h
@@ -13,7 +13,7 @@
  * (formerly lived in mpe_types.i)
  */
 
-#include "mpiu_thread.h"
+#include "mpiutil.h"
 
 typedef MPIU_Thread_mutex_t MPID_Thread_mutex_t;
 typedef MPIU_Thread_cond_t  MPID_Thread_cond_t;
@@ -42,21 +42,28 @@ typedef void (* MPID_Thread_func_t)(void * data);
   The thread is created in a detach state, meaning that is may not be waited upon.  If another thread needs to wait for this
   thread to complete, the threads must provide their own synchronization mechanism.
 @*/
-void MPID_Thread_create(MPID_Thread_func_t func, void * data, MPID_Thread_id_t * id, int * err);
+static inline void MPID_Thread_create(MPID_Thread_func_t func, void * data, MPID_Thread_id_t * id, int * err)
+{
+    MPIU_Thread_create(func,data,id,err);
+}
 
 /*@
   MPID_Thread_exit - exit from the current thread
 @*/
-void MPID_Thread_exit(void);
-
+static inline void MPID_Thread_exit(void)
+{
+    MPIU_Thread_exit();
+}
 /*@
   MPID_Thread_self - get the identifier of the current thread
 
   Output Parameter:
 . id - identifier of current thread
 @*/
-void MPID_Thread_self(MPID_Thread_id_t * id);
-
+static inline void MPID_Thread_self(MPID_Thread_id_t * id)
+{
+    MPIU_Thread_self(id);
+}
 /*@
   MPID_Thread_same - compare two threads identifiers to see if refer to the same thread
 
@@ -67,13 +74,17 @@ void MPID_Thread_self(MPID_Thread_id_t * id);
   Output Parameter:
 . same - TRUE if the two threads identifiers refer to the same thread; FALSE otherwise
 @*/
-void MPID_Thread_same(MPID_Thread_id_t * id1, MPID_Thread_id_t * id2, int * same);
-
+static inline void MPID_Thread_same(MPID_Thread_id_t * id1, MPID_Thread_id_t * id2, int * same)
+{
+    MPIU_Thread_same(id1,id2,same);
+}
 /*@
   MPID_Thread_yield - voluntarily relinquish the CPU, giving other threads an opportunity to run
 @*/
-void MPID_Thread_yield(void);
-
+static inline void MPID_Thread_yield(MPID_Thread_mutex_t *t)
+{
+    MPIU_Thread_yield(t);
+}
 
 /*
  *    Mutexes
@@ -86,8 +97,10 @@ void MPID_Thread_yield(void);
 + mutex - mutex
 - err - error code (non-zero indicates an error has occurred)
 @*/
-void MPID_Thread_mutex_create(MPID_Thread_mutex_t * mutex, int * err);
-
+static inline void MPID_Thread_mutex_create(MPID_Thread_mutex_t * mutex, int * err)
+{
+    MPIU_Thread_mutex_create(mutex,err);
+}
 /*@
   MPID_Thread_mutex_destroy - destroy an existing mutex
   
@@ -97,24 +110,36 @@ void MPID_Thread_mutex_create(MPID_Thread_mutex_t * mutex, int * err);
   Output Parameter:
 . err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred
 @*/
-void MPID_Thread_mutex_destroy(MPID_Thread_mutex_t * mutex, int * err);
-
+static inline void MPID_Thread_mutex_destroy(MPID_Thread_mutex_t * mutex, int * err)
+{
+    MPIU_Thread_mutex_destroy(mutex,err);
+}
 /*@
   MPID_Thread_lock - acquire a mutex
   
   Input Parameter:
 . mutex - mutex
 @*/
-void MPID_Thread_mutex_lock(MPID_Thread_mutex_t * mutex);
-
+static inline void MPID_Thread_mutex_lock(MPID_Thread_mutex_t * mutex)
+{
+    int err;
+    MPIU_Thread_mutex_lock(mutex,&err);
+    MPIU_Assert_fmt_msg(err == MPIU_THREAD_SUCCESS,
+                        ("mutex_lock failed, err=%d (%s)",err,MPIU_Strerror(err)));
+}
 /*@
   MPID_Thread_unlock - release a mutex
   
   Input Parameter:
 . mutex - mutex
 @*/
-void MPID_Thread_mutex_unlock(MPID_Thread_mutex_t * mutex);
-
+static inline void MPID_Thread_mutex_unlock(MPID_Thread_mutex_t * mutex)
+{
+    int err;
+    MPIU_Thread_mutex_unlock(mutex,&err);
+    MPIU_Assert_fmt_msg(err == MPIU_THREAD_SUCCESS,
+                        ("mutex_unlock failed, err=%d (%s)",err,MPIU_Strerror(err)));
+}
 /*@
   MPID_Thread_mutex_trylock - try to acquire a mutex, but return even if unsuccessful
   
@@ -124,8 +149,13 @@ void MPID_Thread_mutex_unlock(MPID_Thread_mutex_t * mutex);
   Output Parameter:
 . flag - flag
 @*/
-void MPID_Thread_mutex_trylock(MPID_Thread_mutex_t * mutex, int * flag);
-
+static inline void MPID_Thread_mutex_trylock(MPID_Thread_mutex_t * mutex, int * flag)
+{
+    int err;
+    MPIU_Thread_mutex_trylock(mutex,flag,&err);
+    MPIU_Assert_fmt_msg(err == MPIU_THREAD_SUCCESS,
+                        ("mutex_trylock failed, err=%d (%s)",err,MPIU_Strerror(err)));
+}
 
 /*
  * Condition Variables
@@ -138,8 +168,10 @@ void MPID_Thread_mutex_trylock(MPID_Thread_mutex_t * mutex, int * flag);
 + cond - condition variable
 - err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred
 @*/
-void MPID_Thread_cond_create(MPID_Thread_cond_t * cond, int * err);
-
+static inline void MPID_Thread_cond_create(MPID_Thread_cond_t * cond, int * err)
+{
+    MPIU_Thread_cond_create(cond,err);
+}
 /*@
   MPID_Thread_cond_destroy - destroy an existinga condition variable
   
@@ -150,8 +182,10 @@ void MPID_Thread_cond_create(MPID_Thread_cond_t * cond, int * err);
 . err - location to store the error code; pointer may be NULL; error is zero 
         for success, non-zero if a failure occurred
 @*/
-void MPID_Thread_cond_destroy(MPID_Thread_cond_t * cond, int * err);
-
+static inline void MPID_Thread_cond_destroy(MPID_Thread_cond_t * cond, int * err)
+{
+    MPIU_Thread_cond_destroy(cond,err);
+}
 /*@
   MPID_Thread_cond_wait - wait (block) on a condition variable
   
@@ -166,31 +200,44 @@ void MPID_Thread_cond_destroy(MPID_Thread_cond_t * cond, int * err);
   has changed in a way that warrants letting the
   thread proceed.
 @*/
-void MPID_Thread_cond_wait(MPID_Thread_cond_t * cond, MPID_Thread_mutex_t * mutex);
-
+static inline void MPID_Thread_cond_wait(MPID_Thread_cond_t * cond, MPID_Thread_mutex_t * mutex)
+{
+    int err;
+    MPIU_Thread_cond_wait(cond,mutex,&err);
+    MPIU_Assert_fmt_msg(err == MPIU_THREAD_SUCCESS,
+                        ("cond_wait failed, err=%d (%s)",err,MPIU_Strerror(err)));
+}
 /*@
   MPID_Thread_cond_broadcast - release all threads currently waiting on a condition variable
   
   Input Parameter:
 . cond - condition variable
 @*/
-void MPID_Thread_cond_broadcast(MPID_Thread_cond_t * cond);
-
+static inline void MPID_Thread_cond_broadcast(MPID_Thread_cond_t * cond)
+{
+    int err;
+    MPIU_Thread_cond_broadcast(cond,&err);
+    MPIU_Assert_fmt_msg(err == MPIU_THREAD_SUCCESS,
+                        ("cond_broadcast failed, err=%d (%s)",err,MPIU_Strerror(err)));
+}
 /*@
   MPID_Thread_cond_signal - release one thread currently waitng on a condition variable
   
   Input Parameter:
 . cond - condition variable
 @*/
-void MPID_Thread_cond_signal(MPID_Thread_cond_t * cond);
-
+static inline void MPID_Thread_cond_signal(MPID_Thread_cond_t * cond)
+{
+    int err;
+    MPIU_Thread_cond_signal(cond,&err);
+    MPIU_Assert_fmt_msg(err == MPIU_THREAD_SUCCESS,
+                        ("cond_signal failed, err=%d (%s)",err,MPIU_Strerror(err)));
+}
 
 /*
  * Thread Local Storage
  */
 typedef void (*MPID_Thread_tls_exit_func_t)(void * value);
-
-
 /*@
   MPID_Thread_tls_create - create a thread local storage space
 
@@ -203,8 +250,10 @@ typedef void (*MPID_Thread_tls_exit_func_t)(void * value);
 - err - location to store the error code; pointer may be NULL; error is zero 
         for success, non-zero if a failure occurred
 @*/
-void MPID_Thread_tls_create(MPID_Thread_tls_exit_func_t exit_func, MPID_Thread_tls_t * tls, int * err);
-
+static inline void MPID_Thread_tls_create(MPID_Thread_tls_exit_func_t exit_func, MPID_Thread_tls_t * tls, int * err)
+{
+    MPIU_Thread_tls_create(exit_func,tls,err);
+}
 /*@
   MPID_Thread_tls_destroy - destroy a thread local storage space
   
@@ -219,8 +268,10 @@ void MPID_Thread_tls_create(MPID_Thread_tls_exit_func_t exit_func, MPID_Thread_t
   The destroy function associated with the thread local storage will not 
   called after the space has been destroyed.
 @*/
-void MPID_Thread_tls_destroy(MPID_Thread_tls_t * tls, int * err);
-
+static inline void MPID_Thread_tls_destroy(MPID_Thread_tls_t * tls, int * err)
+{
+    MPIU_Thread_tls_destroy(tls,err);
+}
 /*@
   MPID_Thread_tls_set - associate a value with the current thread in the 
   thread local storage space
@@ -229,8 +280,13 @@ void MPID_Thread_tls_destroy(MPID_Thread_tls_t * tls, int * err);
 + tls - thread local storage space
 - value - value to associate with current thread
 @*/
-void MPID_Thread_tls_set(MPID_Thread_tls_t * tls, void * value);
-
+static inline void MPID_Thread_tls_set(MPID_Thread_tls_t * tls, void * value)
+{
+    int err;
+    MPIU_Thread_tls_set(tls,value,&err);
+    MPIU_Assert_fmt_msg(err == MPIU_THREAD_SUCCESS,
+                        ("tls_set failed, err=%d (%s)",err,MPIU_Strerror(err)));
+}
 /*@
   MPID_Thread_tls_get - obtain the value associated with the current thread 
   from the thread local storage space
@@ -241,156 +297,11 @@ void MPID_Thread_tls_set(MPID_Thread_tls_t * tls, void * value);
   Output Parameter:
 . value - value associated with current thread
 @*/
-void MPID_Thread_tls_get(MPID_Thread_tls_t * tls, void ** value);
-
-
-/*
- * Error values
- */
-#define MPID_THREAD_SUCCESS MPID_THREAD_ERR_SUCCESS
-#define MPID_THREAD_ERR_SUCCESS 0
-/* FIXME: Define other error codes.  For now, any non-zero value is an error. */
-
-
-/*
- * Implementation specific function definitions (usually in the form of macros)
- *
- * (formerly lived in mpe_funcs.i)
- */
-
-#define MPID_Thread_create(func_, data_, id_, err_)	\
-do {                                                       \
-    MPIU_Thread_create((func_), (data_), (id_), (err_));	\
-} while (0)
-
-#define MPID_Thread_exit()			\
-do {                                               \
-    MPIU_Thread_exit();				\
-} while (0)
-
-#define MPID_Thread_self(id_)			\
-do {                                               \
-    MPIU_Thread_self(id_);			\
-} while (0)
-
-#define MPID_Thread_same(id1_, id2_, same_)	\
-do {                                               \
-    MPIU_Thread_same((id1_), (id2_), (same_));	\
-} while (0)
-
-#define MPID_Thread_yield(mutex_ptr)               \
-do {                                               \
-    MPIU_Thread_yield(mutex_ptr);                  \
-} while (0)
-
-
-/*
- *    Mutexes
- */
-
-#define MPID_Thread_mutex_create(mutex_, err_)	\
-do {                                               \
-    MPIU_Thread_mutex_create((mutex_), (err_));	\
-} while (0)
-
-#define MPID_Thread_mutex_destroy(mutex_, err_)	\
-do {                                               \
-    MPIU_Thread_mutex_destroy((mutex_), (err_));	\
-} while (0)
-
-#define MPID_Thread_mutex_lock(mutex_)		\
-do {                                               \
-    int err_;					\
-    MPIU_Thread_mutex_lock((mutex_), &err_);	\
-    MPIU_Assert_fmt_msg(err_ == MPIU_THREAD_SUCCESS,                                   \
-                        ("mutex_lock failed, err_=%d (%s)",err_,MPIU_Strerror(err_))); \
-} while (0)
-
-#define MPID_Thread_mutex_unlock(mutex_)	\
-do {                                               \
-    int err_;					\
-    MPIU_Thread_mutex_unlock((mutex_), &err_);	\
-    MPIU_Assert_fmt_msg(err_ == MPIU_THREAD_SUCCESS,                                     \
-                        ("mutex_unlock failed, err_=%d (%s)",err_,MPIU_Strerror(err_))); \
-} while (0)
-
-#define MPID_Thread_mutex_trylock(mutex_, flag_)		\
-do {                                                               \
-    int err_;							\
-    MPIU_Thread_mutex_trylock((mutex_), (flag_), &err_);	\
-    MPIU_Assert_fmt_msg(err_ == MPIU_THREAD_SUCCESS,                                      \
-                        ("mutex_trylock failed, err_=%d (%s)",err_,MPIU_Strerror(err_))); \
-} while (0)
-
-
-/*
- * Condition Variables
- */
-
-#define MPID_Thread_cond_create(cond_, err_)	\
-do {                                               \
-    MPIU_Thread_cond_create((cond_), (err_));	\
-} while (0)
-
-#define MPID_Thread_cond_destroy(cond_, err_)	\
-do {                                               \
-    MPIU_Thread_cond_destroy((cond_), (err_));	\
-} while (0)
-
-#define MPID_Thread_cond_wait(cond_, mutex_)		\
-do {                                                       \
-    int err_;						\
-    MPIU_Thread_cond_wait((cond_), (mutex_), &err_);	\
-    MPIU_Assert_fmt_msg(err_ == MPIU_THREAD_SUCCESS,                                  \
-                        ("cond_wait failed, err_=%d (%s)",err_,MPIU_Strerror(err_))); \
-} while (0)
-
-#define MPID_Thread_cond_broadcast(cond_)	\
-do {                                               \
-    int err_;					\
-    MPIU_Thread_cond_broadcast((cond_), &err_);	\
-    MPIU_Assert_fmt_msg(err_ == MPIU_THREAD_SUCCESS,                                       \
-                        ("cond_broadcast failed, err_=%d (%s)",err_,MPIU_Strerror(err_))); \
-} while (0)
-
-#define MPID_Thread_cond_signal(cond_)		\
-do {                                               \
-    int err_;					\
-    MPIU_Thread_cond_signal((cond_), &err_);	\
-    MPIU_Assert_fmt_msg(err_ == MPIU_THREAD_SUCCESS,                                    \
-                        ("cond_signal failed, err_=%d (%s)",err_,MPIU_Strerror(err_))); \
-} while (0)
-
-
-/*
- * Thread Local Storage
- */
-
-#define MPID_Thread_tls_create(exit_func_, tls_, err_)		\
-do {                                                               \
-    MPIU_Thread_tls_create((exit_func_), (tls_), (err_));	\
-} while (0)
-
-#define MPID_Thread_tls_destroy(tls_, err_)	\
-do {                                               \
-    MPIU_Thread_tls_destroy((tls_), (err_));	\
-} while (0)
-
-#define MPID_Thread_tls_set(tls_, value_)		\
-do {                                                       \
-    int err_;						\
-    MPIU_Thread_tls_set((tls_), (value_), &err_);	\
-    MPIU_Assert_fmt_msg(err_ == MPIU_THREAD_SUCCESS,                                \
-                        ("tls_set failed, err_=%d (%s)",err_,MPIU_Strerror(err_))); \
-} while (0)
-
-#define MPID_Thread_tls_get(tls_, value_)		\
-do {                                                       \
-    int err_;						\
-							\
-    MPIU_Thread_tls_get((tls_), (value_), &err_);	\
-    /* can't strerror here, possible endless recursion in strerror */ \
-    MPIU_Assert_fmt_msg(err_ == MPIU_THREAD_SUCCESS,("tls_get failed, err_=%d",err_)); \
-} while (0)
-
+static inline void MPID_Thread_tls_get(MPID_Thread_tls_t * tls, void ** value)
+{
+    int err;
+    MPIU_Thread_tls_get(tls,value,&err);
+    /* can't strerror here, possible endless recursion in strerror */
+    MPIU_Assert_fmt_msg(err == MPIU_THREAD_SUCCESS,("tls_get failed, err=%d",err));
+}
 #endif /* !defined(MPID_THREAD_H_INCLUDED) */
diff --git a/src/mpid/pamid/src/coll/allgather/mpido_allgather.c b/src/mpid/pamid/src/coll/allgather/mpido_allgather.c
index 68e658a..14104a2 100644
--- a/src/mpid/pamid/src/coll/allgather/mpido_allgather.c
+++ b/src/mpid/pamid/src/coll/allgather/mpido_allgather.c
@@ -174,7 +174,7 @@ int MPIDO_Allgather_bcast(const void *sendbuf,
   np = comm_ptr ->local_size;
   MPID_Datatype_get_extent_macro(recvtype, extent);
 
-  MPID_Ensure_Aint_fits_in_pointer ((MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
+  MPIU_Ensure_Aint_fits_in_pointer ((MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
 				     np * recvcount * extent));
   if (sendbuf != MPI_IN_PLACE)
   {
diff --git a/src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c b/src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c
index 57a519a..acf9d47 100644
--- a/src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c
+++ b/src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c
@@ -201,7 +201,7 @@ int MPID_Comm_disconnect(MPID_Comm *comm_ptr)
     int rc, i,j, k, ref_count,mpi_errno=0, probe_flag=0;
     pami_task_t *local_list;
     MPI_Status status;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIDI_PG_t *pg;
     int total_leaders=0, gsize;
     pami_task_t *leader_tids;
@@ -320,8 +320,8 @@ int MPID_Comm_disconnect(MPID_Comm *comm_ptr)
 
 	  /* sanity: the INVALID context ID value could potentially conflict with the
 	   * dynamic proccess space */
-	  MPIU_Assert(lcomm->context_id     != MPIR_INVALID_CONTEXT_ID);
-	  MPIU_Assert(lcomm->recvcontext_id != MPIR_INVALID_CONTEXT_ID);
+	  MPIU_Assert(lcomm->context_id     != MPIU_INVALID_CONTEXT_ID);
+	  MPIU_Assert(lcomm->recvcontext_id != MPIU_INVALID_CONTEXT_ID);
 
 	  /* FIXME - we probably need a unique context_id. */
 
diff --git a/src/mpid/pamid/src/dyntask/mpid_comm_spawn_multiple.c b/src/mpid/pamid/src/dyntask/mpid_comm_spawn_multiple.c
index 81d6298..6e4a8c8 100644
--- a/src/mpid/pamid/src/dyntask/mpid_comm_spawn_multiple.c
+++ b/src/mpid/pamid/src/dyntask/mpid_comm_spawn_multiple.c
@@ -298,7 +298,7 @@ int MPIDI_Comm_spawn_multiple(int count, char **commands,
     }
 
     if (errcodes != MPI_ERRCODES_IGNORE) {
-        mpir_errflag_t errflag = MPIR_ERR_NONE;
+        MPIR_Errflag_t errflag = MPIR_ERR_NONE;
         mpi_errno = MPIR_Bcast_impl(&should_accept, 1, MPI_INT, root, comm_ptr, &errflag);
         if (mpi_errno) TRACE_ERR("MPIR_Bcast_impl returned with mpi_errno=%d\n", mpi_errno);
 
diff --git a/src/mpid/pamid/src/dyntask/mpidi_pg.c b/src/mpid/pamid/src/dyntask/mpidi_pg.c
index f022d9a..bb69e10 100644
--- a/src/mpid/pamid/src/dyntask/mpidi_pg.c
+++ b/src/mpid/pamid/src/dyntask/mpidi_pg.c
@@ -151,14 +151,14 @@ int MPIDI_PG_Finalize(void)
 
    if(MPIR_Process.comm_world->rank == 0) {
 
-     MPIU_Snprintf(key, PMI2_MAX_KEYLEN-1, "%s", "ROOTWIDARRAY");
-     MPIU_Snprintf(value, PMI2_MAX_VALLEN-1, "%s", root_wid_barray);
+     MPL_snprintf(key, PMI2_MAX_KEYLEN-1, "%s", "ROOTWIDARRAY");
+     MPL_snprintf(value, PMI2_MAX_VALLEN-1, "%s", root_wid_barray);
      TRACE_ERR("root_wid_barray=%s\n", value);
      mpi_errno = PMI2_KVS_Put(key, value);
      TRACE_ERR("PMI2_KVS_Put returned with mpi_errno=%d\n", mpi_errno);
 
-     MPIU_Snprintf(key, PMI2_MAX_KEYLEN-1, "%s", "WIDBITARRAYSZ");
-     MPIU_Snprintf(value, PMI2_MAX_VALLEN-1, "%x", wid_bit_array_size);
+     MPL_snprintf(key, PMI2_MAX_KEYLEN-1, "%s", "WIDBITARRAYSZ");
+     MPL_snprintf(value, PMI2_MAX_VALLEN-1, "%x", wid_bit_array_size);
      key[strlen(key)+1]='\0';
      value[strlen(value)+1]='\0';
      mpi_errno = PMI2_KVS_Put(key, value);
@@ -557,7 +557,7 @@ static int MPIDI_getConnInfoKVS( int rank, char *buf, int bufsize, MPIDI_PG_t *p
     int  mpi_errno = MPI_SUCCESS, rc;
     int vallen;
 
-    rc = MPIU_Snprintf(key, MPIDI_MAX_KVS_KEY_LEN, "P%d-businesscard", rank );
+    rc = MPL_snprintf(key, MPIDI_MAX_KVS_KEY_LEN, "P%d-businesscard", rank );
 
     mpi_errno = PMI2_KVS_Get(pg->connData, PMI2_ID_NULL, key, buf, bufsize, &vallen);
     if (mpi_errno) {
@@ -571,7 +571,7 @@ static int MPIDI_getConnInfoKVS( int rank, char *buf, int bufsize, MPIDI_PG_t *p
     char key[MPIDI_MAX_KVS_KEY_LEN];
     int  mpi_errno = MPI_SUCCESS, rc, pmi_errno;
 
-    rc = MPIU_Snprintf(key, MPIDI_MAX_KVS_KEY_LEN, "P%d-businesscard", rank );
+    rc = MPL_snprintf(key, MPIDI_MAX_KVS_KEY_LEN, "P%d-businesscard", rank );
     if (rc < 0 || rc > MPIDI_MAX_KVS_KEY_LEN) {
 	MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
     }
@@ -617,13 +617,13 @@ int MPIDI_connToStringKVS( char **buf_p, int *slen, MPIDI_PG_t *pg )
     string[len++] = 0;
 
     /* Add the size of the pg */
-    MPIU_Snprintf( &string[len], curSlen - len, "%d", pg->size );
+    MPL_snprintf( &string[len], curSlen - len, "%d", pg->size );
     while (string[len]) len++;
     string[len++] = 0;
 
     /* add the taskids of the pg */
     for(i = 0; i < pg->size; i++) {
-      MPIU_Snprintf(buf, MPIDI_MAX_KVS_VALUE_LEN, "%d:", pg->vct[i].taskid);
+      MPL_snprintf(buf, MPIDI_MAX_KVS_VALUE_LEN, "%d:", pg->vct[i].taskid);
       vallen = strlen(buf);
       if (len+vallen+1 >= curSlen) {
         char *nstring = 0;
@@ -633,7 +633,7 @@ int MPIDI_connToStringKVS( char **buf_p, int *slen, MPIDI_PG_t *pg )
         string = nstring;
       }
       /* Append to string */
-      nChars = MPIU_Snprintf(&string[len], curSlen - len, "%d:", pg->vct[i].taskid);
+      nChars = MPL_snprintf(&string[len], curSlen - len, "%d:", pg->vct[i].taskid);
       len+=nChars;
     }
 
@@ -641,7 +641,7 @@ int MPIDI_connToStringKVS( char **buf_p, int *slen, MPIDI_PG_t *pg )
     for (i=0; i<pg->size; i++) {
 	rc = getConnInfoKVS( i, buf, MPIDI_MAX_KVS_VALUE_LEN, pg );
 	if (rc) {
-	    MPIU_Internal_error_printf(
+	    MPL_internal_error_printf(
 		    "Panic: getConnInfoKVS failed for %s (rc=%d)\n",
 		    (char *)pg->id, rc );
 	}
@@ -828,7 +828,7 @@ static int MPIDI_connToString( char **buf_p, int *slen, MPIDI_PG_t *pg )
     while (*pg_id) str[len++] = *pg_id++;
     str[len++] = 0;
 
-    MPIU_Snprintf( &str[len], 20, "%d", pg->size);
+    MPL_snprintf( &str[len], 20, "%d", pg->size);
     /* Skip over the length */
     while (str[len++]);
 
@@ -1011,7 +1011,7 @@ int MPID_PG_ForwardPGInfo( MPID_Comm *peer_ptr, MPID_Comm *comm_ptr,
     int i, allfound = 1, pgid, pgidWorld;
     MPIDI_PG_t *pg = 0;
     MPIDI_PG_iterator iter;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
 
     if(mpidi_dynamic_tasking) {
     /* Get the pgid for CommWorld (always attached to the first process
diff --git a/src/mpid/pamid/src/dyntask/mpidi_port.c b/src/mpid/pamid/src/dyntask/mpidi_port.c
index cab1c20..fe69aca 100644
--- a/src/mpid/pamid/src/dyntask/mpidi_port.c
+++ b/src/mpid/pamid/src/dyntask/mpidi_port.c
@@ -400,8 +400,8 @@ static int MPIDI_Initialize_tmp_comm(struct MPID_Comm **comm_pptr,
 
     /* sanity: the INVALID context ID value could potentially conflict with the
      * dynamic proccess space */
-    MPIU_Assert(tmp_comm->context_id     != MPIR_INVALID_CONTEXT_ID);
-    MPIU_Assert(tmp_comm->recvcontext_id != MPIR_INVALID_CONTEXT_ID);
+    MPIU_Assert(tmp_comm->context_id     != MPIU_INVALID_CONTEXT_ID);
+    MPIU_Assert(tmp_comm->recvcontext_id != MPIU_INVALID_CONTEXT_ID);
 
     /* FIXME - we probably need a unique context_id. */
     tmp_comm->remote_size = 1;
@@ -509,8 +509,8 @@ int MPIDI_Comm_connect(const char *port_name, MPID_Info *info, int root,
     pg_translation *local_translation = NULL, *remote_translation = NULL;
     pg_node *pg_list = NULL;
     MPIDI_PG_t **remote_pg = NULL;
-    MPIR_Context_id_t recvcontext_id = MPIR_INVALID_CONTEXT_ID;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIU_Context_id_t recvcontext_id = MPIU_INVALID_CONTEXT_ID;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     long long comm_cntr, lcomm_cntr;
 
     /* Get the context ID here because we need to send it to the remote side */
@@ -815,7 +815,7 @@ static int MPIDI_ReceivePGAndDistribute( struct MPID_Comm *tmp_comm, struct MPID
     int  rank = comm_ptr->rank;
     int  mpi_errno = 0;
     int  recvtag = *recvtag_p;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
 
     TRACE_ERR("MPIDI_ReceivePGAndDistribute - n_remote_pgs=%d\n", n_remote_pgs);
     for (i=0; i<n_remote_pgs; i++) {
@@ -1088,7 +1088,7 @@ static int MPIDI_SendPGtoPeerAndFree( struct MPID_Comm *tmp_comm, int *sendtag_p
     int mpi_errno = 0;
     int sendtag = *sendtag_p, i;
     pg_node *pg_iter;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
 
     while (pg_list != NULL) {
 	pg_iter = pg_list;
@@ -1149,7 +1149,7 @@ int MPIDI_Comm_accept(const char *port_name, MPID_Info *info, int root,
     pg_translation *local_translation = NULL, *remote_translation = NULL;
     pg_node *pg_list = NULL;
     MPIDI_PG_t **remote_pg = NULL;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     char send_char[16], recv_char[16], remote_taskids[16];
     long long comm_cntr, lcomm_cntr;
     int leader_taskid;
@@ -1384,7 +1384,7 @@ static int MPIDI_SetupNewIntercomm( struct MPID_Comm *comm_ptr, int remote_comm_
 			      struct MPID_Comm *intercomm )
 {
     int mpi_errno = MPI_SUCCESS, i, j, index=0;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     int total_rem_world_cnts, p=0;
     char *world_tasks, *cp1;
     conn_info *tmp_node;
@@ -1683,7 +1683,7 @@ int MPID_PG_BCast( MPID_Comm *peercomm_p, MPID_Comm *comm_p, int root )
     pg_translation *local_translation = 0;
     pg_node *pg_list, *pg_next, *pg_head = 0;
     int rank, i, peer_comm_size;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPIU_CHKLMEM_DECL(1);
 
     peer_comm_size = comm_p->local_size;
diff --git a/src/mpid/pamid/src/misc/mpid_abort.c b/src/mpid/pamid/src/misc/mpid_abort.c
index 55bbbb8..79842c2 100644
--- a/src/mpid/pamid/src/misc/mpid_abort.c
+++ b/src/mpid/pamid/src/misc/mpid_abort.c
@@ -65,7 +65,7 @@ void MPIDI_Abort_core(MPID_Comm * comm, int mpi_errno, int exit_code, const char
     }
 
   snprintf(error_str, sizeof(error_str), "Abort(%d)%s%s: %s%s\n", exit_code, world_str, comm_str, user_str, sys_str);
-  MPIU_Error_printf("%s", error_str);
+  MPL_error_printf("%s", error_str);
 
   fflush(stderr);  fflush(stdout);
 }
diff --git a/src/mpid/pamid/src/mpid_finalize.c b/src/mpid/pamid/src/mpid_finalize.c
index 104dc1b..bdee91a 100644
--- a/src/mpid/pamid/src/mpid_finalize.c
+++ b/src/mpid/pamid/src/mpid_finalize.c
@@ -63,7 +63,7 @@ int MPID_Finalize()
 {
   pami_result_t rc;
   int mpierrno = MPI_SUCCESS;
-  mpir_errflag_t errflag=MPIR_ERR_NONE;
+  MPIR_Errflag_t errflag=MPIR_ERR_NONE;
   MPIR_Barrier_impl(MPIR_Process.comm_world, &errflag);
 
 #ifdef MPIDI_STATISTICS
diff --git a/src/mpid/pamid/src/onesided/mpid_win_allocate.c b/src/mpid/pamid/src/onesided/mpid_win_allocate.c
index 7471fa7..1e73675 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_allocate.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_allocate.c
@@ -55,7 +55,7 @@ MPID_Win_allocate(MPI_Aint     size,
 {
   int mpi_errno  = MPI_SUCCESS;
   int rc = MPI_SUCCESS;
-  mpir_errflag_t errflag = MPIR_ERR_NONE;
+  MPIR_Errflag_t errflag = MPIR_ERR_NONE;
   void *baseP; 
   static char FCNAME[] = "MPID_Win_allocate";
   MPIDI_Win_info  *winfo;
diff --git a/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c b/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c
index 447f2ce..416e358 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c
@@ -159,7 +159,7 @@ MPID_getSharedSegment_mmap(MPID_Win * win)
 {
   int rank, rc, fd;
   int mpi_errno = MPI_SUCCESS;
-  mpir_errflag_t errflag = MPIR_ERR_NONE;
+  MPIR_Errflag_t errflag = MPIR_ERR_NONE;
   int first = 0;
 
   snprintf (win->mpid.shm->shm_key, 63, "/mpich.comm-%d.win_shared", win->comm_ptr->context_id);
@@ -205,7 +205,7 @@ int
 MPID_getSharedSegment_sysv(MPID_Win * win)
 {
     int mpi_errno = MPI_SUCCESS;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     uint32_t shm_key;
     int rank;
     char *cp;
@@ -308,7 +308,7 @@ MPID_getSharedSegment(MPI_Aint     size,
 {
     int mpi_errno = MPI_SUCCESS;
     int i, comm_size, rank;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
     MPI_Aint pageSize,pageSize2, len,new_size;
     MPID_Win  *win;
     int    padSize;
@@ -484,7 +484,7 @@ MPID_Win_allocate_shared(MPI_Aint     size,
                          MPID_Win  ** win_ptr)
 {
   int mpi_errno  = MPI_SUCCESS;
-  mpir_errflag_t errflag = MPIR_ERR_NONE;
+  MPIR_Errflag_t errflag = MPIR_ERR_NONE;
   int onNode     = 0;
   MPID_Win    *win = NULL;
   int rank, prev_size;
diff --git a/src/mpid/pamid/src/onesided/mpid_win_create.c b/src/mpid/pamid/src/onesided/mpid_win_create.c
index 8adb91b..a907189 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_create.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_create.c
@@ -105,7 +105,7 @@ int
 MPIDI_Win_allgather( MPI_Aint size, MPID_Win **win_ptr )
 {
   int mpi_errno = MPI_SUCCESS;
-  mpir_errflag_t errflag=MPIR_ERR_NONE;
+  MPIR_Errflag_t errflag=MPIR_ERR_NONE;
   MPID_Win *win;
   int rank;
   MPID_Comm *comm_ptr;
@@ -187,7 +187,7 @@ MPID_Win_create(void       * base,
                 MPID_Win  ** win_ptr)
 {
   int mpi_errno  = MPI_SUCCESS;
-  mpir_errflag_t errflag = MPIR_ERR_NONE;
+  MPIR_Errflag_t errflag = MPIR_ERR_NONE;
   int rc  = MPI_SUCCESS;
   MPID_Win *win;
   size_t  rank;
@@ -207,7 +207,7 @@ MPID_Win_create(void       * base,
       return rc;
 
 
-  mpi_errno = MPIR_Barrier_impl(comm_ptr, (mpir_errflag_t *) &errflag);
+  mpi_errno = MPIR_Barrier_impl(comm_ptr, (MPIR_Errflag_t *) &errflag);
 
   return mpi_errno;
 }
diff --git a/src/mpid/pamid/src/onesided/mpid_win_create_dynamic.c b/src/mpid/pamid/src/onesided/mpid_win_create_dynamic.c
index 9134e69..b3897c3 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_create_dynamic.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_create_dynamic.c
@@ -43,7 +43,7 @@ MPID_Win_create_dynamic( MPID_Info  * info,
                   MPID_Win  ** win_ptr)
 {
   int mpi_errno  = MPI_SUCCESS;
-  mpir_errflag_t errflag = MPIR_ERR_NONE;
+  MPIR_Errflag_t errflag = MPIR_ERR_NONE;
   int rc = MPI_SUCCESS;
   MPIDI_Win_info  *winfo;
   MPID_Win     *win;
@@ -84,7 +84,7 @@ MPID_Win_create_dynamic( MPID_Info  * info,
   if (rc != MPI_SUCCESS)
       return rc;
 
-  mpi_errno = MPIR_Barrier_impl(comm_ptr, (mpir_errflag_t *) &errflag);
+  mpi_errno = MPIR_Barrier_impl(comm_ptr, (MPIR_Errflag_t *) &errflag);
 
   return mpi_errno;
 }
diff --git a/src/mpid/pamid/src/onesided/mpid_win_fence.c b/src/mpid/pamid/src/onesided/mpid_win_fence.c
index bc84ff0..dcb1139 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_fence.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_fence.c
@@ -27,7 +27,7 @@ MPID_Win_fence(int       assert,
                MPID_Win *win)
 {
   int mpi_errno = MPI_SUCCESS;
-  mpir_errflag_t errflag = MPIR_ERR_NONE;
+  MPIR_Errflag_t errflag = MPIR_ERR_NONE;
   static char FCNAME[] = "MPID_Win_fence";
 
   if(win->mpid.sync.origin_epoch_type != win->mpid.sync.target_epoch_type){
diff --git a/src/mpid/pamid/src/onesided/mpid_win_free.c b/src/mpid/pamid/src/onesided/mpid_win_free.c
index ecd1df3..1db090d 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_free.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_free.c
@@ -83,7 +83,7 @@ MPID_Win_free(MPID_Win **win_ptr)
 
   MPID_Win *win = *win_ptr;
   size_t rank = win->comm_ptr->rank;
-  mpir_errflag_t errflag = MPIR_ERR_NONE;
+  MPIR_Errflag_t errflag = MPIR_ERR_NONE;
 
   if(win->mpid.sync.origin_epoch_type != win->mpid.sync.target_epoch_type ||
      (win->mpid.sync.origin_epoch_type != MPID_EPOTYPE_NONE &&
diff --git a/src/mpid/pamid/src/onesided/mpid_win_set_info.c b/src/mpid/pamid/src/onesided/mpid_win_set_info.c
index f55676d..6857668 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_set_info.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_set_info.c
@@ -93,7 +93,7 @@ int
 MPID_Win_set_info(MPID_Win     *win, MPID_Info    *info)
 {
     int mpi_errno = MPI_SUCCESS;
-    mpir_errflag_t errflag = MPIR_ERR_NONE;
+    MPIR_Errflag_t errflag = MPIR_ERR_NONE;
 
     mpi_errno = MPIDI_Win_set_info(win, info);
     MPID_assert(mpi_errno == MPI_SUCCESS);
diff --git a/src/mpl/Makefile.am b/src/mpl/Makefile.am
index 355f102..d4a8675 100644
--- a/src/mpl/Makefile.am
+++ b/src/mpl/Makefile.am
@@ -8,7 +8,12 @@ ACLOCAL_AMFLAGS = -I confdb
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
 
 noinst_LTLIBRARIES = lib at MPLLIBNAME@.la
-lib at MPLLIBNAME@_la_SOURCES = src/mplstr.c src/mpltrmem.c src/mplenv.c src/mplsock.c
+lib at MPLLIBNAME@_la_SOURCES = \
+	src/mplstr.c \
+	src/mpltrmem.c \
+	src/mplenv.c \
+	src/mplmsg.c \
+	src/mplsock.c
 lib at MPLLIBNAME@_la_LDFLAGS = ${lib at MPLLIBNAME@_so_versionflags}
 
 MPL_TESTS = strsep
@@ -25,6 +30,8 @@ mpl_headers =              \
     include/mplenv.h       \
     include/mplstr.h       \
     include/mpltrmem.h     \
+    include/mplmsg.h       \
+    include/mpliov.h       \
     include/mplsock.h
 
 if MPL_EMBEDDED_MODE
diff --git a/src/mpl/include/mpl.h b/src/mpl/include/mpl.h
index 28120a1..4fef381 100644
--- a/src/mpl/include/mpl.h
+++ b/src/mpl/include/mpl.h
@@ -62,5 +62,7 @@
 #include "mpltrmem.h"
 #include "mplenv.h"
 #include "mplsock.h"
+#include "mplmsg.h"
+#include "mpliov.h"
 
 #endif /* MPL_H_INCLUDED */
diff --git a/src/include/mpiiov.h b/src/mpl/include/mpliov.h
similarity index 56%
rename from src/include/mpiiov.h
rename to src/mpl/include/mpliov.h
index 3f9c3f7..da3f250 100644
--- a/src/include/mpiiov.h
+++ b/src/mpl/include/mpliov.h
@@ -3,21 +3,24 @@
  *  (C) 2001 by Argonne National Laboratory.
  *      See COPYRIGHT in top-level directory.
  */
-#ifndef MPIIOV_H_INCLUDED
-#define MPIIOV_H_INCLUDED
+
+#ifndef MPLIOV_H_INCLUDED
+#define MPLIOV_H_INCLUDED
+
+#include <stdio.h>
 
 /* IOVs */
 /* The basic channel interface uses IOVs */
 #ifdef HAVE_WINDOWS_H
-    #define MPID_IOV_BUF_CAST char *
+    #define MPL_IOV_BUF_CAST char *
 #else
-    #define MPID_IOV_BUF_CAST void *
+    #define MPL_IOV_BUF_CAST void *
 #endif
 #ifdef HAVE_WINDOWS_H
 #include <winsock2.h>
-#define MPID_IOV         WSABUF
-#define MPID_IOV_LEN     len
-#define MPID_IOV_BUF     buf
+#define MPL_IOV         WSABUF
+#define MPL_IOV_LEN     len
+#define MPL_IOV_BUF     buf
 #else
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h> /* macs need sys/types.h before uio.h can be included */
@@ -25,11 +28,11 @@
 #ifdef HAVE_SYS_UIO_H
 #include <sys/uio.h>
 #endif
-#define MPID_IOV         struct iovec
-#define MPID_IOV_LEN     iov_len
-#define MPID_IOV_BUF     iov_base
+#define MPL_IOV         struct iovec
+#define MPL_IOV_LEN     iov_len
+#define MPL_IOV_BUF     iov_base
 #endif
 /* FIXME: How is IOV_LIMIT chosen? */
-#define MPID_IOV_LIMIT   16
+#define MPL_IOV_LIMIT   16
 
-#endif
+#endif  /* MPLIOV_H_INCLUDED */
diff --git a/src/mpl/include/mplmsg.h b/src/mpl/include/mplmsg.h
new file mode 100644
index 0000000..650b6e8
--- /dev/null
+++ b/src/mpl/include/mplmsg.h
@@ -0,0 +1,32 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2005 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+#ifndef MPLMSG_H_INCLUDED
+#define MPLMSG_H_INCLUDED
+
+#include "mpl.h"
+
+/* These macros can be used to prevent inlining for utility functions
+ * where it might make debugging easier. */
+#if defined(HAVE_ERROR_CHECKING)
+#define MPL_DBG_ATTRIBUTE_NOINLINE ATTRIBUTE((__noinline__))
+#define MPL_DBG_INLINE_KEYWORD
+#else
+#define MPL_DBG_ATTRIBUTE_NOINLINE
+#define MPL_DBG_INLINE_KEYWORD inline
+#endif
+
+/* These routines are used to ensure that messages are sent to the
+ * appropriate output and (eventually) are properly
+ * internationalized */
+int MPL_usage_printf(mpl_const char *str, ...) ATTRIBUTE((format(printf, 1, 2)));
+int MPL_msg_printf(mpl_const char *str, ...) ATTRIBUTE((format(printf, 1, 2)));
+int MPL_internal_error_printf(mpl_const char *str, ...) ATTRIBUTE((format(printf, 1, 2)));
+int MPL_internal_sys_error_printf(mpl_const char *, int, mpl_const char *str,
+                                  ...) ATTRIBUTE((format(printf, 3, 4)));
+void MPL_exit(int);
+
+#endif /* MPLMSG_H_INCLUDED */
diff --git a/src/mpl/src/mplmsg.c b/src/mpl/src/mplmsg.c
new file mode 100644
index 0000000..8286569
--- /dev/null
+++ b/src/mpl/src/mplmsg.c
@@ -0,0 +1,98 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2001 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+#include "mpl.h"
+
+/* style: allow:vprintf:1 sig:0 */
+/* style: allow:vfprintf:4 sig:0 */
+/* style: allow:fprintf:2 sig:0 */
+
+int MPL_usage_printf(const char *str, ...)
+{
+    int n;
+    va_list list;
+    const char *format_str;
+
+    va_start(list, str);
+    format_str = str;
+    n = vprintf(format_str, list);
+    va_end(list);
+
+    fflush(stdout);
+
+    return n;
+}
+
+int MPL_internal_error_printf(const char *str, ...)
+{
+    int n;
+    va_list list;
+    const char *format_str;
+
+    va_start(list, str);
+    format_str = str;
+    n = vfprintf(stderr, format_str, list);
+    va_end(list);
+
+    fflush(stderr);
+
+    return n;
+}
+
+/* Like internal_error_printf, but for the system routine name with
+   errno errnum.  Str may be null */
+int MPL_internal_sys_error_printf(const char *name, int errnum, const char *str, ...)
+{
+    int n = 0;
+    va_list list;
+    const char *format_str = 0;
+
+    /* Prepend information on the system error */
+#ifdef HAVE_STRERROR
+    if (!format_str)
+        format_str = "Error in system call %s: %s\n";
+
+    fprintf(stderr, format_str, name, strerror(errnum));
+#else
+    if (!format_str)
+        format_str = "Error in system call %s errno = %d\n";
+
+    fprintf(stderr, "Error in %s: errno = %d\n", name, errnum);
+#endif
+
+    /* Now add the message that is specific to this use, if any */
+    if (str) {
+        va_start(list, str);
+        format_str = str;
+        n = vfprintf(stderr, format_str, list);
+        va_end(list);
+    }
+
+    fflush(stderr);
+
+    return n;
+}
+
+int MPL_msg_printf(const char *str, ...)
+{
+    int n;
+    va_list list;
+    const char *format_str;
+
+    va_start(list, str);
+    format_str = str;
+    n = vfprintf(stdout, format_str, list);
+    va_end(list);
+
+    fflush(stdout);
+
+    return n;
+}
+
+void MPL_exit(int exit_code)
+{
+    exit(exit_code);
+}
diff --git a/src/mutex/mutex_create.c b/src/mutex/mutex_create.c
index 91c0766..a93baea 100644
--- a/src/mutex/mutex_create.c
+++ b/src/mutex/mutex_create.c
@@ -11,7 +11,6 @@
 #include <strings.h>
 
 #include <mpi.h>
-#include <mpitypedefs.h>
 #include "muteximpl.h"
 
 
diff --git a/src/mutex/muteximpl.h b/src/mutex/muteximpl.h
index 69a5cbf..eb655f6 100644
--- a/src/mutex/muteximpl.h
+++ b/src/mutex/muteximpl.h
@@ -8,8 +8,7 @@
 #define MUTEXIMPL_H_INCLUDED
 
 #include <mpi.h>
-#include <mpitypedefs.h>
-
+#include <stdint.h>
 #define MPIX_MUTEX_TAG 100
 
 #ifdef ENABLE_DEBUG
diff --git a/src/nameserv/file/file_nameserv.c b/src/nameserv/file/file_nameserv.c
index 3109bac..4c83e8e 100644
--- a/src/nameserv/file/file_nameserv.c
+++ b/src/nameserv/file/file_nameserv.c
@@ -175,7 +175,7 @@ int MPID_NS_Publish( MPID_NS_Handle handle, const MPID_Info *info_ptr,
 	case ENOMEM:
 	    reason "Insufficient kernel memory available";
 	default:
-	    MPIU_Snprintf( rstr, sizeof(rstr), "errno = %d", errno );
+	    MPL_snprintf( rstr, sizeof(rstr), "errno = %d", errno );
 	}
 #endif
 	err = MPIR_Err_create_code( 
diff --git a/src/pm/gforker/mpiexec.c b/src/pm/gforker/mpiexec.c
index 4974357..378f4c4 100644
--- a/src/pm/gforker/mpiexec.c
+++ b/src/pm/gforker/mpiexec.c
@@ -133,7 +133,7 @@ int main( int argc, char *argv[], char *envp[] )
     /* If there were any soft arguments, we need to handle them now */
     rc = MPIE_InitWorldWithSoft( &pUniv.worlds[0], pUniv.size );
     if (!rc) {
-	MPIU_Error_printf( "Unable to process soft arguments\n" );
+	MPL_error_printf( "Unable to process soft arguments\n" );
 	exit(1);
     }
 
@@ -163,10 +163,10 @@ int main( int argc, char *argv[], char *envp[] )
     if (getenv("MPIEXEC_USE_PORT")) {
 	s.pmiinfo.portName = (char *)MPIU_Malloc( 1024 );
 	if (!s.pmiinfo.portName) {
-	    MPIU_Error_printf( "Failed to allocate storage for portName" );
+	    MPL_error_printf( "Failed to allocate storage for portName" );
 	}
 	if (PMIServSetupPort( &pUniv, s.pmiinfo.portName, 1024 )) {
-	    MPIU_Error_printf( "Failed to setup a host:port\n" );
+	    MPL_error_printf( "Failed to setup a host:port\n" );
 	}
 	else {
 	    usePort = 1;
@@ -203,7 +203,7 @@ int main( int argc, char *argv[], char *envp[] )
 				    pUniv.singletonPort );
 	if (newfd < 0) {
 	    /* Unable to connect */
-	    MPIU_Error_printf( "Unable to connect to singleton process" );
+	    MPL_error_printf( "Unable to connect to singleton process" );
 	    exit(1);
 	}
 	pState = pUniv.worlds[0].apps->pState;
@@ -236,11 +236,11 @@ int main( int argc, char *argv[], char *envp[] )
 	/* Exited due to timeout.  Generate an error message and
 	   terminate the children */
 	if (pUniv.timeout > 60) {
-	    MPIU_Error_printf( "Timeout of %d minutes expired; job aborted\n",
+	    MPL_error_printf( "Timeout of %d minutes expired; job aborted\n",
 			       pUniv.timeout / 60 );
 	}
 	else {
-	    MPIU_Error_printf( "Timeout of %d seconds expired; job aborted\n",
+	    MPL_error_printf( "Timeout of %d seconds expired; job aborted\n",
 			       pUniv.timeout );
 	}
 	erc = 1;
@@ -275,12 +275,12 @@ int main( int argc, char *argv[], char *envp[] )
 void mpiexec_usage( const char *msg )
 {
     if (msg) {
-	MPIU_Error_printf( "%s", msg );
+	MPL_error_printf( "%s", msg );
 	if (msg[strlen(msg)-1] != '\n') {
-	    MPIU_Error_printf( "\n" );
+	    MPL_error_printf( "\n" );
 	}
     }
-    MPIU_Usage_printf( "Usage: mpiexec %s\n", MPIE_ArgDescription() );
+    MPL_usage_printf( "Usage: mpiexec %s\n", MPIE_ArgDescription() );
     exit( -1 );
 }
 
@@ -309,14 +309,14 @@ int mypreamble( void *data, ProcessState *pState )
 	/* Create the string of ranks.  These are ranks in comm_world */
 	ranks[0] = 0;
 	for (i=0; i<size; i++) {
-	    MPIU_Snprintf( digits, sizeof(digits), "%d,", i );
+	    MPL_snprintf( digits, sizeof(digits), "%d,", i );
 	    MPIU_Strnapp( ranks, digits, sizeof(ranks) );
 	}
 	/* Remove the trailing comma */
 	if (size > 0) 
 	    ranks[strlen(ranks)-1] = 0;
 	/* Add this to the predefined keys */
-	MPIU_Snprintf( key, sizeof(key), "pmiPrivateLocalRanks_%d", 
+	MPL_snprintf( key, sizeof(key), "pmiPrivateLocalRanks_%d", 
 		       pState->wRank );
 	/* printf( "%s = %s\n", key, ranks ); */
 	
diff --git a/src/pm/remshell/mpiexec.c b/src/pm/remshell/mpiexec.c
index 81593e3..6c133c5 100644
--- a/src/pm/remshell/mpiexec.c
+++ b/src/pm/remshell/mpiexec.c
@@ -128,7 +128,7 @@ int main( int argc, char *argv[], char *envp[] )
     /* If there were any soft arguments, we need to handle them now */
     rc = MPIE_InitWorldWithSoft( &pUniv.worlds[0], pUniv.size );
     if (!rc) {
-	MPIU_Error_printf( "Unable to process soft arguments\n" );
+	MPL_error_printf( "Unable to process soft arguments\n" );
 	exit(1);
     }
 
@@ -141,7 +141,7 @@ int main( int argc, char *argv[], char *envp[] )
 
     rc = MPIE_ChooseHosts( &pUniv.worlds[0], MPIE_ReadMachines, 0 );
     if (rc) {
-	MPIU_Error_printf( "Unable to assign hosts to processes\n" );
+	MPL_error_printf( "Unable to assign hosts to processes\n" );
 	exit(1);
     }
 
@@ -153,7 +153,7 @@ int main( int argc, char *argv[], char *envp[] )
        processes */
     rc = PMIServSetupPort( &pUniv, portString, sizeof(portString) );
     if (rc) {
-	MPIU_Error_printf( "Unable to setup port for listener\n" );
+	MPL_error_printf( "Unable to setup port for listener\n" );
 	exit(1);
     }
     s.pmiinfo.portName = portString;
@@ -176,7 +176,7 @@ int main( int argc, char *argv[], char *envp[] )
     }
     else {
 	/* FIXME: The singleton code goes here */
-	MPIU_Error_printf( "Singleton init not supported\n" );
+	MPL_error_printf( "Singleton init not supported\n" );
 	exit(1);
     }
     reason = MPIE_IOLoop( pUniv.timeout );
@@ -185,11 +185,11 @@ int main( int argc, char *argv[], char *envp[] )
 	/* Exited due to timeout.  Generate an error message and
 	   terminate the children */
 	if (pUniv.timeout > 60) {
-	    MPIU_Error_printf( "Timeout of %d minutes expired; job aborted\n",
+	    MPL_error_printf( "Timeout of %d minutes expired; job aborted\n",
 			       pUniv.timeout / 60 );
 	}
 	else {
-	    MPIU_Error_printf( "Timeout of %d seconds expired; job aborted\n",
+	    MPL_error_printf( "Timeout of %d seconds expired; job aborted\n",
 			       pUniv.timeout );
 	}
 	erc = 1;
@@ -219,12 +219,12 @@ int main( int argc, char *argv[], char *envp[] )
 void mpiexec_usage( const char *msg )
 {
     if (msg) {
-	MPIU_Error_printf( "%s", msg );
+	MPL_error_printf( "%s", msg );
 	if (msg[strlen(msg)-1] != '\n') {
-	    MPIU_Error_printf( "\n" );
+	    MPL_error_printf( "\n" );
 	}
     }
-    MPIU_Usage_printf( "Usage: mpiexec %s\n", MPIE_ArgDescription() );
+    MPL_usage_printf( "Usage: mpiexec %s\n", MPIE_ArgDescription() );
     exit( -1 );
 }
 
@@ -269,7 +269,7 @@ int mypostfork( void *predata, void *data, ProcessState *pState )
 	newargs = (const char **) MPIU_Malloc( (app->nArgs + 14 + 1) * 
 					  sizeof(char *) );
 	if (!pState->hostname) {
-	    MPIU_Error_printf( "No hostname avaliable for %s\n", app->exename );
+	    MPL_error_printf( "No hostname avaliable for %s\n", app->exename );
 	    exit(1);
 	}
 
diff --git a/src/pm/util/cmnargs.c b/src/pm/util/cmnargs.c
index 4f4da48..d8b00cc 100644
--- a/src/pm/util/cmnargs.c
+++ b/src/pm/util/cmnargs.c
@@ -246,7 +246,7 @@ int MPIE_Args( int argc, char *argv[], ProcessUniverse *mypUniv,
 	else if (strncmp( argv[i], "-channel=", 9 ) == 0) {
 	    const char *channame = argv[i] + 9;
 	    char envstring[256];
-	    MPIU_Snprintf( envstring, sizeof(envstring), "MPICH_CH3CHANNEL=%s",
+	    MPL_snprintf( envstring, sizeof(envstring), "MPICH_CH3CHANNEL=%s",
 			   channame );
 	    MPIE_Putenv( mypUniv->worlds, envstring );
 	}
@@ -346,7 +346,7 @@ int MPIE_Args( int argc, char *argv[], ProcessUniverse *mypUniv,
 		i += (incr-1);
 	    }
 	    else {
-		MPIU_Error_printf( "invalid mpiexec argument %s\n", argv[i] );
+		MPL_error_printf( "invalid mpiexec argument %s\n", argv[i] );
 		mpiexec_usage( NULL );
 		return -1;
 	    }
@@ -360,7 +360,7 @@ int MPIE_Args( int argc, char *argv[], ProcessUniverse *mypUniv,
     }
 
     if (optionArgs && optionCmdline) {
-	MPIU_Error_printf( "-configfile may not be used with other options\n" );
+	MPL_error_printf( "-configfile may not be used with other options\n" );
 	return -1;
     }
     return curplist;
@@ -522,7 +522,7 @@ static int getInt( int argnum, int argc, char *argv[] )
 	p = argv[argnum];
 	i = strtol( argv[argnum], &p, 0 );
 	if (p == argv[argnum]) {
-	    MPIU_Error_printf( "Invalid parameter value %s to argument %s\n",
+	    MPL_error_printf( "Invalid parameter value %s to argument %s\n",
 		     argv[argnum], argv[argnum-1] );
 	    mpiexec_usage( NULL );
 	    /* Does not return */
@@ -530,7 +530,7 @@ static int getInt( int argnum, int argc, char *argv[] )
 	return (int)i;
     }
     else {
-	MPIU_Error_printf( "Missing argument to %s\n", argv[argnum-1] );
+	MPL_error_printf( "Missing argument to %s\n", argv[argnum-1] );
 	mpiexec_usage( NULL );
 	/* Does not return */
     }
@@ -657,7 +657,7 @@ static int ReadConfigFile( const char *filename, ProcessUniverse *mypUniv)
 
     fp = fopen( filename, "r" );
     if (!fp) {
-	MPIU_Error_printf( "Unable to open configfile %s\n", filename );
+	MPL_error_printf( "Unable to open configfile %s\n", filename );
 	return -1;
     }
 
@@ -696,7 +696,7 @@ static int LineToArgv( char *linebuf, char *(argv[]), int maxargv )
     while (*p) {
 	while (isspace(*p)) p++;
 	if (argc >= maxargv) {
-	    MPIU_Error_printf( "Too many arguments in configfile line\n" );
+	    MPL_error_printf( "Too many arguments in configfile line\n" );
 	    return -1;
 	}
 	argv[argc] = p;
diff --git a/src/pm/util/dbgiface.c b/src/pm/util/dbgiface.c
index 9e7faec..a8d2382 100644
--- a/src/pm/util/dbgiface.c
+++ b/src/pm/util/dbgiface.c
@@ -12,9 +12,9 @@
  * defined in process.h)
  */
 #include "mpichconf.h"
+#include "mpl.h"
 #include "pmutil.h"
 #include <stdio.h>
-#include "mpibase.h"
 #include "process.h"
 #include "pmiserv.h" /* for MPIE_GetMyHostName */
 
diff --git a/src/pm/util/ioloop.c b/src/pm/util/ioloop.c
index 2c8572e..d98ddf1 100644
--- a/src/pm/util/ioloop.c
+++ b/src/pm/util/ioloop.c
@@ -188,7 +188,7 @@ int MPIE_IOLoop( int timeoutSeconds )
 	}
 	if (nfds < 0) {
 	    /* Serious error */
-	    MPIU_Internal_sys_error_printf( "select", errno, 0 );
+	    MPL_internal_sys_error_printf( "select", errno, 0 );
 	    break;
 	}
 	if (nfds == 0) { 
diff --git a/src/pm/util/labelout.c b/src/pm/util/labelout.c
index 019697e..fc0b464 100644
--- a/src/pm/util/labelout.c
+++ b/src/pm/util/labelout.c
@@ -34,7 +34,7 @@
 #include "labelout.h"
 
 #ifdef HAVE_SNPRINTF
-#define MPIU_Snprintf snprintf
+#define MPL_snprintf snprintf
 #ifdef NEEDS_SNPRINTF_DECL
 /* style: allow:sprintf:1 sig:0 */
 int snprintf(char *, size_t, const char *, ...);
@@ -196,9 +196,9 @@ static int IOLabelSetLabelText( const char pattern[], char label[],
     char        worldnumAsChar[12];
 
     /* Convert the rank in world to characters */
-    MPIU_Snprintf( rankAsChar, sizeof(rankAsChar), "%d", rank );
+    MPL_snprintf( rankAsChar, sizeof(rankAsChar), "%d", rank );
     /* Convert the world number to characters */
-    MPIU_Snprintf( worldnumAsChar, sizeof(worldnumAsChar), "%d", worldnum );
+    MPL_snprintf( worldnumAsChar, sizeof(worldnumAsChar), "%d", worldnum );
 
     pout[0] = 0;
     /* Copy the pattern looking for format commands */
@@ -291,7 +291,7 @@ int IOLabelCheckEnv( void )
 	    useLabels = 1;
 	}
 	else {
-	    MPIU_Error_printf( "Pattern for stdout label specified by MPIEXEC_PREFIX_STROUT is too long" );
+	    MPL_error_printf( "Pattern for stdout label specified by MPIEXEC_PREFIX_STROUT is too long" );
 	}
     }
     envval = getenv( "MPIEXEC_PREFIX_STDERR" );
@@ -301,7 +301,7 @@ int IOLabelCheckEnv( void )
 	    useLabels = 1;
 	}
 	else {
-	    MPIU_Error_printf( "Pattern for stderr label specified by MPIEXEC_PREFIX_STRERR is too long" );
+	    MPL_error_printf( "Pattern for stderr label specified by MPIEXEC_PREFIX_STRERR is too long" );
 	}
     }
 
diff --git a/src/pm/util/newsession.c b/src/pm/util/newsession.c
index c597dd7..f1b3dbd 100644
--- a/src/pm/util/newsession.c
+++ b/src/pm/util/newsession.c
@@ -33,7 +33,7 @@ if (!isatty(0) && !isatty(1) && !isatty(2) && getsid(0) != getpid()) {
 /*    printf( "Session id = %d and process id = %d\n", getsid(0), getpid() );*/
     MPIE_SYSCALL(rc,setsid,());
     if (rc < 0) {
-	MPIU_Internal_sys_error_printf( "setsid", errno, 
+	MPL_internal_sys_error_printf( "setsid", errno, 
 				"Could not create new process group\n" );
 	}
     }
diff --git a/src/pm/util/pmiport.c b/src/pm/util/pmiport.c
index f12e208..431af2c 100644
--- a/src/pm/util/pmiport.c
+++ b/src/pm/util/pmiport.c
@@ -119,7 +119,7 @@ int PMIServGetPort( int *fdout, char *portString, int portLen )
 	    while (*p && isdigit(*p)) high_port = 10 * high_port + (*p++ - '0');
 	}
 	if (*p) {
-	    MPIU_Error_printf( "Invalid character %c in MPIEXEC_PORTRANGE\n", 
+	    MPL_error_printf( "Invalid character %c in MPIEXEC_PORTRANGE\n", 
 			       *p );
 	    return -1;
 	}
@@ -139,7 +139,7 @@ int PMIServGetPort( int *fdout, char *portString, int portLen )
     
 	if (setsockopt( fd, IPPROTO_TCP, TCP_NODELAY, 
 		    (char *)&optval, sizeof(optval) )) {
-	    MPIU_Internal_sys_error_printf( "setsockopt", errno, 0 );
+	    MPL_internal_sys_error_printf( "setsockopt", errno, 0 );
 	}
 	
 	if (bind( fd, (struct sockaddr *)&sa, sizeof(sa) ) < 0) {
@@ -181,7 +181,7 @@ int PMIServGetPort( int *fdout, char *portString, int portLen )
 	char hostname[MAX_HOST_NAME+1];
 	hostname[0] = 0;
 	MPIE_GetMyHostName( hostname, sizeof(hostname) );
-	MPIU_Snprintf( portString, portLen, "%s:%d", hostname, portnum );
+	MPL_snprintf( portString, portLen, "%s:%d", hostname, portnum );
     }
     
     return 0;
@@ -271,7 +271,7 @@ int PMIServAcceptFromPort( int fd, int rdwr, void *data )
 	}
 	if (!pState) {
 	    /* We have a problem */
-	    MPIU_Error_printf( "Unable to find process with PMI_ID = %d in the universe", id );
+	    MPL_error_printf( "Unable to find process with PMI_ID = %d in the universe", id );
 	    return -1;
 	}
 
@@ -320,7 +320,7 @@ int PMIServSetupPort( ProcessUniverse *mypUniv, char *portString, int portLen )
     if (rc) return rc;
     rc = MPIE_IORegister( listenfd, IO_READ, PMIServAcceptFromPort, mypUniv );
     if (mypUniv->OnNone) {
-	MPIU_Internal_error_printf( "pUniv.OnNone already set; cannot set to PMIServEndPort\n" );
+	MPL_internal_error_printf( "pUniv.OnNone already set; cannot set to PMIServEndPort\n" );
 	return -1;
     }
     else {
diff --git a/src/pm/util/pmiserv.c b/src/pm/util/pmiserv.c
index cf8fdff..46f7c90 100644
--- a/src/pm/util/pmiserv.c
+++ b/src/pm/util/pmiserv.c
@@ -38,7 +38,7 @@
 #include "simple_pmiutil.h"
 
 #ifdef HAVE_SNPRINTF
-#define MPIU_Snprintf snprintf
+#define MPL_snprintf snprintf
 #ifdef NEEDS_SNPRINTF_DECL
 int snprintf(char *, size_t, const char *, ...);
 #endif
@@ -169,26 +169,26 @@ int PMISetupInClient( int usePort, PMISetup *pmiinfo )
 
     if (usePort == 0) {
 	close( pmiinfo->fdpair[0] );
-	MPIU_Snprintf( env_pmi_fd, sizeof(env_pmi_fd), "PMI_FD=%d" , 
+	MPL_snprintf( env_pmi_fd, sizeof(env_pmi_fd), "PMI_FD=%d" , 
 		       pmiinfo->fdpair[1] );
 	if (MPIE_Putenv( pmiinfo->pWorld, env_pmi_fd )) {
-	    MPIU_Internal_error_printf( "Could not set environment PMI_FD" );
+	    MPL_internal_error_printf( "Could not set environment PMI_FD" );
 	    return 1;
 	}
     }
     else {
 	/* We must communicate the port name to the process */
 	if (pmiinfo->portName) {
-	    MPIU_Snprintf( env_pmi_port, sizeof(env_pmi_port), "PMI_PORT=%s",
+	    MPL_snprintf( env_pmi_port, sizeof(env_pmi_port), "PMI_PORT=%s",
 			   pmiinfo->portName );
 	    if (MPIE_Putenv( pmiinfo->pWorld, env_pmi_port )) {
-		MPIU_Internal_error_printf( "Could not set environment PMI_PORT" );
+		MPL_internal_error_printf( "Could not set environment PMI_PORT" );
 		perror( "Reason: " );
 		return 1;
 	    }
 	}
 	else {
-	    MPIU_Internal_error_printf( "Required portname was not defined\n" );
+	    MPL_internal_error_printf( "Required portname was not defined\n" );
 	    return 1;
 	}
 	
@@ -405,7 +405,7 @@ static int fPMI_Handle_finalize( PMIProcess *pentry )
     pentry->pState->status = PROCESS_FINALIZED;
 
     /* send back an acknowledgement to release the process */
-    MPIU_Snprintf(outbuf, PMIU_MAXLINE, "cmd=finalize_ack\n");
+    MPL_snprintf(outbuf, PMIU_MAXLINE, "cmd=finalize_ack\n");
     PMIWriteLine(pentry->fd, outbuf);
 
     return 0;
@@ -458,7 +458,7 @@ static PMIKVSpace *fPMIKVSAllocate( void )
     /* Create the space */
     kvs = (PMIKVSpace *)MPIU_Malloc( sizeof(PMIKVSpace) );
     if (!kvs) {
-	MPIU_Internal_error_printf( "too many kvs's\n" );
+	MPL_internal_error_printf( "too many kvs's\n" );
 	return 0;
     }
     /* We include the pid of the PMI server as a way to allow multiple
@@ -468,7 +468,7 @@ static PMIKVSpace *fPMIKVSAllocate( void )
        hostname as well, just to avoid getting the same pid on two
        different hosts, but this is probably good enough for most
        uses) */
-    MPIU_Snprintf( (char *)(kvs->kvsname), MAXNAMELEN, "kvs_%d_%d", 
+    MPL_snprintf( (char *)(kvs->kvsname), MAXNAMELEN, "kvs_%d_%d", 
 		   (int)getpid(), kvsnum++ );
     kvs->pairs     = 0;
     kvs->lastByIdx = 0;
@@ -615,7 +615,7 @@ static int PMIKVSFree( PMIKVSpace *kvs )
     /* Note that if we did not find the kvs, we have an internal 
        error, since all kv spaces are maintained within the pmimaster list */
     if (rc != 0) {
-	MPIU_Internal_error_printf( "Could not find KV Space %s\n", 
+	MPL_internal_error_printf( "Could not find KV Space %s\n", 
 				    kvs->kvsname );
 	return 1;
     }
@@ -634,7 +634,7 @@ static int fPMI_Handle_create_kvs( PMIProcess *pentry )
 	/* PANIC - allocation failed */
 	return 1;
     }
-    MPIU_Snprintf( outbuf, PMIU_MAXLINE, "cmd=newkvs kvsname=%s\n", kvsname );
+    MPL_snprintf( outbuf, PMIU_MAXLINE, "cmd=newkvs kvsname=%s\n", kvsname );
     PMIWriteLine( pentry->fd, outbuf );
     DBG_PRINTFCOND(pmidebug, ("Handle_create_kvs new name %s\n", kvsname ) );
     return 0;
@@ -654,14 +654,14 @@ static int fPMI_Handle_destroy_kvs( PMIProcess *pentry )
     kvs = fPMIKVSFindSpace( kvsname );
     if (kvs) {
 	PMIKVSFree( kvs );
-	MPIU_Snprintf( message, PMIU_MAXLINE,
+	MPL_snprintf( message, PMIU_MAXLINE,
 		       "KVS_%s_successfully_destroyed", kvsname );
     }
     else {
-	MPIU_Snprintf( message, PMIU_MAXLINE, "KVS %s not found", kvsname );
+	MPL_snprintf( message, PMIU_MAXLINE, "KVS %s not found", kvsname );
 	rc = -1;
     }
-    MPIU_Snprintf( outbuf, PMIU_MAXLINE, "cmd=kvs_destroyed rc=%d msg=%s\n",
+    MPL_snprintf( outbuf, PMIU_MAXLINE, "cmd=kvs_destroyed rc=%d msg=%s\n",
 	      rc, message );
     PMIWriteLine( pentry->fd, outbuf );
     return 0;
@@ -689,11 +689,11 @@ static int fPMI_Handle_put( PMIProcess *pentry )
 	rc = fPMIKVSAddPair( kvs, key, val );
 	if (rc == 1) {
 	    rc = -1;          /* no duplicate keys allowed */
-	    MPIU_Snprintf( message, PMIU_MAXLINE, "duplicate_key %s", key );
+	    MPL_snprintf( message, PMIU_MAXLINE, "duplicate_key %s", key );
 	}
 	else if (rc == -1) {
 	    rc = -1;
-	    MPIU_Snprintf( message, PMIU_MAXLINE, "no_room_in_kvs_%s",
+	    MPL_snprintf( message, PMIU_MAXLINE, "no_room_in_kvs_%s",
 			   kvsname );
 	}
 	else {
@@ -703,9 +703,9 @@ static int fPMI_Handle_put( PMIProcess *pentry )
     }
     else {
 	rc = -1;
-	MPIU_Snprintf( message, PMIU_MAXLINE, "kvs_%s_not_found", kvsname );
+	MPL_snprintf( message, PMIU_MAXLINE, "kvs_%s_not_found", kvsname );
     }
-    MPIU_Snprintf( outbuf, PMIU_MAXLINE, "cmd=put_result rc=%d msg=%s\n",
+    MPL_snprintf( outbuf, PMIU_MAXLINE, "cmd=put_result rc=%d msg=%s\n",
 	      rc, message );
     PMIWriteLine( pentry->fd, outbuf );
     return 0;
@@ -738,16 +738,16 @@ static int fPMI_Handle_get( PMIProcess *pentry )
 	else if (rc) {
 	    rc = -1;
 	    MPIU_Strncpy( value, "unknown", PMIU_MAXLINE );
-	    MPIU_Snprintf( message, PMIU_MAXLINE, "key_%s_not_found", 
+	    MPL_snprintf( message, PMIU_MAXLINE, "key_%s_not_found", 
 			   kvsname );
 	}
     }
     else { 
 	rc = -1;
 	MPIU_Strncpy( value, "unknown", PMIU_MAXLINE );
-	MPIU_Snprintf( message, PMIU_MAXLINE, "kvs_%s_not_found", kvsname );
+	MPL_snprintf( message, PMIU_MAXLINE, "kvs_%s_not_found", kvsname );
     }
-    MPIU_Snprintf( outbuf, PMIU_MAXLINE, 
+    MPL_snprintf( outbuf, PMIU_MAXLINE, 
 		   "cmd=get_result rc=%d msg=%s value=%s\n",
 		   rc, message, value );
     PMIWriteLine( pentry->fd, outbuf );
@@ -763,11 +763,11 @@ static int fPMI_Handle_get_my_kvsname( PMIProcess *pentry )
 
     kvs = pentry->group->kvs;
     if (kvs && kvs->kvsname) {
-	MPIU_Snprintf( outbuf, PMIU_MAXLINE, "cmd=my_kvsname kvsname=%s\n",
+	MPL_snprintf( outbuf, PMIU_MAXLINE, "cmd=my_kvsname kvsname=%s\n",
 		       kvs->kvsname );
     }
     else {
-	MPIU_Internal_error_printf( "Group has no associated KVS" );
+	MPL_internal_error_printf( "Group has no associated KVS" );
 	return -1;
     }
     PMIWriteLine( pentry->fd, outbuf );
@@ -780,7 +780,7 @@ static int fPMI_Handle_get_universe_size( PMIProcess *pentry )
 {
     char outbuf[PMIU_MAXLINE];
     /* Import the universe size from the process structures */
-    MPIU_Snprintf( outbuf, PMIU_MAXLINE, "cmd=universe_size size=%d\n",
+    MPL_snprintf( outbuf, PMIU_MAXLINE, "cmd=universe_size size=%d\n",
 		   pUniv.size );
     PMIWriteLine( pentry->fd, outbuf );
     DBG_PRINTFCOND(pmidebug,( "%s", outbuf ));
@@ -792,7 +792,7 @@ static int fPMI_Handle_get_appnum( PMIProcess *pentry )
 {
     ProcessApp *app = pentry->pState->app;
     char outbuf[PMIU_MAXLINE];
-    MPIU_Snprintf( outbuf, PMIU_MAXLINE, "cmd=appnum appnum=%d\n",
+    MPL_snprintf( outbuf, PMIU_MAXLINE, "cmd=appnum appnum=%d\n",
 		   app->myAppNum );		
     PMIWriteLine( pentry->fd, outbuf );
     DBG_PRINTFCOND(pmidebug,( "%s", outbuf ));
@@ -817,7 +817,7 @@ static int fPMI_Handle_init( PMIProcess *pentry )
 
     pentry->pState->status = PROCESS_COMMUNICATING;
 
-    MPIU_Snprintf( outbuf, PMIU_MAXLINE,
+    MPL_snprintf( outbuf, PMIU_MAXLINE,
 	   "cmd=response_to_init pmi_version=%d pmi_subversion=%d rc=%d\n",
 		   PMI_VERSION, PMI_SUBVERSION, rc);
     PMIWriteLine( pentry->fd, outbuf );
@@ -829,7 +829,7 @@ static int fPMI_Handle_init( PMIProcess *pentry )
 static int fPMI_Handle_get_maxes( PMIProcess *pentry )
 {
     char outbuf[PMIU_MAXLINE];
-    MPIU_Snprintf( outbuf, PMIU_MAXLINE,
+    MPL_snprintf( outbuf, PMIU_MAXLINE,
 	      "cmd=maxes kvsname_max=%d keylen_max=%d vallen_max=%d\n",
 	      MAXKVSNAME, MAXKEYLEN, MAXVALLEN );
     PMIWriteLine( pentry->fd, outbuf );
@@ -861,14 +861,14 @@ static int fPMI_Handle_getbyidx( PMIProcess *pentry )
 	    for (p = kvs->pairs; j-- > 0 && p; p = p->nextPair) ;
 	}
 	if (p) {
-	    MPIU_Snprintf( outbuf, PMIU_MAXLINE, "cmd=getbyidx_results "
+	    MPL_snprintf( outbuf, PMIU_MAXLINE, "cmd=getbyidx_results "
 			   "rc=0 nextidx=%d key=%s val=%s\n",
 			   jNext, p->key, p->val );
 	    kvs->lastIdx   = jNext-1;
 	    kvs->lastByIdx = p;
 	}
 	else {
-	    MPIU_Snprintf( outbuf, PMIU_MAXLINE, "cmd=getbyidx_results rc=-1 "
+	    MPL_snprintf( outbuf, PMIU_MAXLINE, "cmd=getbyidx_results rc=-1 "
 			   "reason=no_more_keyvals\n" );
 	    kvs->lastIdx   = -1;
 	    kvs->lastByIdx = 0;
@@ -876,7 +876,7 @@ static int fPMI_Handle_getbyidx( PMIProcess *pentry )
     }
     else {
 	rc = -1;
-	MPIU_Snprintf( outbuf, PMIU_MAXLINE, "cmd=getbyidx_results rc=-1 "
+	MPL_snprintf( outbuf, PMIU_MAXLINE, "cmd=getbyidx_results rc=-1 "
 		  "reason=kvs_%s_not_found\n", kvsname );
     }
 
@@ -947,13 +947,13 @@ static int fPMI_Handle_init_port( PMIProcess *pentry )
     /* simple_pmi wants to see cmd=initack after the initack request before
        the other data */
     PMIWriteLine( pentry->fd, "cmd=initack\n" );
-    MPIU_Snprintf( outbuf, PMIU_MAXLINE, "cmd=set size=%d\n", 
+    MPL_snprintf( outbuf, PMIU_MAXLINE, "cmd=set size=%d\n", 
 		   pentry->group->nProcess );
     PMIWriteLine( pentry->fd, outbuf );
-    MPIU_Snprintf( outbuf, PMIU_MAXLINE, "cmd=set rank=%d\n", 
+    MPL_snprintf( outbuf, PMIU_MAXLINE, "cmd=set rank=%d\n", 
 		   pentry->pState->wRank );
     PMIWriteLine( pentry->fd, outbuf );
-    MPIU_Snprintf( outbuf, PMIU_MAXLINE, "cmd=set debug=%d\n", pmidebug );
+    MPL_snprintf( outbuf, PMIU_MAXLINE, "cmd=set debug=%d\n", pmidebug );
     PMIWriteLine( pentry->fd, outbuf );
     return 0;
 }
@@ -1090,7 +1090,7 @@ static int fPMI_Handle_spawn( PMIProcess *pentry )
 	    *++p = 0;
 	    if (strcmp( "endcmd", cmdPtr ) == 0) { break; }
 	    /* FIXME: Otherwise, we have a problem */
-	    MPIU_Error_printf( "Malformed PMI command (no endcmd seen\n" );
+	    MPL_error_printf( "Malformed PMI command (no endcmd seen\n" );
 	    return 1;
 	}
 	else {
@@ -1131,7 +1131,7 @@ static int fPMI_Handle_spawn( PMIProcess *pentry )
 	    /* Handle arg%d.  Values are 1 - origin */
 	    argnum = atoi( cmdPtr + 3 ) - 1;
 	    if (argnum < 0 || argnum >= PMI_MAX_ARGS) {
-		MPIU_Error_printf( "Malformed PMI Spawn command; the index of an argument in the command is %d but must be between 0 and %d\n",
+		MPL_error_printf( "Malformed PMI Spawn command; the index of an argument in the command is %d but must be between 0 and %d\n",
 				   argnum, PMI_MAX_ARGS-1 );
 		return 1;
 	    }
@@ -1173,7 +1173,7 @@ static int fPMI_Handle_spawn( PMIProcess *pentry )
 	       value this is */
 	    int idx = atoi( cmdPtr + 9 );
 	    if (idx != curInfoIdx) {
-		MPIU_Error_printf( "Malformed PMI command: info keys and values not ordered as expected (expected value %d but got %d)\n", curInfoIdx, idx );
+		MPL_error_printf( "Malformed PMI command: info keys and values not ordered as expected (expected value %d but got %d)\n", curInfoIdx, idx );
 		return 1;
 	    }
 	    else {
@@ -1184,7 +1184,7 @@ static int fPMI_Handle_spawn( PMIProcess *pentry )
 	    }
 	}
 	else {
-	    MPIU_Error_printf( "Unrecognized PMI subcommand on spawnmult: %s\n",
+	    MPL_error_printf( "Unrecognized PMI subcommand on spawnmult: %s\n",
 			       cmdPtr );
 	    return 1;
 	}
@@ -1208,12 +1208,12 @@ static int fPMI_Handle_spawn( PMIProcess *pentry )
 	    rc = (*userSpawner)( pWorld, userSpawnerData );
 	}
 	else {
-	    MPIU_Error_printf( "Unable to spawn %s\n", app->exename );
+	    MPL_error_printf( "Unable to spawn %s\n", app->exename );
 	    rc = 1;
 	    MPIE_PrintProcessWorld( stdout, pWorld );
 	}
 	
-	MPIU_Snprintf( outbuf, PMIU_MAXLINE, "cmd=spawn_result rc=%d\n", rc );
+	MPL_snprintf( outbuf, PMIU_MAXLINE, "cmd=spawn_result rc=%d\n", rc );
 	PMIWriteLine( pentry->fd, outbuf );
 	DBG_PRINTFCOND(pmidebug,( "%s", outbuf ));
 
@@ -1287,7 +1287,7 @@ int PMI_InitSingletonConnection( int fd, PMIProcess *pmiprocess )
     
     /* We start with the singinit command, wait for the singinit from
        the client, and then send the singinit_info */
-    MPIU_Snprintf( buf, PMIU_MAXLINE, 
+    MPL_snprintf( buf, PMIU_MAXLINE, 
    "cmd=singinit pmi_version=%d pmi_subversion=%d stdio=no authtype=none\n",
 	   PMI_VERSION, PMI_SUBVERSION );
     PMIWriteLine( fd, buf );
@@ -1307,7 +1307,7 @@ int PMI_InitSingletonConnection( int fd, PMIProcess *pmiprocess )
     else
 	rc = -1;
     
-    MPIU_Snprintf( buf, PMIU_MAXLINE,
+    MPL_snprintf( buf, PMIU_MAXLINE,
 		   "cmd=singinit_info versionok=%s stdio=no kvsname=%s\n",
 		   (rc == 0) ? "yes" : "no",  
 		   (char *)(pmiprocess->group->kvs->kvsname) );
diff --git a/src/pm/util/pmutil.h b/src/pm/util/pmutil.h
index 9deb667..9f29dbd 100644
--- a/src/pm/util/pmutil.h
+++ b/src/pm/util/pmutil.h
@@ -105,18 +105,16 @@ extern char *strdup( const char * );
 #endif /* HAVE_STRDUP */
 /* Provide a fallback snprintf for systems that do not have one */
 #ifdef HAVE_SNPRINTF
-#define MPIU_Snprintf snprintf
+#define MPL_snprintf snprintf
 /* Sometimes systems don't provide prototypes for snprintf */
 #ifdef NEEDS_SNPRINTF_DECL
 extern int snprintf( char *, size_t, const char *, ... ) ATTRIBUTE((format(printf,3,4)));
 #endif
 #else
-int MPIU_Snprintf( char *str, size_t size, const char *format, ... ) 
+int MPL_snprintf( char *str, size_t size, const char *format, ... ) 
      ATTRIBUTE((format(printf,3,4)));
 #endif /* HAVE_SNPRINTF */
 
-
-/* mpibase includes definitions of the MPIU_xxx_printf routines */
-#include "mpibase.h"
+#include "mpl.h"
 
 #endif
diff --git a/src/pm/util/process.c b/src/pm/util/process.c
index 17d1f02..3c832ca 100644
--- a/src/pm/util/process.c
+++ b/src/pm/util/process.c
@@ -152,7 +152,7 @@ int MPIE_ForkProcesses( ProcessWorld *pWorld, char *envp[],
 		}
 		rc = MPIE_ExecProgram( &pState[i], envp );
 		if (rc) {
-		    MPIU_Internal_error_printf( "mpiexec fork failed\n" );
+		    MPL_internal_error_printf( "mpiexec fork failed\n" );
 		    /* FIXME: kill children */
 		    exit(1);
 		}
@@ -170,7 +170,7 @@ int MPIE_ForkProcesses( ProcessWorld *pWorld, char *envp[],
 		    rc = (*postamble)( preambleData, postambleData, 
 				       &pState[i] );
 		    if (rc) {
-			MPIU_Internal_error_printf( 
+			MPL_internal_error_printf( 
 				      "mpiexec postamble failed\n" );
 			/* FIXME: kill children */
 			exit(1);
@@ -263,27 +263,27 @@ int MPIE_ExecProgram( ProcessState *pState, char *envp[] )
     /* build environment for client. */
     j = MPIE_EnvSetup( pState, envp, client_env, MAX_CLIENT_ENV-7 );
     if (j < 0) {
-	MPIU_Error_printf( "Failure setting up environment\n" );
+	MPL_error_printf( "Failure setting up environment\n" );
     }
     nj = j;  /* nj is the first entry of client_env that will be set by
 		this routine */
     DBG_PRINTF( ( "Setup env (j=%d)\n", j ) );
 
     if (j == MAX_CLIENT_ENV-7) {
-	MPIU_Error_printf( "Environment is too large (max is %d)\n",
+	MPL_error_printf( "Environment is too large (max is %d)\n",
 			   MAX_CLIENT_ENV-7);
 	exit(-1);
     }
 
     DBG_PRINTF( ( "Creating pmi env\n" ) );
     if (pState->initWithEnv) {
-	MPIU_Snprintf( env_pmi_rank, MAXNAMELEN, "PMI_RANK=%d", 
+	MPL_snprintf( env_pmi_rank, MAXNAMELEN, "PMI_RANK=%d", 
 		       pState->wRank );
 	client_env[j++] = env_pmi_rank;
-	MPIU_Snprintf( env_pmi_size, MAXNAMELEN, "PMI_SIZE=%d", 
+	MPL_snprintf( env_pmi_size, MAXNAMELEN, "PMI_SIZE=%d", 
 		       app->pWorld->nProcess );
 	client_env[j++] = env_pmi_size;
-	MPIU_Snprintf( env_pmi_debug, MAXNAMELEN, "PMI_DEBUG=%d", MPIE_Debug );
+	MPL_snprintf( env_pmi_debug, MAXNAMELEN, "PMI_DEBUG=%d", MPIE_Debug );
 	client_env[j++] = env_pmi_debug; 
     }
     else {
@@ -291,21 +291,21 @@ int MPIE_ExecProgram( ProcessState *pState, char *envp[] )
 	   This id is saved in the pState so that we can match it 
 	   when it comes back to us (it is the same as the rank 
 	   in the simple case) */
-	MPIU_Snprintf( env_pmi_id, sizeof(env_pmi_id), "PMI_ID=%d",
+	MPL_snprintf( env_pmi_id, sizeof(env_pmi_id), "PMI_ID=%d",
 		       pState->id );
 	client_env[j++] = env_pmi_id;
     }
 
-    MPIU_Snprintf( env_appnum, MAXNAMELEN, "MPI_APPNUM=%d", app->myAppNum );
+    MPL_snprintf( env_appnum, MAXNAMELEN, "MPI_APPNUM=%d", app->myAppNum );
     client_env[j++] = env_appnum;
-    MPIU_Snprintf( env_universesize, MAXNAMELEN, "MPI_UNIVERSE_SIZE=%d", 
+    MPL_snprintf( env_universesize, MAXNAMELEN, "MPI_UNIVERSE_SIZE=%d", 
 		   pUniv.size );
     client_env[j++] = env_universesize;
     client_env[j]   = 0;
 
     for ( j = nj; client_env[j]; j++ )
 	if (putenv( client_env[j] )) {
-	    MPIU_Internal_sys_error_printf( "mpiexec", errno, 
+	    MPL_internal_sys_error_printf( "mpiexec", errno, 
 			     "Could not set environment %s", client_env[j] );
 	    exit( 1 );
 	}
@@ -316,11 +316,11 @@ int MPIE_ExecProgram( ProcessState *pState, char *envp[] )
     if (app->wdir) {
 	rc = chdir( app->wdir );
 	if (rc < 0) {
-	    MPIU_Error_printf( "Unable to set working directory to %s\n",
+	    MPL_error_printf( "Unable to set working directory to %s\n",
 			       app->wdir);
 	    rc = chdir( getenv( "HOME" ) );
 	    if (rc < 0) {
-		MPIU_Error_printf( "Unable to set working directory to %s\n",
+		MPL_error_printf( "Unable to set working directory to %s\n",
 				   getenv( "HOME" ) );
 		exit( 1 );
 	    }
@@ -329,7 +329,7 @@ int MPIE_ExecProgram( ProcessState *pState, char *envp[] )
 
     DBG_PRINTF( ( "Setup command-line args\n" ) );
     if ((app->nArgs + 2) > MAX_CLIENT_ARG) { /* +1 for exename, +1 for null */
-        MPIU_Error_printf("Too many command-line arguments: requested=%d maximum=%d\n",
+        MPL_error_printf("Too many command-line arguments: requested=%d maximum=%d\n",
                           app->nArgs, MAX_CLIENT_ARG - 2);
         exit(1);
     }
@@ -344,7 +344,7 @@ int MPIE_ExecProgram( ProcessState *pState, char *envp[] )
     /* pathname argument should be used here */
     if (app->path) {
 	/* Set up the search path */
-	MPIU_Snprintf( pathstring, sizeof(pathstring)-1, "PATH=%s", 
+	MPL_snprintf( pathstring, sizeof(pathstring)-1, "PATH=%s", 
 		       app->path );
 	/* Some systems require that the path include the path to
 	   certain files or libraries, for example cygwin1.dll for
@@ -359,7 +359,7 @@ int MPIE_ExecProgram( ProcessState *pState, char *envp[] )
     rc = execvp( app->exename, client_arg );
 
     if ( rc < 0 ) {
-	MPIU_Internal_sys_error_printf( "mpiexec", errno, 
+	MPL_internal_sys_error_printf( "mpiexec", errno, 
 					"mpiexec could not exec %s\n", 
 					app->exename );
 	exit( 1 );
@@ -869,17 +869,17 @@ void MPIE_PrintFailureReasons( FILE *fp )
 		if (sig && (exitReason != EXIT_KILLED || 
 			    (sig != SIGKILL && sig != SIGINT))) {
 #ifdef HAVE_STRSIGNAL
-		    MPIU_Error_printf( 
+		    MPL_error_printf( 
 			      "[%d]%d:Return code = %d, signaled with %s\n", 
 			      worldnum, wrank, rc, strsignal(sig) );
 #else
-		    MPIU_Error_printf( 
+		    MPL_error_printf( 
 			      "[%d]%d:Return code = %d, signaled with %d\n", 
 			      worldnum, wrank, rc, sig );
 #endif
 		}
 		else if (MPIE_Debug || rc) {
-		    MPIU_Error_printf( "[%d]%d:Return code = %d\n", 
+		    MPL_error_printf( "[%d]%d:Return code = %d\n", 
 				       worldnum, wrank, rc );
 		}
 	    }
diff --git a/src/pm/util/rm.c b/src/pm/util/rm.c
index 0b90d99..a2f98fc 100644
--- a/src/pm/util/rm.c
+++ b/src/pm/util/rm.c
@@ -122,7 +122,7 @@ int MPIE_ChooseHosts( ProcessWorld *pWorld,
 		curMtArch = app->arch;
 		curHost   = 0;
 		if (!mt) {
-		    MPIU_Error_printf( "Could not find machines for %s\n",
+		    MPL_error_printf( "Could not find machines for %s\n",
 		       app->arch ? app->arch : "default architecture" );
 		    return nNeeded;
 		}
@@ -235,7 +235,7 @@ MachineTable *MPIE_ReadMachines( const char *arch, int nNeeded,
 
 	/* Construct the final path name */
 	if (arch) {
-	    MPIU_Snprintf( machinesfile, PATH_MAX, 
+	    MPL_snprintf( machinesfile, PATH_MAX, 
 			   "%s/machines.%s", dirname, arch );
 	}
 	else {
@@ -253,12 +253,12 @@ MachineTable *MPIE_ReadMachines( const char *arch, int nNeeded,
     }
 	
     if (!fp) {
-	MPIU_Error_printf( "Could not open machines file %s\n", machinesfile );
+	MPL_error_printf( "Could not open machines file %s\n", machinesfile );
 	return 0;
     }
     mt = (MachineTable *)MPIU_Malloc( sizeof(MachineTable) );
     if (!mt) {
-	MPIU_Internal_error_printf( "Could not allocate machine table\n" );
+	MPL_internal_error_printf( "Could not allocate machine table\n" );
 	return 0;
     }
     
diff --git a/src/pm/util/simple_pmiutil2.c b/src/pm/util/simple_pmiutil2.c
index 9437e10..fcda7e9 100644
--- a/src/pm/util/simple_pmiutil2.c
+++ b/src/pm/util/simple_pmiutil2.c
@@ -28,8 +28,7 @@
 #include <errno.h>
 #include "simple_pmiutil2.h"
 
-/* Use the MPI error message routines from mpich/src/include */
-#include "mpibase.h"
+#include "mpl.h"
 
 #define MAXVALLEN 1024
 #define MAXKEYLEN   32
@@ -51,7 +50,7 @@ static char PMIU_print_id[PMIU_IDSIZE] = "unset";
 
 void PMIU_Set_rank( int PMI_rank )
 {
-    MPIU_Snprintf( PMIU_print_id, PMIU_IDSIZE, "cli_%d", PMI_rank );
+    MPL_snprintf( PMIU_print_id, PMIU_IDSIZE, "cli_%d", PMI_rank );
 }
 void PMIU_SetServer( void )
 {
@@ -78,7 +77,7 @@ void PMIU_printf( int print_flag, const char *fmt, ... )
 	    char filename[1024];
 	    p = getenv("PMI_ID");
 	    if (p) {
-		MPIU_Snprintf( filename, sizeof(filename), 
+		MPL_snprintf( filename, sizeof(filename), 
 			       "testclient-%s.out", p );
 		logfile = fopen( filename, "w" );
 	    }
@@ -91,7 +90,7 @@ void PMIU_printf( int print_flag, const char *fmt, ... )
     }
 
     if ( print_flag ) {
-	/* MPIU_Error_printf( "[%s]: ", PMIU_print_id ); */
+	/* MPL_error_printf( "[%s]: ", PMIU_print_id ); */
 	/* FIXME: Decide what role PMIU_printf should have (if any) and
 	   select the appropriate MPIU routine */
 	fprintf( logfile, "[%s]: ", PMIU_print_id );
@@ -122,7 +121,7 @@ int PMIU_readline( int fd, char *buf, int maxlen )
        Server side code should not use this routine (see the 
        replacement version in src/pm/util/pmiserv.c) */
     if (nextChar != lastChar && fd != lastfd) {
-	MPIU_Internal_error_printf( "Panic - buffer inconsistent\n" );
+	MPL_internal_error_printf( "Panic - buffer inconsistent\n" );
 	return -1;
     }
 
diff --git a/src/pmi/pmi2/poe/poe2pmi.c b/src/pmi/pmi2/poe/poe2pmi.c
index e56ce1c..ceafb95 100644
--- a/src/pmi/pmi2/poe/poe2pmi.c
+++ b/src/pmi/pmi2/poe/poe2pmi.c
@@ -324,7 +324,7 @@ int _mpi_world_exiting_handler(int world_id)
 
   MPIU_THREAD_CS_EXIT(ALLFUNC,);
   if(comm->rank == 0) {
-    MPIU_Snprintf(world_id_str, sizeof(world_id_str), "%d", world_id);
+    MPL_snprintf(world_id_str, sizeof(world_id_str), "%d", world_id);
     PMI2_Abort(0, world_id_str);
     if((reduce_state != world_size)) {
       TRACE_ERR("root is exiting with error\n");
@@ -389,7 +389,7 @@ int _mpi_reduce_for_dyntask(int *sendbuf, int *recvbuf)
   int         numchildren, parent=0, i, result=0,tag, remaining_child_count;
   MPID_Comm   *comm_ptr;
   int         mpi_errno;
-  mpir_errflag_t errflag = MPIR_ERR_NONE;
+  MPIR_Errflag_t errflag = MPIR_ERR_NONE;
 
   int TASKS= world_size;
   children = MPIU_Malloc(TASKS*sizeof(int));
diff --git a/src/pmi/pmi2/simple/pmi2compat.h b/src/pmi/pmi2/simple/pmi2compat.h
index a54f7f0..6a71393 100644
--- a/src/pmi/pmi2/simple/pmi2compat.h
+++ b/src/pmi/pmi2/simple/pmi2compat.h
@@ -9,11 +9,11 @@
 #define PMI2U_Malloc MPIU_Malloc
 #define PMI2U_Free MPIU_Free
 #define PMI2U_Strdup MPIU_Strdup
-#define PMI2U_Snprintf MPIU_Snprintf
+#define PMI2U_Snprintf MPL_snprintf
 #define PMI2U_Strncpy MPIU_Strncpy
 #define PMI2U_Strnapp MPIU_Strnapp
 #define PMI2U_Assert MPIU_Assert
-#define PMI2U_Exit MPIU_Exit
+#define PMI2U_Exit MPL_exit
 #define PMI2U_Info MPID_Info
 #define PMI2U_Memcpy MPIU_Memcpy
 
diff --git a/src/pmi/simple/simple_pmi.c b/src/pmi/simple/simple_pmi.c
index 1327f0d..0172ae0 100644
--- a/src/pmi/simple/simple_pmi.c
+++ b/src/pmi/simple/simple_pmi.c
@@ -45,8 +45,8 @@
 #include <sys/socket.h>
 #endif
 
-#include "mpibase.h"            /* Get ATTRIBUTE, some base functions */
-/* mpimem includes the definitions for MPIU_Snprintf, MPIU_Malloc, and 
+#include "mpl.h"            /* Get ATTRIBUTE, some base functions */
+/* mpimem includes the definitions for MPL_snprintf, MPIU_Malloc, and 
    MPIU_Free */
 #include "mpimem.h"
 
@@ -325,7 +325,7 @@ int PMI_Abort(int exit_code, const char error_msg[])
     char buf[PMIU_MAXLINE];
 
     /* include exit_code in the abort command */
-    MPIU_Snprintf( buf, PMIU_MAXLINE, "cmd=abort exitcode=%d\n", exit_code);
+    MPL_snprintf( buf, PMIU_MAXLINE, "cmd=abort exitcode=%d\n", exit_code);
 
     PMIU_printf(PMI_debug, "aborting job:\n%s\n", error_msg);
     GetResponse( buf, "", 0 );
@@ -348,7 +348,7 @@ int PMI_KVS_Get_my_name( char kvsname[], int length )
 	/* Return a dummy name */
 	/* FIXME: We need to support a distinct kvsname for each 
 	   process group */
-	MPIU_Snprintf( kvsname, length, "singinit_kvs_%d_0", (int)getpid() );
+	MPL_snprintf( kvsname, length, "singinit_kvs_%d_0", (int)getpid() );
 	return 0;
     }
     err = GetResponse( "cmd=get_my_kvsname\n", "my_kvsname", 0 );
@@ -397,7 +397,7 @@ int PMI_KVS_Put( const char kvsname[], const char key[], const char value[] )
 	return 0;
     }
     
-    rc = MPIU_Snprintf( buf, PMIU_MAXLINE, 
+    rc = MPL_snprintf( buf, PMIU_MAXLINE, 
 			"cmd=put kvsname=%s key=%s value=%s\n",
 			kvsname, key, value);
     if (rc < 0) return PMI_FAIL;
@@ -426,7 +426,7 @@ int PMI_KVS_Get( const char kvsname[], const char key[], char value[],
        which MPICH uses PMI, this is where the test needs to be. */
     if (PMIi_InitIfSingleton() != 0) return -1;
 
-    rc = MPIU_Snprintf( buf, PMIU_MAXLINE, "cmd=get kvsname=%s key=%s\n", 
+    rc = MPL_snprintf( buf, PMIU_MAXLINE, "cmd=get kvsname=%s key=%s\n", 
 			kvsname, key );
     if (rc < 0) return PMI_FAIL;
 
@@ -454,7 +454,7 @@ int PMI_Publish_name( const char service_name[], const char port[] )
     int err;
 
     if ( PMI_initialized > SINGLETON_INIT_BUT_NO_PM) {
-        MPIU_Snprintf( cmd, PMIU_MAXLINE, 
+        MPL_snprintf( cmd, PMIU_MAXLINE, 
 		       "cmd=publish_name service=%s port=%s\n",
 		       service_name, port );
 	err = GetResponse( cmd, "publish_result", 0 );
@@ -483,7 +483,7 @@ int PMI_Unpublish_name( const char service_name[] )
     int err = PMI_SUCCESS;
 
     if ( PMI_initialized > SINGLETON_INIT_BUT_NO_PM) {
-        MPIU_Snprintf( cmd, PMIU_MAXLINE, "cmd=unpublish_name service=%s\n", 
+        MPL_snprintf( cmd, PMIU_MAXLINE, "cmd=unpublish_name service=%s\n", 
 		       service_name );
 	err = GetResponse( cmd, "unpublish_result", 0 );
 	if (err == PMI_SUCCESS) {
@@ -511,7 +511,7 @@ int PMI_Lookup_name( const char service_name[], char port[] )
     int err;
 
     if ( PMI_initialized > SINGLETON_INIT_BUT_NO_PM) {
-        MPIU_Snprintf( cmd, PMIU_MAXLINE, "cmd=lookup_name service=%s\n", 
+        MPL_snprintf( cmd, PMIU_MAXLINE, "cmd=lookup_name service=%s\n", 
 		       service_name );
 	err = GetResponse( cmd, "lookup_result", 0 );
 	if (err == PMI_SUCCESS) {
@@ -560,14 +560,14 @@ int PMI_Spawn_multiple(int count,
     {
         total_num_processes += maxprocs[spawncnt];
 
-        rc = MPIU_Snprintf(buf, PMIU_MAXLINE, 
+        rc = MPL_snprintf(buf, PMIU_MAXLINE, 
 			   "mcmd=spawn\nnprocs=%d\nexecname=%s\n",
 			   maxprocs[spawncnt], cmds[spawncnt] );
 	if (rc < 0) {
 	    return PMI_FAIL;
 	}
 
-	rc = MPIU_Snprintf(tempbuf, PMIU_MAXLINE,
+	rc = MPL_snprintf(tempbuf, PMIU_MAXLINE,
 			   "totspawns=%d\nspawnssofar=%d\n",
 			   count, spawncnt+1);
 
@@ -593,7 +593,7 @@ int PMI_Spawn_multiple(int count,
 		   of the commands will permit any character other than a 
 		   new line in the argument, since the form is 
 		   argn=<any nonnewline><newline> */
-                rc = MPIU_Snprintf(tempbuf,PMIU_MAXLINE,"arg%d=%s\n",
+                rc = MPL_snprintf(tempbuf,PMIU_MAXLINE,"arg%d=%s\n",
 				   i+1,argvs[spawncnt][i]);
 		if (rc < 0) {
 		    return PMI_FAIL;
@@ -608,7 +608,7 @@ int PMI_Spawn_multiple(int count,
 
             }
         }
-        rc = MPIU_Snprintf(tempbuf,PMIU_MAXLINE,"argcnt=%d\n",argcnt);
+        rc = MPL_snprintf(tempbuf,PMIU_MAXLINE,"argcnt=%d\n",argcnt);
 	if (rc < 0) {
 	    return PMI_FAIL;
 	}
@@ -617,7 +617,7 @@ int PMI_Spawn_multiple(int count,
 	    return PMI_FAIL;
 	}
     
-        rc = MPIU_Snprintf(tempbuf,PMIU_MAXLINE,"preput_num=%d\n", 
+        rc = MPL_snprintf(tempbuf,PMIU_MAXLINE,"preput_num=%d\n", 
 			   preput_keyval_size);
 	if (rc < 0) {
 	    return PMI_FAIL;
@@ -628,7 +628,7 @@ int PMI_Spawn_multiple(int count,
 	    return PMI_FAIL;
 	}
         for (i=0; i < preput_keyval_size; i++) {
-	    rc = MPIU_Snprintf(tempbuf,PMIU_MAXLINE,"preput_key_%d=%s\n",
+	    rc = MPL_snprintf(tempbuf,PMIU_MAXLINE,"preput_key_%d=%s\n",
 			       i,preput_keyval_vector[i].key);
 	    if (rc < 0) {
 		return PMI_FAIL;
@@ -637,7 +637,7 @@ int PMI_Spawn_multiple(int count,
 	    if (rc != 0) {
 		return PMI_FAIL;
 	    }
-	    rc = MPIU_Snprintf(tempbuf,PMIU_MAXLINE,"preput_val_%d=%s\n",
+	    rc = MPL_snprintf(tempbuf,PMIU_MAXLINE,"preput_val_%d=%s\n",
 			       i,preput_keyval_vector[i].val);
 	    if (rc < 0) {
 		return PMI_FAIL;
@@ -647,7 +647,7 @@ int PMI_Spawn_multiple(int count,
 		return PMI_FAIL;
 	    }
         } 
-        rc = MPIU_Snprintf(tempbuf,PMIU_MAXLINE,"info_num=%d\n", 
+        rc = MPL_snprintf(tempbuf,PMIU_MAXLINE,"info_num=%d\n", 
 			   info_keyval_sizes[spawncnt]);
 	if (rc < 0) {
 	    return PMI_FAIL;
@@ -658,7 +658,7 @@ int PMI_Spawn_multiple(int count,
 	}
 	for (i=0; i < info_keyval_sizes[spawncnt]; i++)
 	{
-	    rc = MPIU_Snprintf(tempbuf,PMIU_MAXLINE,"info_key_%d=%s\n",
+	    rc = MPL_snprintf(tempbuf,PMIU_MAXLINE,"info_key_%d=%s\n",
 			       i,info_keyval_vectors[spawncnt][i].key);
 	    if (rc < 0) {
 		return PMI_FAIL;
@@ -667,7 +667,7 @@ int PMI_Spawn_multiple(int count,
 	    if (rc != 0) {
 		return PMI_FAIL;
 	    }
-	    rc = MPIU_Snprintf(tempbuf,PMIU_MAXLINE,"info_val_%d=%s\n",
+	    rc = MPL_snprintf(tempbuf,PMIU_MAXLINE,"info_val_%d=%s\n",
 			       i,info_keyval_vectors[spawncnt][i].val);
 	    if (rc < 0) {
 		return PMI_FAIL;
@@ -737,7 +737,7 @@ static int PMII_getmaxes( int *kvsname_max, int *keylen_max, int *vallen_max )
     char buf[PMIU_MAXLINE], cmd[PMIU_MAXLINE], errmsg[PMIU_MAXLINE];
     int err, rc;
 
-    rc = MPIU_Snprintf( buf, PMIU_MAXLINE, 
+    rc = MPL_snprintf( buf, PMIU_MAXLINE, 
 			"cmd=init pmi_version=%d pmi_subversion=%d\n",
 			PMI_VERSION, PMI_SUBVERSION );
     if (rc < 0) {
@@ -760,7 +760,7 @@ static int PMII_getmaxes( int *kvsname_max, int *keylen_max, int *vallen_max )
     cmd[0] = 0;
     PMIU_getval( "cmd", cmd, PMIU_MAXLINE );
     if ( strncmp( cmd, "response_to_init", PMIU_MAXLINE ) != 0 ) {
-	MPIU_Snprintf(errmsg, PMIU_MAXLINE, 
+	MPL_snprintf(errmsg, PMIU_MAXLINE, 
 		      "got unexpected response to init :%s: (full line = %s)",
 		      cmd, buf  );
 	PMI_Abort( -1, errmsg );
@@ -771,7 +771,7 @@ static int PMII_getmaxes( int *kvsname_max, int *keylen_max, int *vallen_max )
         if ( strncmp( buf, "0", PMIU_MAXLINE ) != 0 ) {
             PMIU_getval( "pmi_version", buf, PMIU_MAXLINE );
             PMIU_getval( "pmi_subversion", buf1, PMIU_MAXLINE );
-	    MPIU_Snprintf(errmsg, PMIU_MAXLINE, 
+	    MPL_snprintf(errmsg, PMIU_MAXLINE, 
 			  "pmi_version mismatch; client=%d.%d mgr=%s.%s",
 			  PMI_VERSION, PMI_SUBVERSION, buf, buf1 );
 	    PMI_Abort( -1, errmsg );
@@ -958,7 +958,7 @@ static int PMII_Set_from_port( int fd, int id )
     }
     /* Handshake and initialize from a port */
 
-    rc = MPIU_Snprintf( buf, PMIU_MAXLINE, "cmd=initack pmiid=%d\n", id );
+    rc = MPL_snprintf( buf, PMIU_MAXLINE, "cmd=initack pmiid=%d\n", id );
     if (rc < 0) {
 	return PMI_FAIL;
     }
@@ -1124,7 +1124,7 @@ static int PMII_singinit(void)
     rc = bind(singinit_listen_sock, (struct sockaddr *)&sin ,sizeof(sin));
     len = sizeof(struct sockaddr_in);
     rc = getsockname( singinit_listen_sock, (struct sockaddr *) &sin, &len ); 
-    MPIU_Snprintf(port_c, sizeof(port_c), "%d",ntohs(sin.sin_port));
+    MPL_snprintf(port_c, sizeof(port_c), "%d",ntohs(sin.sin_port));
     rc = listen(singinit_listen_sock, 5);
 
     PMIU_printf( PMI_debug_init, "Starting mpiexec with %s\n", port_c );
@@ -1142,7 +1142,7 @@ static int PMII_singinit(void)
 	/* FIXME: Use a valid hostname */
 	newargv[3] = "default_interface";  /* default interface name, for now */
 	newargv[4] = "default_key";   /* default authentication key, for now */
-	MPIU_Snprintf(charpid, sizeof(charpid), "%d",getpid());
+	MPL_snprintf(charpid, sizeof(charpid), "%d",getpid());
 	newargv[5] = charpid;
 	newargv[6] = NULL;
 	rc = execvp(newargv[0], (char **)newargv);
@@ -1182,7 +1182,7 @@ static int PMII_singinit(void)
 	/* p = PMIU_getval( "authstring", cmd, PMIU_MAXLINE ); */
 	
 	/* If we're successful, send back our own singinit */
-	rc = MPIU_Snprintf( buf, PMIU_MAXLINE, 
+	rc = MPL_snprintf( buf, PMIU_MAXLINE, 
      "cmd=singinit pmi_version=%d pmi_subversion=%d stdio=yes authtype=none\n",
 			PMI_VERSION, PMI_SUBVERSION );
 	if (rc < 0) {
diff --git a/src/pmi/simple/simple_pmiutil.c b/src/pmi/simple/simple_pmiutil.c
index d1dccbb..c10dc45 100644
--- a/src/pmi/simple/simple_pmiutil.c
+++ b/src/pmi/simple/simple_pmiutil.c
@@ -26,12 +26,13 @@
 #include <unistd.h>
 #endif
 #include <errno.h>
+
+#include "mpl.h"
+
 #include "simple_pmiutil.h"
 
 /* Use the memory definitions from mpich/src/include */
 #include "mpimem.h"
-/* Use the MPI error message routines from mpich/src/include */
-#include "mpibase.h"
 
 #define MAXVALLEN 1024
 #define MAXKEYLEN   32
@@ -53,7 +54,7 @@ static char PMIU_print_id[PMIU_IDSIZE] = "unset";
 
 void PMIU_Set_rank( int PMI_rank )
 {
-    MPIU_Snprintf( PMIU_print_id, PMIU_IDSIZE, "cli_%d", PMI_rank );
+    MPL_snprintf( PMIU_print_id, PMIU_IDSIZE, "cli_%d", PMI_rank );
 }
 void PMIU_SetServer( void )
 {
@@ -80,7 +81,7 @@ void PMIU_printf( int print_flag, const char *fmt, ... )
 	    char filename[1024];
 	    p = getenv("PMI_ID");
 	    if (p) {
-		MPIU_Snprintf( filename, sizeof(filename), 
+		MPL_snprintf( filename, sizeof(filename), 
 			       "testclient-%s.out", p );
 		logfile = fopen( filename, "w" );
 	    }
@@ -93,7 +94,7 @@ void PMIU_printf( int print_flag, const char *fmt, ... )
     }
 
     if ( print_flag ) {
-	/* MPIU_Error_printf( "[%s]: ", PMIU_print_id ); */
+	/* MPL_error_printf( "[%s]: ", PMIU_print_id ); */
 	/* FIXME: Decide what role PMIU_printf should have (if any) and
 	   select the appropriate MPIU routine */
 	fprintf( logfile, "[%s]: ", PMIU_print_id );
@@ -124,7 +125,7 @@ int PMIU_readline( int fd, char *buf, int maxlen )
        Server side code should not use this routine (see the 
        replacement version in src/pm/util/pmiserv.c) */
     if (nextChar != lastChar && fd != lastfd) {
-	MPIU_Internal_error_printf( "Panic - buffer inconsistent\n" );
+	MPL_internal_error_printf( "Panic - buffer inconsistent\n" );
 	return -1;
     }
 
diff --git a/src/util/Makefile.mk b/src/util/Makefile.mk
index 7ae439e..4f1faf9 100644
--- a/src/util/Makefile.mk
+++ b/src/util/Makefile.mk
@@ -9,11 +9,11 @@ include $(top_srcdir)/src/util/dbg/Makefile.mk
 include $(top_srcdir)/src/util/instrm/Makefile.mk
 include $(top_srcdir)/src/util/logging/Makefile.mk
 include $(top_srcdir)/src/util/mem/Makefile.mk
-include $(top_srcdir)/src/util/msgs/Makefile.mk
 include $(top_srcdir)/src/util/other/Makefile.mk
 include $(top_srcdir)/src/util/cvar/Makefile.mk
 include $(top_srcdir)/src/util/procmap/Makefile.mk
 include $(top_srcdir)/src/util/thread/Makefile.mk
+include $(top_srcdir)/src/util/type/Makefile.mk
 include $(top_srcdir)/src/util/wrappers/Makefile.mk
 
 # "ex" and "multichannel" are Windows-only directories that we do not build with automake
diff --git a/src/util/dbg/Makefile.mk b/src/util/dbg/Makefile.mk
index 0c4be0f..45be049 100644
--- a/src/util/dbg/Makefile.mk
+++ b/src/util/dbg/Makefile.mk
@@ -5,8 +5,10 @@
 ##     See COPYRIGHT in top-level directory.
 ##
 
+AM_CPPFLAGS += -I$(top_srcdir)/src/util/dbg
+
+noinst_HEADERS += src/util/dbg/mpidbg.h
+
 mpi_core_sources += \
     src/util/dbg/dbg_printf.c     \
-    src/util/dbg/timelimit.c      \
-    src/util/dbg/exit.c
-
+    src/util/dbg/timelimit.c
diff --git a/src/util/dbg/dbg_printf.c b/src/util/dbg/dbg_printf.c
index d3c8277..b8b3426 100644
--- a/src/util/dbg/dbg_printf.c
+++ b/src/util/dbg/dbg_printf.c
@@ -95,7 +95,7 @@ int MPIU_dbg_init(int rank)
 	   than once */
 	if (MPIU_dbg_fp == NULL)
 	{
-	    MPIU_Snprintf(fn, 128, "mpich-dbg-%d.log", dbg_rank);
+	    MPL_snprintf(fn, 128, "mpich-dbg-%d.log", dbg_rank);
 	    MPIU_dbg_fp = fopen(fn, "w");
 	    setvbuf(MPIU_dbg_fp, NULL, _IONBF, 0);
 	}
@@ -390,7 +390,7 @@ static FILE *get_fp(void)
      * only be one thread in here until then */
     if (mpiu_dbg_initialized == MPIU_DBG_INITIALIZED && MPIU_ISTHREADED) {
         FILE *fp;
-        MPID_Thread_tls_get(&dbg_tls_key, &fp);
+        MPID_Thread_tls_get(&dbg_tls_key, (void **) &fp);
         return fp;
     }
     else
@@ -470,7 +470,7 @@ int MPIU_DBG_Outevent( const char *file, int line, int class, int kind,
 	case 1:
 	    va_start(list,fmat);
 	    str = va_arg(list,char *);
-	    MPIU_Snprintf( stmp, sizeof(stmp), fmat, str );
+	    MPL_snprintf( stmp, sizeof(stmp), fmat, str );
 	    va_end(list);
 	    fprintf( dbg_fp, "%d\t%d\t%llx[%d]\t%d\t%f\t%s\t%d\t%s\n",
 		     worldNum, worldRank, threadID, pid, class, curtime, 
@@ -479,7 +479,7 @@ int MPIU_DBG_Outevent( const char *file, int line, int class, int kind,
 	case 2: 
 	    va_start(list,fmat);
 	    i = va_arg(list,int);
-	    MPIU_Snprintf( stmp, sizeof(stmp), fmat, i);
+	    MPL_snprintf( stmp, sizeof(stmp), fmat, i);
 	    va_end(list);
 	    fprintf( dbg_fp, "%d\t%d\t%llx[%d]\t%d\t%f\t%s\t%d\t%s\n",
 		     worldNum, worldRank, threadID, pid, class, curtime, 
@@ -488,7 +488,7 @@ int MPIU_DBG_Outevent( const char *file, int line, int class, int kind,
 	case 3: 
 	    va_start(list,fmat);
 	    p = va_arg(list,void *);
-	    MPIU_Snprintf( stmp, sizeof(stmp), fmat, p);
+	    MPL_snprintf( stmp, sizeof(stmp), fmat, p);
 	    va_end(list);
 	    fprintf( dbg_fp, "%d\t%d\t%llx[%d]\t%d\t%f\t%s\t%d\t%s\n",
 		     worldNum, worldRank, threadID, pid, class, curtime, 
@@ -779,14 +779,14 @@ int MPIU_DBG_Init( int *argc_p, char ***argv_p, int has_args, int has_env,
             fclose(dbg_fp);
             ret = rename(temp_filename, filename);
             if(ret){
-                MPIU_Error_printf("Could not rename temp log file to %s\n", filename );
+                MPL_error_printf("Could not rename temp log file to %s\n", filename );
                 goto fn_fail;
             }
             else{
                 dbg_fp = fopen(filename, "a+");
                 set_fp(dbg_fp);
                 if(dbg_fp == NULL){
-                    MPIU_Error_printf("Error re-opening log file, %s\n", filename);
+                    MPL_error_printf("Error re-opening log file, %s\n", filename);
                     goto fn_fail;
                 }
             }
@@ -865,7 +865,7 @@ static int MPIU_DBG_Open_temp_file(FILE **dbg_fp)
  fn_exit:
     return mpi_errno;
  fn_fail:
-    MPIU_Error_printf( "Could not open log file %s\n", temp_filename );
+    MPL_error_printf( "Could not open log file %s\n", temp_filename );
     mpiu_dbg_initialized = MPIU_DBG_ERROR;
     mpi_errno = MPI_ERR_INTERN;
     goto fn_exit;
@@ -905,7 +905,7 @@ static int MPIU_DBG_Open_temp_file(FILE **dbg_fp)
  fn_exit:
     return mpi_errno;
  fn_fail:
-    MPIU_Error_printf( "Could not open log file %s\n", temp_filename );
+    MPL_error_printf( "Could not open log file %s\n", temp_filename );
     mpiu_dbg_initialized = MPIU_DBG_ERROR;
     mpi_errno = MPI_ERR_INTERN;
     goto fn_exit;
@@ -940,7 +940,7 @@ static int MPIU_DBG_Open_temp_file(FILE **dbg_fp)
  fn_exit:
     return mpi_errno;
  fn_fail:
-    MPIU_Error_printf( "Could not open log file %s\n", temp_filename );
+    MPL_error_printf( "Could not open log file %s\n", temp_filename );
     mpiu_dbg_initialized = MPIU_DBG_ERROR;
     mpi_errno = MPI_ERR_INTERN;
     goto fn_exit;
@@ -1024,7 +1024,7 @@ static int MPIU_DBG_Get_filename(char *filename, int len)
             p++;
             if (*p == 'd') {
                 char rankAsChar[20];
-                MPIU_Snprintf( rankAsChar, sizeof(rankAsChar), "%d", 
+                MPL_snprintf( rankAsChar, sizeof(rankAsChar), "%d", 
                                worldRank );
                 *pDest = 0;
                 MPIU_Strnapp( filename, rankAsChar, len );
@@ -1037,7 +1037,7 @@ static int MPIU_DBG_Get_filename(char *filename, int len)
                 MPIU_Thread_self(&tid);
                 threadID = (unsigned long long int)tid;
 
-                MPIU_Snprintf( threadIDAsChar, sizeof(threadIDAsChar), 
+                MPL_snprintf( threadIDAsChar, sizeof(threadIDAsChar), 
                                "%llx", threadID );
                 *pDest = 0;
                 MPIU_Strnapp( filename, threadIDAsChar, len );
@@ -1061,7 +1061,7 @@ static int MPIU_DBG_Get_filename(char *filename, int len)
 #else
                 int pid = -1;
 #endif /* HAVE_GETPID */
-                MPIU_Snprintf( pidAsChar, sizeof(pidAsChar), "%d", (int)pid );
+                MPL_snprintf( pidAsChar, sizeof(pidAsChar), "%d", (int)pid );
                 *pDest = 0;
                 MPIU_Strnapp( filename, pidAsChar, len );
                 pDest += strlen(pidAsChar);
@@ -1110,7 +1110,7 @@ static int MPIU_DBG_OpenFile(FILE **dbg_fp)
 
             *dbg_fp = fopen( filename, "w" );
             if (!*dbg_fp) {
-                MPIU_Error_printf( "Could not open log file %s\n", filename );
+                MPL_error_printf( "Could not open log file %s\n", filename );
                 if (mpi_errno) goto fn_fail;
             }
         }
diff --git a/src/util/dbg/exit.c b/src/util/dbg/exit.c
deleted file mode 100644
index 3077ede..0000000
--- a/src/util/dbg/exit.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- *  (C) 2001 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-
-#include "mpichconf.h"
-#include "mpibase.h"
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-void MPIU_Exit(int exit_code)
-{
-#ifdef HAVE_WINDOWS_H
-    /* exit can hang if libc fflushes output while in/out/err buffers are locked.  ExitProcess does not hang. */
-    ExitProcess(exit_code);
-#else
-    exit(exit_code);
-#endif
-}
diff --git a/src/include/mpidbg.h b/src/util/dbg/mpidbg.h
similarity index 98%
rename from src/include/mpidbg.h
rename to src/util/dbg/mpidbg.h
index e69eb8f..4c2dd67 100644
--- a/src/include/mpidbg.h
+++ b/src/util/dbg/mpidbg.h
@@ -7,7 +7,8 @@
 #define MPIDBG_H_INCLUDED
 #include <stdio.h>
 #include <stdarg.h>
-#include "mpibase.h"
+#include "mpl.h"
+
 /*
  * Multilevel debugging and tracing macros.
  * The design is discussed at
@@ -56,7 +57,7 @@
    {if ( (MPIU_DBG_##_class & MPIU_DBG_ActiveClasses) && \
           MPIU_DBG_##_level <= MPIU_DBG_MaxLevel ) {\
           char _s[MPIU_DBG_MAXLINE]; \
-          MPIU_Snprintf _fmatargs ; \
+          MPL_snprintf _fmatargs ; \
      MPIU_DBG_Outevent( __FILE__, __LINE__, MPIU_DBG_##_class, 0, "%s", _s ); }}
 #define MPIU_DBG_STMT(_class,_level,_stmt) \
    {if ( (MPIU_DBG_##_class & MPIU_DBG_ActiveClasses) && \
@@ -66,7 +67,7 @@
     MPIU_DBG_Outevent( __FILE__, __LINE__, MPIU_DBG_##_class, 0, "%s", _msg )
 #define MPIU_DBG_OUT_FMT(_class,_fmatargs) \
     {     char _s[MPIU_DBG_MAXLINE]; \
-          MPIU_Snprintf _fmatargs ; \
+          MPL_snprintf _fmatargs ; \
     MPIU_DBG_Outevent( __FILE__, __LINE__, MPIU_DBG_##_class, 0, "%s", _s );}
 
 #else
diff --git a/src/util/ex/Makefile.sm b/src/util/ex/Makefile.sm
index 7cc5bda..9c8992d 100644
--- a/src/util/ex/Makefile.sm
+++ b/src/util/ex/Makefile.sm
@@ -1,3 +1,6 @@
 INCLUDES = -I../../include -I${master_top_srcdir}/src/include
 lib${MPILIBNAME}_a_SOURCES = ex.c
 ex.o: ex.c
+
+# FIXME: the following file should be included
+# src/include/mpiu_ex.h
diff --git a/src/include/mpiu_ex.h b/src/util/ex/mpiu_ex.h
similarity index 100%
rename from src/include/mpiu_ex.h
rename to src/util/ex/mpiu_ex.h
diff --git a/src/util/logging/rlog/irlog2rlog.c b/src/util/logging/rlog/irlog2rlog.c
index a9242f8..6d9e347 100644
--- a/src/util/logging/rlog/irlog2rlog.c
+++ b/src/util/logging/rlog/irlog2rlog.c
@@ -15,7 +15,7 @@
 #include <errno.h>
 #include <ctype.h> /* isdigit */
 #include "mpichconf.h" /* HAVE_SNPRINTF */
-#include "mpimem.h" /* MPIU_Snprintf */
+#include "mpimem.h" /* MPL_snprintf */
 
 #ifndef BOOL
 #define BOOL int
@@ -105,7 +105,7 @@ static int ReadFileData(char *pBuffer, int length, FILE *fin)
 	num_read = fread(pBuffer, 1, length, fin);
 	if (num_read == -1)
 	{
-	    MPIU_Error_printf("Error: fread failed - %s\n", strerror(errno));
+	    MPL_error_printf("Error: fread failed - %s\n", strerror(errno));
 	    return errno;
 	}
 
@@ -127,7 +127,7 @@ static int WriteFileData(const void *pvBuffer, int length, FILE *fout)
 	num_written = fwrite(pBuffer, 1, length, fout);
 	if (num_written == -1)
 	{
-	    MPIU_Error_printf("Error: fwrite failed - %s\n", strerror(errno));
+	    MPL_error_printf("Error: fwrite failed - %s\n", strerror(errno));
 	    return errno;
 	}
 
@@ -223,7 +223,7 @@ void SaveArrow(RLOG_IARROW *pArrow)
 	g_fArrow = fopen(g_pszArrowFilename, "w+b");
 	if (g_fArrow == NULL)
 	{
-	    MPIU_Error_printf("unable to open ArrowFile.tmp\n");
+	    MPL_error_printf("unable to open ArrowFile.tmp\n");
 	    return;
 	}
     }
@@ -321,7 +321,7 @@ RecursionStruct *GetLevel(int rank, int recursion)
     }
 
     pLevel = (RecursionStruct*)MPIU_Malloc(sizeof(RecursionStruct));
-    MPIU_Snprintf(pLevel->filename, 1024, "irlog.%d.%d.tmp", rank, recursion);
+    MPL_snprintf(pLevel->filename, 1024, "irlog.%d.%d.tmp", rank, recursion);
     pLevel->fout = fopen(pLevel->filename, "w+b");
     pLevel->rank = rank;
     pLevel->level = recursion;
@@ -375,7 +375,7 @@ FILE *OpenRlogFile(char *filename)
     {
 	memcpy(out_filename, filename, pExt-filename);
 	strcpy(&out_filename[pExt-filename], ".rlog");
-	MPIU_Msg_printf("out_filename: %s\n", out_filename);
+	MPL_msg_printf("out_filename: %s\n", out_filename);
     }
     else
     {
@@ -404,7 +404,7 @@ void AppendFile(FILE *fout, FILE *fin)
 	num_read = fread(buffer, 1, min(BUFFER_SIZE, total), fin);
 	if (num_read == 0)
 	{
-	    MPIU_Error_printf("failed to read from input file\n");
+	    MPL_error_printf("failed to read from input file\n");
 	    return;
 	}
 	total -= num_read;
@@ -414,7 +414,7 @@ void AppendFile(FILE *fout, FILE *fin)
 	    num_written = fwrite(buf, 1, num_read, fout);
 	    if (num_written == 0)
 	    {
-		MPIU_Error_printf("failed to write to output file\n");
+		MPL_error_printf("failed to write to output file\n");
 		return;
 	    }
 	    num_read -= num_written;
@@ -654,7 +654,7 @@ int main(int argc, char *argv[])
 
     if (argc < 3)
     {
-	MPIU_Error_printf("Usage:\nirlog2rlog out.rlog in0.irlog in1.irlog ...\nirlog2rlog out.rlog n\n");
+	MPL_error_printf("Usage:\nirlog2rlog out.rlog in0.irlog in1.irlog ...\nirlog2rlog out.rlog n\n");
 	return 0;
     }
 
@@ -669,7 +669,7 @@ int main(int argc, char *argv[])
     fout = fopen(argv[1], "wb");
     if (fout == NULL)
     {
-	MPIU_Error_printf("unable to open output file '%s'\n", argv[1]);
+	MPL_error_printf("unable to open output file '%s'\n", argv[1]);
 	return -1;
     }
 
@@ -680,7 +680,7 @@ int main(int argc, char *argv[])
 	ppInput[i] = IRLOG_CreateInputStruct(argv[i+2]);
 	if (ppInput[i] == NULL)
 	{
-	    MPIU_Error_printf("Unable to create an input structure for '%s', skipping\n", argv[i+2]);
+	    MPL_error_printf("Unable to create an input structure for '%s', skipping\n", argv[i+2]);
 	}
     }
     for (i=0; i<nNumInputs; i++)
@@ -693,7 +693,7 @@ int main(int argc, char *argv[])
 	    i--;
 	}
     }
-    MPIU_Msg_printf("reading the arrows from all the input files.\n");fflush(stdout);
+    MPL_msg_printf("reading the arrows from all the input files.\n");fflush(stdout);
     ReadAllArrows(ppInput, nNumInputs);
 
     nNumInputs = argc - 2;
@@ -704,11 +704,11 @@ int main(int argc, char *argv[])
 	pInput = IRLOG_CreateInputStruct(argv[i+2]);
 	if (pInput == NULL)
 	{
-	    MPIU_Error_printf("Unable to create an input structure for '%s', skipping\n", argv[i+2]);
+	    MPL_error_printf("Unable to create an input structure for '%s', skipping\n", argv[i+2]);
 	}
 	else
 	{
-	    MPIU_Msg_printf("reading irlog file: %s\n", argv[i+2]);fflush(stdout);
+	    MPL_msg_printf("reading irlog file: %s\n", argv[i+2]);fflush(stdout);
 	    for(;;)
 	    {
 		switch (pInput->header.type)
@@ -727,7 +727,7 @@ int main(int argc, char *argv[])
 		    SaveEvent(&pInput->record.event);
 		    break;
 		default:
-		    MPIU_Error_printf("Unknown irlog record type: %d\n", pInput->header.type);
+		    MPL_error_printf("Unknown irlog record type: %d\n", pInput->header.type);
 		    break;
 		}
 		
@@ -744,12 +744,12 @@ int main(int argc, char *argv[])
     header.nMinRank = FindMinRank(g_pLevel);
     header.nMaxRank = FindMaxRank(g_pLevel);
     if (nMinRank != header.nMinRank)
-	MPIU_Error_printf("minimum event rank %d does not equal the minimum comm record rank %d\n", header.nMinRank, nMinRank);
+	MPL_error_printf("minimum event rank %d does not equal the minimum comm record rank %d\n", header.nMinRank, nMinRank);
     if (nMaxRank != header.nMaxRank)
-	MPIU_Error_printf("maximum event rank %d does not equal the maximum comm record rank %d\n", header.nMaxRank, nMaxRank);
+	MPL_error_printf("maximum event rank %d does not equal the maximum comm record rank %d\n", header.nMaxRank, nMaxRank);
 
     /* write header */
-    MPIU_Msg_printf("writing header.\n");fflush(stdout);
+    MPL_msg_printf("writing header.\n");fflush(stdout);
     type = RLOG_HEADER_SECTION;
     length = sizeof(RLOG_FILE_HEADER);
     /* fwrite(&type, sizeof(int), 1, fout); */
@@ -762,7 +762,7 @@ int main(int argc, char *argv[])
     /* write states */
     if (g_pList)
     {
-	MPIU_Msg_printf("writing states.\n");fflush(stdout);
+	MPL_msg_printf("writing states.\n");fflush(stdout);
     }
     pState = g_pList;
     while (pState)
@@ -787,7 +787,7 @@ int main(int argc, char *argv[])
     /* write arrows */
     if (g_fArrow)
     {
-	MPIU_Msg_printf("writing arrows.\n");fflush(stdout);
+	MPL_msg_printf("writing arrows.\n");fflush(stdout);
 	type = RLOG_ARROW_SECTION;
 	length = ftell(g_fArrow);
 	/* fwrite(&type, sizeof(int), 1, fout); */
@@ -830,7 +830,7 @@ int main(int argc, char *argv[])
 	}
 	for (i=0; i<nNumLevels; i++)
 	{
-	    MPIU_Msg_printf("writing event level %d:%d\n", nRank, i);fflush(stdout);
+	    MPL_msg_printf("writing event level %d:%d\n", nRank, i);fflush(stdout);
 	    pLevel = GetLevel(nRank, i);
 	    AppendFile(fout, pLevel->fout);
 	}
diff --git a/src/util/logging/rlog/irlogutil.c b/src/util/logging/rlog/irlogutil.c
index 56db50a..ba9e3e8 100644
--- a/src/util/logging/rlog/irlogutil.c
+++ b/src/util/logging/rlog/irlogutil.c
@@ -19,7 +19,7 @@ static int ReadFileData(char *pBuffer, int length, FILE *fin)
 	num_read = (int)fread(pBuffer, 1, length, fin);
 	if (num_read == -1)
 	{
-	    MPIU_Error_printf("Error: fread failed - %s\n", strerror(errno));
+	    MPL_error_printf("Error: fread failed - %s\n", strerror(errno));
 	    return errno;
 	}
 
@@ -40,7 +40,7 @@ static int WriteFileData(const char *pBuffer, int length, FILE *fout)
 	num_written = (int)fwrite(pBuffer, 1, length, fout);
 	if (num_written == -1)
 	{
-	    MPIU_Error_printf("Error: fwrite failed - %s\n", strerror(errno));
+	    MPL_error_printf("Error: fwrite failed - %s\n", strerror(errno));
 	    return errno;
 	}
 
@@ -61,14 +61,14 @@ IRLOG_IOStruct *IRLOG_CreateInputStruct(const char *filename)
     pInput = (IRLOG_IOStruct*)MPIU_Malloc(sizeof(IRLOG_IOStruct));
     if (pInput == NULL)
     {
-	MPIU_Error_printf("malloc failed - %s\n", strerror(errno));
+	MPL_error_printf("malloc failed - %s\n", strerror(errno));
 	return NULL;
     }
     /* open the input clog file */
     pInput->f = fopen(filename, "rb");
     if (pInput->f == NULL)
     {
-	MPIU_Error_printf("fopen(%s) failed, error: %s\n", filename, strerror(errno));
+	MPL_error_printf("fopen(%s) failed, error: %s\n", filename, strerror(errno));
 	MPIU_Free(pInput);
 	return NULL;
     }
@@ -76,7 +76,7 @@ IRLOG_IOStruct *IRLOG_CreateInputStruct(const char *filename)
     num_read = (int)fread(pInput->buffer, 1, RLOG_BUFFSIZE, pInput->f);
     if (num_read == 0)
     {
-	MPIU_Error_printf("Unable to read data from the input file.\n");
+	MPL_error_printf("Unable to read data from the input file.\n");
 	fclose(pInput->f);
 	MPIU_Free(pInput);
 	return NULL;
@@ -87,7 +87,7 @@ IRLOG_IOStruct *IRLOG_CreateInputStruct(const char *filename)
     pInput->pEnd = pInput->buffer + num_read;
     if (IRLOG_GetNextRecord(pInput))
     {
-	MPIU_Error_printf("Unable to get the first record from the file.\n");
+	MPL_error_printf("Unable to get the first record from the file.\n");
 	fclose(pInput->f);
 	MPIU_Free(pInput);
 	return NULL;
@@ -103,7 +103,7 @@ IRLOG_IOStruct *IRLOG_CreateOutputStruct(const char *filename)
     pOutput = (IRLOG_IOStruct*)MPIU_Malloc(sizeof(IRLOG_IOStruct));
     if (pOutput == NULL)
     {
-	MPIU_Error_printf("malloc failed - %s\n", strerror(errno));
+	MPL_error_printf("malloc failed - %s\n", strerror(errno));
 	return NULL;
     }
 
@@ -111,7 +111,7 @@ IRLOG_IOStruct *IRLOG_CreateOutputStruct(const char *filename)
     pOutput->f = fopen(filename, "wb");
     if (pOutput->f == NULL)
     {
-	MPIU_Error_printf("Unable to open output file '%s' - %s\n", filename, strerror(errno));
+	MPL_error_printf("Unable to open output file '%s' - %s\n", filename, strerror(errno));
 	MPIU_Free(pOutput);
 	return NULL;
     }
@@ -158,7 +158,7 @@ int IRLOG_GetNextRecord(IRLOG_IOStruct *pInput)
 	num_read = (int)fread(pInput->buffer + num_valid, 1, RLOG_BUFFSIZE - num_valid, pInput->f);
 	if (num_read == 0)
 	{
-	    MPIU_Error_printf("RLOG Error: unable to get the next record.\n");
+	    MPL_error_printf("RLOG Error: unable to get the next record.\n");
 	    return 1;
 	}
 	pInput->pEnd = pInput->buffer + num_valid + num_read;
@@ -170,7 +170,7 @@ int IRLOG_GetNextRecord(IRLOG_IOStruct *pInput)
     switch (pInput->header.type)
     {
     case RLOG_INVALID_TYPE:
-	MPIU_Error_printf("RLOG Error: invalid record type.\n");
+	MPL_error_printf("RLOG Error: invalid record type.\n");
 	return 1;
 	break;
     case RLOG_ENDLOG_TYPE:
@@ -189,7 +189,7 @@ int IRLOG_GetNextRecord(IRLOG_IOStruct *pInput)
 	memcpy(&pInput->record.comm, pInput->pCurHeader + sizeof(RLOG_HEADER), sizeof(RLOG_COMM));
 	break;
     default:
-	MPIU_Error_printf("RLOG Error: unknown record type %d.\n", pInput->header.type);
+	MPL_error_printf("RLOG Error: unknown record type %d.\n", pInput->header.type);
 	return 1;
 	break;
     }
diff --git a/src/util/logging/rlog/rlog.c b/src/util/logging/rlog/rlog.c
index 1a00acd..dac04fc 100644
--- a/src/util/logging/rlog/rlog.c
+++ b/src/util/logging/rlog/rlog.c
@@ -10,9 +10,10 @@
 #include <errno.h>
 #include <math.h>
 
+#include "mpl.h"   /* MPL_error_printf */
+
 #include "mpichconf.h" /* HAVE_SNPRINTF */
-#include "mpimem.h"    /* MPIU_Snprintf */
-#include "mpibase.h"   /* MPIU_Error_printf */
+#include "mpimem.h"    /* MPL_snprintf */
 
 #include "mpi.h"
 /*#define RLOG_timestamp PMPI_Wtime*/
@@ -35,7 +36,7 @@ static int WriteFileData(const char *pBuffer, int length, FILE *fout)
 	num_written = (int)fwrite(pBuffer, 1, length, fout);
 	if (num_written == -1)
 	{
-	    MPIU_Error_printf("Error: fwrite failed - %s\n", strerror(errno));
+	    MPL_error_printf("Error: fwrite failed - %s\n", strerror(errno));
 	    return errno;
 	}
 
@@ -73,13 +74,13 @@ RLOG_Struct* RLOG_InitLog(int rank, int size)
     pRLOG->nRecursion = 0;
     pRLOG->nCurEventId = RLOG_FIRST_EVENT_ID;
     pRLOG->dFirstTimestamp = 0.0;
-    MPIU_Snprintf(pRLOG->pszFileName, 256, "log%d.irlog", rank);
+    MPL_snprintf(pRLOG->pszFileName, 256, "log%d.irlog", rank);
 
     pRLOG->pOutput = NULL;
     pRLOG->pOutput = IRLOG_CreateOutputStruct(pRLOG->pszFileName);
     if (pRLOG->pOutput == NULL)
     {
-	MPIU_Error_printf("RLOG Error: unable to allocate an output structure.\n");
+	MPL_error_printf("RLOG Error: unable to allocate an output structure.\n");
 	MPIU_Free(pRLOG);
 	return NULL;
     }
@@ -379,7 +380,7 @@ static char *get_random_color_str(void)
 {
     unsigned char r,g,b;
     random_color(&r, &g, &b);
-    MPIU_Snprintf(random_color_str, MAX_RANDOM_COLOR_STR, "%3d %3d %3d", (int)r, (int)g, (int)b);
+    MPL_snprintf(random_color_str, MAX_RANDOM_COLOR_STR, "%3d %3d %3d", (int)r, (int)g, (int)b);
     return random_color_str;
 }
 
diff --git a/src/util/logging/rlog/rlogtime.c b/src/util/logging/rlog/rlogtime.c
index 55f8441..e2952fd 100644
--- a/src/util/logging/rlog/rlogtime.c
+++ b/src/util/logging/rlog/rlogtime.c
@@ -13,7 +13,7 @@
 #include "mpi.h"
 
 #include "mpichconf.h"
-#include "mpimem.h" /* for MPIU_Snprintf */
+#include "mpimem.h" /* for MPL_snprintf */
 #include "rlog.h"
 #include <math.h>
 #include <stdlib.h>
@@ -130,7 +130,7 @@ static char *get_random_color_str(void)
 {
     unsigned char r,g,b;
     random_color(&r, &g, &b);
-    MPIU_Snprintf(random_color_str, sizeof(random_color_str),
+    MPL_snprintf(random_color_str, sizeof(random_color_str),
 		  "%3d %3d %3d", (int)r, (int)g, (int)b);
     return random_color_str;
 }
@@ -184,9 +184,9 @@ int MPIU_Timer_finalize()
        there be a strong desire to provide this output, it should be
        made optional, turned on (off by default) with a runtime parameter.
      */
-    /* MPIU_Msg_printf( "Writing logfile.\n");fflush(stdout); */
+    /* MPL_msg_printf( "Writing logfile.\n");fflush(stdout); */
     RLOG_FinishLog(g_pRLOG);
-    /* MPIU_Msg_printf("finished.\n");fflush(stdout); */
+    /* MPL_msg_printf("finished.\n");fflush(stdout); */
     s_RLOG_Initialized = 0;
 
     return MPI_SUCCESS;
diff --git a/src/util/logging/rlog/rlogutil.c b/src/util/logging/rlog/rlogutil.c
index e4abe2a..c57a469 100644
--- a/src/util/logging/rlog/rlogutil.c
+++ b/src/util/logging/rlog/rlogutil.c
@@ -21,7 +21,7 @@ static int ReadFileData(char *pBuffer, int length, FILE *fin)
 	num_read = fread(pBuffer, 1, length, fin);
 	if (num_read == -1)
 	{
-	    MPIU_Error_printf("Error: fread failed - %s\n", strerror(errno));
+	    MPL_error_printf("Error: fread failed - %s\n", strerror(errno));
 	    return errno;
 	}
 	if (num_read == 0 && length)
@@ -44,7 +44,7 @@ static int WriteFileData(const char *pBuffer, int length, FILE *fout)
 	num_written = fwrite(pBuffer, 1, length, fout);
 	if (num_written == -1)
 	{
-	    MPIU_Error_printf("Error: fwrite failed - %s\n", strerror(errno));
+	    MPL_error_printf("Error: fwrite failed - %s\n", strerror(errno));
 	    return errno;
 	}
 	if (num_written == 0 && length)
@@ -84,7 +84,7 @@ RLOG_IOStruct *RLOG_CreateInputStruct(const char *filename)
     pInput = (RLOG_IOStruct*)MPIU_Malloc(sizeof(RLOG_IOStruct));
     if (pInput == NULL)
     {
-	MPIU_Error_printf("malloc failed - %s\n", strerror(errno));
+	MPL_error_printf("malloc failed - %s\n", strerror(errno));
 	return NULL;
     }
     pInput->ppCurEvent = NULL;
@@ -98,7 +98,7 @@ RLOG_IOStruct *RLOG_CreateInputStruct(const char *filename)
     pInput->f = fopen(filename, "rb");
     if (pInput->f == NULL)
     {
-	MPIU_Error_printf("fopen(%s) failed, error: %s\n", filename, strerror(errno));
+	MPL_error_printf("fopen(%s) failed, error: %s\n", filename, strerror(errno));
 	MPIU_Free(pInput);
 	return NULL;
     }
@@ -113,7 +113,7 @@ RLOG_IOStruct *RLOG_CreateInputStruct(const char *filename)
 	    /*printf("type: RLOG_HEADER_SECTION, length: %d\n", length);*/
 	    if (length != sizeof(RLOG_FILE_HEADER))
 	    {
-		MPIU_Error_printf("error in header size %d != %d\n", length, 
+		MPL_error_printf("error in header size %d != %d\n", length, 
 				  (int)sizeof(RLOG_FILE_HEADER));
 	    }
 	    if (ReadFileData((char*)&pInput->header, sizeof(RLOG_FILE_HEADER), pInput->f))
@@ -162,7 +162,7 @@ RLOG_IOStruct *RLOG_CreateInputStruct(const char *filename)
 	    fread(&cur_rank, sizeof(int), 1, pInput->f);
 	    if (cur_rank - min_rank >= pInput->nNumRanks)
 	    {
-		MPIU_Error_printf("Error: event section out of range - %d <= %d <= %d\n", pInput->header.nMinRank, cur_rank, pInput->header.nMaxRank);
+		MPL_error_printf("Error: event section out of range - %d <= %d <= %d\n", pInput->header.nMinRank, cur_rank, pInput->header.nMaxRank);
 		MPIU_Free(pInput);
 		return NULL;
 	    }
@@ -237,7 +237,7 @@ static int ModifyArrows(FILE *f, int nNumArrows, int nMin, double *pOffsets, int
     pArray = (RLOG_ARROW*)MPIU_Malloc(nNumArrows * sizeof(RLOG_ARROW));
     if (pArray)
     {
-	MPIU_Msg_printf("Modifying %d arrows\n", nNumArrows);
+	MPL_msg_printf("Modifying %d arrows\n", nNumArrows);
 	/* read the arrows */
 	fseek(f, 0, SEEK_CUR);
 	error = ReadFileData((char*)pArray, nNumArrows * sizeof(RLOG_ARROW), f);
@@ -295,7 +295,7 @@ static int ModifyArrows(FILE *f, int nNumArrows, int nMin, double *pOffsets, int
     }
     else
     {
-	MPIU_Error_printf("Error: unable to allocate an array big enough to hold %d arrows\n", nNumArrows);
+	MPL_error_printf("Error: unable to allocate an array big enough to hold %d arrows\n", nNumArrows);
 	return -1;
     }
     return 0;
@@ -307,7 +307,7 @@ int ModifyEvents(FILE *f, int nNumEvents, int nMin, double *pOffsets, int n)
     int i, index;
     int error;
 
-    MPIU_Msg_printf("Modifying %d events\n", nNumEvents);
+    MPL_msg_printf("Modifying %d events\n", nNumEvents);
     fseek(f, 0, SEEK_CUR);
     for (i=0; i<nNumEvents; i++)
     {
@@ -347,7 +347,7 @@ int RLOG_ModifyEvents(const char *filename, double *pOffsets, int n)
     pInput = (RLOG_IOStruct*)MPIU_Malloc(sizeof(RLOG_IOStruct));
     if (pInput == NULL)
     {
-	MPIU_Error_printf("malloc failed - %s\n", strerror(errno));
+	MPL_error_printf("malloc failed - %s\n", strerror(errno));
 	return -1;
     }
     pInput->ppCurEvent = NULL;
@@ -361,7 +361,7 @@ int RLOG_ModifyEvents(const char *filename, double *pOffsets, int n)
     pInput->f = fopen(filename, "rb+");
     if (pInput->f == NULL)
     {
-	MPIU_Error_printf("fopen(%s) failed, error: %s\n", filename, strerror(errno));
+	MPL_error_printf("fopen(%s) failed, error: %s\n", filename, strerror(errno));
 	MPIU_Free(pInput);
 	return -1;
     }
@@ -421,7 +421,7 @@ int RLOG_ModifyEvents(const char *filename, double *pOffsets, int n)
 	    error = ModifyArrows(pInput->f, pInput->nNumArrows, pInput->header.nMinRank, pOffsets, n);
 	    if (error)
 	    {
-		MPIU_Error_printf("Modifying the arrow section failed, error %d\n", error);
+		MPL_error_printf("Modifying the arrow section failed, error %d\n", error);
 		RLOG_CloseInputStruct(&pInput);
 		return -1;
 	    }
@@ -432,7 +432,7 @@ int RLOG_ModifyEvents(const char *filename, double *pOffsets, int n)
 	    fread(&cur_rank, sizeof(int), 1, pInput->f);
 	    if (cur_rank - min_rank >= pInput->nNumRanks)
 	    {
-		MPIU_Error_printf("Error: event section out of range - %d <= %d <= %d\n", pInput->header.nMinRank, cur_rank, pInput->header.nMaxRank);
+		MPL_error_printf("Error: event section out of range - %d <= %d <= %d\n", pInput->header.nMinRank, cur_rank, pInput->header.nMaxRank);
 		RLOG_CloseInputStruct(&pInput);
 		return -1;
 	    }
@@ -1040,7 +1040,7 @@ int RLOG_FindGlobalEventBeforeTimestamp(RLOG_IOStruct *pInput, double timestamp,
 		/*
 		if (pInput->ppCurGlobalEvent[i][j] != 0);
 		{
-		    MPIU_Error_printf("RLOG_FindGlobalEventBeforeTimestamp: Error, start_time > timestamp, %g > %g", pInput->gppPrevEvent[i][j].start_time, timestamp);
+		    MPL_error_printf("RLOG_FindGlobalEventBeforeTimestamp: Error, start_time > timestamp, %g > %g", pInput->gppPrevEvent[i][j].start_time, timestamp);
 		    return -1;
 		}
 		*/
diff --git a/src/util/mem/Makefile.mk b/src/util/mem/Makefile.mk
index 7d4400a..cc3aa78 100644
--- a/src/util/mem/Makefile.mk
+++ b/src/util/mem/Makefile.mk
@@ -5,6 +5,11 @@
 ##     See COPYRIGHT in top-level directory.
 ##
 
+AM_CPPFLAGS += -I$(top_srcdir)/src/util/mem
+
+noinst_HEADERS +=                               \
+    src/util/mem/mpiu_strerror.h
+
 mpi_core_sources += \
     src/util/mem/trmem.c      \
     src/util/mem/handlemem.c  \
diff --git a/src/util/mem/argstr.c b/src/util/mem/argstr.c
index 6ff79d1..12f5a08 100644
--- a/src/util/mem/argstr.c
+++ b/src/util/mem/argstr.c
@@ -50,7 +50,7 @@ static int encode_buffer(char *dest, int dest_length, const char *src,
     }
     while (src_length && dest_length)
     {
-	num_used = MPIU_Snprintf(dest, dest_length, "%02X", 
+	num_used = MPL_snprintf(dest, dest_length, "%02X", 
 				 (unsigned char)*src);
 	if (num_used < 0)
 	{
@@ -691,12 +691,12 @@ int MPIU_Str_add_string(char **str_ptr, int *maxlen_ptr, const char *val)
     {
 	if (*val == '\0')
 	{
-	    num_chars = MPIU_Snprintf(str, maxlen, 
+	    num_chars = MPL_snprintf(str, maxlen, 
 		      MPIU_STR_QUOTE_STR MPIU_STR_QUOTE_STR/*"\"\""*/);
 	}
 	else
 	{
-	    num_chars = MPIU_Snprintf(str, maxlen, "%s%c", val, 
+	    num_chars = MPL_snprintf(str, maxlen, "%s%c", val, 
 				      MPIU_STR_SEPAR_CHAR);
 	}
 	if (num_chars == maxlen)
@@ -822,7 +822,7 @@ int MPIU_Str_add_string_arg(char **str_ptr, int *maxlen_ptr, const char *flag,
     }
     else
     {
-	num_chars = MPIU_Snprintf(*str_ptr, *maxlen_ptr, "%s", flag);
+	num_chars = MPL_snprintf(*str_ptr, *maxlen_ptr, "%s", flag);
     }
     *maxlen_ptr = *maxlen_ptr - num_chars;
     if (*maxlen_ptr < 1)
@@ -851,12 +851,12 @@ int MPIU_Str_add_string_arg(char **str_ptr, int *maxlen_ptr, const char *flag,
     {
 	if (*val == '\0')
 	{
-	    num_chars = MPIU_Snprintf(*str_ptr, *maxlen_ptr, 
+	    num_chars = MPL_snprintf(*str_ptr, *maxlen_ptr, 
 			      MPIU_STR_QUOTE_STR MPIU_STR_QUOTE_STR/*"\"\""*/);
 	}
 	else
 	{
-	    num_chars = MPIU_Snprintf(*str_ptr, *maxlen_ptr, "%s", val);
+	    num_chars = MPL_snprintf(*str_ptr, *maxlen_ptr, "%s", val);
 	}
     }
     *str_ptr = *str_ptr + num_chars;
@@ -908,7 +908,7 @@ int MPIU_Str_add_int_arg(char **str_ptr, int *maxlen_ptr, const char *flag,
 			 int val)
 {
     char val_str[12];
-    MPIU_Snprintf(val_str, 12, "%d", val);
+    MPL_snprintf(val_str, 12, "%d", val);
     return MPIU_Str_add_string_arg(str_ptr, maxlen_ptr, flag, val_str);
 }
 
@@ -959,7 +959,7 @@ int MPIU_Str_add_binary_arg(char **str_ptr, int *maxlen_ptr, const char *flag,
     }
     else
     {
-	num_chars = MPIU_Snprintf(*str_ptr, *maxlen_ptr, "%s", flag);
+	num_chars = MPL_snprintf(*str_ptr, *maxlen_ptr, "%s", flag);
     }
     *maxlen_ptr = *maxlen_ptr - num_chars;
     if (*maxlen_ptr < 1)
diff --git a/src/util/mem/check.c b/src/util/mem/check.c
index 00776b0..20b89c4 100644
--- a/src/util/mem/check.c
+++ b/src/util/mem/check.c
@@ -9,20 +9,20 @@
 /* This is a test program, so we allow printf */
 /* style: allow:printf:3 sig:0 */
 
-extern int MPIU_Snprintf( char *, size_t, const char *, ... );
+extern int MPL_snprintf( char *, size_t, const char *, ... );
 
 int main( int argc, char *argv[] )
 {
     char buf[1000];
     int n;
 
-    n = MPIU_Snprintf( buf, 100, "This is a test\n" );
+    n = MPL_snprintf( buf, 100, "This is a test\n" );
     printf( "%d:%s", n, buf );
 
-    n = MPIU_Snprintf( buf, 100, "This is a test %d\n", 3000000 );
+    n = MPL_snprintf( buf, 100, "This is a test %d\n", 3000000 );
     printf( "%d:%s", n, buf );
 
-    n = MPIU_Snprintf( buf, 100, "This %s %% %d\n", "is a test for ", -3000 );
+    n = MPL_snprintf( buf, 100, "This %s %% %d\n", "is a test for ", -3000 );
     printf( "%d:%s", n, buf );
 
     return 0;
diff --git a/src/util/mem/handlemem.c b/src/util/mem/handlemem.c
index a9c9250..ab5fc74 100644
--- a/src/util/mem/handlemem.c
+++ b/src/util/mem/handlemem.c
@@ -159,7 +159,7 @@ static int MPIU_Handle_free( void *((*indirect)[]), int indirect_size )
     do {                                                                                         \
         if (MPL_VG_RUNNING_ON_VALGRIND()) {                                                     \
             char desc_str[256];                                                                  \
-            MPIU_Snprintf(desc_str, sizeof(desc_str)-1,                                          \
+            MPL_snprintf(desc_str, sizeof(desc_str)-1,                                          \
                           "[MPICH handle: objptr=%p handle=0x%x %s/%s]",                        \
                           (objptr_), (objptr_)->handle,                                          \
                           ((is_direct_) ? "DIRECT" : "INDIRECT"),                                \
diff --git a/src/util/mem/mpiu_strerror.h b/src/util/mem/mpiu_strerror.h
new file mode 100644
index 0000000..700bf30
--- /dev/null
+++ b/src/util/mem/mpiu_strerror.h
@@ -0,0 +1,15 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2001 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+#if !defined(MPIU_STRERROR_H_INCLUDED)
+#define MPIU_STRERROR_H_INCLUDED
+
+/*
+ * MPIU_Sterror()
+ *
+ * Thread safe implementation of strerror(), whenever possible. */
+const char *MPIU_Strerror(int errnum);
+
+#endif /* !defined(MPIU_STRERROR_H_INCLUDED) */
diff --git a/src/util/msgs/msgprint.c b/src/util/msgs/msgprint.c
deleted file mode 100644
index f859b9f..0000000
--- a/src/util/msgs/msgprint.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- *  (C) 2001 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-
-#include "mpichconf.h"
-#include "mpimem.h"
-#include "mpibase.h"
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include <stdio.h>
-#ifdef HAVE_STDARG_H
-    #include <stdarg.h>
-#endif
-
-#if defined(USE_GETTEXT)
-#include <libintl.h>
-#endif
-
-/* style: allow:vprintf:1 sig:0 */
-/* style: allow:vfprintf:4 sig:0 */
-/* style: allow:fprintf:2 sig:0 */
-
-int MPIU_Usage_printf(const char *str, ...)
-{
-    int n;
-    va_list list;
-    const char *format_str;
-
-    va_start(list, str);
-#ifdef USE_GETTEXT
-    /* Category is LC_MESSAGES */
-    format_str = dgettext( "mpich", str );
-    if (!format_str) format_str = str;
-#else
-    format_str = str;
-#endif
-    n = vprintf(format_str, list);
-    va_end(list);
-
-    fflush(stdout);
-
-    return n;
-}
-
-int MPIU_Error_printf(const char *str, ...)
-{
-    int n;
-    va_list list;
-    const char *format_str;
-
-    va_start(list, str);
-#ifdef USE_GETTEXT
-    /* Category is LC_MESSAGES */
-    format_str = dgettext( "mpich", str );
-    if (!format_str) format_str = str;
-#else
-    format_str = str;
-#endif
-    n = vfprintf(stderr, format_str, list);
-    va_end(list);
-
-    fflush(stderr);
-
-    return n;
-}
-
-int MPIU_Internal_error_printf(const char *str, ...)
-{
-    int n;
-    va_list list;
-    const char *format_str;
-
-    va_start(list, str);
-#ifdef USE_GETTEXT
-    /* Category is LC_MESSAGES */
-    format_str = dgettext( "mpich", str );
-    if (!format_str) format_str = str;
-#else
-    format_str = str;
-#endif
-    n = vfprintf(stderr, format_str, list);
-    va_end(list);
-
-    fflush(stderr);
-
-    return n;
-}
-
-/* Like internal_error_printf, but for the system routine name with 
-   errno errnum.  Str may be null */
-int MPIU_Internal_sys_error_printf(const char *name, int errnum, 
-				   const char *str, ...)
-{
-    int n = 0;
-    va_list list;
-    const char *format_str=0;
-
-    /* Prepend information on the system error */
-#ifdef HAVE_STRERROR
-#ifdef USE_GETTEXT
-    /* Category is LC_MESSAGES */
-    format_str = dgettext( "mpich", "Error in system call %s: %s" );
-#endif
-    if (!format_str) format_str = "Error in system call %s: %s\n";
-
-    fprintf( stderr, format_str, name, strerror(errnum) );
-#else
-#ifdef USE_GETTEXT
-    /* Category is LC_MESSAGES */
-    format_str = dgettext( "mpich", "Error in system call %s errno = %d" );
-#endif
-    if (!format_str) format_str = "Error in system call %s errno = %d\n";
-
-    fprintf( stderr, "Error in %s: errno = %d\n", name, errnum );
-#endif
-
-    /* Now add the message that is specific to this use, if any */
-    if (str) {
-	va_start(list, str);
-#ifdef USE_GETTEXT
-	/* Category is LC_MESSAGES */
-	format_str = dgettext( "mpich", str );
-	if (!format_str) format_str = str;
-#else
-	format_str = str;
-#endif
-	n = vfprintf(stderr, format_str, list);
-	va_end(list);
-    }
-
-    fflush(stderr);
-
-    return n;
-}
-
-int MPIU_Msg_printf(const char *str, ...)
-{
-    int n;
-    va_list list;
-    const char *format_str;
-
-    va_start(list, str);
-#ifdef USE_GETTEXT
-    /* Category is LC_MESSAGES */
-    format_str = dgettext( "mpich", str );
-    if (!format_str) format_str = str;
-#else
-    format_str = str;
-#endif
-    n = vfprintf(stdout, format_str, list);
-    va_end(list);
-
-    fflush(stdout);
-
-    return n;
-}
-
diff --git a/src/util/multichannel/mpi.c b/src/util/multichannel/mpi.c
index fbac3b5..a59af89 100644
--- a/src/util/multichannel/mpi.c
+++ b/src/util/multichannel/mpi.c
@@ -1769,13 +1769,13 @@ BOOL LoadMPILibrary()
 	    /* ignore the sock channel since it is the default and is not named mpichsock.dll */
 	    if (strncmp(channel, "sock", 5))
 	    {
-		MPIU_Snprintf(name, MAX_DLL_NAME, DLL_FORMAT_STRING, channel);
+		MPL_snprintf(name, MAX_DLL_NAME, DLL_FORMAT_STRING, channel);
 		dll_name = name;
 	    }
         else
         {
             /* FIXME: Get rid of dlls without a channel substring in the name */
-    		MPIU_Snprintf(name, MAX_DLL_NAME, "%s", MPI_SOCK_CHANNEL_DLL_NAME);
+    		MPL_snprintf(name, MAX_DLL_NAME, "%s", MPI_SOCK_CHANNEL_DLL_NAME);
 	    	dll_name = name;
         }
 	}
diff --git a/src/util/other/assert.c b/src/util/other/assert.c
index 9529263..5fae177 100644
--- a/src/util/other/assert.c
+++ b/src/util/other/assert.c
@@ -21,7 +21,7 @@ int MPIR_Assert_fail(const char *cond, const char *file_name, int line_num)
 {
     MPL_VG_PRINTF_BACKTRACE("Assertion failed in file %s at line %d: %s\n",
                             file_name, line_num, cond);
-    MPIU_Internal_error_printf("Assertion failed in file %s at line %d: %s\n",
+    MPL_internal_error_printf("Assertion failed in file %s at line %d: %s\n",
                                file_name, line_num, cond);
     MPIU_DBG_MSG_FMT(ALL, TERSE,
                      (MPIU_DBG_FDEST,
@@ -43,9 +43,9 @@ int MPIR_Assert_fail_fmt(const char *cond, const char *file_name, int line_num,
                             file_name, line_num, cond);
     MPL_VG_PRINTF_BACKTRACE("%s\n", msg);
 
-    MPIU_Internal_error_printf("Assertion failed in file %s at line %d: %s\n",
+    MPL_internal_error_printf("Assertion failed in file %s at line %d: %s\n",
                                file_name, line_num, cond);
-    MPIU_Internal_error_printf("%s\n", msg);
+    MPL_internal_error_printf("%s\n", msg);
 
     MPIU_DBG_MSG_FMT(ALL, TERSE,
                      (MPIU_DBG_FDEST,
diff --git a/src/util/thread/Makefile.mk b/src/util/thread/Makefile.mk
index 3d68e2d..0d6b0cb 100644
--- a/src/util/thread/Makefile.mk
+++ b/src/util/thread/Makefile.mk
@@ -5,6 +5,19 @@
 ##     See COPYRIGHT in top-level directory.
 ##
 
+AM_CPPFLAGS += -I$(top_srcdir)/src/util/thread
+
+noinst_HEADERS +=                               \
+    src/util/thread/mpiu_thread.h               \
+    src/util/thread/mpiu_thread_posix_funcs.h   \
+    src/util/thread/mpiu_thread_posix_types.h   \
+    src/util/thread/mpiu_thread_solaris_funcs.h \
+    src/util/thread/mpiu_thread_solaris_types.h \
+    src/util/thread/mpiu_thread_win_funcs.h     \
+    src/util/thread/mpiu_thread_win_types.h
+
 mpi_core_sources += \
-    src/util/thread/mpiu_thread.c
+    src/util/thread/mpiu_thread_win.c \
+    src/util/thread/mpiu_thread_solaris.c \
+    src/util/thread/mpiu_thread_posix.c
 
diff --git a/src/util/thread/mpiu_thread.c b/src/util/thread/mpiu_thread.c
deleted file mode 100644
index 2c2599f..0000000
--- a/src/util/thread/mpiu_thread.c
+++ /dev/null
@@ -1,615 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- *  (C) 2001 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-
-/* common header includes */
-#include <stdlib.h>
-#include "mpichconf.h" /* defines MPIU_THREAD_PACKAGE_NAME */
-#include "mpibase.h"
-#include "mpiutil.h" /* for HAS_NO_SYMBOLS_WARNING */
-#include "mpiu_thread.h"
-
-MPIU_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
-
-/* This file currently implements these as a preprocessor if/elif/else sequence.
- * This has the upside of not doing #includes for .c files or (poorly
- * named) .i files.  It has the downside of making this file large-ish
- * and a little harder to read in some cases.  If this becomes
- * unmanagable at some point these should be separated back out into
- * header files and included as needed. [goodell@ 2009-06-24] */
-
-/* Implementation specific function definitions (usually in the form of macros) */
-#if defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_POSIX)
-/* begin posix impl */
-
-/* stdio.h is needed for mpimem, which prototypes a few routines that
-   take FILE * arguments */
-#include <stdio.h>
-#include "mpibase.h"
-#include "mpimem.h"
-
-/*
- * struct MPEI_Thread_info
- *
- * Structure used to pass the user function and data to the intermediate
- * function, MPEI_Thread_start.  See comment in
- * MPEI_Thread_start() header for more information.
- */
-struct MPEI_Thread_info
-{
-    MPIU_Thread_func_t func;
-    void * data;
-};
-
-
-void * MPEI_Thread_start(void * arg);
-
-
-/*
- * MPIU_Thread_create()
- */
-void MPIU_Thread_create(MPIU_Thread_func_t func, void * data, MPIU_Thread_id_t * idp, int * errp)
-{
-    struct MPEI_Thread_info * thread_info;
-    int err = MPIU_THREAD_SUCCESS;
-
-    /* FIXME: faster allocation, or avoid it all together? */
-    thread_info = (struct MPEI_Thread_info *) MPIU_Malloc(sizeof(struct MPEI_Thread_info));
-    if (thread_info != NULL)
-    {
-        pthread_attr_t attr;
-
-        thread_info->func = func;
-        thread_info->data = data;
-
-        pthread_attr_init(&attr);
-        pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-
-        err = pthread_create(idp, &attr, MPEI_Thread_start, thread_info);
-        /* FIXME: convert error to an MPIU_THREAD_ERR value */
-
-        pthread_attr_destroy(&attr);
-    }
-    else
-    {
-        err = 1000000000;
-    }
-
-    if (errp != NULL)
-    {
-        *errp = err;
-    }
-}
-
-
-/*
- * MPEI_Thread_start()
- *
- * Start functions in pthreads are expected to return a void pointer.  Since
- * our start functions do not return a value we must
- * use an intermediate function to perform call to the user's start function
- * and then return a value of NULL.
- */
-void * MPEI_Thread_start(void * arg)
-{
-    struct MPEI_Thread_info * thread_info = (struct MPEI_Thread_info *) arg;
-    MPIU_Thread_func_t func = thread_info->func;
-    void * data = thread_info->data;
-
-    MPIU_Free(arg);
-
-    func(data);
-
-    return NULL;
-}
-
-/* end posix impl */
-#elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_SOLARIS)
-/* begin solaris impl */
-
-/*
- * struct MPEI_Thread_info
- *
- * Structure used to pass the user function and data to the intermediate function, MPEI_Thread_start.  See comment in
- * MPEI_Thread_start() header for more information.
- */
-struct MPEI_Thread_info
-{
-    MPIU_Thread_func_t func;
-    void * data;
-};
-
-
-void * MPEI_Thread_start(void * arg);
-
-
-/*
- * MPIU_Thread_create()
- */
-void MPIU_Thread_create(MPIU_Thread_func_t func, void * data, MPIU_Thread_id_t * idp, int * errp)
-{
-    struct MPEI_Thread_info * thread_info;
-    int err = MPIU_THREAD_SUCCESS;
-
-    /* FIXME: faster allocation, or avoid it all together? */
-    thread_info = (struct MPEI_Thread_info *) MPIU_Malloc(sizeof(struct MPEI_Thread_info));
-    if (thread_info != NULL)
-    {
-        thread_info->func = func;
-        thread_info->data = data;
-
-        err = thr_create(NULL, 0, MPEI_Thread_start, thread_info, THR_DETACHED, idp);
-        /* FIXME: convert error to an MPIU_THREAD_ERR value */
-    }
-    else
-    {
-        err = 1000000000;
-    }
-
-    if (errp != NULL)
-    {
-        *errp = err;
-    }
-}
-
-
-/*
- * MPEI_Thread_start()
- *
- * Start functions in Solaris threads are expected to return a void pointer.  Since our start functions do not return a value we
- * must use an intermediate function to perform call to the user's start function and then return a value of NULL.
- */
-void * MPEI_Thread_start(void * arg)
-{
-    struct MPEI_Thread_info * thread_info = (struct MPEI_Thread_info *) arg;
-    MPIU_Thread_func_t func = thread_info->func;
-    void * data = thread_info->data;
-
-    MPIU_Free(arg);
-
-    func(data);
-
-    return NULL;
-}
-
-/* end solaris impl */
-#elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_WIN)
-/* begin win impl */
-
-#include "mpimem.h"
-
-/*
- * struct MPEI_Thread_info
- *
- * Structure used to pass the user function and data to the intermediate function, MPEI_Thread_start.  See comment in
- * MPEI_Thread_start() header for more information.
- */
-struct MPEI_Thread_info
-{
-    MPIU_Thread_func_t func;
-    void * data;
-};
-
-
-DWORD WINAPI MPEI_Thread_start(LPVOID arg);
-
-/*
- * MPIU_Thread_create()
- */
-void MPIU_Thread_create(MPIU_Thread_func_t func, void * data, MPIU_Thread_id_t * idp, int * errp)
-{
-    struct MPEI_Thread_info * thread_info;
-    int err = MPIU_THREAD_SUCCESS;
-
-    thread_info = (struct MPEI_Thread_info *) MPIU_Malloc(sizeof(struct MPEI_Thread_info));
-    if (thread_info != NULL)
-    {
-        thread_info->func = func;
-        thread_info->data = data;
-        *idp = CreateThread(NULL, 0, MPEI_Thread_start, thread_info, 0, NULL);
-        if (*idp == NULL)
-        {
-            err = GetLastError();
-        }
-    }
-    else
-    {
-        err = 1000000000;
-    }
-
-    if (errp != NULL)
-    {
-        *errp = err;
-    }
-}
-
-
-/*
- * MPEI_Thread_start()
- *
- * Start functions in Windows are expected to return a DWORD.  Since our start functions do not return a value we must
- * use an intermediate function to perform the call to the user's start function and then return a value of 0.
- */
-DWORD WINAPI MPEI_Thread_start(LPVOID arg)
-{
-    struct MPEI_Thread_info * thread_info = (struct MPEI_Thread_info *) arg;
-    MPIU_Thread_func_t func = thread_info->func;
-    void * data = thread_info->data;
-
-    MPIU_Free(arg);
-
-    func(data);
-
-    return 0;
-}
-
-void MPIU_Thread_exit()
-{
-    ExitThread(0);
-}
-
-void MPIU_Thread_self(MPIU_Thread_id_t * id)
-{
-    *id = GetCurrentThread();
-}
-
-void MPIU_Thread_same(MPIU_Thread_id_t * id1, MPIU_Thread_id_t * id2, int * same)
-{
-    *same = (*id1 == *id2) ? TRUE : FALSE;
-}
-
-void MPIU_Thread_yield(MPIU_Thread_mutex_t * mutex)
-{
-    int err;
-
-    MPIU_Thread_mutex_unlock(mutex, &err);
-    Sleep(0);
-    MPIU_Thread_mutex_lock(mutex, &err);
-}
-
-/*
- *    Mutexes
- */
-
-void MPIU_Thread_mutex_create(MPIU_Thread_mutex_t * mutex, int * err)
-{
-    *mutex = CreateMutex(NULL, FALSE, NULL);
-    if (err != NULL)
-    {
-        if (*mutex == NULL)
-        {
-            *err = GetLastError();
-        }
-        else
-        {
-            *err = MPIU_THREAD_SUCCESS;
-        }
-    }
-}
-
-void MPIU_Thread_mutex_destroy(MPIU_Thread_mutex_t * mutex, int * err)
-{
-    BOOL result;
-
-    result = CloseHandle(*mutex);
-    if (err != NULL)
-    {
-        if (result)
-        {
-            *err = MPIU_THREAD_SUCCESS;
-        }
-        else
-        {
-            *err = GetLastError();
-        }
-    }
-}
-
-void MPIU_Thread_mutex_lock(MPIU_Thread_mutex_t * mutex, int * err)
-{
-    DWORD result;
-
-    result = WaitForSingleObject(*mutex, INFINITE);
-    if (err != NULL)
-    {
-        if (result == WAIT_OBJECT_0)
-        {
-            *err = MPIU_THREAD_SUCCESS;
-        }
-        else
-        {
-            if (result == WAIT_FAILED)
-            {
-                *err = GetLastError();
-            }
-            else
-            {
-                *err = result;
-            }
-        }
-    }
-}
-
-void MPIU_Thread_mutex_unlock(MPIU_Thread_mutex_t * mutex, int * err)
-{
-    BOOL result;
-
-    result = ReleaseMutex(*mutex);
-    if (err != NULL)
-    {
-        if (result)
-        {
-            *err = MPIU_THREAD_SUCCESS;
-        }
-        else
-        {
-            *err = GetLastError();
-        }
-    }
-}
-
-void MPIU_Thread_mutex_trylock(MPIU_Thread_mutex_t * mutex, int * flag, int * err)
-{
-    DWORD result;
-
-    result = WaitForSingleObject(*mutex, 0);
-    if (result == WAIT_OBJECT_0)
-    {
-        *flag = TRUE;
-        if (err != NULL)
-        {
-            *err = MPIU_THREAD_SUCCESS;
-        }
-    }
-    else
-    {
-        *flag = FALSE;
-        if (err != NULL)
-        {
-            if (result == WAIT_TIMEOUT)
-            {
-                *err = MPIU_THREAD_SUCCESS;
-            }
-            else
-            {
-                if (result == WAIT_FAILED)
-                {
-                    *err = GetLastError();
-                }
-                else
-                {
-                    *err = result;
-                }
-            }
-        }
-    }
-}
-
-/*
- * Condition Variables
- */
-
-void MPIU_Thread_cond_create(MPIU_Thread_cond_t * cond, int * err)
-{
-    /* Create a tls slot to store the events used to wakeup each thread in cond_bcast or cond_signal */
-    MPIU_Thread_tls_create(NULL, &cond->tls, err);
-    if (err != NULL && *err != MPIU_THREAD_SUCCESS)
-    {
-        return;
-    }
-    /* Create a mutex to protect the fifo queue.  This is required because the mutex passed in to the
-       cond functions need not be the same in each thread. */
-    MPIU_Thread_mutex_create(&cond->fifo_mutex, err);
-    if (err != NULL && *err != MPIU_THREAD_SUCCESS)
-    {
-        return;
-    }
-    cond->fifo_head = NULL;
-    cond->fifo_tail = NULL;
-    if (err != NULL)
-    {
-        *err = MPIU_THREAD_SUCCESS;
-    }
-}
-
-void MPIU_Thread_cond_destroy(MPIU_Thread_cond_t * cond, int * err)
-{
-    MPIU_Thread_cond_fifo_t *iter;
-
-    while (cond->fifo_head)
-    {
-        iter = cond->fifo_head;
-        cond->fifo_head = cond->fifo_head->next;
-        MPIU_Free(iter);
-    }
-    MPIU_Thread_mutex_destroy(&cond->fifo_mutex, err);
-    if (err != NULL && *err != MPIU_THREAD_SUCCESS)
-    {
-        return;
-    }
-    MPIU_Thread_tls_destroy(&cond->tls, err);
-    /*
-    if (err != NULL)
-    {
-        *err = MPIU_THREAD_SUCCESS;
-    }
-    */
-}
-
-void MPIU_Thread_cond_wait(MPIU_Thread_cond_t * cond, MPIU_Thread_mutex_t * mutex, int * err)
-{
-    HANDLE event;
-    DWORD result;
-    MPIU_Thread_tls_get(&cond->tls, &event, err);
-    if (err != NULL && *err != MPIU_THREAD_SUCCESS)
-    {
-        return;
-    }
-    if (event == NULL)
-    {
-        event = CreateEvent(NULL, TRUE, FALSE, NULL);
-        if (event == NULL)
-        {
-            if (err != NULL)
-            {
-                *err = GetLastError();
-            }
-            return;
-        }
-        MPIU_Thread_tls_set(&cond->tls, event, err);
-        if (err != NULL && *err != MPIU_THREAD_SUCCESS)
-        {
-            return;
-        }
-    }
-    MPIU_Thread_mutex_lock(&cond->fifo_mutex, err);
-    if (err != NULL && *err != MPIU_THREAD_SUCCESS)
-    {
-        return;
-    }
-    if (cond->fifo_tail == NULL)
-    {
-        cond->fifo_tail = (MPIU_Thread_cond_fifo_t*)MPIU_Malloc(sizeof(MPIU_Thread_cond_fifo_t));
-        cond->fifo_head = cond->fifo_tail;
-    }
-    else
-    {
-        cond->fifo_tail->next = (MPIU_Thread_cond_fifo_t*)MPIU_Malloc(sizeof(MPIU_Thread_cond_fifo_t));
-        cond->fifo_tail = cond->fifo_tail->next;
-    }
-    if (cond->fifo_tail == NULL)
-    {
-        if (err != NULL)
-        {
-            *err = -1;
-        }
-        return;
-    }
-    cond->fifo_tail->event = event;
-    cond->fifo_tail->next = NULL;
-    MPIU_Thread_mutex_unlock(&cond->fifo_mutex, err);
-    if (err != NULL && *err != MPIU_THREAD_SUCCESS)
-    {
-        return;
-    }
-    MPIU_Thread_mutex_unlock(mutex, err);
-    if (err != NULL && *err != MPIU_THREAD_SUCCESS)
-    {
-        return;
-    }
-    result = WaitForSingleObject(event, INFINITE);
-    if (err != NULL)
-    {
-        if (result != WAIT_OBJECT_0)
-        {
-            if (result == WAIT_FAILED)
-            {
-                *err = GetLastError();
-            }
-            else
-            {
-                *err = result;
-            }
-            return;
-        }
-    }
-    result = ResetEvent(event);
-    if (!result && err != NULL)
-    {
-        *err = GetLastError();
-        return;
-    }
-    MPIU_Thread_mutex_lock(mutex, err);
-    /*
-    if (err != NULL)
-    {
-        *err = MPIU_THREAD_SUCCESS;
-    }
-    */
-}
-
-void MPIU_Thread_cond_broadcast(MPIU_Thread_cond_t * cond, int * err)
-{
-    MPIU_Thread_cond_fifo_t *fifo, *temp;
-    MPIU_Thread_mutex_lock(&cond->fifo_mutex, err);
-    if (err != NULL && *err != MPIU_THREAD_SUCCESS)
-    {
-        return;
-    }
-    /* remove the fifo queue from the cond variable */
-    fifo = cond->fifo_head;
-    cond->fifo_head = cond->fifo_tail = NULL;
-    MPIU_Thread_mutex_unlock(&cond->fifo_mutex, err);
-    if (err != NULL && *err != MPIU_THREAD_SUCCESS)
-    {
-        return;
-    }
-    /* signal each event in the fifo queue */
-    while (fifo)
-    {
-        if (!SetEvent(fifo->event) && err != NULL)
-        {
-            *err = GetLastError();
-            /* lost memory */
-            return;
-        }
-        temp = fifo;
-        fifo = fifo->next;
-        MPIU_Free(temp);
-    }
-    if (err != NULL)
-    {
-        *err = MPIU_THREAD_SUCCESS;
-    }
-}
-
-void MPIU_Thread_cond_signal(MPIU_Thread_cond_t * cond, int * err)
-{
-    MPIU_Thread_cond_fifo_t *fifo;
-    MPIU_Thread_mutex_lock(&cond->fifo_mutex, err);
-    if (err != NULL && *err != MPIU_THREAD_SUCCESS)
-    {
-        return;
-    }
-    fifo = cond->fifo_head;
-    if (fifo)
-    {
-        cond->fifo_head = cond->fifo_head->next;
-        if (cond->fifo_head == NULL)
-            cond->fifo_tail = NULL;
-    }
-    MPIU_Thread_mutex_unlock(&cond->fifo_mutex, err);
-    if (err != NULL && *err != MPIU_THREAD_SUCCESS)
-    {
-        return;
-    }
-    if (fifo)
-    {
-        if (!SetEvent(fifo->event) && err != NULL)
-        {
-            *err = GetLastError();
-            MPIU_Free(fifo);
-            return;
-        }
-        MPIU_Free(fifo);
-    }
-    if (err != NULL)
-    {
-        *err = MPIU_THREAD_SUCCESS;
-    }
-}
-
-
-/*
- * Thread Local Storage
- * - Defined in src/include/thread/mpiu_thread_win_funcs.h
- */
-/* end win impl */
-#elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_NONE)
-/* do nothing */
-#else
-#  error "thread package not defined or unknown"
-#endif
-
diff --git a/src/include/mpiu_thread.h b/src/util/thread/mpiu_thread.h
similarity index 97%
rename from src/include/mpiu_thread.h
rename to src/util/thread/mpiu_thread.h
index 4146bed..ac6b065 100644
--- a/src/include/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -8,6 +8,7 @@
 #define MPIU_THREAD_H_INCLUDED
 
 #include "mpichconf.h" /* defines MPIU_THREAD_PACKAGE_NAME */
+#include "mpidbg.h"
 
 #if !defined(TRUE)
 #define TRUE 1
@@ -24,11 +25,11 @@
 #define MPIU_THREAD_PACKAGE_WIN     4
 
 #if defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_POSIX)
-#  include "thread/mpiu_thread_posix_types.h"
+#  include "mpiu_thread_posix_types.h"
 #elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_SOLARIS)
-#  include "thread/mpiu_thread_solaris_types.h"
+#  include "mpiu_thread_solaris_types.h"
 #elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_WIN)
-#  include "thread/mpiu_thread_win_types.h"
+#  include "mpiu_thread_win_types.h"
 #elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_NONE)
 typedef int MPIU_Thread_mutex_t;
 typedef int MPIU_Thread_cond_t;
@@ -282,11 +283,11 @@ void MPIU_Thread_tls_get(MPIU_Thread_tls_t * tls, void ** value, int * err);
 
 /* Implementation specific function definitions (usually in the form of macros) */
 #if defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_POSIX)
-#  include "thread/mpiu_thread_posix_funcs.h"
+#  include "mpiu_thread_posix_funcs.h"
 #elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_SOLARIS)
-#  include "thread/mpiu_thread_solaris_funcs.h"
+#  include "mpiu_thread_solaris_funcs.h"
 #elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_WIN)
-#  include "thread/mpiu_thread_win_funcs.h"
+#  include "mpiu_thread_win_funcs.h"
 #elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_NONE)
 /* do nothing */
 #else
diff --git a/src/util/thread/mpiu_thread_posix.c b/src/util/thread/mpiu_thread_posix.c
new file mode 100644
index 0000000..9907e6f
--- /dev/null
+++ b/src/util/thread/mpiu_thread_posix.c
@@ -0,0 +1,104 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2001 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+/* common header includes */
+#include <stdlib.h>
+#include "mpichconf.h"  /* defines MPIU_THREAD_PACKAGE_NAME */
+#include "mpl.h"
+#include "mpiutil.h"    /* for HAS_NO_SYMBOLS_WARNING */
+#include "mpiu_thread.h"
+
+MPIU_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
+
+/* This file currently implements these as a preprocessor if/elif/else sequence.
+ * This has the upside of not doing #includes for .c files or (poorly
+ * named) .i files.  It has the downside of making this file large-ish
+ * and a little harder to read in some cases.  If this becomes
+ * unmanagable at some point these should be separated back out into
+ * header files and included as needed. [goodell@ 2009-06-24] */
+
+/* Implementation specific function definitions (usually in the form of macros) */
+#if defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_POSIX)
+/* begin posix impl */
+
+/* stdio.h is needed for mpimem, which prototypes a few routines that
+   take FILE * arguments */
+#include <stdio.h>
+#include "mpimem.h"
+
+/*
+ * struct MPEI_Thread_info
+ *
+ * Structure used to pass the user function and data to the intermediate
+ * function, MPEI_Thread_start.  See comment in
+ * MPEI_Thread_start() header for more information.
+ */
+struct MPEI_Thread_info {
+    MPIU_Thread_func_t func;
+    void *data;
+};
+
+
+void *MPEI_Thread_start(void *arg);
+
+
+/*
+ * MPIU_Thread_create()
+ */
+void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t * idp, int *errp)
+{
+    struct MPEI_Thread_info *thread_info;
+    int err = MPIU_THREAD_SUCCESS;
+
+    /* FIXME: faster allocation, or avoid it all together? */
+    thread_info = (struct MPEI_Thread_info *) MPIU_Malloc(sizeof(struct MPEI_Thread_info));
+    if (thread_info != NULL) {
+        pthread_attr_t attr;
+
+        thread_info->func = func;
+        thread_info->data = data;
+
+        pthread_attr_init(&attr);
+        pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+
+        err = pthread_create(idp, &attr, MPEI_Thread_start, thread_info);
+        /* FIXME: convert error to an MPIU_THREAD_ERR value */
+
+        pthread_attr_destroy(&attr);
+    }
+    else {
+        err = 1000000000;
+    }
+
+    if (errp != NULL) {
+        *errp = err;
+    }
+}
+
+
+/*
+ * MPEI_Thread_start()
+ *
+ * Start functions in pthreads are expected to return a void pointer.  Since
+ * our start functions do not return a value we must
+ * use an intermediate function to perform call to the user's start function
+ * and then return a value of NULL.
+ */
+void *MPEI_Thread_start(void *arg)
+{
+    struct MPEI_Thread_info *thread_info = (struct MPEI_Thread_info *) arg;
+    MPIU_Thread_func_t func = thread_info->func;
+    void *data = thread_info->data;
+
+    MPIU_Free(arg);
+
+    func(data);
+
+    return NULL;
+}
+
+/* end posix impl */
+#endif
diff --git a/src/include/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
similarity index 97%
rename from src/include/thread/mpiu_thread_posix_funcs.h
rename to src/util/thread/mpiu_thread_posix_funcs.h
index db91208..ffeac31 100644
--- a/src/include/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -8,6 +8,8 @@
 /*
  * Threads
  */
+#ifndef MPIU_THREAD_POSIX_FUNCS_H_INCLUDED
+#define MPIU_THREAD_POSIX_FUNCS_H_INCLUDED
 
 #include "mpiu_process_wrappers.h" /* for MPIU_PW_Sched_yield */
 
@@ -96,7 +98,7 @@ do {                                                                       \
     pthread_mutexattr_settype(&attr__, PTHREAD_MUTEX_ERRORCHECK_VALUE); \
     err__ = pthread_mutex_init(&(mutex_ptr_)->mutex, &attr__);          \
     if (err__)                                                          \
-        MPIU_Internal_sys_error_printf("pthread_mutex_init", err__,     \
+        MPL_internal_sys_error_printf("pthread_mutex_init", err__,     \
                                        "    %s:%d\n", __FILE__, __LINE__);\
     /* FIXME: convert error to an MPIU_THREAD_ERR value */                  \
     *(int *)(err_ptr_) = err__;                                             \
@@ -137,7 +139,7 @@ do {                                                               \
     if (err__)                                                  \
     {                                                           \
         MPIU_DBG_MSG_S(THREAD,TERSE,"  mutex lock error: %s", MPIU_Strerror(err__));       \
-        MPIU_Internal_sys_error_printf("pthread_mutex_lock", err__,\
+        MPL_internal_sys_error_printf("pthread_mutex_lock", err__,\
                                        "    %s:%d\n", __FILE__, __LINE__);\
     }                                                          \
     /* FIXME: convert error to an MPIU_THREAD_ERR value */     \
@@ -166,7 +168,7 @@ do {                                                               \
     if (err__)                                                  \
     {                                                           \
         MPIU_DBG_MSG_S(THREAD,TERSE,"  mutex unlock error: %s", MPIU_Strerror(err__));     \
-        MPIU_Internal_sys_error_printf("pthread_mutex_unlock", err__,         \
+        MPL_internal_sys_error_printf("pthread_mutex_unlock", err__,         \
                                        "    %s:%d\n", __FILE__, __LINE__);    \
     }                                                           \
     /* FIXME: convert error to an MPIU_THREAD_ERR value */      \
@@ -194,7 +196,7 @@ do {                                                                    \
     if (err__ && err__ != EBUSY)                                     \
     {                                                                \
         MPIU_DBG_MSG_S(THREAD,TERSE,"  mutex trylock error: %s", MPIU_Strerror(err__));    \
-        MPIU_Internal_sys_error_printf("pthread_mutex_trylock", err__,\
+        MPL_internal_sys_error_printf("pthread_mutex_trylock", err__,\
                                        "    %s:%d\n", __FILE__, __LINE__);\
     }                                                                \
     *(flag_ptr_) = (err__ == 0) ? TRUE : FALSE;                      \
@@ -316,3 +318,5 @@ do {                                                               \
     /* FIXME: convert error to an MPIU_THREAD_ERR value */	\
     *(int *)(err_ptr_) = MPIU_THREAD_SUCCESS;                   \
 } while (0)
+
+#endif /* MPIU_THREAD_POSIX_FUNCS_H_INCLUDED */
diff --git a/src/include/thread/mpiu_thread_posix_types.h b/src/util/thread/mpiu_thread_posix_types.h
similarity index 78%
rename from src/include/thread/mpiu_thread_posix_types.h
rename to src/util/thread/mpiu_thread_posix_types.h
index b9e07b4..4c793a1 100644
--- a/src/include/thread/mpiu_thread_posix_types.h
+++ b/src/util/thread/mpiu_thread_posix_types.h
@@ -4,6 +4,8 @@
  *  (C) 2001 by Argonne National Laboratory.
  *      See COPYRIGHT in top-level directory.
  */
+#ifndef MPIU_THREAD_POSIX_TYPES_H_INCLUDED
+#define MPIU_THREAD_POSIX_TYPES_H_INCLUDED
 
 #include <errno.h>
 #include <pthread.h>
@@ -18,3 +20,5 @@ typedef pthread_t       MPIU_Thread_id_t;
 typedef pthread_key_t   MPIU_Thread_tls_t;
 
 #define MPIU_THREAD_TLS_T_NULL 0
+
+#endif /* MPIU_THREAD_POSIX_TYPES_H_INCLUDED */
diff --git a/src/util/thread/mpiu_thread_solaris.c b/src/util/thread/mpiu_thread_solaris.c
new file mode 100644
index 0000000..abb9717
--- /dev/null
+++ b/src/util/thread/mpiu_thread_solaris.c
@@ -0,0 +1,90 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2001 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+/* common header includes */
+#include <stdlib.h>
+#include "mpichconf.h"  /* defines MPIU_THREAD_PACKAGE_NAME */
+#include "mpl.h"
+#include "mpiutil.h"    /* for HAS_NO_SYMBOLS_WARNING */
+#include "mpiu_thread.h"
+
+MPIU_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
+
+/* This file currently implements these as a preprocessor if/elif/else sequence.
+ * This has the upside of not doing #includes for .c files or (poorly
+ * named) .i files.  It has the downside of making this file large-ish
+ * and a little harder to read in some cases.  If this becomes
+ * unmanagable at some point these should be separated back out into
+ * header files and included as needed. [goodell@ 2009-06-24] */
+
+/* Implementation specific function definitions (usually in the form of macros) */
+
+#if defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_SOLARIS)
+/* begin solaris impl */
+
+/*
+ * struct MPEI_Thread_info
+ *
+ * Structure used to pass the user function and data to the intermediate function, MPEI_Thread_start.  See comment in
+ * MPEI_Thread_start() header for more information.
+ */
+struct MPEI_Thread_info {
+    MPIU_Thread_func_t func;
+    void *data;
+};
+
+
+void *MPEI_Thread_start(void *arg);
+
+
+/*
+ * MPIU_Thread_create()
+ */
+void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t * idp, int *errp)
+{
+    struct MPEI_Thread_info *thread_info;
+    int err = MPIU_THREAD_SUCCESS;
+
+    /* FIXME: faster allocation, or avoid it all together? */
+    thread_info = (struct MPEI_Thread_info *) MPIU_Malloc(sizeof(struct MPEI_Thread_info));
+    if (thread_info != NULL) {
+        thread_info->func = func;
+        thread_info->data = data;
+
+        err = thr_create(NULL, 0, MPEI_Thread_start, thread_info, THR_DETACHED, idp);
+        /* FIXME: convert error to an MPIU_THREAD_ERR value */
+    }
+    else {
+        err = 1000000000;
+    }
+
+    if (errp != NULL) {
+        *errp = err;
+    }
+}
+
+
+/*
+ * MPEI_Thread_start()
+ *
+ * Start functions in Solaris threads are expected to return a void pointer.  Since our start functions do not return a value we
+ * must use an intermediate function to perform call to the user's start function and then return a value of NULL.
+ */
+void *MPEI_Thread_start(void *arg)
+{
+    struct MPEI_Thread_info *thread_info = (struct MPEI_Thread_info *) arg;
+    MPIU_Thread_func_t func = thread_info->func;
+    void *data = thread_info->data;
+
+    MPIU_Free(arg);
+
+    func(data);
+
+    return NULL;
+}
+
+/* end solaris impl */
+#endif
diff --git a/src/include/thread/mpiu_thread_solaris_funcs.h b/src/util/thread/mpiu_thread_solaris_funcs.h
similarity index 98%
rename from src/include/thread/mpiu_thread_solaris_funcs.h
rename to src/util/thread/mpiu_thread_solaris_funcs.h
index 79dece6..dba7b76 100644
--- a/src/include/thread/mpiu_thread_solaris_funcs.h
+++ b/src/util/thread/mpiu_thread_solaris_funcs.h
@@ -4,6 +4,8 @@
  *  (C) 2001 by Argonne National Laboratory.
  *      See COPYRIGHT in top-level directory.
  */
+#ifndef MPIU_THREAD_SOLARIS_FUNCS_H_INCLUDED
+#define MPIU_THREAD_SOLARIS_FUNCS_H_INCLUDED
 
 /*
  * Threads
@@ -224,3 +226,5 @@ do {                                                                       \
 	/* FIXME: convert error to a MPIU_THREAD_ERR value */		\
     }									\
 } while (0)
+
+#endif /* MPIU_THREAD_SOLARIS_FUNCS_H_INCLUDED */
diff --git a/src/include/thread/mpiu_thread_solaris_types.h b/src/util/thread/mpiu_thread_solaris_types.h
similarity index 71%
rename from src/include/thread/mpiu_thread_solaris_types.h
rename to src/util/thread/mpiu_thread_solaris_types.h
index 5c5695b..25530c5 100644
--- a/src/include/thread/mpiu_thread_solaris_types.h
+++ b/src/util/thread/mpiu_thread_solaris_types.h
@@ -5,6 +5,9 @@
  *      See COPYRIGHT in top-level directory.
  */
 
+#ifndef MPIU_THREAD_SOLARIS_TYPES_H_INCLUDED
+#define MPIU_THREAD_SOLARIS_TYPES_H_INCLUDED
+
 #include <thread.h>
 #include <synch.h>
 
@@ -12,3 +15,5 @@ typedef mutex_t MPIU_Thread_mutex_t;
 typedef cond_t MPIU_Thread_cond_t;
 typedef thread_t MPIU_Thread_id_t;
 typedef thread_key_t MPIU_Thread_key_t;
+
+#endif /* MPIU_THREAD_SOLARIS_TYPES_H_INCLUDED */
diff --git a/src/util/thread/mpiu_thread_win.c b/src/util/thread/mpiu_thread_win.c
new file mode 100644
index 0000000..b3c2c35
--- /dev/null
+++ b/src/util/thread/mpiu_thread_win.c
@@ -0,0 +1,398 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2001 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+/* common header includes */
+#include <stdlib.h>
+#include "mpichconf.h"  /* defines MPIU_THREAD_PACKAGE_NAME */
+#include "mpl.h"
+#include "mpiutil.h"    /* for HAS_NO_SYMBOLS_WARNING */
+#include "mpiu_thread.h"
+
+MPIU_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
+
+/* This file currently implements these as a preprocessor if/elif/else sequence.
+ * This has the upside of not doing #includes for .c files or (poorly
+ * named) .i files.  It has the downside of making this file large-ish
+ * and a little harder to read in some cases.  If this becomes
+ * unmanagable at some point these should be separated back out into
+ * header files and included as needed. [goodell@ 2009-06-24] */
+
+/* Implementation specific function definitions (usually in the form of macros) */
+
+#if defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_WIN)
+/* begin win impl */
+
+#include "mpimem.h"
+
+/*
+ * struct MPEI_Thread_info
+ *
+ * Structure used to pass the user function and data to the intermediate function, MPEI_Thread_start.  See comment in
+ * MPEI_Thread_start() header for more information.
+ */
+struct MPEI_Thread_info {
+    MPIU_Thread_func_t func;
+    void *data;
+};
+
+
+DWORD WINAPI MPEI_Thread_start(LPVOID arg);
+
+/*
+ * MPIU_Thread_create()
+ */
+void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t * idp, int *errp)
+{
+    struct MPEI_Thread_info *thread_info;
+    int err = MPIU_THREAD_SUCCESS;
+
+    thread_info = (struct MPEI_Thread_info *) MPIU_Malloc(sizeof(struct MPEI_Thread_info));
+    if (thread_info != NULL) {
+        thread_info->func = func;
+        thread_info->data = data;
+        *idp = CreateThread(NULL, 0, MPEI_Thread_start, thread_info, 0, NULL);
+        if (*idp == NULL) {
+            err = GetLastError();
+        }
+    }
+    else {
+        err = 1000000000;
+    }
+
+    if (errp != NULL) {
+        *errp = err;
+    }
+}
+
+
+/*
+ * MPEI_Thread_start()
+ *
+ * Start functions in Windows are expected to return a DWORD.  Since our start functions do not return a value we must
+ * use an intermediate function to perform the call to the user's start function and then return a value of 0.
+ */
+DWORD WINAPI MPEI_Thread_start(LPVOID arg)
+{
+    struct MPEI_Thread_info *thread_info = (struct MPEI_Thread_info *) arg;
+    MPIU_Thread_func_t func = thread_info->func;
+    void *data = thread_info->data;
+
+    MPIU_Free(arg);
+
+    func(data);
+
+    return 0;
+}
+
+void MPIU_Thread_exit()
+{
+    ExitThread(0);
+}
+
+void MPIU_Thread_self(MPIU_Thread_id_t * id)
+{
+    *id = GetCurrentThread();
+}
+
+void MPIU_Thread_same(MPIU_Thread_id_t * id1, MPIU_Thread_id_t * id2, int *same)
+{
+    *same = (*id1 == *id2) ? TRUE : FALSE;
+}
+
+void MPIU_Thread_yield(MPIU_Thread_mutex_t * mutex)
+{
+    int err;
+
+    MPIU_Thread_mutex_unlock(mutex, &err);
+    Sleep(0);
+    MPIU_Thread_mutex_lock(mutex, &err);
+}
+
+/*
+ *    Mutexes
+ */
+
+void MPIU_Thread_mutex_create(MPIU_Thread_mutex_t * mutex, int *err)
+{
+    *mutex = CreateMutex(NULL, FALSE, NULL);
+    if (err != NULL) {
+        if (*mutex == NULL) {
+            *err = GetLastError();
+        }
+        else {
+            *err = MPIU_THREAD_SUCCESS;
+        }
+    }
+}
+
+void MPIU_Thread_mutex_destroy(MPIU_Thread_mutex_t * mutex, int *err)
+{
+    BOOL result;
+
+    result = CloseHandle(*mutex);
+    if (err != NULL) {
+        if (result) {
+            *err = MPIU_THREAD_SUCCESS;
+        }
+        else {
+            *err = GetLastError();
+        }
+    }
+}
+
+void MPIU_Thread_mutex_lock(MPIU_Thread_mutex_t * mutex, int *err)
+{
+    DWORD result;
+
+    result = WaitForSingleObject(*mutex, INFINITE);
+    if (err != NULL) {
+        if (result == WAIT_OBJECT_0) {
+            *err = MPIU_THREAD_SUCCESS;
+        }
+        else {
+            if (result == WAIT_FAILED) {
+                *err = GetLastError();
+            }
+            else {
+                *err = result;
+            }
+        }
+    }
+}
+
+void MPIU_Thread_mutex_unlock(MPIU_Thread_mutex_t * mutex, int *err)
+{
+    BOOL result;
+
+    result = ReleaseMutex(*mutex);
+    if (err != NULL) {
+        if (result) {
+            *err = MPIU_THREAD_SUCCESS;
+        }
+        else {
+            *err = GetLastError();
+        }
+    }
+}
+
+void MPIU_Thread_mutex_trylock(MPIU_Thread_mutex_t * mutex, int *flag, int *err)
+{
+    DWORD result;
+
+    result = WaitForSingleObject(*mutex, 0);
+    if (result == WAIT_OBJECT_0) {
+        *flag = TRUE;
+        if (err != NULL) {
+            *err = MPIU_THREAD_SUCCESS;
+        }
+    }
+    else {
+        *flag = FALSE;
+        if (err != NULL) {
+            if (result == WAIT_TIMEOUT) {
+                *err = MPIU_THREAD_SUCCESS;
+            }
+            else {
+                if (result == WAIT_FAILED) {
+                    *err = GetLastError();
+                }
+                else {
+                    *err = result;
+                }
+            }
+        }
+    }
+}
+
+/*
+ * Condition Variables
+ */
+
+void MPIU_Thread_cond_create(MPIU_Thread_cond_t * cond, int *err)
+{
+    /* Create a tls slot to store the events used to wakeup each thread in cond_bcast or cond_signal */
+    MPIU_Thread_tls_create(NULL, &cond->tls, err);
+    if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
+        return;
+    }
+    /* Create a mutex to protect the fifo queue.  This is required because the mutex passed in to the
+     * cond functions need not be the same in each thread. */
+    MPIU_Thread_mutex_create(&cond->fifo_mutex, err);
+    if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
+        return;
+    }
+    cond->fifo_head = NULL;
+    cond->fifo_tail = NULL;
+    if (err != NULL) {
+        *err = MPIU_THREAD_SUCCESS;
+    }
+}
+
+void MPIU_Thread_cond_destroy(MPIU_Thread_cond_t * cond, int *err)
+{
+    MPIU_Thread_cond_fifo_t *iter;
+
+    while (cond->fifo_head) {
+        iter = cond->fifo_head;
+        cond->fifo_head = cond->fifo_head->next;
+        MPIU_Free(iter);
+    }
+    MPIU_Thread_mutex_destroy(&cond->fifo_mutex, err);
+    if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
+        return;
+    }
+    MPIU_Thread_tls_destroy(&cond->tls, err);
+    /*
+     * if (err != NULL)
+     * {
+     * *err = MPIU_THREAD_SUCCESS;
+     * }
+     */
+}
+
+void MPIU_Thread_cond_wait(MPIU_Thread_cond_t * cond, MPIU_Thread_mutex_t * mutex, int *err)
+{
+    HANDLE event;
+    DWORD result;
+    MPIU_Thread_tls_get(&cond->tls, &event, err);
+    if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
+        return;
+    }
+    if (event == NULL) {
+        event = CreateEvent(NULL, TRUE, FALSE, NULL);
+        if (event == NULL) {
+            if (err != NULL) {
+                *err = GetLastError();
+            }
+            return;
+        }
+        MPIU_Thread_tls_set(&cond->tls, event, err);
+        if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
+            return;
+        }
+    }
+    MPIU_Thread_mutex_lock(&cond->fifo_mutex, err);
+    if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
+        return;
+    }
+    if (cond->fifo_tail == NULL) {
+        cond->fifo_tail = (MPIU_Thread_cond_fifo_t *) MPIU_Malloc(sizeof(MPIU_Thread_cond_fifo_t));
+        cond->fifo_head = cond->fifo_tail;
+    }
+    else {
+        cond->fifo_tail->next =
+            (MPIU_Thread_cond_fifo_t *) MPIU_Malloc(sizeof(MPIU_Thread_cond_fifo_t));
+        cond->fifo_tail = cond->fifo_tail->next;
+    }
+    if (cond->fifo_tail == NULL) {
+        if (err != NULL) {
+            *err = -1;
+        }
+        return;
+    }
+    cond->fifo_tail->event = event;
+    cond->fifo_tail->next = NULL;
+    MPIU_Thread_mutex_unlock(&cond->fifo_mutex, err);
+    if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
+        return;
+    }
+    MPIU_Thread_mutex_unlock(mutex, err);
+    if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
+        return;
+    }
+    result = WaitForSingleObject(event, INFINITE);
+    if (err != NULL) {
+        if (result != WAIT_OBJECT_0) {
+            if (result == WAIT_FAILED) {
+                *err = GetLastError();
+            }
+            else {
+                *err = result;
+            }
+            return;
+        }
+    }
+    result = ResetEvent(event);
+    if (!result && err != NULL) {
+        *err = GetLastError();
+        return;
+    }
+    MPIU_Thread_mutex_lock(mutex, err);
+    /*
+     * if (err != NULL)
+     * {
+     * *err = MPIU_THREAD_SUCCESS;
+     * }
+     */
+}
+
+void MPIU_Thread_cond_broadcast(MPIU_Thread_cond_t * cond, int *err)
+{
+    MPIU_Thread_cond_fifo_t *fifo, *temp;
+    MPIU_Thread_mutex_lock(&cond->fifo_mutex, err);
+    if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
+        return;
+    }
+    /* remove the fifo queue from the cond variable */
+    fifo = cond->fifo_head;
+    cond->fifo_head = cond->fifo_tail = NULL;
+    MPIU_Thread_mutex_unlock(&cond->fifo_mutex, err);
+    if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
+        return;
+    }
+    /* signal each event in the fifo queue */
+    while (fifo) {
+        if (!SetEvent(fifo->event) && err != NULL) {
+            *err = GetLastError();
+            /* lost memory */
+            return;
+        }
+        temp = fifo;
+        fifo = fifo->next;
+        MPIU_Free(temp);
+    }
+    if (err != NULL) {
+        *err = MPIU_THREAD_SUCCESS;
+    }
+}
+
+void MPIU_Thread_cond_signal(MPIU_Thread_cond_t * cond, int *err)
+{
+    MPIU_Thread_cond_fifo_t *fifo;
+    MPIU_Thread_mutex_lock(&cond->fifo_mutex, err);
+    if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
+        return;
+    }
+    fifo = cond->fifo_head;
+    if (fifo) {
+        cond->fifo_head = cond->fifo_head->next;
+        if (cond->fifo_head == NULL)
+            cond->fifo_tail = NULL;
+    }
+    MPIU_Thread_mutex_unlock(&cond->fifo_mutex, err);
+    if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
+        return;
+    }
+    if (fifo) {
+        if (!SetEvent(fifo->event) && err != NULL) {
+            *err = GetLastError();
+            MPIU_Free(fifo);
+            return;
+        }
+        MPIU_Free(fifo);
+    }
+    if (err != NULL) {
+        *err = MPIU_THREAD_SUCCESS;
+    }
+}
+
+
+/*
+ * Thread Local Storage
+ * - Defined in src/include/thread/mpiu_thread_win_funcs.h
+ */
+/* end win impl */
+#endif
diff --git a/src/include/thread/mpiu_thread_win_funcs.h b/src/util/thread/mpiu_thread_win_funcs.h
similarity index 100%
rename from src/include/thread/mpiu_thread_win_funcs.h
rename to src/util/thread/mpiu_thread_win_funcs.h
diff --git a/src/include/thread/mpiu_thread_win_types.h b/src/util/thread/mpiu_thread_win_types.h
similarity index 86%
rename from src/include/thread/mpiu_thread_win_types.h
rename to src/util/thread/mpiu_thread_win_types.h
index 28c9fab..c5cde26 100644
--- a/src/include/thread/mpiu_thread_win_types.h
+++ b/src/util/thread/mpiu_thread_win_types.h
@@ -11,6 +11,8 @@
  * include hierarchy -- to prevent type redefinition 
  * errors...
  */
+#ifndef MPIU_THREAD_WIN_TYPES_H_INCLUDED
+#define MPIU_THREAD_WIN_TYPES_H_INCLUDED
 
 #define WIN32_LEAN_AND_MEAN
 
@@ -31,3 +33,5 @@ typedef struct MPIU_Thread_cond_t
     MPIU_Thread_mutex_t fifo_mutex;
     MPIU_Thread_cond_fifo_t *fifo_head, *fifo_tail;
 } MPIU_Thread_cond_t;
+
+#endif /* MPIU_THREAD_WIN_TYPES_H_INCLUDED */
diff --git a/src/util/msgs/Makefile.mk b/src/util/type/Makefile.mk
similarity index 53%
rename from src/util/msgs/Makefile.mk
rename to src/util/type/Makefile.mk
index ab7b3f6..cc5b83e 100644
--- a/src/util/msgs/Makefile.mk
+++ b/src/util/type/Makefile.mk
@@ -5,6 +5,7 @@
 ##     See COPYRIGHT in top-level directory.
 ##
 
-mpi_core_sources += \
-    src/util/msgs/msgprint.c
+AM_CPPFLAGS += -I$(top_srcdir)/src/util/type
 
+noinst_HEADERS +=                               \
+    src/util/type/mpiu_type_defs.h
diff --git a/src/util/type/mpiu_type_defs.h b/src/util/type/mpiu_type_defs.h
new file mode 100644
index 0000000..c6990db
--- /dev/null
+++ b/src/util/type/mpiu_type_defs.h
@@ -0,0 +1,104 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2001 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+#if !defined(MPIU_TYPE_DEFS_H_INCLUDED)
+#define MPIU_TYPE_DEFS_H_INCLUDED
+
+#include "mpichconf.h"
+
+/* Basic typedefs */
+#ifdef HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#endif
+
+/* inttypes.h is supposed to include stdint.h but this is here as
+   belt-and-suspenders for platforms that aren't fully compliant */
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
+/* stdint.h gives us fixed-width C99 types like int16_t, among others */
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
+/* stdbool.h gives us the C boolean type */
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+
+/* complex.h gives us the C complex type */
+#ifdef HAVE_COMPLEX_H
+#include <complex.h>
+#endif
+
+#ifdef HAVE_WINDOWS_H
+#include <winsock2.h>
+#include <windows.h>
+#else
+#ifndef BOOL
+#define BOOL int
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#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
+
+#define MPIU_MAX(a,b)    (((a) > (b)) ? (a) : (b))
+#define MPIU_MIN(a,b)    (((a) < (b)) ? (a) : (b))
+
+#include "mpl.h"
+
+typedef MPIU_SIZE_T MPIU_Size_t;
+
+/* Use the MPIU_PtrToXXX macros to convert pointers to and from integer types */
+
+/* The Microsoft compiler will not allow casting of different sized types
+ * without
+ * printing a compiler warning.  Using these macros allows compiler specific
+ * type casting and avoids the warning output.  These macros should only be used
+ * in code that can handle loss of bits.
+ */
+
+/* PtrToAint converts a pointer to an MPI_Aint type, truncating bits if necessary */
+#ifdef HAVE_PTRTOAINT
+#define MPIU_PtrToAint(a) ((MPI_Aint)(INT_PTR) (a))
+#else
+/* 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))
+#endif
+
+/* AintToPtr converts an MPI_Aint to a pointer type, extending bits if necessary */
+#ifdef HAVE_AINTTOPTR
+#define MPIU_AintToPtr(a) ((VOID *)(INT_PTR)((MPI_Aint)a))
+#else
+#define MPIU_AintToPtr(a) (void*)(a)
+#endif
+
+/* 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 MPI_AINT_CAST_TO_VOID_PTR (void *)(MPIU_Pint)
+#define MPI_VOID_PTR_CAST_TO_MPI_AINT (MPI_Aint)(MPIU_Upint)
+#define MPI_PTR_DISP_CAST_TO_MPI_AINT (MPI_Aint)(MPIU_Pint)
+
+#define MPIU_CONTEXT_ID_T_DATATYPE MPI_UINT16_T
+typedef uint16_t MPIU_Context_id_t;
+#define MPIU_INVALID_CONTEXT_ID ((MPIU_Context_id_t)0xffff)
+
+#endif /* !defined(MPIU_TYPE_DEFS_H_INCLUDED) */
diff --git a/src/util/wrappers/mpiu_shm_wrappers.h b/src/util/wrappers/mpiu_shm_wrappers.h
index 0e132c0..2579938 100644
--- a/src/util/wrappers/mpiu_shm_wrappers.h
+++ b/src/util/wrappers/mpiu_shm_wrappers.h
@@ -158,14 +158,14 @@ static inline int MPIU_SHMW_Ghnd_set_uniq(MPIU_SHMW_Hnd_t hnd)
 
 /* Returns -1 on error, 0 on success */
 #define MPIU_SHMW_Ghnd_get_by_val(hnd, str, strlen)  (              \
-    (MPIU_Snprintf(str, strlen, "%s",                               \
+    (MPL_snprintf(str, strlen, "%s",                               \
         MPIU_SHMW_Ghnd_get_by_ref(hnd))) ? 0 : -1                   \
 )
 #define MPIU_SHMW_Ghnd_set_by_ref(hnd, val) ((hnd)->ghnd = val)
 /* Returns -1 on error, 0 on success */
 /* FIXME: What if val is a non-null terminated string ? */
 #define MPIU_SHMW_Ghnd_set_by_val(hnd, fmt, val) (                  \
-    (MPIU_Snprintf(MPIU_SHMW_Ghnd_get_by_ref(hnd),                  \
+    (MPL_snprintf(MPIU_SHMW_Ghnd_get_by_ref(hnd),                  \
         MPIU_SHMW_GHND_SZ, fmt, val)) ? 0 : -1                      \
 )
 
diff --git a/src/util/wrappers/mpiu_sock_wrappers.h b/src/util/wrappers/mpiu_sock_wrappers.h
index a010299..bbb5bf5 100644
--- a/src/util/wrappers/mpiu_sock_wrappers.h
+++ b/src/util/wrappers/mpiu_sock_wrappers.h
@@ -16,9 +16,9 @@
 /* FIXME: Add more comments */
 /* FIXME: Ensure this header is only loaded when needed */
 
+#include "mpl.h"
 #include "mpichconf.h"
 #include "mpi.h"
-#include "mpiiov.h"
 #include "mpierror.h"
 #include "mpierrs.h"
 #include "mpimem.h"
@@ -346,7 +346,7 @@ fn_fail:
 #   undef FCNAME
 #   define FCNAME MPIU_QUOTE(FUNCNAME)
 static inline int MPIU_SOCKW_Readv(MPIU_SOCKW_Sockfd_t sock,
-    MPID_IOV *iov, int iov_cnt, int *nb_rd_ptr)
+    MPL_IOV *iov, int iov_cnt, int *nb_rd_ptr)
 {
     DWORD flags = 0;
     int err;
@@ -376,7 +376,7 @@ fn_fail:
 #   undef FCNAME
 #   define FCNAME MPIU_QUOTE(FUNCNAME)
 static inline int MPIU_SOCKW_Readv_ex(MPIU_SOCKW_Sockfd_t sock,
-    MPID_IOV *iov, int iov_cnt, int *nb_rd_ptr, MPIU_EXOVERLAPPED *ov)
+    MPL_IOV *iov, int iov_cnt, int *nb_rd_ptr, MPIU_EXOVERLAPPED *ov)
 {
     DWORD flags = 0;
     int err;
@@ -451,7 +451,7 @@ fn_fail:
 #   undef FCNAME
 #   define FCNAME MPIU_QUOTE(FUNCNAME)
 static inline int MPIU_SOCKW_Writev_ex(MPIU_SOCKW_Sockfd_t sock,
-    MPID_IOV *iov, int iov_cnt, int *nb_wr_ptr, MPIU_EXOVERLAPPED *ov)
+    MPL_IOV *iov, int iov_cnt, int *nb_wr_ptr, MPIU_EXOVERLAPPED *ov)
 {
     int err;
     int mpi_errno = MPI_SUCCESS;
diff --git a/src/util/wrappers/mpiu_util_wrappers.h b/src/util/wrappers/mpiu_util_wrappers.h
index 4606176..7e2ee54 100644
--- a/src/util/wrappers/mpiu_util_wrappers.h
+++ b/src/util/wrappers/mpiu_util_wrappers.h
@@ -48,7 +48,7 @@ static inline int MPIU_OSW_Get_uniq_str(char *str, int strlen)
 {
     LARGE_INTEGER perfCnt;
     QueryPerformanceCounter(&perfCnt);
-    return(MPIU_Snprintf(str, strlen, "MPICH_NEM_%d_%I64d", 
+    return(MPL_snprintf(str, strlen, "MPICH_NEM_%d_%I64d", 
             GetCurrentThreadId(), (perfCnt.QuadPart)));
 }
 #endif

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

commit f774b97f2f96f278f15beea7035d849b5cc42a39
Author: Pavan Balaji <balaji at anl.gov>
Date:   Mon Aug 10 16:48:45 2015 -0500

    Remove commented out content.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/include/mpiutil.h b/src/include/mpiutil.h
index 32a844a..95fec2f 100644
--- a/src/include/mpiutil.h
+++ b/src/include/mpiutil.h
@@ -237,20 +237,6 @@ int MPIR_Assert_fail_fmt(const char *cond, const char *file_name, int line_num,
  * promotion/truncation/conversion rules in mind.  A discussion of these issues
  * can be found in Chapter 5 of "Secure Coding in C and C++" by Robert Seacord.
  */
-/* this "check for overflow" macro seems buggy in a crazy way that I can't
- * figure out. Instead of using the clever 'expr_inttype_max' macro, fall back
- * to simple "cast and check for obvious overflow" */
-#if 0
-#if defined(expr_inttype_max) && defined(expr_inttype_min)
-#  define MPIU_Assign_trunc(dst_,src_,dst_type_)                                       \
-    do {                                                                               \
-        MPIU_Assert_has_type((dst_), dst_type_);                                       \
-        MPIU_Assert((src_) <= expr_inttype_max(dst_));                                 \
-        MPIU_Assert((src_) >= expr_inttype_min(dst_));                                 \
-        dst_ = (dst_type_)(src_);                                                      \
-    } while (0)
-#endif
-#endif
 #define MPIU_Assign_trunc(dst_,src_,dst_type_)                                         \
     do {                                                                               \
         /* will catch some of the cases if the expr_inttype macros aren't available */ \

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

commit cb5791b230dde33ea71a11a49c5d90720389f4a4
Author: Pavan Balaji <balaji at anl.gov>
Date:   Mon Aug 10 16:36:48 2015 -0500

    Cleanup unnecessary commented out redefinition of MPID_Abort.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index cdf3866..8eb2fb0 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -2669,14 +2669,7 @@ int MPID_Finalize(void);
   MPID_CORE
   @*/
 
-/* FIXME: the 4th argument isn't part of the original design and isn't documented */
-
-# if 0
 int MPID_Abort( MPID_Comm *comm, int mpi_errno, int exit_code, const char *error_msg );
-#endif
-/* FIXME: Should we turn off this flag and only declare MPID_Abort in mpiutil.h? */
-/* We want to also declare MPID_Abort in mpiutil.h if mpiimpl.h is not used */
-#define HAS_MPID_ABORT_DECL
 
 int MPID_Open_port(MPID_Info *, char *);
 int MPID_Close_port(const char *);
diff --git a/src/include/mpiutil.h b/src/include/mpiutil.h
index 2a610f4..32a844a 100644
--- a/src/include/mpiutil.h
+++ b/src/include/mpiutil.h
@@ -26,12 +26,6 @@ cvars:
 === END_MPI_T_CVAR_INFO_BLOCK ===
 */
 
-#ifndef HAS_MPID_ABORT_DECL
-/* FIXME: 4th arg is undocumented and bogus */
-struct MPID_Comm;
-int MPID_Abort( struct MPID_Comm *comm, int mpi_errno, int exit_code, const char *error_msg );
-#endif
-
 /* -------------------------------------------------------------------------- */
 /* detect compiler characteristics from predefined preprocesor tokens */
 

http://git.mpich.org/mpich.git/commitdiff/2b8b1bc46842ae5ec5ed4aad409d7f3e1d90b4c1

commit 2b8b1bc46842ae5ec5ed4aad409d7f3e1d90b4c1
Author: Pavan Balaji <balaji at anl.gov>
Date:   Mon Aug 10 16:35:01 2015 -0500

    Rename MPIR_CVAR_NEMESIS_POLLS_BEFORE_YIELD.
    
    MPIR_CVAR_NEMESIS_POLLS_BEFORE_YIELD is not really a nemesis-level
    CVAR and is wrongly named.  It's used in the upper-level MPI code.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/include/mpiutil.h b/src/include/mpiutil.h
index 97417e2..2a610f4 100644
--- a/src/include/mpiutil.h
+++ b/src/include/mpiutil.h
@@ -10,7 +10,7 @@
 === BEGIN_MPI_T_CVAR_INFO_BLOCK ===
 
 cvars:
-    - name        : MPIR_CVAR_NEMESIS_POLLS_BEFORE_YIELD
+    - name        : MPIR_CVAR_POLLS_BEFORE_YIELD
       category    : NEMESIS
       type        : int
       default     : 1000
@@ -63,7 +63,7 @@ const char *MPIU_Strerror(int errnum);
  * MPIU_Busy_wait()
  *
  * Call this in every busy wait loop to periodically yield the processor.  The
- * MPIR_CVAR_NEMESIS_POLLS_BEFORE_YIELD parameter can be used to adjust the number of
+ * MPIR_CVAR_POLLS_BEFORE_YIELD parameter can be used to adjust the number of
  * times MPIU_Busy_wait is called before the yield function is called.
  */
 #ifdef USE_NOTHING_FOR_YIELD
@@ -74,9 +74,9 @@ const char *MPIU_Strerror(int errnum);
    need to be changed for fine-grained multithreading.  A possible alternative
    is to make it a global thread-local variable. */
 #define MPIU_Busy_wait() do {                                   \
-        if (MPIR_CVAR_NEMESIS_POLLS_BEFORE_YIELD) {                    \
+        if (MPIR_CVAR_POLLS_BEFORE_YIELD) {                    \
             static int poll_count_ = 0;                         \
-            if (poll_count_ >= MPIR_CVAR_NEMESIS_POLLS_BEFORE_YIELD) { \
+            if (poll_count_ >= MPIR_CVAR_POLLS_BEFORE_YIELD) { \
                 poll_count_ = 0;                                \
                 MPIU_PW_Sched_yield();                          \
             } else {                                            \

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

Summary of changes:
 configure.ac                                       |   55 +--
 src/binding/fortran/mpif_h/buildiface              |    6 +-
 src/binding/fortran/mpif_h/mpi_fortimpl.h          |    2 +-
 src/include/Makefile.mk                            |    9 +-
 src/include/glue_romio.h.in                        |    8 +-
 src/include/mpibase.h                              |   51 --
 src/include/mpidbg.h                               |  151 -----
 src/include/mpiimpl.h                              |  287 ++++-----
 src/include/mpiimplthread.h                        |    2 +-
 src/include/mpiimplthreadpost.h                    |   28 +-
 src/include/mpiiov.h                               |   35 --
 src/include/mpimem.h                               |    5 -
 src/include/mpir_type_defs.h                       |   21 +
 src/include/mpitypedefs.h                          |  138 -----
 src/include/mpiu_thread.h                          |  296 ----------
 src/include/mpiutil.h                              |   49 +--
 src/include/thread/Makefile.mk                     |   15 -
 src/include/thread/mpiu_thread_posix_funcs.h       |  318 ----------
 src/include/thread/mpiu_thread_posix_types.h       |   20 -
 src/include/thread/mpiu_thread_solaris_funcs.h     |  226 -------
 src/include/thread/mpiu_thread_solaris_types.h     |   14 -
 src/include/thread/mpiu_thread_win_types.h         |   33 -
 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/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/allgather.c                           |   14 +-
 src/mpi/coll/allgatherv.c                          |   14 +-
 src/mpi/coll/allred_group.c                        |    8 +-
 src/mpi/coll/allreduce.c                           |   16 +-
 src/mpi/coll/alltoall.c                            |   14 +-
 src/mpi/coll/alltoallv.c                           |   18 +-
 src/mpi/coll/alltoallw.c                           |   10 +-
 src/mpi/coll/barrier.c                             |   12 +-
 src/mpi/coll/barrier_group.c                       |    2 +-
 src/mpi/coll/bcast.c                               |   20 +-
 src/mpi/coll/exscan.c                              |    6 +-
 src/mpi/coll/gather.c                              |   16 +-
 src/mpi/coll/gatherv.c                             |    8 +-
 src/mpi/coll/helper_fns.c                          |   20 +-
 src/mpi/coll/iallgather.c                          |    8 +-
 src/mpi/coll/iallgatherv.c                         |    4 +-
 src/mpi/coll/iallreduce.c                          |    4 +-
 src/mpi/coll/ialltoall.c                           |    4 +-
 src/mpi/coll/ialltoallv.c                          |    8 +-
 src/mpi/coll/igather.c                             |    6 +-
 src/mpi/coll/igatherv.c                            |    2 +-
 src/mpi/coll/ired_scat.c                           |    4 +-
 src/mpi/coll/ired_scat_block.c                     |    4 +-
 src/mpi/coll/ireduce.c                             |    8 +-
 src/mpi/coll/iscan.c                               |    4 +-
 src/mpi/coll/iscatter.c                            |    8 +-
 src/mpi/coll/iscatterv.c                           |    2 +-
 src/mpi/coll/red_scat.c                            |   14 +-
 src/mpi/coll/red_scat_block.c                      |   14 +-
 src/mpi/coll/reduce.c                              |   22 +-
 src/mpi/coll/scan.c                                |   12 +-
 src/mpi/coll/scatter.c                             |   18 +-
 src/mpi/coll/scatterv.c                            |    8 +-
 src/mpi/comm/comm_agree.c                          |    2 +-
 src/mpi/comm/comm_create.c                         |    6 +-
 src/mpi/comm/comm_create_group.c                   |    2 +-
 src/mpi/comm/comm_shrink.c                         |    2 +-
 src/mpi/comm/comm_split.c                          |   12 +-
 src/mpi/comm/commutil.c                            |    2 +-
 src/mpi/comm/contextid.c                           |   50 +-
 src/mpi/comm/intercomm_create.c                    |   10 +-
 src/mpi/comm/intercomm_merge.c                     |    6 +-
 src/mpi/comm/mpicomm.h                             |    2 +-
 src/mpi/datatype/pack.c                            |    4 +-
 src/mpi/datatype/pack_external.c                   |    2 +-
 src/mpi/datatype/unpack.c                          |    4 +-
 src/mpi/datatype/unpack_external.c                 |    2 +-
 src/mpi/debugger/dbginit.c                         |    4 +-
 src/mpi/errhan/errutil.c                           |   98 ++--
 src/mpi/init/abort.c                               |    4 +-
 src/mpi/init/finalize.c                            |    2 +-
 src/mpi/init/init.c                                |    2 +-
 src/mpi/rma/alloc_mem.c                            |    2 +-
 src/mpi/romio/adio/ad_gpfs/ad_gpfs_aggrs.c         |   32 +-
 src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c        |    6 +-
 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_iread_coll.c          |    4 +-
 src/mpi/romio/adio/common/ad_iwrite_coll.c         |    2 +-
 src/mpi/romio/adio/common/ad_read_coll.c           |    6 +-
 src/mpi/romio/adio/common/ad_read_str_naive.c      |    6 +-
 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/include/adioi.h                 |    6 +-
 src/mpi/topo/dist_gr_create.c                      |    2 +-
 src/mpi/topo/inhb_allgather.c                      |    2 +-
 src/mpi/topo/inhb_allgatherv.c                     |    2 +-
 src/mpi/topo/inhb_alltoall.c                       |    4 +-
 src/mpi/topo/inhb_alltoallv.c                      |    4 +-
 src/mpi/topo/inhb_alltoallw.c                      |    4 +-
 .../channels/nemesis/include/mpid_nem_datatypes.h  |    2 +-
 .../ch3/channels/nemesis/include/mpid_nem_defs.h   |    2 +-
 .../ch3/channels/nemesis/include/mpid_nem_impl.h   |   32 +-
 .../ch3/channels/nemesis/include/mpid_nem_inline.h |   48 +-
 .../ch3/channels/nemesis/include/mpid_nem_post.h   |   12 +-
 .../ch3/channels/nemesis/include/mpidi_ch3_impl.h  |   18 +-
 .../ch3/channels/nemesis/include/mpidi_ch3_pre.h   |   12 +-
 .../ch3/channels/nemesis/netmod/llc/llc_poll.c     |    8 +-
 .../ch3/channels/nemesis/netmod/llc/llc_probe.c    |   12 +-
 .../ch3/channels/nemesis/netmod/llc/llc_send.c     |   72 ++--
 .../ch3/channels/nemesis/netmod/mxm/mxm_impl.h     |   18 +-
 .../ch3/channels/nemesis/netmod/mxm/mxm_poll.c     |   16 +-
 .../ch3/channels/nemesis/netmod/mxm/mxm_send.c     |   16 +-
 .../ch3/channels/nemesis/netmod/ofi/ofi_init.c     |   10 +-
 .../channels/nemesis/netmod/ofi/ofi_tag_layout.h   |    8 +-
 .../nemesis/netmod/ofi/ofi_tagged_template.c       |    2 +-
 .../channels/nemesis/netmod/portals4/ptl_impl.h    |    6 +-
 .../channels/nemesis/netmod/portals4/ptl_init.c    |    8 +-
 .../ch3/channels/nemesis/netmod/portals4/ptl_lmt.c |    6 +-
 .../ch3/channels/nemesis/netmod/portals4/ptl_nm.c  |    2 +-
 .../channels/nemesis/netmod/portals4/ptl_poll.c    |    2 +-
 .../channels/nemesis/netmod/portals4/ptl_recv.c    |   12 +-
 .../channels/nemesis/netmod/portals4/ptl_send.c    |    8 +-
 .../ch3/channels/nemesis/netmod/portals4/rptl.h    |    4 +-
 src/mpid/ch3/channels/nemesis/netmod/tcp/socksm.c  |   22 +-
 .../ch3/channels/nemesis/netmod/tcp/tcp_init.c     |    4 +-
 .../ch3/channels/nemesis/netmod/tcp/tcp_send.c     |  126 ++--
 src/mpid/ch3/channels/nemesis/src/ch3_isend.c      |    4 +-
 src/mpid/ch3/channels/nemesis/src/ch3_isendv.c     |   32 +-
 src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c  |    4 +-
 src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c |   38 +-
 src/mpid/ch3/channels/nemesis/src/ch3_progress.c   |   26 +-
 src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c    |    6 +-
 src/mpid/ch3/channels/nemesis/src/ch3i_comm.c      |    4 +-
 src/mpid/ch3/channels/nemesis/src/mpid_nem_alloc.c |    8 +-
 src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c  |    2 +-
 src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c   |   58 +-
 .../ch3/channels/nemesis/src/mpid_nem_lmt_dma.c    |   42 +-
 .../ch3/channels/nemesis/src/mpid_nem_lmt_shm.c    |   12 +-
 .../channels/nemesis/src/mpid_nem_lmt_vmsplice.c   |   34 +-
 src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c |   12 +-
 .../ch3/channels/nemesis/utils/monitor/papi_defs.c |    3 +-
 .../channels/nemesis/utils/replacements/mkstemp.c  |    3 +-
 src/mpid/ch3/channels/sock/src/ch3_isend.c         |   10 +-
 src/mpid/ch3/channels/sock/src/ch3_isendv.c        |   38 +-
 src/mpid/ch3/channels/sock/src/ch3_istartmsg.c     |   10 +-
 src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c    |   28 +-
 src/mpid/ch3/channels/sock/src/ch3_progress.c      |   20 +-
 src/mpid/ch3/include/mpid_rma_issue.h              |   30 +-
 src/mpid/ch3/include/mpidimpl.h                    |   14 +-
 src/mpid/ch3/include/mpidpkt.h                     |    2 +-
 src/mpid/ch3/include/mpidpre.h                     |   10 +-
 src/mpid/ch3/src/ch3u_comm.c                       |    2 +-
 src/mpid/ch3/src/ch3u_comm_spawn_multiple.c        |    2 +-
 src/mpid/ch3/src/ch3u_eager.c                      |   30 +-
 src/mpid/ch3/src/ch3u_eagersync.c                  |   10 +-
 src/mpid/ch3/src/ch3u_handle_recv_pkt.c            |   20 +-
 src/mpid/ch3/src/ch3u_handle_recv_req.c            |   66 +-
 src/mpid/ch3/src/ch3u_handle_send_req.c            |    2 +-
 src/mpid/ch3/src/ch3u_port.c                       |   20 +-
 src/mpid/ch3/src/ch3u_recvq.c                      |    4 +-
 src/mpid/ch3/src/ch3u_request.c                    |   30 +-
 src/mpid/ch3/src/ch3u_rma_pkthandler.c             |   66 +-
 src/mpid/ch3/src/ch3u_rma_sync.c                   |    2 +-
 src/mpid/ch3/src/ch3u_rndv.c                       |   10 +-
 src/mpid/ch3/src/ch3u_win_fns.c                    |    2 +-
 src/mpid/ch3/src/mpid_abort.c                      |   10 +-
 src/mpid/ch3/src/mpid_comm_get_all_failed_procs.c  |    2 +-
 src/mpid/ch3/src/mpid_comm_revoke.c                |    6 +-
 src/mpid/ch3/src/mpid_getpname.c                   |    2 +-
 src/mpid/ch3/src/mpid_vc.c                         |   10 +-
 src/mpid/ch3/src/mpidi_pg.c                        |   16 +-
 src/mpid/ch3/src/mpidi_printf.c                    |   38 +-
 src/mpid/ch3/src/mpidi_rma.c                       |    2 +-
 src/mpid/ch3/util/ftb/ftb.c                        |    4 +-
 src/mpid/ch3/util/sock/ch3u_connect_sock.c         |   14 +-
 src/mpid/ch3/util/sock/ch3u_getinterfaces.c        |    2 +-
 src/mpid/ch3/util/sock/ch3usock.h                  |    2 +-
 src/mpid/common/datatype/mpid_dataloop.h           |    8 +-
 src/mpid/common/datatype/mpid_ext32_segment.c      |    4 +-
 src/mpid/common/datatype/mpid_segment.c            |    4 +-
 src/mpid/common/datatype/mpid_type_indexed.c       |    2 +-
 src/mpid/common/datatype/mpid_type_struct.c        |    2 +-
 src/mpid/common/hcoll/hcoll.h                      |    8 +-
 src/mpid/common/hcoll/hcoll_ops.c                  |    8 +-
 src/mpid/common/sched/mpid_sched.c                 |    2 +-
 src/mpid/common/sock/iocp/mpidu_socki.h            |    2 +-
 src/mpid/common/sock/iocp/sock.c                   |   84 ++--
 src/mpid/common/sock/mpidu_sock.h                  |   23 +-
 src/mpid/common/sock/poll/sock.c                   |    4 +-
 src/mpid/common/sock/poll/sock_immed.i             |    8 +-
 src/mpid/common/sock/poll/sock_misc.i              |    4 +-
 src/mpid/common/sock/poll/sock_post.i              |    8 +-
 src/mpid/common/sock/poll/socki_util.i             |   18 +-
 src/mpid/common/thread/Makefile.mk                 |    1 -
 src/mpid/common/thread/mpid_thread.c               |   11 -
 src/mpid/common/thread/mpid_thread.h               |  291 ++++------
 .../pamid/src/coll/allgather/mpido_allgather.c     |    2 +-
 src/mpid/pamid/src/dyntask/mpid_comm_disconnect.c  |    6 +-
 .../pamid/src/dyntask/mpid_comm_spawn_multiple.c   |    2 +-
 src/mpid/pamid/src/dyntask/mpidi_pg.c              |   24 +-
 src/mpid/pamid/src/dyntask/mpidi_port.c            |   18 +-
 src/mpid/pamid/src/misc/mpid_abort.c               |    2 +-
 src/mpid/pamid/src/mpid_finalize.c                 |    2 +-
 src/mpid/pamid/src/onesided/mpid_win_allocate.c    |    2 +-
 .../pamid/src/onesided/mpid_win_allocate_shared.c  |    8 +-
 src/mpid/pamid/src/onesided/mpid_win_create.c      |    6 +-
 .../pamid/src/onesided/mpid_win_create_dynamic.c   |    4 +-
 src/mpid/pamid/src/onesided/mpid_win_fence.c       |    2 +-
 src/mpid/pamid/src/onesided/mpid_win_free.c        |    2 +-
 src/mpid/pamid/src/onesided/mpid_win_set_info.c    |    2 +-
 src/mpl/Makefile.am                                |    9 +-
 src/mpl/include/mpl.h                              |    2 +
 src/mpl/include/mpliov.h                           |   38 ++
 src/mpl/include/mplmsg.h                           |   32 +
 src/mpl/src/mplmsg.c                               |   98 ++++
 src/mutex/mutex_create.c                           |    1 -
 src/mutex/muteximpl.h                              |    3 +-
 src/nameserv/file/file_nameserv.c                  |    2 +-
 src/pm/gforker/mpiexec.c                           |   22 +-
 src/pm/remshell/mpiexec.c                          |   20 +-
 src/pm/util/cmnargs.c                              |   14 +-
 src/pm/util/dbgiface.c                             |    2 +-
 src/pm/util/ioloop.c                               |    2 +-
 src/pm/util/labelout.c                             |   10 +-
 src/pm/util/newsession.c                           |    2 +-
 src/pm/util/pmiport.c                              |   10 +-
 src/pm/util/pmiserv.c                              |   82 ++--
 src/pm/util/pmutil.h                               |    8 +-
 src/pm/util/process.c                              |   38 +-
 src/pm/util/rm.c                                   |    8 +-
 src/pm/util/simple_pmiutil2.c                      |   11 +-
 src/pmi/pmi2/poe/poe2pmi.c                         |    4 +-
 src/pmi/pmi2/simple/pmi2compat.h                   |    4 +-
 src/pmi/simple/simple_pmi.c                        |   52 +-
 src/pmi/simple/simple_pmiutil.c                    |   13 +-
 src/util/Makefile.mk                               |    2 +-
 src/util/dbg/Makefile.mk                           |    8 +-
 src/util/dbg/dbg_printf.c                          |   28 +-
 src/util/dbg/exit.c                                |   24 -
 src/util/dbg/mpidbg.h                              |  152 +++++
 src/util/ex/Makefile.sm                            |    3 +
 src/{include => util/ex}/mpiu_ex.h                 |    0
 src/util/logging/rlog/irlog2rlog.c                 |   42 +-
 src/util/logging/rlog/irlogutil.c                  |   22 +-
 src/util/logging/rlog/rlog.c                       |   13 +-
 src/util/logging/rlog/rlogtime.c                   |    8 +-
 src/util/logging/rlog/rlogutil.c                   |   28 +-
 src/util/mem/Makefile.mk                           |    5 +
 src/util/mem/argstr.c                              |   16 +-
 src/util/mem/check.c                               |    8 +-
 src/util/mem/handlemem.c                           |    2 +-
 src/util/mem/mpiu_strerror.h                       |   15 +
 src/util/msgs/Makefile.mk                          |   10 -
 src/util/msgs/msgprint.c                           |  162 -----
 src/util/multichannel/mpi.c                        |    4 +-
 src/util/other/assert.c                            |    6 +-
 src/util/thread/Makefile.mk                        |   15 +-
 src/util/thread/mpiu_thread.c                      |  615 --------------------
 src/util/thread/mpiu_thread.h                      |  297 ++++++++++
 src/util/thread/mpiu_thread_posix.c                |  104 ++++
 src/util/thread/mpiu_thread_posix_funcs.h          |  322 ++++++++++
 src/util/thread/mpiu_thread_posix_types.h          |   24 +
 src/util/thread/mpiu_thread_solaris.c              |   90 +++
 src/util/thread/mpiu_thread_solaris_funcs.h        |  230 ++++++++
 src/util/thread/mpiu_thread_solaris_types.h        |   19 +
 src/util/thread/mpiu_thread_win.c                  |  398 +++++++++++++
 .../thread/mpiu_thread_win_funcs.h                 |    0
 src/util/thread/mpiu_thread_win_types.h            |   37 ++
 src/util/type/Makefile.mk                          |   11 +
 src/util/type/mpiu_type_defs.h                     |  104 ++++
 src/util/wrappers/mpiu_shm_wrappers.h              |    4 +-
 src/util/wrappers/mpiu_sock_wrappers.h             |    8 +-
 src/util/wrappers/mpiu_util_wrappers.h             |    2 +-
 275 files changed, 3714 insertions(+), 3984 deletions(-)
 delete mode 100644 src/include/mpibase.h
 delete mode 100644 src/include/mpidbg.h
 delete mode 100644 src/include/mpiiov.h
 create mode 100644 src/include/mpir_type_defs.h
 delete mode 100644 src/include/mpitypedefs.h
 delete mode 100644 src/include/mpiu_thread.h
 delete mode 100644 src/include/thread/Makefile.mk
 delete mode 100644 src/include/thread/mpiu_thread_posix_funcs.h
 delete mode 100644 src/include/thread/mpiu_thread_posix_types.h
 delete mode 100644 src/include/thread/mpiu_thread_solaris_funcs.h
 delete mode 100644 src/include/thread/mpiu_thread_solaris_types.h
 delete mode 100644 src/include/thread/mpiu_thread_win_types.h
 delete mode 100644 src/mpid/common/thread/mpid_thread.c
 create mode 100644 src/mpl/include/mpliov.h
 create mode 100644 src/mpl/include/mplmsg.h
 create mode 100644 src/mpl/src/mplmsg.c
 delete mode 100644 src/util/dbg/exit.c
 create mode 100644 src/util/dbg/mpidbg.h
 rename src/{include => util/ex}/mpiu_ex.h (100%)
 create mode 100644 src/util/mem/mpiu_strerror.h
 delete mode 100644 src/util/msgs/Makefile.mk
 delete mode 100644 src/util/msgs/msgprint.c
 delete mode 100644 src/util/thread/mpiu_thread.c
 create mode 100644 src/util/thread/mpiu_thread.h
 create mode 100644 src/util/thread/mpiu_thread_posix.c
 create mode 100644 src/util/thread/mpiu_thread_posix_funcs.h
 create mode 100644 src/util/thread/mpiu_thread_posix_types.h
 create mode 100644 src/util/thread/mpiu_thread_solaris.c
 create mode 100644 src/util/thread/mpiu_thread_solaris_funcs.h
 create mode 100644 src/util/thread/mpiu_thread_solaris_types.h
 create mode 100644 src/util/thread/mpiu_thread_win.c
 rename src/{include => util}/thread/mpiu_thread_win_funcs.h (100%)
 create mode 100644 src/util/thread/mpiu_thread_win_types.h
 create mode 100644 src/util/type/Makefile.mk
 create mode 100644 src/util/type/mpiu_type_defs.h


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list