[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-246-gbdd471a

Service Account noreply at mpich.org
Fri Apr 1 12:56:22 CDT 2016


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

The branch, master has been updated
       via  bdd471a1dfbb0c3aa883e4cad011e2125c602706 (commit)
       via  fb8a302c5211be326be7b624e1a496c6af682747 (commit)
       via  c604e6baf7d465937682f2e3d72f4455c3ce97ab (commit)
       via  74bb0bd8a05d6b5a440af3225da456a4699e5af9 (commit)
       via  40bdb8429f3dc61c2849fe1ac93e3103483d7735 (commit)
      from  54f737a842003d9838c5c48742c410c0befffe14 (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/bdd471a1dfbb0c3aa883e4cad011e2125c602706

commit bdd471a1dfbb0c3aa883e4cad011e2125c602706
Author: Ken Raffenetti <raffenet at mcs.anl.gov>
Date:   Wed Mar 30 09:01:20 2016 -0500

    mpid/common/datatype: provide fallback header
    
    Instead of hardcoding the namespace shift in mpidu_datatype.h, provide
    a "fallback" header than can be included by devices. This adds
    flexibility for devices that may want to selectively include parts of
    the implementation.
    
    Signed-off-by: Yanfei Guo <yguo at anl.gov>

diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index d7703fa..95a2838 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -17,7 +17,7 @@ struct MPID_Request;
 #include <sys/types.h>
 #endif
 
-#include "mpidu_dataloop.h"
+#include "mpid_datatype_fallback.h"
 
 /* FIXME: Include here? */
 #include "opa_primitives.h"
diff --git a/src/mpid/common/datatype/Makefile.mk b/src/mpid/common/datatype/Makefile.mk
index 745d9ac..893a628 100644
--- a/src/mpid/common/datatype/Makefile.mk
+++ b/src/mpid/common/datatype/Makefile.mk
@@ -38,7 +38,8 @@ noinst_HEADERS +=                                 \
     src/mpid/common/datatype/mpidu_dataloop.h      \
     src/mpid/common/datatype/mpidu_datatype.h      \
     src/mpid/common/datatype/mpidu_ext32_segment.h \
-    src/mpid/common/datatype/segment_states.h
+    src/mpid/common/datatype/segment_states.h      \
+    src/mpid/common/datatype/mpid_datatype_fallback.h
 
 endif BUILD_MPID_COMMON_DATATYPE
 
diff --git a/src/mpid/common/datatype/mpid_datatype_fallback.h b/src/mpid/common/datatype/mpid_datatype_fallback.h
new file mode 100644
index 0000000..7731b49
--- /dev/null
+++ b/src/mpid/common/datatype/mpid_datatype_fallback.h
@@ -0,0 +1,75 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2016 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+#ifndef MPID_DATATYPE_FALLBACK_H_INCLUDED
+#define MPID_DATATYPE_FALLBACK_H_INCLUDED
+
+#include "mpidu_datatype.h"
+
+/* Variables */
+#define MPID_Datatype_direct MPIDU_Datatype_direct
+#define MPID_Datatype_builtin MPIDU_Datatype_builtin
+#define MPID_Datatype_mem MPIDU_Datatype_mem
+
+/* Macros */
+#define MPID_DATATYPE_N_BUILTIN MPIDU_DATATYPE_N_BUILTIN
+#define MPID_DTYPE_BEGINNING MPIDU_DTYPE_BEGINNING
+#define MPID_DTYPE_END MPIDU_DTYPE_END
+
+typedef MPIDU_Datatype MPID_Datatype;
+typedef MPIDU_Datatype_contents MPID_Datatype_contents;
+
+#define MPID_Datatype_add_ref MPIDU_Datatype_add_ref
+#define MPID_Datatype_committed_ptr MPIDU_Datatype_committed_ptr
+#define MPID_Datatype_get_basic_size MPIDU_Datatype_get_basic_size
+#define MPID_Datatype_get_basic_type MPIDU_Datatype_get_basic_type
+
+#define MPID_Datatype_get_ptr MPIDU_Datatype_get_ptr
+#define MPID_Datatype_get_size_macro MPIDU_Datatype_get_size_macro
+#define MPID_Datatype_get_extent_macro MPIDU_Datatype_get_extent_macro
+#define MPID_Datatype_is_contig MPIDU_Datatype_is_contig
+#define MPID_Datatype_release MPIDU_Datatype_release
+#define MPID_Datatype_valid_ptr MPIDU_Datatype_valid_ptr
+
+#define MPID_Datatype_get_loopdepth_macro MPIDU_Datatype_get_loopdepth_macro
+#define MPID_Datatype_get_loopptr_macro MPIDU_Datatype_get_loopptr_macro
+#define MPID_Datatype_get_loopsize_macro MPIDU_Datatype_get_loopsize_macro
+#define MPID_Datatype_set_loopdepth_macro MPIDU_Datatype_set_loopdepth_macro
+#define MPID_Datatype_set_loopptr_macro MPIDU_Datatype_set_loopptr_macro
+#define MPID_Datatype_set_loopsize_macro MPIDU_Datatype_set_loopsize_macro
+
+#define MPID_Datatype_free MPIDU_Datatype_free
+#define MPID_Datatype_free_contents MPIDU_Datatype_free_contents
+#define MPID_Datatype_set_contents MPIDU_Datatype_set_contents
+#define MPID_Datatype_size_external32 MPIDU_Datatype_size_external32
+
+/* MPID_Segment */
+typedef struct DLOOP_Segment MPID_Segment; /* MPIDU_Segment */
+
+#define MPID_Segment_init MPIDU_Segment_init
+#define MPID_Segment_alloc MPIDU_Segment_alloc
+#define MPID_Segment_free MPIDU_Segment_free
+#define MPID_Segment_pack MPIDU_Segment_pack
+#define MPID_Segment_unpack MPIDU_Segment_unpack
+#define MPID_Segment_pack_external32 MPIDU_Segment_pack_external32
+#define MPID_Segment_unpack_external32 MPIDU_Segment_unpack_external32
+
+/* MPID_Type */
+#define MPID_Type_access_contents MPIDU_Type_access_contents
+#define MPID_Type_blockindexed MPIDU_Type_blockindexed
+#define MPID_Type_commit MPIDU_Type_commit
+#define MPID_Type_contiguous MPIDU_Type_contiguous
+#define MPID_Type_create_pairtype MPIDU_Type_create_pairtype
+#define MPID_Type_create_resized MPIDU_Type_create_resized
+#define MPID_Type_dup MPIDU_Type_dup
+#define MPID_Type_get_contents MPIDU_Type_get_contents
+#define MPID_Type_get_envelope MPIDU_Type_get_envelope
+#define MPID_Type_indexed MPIDU_Type_indexed
+#define MPID_Type_release_contents MPIDU_Type_release_contents
+#define MPID_Type_struct MPIDU_Type_struct
+#define MPID_Type_vector MPIDU_Type_vector
+#define MPID_Type_zerolen MPIDU_Type_zerolen
+
+#endif /* MPiD_DATATYPE_FALLBACK_H_INCLUDED */
diff --git a/src/mpid/common/datatype/mpidu_datatype.h b/src/mpid/common/datatype/mpidu_datatype.h
index 8a98ba0..1b65896 100644
--- a/src/mpid/common/datatype/mpidu_datatype.h
+++ b/src/mpid/common/datatype/mpidu_datatype.h
@@ -753,72 +753,5 @@ void MPIDU_Type_release_contents(MPI_Datatype type,
 				MPI_Aint **aints_p,
 				MPI_Datatype **types_p);
 
-/* FIXME:Temorary coversion for compatibility in MPI layer
- * These should be eventially put in mpid/include/mpid.h
- */
-/* Variables */
-#define MPID_Datatype_direct MPIDU_Datatype_direct
-#define MPID_Datatype_builtin MPIDU_Datatype_builtin
-#define MPID_Datatype_mem MPIDU_Datatype_mem
-
-/* Macros */
-#define MPID_DATATYPE_N_BUILTIN MPIDU_DATATYPE_N_BUILTIN
-#define MPID_DTYPE_BEGINNING MPIDU_DTYPE_BEGINNING
-#define MPID_DTYPE_END MPIDU_DTYPE_END
-
-typedef MPIDU_Datatype MPID_Datatype;
-typedef MPIDU_Datatype_contents MPID_Datatype_contents;
-
-#define MPID_Datatype_add_ref MPIDU_Datatype_add_ref
-#define MPID_Datatype_committed_ptr MPIDU_Datatype_committed_ptr
-#define MPID_Datatype_get_basic_size MPIDU_Datatype_get_basic_size
-#define MPID_Datatype_get_basic_type MPIDU_Datatype_get_basic_type
-
-#define MPID_Datatype_get_ptr MPIDU_Datatype_get_ptr
-#define MPID_Datatype_get_size_macro MPIDU_Datatype_get_size_macro
-#define MPID_Datatype_get_extent_macro MPIDU_Datatype_get_extent_macro
-#define MPID_Datatype_is_contig MPIDU_Datatype_is_contig
-#define MPID_Datatype_release MPIDU_Datatype_release
-#define MPID_Datatype_valid_ptr MPIDU_Datatype_valid_ptr
-
-#define MPID_Datatype_get_loopdepth_macro MPIDU_Datatype_get_loopdepth_macro
-#define MPID_Datatype_get_loopptr_macro MPIDU_Datatype_get_loopptr_macro
-#define MPID_Datatype_get_loopsize_macro MPIDU_Datatype_get_loopsize_macro
-#define MPID_Datatype_set_loopdepth_macro MPIDU_Datatype_set_loopdepth_macro
-#define MPID_Datatype_set_loopptr_macro MPIDU_Datatype_set_loopptr_macro
-#define MPID_Datatype_set_loopsize_macro MPIDU_Datatype_set_loopsize_macro
-
-#define MPID_Datatype_free MPIDU_Datatype_free
-#define MPID_Datatype_free_contents MPIDU_Datatype_free_contents
-#define MPID_Datatype_set_contents MPIDU_Datatype_set_contents
-#define MPID_Datatype_size_external32 MPIDU_Datatype_size_external32
-
-/* MPID_Segment */
-typedef struct DLOOP_Segment MPID_Segment; /* MPIDU_Segment */
-
-#define MPID_Segment_init MPIDU_Segment_init
-#define MPID_Segment_alloc MPIDU_Segment_alloc
-#define MPID_Segment_free MPIDU_Segment_free
-#define MPID_Segment_pack MPIDU_Segment_pack
-#define MPID_Segment_unpack MPIDU_Segment_unpack
-#define MPID_Segment_pack_external32 MPIDU_Segment_pack_external32
-#define MPID_Segment_unpack_external32 MPIDU_Segment_unpack_external32
-
-/* MPID_Type */
-#define MPID_Type_access_contents MPIDU_Type_access_contents
-#define MPID_Type_blockindexed MPIDU_Type_blockindexed
-#define MPID_Type_commit MPIDU_Type_commit
-#define MPID_Type_contiguous MPIDU_Type_contiguous
-#define MPID_Type_create_pairtype MPIDU_Type_create_pairtype
-#define MPID_Type_create_resized MPIDU_Type_create_resized
-#define MPID_Type_dup MPIDU_Type_dup
-#define MPID_Type_get_contents MPIDU_Type_get_contents
-#define MPID_Type_get_envelope MPIDU_Type_get_envelope
-#define MPID_Type_indexed MPIDU_Type_indexed
-#define MPID_Type_release_contents MPIDU_Type_release_contents
-#define MPID_Type_struct MPIDU_Type_struct
-#define MPID_Type_vector MPIDU_Type_vector
-#define MPID_Type_zerolen MPIDU_Type_zerolen
-
 /* end of file */
 #endif
diff --git a/src/mpid/pamid/include/mpidpre.h b/src/mpid/pamid/include/mpidpre.h
index e6ab858..6df54a6 100644
--- a/src/mpid/pamid/include/mpidpre.h
+++ b/src/mpid/pamid/include/mpidpre.h
@@ -34,7 +34,7 @@
 #include <unistd.h>
 
 #include "mpiimpl.h"
-#include "mpidu_dataloop.h"
+#include "mpid_datatype_fallback.h"
 #include <pami.h>
 
 /* provides "pre" typedefs and such for NBC scheduling mechanism */

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

commit fb8a302c5211be326be7b624e1a496c6af682747
Author: Ken Raffenetti <raffenet at mcs.anl.gov>
Date:   Wed Mar 30 08:59:19 2016 -0500

    mpid/common/datatype: explicitly include mpiimpl.h
    
    mpidu_contents_support.c uses some MPIR functionality exposed in mpiimpl.h.
    Explicity include that header to avoid build issues.
    
    Signed-off-by: Yanfei Guo <yguo at anl.gov>

diff --git a/src/mpid/common/datatype/mpidu_contents_support.c b/src/mpid/common/datatype/mpidu_contents_support.c
index ffe977f..aded1d3 100644
--- a/src/mpid/common/datatype/mpidu_contents_support.c
+++ b/src/mpid/common/datatype/mpidu_contents_support.c
@@ -6,6 +6,7 @@
  */
 
 #include <mpi.h>
+#include <mpiimpl.h>
 #include <mpidu_datatype.h>
 
 void MPIDU_Type_access_contents(MPI_Datatype type,

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

commit c604e6baf7d465937682f2e3d72f4455c3ce97ab
Author: Yanfei Guo <yguo at anl.gov>
Date:   Mon Dec 21 14:37:47 2015 -0600

    mpid/common/datatype: Rename mpid_ files to have mpidu_ prefix
    
    All the references to the renamed files are updated. This include codes,
    configure.ac, Makefile.mk, and .gitignore.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/.gitignore b/.gitignore
index 97a978d..53606ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -480,8 +480,8 @@ Makefile.am-stamp
 /src/include/mpif.h
 #/src/include/mpe_thread.h
 /src/include/mpimod.pcl
-/src/include/mpid_datatype.h
-/src/include/mpid_dataloop.h
+/src/include/mpidu_datatype.h
+/src/include/mpidu_dataloop.h
 /src/include/gen_dataloop.h
 /src/include/mpich2info.h
 /src/include/mpio.h
diff --git a/configure.ac b/configure.ac
index 0c2a789..be61b85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3108,7 +3108,7 @@ system; this program outputs an appropriate file for the --with-cross option])
     #
     # Take len and turn it into two hex digits (there are 8 bits available
     # in the built-in datatype handle for the length; see
-    # src/mpid/common/datatype/mpid_datatype.h)
+    # src/mpid/common/datatype/mpidu_datatype.h)
     if test "$len" -gt 255 ; then
          AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type $type is $len bytes)]) 
     fi
@@ -3510,7 +3510,7 @@ if test "$enable_f77" = yes ; then
     #
     # Take len and turn it into two hex digits (there are 8 bits available
     # in the built-in datatype handle for the length; see
-    # src/mpid/common/datatype/mpid_datatype.h).  This code is taken
+    # src/mpid/common/datatype/mpidu_datatype.h).  This code is taken
     # from the code in mpich/configure.ac 
     if test "$len" -gt 255 ; then
         AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type INTEGER is $len bytes)]) 
@@ -3557,7 +3557,7 @@ if test "$enable_f77" = yes ; then
     #
     # Take len and turn it into two hex digits (there are 8 bits available
     # in the built-in datatype handle for the length; see
-    # src/mpid/common/datatype/mpid_datatype.h).  This code is taken
+    # src/mpid/common/datatype/mpidu_datatype.h).  This code is taken
     # from the code in mpich/configure.ac 
     if test "$len" -gt 255 ; then
         AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type DOUBLE is $len bytes)]) 
@@ -3695,7 +3695,7 @@ dnl     len=$len_doublecplx
 dnl     #
 dnl     # Take len and turn it into two hex digits (there are 8 bits available
 dnl     # in the built-in datatype handle for the length; see
-dnl     # src/mpid/common/datatype/mpid_datatype.h).  This code is taken
+dnl     # src/mpid/common/datatype/mpidu_datatype.h).  This code is taken
 dnl     # from the code in mpich/configure.ac 
 dnl     if test "$len" -gt 255 ; then
 dnl         AC_MSG_ERROR([Type sizes greater than 255 bytes are not supported (type DOUBLE COMPLEX is $len bytes)]) 
diff --git a/src/mpid/ch3/include/mpidpost.h b/src/mpid/ch3/include/mpidpost.h
index 5e97ecf..3159e22 100644
--- a/src/mpid/ch3/include/mpidpost.h
+++ b/src/mpid/ch3/include/mpidpost.h
@@ -138,7 +138,7 @@ int MPIDI_CH3_Comm_connect(char * port_name, int root, MPID_Comm * comm_ptr,
    (mpiimpl.h). */
 #include "mpidi_ch3_post.h"
 
-#include "mpid_datatype.h"
+#include "mpidu_datatype.h"
 
 /*
  * Request utility macros (public - can be used in MPID macros)
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 8870cfd..d7703fa 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -17,7 +17,7 @@ struct MPID_Request;
 #include <sys/types.h>
 #endif
 
-#include "mpid_dataloop.h"
+#include "mpidu_dataloop.h"
 
 /* FIXME: Include here? */
 #include "opa_primitives.h"
diff --git a/src/mpid/common/datatype/Makefile.mk b/src/mpid/common/datatype/Makefile.mk
index fd61cc1..745d9ac 100644
--- a/src/mpid/common/datatype/Makefile.mk
+++ b/src/mpid/common/datatype/Makefile.mk
@@ -10,34 +10,34 @@ if BUILD_MPID_COMMON_DATATYPE
 include $(top_srcdir)/src/mpid/common/datatype/dataloop/Makefile.mk
 
 mpi_core_sources +=                          \
-    src/mpid/common/datatype/mpid_contents_support.c       \
-    src/mpid/common/datatype/mpid_datatype_contents.c      \
-    src/mpid/common/datatype/mpid_datatype_free.c          \
-    src/mpid/common/datatype/mpid_ext32_datatype.c         \
-    src/mpid/common/datatype/mpid_ext32_segment.c          \
-    src/mpid/common/datatype/mpid_segment.c                \
-    src/mpid/common/datatype/mpid_type_blockindexed.c      \
-    src/mpid/common/datatype/mpid_type_commit.c            \
-    src/mpid/common/datatype/mpid_type_contiguous.c        \
-    src/mpid/common/datatype/mpid_type_create_pairtype.c   \
-    src/mpid/common/datatype/mpid_type_create_resized.c    \
-    src/mpid/common/datatype/mpid_type_debug.c             \
-    src/mpid/common/datatype/mpid_type_dup.c               \
-    src/mpid/common/datatype/mpid_type_get_contents.c      \
-    src/mpid/common/datatype/mpid_type_get_envelope.c      \
-    src/mpid/common/datatype/mpid_type_indexed.c           \
-    src/mpid/common/datatype/mpid_type_struct.c            \
-    src/mpid/common/datatype/mpid_type_vector.c            \
-    src/mpid/common/datatype/mpid_type_zerolen.c           \
+    src/mpid/common/datatype/mpidu_contents_support.c       \
+    src/mpid/common/datatype/mpidu_datatype_contents.c      \
+    src/mpid/common/datatype/mpidu_datatype_free.c          \
+    src/mpid/common/datatype/mpidu_ext32_datatype.c         \
+    src/mpid/common/datatype/mpidu_ext32_segment.c          \
+    src/mpid/common/datatype/mpidu_segment.c                \
+    src/mpid/common/datatype/mpidu_type_blockindexed.c      \
+    src/mpid/common/datatype/mpidu_type_commit.c            \
+    src/mpid/common/datatype/mpidu_type_contiguous.c        \
+    src/mpid/common/datatype/mpidu_type_create_pairtype.c   \
+    src/mpid/common/datatype/mpidu_type_create_resized.c    \
+    src/mpid/common/datatype/mpidu_type_debug.c             \
+    src/mpid/common/datatype/mpidu_type_dup.c               \
+    src/mpid/common/datatype/mpidu_type_get_contents.c      \
+    src/mpid/common/datatype/mpidu_type_get_envelope.c      \
+    src/mpid/common/datatype/mpidu_type_indexed.c           \
+    src/mpid/common/datatype/mpidu_type_struct.c            \
+    src/mpid/common/datatype/mpidu_type_vector.c            \
+    src/mpid/common/datatype/mpidu_type_zerolen.c           \
     src/mpid/common/datatype/mpir_type_flatten.c
 
 # there are no AC_OUTPUT_FILES headers, so builddir is unnecessary
 AM_CPPFLAGS += -I$(top_srcdir)/src/mpid/common/datatype
 
 noinst_HEADERS +=                                 \
-    src/mpid/common/datatype/mpid_dataloop.h      \
-    src/mpid/common/datatype/mpid_datatype.h      \
-    src/mpid/common/datatype/mpid_ext32_segment.h \
+    src/mpid/common/datatype/mpidu_dataloop.h      \
+    src/mpid/common/datatype/mpidu_datatype.h      \
+    src/mpid/common/datatype/mpidu_ext32_segment.h \
     src/mpid/common/datatype/segment_states.h
 
 endif BUILD_MPID_COMMON_DATATYPE
diff --git a/src/mpid/common/datatype/dataloop/dataloop.c b/src/mpid/common/datatype/dataloop/dataloop.c
index 420c0f5..f18257d 100644
--- a/src/mpid/common/datatype/dataloop/dataloop.c
+++ b/src/mpid/common/datatype/dataloop/dataloop.c
@@ -24,8 +24,8 @@
  * makes it somewhat easier to copy these subtrees around.  Keep this in mind
  * when looking at the functions below.
  *
- * The structures used in this file are defined in mpid_datatype.h.  There is
- * no separate mpid_dataloop.h at this time.
+ * The structures used in this file are defined in mpidu_datatype.h.  There is
+ * no separate mpidu_dataloop.h at this time.
  *
  * OPTIMIZATIONS:
  *
diff --git a/src/mpid/common/datatype/dataloop/dataloop.h b/src/mpid/common/datatype/dataloop/dataloop.h
index 2a16e96..cdfd5fd 100644
--- a/src/mpid/common/datatype/dataloop/dataloop.h
+++ b/src/mpid/common/datatype/dataloop/dataloop.h
@@ -13,7 +13,7 @@
 #define DATALOOP_H
 
 /* This is specific to MPICH */
-#include "mpid_dataloop.h"
+#include "mpidu_dataloop.h"
 #include "mpiimpl.h"
 
 #endif
diff --git a/src/mpid/common/datatype/mpid_contents_support.c b/src/mpid/common/datatype/mpidu_contents_support.c
similarity index 98%
rename from src/mpid/common/datatype/mpid_contents_support.c
rename to src/mpid/common/datatype/mpidu_contents_support.c
index 7a85542..ffe977f 100644
--- a/src/mpid/common/datatype/mpid_contents_support.c
+++ b/src/mpid/common/datatype/mpidu_contents_support.c
@@ -6,7 +6,7 @@
  */
 
 #include <mpi.h>
-#include <mpid_datatype.h>
+#include <mpidu_datatype.h>
 
 void MPIDU_Type_access_contents(MPI_Datatype type,
 			       int **ints_p,
diff --git a/src/mpid/common/datatype/mpid_dataloop.h b/src/mpid/common/datatype/mpidu_dataloop.h
similarity index 98%
rename from src/mpid/common/datatype/mpid_dataloop.h
rename to src/mpid/common/datatype/mpidu_dataloop.h
index f3f0a63..1d68e49 100644
--- a/src/mpid/common/datatype/mpid_dataloop.h
+++ b/src/mpid/common/datatype/mpidu_dataloop.h
@@ -5,8 +5,8 @@
  *      See COPYRIGHT in top-level directory.
  */
 
-#ifndef MPID_DATALOOP_H
-#define MPID_DATALOOP_H
+#ifndef MPIDU_DATALOOP_H
+#define MPIDU_DATALOOP_H
 
 #include <mpi.h>
 
diff --git a/src/mpid/common/datatype/mpid_datatype.h b/src/mpid/common/datatype/mpidu_datatype.h
similarity index 99%
rename from src/mpid/common/datatype/mpid_datatype.h
rename to src/mpid/common/datatype/mpidu_datatype.h
index b648bb2..8a98ba0 100644
--- a/src/mpid/common/datatype/mpid_datatype.h
+++ b/src/mpid/common/datatype/mpidu_datatype.h
@@ -3,16 +3,16 @@
  *  (C) 2001 by Argonne National Laboratory.
  *      See COPYRIGHT in top-level directory.
  */
-#ifndef MPID_DATATYPE_H
-#define MPID_DATATYPE_H
+#ifndef MPIDU_DATATYPE_H
+#define MPIDU_DATATYPE_H
 
 #include "mpiimpl.h"
-#include "mpid_dataloop.h"
+#include "mpidu_dataloop.h"
 #include "mpihandlemem.h"
 
 /* NOTE: 
  * - struct MPIDU_Dataloop and MPIDU_Segment are defined in 
- *   src/mpid/common/datatype/mpid_dataloop.h (and gen_dataloop.h).
+ *   src/mpid/common/datatype/mpidu_dataloop.h (and gen_dataloop.h).
  * - MPIU_Object_alloc_t is defined in src/include/mpihandle.h
  */
 
diff --git a/src/mpid/common/datatype/mpid_datatype_contents.c b/src/mpid/common/datatype/mpidu_datatype_contents.c
similarity index 99%
rename from src/mpid/common/datatype/mpid_datatype_contents.c
rename to src/mpid/common/datatype/mpidu_datatype_contents.c
index 2625b88..8aacd83 100644
--- a/src/mpid/common/datatype/mpid_datatype_contents.c
+++ b/src/mpid/common/datatype/mpidu_datatype_contents.c
@@ -6,7 +6,7 @@
  */
 
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 #include <stdlib.h>
 #include <limits.h>
 
diff --git a/src/mpid/common/datatype/mpid_datatype_free.c b/src/mpid/common/datatype/mpidu_datatype_free.c
similarity index 98%
rename from src/mpid/common/datatype/mpid_datatype_free.c
rename to src/mpid/common/datatype/mpidu_datatype_free.c
index 293a4c9..2aa72c0 100644
--- a/src/mpid/common/datatype/mpid_datatype_free.c
+++ b/src/mpid/common/datatype/mpidu_datatype_free.c
@@ -5,7 +5,7 @@
  *      See COPYRIGHT in top-level directory.
  */
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 #include <stdlib.h>
 #include <limits.h>
 
diff --git a/src/mpid/common/datatype/mpid_ext32_datatype.c b/src/mpid/common/datatype/mpidu_ext32_datatype.c
similarity index 98%
rename from src/mpid/common/datatype/mpid_ext32_datatype.c
rename to src/mpid/common/datatype/mpidu_ext32_datatype.c
index 0311917..155410d 100644
--- a/src/mpid/common/datatype/mpid_ext32_datatype.c
+++ b/src/mpid/common/datatype/mpidu_ext32_datatype.c
@@ -10,7 +10,7 @@
 
 #include <mpichconf.h>
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 
 
 typedef struct external32_basic_size
diff --git a/src/mpid/common/datatype/mpid_ext32_segment.c b/src/mpid/common/datatype/mpidu_ext32_segment.c
similarity index 99%
rename from src/mpid/common/datatype/mpid_ext32_segment.c
rename to src/mpid/common/datatype/mpidu_ext32_segment.c
index 2101dda..be87991 100644
--- a/src/mpid/common/datatype/mpid_ext32_segment.c
+++ b/src/mpid/common/datatype/mpidu_ext32_segment.c
@@ -10,12 +10,12 @@
 
 #include <mpichconf.h>
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 
 #undef MPID_SP_VERBOSE
 #undef MPID_SU_VERBOSE
 
-#include "mpid_ext32_segment.h"
+#include "mpidu_ext32_segment.h"
 
 /* MPIDU_Segment_piece_params
  *
diff --git a/src/mpid/common/datatype/mpid_ext32_segment.h b/src/mpid/common/datatype/mpidu_ext32_segment.h
similarity index 99%
rename from src/mpid/common/datatype/mpid_ext32_segment.h
rename to src/mpid/common/datatype/mpidu_ext32_segment.h
index f643e3f..b4e853f 100644
--- a/src/mpid/common/datatype/mpid_ext32_segment.h
+++ b/src/mpid/common/datatype/mpidu_ext32_segment.h
@@ -4,8 +4,8 @@
  *      See COPYRIGHT in top-level directory.
  */
 
-#ifndef MPIDEXT32SEGMENT_H
-#define MPIDEXT32SEGMENT_H
+#ifndef MPIDUEXT32SEGMENT_H
+#define MPIDUEXT32SEGMENT_H
 
 #include "mpichconf.h"
 
diff --git a/src/mpid/common/datatype/mpid_segment.c b/src/mpid/common/datatype/mpidu_segment.c
similarity index 99%
rename from src/mpid/common/datatype/mpid_segment.c
rename to src/mpid/common/datatype/mpidu_segment.c
index 8cf4d85..783db7e 100644
--- a/src/mpid/common/datatype/mpid_segment.c
+++ b/src/mpid/common/datatype/mpidu_segment.c
@@ -9,7 +9,7 @@
 #include <stdlib.h>
 
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 
 /*
  * Define these two names to enable debugging output.
diff --git a/src/mpid/common/datatype/mpid_type_blockindexed.c b/src/mpid/common/datatype/mpidu_type_blockindexed.c
similarity index 99%
rename from src/mpid/common/datatype/mpid_type_blockindexed.c
rename to src/mpid/common/datatype/mpidu_type_blockindexed.c
index 274db4d..89f8d58 100644
--- a/src/mpid/common/datatype/mpid_type_blockindexed.c
+++ b/src/mpid/common/datatype/mpidu_type_blockindexed.c
@@ -6,7 +6,7 @@
  */
 
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 #include <stdlib.h>
 
 #undef MPID_TYPE_ALLOC_DEBUG
diff --git a/src/mpid/common/datatype/mpid_type_commit.c b/src/mpid/common/datatype/mpidu_type_commit.c
similarity index 98%
rename from src/mpid/common/datatype/mpid_type_commit.c
rename to src/mpid/common/datatype/mpidu_type_commit.c
index 1764ef4..f78bd08 100644
--- a/src/mpid/common/datatype/mpid_type_commit.c
+++ b/src/mpid/common/datatype/mpidu_type_commit.c
@@ -5,7 +5,7 @@
  *      See COPYRIGHT in top-level directory.
  */
 
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 #include <stdlib.h>
 
 /*@
diff --git a/src/mpid/common/datatype/mpid_type_contiguous.c b/src/mpid/common/datatype/mpidu_type_contiguous.c
similarity index 99%
rename from src/mpid/common/datatype/mpid_type_contiguous.c
rename to src/mpid/common/datatype/mpidu_type_contiguous.c
index fb0b481..64f663d 100644
--- a/src/mpid/common/datatype/mpid_type_contiguous.c
+++ b/src/mpid/common/datatype/mpidu_type_contiguous.c
@@ -6,7 +6,7 @@
  */
 
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 #include <stdlib.h>
 
 /* #define MPID_TYPE_ALLOC_DEBUG */
diff --git a/src/mpid/common/datatype/mpid_type_create_pairtype.c b/src/mpid/common/datatype/mpidu_type_create_pairtype.c
similarity index 99%
rename from src/mpid/common/datatype/mpid_type_create_pairtype.c
rename to src/mpid/common/datatype/mpidu_type_create_pairtype.c
index ef83d0e..7b57e6c 100644
--- a/src/mpid/common/datatype/mpid_type_create_pairtype.c
+++ b/src/mpid/common/datatype/mpidu_type_create_pairtype.c
@@ -6,7 +6,7 @@
  */
 
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 #include <stdlib.h>
 #include <limits.h>
 
diff --git a/src/mpid/common/datatype/mpid_type_create_resized.c b/src/mpid/common/datatype/mpidu_type_create_resized.c
similarity index 99%
rename from src/mpid/common/datatype/mpid_type_create_resized.c
rename to src/mpid/common/datatype/mpidu_type_create_resized.c
index 16a4545..6ca3c06 100644
--- a/src/mpid/common/datatype/mpid_type_create_resized.c
+++ b/src/mpid/common/datatype/mpidu_type_create_resized.c
@@ -6,7 +6,7 @@
  */
 
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 #include <stdlib.h>
 
 /* #define MPID_TYPE_ALLOC_DEBUG */
diff --git a/src/mpid/common/datatype/mpid_type_debug.c b/src/mpid/common/datatype/mpidu_type_debug.c
similarity index 99%
rename from src/mpid/common/datatype/mpid_type_debug.c
rename to src/mpid/common/datatype/mpidu_type_debug.c
index 31872b3..21cd000 100644
--- a/src/mpid/common/datatype/mpid_type_debug.c
+++ b/src/mpid/common/datatype/mpidu_type_debug.c
@@ -6,7 +6,7 @@
  */
 
 #include "mpiimpl.h"
-#include "mpid_dataloop.h"
+#include "mpidu_dataloop.h"
 #include <stdlib.h>
 #include <limits.h>
 
diff --git a/src/mpid/common/datatype/mpid_type_dup.c b/src/mpid/common/datatype/mpidu_type_dup.c
similarity index 99%
rename from src/mpid/common/datatype/mpid_type_dup.c
rename to src/mpid/common/datatype/mpidu_type_dup.c
index 13349ac..2a6f3cb 100644
--- a/src/mpid/common/datatype/mpid_type_dup.c
+++ b/src/mpid/common/datatype/mpidu_type_dup.c
@@ -6,7 +6,7 @@
  */
 
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 #include <stdlib.h>
 
 #undef FCNAME
diff --git a/src/mpid/common/datatype/mpid_type_get_contents.c b/src/mpid/common/datatype/mpidu_type_get_contents.c
similarity index 97%
rename from src/mpid/common/datatype/mpid_type_get_contents.c
rename to src/mpid/common/datatype/mpidu_type_get_contents.c
index 5592cb4..84ded31 100644
--- a/src/mpid/common/datatype/mpid_type_get_contents.c
+++ b/src/mpid/common/datatype/mpidu_type_get_contents.c
@@ -7,8 +7,8 @@
 
 #include <mpi.h>
 #include <mpiimpl.h>
-#include <mpid_datatype.h>
-#include <mpid_dataloop.h>
+#include <mpidu_datatype.h>
+#include <mpidu_dataloop.h>
 
 /*@
   MPIDU_Type_get_contents - get content information from datatype
diff --git a/src/mpid/common/datatype/mpid_type_get_envelope.c b/src/mpid/common/datatype/mpidu_type_get_envelope.c
similarity index 95%
rename from src/mpid/common/datatype/mpid_type_get_envelope.c
rename to src/mpid/common/datatype/mpidu_type_get_envelope.c
index 4485ee1..15adf6d 100644
--- a/src/mpid/common/datatype/mpid_type_get_envelope.c
+++ b/src/mpid/common/datatype/mpidu_type_get_envelope.c
@@ -7,8 +7,8 @@
 
 #include <mpi.h>
 #include <mpiimpl.h>
-#include <mpid_datatype.h>
-#include <mpid_dataloop.h>
+#include <mpidu_datatype.h>
+#include <mpidu_dataloop.h>
 
 /*@
   MPIDU_Type_get_envelope - get envelope information from datatype
diff --git a/src/mpid/common/datatype/mpid_type_indexed.c b/src/mpid/common/datatype/mpidu_type_indexed.c
similarity index 99%
rename from src/mpid/common/datatype/mpid_type_indexed.c
rename to src/mpid/common/datatype/mpidu_type_indexed.c
index ecb44e7..ed46c7e 100644
--- a/src/mpid/common/datatype/mpid_type_indexed.c
+++ b/src/mpid/common/datatype/mpidu_type_indexed.c
@@ -6,7 +6,7 @@
  */
 
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 #include <stdlib.h>
 
 #undef MPID_TYPE_ALLOC_DEBUG
diff --git a/src/mpid/common/datatype/mpid_type_struct.c b/src/mpid/common/datatype/mpidu_type_struct.c
similarity index 99%
rename from src/mpid/common/datatype/mpid_type_struct.c
rename to src/mpid/common/datatype/mpidu_type_struct.c
index 2d79c1b..51f480a 100644
--- a/src/mpid/common/datatype/mpid_type_struct.c
+++ b/src/mpid/common/datatype/mpidu_type_struct.c
@@ -6,7 +6,7 @@
  */
 
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 #include <stdlib.h>
 #include <limits.h>
 
diff --git a/src/mpid/common/datatype/mpid_type_vector.c b/src/mpid/common/datatype/mpidu_type_vector.c
similarity index 99%
rename from src/mpid/common/datatype/mpid_type_vector.c
rename to src/mpid/common/datatype/mpidu_type_vector.c
index 14c988e..b926978 100644
--- a/src/mpid/common/datatype/mpid_type_vector.c
+++ b/src/mpid/common/datatype/mpidu_type_vector.c
@@ -6,7 +6,7 @@
  */
 
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 #include <stdlib.h>
 
 /* #define MPID_TYPE_ALLOC_DEBUG */
diff --git a/src/mpid/common/datatype/mpid_type_zerolen.c b/src/mpid/common/datatype/mpidu_type_zerolen.c
similarity index 98%
rename from src/mpid/common/datatype/mpid_type_zerolen.c
rename to src/mpid/common/datatype/mpidu_type_zerolen.c
index ef12577..5059efd 100644
--- a/src/mpid/common/datatype/mpid_type_zerolen.c
+++ b/src/mpid/common/datatype/mpidu_type_zerolen.c
@@ -6,7 +6,7 @@
  */
 
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 #include <stdlib.h>
 
 /* #define MPID_TYPE_ALLOC_DEBUG */
diff --git a/src/mpid/common/datatype/mpir_type_flatten.c b/src/mpid/common/datatype/mpir_type_flatten.c
index 8886692..e12d880 100644
--- a/src/mpid/common/datatype/mpir_type_flatten.c
+++ b/src/mpid/common/datatype/mpir_type_flatten.c
@@ -6,7 +6,7 @@
  */
 
 #include <mpiimpl.h>
-#include <mpid_dataloop.h>
+#include <mpidu_dataloop.h>
 #include <stdlib.h>
 
 /*@
diff --git a/src/mpid/pamid/include/mpidpost.h b/src/mpid/pamid/include/mpidpost.h
index b0fdbfe..601c56b 100644
--- a/src/mpid/pamid/include/mpidpost.h
+++ b/src/mpid/pamid/include/mpidpost.h
@@ -26,7 +26,7 @@
 #ifndef __include_mpidpost_h__
 #define __include_mpidpost_h__
 
-#include <mpid_datatype.h>
+#include <mpidu_datatype.h>
 #include "mpidi_prototypes.h"
 #include "mpidi_macros.h"
 
diff --git a/src/mpid/pamid/include/mpidpre.h b/src/mpid/pamid/include/mpidpre.h
index e308cfd..e6ab858 100644
--- a/src/mpid/pamid/include/mpidpre.h
+++ b/src/mpid/pamid/include/mpidpre.h
@@ -34,7 +34,7 @@
 #include <unistd.h>
 
 #include "mpiimpl.h"
-#include "mpid_dataloop.h"
+#include "mpidu_dataloop.h"
 #include <pami.h>
 
 /* provides "pre" typedefs and such for NBC scheduling mechanism */
diff --git a/src/mpid/pamid/src/mpid_request.h b/src/mpid/pamid/src/mpid_request.h
index 4b16b96..b907ef9 100644
--- a/src/mpid/pamid/src/mpid_request.h
+++ b/src/mpid/pamid/src/mpid_request.h
@@ -23,7 +23,7 @@
 #ifndef __src_mpid_request_h__
 #define __src_mpid_request_h__
 
-#include "mpid_datatype.h"
+#include "mpidu_datatype.h"
 
 /**
  * \addtogroup MPID_REQUEST
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_recv.h b/src/mpid/pamid/src/pt2pt/mpidi_recv.h
index 7b518fd..05098c2 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_recv.h
+++ b/src/mpid/pamid/src/pt2pt/mpidi_recv.h
@@ -25,7 +25,7 @@
 
 #include <mpidimpl.h>
 #include "../mpid_recvq.h"
-#include "mpid_datatype.h"
+#include "mpidu_datatype.h"
 /*#ifdef MPIDI_STATISTICS
   #include "../../include/mpidi_datatypes.h"
 #endif*/

http://git.mpich.org/mpich.git/commitdiff/74bb0bd8a05d6b5a440af3225da456a4699e5af9

commit 74bb0bd8a05d6b5a440af3225da456a4699e5af9
Author: Yanfei Guo <yguo at anl.gov>
Date:   Thu Dec 17 10:35:30 2015 -0600

    mpid/common/datatype: Move from MPID_ namespace MPIDU_
    
    Struct definitions, function prototypes, global variables and macros
    are moved to MPIDU_ namespace to match the name conversion. All
    references (in CH3 and pamid) within the MPID layer is updated to the
    new names.
    
    The mpid/common/datatype/mpid_datatype.h contains a set of temporary
    conversions for upper layer (MPI layer) compatibility. Therefore, the MPI
    layer still uses these functions and variables by their old MPID_ names.
    
    The macros that are related to the configure process are not changed
    (require no changes to configure files).
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

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 6d38028..cdeb1b2 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
@@ -27,10 +27,10 @@ static inline int MPID_nem_mpich_test_recv (MPID_nem_cell_ptr_t *cell, int *in_f
 static inline int MPID_nem_mpich_blocking_recv (MPID_nem_cell_ptr_t *cell, int *in_fbox, int completions);
 static inline int MPID_nem_mpich_test_recv_wait (MPID_nem_cell_ptr_t *cell, int *in_fbox, int timeout);
 static inline int MPID_nem_mpich_release_cell (MPID_nem_cell_ptr_t cell, MPIDI_VC_t *vc);
-static inline void MPID_nem_mpich_send_seg_header (MPID_Segment *segment, intptr_t *segment_first,
+static inline void MPID_nem_mpich_send_seg_header (MPIDU_Segment *segment, intptr_t *segment_first,
                                                    intptr_t segment_size, void *header, intptr_t header_sz,
                                                    void *ext_header, intptr_t ext_header_sz, MPIDI_VC_t *vc, int *again);
-static inline void MPID_nem_mpich_send_seg (MPID_Segment *segment, intptr_t *segment_first, intptr_t segment_size,
+static inline void MPID_nem_mpich_send_seg (MPIDU_Segment *segment, intptr_t *segment_first, intptr_t segment_size,
                                                     MPIDI_VC_t *vc, int *again);
 
 
@@ -484,7 +484,7 @@ MPID_nem_mpich_sendv_header (MPL_IOV **iov, int *n_iov,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline void
-MPID_nem_mpich_send_seg_header (MPID_Segment *segment, intptr_t *segment_first, intptr_t segment_size,
+MPID_nem_mpich_send_seg_header (MPIDU_Segment *segment, intptr_t *segment_first, intptr_t segment_size,
                                 void *header, intptr_t header_sz, void *ext_header, intptr_t ext_header_sz,
                                 MPIDI_VC_t *vc, int *again)
 {
@@ -532,7 +532,7 @@ MPID_nem_mpich_send_seg_header (MPID_Segment *segment, intptr_t *segment_first,
             
             /* copy data */
             last = segment_size;
-            MPID_Segment_pack(segment, *segment_first, &last, (char *)pbox->cell.pkt.p.payload + sizeof(MPIDI_CH3_Pkt_t));
+            MPIDU_Segment_pack(segment, *segment_first, &last, (char *)pbox->cell.pkt.p.payload + sizeof(MPIDI_CH3_Pkt_t));
             MPIU_Assert(last == segment_size);
 
             OPA_store_release_int(&pbox->flag.value, 1);
@@ -590,7 +590,7 @@ MPID_nem_mpich_send_seg_header (MPID_Segment *segment, intptr_t *segment_first,
     else
         last = *segment_first + MPID_NEM_MPICH_DATA_LEN - buf_offset;
 
-    MPID_Segment_pack(segment, *segment_first, &last, (char *)el->pkt.p.payload + buf_offset);
+    MPIDU_Segment_pack(segment, *segment_first, &last, (char *)el->pkt.p.payload + buf_offset);
     datalen = buf_offset + last - *segment_first;
     *segment_first = last;
     
@@ -630,7 +630,7 @@ MPID_nem_mpich_send_seg_header (MPID_Segment *segment, intptr_t *segment_first,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline void
-MPID_nem_mpich_send_seg (MPID_Segment *segment, intptr_t *segment_first, intptr_t segment_size, MPIDI_VC_t *vc, int *again)
+MPID_nem_mpich_send_seg (MPIDU_Segment *segment, intptr_t *segment_first, intptr_t segment_size, MPIDI_VC_t *vc, int *again)
 {
     MPID_nem_cell_ptr_t el;
     intptr_t datalen;
@@ -673,7 +673,7 @@ MPID_nem_mpich_send_seg (MPID_Segment *segment, intptr_t *segment_first, intptr_
     else
         last = *segment_first + MPID_NEM_MPICH_DATA_LEN;
     
-    MPID_Segment_pack(segment, *segment_first, &last, (char *)el->pkt.p.payload);
+    MPIDU_Segment_pack(segment, *segment_first, &last, (char *)el->pkt.p.payload);
     datalen = last - *segment_first;
     *segment_first = last;
     
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 22d64a7..926a242 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h
@@ -97,8 +97,8 @@ int MPID_nem_mpich_send_header(void* buf, int size, struct MPIDI_VC *vc, int *ag
 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,
                                 intptr_t ext_header_sz, struct MPIDI_VC *vc, int *again);
-void MPID_nem_mpich_send_seg(MPID_Segment segment, intptr_t *segment_first, intptr_t segment_sz, struct MPIDI_VC *vc, int *again);
-void MPID_nem_mpich_send_seg_header(MPID_Segment segment, intptr_t *segment_first, intptr_t segment_size,
+void MPID_nem_mpich_send_seg(MPIDU_Segment segment, intptr_t *segment_first, intptr_t segment_sz, struct MPIDI_VC *vc, int *again);
+void MPID_nem_mpich_send_seg_header(MPIDU_Segment segment, intptr_t *segment_first, intptr_t segment_size,
                                     void *header, intptr_t header_sz, void *ext_header,
                                     intptr_t ext_header_sz, struct MPIDI_VC *vc, int *again);
 int MPID_nem_mpich_test_recv(MPID_nem_cell_ptr_t *cell, int *in_fbox, int in_blocking_progress);
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 93c4545..c929207 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c
@@ -107,7 +107,7 @@ static void MPID_nem_llc_send_handler(void *cba, uint64_t * p_reqid)
                  * Note that RMA messages should be included.
                  * Exclude eager-short by requiring req->comm != 0. */
                 int is_contig;
-                MPID_Datatype_is_contig(sreq->dev.datatype, &is_contig);
+                MPIDU_Datatype_is_contig(sreq->dev.datatype, &is_contig);
                 if (!is_contig && REQ_FIELD(sreq, pack_buf)) {
                     dprintf("llc_send_handler,non-contiguous,free pack_buf\n");
                     MPL_free(REQ_FIELD(sreq, pack_buf));
@@ -236,7 +236,7 @@ int MPID_nem_llc_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req)
     int mpi_errno = MPI_SUCCESS, llc_errno;
     int dt_contig;
     intptr_t data_sz;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
     MPI_Aint dt_true_lb;
     int i;
 
diff --git a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
index 2188f6b..895ae2d 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c
@@ -27,7 +27,7 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
     int mpi_errno = MPI_SUCCESS, llc_errno;
     int dt_contig;
     intptr_t data_sz;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
     MPI_Aint dt_true_lb;
     int i;
 
@@ -116,7 +116,7 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
     }
     else {
         /* See MPIDI_CH3_EagerNoncontigSend (in ch3u_eager.c) */
-        struct MPID_Segment *segment_ptr = MPID_Segment_alloc();
+        struct MPIDU_Segment *segment_ptr = MPIDU_Segment_alloc();
         MPIR_ERR_CHKANDJUMP(!segment_ptr, mpi_errno, MPI_ERR_OTHER, "**outofmemory");
 #ifndef	notdef_leak_0001_hack
         /* See also MPIDI_CH3_Request_create and _destory() */
@@ -124,14 +124,14 @@ int MPID_nem_llc_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Data
         sreq->dev.segment_ptr = segment_ptr;
 #endif /* notdef_leak_0001_hack */
 
-        MPID_Segment_init(buf, count, datatype, segment_ptr, 0);
+        MPIDU_Segment_init(buf, count, datatype, segment_ptr, 0);
         intptr_t segment_first = 0;
         intptr_t segment_size = data_sz;
         intptr_t last = segment_size;
         MPIU_Assert(last > 0);
         REQ_FIELD(sreq, pack_buf) = MPL_malloc((size_t) data_sz);
         MPIR_ERR_CHKANDJUMP(!REQ_FIELD(sreq, pack_buf), mpi_errno, MPI_ERR_OTHER, "**outofmemory");
-        MPID_Segment_pack(segment_ptr, segment_first, &last, (char *) (REQ_FIELD(sreq, pack_buf)));
+        MPIDU_Segment_pack(segment_ptr, segment_first, &last, (char *) (REQ_FIELD(sreq, pack_buf)));
         MPIU_Assert(last == data_sz);
         write_from_buf = REQ_FIELD(sreq, pack_buf);
     }
@@ -365,7 +365,7 @@ int MPID_nem_llc_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
     if (data_sz > 0) {
         REQ_FIELD(sreq, rma_buf) = MPL_malloc((size_t) sreq->dev.segment_size);
         MPIR_ERR_CHKANDJUMP(!REQ_FIELD(sreq, rma_buf), mpi_errno, MPI_ERR_OTHER, "**outofmemory");
-        MPID_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, &data_sz,
+        MPIDU_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, &data_sz,
                           (char *) REQ_FIELD(sreq, rma_buf));
 
         sreq->dev.iov[1].MPL_IOV_BUF = REQ_FIELD(sreq, rma_buf);
@@ -817,7 +817,7 @@ int llc_poll(int in_blocking_poll, llc_send_f sfnc, llc_recv_f rfnc)
                 if (req->kind != MPID_REQUEST_MPROBE) {
                     /* Unpack non-contiguous dt */
                     int is_contig;
-                    MPID_Datatype_is_contig(req->dev.datatype, &is_contig);
+                    MPIDU_Datatype_is_contig(req->dev.datatype, &is_contig);
                     if (!is_contig) {
                         dprintf("llc_poll,unpack noncontiguous data to user buffer\n");
 
@@ -828,14 +828,14 @@ int llc_poll(int in_blocking_poll, llc_send_f sfnc, llc_recv_f rfnc)
                          * pkt->data_sz is sender's request size.
                          */
                         intptr_t unpack_sz = events[0].side.initiator.length;
-                        MPID_Segment seg;
+                        MPIDU_Segment seg;
                         MPI_Aint last;
 
                         /* user_buf etc. are set in MPID_irecv --> MPIDI_CH3U_Recvq_FDU_or_AEP */
-                        MPID_Segment_init(req->dev.user_buf, req->dev.user_count, req->dev.datatype,
+                        MPIDU_Segment_init(req->dev.user_buf, req->dev.user_count, req->dev.datatype,
                                           &seg, 0);
                         last = unpack_sz;
-                        MPID_Segment_unpack(&seg, 0, &last, REQ_FIELD(req, pack_buf));
+                        MPIDU_Segment_unpack(&seg, 0, &last, REQ_FIELD(req, pack_buf));
                         if (last != unpack_sz) {
                             /* --BEGIN ERROR HANDLING-- */
                             /* received data was not entirely consumed by unpack()
@@ -960,7 +960,7 @@ int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Dat
     int mpi_errno = MPI_SUCCESS, llc_errno;
     int dt_contig;
     intptr_t data_sz;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
     MPI_Aint dt_true_lb;
     int i;
 
@@ -1039,20 +1039,20 @@ int MPID_nem_llc_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Dat
     }
     else {
         /* See MPIDI_CH3_EagerNoncontigSend (in ch3u_eager.c) */
-        struct MPID_Segment *segment_ptr = MPID_Segment_alloc();
+        struct MPIDU_Segment *segment_ptr = MPIDU_Segment_alloc();
         MPIR_ERR_CHKANDJUMP(!segment_ptr, mpi_errno, MPI_ERR_OTHER, "**outofmemory");
         /* See also MPIDI_CH3_Request_create and _destory() */
         /*     in src/mpid/ch3/src/ch3u_request.c */
         sreq->dev.segment_ptr = segment_ptr;
 
-        MPID_Segment_init(buf, count, datatype, segment_ptr, 0);
+        MPIDU_Segment_init(buf, count, datatype, segment_ptr, 0);
         intptr_t segment_first = 0;
         intptr_t segment_size = data_sz;
         intptr_t last = segment_size;
         MPIU_Assert(last > 0);
         REQ_FIELD(sreq, pack_buf) = MPL_malloc((size_t) data_sz);
         MPIR_ERR_CHKANDJUMP(!REQ_FIELD(sreq, pack_buf), mpi_errno, MPI_ERR_OTHER, "**outofmemory");
-        MPID_Segment_pack(segment_ptr, segment_first, &last, (char *) (REQ_FIELD(sreq, pack_buf)));
+        MPIDU_Segment_pack(segment_ptr, segment_first, &last, (char *) (REQ_FIELD(sreq, pack_buf)));
         MPIU_Assert(last == data_sz);
         write_from_buf = REQ_FIELD(sreq, pack_buf);
     }
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 41dcd62..35b6391 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_poll.c
@@ -18,7 +18,7 @@ static void _mxm_recv_completion_cb(void *context);
 static int _mxm_irecv(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req, int id, mxm_mq_h mxm_mq,
                       mxm_tag_t mxm_tag);
 static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
-                               MPID_Datatype * dt_ptr, intptr_t data_sz, const void *buf,
+                               MPIDU_Datatype* dt_ptr, intptr_t data_sz, const void *buf,
                                int count, mxm_req_buffer_t ** iov_buf, int *iov_count);
 
 #undef FUNCNAME
@@ -158,7 +158,7 @@ int MPID_nem_mxm_recv(MPIDI_VC_t * vc, MPID_Request * rreq)
     intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
 
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_MXM_RECV);
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_MXM_RECV);
@@ -234,7 +234,7 @@ static int _mxm_handle_rreq(MPID_Request * req)
     int dt_contig;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
     intptr_t userbuf_sz;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
     intptr_t data_sz;
     MPID_nem_mxm_vc_area *vc_area ATTRIBUTE((unused)) = NULL;
     MPID_nem_mxm_req_area *req_area = NULL;
@@ -290,7 +290,7 @@ static int _mxm_handle_rreq(MPID_Request * req)
 
         if (req->dev.tmpbuf != NULL) {
             last = req->dev.recv_data_sz;
-            MPID_Segment_unpack(req->dev.segment_ptr, 0, &last, req->dev.tmpbuf);
+            MPIDU_Segment_unpack(req->dev.segment_ptr, 0, &last, req->dev.tmpbuf);
             tmp_buf = req->dev.tmpbuf;
         }
         else {
@@ -311,7 +311,7 @@ static int _mxm_handle_rreq(MPID_Request * req)
                     iov[index].MPL_IOV_LEN = iov_buf[index].length;
                 }
 
-                MPID_Segment_unpack_vector(req->dev.segment_ptr, req->dev.segment_first, &last, iov,
+                MPIDU_Segment_unpack_vector(req->dev.segment_ptr, req->dev.segment_first, &last, iov,
                                            &n_iov);
                 MPL_free(iov);
             }
@@ -437,7 +437,7 @@ static int _mxm_irecv(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req, int i
 
 
 static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
-                               MPID_Datatype * dt_ptr, intptr_t data_sz, const void *buf,
+                               MPIDU_Datatype* dt_ptr, intptr_t data_sz, const void *buf,
                                int count, mxm_req_buffer_t ** iov_buf, int *iov_count)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -448,23 +448,23 @@ static int _mxm_process_rdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
     int index;
 
     if (rreq->dev.segment_ptr == NULL) {
-        rreq->dev.segment_ptr = MPID_Segment_alloc();
+        rreq->dev.segment_ptr = MPIDU_Segment_alloc();
         MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem",
-                             "**nomem %s", "MPID_Segment_alloc");
+                             "**nomem %s", "MPIDU_Segment_alloc");
     }
-    MPID_Segment_init(buf, count, datatype, rreq->dev.segment_ptr, 0);
+    MPIDU_Segment_init(buf, count, datatype, rreq->dev.segment_ptr, 0);
     rreq->dev.segment_first = 0;
     rreq->dev.segment_size = data_sz;
 
     last = rreq->dev.segment_size;
-    MPID_Segment_count_contig_blocks(rreq->dev.segment_ptr, rreq->dev.segment_first, &last,
+    MPIDU_Segment_count_contig_blocks(rreq->dev.segment_ptr, rreq->dev.segment_first, &last,
                                      (MPI_Aint *) & n_iov);
     MPIU_Assert(n_iov > 0);
     iov = MPL_malloc(n_iov * sizeof(*iov));
     MPIU_Assert(iov);
 
     last = rreq->dev.segment_size;
-    MPID_Segment_unpack_vector(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, iov, &n_iov);
+    MPIDU_Segment_unpack_vector(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, iov, &n_iov);
     MPIU_Assert(last == rreq->dev.segment_size);
 
 #if defined(MXM_DEBUG) && (MXM_DEBUG > 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 01ecd7a..e2e3cac 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_send.c
@@ -24,7 +24,7 @@ static int _mxm_isend(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req,
                       int type, mxm_mq_h mxm_mq, int mxm_rank, int id, mxm_tag_t tag, int block);
 #if 0   /* Consider using this function in case non contiguous data */
 static int _mxm_process_sdtype(MPID_Request ** rreq_p, MPI_Datatype datatype,
-                               MPID_Datatype * dt_ptr, intptr_t data_sz, const void *buf,
+                               MPIDU_Datatype* dt_ptr, intptr_t data_sz, const void *buf,
                                int count, mxm_req_buffer_t ** iov_buf, int *iov_count);
 #endif
 
@@ -211,7 +211,7 @@ int MPID_nem_mxm_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
     if (last > 0) {
         sreq->dev.tmpbuf = MPL_malloc((size_t) (sreq->dev.segment_size - sreq->dev.segment_first));
         MPIU_Assert(sreq->dev.tmpbuf);
-        MPID_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, sreq->dev.tmpbuf);
+        MPIDU_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, sreq->dev.tmpbuf);
         MPIU_Assert(last == sreq->dev.segment_size);
 
         req_area->iov_buf[req_area->iov_count].ptr = sreq->dev.tmpbuf;
@@ -246,7 +246,7 @@ int MPID_nem_mxm_send(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Data
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *sreq = NULL;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
     int dt_contig;
     intptr_t data_sz;
     MPI_Aint dt_true_lb;
@@ -267,8 +267,8 @@ int MPID_nem_mxm_send(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Data
     MPIDI_VC_FAI_send_seqnum(vc, seqnum);
     MPIDI_Request_set_seqnum(sreq, seqnum);
     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-        MPID_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
-        MPID_Datatype_add_ref(sreq->dev.datatype_ptr);
+        MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
+        MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
     }
     sreq->partner_request = NULL;
     sreq->dev.OnDataAvail = NULL;
@@ -299,17 +299,17 @@ int MPID_nem_mxm_send(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Data
             intptr_t last;
             MPI_Aint packsize = 0;
 
-            sreq->dev.segment_ptr = MPID_Segment_alloc();
+            sreq->dev.segment_ptr = MPIDU_Segment_alloc();
             MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER,
-                                 "**nomem", "**nomem %s", "MPID_Segment_alloc");
+                                 "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
             MPIR_Pack_size_impl(count, datatype, &packsize);
 
             last = data_sz;
             if (packsize > 0) {
                 sreq->dev.tmpbuf = MPL_malloc((size_t) packsize);
                 MPIU_Assert(sreq->dev.tmpbuf);
-                MPID_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
-                MPID_Segment_pack(sreq->dev.segment_ptr, 0, &last, sreq->dev.tmpbuf);
+                MPIDU_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
+                MPIDU_Segment_pack(sreq->dev.segment_ptr, 0, &last, sreq->dev.tmpbuf);
 
                 req_area->iov_count = 1;
                 req_area->iov_buf[0].ptr = sreq->dev.tmpbuf;
@@ -349,7 +349,7 @@ int MPID_nem_mxm_ssend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *sreq = NULL;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
     int dt_contig;
     intptr_t data_sz;
     MPI_Aint dt_true_lb;
@@ -370,8 +370,8 @@ int MPID_nem_mxm_ssend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
     MPIDI_VC_FAI_send_seqnum(vc, seqnum);
     MPIDI_Request_set_seqnum(sreq, seqnum);
     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-        MPID_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
-        MPID_Datatype_add_ref(sreq->dev.datatype_ptr);
+        MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
+        MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
     }
     sreq->partner_request = NULL;
     sreq->dev.OnDataAvail = NULL;
@@ -402,17 +402,17 @@ int MPID_nem_mxm_ssend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
             intptr_t last;
             MPI_Aint packsize = 0;
 
-            sreq->dev.segment_ptr = MPID_Segment_alloc();
+            sreq->dev.segment_ptr = MPIDU_Segment_alloc();
             MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER,
-                                 "**nomem", "**nomem %s", "MPID_Segment_alloc");
+                                 "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
             MPIR_Pack_size_impl(count, datatype, &packsize);
 
             last = data_sz;
             if (packsize > 0) {
                 sreq->dev.tmpbuf = MPL_malloc((size_t) packsize);
                 MPIU_Assert(sreq->dev.tmpbuf);
-                MPID_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
-                MPID_Segment_pack(sreq->dev.segment_ptr, 0, &last, sreq->dev.tmpbuf);
+                MPIDU_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
+                MPIDU_Segment_pack(sreq->dev.segment_ptr, 0, &last, sreq->dev.tmpbuf);
 
                 req_area->iov_count = 1;
                 req_area->iov_buf[0].ptr = sreq->dev.tmpbuf;
@@ -452,7 +452,7 @@ int MPID_nem_mxm_isend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *sreq = NULL;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
     int dt_contig;
     intptr_t data_sz;
     MPI_Aint dt_true_lb;
@@ -473,8 +473,8 @@ int MPID_nem_mxm_isend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
     MPIDI_VC_FAI_send_seqnum(vc, seqnum);
     MPIDI_Request_set_seqnum(sreq, seqnum);
     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-        MPID_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
-        MPID_Datatype_add_ref(sreq->dev.datatype_ptr);
+        MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
+        MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
     }
     sreq->partner_request = NULL;
     sreq->dev.OnDataAvail = NULL;
@@ -505,17 +505,17 @@ int MPID_nem_mxm_isend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Dat
             intptr_t last;
             MPI_Aint packsize = 0;
 
-            sreq->dev.segment_ptr = MPID_Segment_alloc();
+            sreq->dev.segment_ptr = MPIDU_Segment_alloc();
             MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER,
-                                 "**nomem", "**nomem %s", "MPID_Segment_alloc");
+                                 "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
             MPIR_Pack_size_impl(count, datatype, &packsize);
 
             last = data_sz;
             if (packsize > 0) {
                 sreq->dev.tmpbuf = MPL_malloc((size_t) packsize);
                 MPIU_Assert(sreq->dev.tmpbuf);
-                MPID_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
-                MPID_Segment_pack(sreq->dev.segment_ptr, 0, &last, sreq->dev.tmpbuf);
+                MPIDU_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
+                MPIDU_Segment_pack(sreq->dev.segment_ptr, 0, &last, sreq->dev.tmpbuf);
 
                 req_area->iov_count = 1;
                 req_area->iov_buf[0].ptr = sreq->dev.tmpbuf;
@@ -555,7 +555,7 @@ int MPID_nem_mxm_issend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Da
 {
     int mpi_errno = MPI_SUCCESS;
     MPID_Request *sreq = NULL;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
     int dt_contig;
     intptr_t data_sz;
     MPI_Aint dt_true_lb;
@@ -576,8 +576,8 @@ int MPID_nem_mxm_issend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Da
     MPIDI_VC_FAI_send_seqnum(vc, seqnum);
     MPIDI_Request_set_seqnum(sreq, seqnum);
     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN) {
-        MPID_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
-        MPID_Datatype_add_ref(sreq->dev.datatype_ptr);
+        MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
+        MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
     }
     sreq->partner_request = NULL;
     sreq->dev.OnDataAvail = NULL;
@@ -609,17 +609,17 @@ int MPID_nem_mxm_issend(MPIDI_VC_t * vc, const void *buf, MPI_Aint count, MPI_Da
             MPI_Aint packsize = 0;
 
             sreq->ch.noncontig = TRUE;
-            sreq->dev.segment_ptr = MPID_Segment_alloc();
+            sreq->dev.segment_ptr = MPIDU_Segment_alloc();
             MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER,
-                                 "**nomem", "**nomem %s", "MPID_Segment_alloc");
+                                 "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
             MPIR_Pack_size_impl(count, datatype, &packsize);
 
             last = data_sz;
             if (packsize > 0) {
                 sreq->dev.tmpbuf = MPL_malloc((size_t) packsize);
                 MPIU_Assert(sreq->dev.tmpbuf);
-                MPID_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
-                MPID_Segment_pack(sreq->dev.segment_ptr, 0, &last, sreq->dev.tmpbuf);
+                MPIDU_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
+                MPIDU_Segment_pack(sreq->dev.segment_ptr, 0, &last, sreq->dev.tmpbuf);
 
                 req_area->iov_count = 1;
                 req_area->iov_buf[0].ptr = sreq->dev.tmpbuf;
@@ -787,7 +787,7 @@ static int _mxm_isend(MPID_nem_mxm_ep_t * ep, MPID_nem_mxm_req_area * req,
 
 #if 0   /* Consider using this function in case non contiguous data */
 static int _mxm_process_sdtype(MPID_Request ** sreq_p, MPI_Datatype datatype,
-                               MPID_Datatype * dt_ptr, intptr_t data_sz, const void *buf,
+                               MPIDU_Datatype* dt_ptr, intptr_t data_sz, const void *buf,
                                int count, mxm_req_buffer_t ** iov_buf, int *iov_count)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -798,23 +798,23 @@ static int _mxm_process_sdtype(MPID_Request ** sreq_p, MPI_Datatype datatype,
     int index;
     int size_to_copy = 0;
 
-    sreq->dev.segment_ptr = MPID_Segment_alloc();
+    sreq->dev.segment_ptr = MPIDU_Segment_alloc();
     MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem",
-                         "**nomem %s", "MPID_Segment_alloc");
+                         "**nomem %s", "MPIDU_Segment_alloc");
 
-    MPID_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
+    MPIDU_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
     sreq->dev.segment_first = 0;
     sreq->dev.segment_size = data_sz;
 
     last = sreq->dev.segment_size;
-    MPID_Segment_count_contig_blocks(sreq->dev.segment_ptr, sreq->dev.segment_first, &last,
+    MPIDU_Segment_count_contig_blocks(sreq->dev.segment_ptr, sreq->dev.segment_first, &last,
                                      (MPI_Aint *) & n_iov);
     MPIU_Assert(n_iov > 0);
     iov = MPL_malloc(n_iov * sizeof(*iov));
     MPIU_Assert(iov);
 
     last = sreq->dev.segment_size;
-    MPID_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, iov, &n_iov);
+    MPIDU_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, iov, &n_iov);
     MPIU_Assert(last == sreq->dev.segment_size);
 
 #if defined(MXM_DEBUG) && (MXM_DEBUG > 0)
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
index c66191e..659ebe5 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
@@ -299,7 +299,7 @@ int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc,
         MPIU_Memcpy(pack_buffer + buf_offset, sreq->dev.ext_hdr_ptr, sreq->dev.ext_hdr_sz);
         buf_offset += sreq->dev.ext_hdr_sz;
     }
-    MPID_Segment_pack(sreq->dev.segment_ptr, first, &last, pack_buffer + buf_offset);
+    MPIDU_Segment_pack(sreq->dev.segment_ptr, first, &last, pack_buffer + buf_offset);
     START_COMM();
     MPID_nem_ofi_poll(MPID_NONBLOCKING_POLL);
     END_FUNC_RC(FCNAME);
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 0875ee7..6b54306 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
@@ -382,7 +382,7 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPID_Reques
     fi_addr_t remote_proc = 0;
     intptr_t data_sz;
     MPI_Aint dt_true_lb;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
     MPIU_Context_id_t context_id;
     char *recv_buffer;
     BEGIN_FUNC(FCNAME);
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 bd2e22e..ca2562f 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
@@ -290,7 +290,7 @@ static int send_noncontig_pkt(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr_p)
     if (data_sz) {
         intptr_t first = sreq->dev.segment_first;
         intptr_t last = sreq->dev.segment_first + sent_sz;
-        MPID_Segment_pack(sreq->dev.segment_ptr, first, &last, sendbuf_ptr);
+        MPIDU_Segment_pack(sreq->dev.segment_ptr, first, &last, sendbuf_ptr);
         sendbuf_ptr += sent_sz;
 
         if (remaining) {  /* Post MEs for the remote gets */
@@ -299,7 +299,7 @@ static int send_noncontig_pkt(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr_p)
             *offset = (ptl_size_t)TMPBUF(sreq);
             first = last;
             last = sreq->dev.segment_size;
-            MPID_Segment_pack(sreq->dev.segment_ptr, first, &last, TMPBUF(sreq));
+            MPIDU_Segment_pack(sreq->dev.segment_ptr, first, &last, TMPBUF(sreq));
             MPIU_Assert(last == sreq->dev.segment_size);
 
             REQ_PTL(sreq)->num_gets = remaining / MPIDI_nem_ptl_ni_limits.max_msg_size;
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 b300af9..aa3ea1b 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
@@ -31,7 +31,7 @@ static void dequeue_req(const ptl_event_t *e)
     rreq->status.MPI_SOURCE = NPTL_MATCH_GET_RANK(e->match_bits);
     rreq->status.MPI_TAG = NPTL_MATCH_GET_TAG(e->match_bits);
 
-    MPID_Datatype_get_size_macro(rreq->dev.datatype, r_len);
+    MPIDU_Datatype_get_size_macro(rreq->dev.datatype, r_len);
     r_len *= rreq->dev.user_count;
 
     s_len = NPTL_HEADER_GET_LENGTH(e->hdr_data);
@@ -94,7 +94,7 @@ static int handler_recv_dequeue_complete(const ptl_event_t *e)
     MPI_Aint last;
     MPI_Aint dt_true_lb;
     intptr_t data_sz;
-    MPID_Datatype *dt_ptr ATTRIBUTE((unused));
+    MPIDU_Datatype*dt_ptr ATTRIBUTE((unused));
 
     MPIDI_STATE_DECL(MPID_STATE_HANDLER_RECV_DEQUEUE_COMPLETE);
 
@@ -114,7 +114,7 @@ static int handler_recv_dequeue_complete(const ptl_event_t *e)
             MPIU_Memcpy((char *)rreq->dev.user_buf + dt_true_lb, e->start, e->mlength);
         } else {
             last = e->mlength;
-            MPID_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, e->start);
+            MPIDU_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, e->start);
             if (last != e->mlength)
                 MPIR_ERR_SET(rreq->status.MPI_ERROR, MPI_ERR_TYPE, "**dtypemismatch");
         }
@@ -124,8 +124,8 @@ static int handler_recv_dequeue_complete(const ptl_event_t *e)
            are a multiple of a single basic element. Currently, we do not detect
            mismatches with datatypes constructed of more than one basic type */
         MPI_Datatype dt_basic_type;
-        MPID_Datatype_get_basic_type(rreq->dev.datatype, dt_basic_type);
-        if (dt_basic_type != MPI_DATATYPE_NULL && (e->mlength % MPID_Datatype_get_basic_size(dt_basic_type)) != 0)
+        MPIDU_Datatype_get_basic_type(rreq->dev.datatype, dt_basic_type);
+        if (dt_basic_type != MPI_DATATYPE_NULL && (e->mlength % MPIDU_Datatype_get_basic_size(dt_basic_type)) != 0)
             MPIR_ERR_SET(rreq->status.MPI_ERROR, MPI_ERR_TYPE, "**dtypemismatch");
     }
     
@@ -160,7 +160,7 @@ static int handler_recv_big_get(const ptl_event_t *e)
         /* if we used a temporary buffer, unpack the data */
         if (REQ_PTL(rreq)->chunk_buffer[0]) {
             last = rreq->dev.segment_size;
-            MPID_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, REQ_PTL(rreq)->chunk_buffer[0]);
+            MPIDU_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, REQ_PTL(rreq)->chunk_buffer[0]);
             MPIU_Assert(last == rreq->dev.segment_size);
         }
         mpi_errno = handler_recv_complete(e);
@@ -230,7 +230,7 @@ static int handler_recv_unpack_complete(const ptl_event_t *e)
         buf = REQ_PTL(rreq)->chunk_buffer[0];
 
     last = rreq->dev.segment_first + e->mlength;
-    MPID_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, buf);
+    MPIDU_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, buf);
     MPIU_Assert(last == rreq->dev.segment_first + e->mlength);
     
     mpi_errno = handler_recv_complete(e);
@@ -279,7 +279,7 @@ static int handler_recv_dequeue_large(const ptl_event_t *e)
     int ret;
     int dt_contig;
     intptr_t data_sz;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
     MPI_Aint dt_true_lb;
     MPI_Aint last;
     MPIU_CHKPMEM_DECL(1);
@@ -302,7 +302,7 @@ static int handler_recv_dequeue_large(const ptl_event_t *e)
             MPIU_Memcpy((char *)rreq->dev.user_buf + dt_true_lb, e->start, e->mlength);
         } else {
             last = e->mlength;
-            MPID_Segment_unpack(rreq->dev.segment_ptr, 0, &last, e->start);
+            MPIDU_Segment_unpack(rreq->dev.segment_ptr, 0, &last, e->start);
             MPIU_Assert(last == e->mlength);
             rreq->dev.segment_first = e->mlength;
         }
@@ -328,7 +328,7 @@ static int handler_recv_dequeue_large(const ptl_event_t *e)
     
     last = rreq->dev.segment_size;
     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);
+    MPIDU_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) {
         /* Rest of message fits in one IOV */
@@ -401,7 +401,7 @@ static int handler_recv_dequeue_unpack_large(const ptl_event_t *e)
 
     MPIU_Assert(e->mlength == PTL_LARGE_THRESHOLD);
     last = PTL_LARGE_THRESHOLD;
-    MPID_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, buf);
+    MPIDU_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, buf);
     MPIU_Assert(last == PTL_LARGE_THRESHOLD);
     rreq->dev.segment_first += PTL_LARGE_THRESHOLD;
     MPL_free(REQ_PTL(rreq)->chunk_buffer[0]);
@@ -431,7 +431,7 @@ int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
     ptl_me_t me;
     int dt_contig;
     intptr_t data_sz;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
     MPI_Aint dt_true_lb;
     MPI_Aint last;
     ptl_process_t id_any;
@@ -488,15 +488,15 @@ int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
         } else {
             /* small noncontig */
             MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Small noncontig message");
-            rreq->dev.segment_ptr = MPID_Segment_alloc();
-            MPIR_ERR_CHKANDJUMP1(rreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
-            MPID_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype, rreq->dev.segment_ptr, 0);
+            rreq->dev.segment_ptr = MPIDU_Segment_alloc();
+            MPIR_ERR_CHKANDJUMP1(rreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
+            MPIDU_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype, rreq->dev.segment_ptr, 0);
             rreq->dev.segment_first = 0;
             rreq->dev.segment_size = data_sz;
 
             last = rreq->dev.segment_size;
             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);
+            MPIDU_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) {
                 /* entire message fits in IOV */
@@ -526,15 +526,15 @@ int MPID_nem_ptl_recv_posted(MPIDI_VC_t *vc, MPID_Request *rreq)
         } else {
             /* large noncontig */
             MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Large noncontig message");
-            rreq->dev.segment_ptr = MPID_Segment_alloc();
-            MPIR_ERR_CHKANDJUMP1(rreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
-            MPID_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype, rreq->dev.segment_ptr, 0);
+            rreq->dev.segment_ptr = MPIDU_Segment_alloc();
+            MPIR_ERR_CHKANDJUMP1(rreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
+            MPIDU_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype, rreq->dev.segment_ptr, 0);
             rreq->dev.segment_first = 0;
             rreq->dev.segment_size = data_sz;
 
             last = PTL_LARGE_THRESHOLD;
             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);
+            MPIDU_Segment_pack_vector(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.iov, &rreq->dev.iov_count);
 
             if (last == PTL_LARGE_THRESHOLD) {
                 /* first chunk fits in IOV */
@@ -694,7 +694,7 @@ int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPL_IOV s_c
     int mpi_errno = MPI_SUCCESS;
     int dt_contig;
     intptr_t data_sz;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
     MPI_Aint dt_true_lb;
     ptl_match_bits_t match_bits;
     int was_incomplete;
@@ -728,20 +728,20 @@ int MPID_nem_ptl_lmt_start_recv(MPIDI_VC_t *vc,  MPID_Request *rreq, MPL_IOV s_c
     else {
         MPI_Aint last;
 
-        rreq->dev.segment_ptr = MPID_Segment_alloc();
+        rreq->dev.segment_ptr = MPIDU_Segment_alloc();
         MPIR_ERR_CHKANDJUMP1(rreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem",
-                             "**nomem %s", "MPID_Segment_alloc");
-        MPID_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype,
+                             "**nomem %s", "MPIDU_Segment_alloc");
+        MPIDU_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype,
                           rreq->dev.segment_ptr, 0);
         rreq->dev.segment_first = 0;
         rreq->dev.segment_size = data_sz;
         last = PTL_LARGE_THRESHOLD;
-        MPID_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.tmpbuf);
+        MPIDU_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.tmpbuf);
         MPIU_Assert(last == PTL_LARGE_THRESHOLD);
         rreq->dev.segment_first = PTL_LARGE_THRESHOLD;
         last = rreq->dev.segment_size;
         rreq->dev.iov_count = MPL_IOV_LIMIT;
-        MPID_Segment_pack_vector(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, rreq->dev.iov,
+        MPIDU_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) {
             /* Rest of message fits in one IOV */
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 b49a22c..be3ec5f 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
@@ -109,7 +109,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
     intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPID_Datatype *dt_ptr;
+    MPIDU_Datatype*dt_ptr;
     MPID_Request *sreq = NULL;
     ptl_me_t me;
     int initial_iov_count, remaining_iov_count;
@@ -161,15 +161,15 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
         
         /* noncontig data */
         MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Small noncontig message");
-        sreq->dev.segment_ptr = MPID_Segment_alloc();
-        MPIR_ERR_CHKANDJUMP1(sreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
-        MPID_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
+        sreq->dev.segment_ptr = MPIDU_Segment_alloc();
+        MPIR_ERR_CHKANDJUMP1(sreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
+        MPIDU_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
         sreq->dev.segment_first = 0;
         sreq->dev.segment_size = data_sz;
 
         last = sreq->dev.segment_size;
         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);
+        MPIDU_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) {
             /* IOV is able to describe entire message */
@@ -194,10 +194,10 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
         /* IOV is not long enough to describe entire message */
         MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "    IOV too long: using bounce buffer");
         MPIU_CHKPMEM_MALLOC(REQ_PTL(sreq)->chunk_buffer[0], void *, data_sz, mpi_errno, "chunk_buffer");
-        MPID_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
+        MPIDU_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
         sreq->dev.segment_first = 0;
         last = data_sz;
-        MPID_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, REQ_PTL(sreq)->chunk_buffer[0]);
+        MPIDU_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, &last, REQ_PTL(sreq)->chunk_buffer[0]);
         MPIU_Assert(last == sreq->dev.segment_size);
         REQ_PTL(sreq)->event_handler = handler_send;
         ret = MPID_nem_ptl_rptl_put(MPIDI_nem_ptl_global_md, (ptl_size_t)REQ_PTL(sreq)->chunk_buffer[0], data_sz, PTL_NO_ACK_REQ,
@@ -226,15 +226,15 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
     
     /* Large noncontig data */
     MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL, VERBOSE, "Large noncontig message");
-    sreq->dev.segment_ptr = MPID_Segment_alloc();
-    MPIR_ERR_CHKANDJUMP1(sreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
-    MPID_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
+    sreq->dev.segment_ptr = MPIDU_Segment_alloc();
+    MPIR_ERR_CHKANDJUMP1(sreq->dev.segment_ptr == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
+    MPIDU_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
     sreq->dev.segment_first = 0;
     sreq->dev.segment_size = data_sz;
 
     last = PTL_LARGE_THRESHOLD;
     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);
+    MPIDU_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;
     sreq->dev.segment_first = last;
@@ -247,7 +247,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
             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,
+            MPIDU_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, &last,
                                      &sreq->dev.iov[initial_iov_count], &sreq->dev.iov_count);
             remaining_iov_count = sreq->dev.iov_count;
 
@@ -304,7 +304,7 @@ static int send_msg(ptl_hdr_data_t ssend_flag, struct MPIDI_VC *vc, const void *
     MPIU_CHKPMEM_MALLOC(REQ_PTL(sreq)->chunk_buffer[0], void *, data_sz, mpi_errno, "tmpbuf");
 
     last = data_sz;
-    MPID_Segment_pack(sreq->dev.segment_ptr, 0, &last, REQ_PTL(sreq)->chunk_buffer[0]);
+    MPIDU_Segment_pack(sreq->dev.segment_ptr, 0, &last, REQ_PTL(sreq)->chunk_buffer[0]);
     MPIU_Assert(last == data_sz);
 
     big_meappend((char *)REQ_PTL(sreq)->chunk_buffer[0] + PTL_LARGE_THRESHOLD, data_sz - PTL_LARGE_THRESHOLD, vc,
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 8f13cee..7370a35 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
@@ -538,7 +538,7 @@ static int do_cts(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
     intptr_t data_sz;
     int dt_contig ATTRIBUTE((unused));
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
-    MPID_Datatype * dt_ptr;
+    MPIDU_Datatype* dt_ptr;
     MPL_IOV s_cookie;
     MPIDI_STATE_DECL(MPID_STATE_DO_CTS);
 
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 4f8f3bc..f0d39e2 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
@@ -234,7 +234,7 @@ static int send_sreq_data(MPIDI_VC_t *vc, MPID_Request *sreq, knem_cookie_t *s_c
     int dt_contig;
     MPI_Aint dt_true_lb;
     intptr_t data_sz;
-    MPID_Datatype * dt_ptr;
+    MPIDU_Datatype* dt_ptr;
 
     /* MT: this code assumes only one thread can be at this point at a time */
     if (knem_fd < 0) {
@@ -261,11 +261,11 @@ static int send_sreq_data(MPIDI_VC_t *vc, MPID_Request *sreq, knem_cookie_t *s_c
             /* segment_ptr may be non-null when this is a continuation of a
                many-part message that we couldn't fit in one single flight of
                iovs. */
-            sreq->dev.segment_ptr = MPID_Segment_alloc();
+            sreq->dev.segment_ptr = MPIDU_Segment_alloc();
             MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno,
                                  MPI_ERR_OTHER, "**nomem",
-                                 "**nomem %s", "MPID_Segment_alloc");
-            MPID_Segment_init(sreq->dev.user_buf, sreq->dev.user_count,
+                                 "**nomem %s", "MPIDU_Segment_alloc");
+            MPIDU_Segment_init(sreq->dev.user_buf, sreq->dev.user_count,
                               sreq->dev.datatype, sreq->dev.segment_ptr, 0);
             sreq->dev.segment_first = 0;
             sreq->dev.segment_size = data_sz;
@@ -358,7 +358,7 @@ int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPL_IOV s_co
     int dt_contig;
     MPI_Aint dt_true_lb;
     intptr_t data_sz;
-    MPID_Datatype * dt_ptr;
+    MPIDU_Datatype* dt_ptr;
     volatile knem_status_t *status;
     knem_status_t current_status;
     struct lmt_dma_node *node = NULL;
@@ -390,11 +390,11 @@ int MPID_nem_lmt_dma_start_recv(MPIDI_VC_t *vc, MPID_Request *rreq, MPL_IOV s_co
                many-part message that we couldn't fit in one single flight of
                iovs. */
             MPIU_Assert(rreq->dev.segment_ptr == NULL);
-            rreq->dev.segment_ptr = MPID_Segment_alloc();
+            rreq->dev.segment_ptr = MPIDU_Segment_alloc();
             MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno,
                                  MPI_ERR_OTHER, "**nomem",
-                                 "**nomem %s", "MPID_Segment_alloc");
-            MPID_Segment_init(rreq->dev.user_buf, rreq->dev.user_count,
+                                 "**nomem %s", "MPIDU_Segment_alloc");
+            MPIDU_Segment_init(rreq->dev.user_buf, rreq->dev.user_count,
                               rreq->dev.datatype, rreq->dev.segment_ptr, 0);
             rreq->dev.segment_first = 0;
             rreq->dev.segment_size = data_sz;
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 e3091ad..6661cce 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
@@ -126,7 +126,7 @@ int MPID_nem_lmt_shm_initiate_lmt(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPID_Req
     intptr_t data_sz;
     int dt_contig ATTRIBUTE((unused));
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
-    MPID_Datatype * dt_ptr;
+    MPIDU_Datatype* dt_ptr;
     MPID_nem_pkt_lmt_rts_t * const rts_pkt = (MPID_nem_pkt_lmt_rts_t *)pkt;
     MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_INITIATE_LMT);
 
@@ -414,9 +414,9 @@ static int get_next_req(MPIDI_VC_t *vc)
         /* Check to see if we've already allocated a seg for this req.
            This can happen if both sides allocated copy buffers, and
            we decided to use the remote side's buffer. */
-        req->dev.segment_ptr = MPID_Segment_alloc();
-        MPIR_ERR_CHKANDJUMP1((req->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
-        MPID_Segment_init(req->dev.user_buf, req->dev.user_count, req->dev.datatype, req->dev.segment_ptr, 0);
+        req->dev.segment_ptr = MPIDU_Segment_alloc();
+        MPIR_ERR_CHKANDJUMP1((req->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
+        MPIDU_Segment_init(req->dev.user_buf, req->dev.user_count, req->dev.datatype, req->dev.segment_ptr, 0);
         req->dev.segment_first = 0;
     }
     vc_ch->lmt_buf_num = 0;
@@ -493,7 +493,7 @@ static int lmt_shm_send_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
         else
             copy_limit = MPID_NEM_COPY_BUF_LEN;
         last = (data_sz - first <= copy_limit) ? data_sz : first + copy_limit;
-	MPID_Segment_pack(req->dev.segment_ptr, first, &last, (void *)copy_buf->buf[buf_num]); /* cast away volatile */
+	MPIDU_Segment_pack(req->dev.segment_ptr, first, &last, (void *)copy_buf->buf[buf_num]); /* cast away volatile */
         OPA_write_barrier();
         MPIU_Assign_trunc(copy_buf->len[buf_num].val, (last - first), volatile int);
 
@@ -585,7 +585,7 @@ static int lmt_shm_recv_progress(MPIDI_VC_t *vc, MPID_Request *req, int *done)
         src_buf = ((char *)copy_buf->buf[buf_num]) - surfeit; /* cast away volatile */
         last = expected_last = (data_sz - first <= surfeit + len) ? data_sz : first + surfeit + len;
 
-	MPID_Segment_unpack(req->dev.segment_ptr, first, &last, src_buf);
+	MPIDU_Segment_unpack(req->dev.segment_ptr, first, &last, src_buf);
 
         MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, "recvd data.  last=%" PRIdPTR " data_sz=%" PRIdPTR, last, data_sz));
 
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 dea4739..d8f1909 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
@@ -93,7 +93,7 @@ static int populate_iov_from_req(MPID_Request *req)
     int dt_contig;
     MPI_Aint dt_true_lb;
     intptr_t data_sz;
-    MPID_Datatype * dt_ptr;
+    MPIDU_Datatype* dt_ptr;
 
     /* find out contig/noncontig, size, and lb for the datatype */
     MPIDI_Datatype_get_info(req->dev.user_count, req->dev.datatype,
@@ -113,11 +113,11 @@ static int populate_iov_from_req(MPID_Request *req)
         req->dev.iov_offset = 0;
 
         /* XXX DJG FIXME where is this segment freed? */
-        req->dev.segment_ptr = MPID_Segment_alloc();
+        req->dev.segment_ptr = MPIDU_Segment_alloc();
         MPIR_ERR_CHKANDJUMP1((req->dev.segment_ptr == NULL), mpi_errno,
                              MPI_ERR_OTHER, "**nomem",
-                             "**nomem %s", "MPID_Segment_alloc");
-        MPID_Segment_init(req->dev.user_buf, req->dev.user_count,
+                             "**nomem %s", "MPIDU_Segment_alloc");
+        MPIDU_Segment_init(req->dev.user_buf, req->dev.user_count,
                           req->dev.datatype, req->dev.segment_ptr, 0);
         req->dev.segment_first = 0;
         req->dev.segment_size = data_sz;
diff --git a/src/mpid/ch3/include/mpid_rma_issue.h b/src/mpid/ch3/include/mpid_rma_issue.h
index a852550..eb27220 100644
--- a/src/mpid/ch3/include/mpid_rma_issue.h
+++ b/src/mpid/ch3/include/mpid_rma_issue.h
@@ -64,7 +64,7 @@ static inline int immed_copy(void *src, void *dest, size_t len)
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static inline void fill_in_derived_dtp_info(MPIDI_RMA_dtype_info * dtype_info, void *dataloop,
-                                            MPID_Datatype * dtp)
+                                            MPIDU_Datatype* dtp)
 {
     MPIDI_STATE_DECL(MPID_STATE_FILL_IN_DERIVED_DTP_INFO);
     MPIDI_FUNC_ENTER(MPID_STATE_FILL_IN_DERIVED_DTP_INFO);
@@ -100,7 +100,7 @@ static inline void fill_in_derived_dtp_info(MPIDI_RMA_dtype_info * dtype_info, v
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static int init_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags,
-                              MPID_Datatype * target_dtp, intptr_t stream_offset,
+                              MPIDU_Datatype* target_dtp, intptr_t stream_offset,
                               void **ext_hdr_ptr, MPI_Aint * ext_hdr_sz)
 {
     MPI_Aint _ext_hdr_sz = 0, _total_sz = 0;
@@ -186,7 +186,7 @@ static int init_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags,
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static int init_get_accum_ext_pkt(MPIDI_CH3_Pkt_flags_t flags,
-                                  MPID_Datatype * target_dtp, intptr_t stream_offset,
+                                  MPIDU_Datatype* target_dtp, intptr_t stream_offset,
                                   void **ext_hdr_ptr, MPI_Aint * ext_hdr_sz)
 {
     int mpi_errno = MPI_SUCCESS;
@@ -224,7 +224,7 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
                                     MPID_Request ** req_ptr)
 {
     MPI_Datatype target_datatype;
-    MPID_Datatype *target_dtp = NULL, *origin_dtp = NULL;
+    MPIDU_Datatype*target_dtp = NULL, *origin_dtp = NULL;
     int is_origin_contig;
     MPL_IOV iov[MPL_IOV_LIMIT];
     int iovcnt = 0;
@@ -249,7 +249,7 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
     /* Judge if target datatype is derived datatype. */
     MPIDI_CH3_PKT_RMA_GET_TARGET_DATATYPE(rma_op->pkt, target_datatype, mpi_errno);
     if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
-        MPID_Datatype_get_ptr(target_datatype, target_dtp);
+        MPIDU_Datatype_get_ptr(target_datatype, target_dtp);
 
         /* Set dataloop size in pkt header */
         MPIDI_CH3_PKT_RMA_SET_DATALOOP_SIZE(rma_op->pkt, target_dtp->dataloop_size, mpi_errno);
@@ -258,12 +258,12 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
     if (is_empty_origin == FALSE) {
         /* Judge if origin datatype is derived datatype. */
         if (!MPIR_DATATYPE_IS_PREDEFINED(rma_op->origin_datatype)) {
-            MPID_Datatype_get_ptr(rma_op->origin_datatype, origin_dtp);
+            MPIDU_Datatype_get_ptr(rma_op->origin_datatype, origin_dtp);
         }
 
         /* check if origin data is contiguous and get true lb */
-        MPID_Datatype_is_contig(rma_op->origin_datatype, &is_origin_contig);
-        MPID_Datatype_get_true_lb(rma_op->origin_datatype, &dt_true_lb);
+        MPIDU_Datatype_is_contig(rma_op->origin_datatype, &is_origin_contig);
+        MPIDU_Datatype_get_true_lb(rma_op->origin_datatype, &dt_true_lb);
     }
     else {
         /* origin buffer is empty, mark origin data as contig and true_lb as 0. */
@@ -298,7 +298,7 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
 
         if (origin_dtp != NULL) {
             if (req == NULL) {
-                MPID_Datatype_release(origin_dtp);
+                MPIDU_Datatype_release(origin_dtp);
             }
             else {
                 /* this will cause the datatype to be freed when the request
@@ -349,11 +349,11 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
     }
     else {
         /* origin data is non-contiguous */
-        req->dev.segment_ptr = MPID_Segment_alloc();
+        req->dev.segment_ptr = MPIDU_Segment_alloc();
         MPIR_ERR_CHKANDJUMP1(req->dev.segment_ptr == NULL, mpi_errno,
-                             MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
+                             MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
 
-        MPID_Segment_init(rma_op->origin_addr, rma_op->origin_count,
+        MPIDU_Segment_init(rma_op->origin_addr, rma_op->origin_count,
                           rma_op->origin_datatype, req->dev.segment_ptr, 0);
         req->dev.segment_first = stream_offset;
         req->dev.segment_size = stream_offset + stream_size;
@@ -370,7 +370,7 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
   fn_exit:
     /* release the target datatype */
     if (target_dtp)
-        MPID_Datatype_release(target_dtp);
+        MPIDU_Datatype_release(target_dtp);
     (*req_ptr) = req;
 
     MPIDI_FUNC_EXIT(MPID_STATE_ISSUE_FROM_ORIGIN_BUFFER);
@@ -378,7 +378,7 @@ static int issue_from_origin_buffer(MPIDI_RMA_Op_t * rma_op, MPIDI_VC_t * vc,
   fn_fail:
     if (req) {
         if (req->dev.datatype_ptr)
-            MPID_Datatype_release(req->dev.datatype_ptr);
+            MPIDU_Datatype_release(req->dev.datatype_ptr);
         if (req->dev.ext_hdr_ptr)
             MPL_free(req->dev.ext_hdr_ptr);
         MPID_Request_release(req);
@@ -402,7 +402,7 @@ static int issue_put_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
     MPIDI_CH3_Pkt_put_t *put_pkt = &rma_op->pkt.put;
     MPID_Request *curr_req = NULL;
     MPI_Datatype target_datatype;
-    MPID_Datatype *target_dtp_ptr = NULL;
+    MPIDU_Datatype*target_dtp_ptr = NULL;
     MPIDI_CH3_Ext_pkt_put_derived_t *ext_hdr_ptr = NULL;
     MPI_Aint ext_hdr_sz = 0;
     int mpi_errno = MPI_SUCCESS;
@@ -423,12 +423,12 @@ static int issue_put_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
     }
     else {
         MPI_Aint origin_type_size;
-        MPID_Datatype_get_size_macro(rma_op->origin_datatype, origin_type_size);
+        MPIDU_Datatype_get_size_macro(rma_op->origin_datatype, origin_type_size);
 
         /* If derived datatype on target, add extended packet header. */
         MPIDI_CH3_PKT_RMA_GET_TARGET_DATATYPE(rma_op->pkt, target_datatype, mpi_errno);
         if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
-            MPID_Datatype_get_ptr(target_datatype, target_dtp_ptr);
+            MPIDU_Datatype_get_ptr(target_datatype, target_dtp_ptr);
 
             void *dataloop_ptr = NULL;
 
@@ -488,8 +488,8 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
     MPI_Aint predefined_dtp_size, predefined_dtp_extent, predefined_dtp_count;
     MPI_Aint total_len, rest_len;
     MPI_Aint origin_dtp_size;
-    MPID_Datatype *origin_dtp_ptr = NULL;
-    MPID_Datatype *target_dtp_ptr = NULL;
+    MPIDU_Datatype*origin_dtp_ptr = NULL;
+    MPIDU_Datatype*target_dtp_ptr = NULL;
     void *ext_hdr_ptr = NULL;
     MPI_Aint ext_hdr_sz = 0;
     int mpi_errno = MPI_SUCCESS;
@@ -520,21 +520,21 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
     }
 
     /* Get total length of origin data */
-    MPID_Datatype_get_size_macro(rma_op->origin_datatype, origin_dtp_size);
+    MPIDU_Datatype_get_size_macro(rma_op->origin_datatype, origin_dtp_size);
     total_len = origin_dtp_size * rma_op->origin_count;
 
     /* Get size and count for predefined datatype elements */
     if (MPIR_DATATYPE_IS_PREDEFINED(rma_op->origin_datatype)) {
         predefined_dtp_size = origin_dtp_size;
         predefined_dtp_count = rma_op->origin_count;
-        MPID_Datatype_get_extent_macro(rma_op->origin_datatype, predefined_dtp_extent);
+        MPIDU_Datatype_get_extent_macro(rma_op->origin_datatype, predefined_dtp_extent);
     }
     else {
-        MPID_Datatype_get_ptr(rma_op->origin_datatype, origin_dtp_ptr);
+        MPIDU_Datatype_get_ptr(rma_op->origin_datatype, origin_dtp_ptr);
         MPIU_Assert(origin_dtp_ptr != NULL && origin_dtp_ptr->basic_type != MPI_DATATYPE_NULL);
-        MPID_Datatype_get_size_macro(origin_dtp_ptr->basic_type, predefined_dtp_size);
+        MPIDU_Datatype_get_size_macro(origin_dtp_ptr->basic_type, predefined_dtp_size);
         predefined_dtp_count = total_len / predefined_dtp_size;
-        MPID_Datatype_get_extent_macro(origin_dtp_ptr->basic_type, predefined_dtp_extent);
+        MPIDU_Datatype_get_extent_macro(origin_dtp_ptr->basic_type, predefined_dtp_extent);
     }
     MPIU_Assert(predefined_dtp_count > 0 && predefined_dtp_size > 0 && predefined_dtp_extent > 0);
 
@@ -551,7 +551,7 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
 
     /* Get target datatype */
     if (!MPIR_DATATYPE_IS_PREDEFINED(accum_pkt->datatype))
-        MPID_Datatype_get_ptr(accum_pkt->datatype, target_dtp_ptr);
+        MPIDU_Datatype_get_ptr(accum_pkt->datatype, target_dtp_ptr);
 
     rest_len = total_len;
     MPIU_Assert(rma_op->issued_stream_count >= 0);
@@ -655,7 +655,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
     MPI_Aint predefined_dtp_size, predefined_dtp_count, predefined_dtp_extent;
     MPI_Aint total_len, rest_len;
     MPI_Aint target_dtp_size;
-    MPID_Datatype *target_dtp_ptr = NULL;
+    MPIDU_Datatype*target_dtp_ptr = NULL;
     void *ext_hdr_ptr = NULL;
     MPI_Aint ext_hdr_sz = 0;
     int mpi_errno = MPI_SUCCESS;
@@ -706,21 +706,21 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
     }
 
     /* Get total length of target data */
-    MPID_Datatype_get_size_macro(get_accum_pkt->datatype, target_dtp_size);
+    MPIDU_Datatype_get_size_macro(get_accum_pkt->datatype, target_dtp_size);
     total_len = target_dtp_size * get_accum_pkt->count;
 
     /* Get size and count for predefined datatype elements */
     if (MPIR_DATATYPE_IS_PREDEFINED(get_accum_pkt->datatype)) {
         predefined_dtp_size = target_dtp_size;
         predefined_dtp_count = get_accum_pkt->count;
-        MPID_Datatype_get_extent_macro(get_accum_pkt->datatype, predefined_dtp_extent);
+        MPIDU_Datatype_get_extent_macro(get_accum_pkt->datatype, predefined_dtp_extent);
     }
     else {
-        MPID_Datatype_get_ptr(get_accum_pkt->datatype, target_dtp_ptr);
+        MPIDU_Datatype_get_ptr(get_accum_pkt->datatype, target_dtp_ptr);
         MPIU_Assert(target_dtp_ptr != NULL && target_dtp_ptr->basic_type != MPI_DATATYPE_NULL);
-        MPID_Datatype_get_size_macro(target_dtp_ptr->basic_type, predefined_dtp_size);
+        MPIDU_Datatype_get_size_macro(target_dtp_ptr->basic_type, predefined_dtp_size);
         predefined_dtp_count = total_len / predefined_dtp_size;
-        MPID_Datatype_get_extent_macro(target_dtp_ptr->basic_type, predefined_dtp_extent);
+        MPIDU_Datatype_get_extent_macro(target_dtp_ptr->basic_type, predefined_dtp_extent);
     }
     MPIU_Assert(predefined_dtp_count > 0 && predefined_dtp_size > 0 && predefined_dtp_extent > 0);
 
@@ -784,8 +784,8 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
         resp_req->dev.flags = flags;
 
         if (!MPIR_DATATYPE_IS_PREDEFINED(resp_req->dev.datatype)) {
-            MPID_Datatype *result_dtp = NULL;
-            MPID_Datatype_get_ptr(resp_req->dev.datatype, result_dtp);
+            MPIDU_Datatype*result_dtp = NULL;
+            MPIDU_Datatype_get_ptr(resp_req->dev.datatype, result_dtp);
             resp_req->dev.datatype_ptr = result_dtp;
             /* this will cause the datatype to be freed when the
              * request is freed. */
@@ -882,7 +882,7 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
     int mpi_errno = MPI_SUCCESS;
     MPIDI_VC_t *vc;
     MPID_Comm *comm_ptr;
-    MPID_Datatype *dtp;
+    MPIDU_Datatype*dtp;
     MPI_Datatype target_datatype;
     MPID_Request *req = NULL;
     MPID_Request *curr_req = NULL;
@@ -912,7 +912,7 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
     curr_req->dev.target_win_handle = MPI_WIN_NULL;
     curr_req->dev.source_win_handle = win_ptr->handle;
     if (!MPIR_DATATYPE_IS_PREDEFINED(curr_req->dev.datatype)) {
-        MPID_Datatype_get_ptr(curr_req->dev.datatype, dtp);
+        MPIDU_Datatype_get_ptr(curr_req->dev.datatype, dtp);
         curr_req->dev.datatype_ptr = dtp;
         /* this will cause the datatype to be freed when the
          * request is freed. */
@@ -934,7 +934,7 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
     }
     else {
         /* derived datatype on target. */
-        MPID_Datatype_get_ptr(target_datatype, dtp);
+        MPIDU_Datatype_get_ptr(target_datatype, dtp);
         void *dataloop_ptr = NULL;
 
         /* set extended packet header.
@@ -964,7 +964,7 @@ static int issue_get_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
         MPID_THREAD_CS_EXIT(POBJ, vc->pobj_mutex);
 
         /* release the target datatype */
-        MPID_Datatype_release(dtp);
+        MPIDU_Datatype_release(dtp);
 
         /* If send is finished, we free extended header immediately.
          * Otherwise, store its pointer in request thus it can be freed when request is freed.*/
@@ -1110,7 +1110,7 @@ static int issue_fop_op(MPIDI_RMA_Op_t * rma_op,
     }
     else {
         MPI_Aint origin_dtp_size;
-        MPID_Datatype_get_size_macro(rma_op->origin_datatype, origin_dtp_size);
+        MPIDU_Datatype_get_size_macro(rma_op->origin_datatype, origin_dtp_size);
         mpi_errno = issue_from_origin_buffer(rma_op, vc, NULL, 0,       /*ext_hdr_ptr, ext_hdr_sz */
                                              0, 1 * origin_dtp_size, &curr_req);
         if (mpi_errno != MPI_SUCCESS)
diff --git a/src/mpid/ch3/include/mpid_rma_shm.h b/src/mpid/ch3/include/mpid_rma_shm.h
index d6dfab2..eea930b 100644
--- a/src/mpid/ch3/include/mpid_rma_shm.h
+++ b/src/mpid/ch3/include/mpid_rma_shm.h
@@ -308,7 +308,7 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun
     MPI_Aint predefined_dtp_size, predefined_dtp_extent, predefined_dtp_count;
     MPI_Aint total_len, rest_len;
     MPI_Aint origin_dtp_size;
-    MPID_Datatype *origin_dtp_ptr = NULL;
+    MPIDU_Datatype*origin_dtp_ptr = NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SHM_ACC_OP);
 
     MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SHM_ACC_OP);
@@ -343,15 +343,15 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun
     }
 
     /* Get total length of origin data */
-    MPID_Datatype_get_size_macro(origin_datatype, origin_dtp_size);
+    MPIDU_Datatype_get_size_macro(origin_datatype, origin_dtp_size);
     total_len = origin_dtp_size * origin_count;
 
-    MPID_Datatype_get_ptr(origin_datatype, origin_dtp_ptr);
+    MPIDU_Datatype_get_ptr(origin_datatype, origin_dtp_ptr);
     MPIU_Assert(origin_dtp_ptr != NULL && origin_dtp_ptr->basic_type != MPI_DATATYPE_NULL);
     basic_type = origin_dtp_ptr->basic_type;
-    MPID_Datatype_get_size_macro(basic_type, predefined_dtp_size);
+    MPIDU_Datatype_get_size_macro(basic_type, predefined_dtp_size);
     predefined_dtp_count = total_len / predefined_dtp_size;
-    MPID_Datatype_get_extent_macro(basic_type, predefined_dtp_extent);
+    MPIDU_Datatype_get_extent_macro(basic_type, predefined_dtp_extent);
     MPIU_Assert(predefined_dtp_count > 0 && predefined_dtp_size > 0 && predefined_dtp_extent > 0);
 
     stream_elem_count = MPIDI_CH3U_Acc_stream_size / predefined_dtp_extent;
@@ -360,7 +360,7 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun
 
     rest_len = total_len;
     for (i = 0; i < stream_unit_count; i++) {
-        MPID_Segment *seg = NULL;
+        MPIDU_Segment *seg = NULL;
         void *packed_buf = NULL;
         MPI_Aint first, last;
         int is_predef_contig;
@@ -376,14 +376,14 @@ static inline int MPIDI_CH3I_Shm_acc_op(const void *origin_addr, int origin_coun
 
         packed_buf = MPL_malloc(stream_size);
 
-        seg = MPID_Segment_alloc();
+        seg = MPIDU_Segment_alloc();
         MPIR_ERR_CHKANDJUMP1(seg == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s",
-                             "MPID_Segment");
-        MPID_Segment_init(origin_addr, origin_count, origin_datatype, seg, 0);
-        MPID_Segment_pack(seg, first, &last, packed_buf);
-        MPID_Segment_free(seg);
+                             "MPIDU_Segment");
+        MPIDU_Segment_init(origin_addr, origin_count, origin_datatype, seg, 0);
+        MPIDU_Segment_pack(seg, first, &last, packed_buf);
+        MPIDU_Segment_free(seg);
 
-        MPID_Datatype_is_contig(basic_type, &is_predef_contig);
+        MPIDU_Datatype_is_contig(basic_type, &is_predef_contig);
 
         if (!is_predef_contig) {
             void *tmpbuf = MPL_malloc(stream_count * predefined_dtp_extent);
@@ -443,7 +443,7 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_
     MPI_Aint predefined_dtp_size, predefined_dtp_extent, predefined_dtp_count;
     MPI_Aint total_len, rest_len;
     MPI_Aint origin_dtp_size;
-    MPID_Datatype *origin_dtp_ptr = NULL;
+    MPIDU_Datatype*origin_dtp_ptr = NULL;
     int is_empty_origin = FALSE;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SHM_GET_ACC_OP);
@@ -490,15 +490,15 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_
     }
 
     /* Get total length of origin data */
-    MPID_Datatype_get_size_macro(origin_datatype, origin_dtp_size);
+    MPIDU_Datatype_get_size_macro(origin_datatype, origin_dtp_size);
     total_len = origin_dtp_size * origin_count;
 
-    MPID_Datatype_get_ptr(origin_datatype, origin_dtp_ptr);
+    MPIDU_Datatype_get_ptr(origin_datatype, origin_dtp_ptr);
     MPIU_Assert(origin_dtp_ptr != NULL && origin_dtp_ptr->basic_type != MPI_DATATYPE_NULL);
     basic_type = origin_dtp_ptr->basic_type;
-    MPID_Datatype_get_size_macro(basic_type, predefined_dtp_size);
+    MPIDU_Datatype_get_size_macro(basic_type, predefined_dtp_size);
     predefined_dtp_count = total_len / predefined_dtp_size;
-    MPID_Datatype_get_extent_macro(basic_type, predefined_dtp_extent);
+    MPIDU_Datatype_get_extent_macro(basic_type, predefined_dtp_extent);
     MPIU_Assert(predefined_dtp_count > 0 && predefined_dtp_size > 0 && predefined_dtp_extent > 0);
 
     stream_elem_count = MPIDI_CH3U_Acc_stream_size / predefined_dtp_extent;
@@ -507,7 +507,7 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_
 
     rest_len = total_len;
     for (i = 0; i < stream_unit_count; i++) {
-        MPID_Segment *seg = NULL;
+        MPIDU_Segment *seg = NULL;
         void *packed_buf = NULL;
         MPI_Aint first, last;
         int is_predef_contig;
@@ -523,14 +523,14 @@ static inline int MPIDI_CH3I_Shm_get_acc_op(const void *origin_addr, int origin_
 
         packed_buf = MPL_malloc(stream_size);
 
-        seg = MPID_Segment_alloc();
+        seg = MPIDU_Segment_alloc();
         MPIR_ERR_CHKANDJUMP1(seg == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s",
-                             "MPID_Segment");
-        MPID_Segment_init(origin_addr, origin_count, origin_datatype, seg, 0);
-        MPID_Segment_pack(seg, first, &last, packed_buf);
-        MPID_Segment_free(seg);
+                             "MPIDU_Segment");
+        MPIDU_Segment_init(origin_addr, origin_count, origin_datatype, seg, 0);
+        MPIDU_Segment_pack(seg, first, &last, packed_buf);
+        MPIDU_Segment_free(seg);
 
-        MPID_Datatype_is_contig(basic_type, &is_predef_contig);
+        MPIDU_Datatype_is_contig(basic_type, &is_predef_contig);
 
         if (!is_predef_contig) {
             void *tmpbuf = MPL_malloc(stream_count * predefined_dtp_extent);
@@ -647,7 +647,7 @@ static inline int MPIDI_CH3I_Shm_cas_op(const void *origin_addr, const void *com
 
     dest_addr = (char *) base + disp_unit * target_disp;
 
-    MPID_Datatype_get_size_macro(datatype, len);
+    MPIDU_Datatype_get_size_macro(datatype, len);
     MPIU_Memcpy(result_addr, dest_addr, len);
 
     if (MPIR_Compare_equal(compare_addr, dest_addr, datatype)) {
@@ -706,7 +706,7 @@ static inline int MPIDI_CH3I_Shm_fop_op(const void *origin_addr, void *result_ad
 
     dest_addr = (char *) base + disp_unit * target_disp;
 
-    MPID_Datatype_get_size_macro(datatype, len);
+    MPIDU_Datatype_get_size_macro(datatype, len);
     MPIU_Memcpy(result_addr, dest_addr, len);
 
     uop = MPIR_OP_HDL_TO_FN(op);
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index 994ce4f..35687cd 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -169,13 +169,13 @@ extern MPIDI_Process_t MPIDI_Process;
 	(dt_ptr_) = NULL;						\
 	(dt_contig_out_) = TRUE;					\
         (dt_true_lb_)    = 0;                                           \
-	(data_sz_out_) = (intptr_t) (count_) * MPID_Datatype_get_basic_size(datatype_); \
+	(data_sz_out_) = (intptr_t) (count_) * MPIDU_Datatype_get_basic_size(datatype_); \
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, TERSE, (MPL_DBG_FDEST,"basic datatype: dt_contig=%d, dt_sz=%d, data_sz=%" PRIdPTR, \
-			  (dt_contig_out_), MPID_Datatype_get_basic_size(datatype_), (data_sz_out_)));\
+			  (dt_contig_out_), MPIDU_Datatype_get_basic_size(datatype_), (data_sz_out_)));\
     }									\
     else								\
     {									\
-	MPID_Datatype_get_ptr((datatype_), (dt_ptr_));			\
+	MPIDU_Datatype_get_ptr((datatype_), (dt_ptr_));			\
 	(dt_contig_out_) = (dt_ptr_)->is_contig;			\
 	(data_sz_out_) = (intptr_t) (count_) * (dt_ptr_)->size;	\
         (dt_true_lb_)    = (dt_ptr_)->true_lb;                          \
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 2c0a2d3..8870cfd 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -380,13 +380,13 @@ typedef struct MPIDI_Request {
 
     /* segment, segment_first, and segment_size are used when processing 
        non-contiguous datatypes */
-    /*    MPID_Segment   segment; */
-    struct MPID_Segment *segment_ptr;
+    /*    MPIDU_Segment   segment; */
+    struct MPIDU_Segment *segment_ptr;
     intptr_t segment_first;
     intptr_t segment_size;
 
     /* Pointer to datatype for reference counting purposes */
-    struct MPID_Datatype * datatype_ptr;
+    struct MPIDU_Datatype* datatype_ptr;
 
     /* iov and iov_count define the data to be transferred/received.  
        iov_offset points to the current head element in the IOV */
diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h
index 69a8aa3..c8ed544 100644
--- a/src/mpid/ch3/include/mpidrma.h
+++ b/src/mpid/ch3/include/mpidrma.h
@@ -371,8 +371,8 @@ static inline int enqueue_lock_origin(MPID_Win * win_ptr, MPIDI_VC_t * vc,
         MPIDI_CH3_PKT_RMA_GET_TARGET_COUNT((*pkt), target_count, mpi_errno);
         MPIDI_CH3_PKT_RMA_GET_FLAGS((*pkt), flags, mpi_errno);
 
-        MPID_Datatype_get_extent_macro(target_dtp, type_extent);
-        MPID_Datatype_get_size_macro(target_dtp, type_size);
+        MPIDU_Datatype_get_extent_macro(target_dtp, type_extent);
+        MPIDU_Datatype_get_size_macro(target_dtp, type_size);
 
         if (pkt->type == MPIDI_CH3_PKT_PUT) {
             recv_data_sz = type_size * target_count;
@@ -903,8 +903,8 @@ static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datat
 
     if (is_empty_source == FALSE) {
         MPIU_Assert(MPIR_DATATYPE_IS_PREDEFINED(source_dtp));
-        MPID_Datatype_get_size_macro(source_dtp, source_dtp_size);
-        MPID_Datatype_get_extent_macro(source_dtp, source_dtp_extent);
+        MPIDU_Datatype_get_size_macro(source_dtp, source_dtp_size);
+        MPIDU_Datatype_get_extent_macro(source_dtp, source_dtp_extent);
     }
 
     if (HANDLE_GET_KIND(acc_op) == HANDLE_KIND_BUILTIN) {
@@ -939,18 +939,18 @@ static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datat
     }
     else {
         /* derived datatype */
-        MPID_Segment *segp;
+        MPIDU_Segment *segp;
         DLOOP_VECTOR *dloop_vec;
         MPI_Aint first, last;
         int vec_len, i, count;
         MPI_Aint type_extent, type_size;
         MPI_Datatype type;
-        MPID_Datatype *dtp;
+        MPIDU_Datatype*dtp;
         MPI_Aint curr_len;
         void *curr_loc;
         int accumulated_count;
 
-        segp = MPID_Segment_alloc();
+        segp = MPIDU_Segment_alloc();
         /* --BEGIN ERROR HANDLING-- */
         if (!segp) {
             mpi_errno =
@@ -960,11 +960,11 @@ static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datat
             return mpi_errno;
         }
         /* --END ERROR HANDLING-- */
-        MPID_Segment_init(NULL, target_count, target_dtp, segp, 0);
+        MPIDU_Segment_init(NULL, target_count, target_dtp, segp, 0);
         first = stream_offset;
         last = first + source_count * source_dtp_size;
 
-        MPID_Datatype_get_ptr(target_dtp, dtp);
+        MPIDU_Datatype_get_ptr(target_dtp, dtp);
         vec_len = dtp->max_contig_blocks * target_count + 1;
         /* +1 needed because Rob says so */
         dloop_vec = (DLOOP_VECTOR *)
@@ -979,7 +979,7 @@ static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datat
         }
         /* --END ERROR HANDLING-- */
 
-        MPID_Segment_pack_vector(segp, first, &last, dloop_vec, &vec_len);
+        MPIDU_Segment_pack_vector(segp, first, &last, dloop_vec, &vec_len);
 
         type = dtp->basic_type;
         MPIU_Assert(type != MPI_DATATYPE_NULL);
@@ -1020,7 +1020,7 @@ static inline int do_accumulate_op(void *source_buf, int source_count, MPI_Datat
             accumulated_count += count;
         }
 
-        MPID_Segment_free(segp);
+        MPIDU_Segment_free(segp);
         MPL_free(dloop_vec);
     }
 
diff --git a/src/mpid/ch3/src/ch3u_buffer.c b/src/mpid/ch3/src/ch3u_buffer.c
index 9b586bc..1df0d2c 100644
--- a/src/mpid/ch3/src/ch3u_buffer.c
+++ b/src/mpid/ch3/src/ch3u_buffer.c
@@ -42,8 +42,8 @@ void MPIDI_CH3U_Buffer_copy(
     MPI_Aint sdt_true_lb, rdt_true_lb;
     intptr_t sdata_sz;
     intptr_t rdata_sz;
-    MPID_Datatype * sdt_ptr;
-    MPID_Datatype * rdt_ptr;
+    MPIDU_Datatype* sdt_ptr;
+    MPIDU_Datatype* rdt_ptr;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_BUFFER_COPY);
     MPIDI_STATE_DECL(MPID_STATE_MEMCPY);
 
@@ -80,14 +80,14 @@ void MPIDI_CH3U_Buffer_copy(
     }
     else if (sdt_contig)
     {
-	MPID_Segment seg;
+	MPIDU_Segment seg;
 	MPI_Aint last;
 
-	MPID_Segment_init(rbuf, rcount, rdt, &seg, 0);
+	MPIDU_Segment_init(rbuf, rcount, rdt, &seg, 0);
 	last = sdata_sz;
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
                           "pre-unpack last=%" PRIdPTR, last ));
-	MPID_Segment_unpack(&seg, 0, &last, (char*)sbuf + sdt_true_lb);
+	MPIDU_Segment_unpack(&seg, 0, &last, (char*)sbuf + sdt_true_lb);
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
 			 "pre-unpack last=%" PRIdPTR, last ));
 	/* --BEGIN ERROR HANDLING-- */
@@ -101,14 +101,14 @@ void MPIDI_CH3U_Buffer_copy(
     }
     else if (rdt_contig)
     {
-	MPID_Segment seg;
+	MPIDU_Segment seg;
 	MPI_Aint last;
 
-	MPID_Segment_init(sbuf, scount, sdt, &seg, 0);
+	MPIDU_Segment_init(sbuf, scount, sdt, &seg, 0);
 	last = sdata_sz;
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
 			       "pre-pack last=%" PRIdPTR, last ));
-	MPID_Segment_pack(&seg, 0, &last, (char*)rbuf + rdt_true_lb);
+	MPIDU_Segment_pack(&seg, 0, &last, (char*)rbuf + rdt_true_lb);
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
 			    "post-pack last=%" PRIdPTR, last ));
 	/* --BEGIN ERROR HANDLING-- */
@@ -124,9 +124,9 @@ void MPIDI_CH3U_Buffer_copy(
     {
 	char * buf;
 	intptr_t buf_off;
-	MPID_Segment sseg;
+	MPIDU_Segment sseg;
 	intptr_t sfirst;
-	MPID_Segment rseg;
+	MPIDU_Segment rseg;
 	intptr_t rfirst;
 
 	buf = MPL_malloc(MPIDI_COPY_BUFFER_SZ);
@@ -141,8 +141,8 @@ void MPIDI_CH3U_Buffer_copy(
 	}
 	/* --END ERROR HANDLING-- */
 
-	MPID_Segment_init(sbuf, scount, sdt, &sseg, 0);
-	MPID_Segment_init(rbuf, rcount, rdt, &rseg, 0);
+	MPIDU_Segment_init(sbuf, scount, sdt, &sseg, 0);
+	MPIDU_Segment_init(rbuf, rcount, rdt, &rseg, 0);
 
 	sfirst = 0;
 	rfirst = 0;
@@ -165,7 +165,7 @@ void MPIDI_CH3U_Buffer_copy(
 	    MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
                "pre-pack first=%" PRIdPTR ", last=%" PRIdPTR,
 						sfirst, last ));
-	    MPID_Segment_pack(&sseg, sfirst, &last, buf + buf_off);
+	    MPIDU_Segment_pack(&sseg, sfirst, &last, buf + buf_off);
 	    MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
                "post-pack first=%" PRIdPTR ", last=%" PRIdPTR,
                sfirst, last ));
@@ -179,7 +179,7 @@ void MPIDI_CH3U_Buffer_copy(
 	    MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
              "pre-unpack first=%" PRIdPTR ", last=%" PRIdPTR,
 						rfirst, last ));
-	    MPID_Segment_unpack(&rseg, rfirst, &last, buf);
+	    MPIDU_Segment_unpack(&rseg, rfirst, &last, buf);
 	    MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,VERBOSE,(MPL_DBG_FDEST,
              "post-unpack first=%" PRIdPTR ", last=%" PRIdPTR,
 						rfirst, last ));
diff --git a/src/mpid/ch3/src/ch3u_eager.c b/src/mpid/ch3/src/ch3u_eager.c
index aa880a5..f493910 100644
--- a/src/mpid/ch3/src/ch3u_eager.c
+++ b/src/mpid/ch3/src/ch3u_eager.c
@@ -121,10 +121,10 @@ int MPIDI_CH3_EagerNoncontigSend( MPID_Request **sreq_p,
     MPL_DBG_MSGPKT(vc,tag,eager_pkt->match.parts.context_id,rank,data_sz,
                     "Eager");
 	    
-    sreq->dev.segment_ptr = MPID_Segment_alloc( );
-    MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
+    sreq->dev.segment_ptr = MPIDU_Segment_alloc( );
+    MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
 
-    MPID_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
+    MPIDU_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
     sreq->dev.segment_first = 0;
     sreq->dev.segment_size = data_sz;
 	    
@@ -341,7 +341,7 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 	    int            dt_contig;
 	    MPI_Aint       dt_true_lb;
 	    intptr_t userbuf_sz;
-	    MPID_Datatype *dt_ptr;
+	    MPIDU_Datatype *dt_ptr;
 	    intptr_t data_sz;
 
 	    /* Make sure that we handle the general (non-contiguous)
@@ -403,15 +403,15 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
 		   exceptional cases */
 		/* FIXME: The MPICH tests do not exercise this branch */
 		/* printf( "Surprise!\n" ); fflush(stdout);*/
-		rreq->dev.segment_ptr = MPID_Segment_alloc( );
-                MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
+		rreq->dev.segment_ptr = MPIDU_Segment_alloc( );
+                MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
 
-		MPID_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, 
+		MPIDU_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, 
 				  rreq->dev.datatype, rreq->dev.segment_ptr, 0);
 
 		recv_data_sz = rreq->dev.recv_data_sz;
 		last    = recv_data_sz;
-		MPID_Segment_unpack( rreq->dev.segment_ptr, 0, 
+		MPIDU_Segment_unpack( rreq->dev.segment_ptr, 0, 
 				     &last, eagershort_pkt->data );
 		if (last != recv_data_sz) {
 		    /* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpid/ch3/src/ch3u_eagersync.c b/src/mpid/ch3/src/ch3u_eagersync.c
index 29157e2..73af293 100644
--- a/src/mpid/ch3/src/ch3u_eagersync.c
+++ b/src/mpid/ch3/src/ch3u_eagersync.c
@@ -93,10 +93,10 @@ int MPIDI_CH3_EagerSyncNoncontigSend( MPID_Request **sreq_p,
 		       "sending non-contiguous sync eager message, data_sz=%" PRIdPTR,
 		       data_sz);
 	
-	sreq->dev.segment_ptr = MPID_Segment_alloc( );
-        MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
+	sreq->dev.segment_ptr = MPIDU_Segment_alloc( );
+        MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
 
-	MPID_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
+	MPIDU_Segment_init(buf, count, datatype, sreq->dev.segment_ptr, 0);
 	sreq->dev.segment_first = 0;
 	sreq->dev.segment_size = data_sz;
 	
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_pkt.c b/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
index 316bf73..d27c067 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
@@ -107,7 +107,7 @@ int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, intptr_t *bufle
     int dt_contig;
     MPI_Aint dt_true_lb;
     intptr_t userbuf_sz;
-    MPID_Datatype * dt_ptr = NULL;
+    MPIDU_Datatype * dt_ptr = NULL;
     intptr_t data_sz;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_RECEIVE_DATA_FOUND);
@@ -173,10 +173,10 @@ int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, intptr_t *bufle
 	/* user buffer is not contiguous or is too small to hold
 	   the entire message */
         
-	rreq->dev.segment_ptr = MPID_Segment_alloc( );
-        MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
+	rreq->dev.segment_ptr = MPIDU_Segment_alloc( );
+        MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
 
- 	MPID_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, 
+ 	MPIDU_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, 
 			  rreq->dev.datatype, rreq->dev.segment_ptr, 0);
 	rreq->dev.segment_first = 0;
 	rreq->dev.segment_size  = data_sz;
@@ -189,7 +189,7 @@ int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, intptr_t *bufle
             intptr_t last;
             MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"Copying noncontiguous data to user buffer");
             last = data_sz;
-            MPID_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, 
+            MPIDU_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, 
 				&last, buf);
             /* --BEGIN ERROR HANDLING-- */
             if (last != data_sz)
@@ -299,7 +299,7 @@ int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreq)
     int dt_contig;
     MPI_Aint dt_true_lb;
     intptr_t userbuf_sz;
-    MPID_Datatype * dt_ptr = NULL;
+    MPIDU_Datatype * dt_ptr = NULL;
     intptr_t data_sz;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_POST_DATA_RECEIVE_FOUND);
 
@@ -346,9 +346,9 @@ int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreq)
 	/* user buffer is not contiguous or is too small to hold
 	   the entire message */
 	MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"IOV loaded for non-contiguous read");
-	rreq->dev.segment_ptr = MPID_Segment_alloc( );
-        MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
-	MPID_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, 
+	rreq->dev.segment_ptr = MPIDU_Segment_alloc( );
+        MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
+	MPIDU_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, 
 			  rreq->dev.datatype, rreq->dev.segment_ptr, 0);
 	rreq->dev.segment_first = 0;
 	rreq->dev.segment_size = data_sz;
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index c2c7ec2..e67bcdd 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -8,7 +8,7 @@
 #include "mpidrma.h"
 
 static int create_derived_datatype(MPID_Request * req, MPIDI_RMA_dtype_info * dtype_info,
-                                   MPID_Datatype ** dtp);
+                                   MPIDU_Datatype** dtp);
 
 #undef FUNCNAME
 #define FUNCNAME MPIDI_CH3U_Handle_recv_req
@@ -194,7 +194,7 @@ int MPIDI_CH3_ReqHandler_AccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq,
     }
     MPIU_Assert(basic_type != MPI_DATATYPE_NULL);
 
-    MPID_Datatype_get_size_macro(basic_type, predef_dtp_size);
+    MPIDU_Datatype_get_size_macro(basic_type, predef_dtp_size);
     predef_count = rreq->dev.recv_data_sz / predef_dtp_size;
     MPIU_Assert(predef_count > 0);
 
@@ -293,10 +293,10 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq
                                        rreq->dev.ext_hdr_ptr, &stream_offset);
 
     /* Use target data to calculate current stream unit size */
-    MPID_Datatype_get_size_macro(rreq->dev.datatype, type_size);
+    MPIDU_Datatype_get_size_macro(rreq->dev.datatype, type_size);
     total_len = type_size * rreq->dev.user_count;
-    MPID_Datatype_get_size_macro(basic_type, predef_dtp_size);
-    MPID_Datatype_get_extent_macro(basic_type, extent);
+    MPIDU_Datatype_get_size_macro(basic_type, predef_dtp_size);
+    MPIDU_Datatype_get_extent_macro(basic_type, extent);
     stream_data_len = MPL_MIN(total_len - (stream_offset / extent) * predef_dtp_size,
                                (MPIDI_CH3U_SRBuf_size / extent) * predef_dtp_size);
 
@@ -315,8 +315,8 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq
         get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
 
     /* check if data is contiguous and get true lb */
-    MPID_Datatype_is_contig(rreq->dev.datatype, &is_contig);
-    MPID_Datatype_get_true_lb(rreq->dev.datatype, &dt_true_lb);
+    MPIDU_Datatype_is_contig(rreq->dev.datatype, &is_contig);
+    MPIDU_Datatype_get_true_lb(rreq->dev.datatype, &dt_true_lb);
 
     resp_req = MPID_Request_create();
     MPIR_ERR_CHKANDJUMP(resp_req == NULL, mpi_errno, MPI_ERR_OTHER, "**nomemreq");
@@ -339,7 +339,7 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq
                               stream_offset), stream_data_len);
     }
     else {
-        MPID_Segment *seg = MPID_Segment_alloc();
+        MPIDU_Segment *seg = MPIDU_Segment_alloc();
         MPI_Aint first = stream_offset;
         MPI_Aint last = first + stream_data_len;
 
@@ -348,11 +348,11 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq
                 MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr);
         }
         MPIR_ERR_CHKANDJUMP1(seg == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s",
-                             "MPID_Segment");
-        MPID_Segment_init(rreq->dev.real_user_buf, rreq->dev.user_count, rreq->dev.datatype, seg,
+                             "MPIDU_Segment");
+        MPIDU_Segment_init(rreq->dev.real_user_buf, rreq->dev.user_count, rreq->dev.datatype, seg,
                           0);
-        MPID_Segment_pack(seg, first, &last, resp_req->dev.user_buf);
-        MPID_Segment_free(seg);
+        MPIDU_Segment_pack(seg, first, &last, resp_req->dev.user_buf);
+        MPIDU_Segment_free(seg);
     }
 
     /* accumulate data from tmp_buf into user_buf */
@@ -450,9 +450,9 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq, i
 
     MPID_Win_get_ptr(rreq->dev.target_win_handle, win_ptr);
 
-    MPID_Datatype_get_size_macro(rreq->dev.datatype, type_size);
+    MPIDU_Datatype_get_size_macro(rreq->dev.datatype, type_size);
 
-    MPID_Datatype_is_contig(rreq->dev.datatype, &is_contig);
+    MPIDU_Datatype_is_contig(rreq->dev.datatype, &is_contig);
 
     /* Create response request */
     resp_req = MPID_Request_create();
@@ -480,7 +480,7 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq, i
         MPIU_Memcpy(resp_req->dev.user_buf, rreq->dev.real_user_buf, type_size);
     }
     else {
-        MPID_Segment *seg = MPID_Segment_alloc();
+        MPIDU_Segment *seg = MPIDU_Segment_alloc();
         MPI_Aint last = type_size;
 
         if (seg == NULL) {
@@ -488,10 +488,10 @@ int MPIDI_CH3_ReqHandler_FOPRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq, i
                 MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr);
         }
         MPIR_ERR_CHKANDJUMP1(seg == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s",
-                             "MPID_Segment");
-        MPID_Segment_init(rreq->dev.real_user_buf, 1, rreq->dev.datatype, seg, 0);
-        MPID_Segment_pack(seg, 0, &last, resp_req->dev.user_buf);
-        MPID_Segment_free(seg);
+                             "MPIDU_Segment");
+        MPIDU_Segment_init(rreq->dev.real_user_buf, 1, rreq->dev.datatype, seg, 0);
+        MPIDU_Segment_pack(seg, 0, &last, resp_req->dev.user_buf);
+        MPIDU_Segment_free(seg);
     }
 
     /* Perform accumulate computation */
@@ -563,7 +563,7 @@ int MPIDI_CH3_ReqHandler_PutDerivedDTRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((unu
                                                   MPID_Request * rreq, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *new_dtp = NULL;
+    MPIDU_Datatype*new_dtp = NULL;
     MPIDI_RMA_dtype_info *dtype_info = NULL;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_PUTDERIVEDDTRECVCOMPLETE);
 
@@ -581,11 +581,11 @@ int MPIDI_CH3_ReqHandler_PutDerivedDTRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((unu
 
     rreq->dev.datatype_ptr = new_dtp;
 
-    rreq->dev.segment_ptr = MPID_Segment_alloc();
+    rreq->dev.segment_ptr = MPIDU_Segment_alloc();
     MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem",
-                         "**nomem %s", "MPID_Segment_alloc");
+                         "**nomem %s", "MPIDU_Segment_alloc");
 
-    MPID_Segment_init(rreq->dev.user_buf,
+    MPIDU_Segment_init(rreq->dev.user_buf,
                       rreq->dev.user_count, rreq->dev.datatype, rreq->dev.segment_ptr, 0);
     rreq->dev.segment_first = 0;
     rreq->dev.segment_size = rreq->dev.recv_data_sz;
@@ -611,7 +611,7 @@ int MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((un
                                                    MPID_Request * rreq, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *new_dtp = NULL;
+    MPIDU_Datatype*new_dtp = NULL;
     MPIDI_RMA_dtype_info *dtype_info = NULL;
     MPI_Aint basic_type_extent, basic_type_size;
     MPI_Aint total_len, rest_len, stream_elem_count;
@@ -664,13 +664,13 @@ int MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((un
             stream_offset = ext_hdr->stream_offset;
         }
 
-        MPID_Datatype_get_size_macro(rreq->dev.datatype, type_size);
+        MPIDU_Datatype_get_size_macro(rreq->dev.datatype, type_size);
 
         basic_dtp = rreq->dev.datatype;
     }
 
-    MPID_Datatype_get_size_macro(basic_dtp, basic_type_size);
-    MPID_Datatype_get_extent_macro(basic_dtp, basic_type_extent);
+    MPIDU_Datatype_get_size_macro(basic_dtp, basic_type_size);
+    MPIDU_Datatype_get_extent_macro(basic_dtp, basic_type_extent);
 
     MPIU_Assert(!MPIDI_Request_get_srbuf_flag(rreq));
     /* allocate a SRBuf for receiving stream unit */
@@ -694,11 +694,11 @@ int MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete(MPIDI_VC_t * vc ATTRIBUTE((un
 
     rreq->dev.recv_data_sz = MPL_MIN(rest_len, stream_elem_count * basic_type_size);
 
-    rreq->dev.segment_ptr = MPID_Segment_alloc();
+    rreq->dev.segment_ptr = MPIDU_Segment_alloc();
     MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem",
-                         "**nomem %s", "MPID_Segment_alloc");
+                         "**nomem %s", "MPIDU_Segment_alloc");
 
-    MPID_Segment_init(rreq->dev.user_buf,
+    MPIDU_Segment_init(rreq->dev.user_buf,
                       (rreq->dev.recv_data_sz / basic_type_size),
                       basic_dtp, rreq->dev.segment_ptr, 0);
     rreq->dev.segment_first = 0;
@@ -726,7 +726,7 @@ int MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete(MPIDI_VC_t * vc,
                                                     MPID_Request * rreq, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *new_dtp = NULL;
+    MPIDU_Datatype*new_dtp = NULL;
     MPIDI_RMA_dtype_info *dtype_info = NULL;
     MPI_Aint basic_type_extent, basic_type_size;
     MPI_Aint total_len, rest_len, stream_elem_count;
@@ -785,7 +785,7 @@ int MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete(MPIDI_VC_t * vc,
             stream_offset = ext_hdr->stream_offset;
         }
 
-        MPID_Datatype_get_size_macro(rreq->dev.datatype, type_size);
+        MPIDU_Datatype_get_size_macro(rreq->dev.datatype, type_size);
 
         basic_dtp = rreq->dev.datatype;
     }
@@ -799,8 +799,8 @@ int MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete(MPIDI_VC_t * vc,
             MPIR_ERR_POP(mpi_errno);
     }
     else {
-        MPID_Datatype_get_size_macro(basic_dtp, basic_type_size);
-        MPID_Datatype_get_extent_macro(basic_dtp, basic_type_extent);
+        MPIDU_Datatype_get_size_macro(basic_dtp, basic_type_size);
+        MPIDU_Datatype_get_extent_macro(basic_dtp, basic_type_extent);
 
         MPIU_Assert(!MPIDI_Request_get_srbuf_flag(rreq));
         /* allocate a SRBuf for receiving stream unit */
@@ -824,11 +824,11 @@ int MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete(MPIDI_VC_t * vc,
 
         rreq->dev.recv_data_sz = MPL_MIN(rest_len, stream_elem_count * basic_type_size);
 
-        rreq->dev.segment_ptr = MPID_Segment_alloc();
+        rreq->dev.segment_ptr = MPIDU_Segment_alloc();
         MPIR_ERR_CHKANDJUMP1((rreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem",
-                             "**nomem %s", "MPID_Segment_alloc");
+                             "**nomem %s", "MPIDU_Segment_alloc");
 
-        MPID_Segment_init(rreq->dev.user_buf,
+        MPIDU_Segment_init(rreq->dev.user_buf,
                           (rreq->dev.recv_data_sz / basic_type_size),
                           basic_dtp, rreq->dev.segment_ptr, 0);
         rreq->dev.segment_first = 0;
@@ -859,7 +859,7 @@ int MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete(MPIDI_VC_t * vc,
                                                   MPID_Request * rreq, int *complete)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *new_dtp = NULL;
+    MPIDU_Datatype*new_dtp = NULL;
     MPIDI_RMA_dtype_info *dtype_info = NULL;
     MPIDI_CH3_Pkt_t upkt;
     MPIDI_CH3_Pkt_get_resp_t *get_resp_pkt = &upkt.get_resp;
@@ -904,11 +904,11 @@ int MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete(MPIDI_VC_t * vc,
         (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
         get_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
 
-    sreq->dev.segment_ptr = MPID_Segment_alloc();
+    sreq->dev.segment_ptr = MPIDU_Segment_alloc();
     MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem",
-                         "**nomem %s", "MPID_Segment_alloc");
+                         "**nomem %s", "MPIDU_Segment_alloc");
 
-    MPID_Segment_init(sreq->dev.user_buf,
+    MPIDU_Segment_init(sreq->dev.user_buf,
                       sreq->dev.user_count, sreq->dev.datatype, sreq->dev.segment_ptr, 0);
     sreq->dev.segment_first = 0;
     sreq->dev.segment_size = new_dtp->size * sreq->dev.user_count;
@@ -1078,9 +1078,9 @@ int MPIDI_CH3_ReqHandler_ReloadIOV(MPIDI_VC_t * vc ATTRIBUTE((unused)),
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
 static int create_derived_datatype(MPID_Request * req, MPIDI_RMA_dtype_info * dtype_info,
-                                   MPID_Datatype ** dtp)
+                                   MPIDU_Datatype** dtp)
 {
-    MPID_Datatype *new_dtp;
+    MPIDU_Datatype*new_dtp;
     int mpi_errno = MPI_SUCCESS;
     MPI_Aint ptrdiff;
     MPIDI_STATE_DECL(MPID_STATE_CREATE_DERIVED_DATATYPE);
@@ -1088,10 +1088,10 @@ static int create_derived_datatype(MPID_Request * req, MPIDI_RMA_dtype_info * dt
     MPIDI_FUNC_ENTER(MPID_STATE_CREATE_DERIVED_DATATYPE);
 
     /* allocate new datatype object and handle */
-    new_dtp = (MPID_Datatype *) MPIU_Handle_obj_alloc(&MPID_Datatype_mem);
+    new_dtp = (MPIDU_Datatype*) MPIU_Handle_obj_alloc(&MPIDU_Datatype_mem);
     if (!new_dtp) {
         MPIR_ERR_SETANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s",
-                             "MPID_Datatype_mem");
+                             "MPIDU_Datatype_mem");
     }
 
     *dtp = new_dtp;
@@ -1126,7 +1126,7 @@ static int create_derived_datatype(MPID_Request * req, MPIDI_RMA_dtype_info * dt
     /* FIXME: Temp to avoid SEGV when memory tracing */
     new_dtp->hetero_dloop = 0;
 
-    MPID_Dataloop_update(new_dtp->dataloop, ptrdiff);
+    MPIDU_Dataloop_update(new_dtp->dataloop, ptrdiff);
 
     new_dtp->contents = NULL;
 
@@ -1233,10 +1233,10 @@ static inline int perform_get_in_lock_queue(MPID_Win * win_ptr,
     get_resp_pkt->target_rank = win_ptr->comm_ptr->rank;
 
     /* length of target data */
-    MPID_Datatype_get_size_macro(get_pkt->datatype, type_size);
+    MPIDU_Datatype_get_size_macro(get_pkt->datatype, type_size);
     MPIU_Assign_trunc(len, get_pkt->count * type_size, size_t);
 
-    MPID_Datatype_is_contig(get_pkt->datatype, &is_contig);
+    MPIDU_Datatype_is_contig(get_pkt->datatype, &is_contig);
 
     if (get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP) {
         void *src = (void *) (get_pkt->addr), *dest = (void *) (get_resp_pkt->info.data);
@@ -1272,11 +1272,11 @@ static inline int perform_get_in_lock_queue(MPID_Win * win_ptr,
         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();
+        sreq->dev.segment_ptr = MPIDU_Segment_alloc();
         MPIR_ERR_CHKANDJUMP1(sreq->dev.segment_ptr == NULL, mpi_errno,
-                             MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
+                             MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
 
-        MPID_Segment_init(get_pkt->addr, get_pkt->count,
+        MPIDU_Segment_init(get_pkt->addr, get_pkt->count,
                           get_pkt->datatype, sreq->dev.segment_ptr, 0);
         sreq->dev.segment_first = 0;
         sreq->dev.segment_size = get_pkt->count * type_size;
@@ -1318,8 +1318,8 @@ static inline int perform_acc_in_lock_queue(MPID_Win * win_ptr,
         MPI_Aint type_size, type_extent;
         MPI_Aint total_len, recv_count;
 
-        MPID_Datatype_get_size_macro(acc_pkt->datatype, type_size);
-        MPID_Datatype_get_extent_macro(acc_pkt->datatype, type_extent);
+        MPIDU_Datatype_get_size_macro(acc_pkt->datatype, type_size);
+        MPIDU_Datatype_get_extent_macro(acc_pkt->datatype, type_extent);
 
         total_len = type_size * acc_pkt->count;
         recv_count = MPL_MIN((total_len / type_size), (MPIDI_CH3U_SRBuf_size / type_extent));
@@ -1389,7 +1389,7 @@ static inline int perform_get_acc_in_lock_queue(MPID_Win * win_ptr,
     sreq->dev.flags = get_accum_pkt->flags;
 
     /* Copy data into a temporary buffer */
-    MPID_Datatype_get_size_macro(get_accum_pkt->datatype, type_size);
+    MPIDU_Datatype_get_size_macro(get_accum_pkt->datatype, type_size);
 
     /* length of target data */
     MPIU_Assign_trunc(len, get_accum_pkt->count * type_size, size_t);
@@ -1457,7 +1457,7 @@ static inline int perform_get_acc_in_lock_queue(MPID_Win * win_ptr,
 
     MPIU_Assert(get_accum_pkt->type == MPIDI_CH3_PKT_GET_ACCUM);
 
-    MPID_Datatype_get_extent_macro(get_accum_pkt->datatype, type_extent);
+    MPIDU_Datatype_get_extent_macro(get_accum_pkt->datatype, type_extent);
 
     total_len = type_size * get_accum_pkt->count;
     recv_count = MPL_MIN((total_len / type_size), (MPIDI_CH3U_SRBuf_size / type_extent));
@@ -1465,7 +1465,7 @@ static inline int perform_get_acc_in_lock_queue(MPID_Win * win_ptr,
 
     sreq->dev.user_buf = (void *) MPL_malloc(recv_count * type_size);
 
-    MPID_Datatype_is_contig(get_accum_pkt->datatype, &is_contig);
+    MPIDU_Datatype_is_contig(get_accum_pkt->datatype, &is_contig);
 
     /* NOTE: 'copy data + ACC' needs to be atomic */
 
@@ -1481,7 +1481,7 @@ static inline int perform_get_acc_in_lock_queue(MPID_Win * win_ptr,
         MPIU_Memcpy(sreq->dev.user_buf, get_accum_pkt->addr, recv_count * type_size);
     }
     else {
-        MPID_Segment *seg = MPID_Segment_alloc();
+        MPIDU_Segment *seg = MPIDU_Segment_alloc();
         MPI_Aint first = 0;
         MPI_Aint last = first + type_size * recv_count;
 
@@ -1490,11 +1490,11 @@ static inline int perform_get_acc_in_lock_queue(MPID_Win * win_ptr,
                 MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr);
         }
         MPIR_ERR_CHKANDJUMP1(seg == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s",
-                             "MPID_Segment");
-        MPID_Segment_init(get_accum_pkt->addr, get_accum_pkt->count, get_accum_pkt->datatype, seg,
+                             "MPIDU_Segment");
+        MPIDU_Segment_init(get_accum_pkt->addr, get_accum_pkt->count, get_accum_pkt->datatype, seg,
                           0);
-        MPID_Segment_pack(seg, first, &last, sreq->dev.user_buf);
-        MPID_Segment_free(seg);
+        MPIDU_Segment_pack(seg, first, &last, sreq->dev.user_buf);
+        MPIDU_Segment_free(seg);
     }
 
     /* Perform ACCUMULATE OP */
@@ -1566,9 +1566,9 @@ static inline int perform_fop_in_lock_queue(MPID_Win * win_ptr,
     /* FIXME: this function is same with PktHandler_FOP(), should
      * do code refactoring on both of them. */
 
-    MPID_Datatype_get_size_macro(fop_pkt->datatype, type_size);
+    MPIDU_Datatype_get_size_macro(fop_pkt->datatype, type_size);
 
-    MPID_Datatype_is_contig(fop_pkt->datatype, &is_contig);
+    MPIDU_Datatype_is_contig(fop_pkt->datatype, &is_contig);
 
     if (fop_pkt->type == MPIDI_CH3_PKT_FOP_IMMED) {
         MPIDI_Pkt_init(fop_resp_pkt, MPIDI_CH3_PKT_FOP_RESP_IMMED);
@@ -1628,7 +1628,7 @@ static inline int perform_fop_in_lock_queue(MPID_Win * win_ptr,
         MPIU_Memcpy(resp_req->dev.user_buf, fop_pkt->addr, type_size);
     }
     else {
-        MPID_Segment *seg = MPID_Segment_alloc();
+        MPIDU_Segment *seg = MPIDU_Segment_alloc();
         MPI_Aint last = type_size;
 
         if (seg == NULL) {
@@ -1636,10 +1636,10 @@ static inline int perform_fop_in_lock_queue(MPID_Win * win_ptr,
                 MPIDI_CH3I_SHM_MUTEX_UNLOCK(win_ptr);
         }
         MPIR_ERR_CHKANDJUMP1(seg == NULL, mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s",
-                             "MPID_Segment");
-        MPID_Segment_init(fop_pkt->addr, 1, fop_pkt->datatype, seg, 0);
-        MPID_Segment_pack(seg, 0, &last, resp_req->dev.user_buf);
-        MPID_Segment_free(seg);
+                             "MPIDU_Segment");
+        MPIDU_Segment_init(fop_pkt->addr, 1, fop_pkt->datatype, seg, 0);
+        MPIDU_Segment_pack(seg, 0, &last, resp_req->dev.user_buf);
+        MPIDU_Segment_free(seg);
     }
 
     /* Apply the op */
@@ -1743,7 +1743,7 @@ static inline int perform_cas_in_lock_queue(MPID_Win * win_ptr,
         cas_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
 
     /* Copy old value into the response packet */
-    MPID_Datatype_get_size_macro(cas_pkt->datatype, len);
+    MPIDU_Datatype_get_size_macro(cas_pkt->datatype, len);
     MPIU_Assert(len <= sizeof(MPIDI_CH3_CAS_Immed_u));
 
     if (win_ptr->shm_allocated == TRUE)
diff --git a/src/mpid/ch3/src/ch3u_request.c b/src/mpid/ch3/src/ch3u_request.c
index 17ac413..bf965ab 100644
--- a/src/mpid/ch3/src/ch3u_request.c
+++ b/src/mpid/ch3/src/ch3u_request.c
@@ -153,7 +153,7 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
     MPIU_Assert(sreq->dev.segment_first < last);
     MPIU_Assert(last > 0);
     MPIU_Assert(*iov_n > 0 && *iov_n <= MPL_IOV_LIMIT);
-    MPID_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, 
+    MPIDU_Segment_pack_vector(sreq->dev.segment_ptr, sreq->dev.segment_first, 
 			     &last, iov, iov_n);
     MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
     "post-pv: first=%" PRIdPTR ", last=%" PRIdPTR ", iov_n=%d",
@@ -209,7 +209,7 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
                "pre-pack: first=%" PRIdPTR ", last=%" PRIdPTR,
 			  sreq->dev.segment_first, last));
-	MPID_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, 
+	MPIDU_Segment_pack(sreq->dev.segment_ptr, sreq->dev.segment_first, 
 			  &last, (char*) sreq->dev.tmpbuf + iov_data_copied);
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
               "post-pack: first=%" PRIdPTR ", last=%" PRIdPTR,
@@ -321,7 +321,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
 			  rreq->dev.segment_first, last, rreq->dev.iov_count));
 	MPIU_Assert(rreq->dev.segment_first < last);
 	MPIU_Assert(last > 0);
-	MPID_Segment_unpack_vector(rreq->dev.segment_ptr, 
+	MPIDU_Segment_unpack_vector(rreq->dev.segment_ptr, 
 				   rreq->dev.segment_first,
 				   &last, &rreq->dev.iov[0], &rreq->dev.iov_count);
 	MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL,VERBOSE,(MPL_DBG_FDEST,
@@ -473,7 +473,7 @@ int MPIDI_CH3U_Request_unpack_srbuf(MPID_Request * rreq)
 	tmpbuf_last = (int)rreq->dev.segment_size;
     }
     last = tmpbuf_last;
-    MPID_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, 
+    MPIDU_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, 
 			&last, rreq->dev.tmpbuf);
     if (last == 0 || last == rreq->dev.segment_first)
     {
@@ -540,7 +540,7 @@ int MPIDI_CH3U_Request_unpack_uebuf(MPID_Request * rreq)
     int dt_contig;
     MPI_Aint dt_true_lb;
     intptr_t userbuf_sz;
-    MPID_Datatype * dt_ptr;
+    MPIDU_Datatype * dt_ptr;
     intptr_t unpack_sz;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_REQUEST_UNPACK_UEBUF);
@@ -586,13 +586,13 @@ int MPIDI_CH3U_Request_unpack_uebuf(MPID_Request * rreq)
 	}
 	else
 	{
-	    MPID_Segment seg;
+	    MPIDU_Segment seg;
 	    MPI_Aint last;
 
-	    MPID_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, 
+	    MPIDU_Segment_init(rreq->dev.user_buf, rreq->dev.user_count, 
 			      rreq->dev.datatype, &seg, 0);
 	    last = unpack_sz;
-	    MPID_Segment_unpack(&seg, 0, &last, rreq->dev.tmpbuf);
+	    MPIDU_Segment_unpack(&seg, 0, &last, rreq->dev.tmpbuf);
 	    if (last != unpack_sz)
 	    {
 		/* --BEGIN ERROR HANDLING-- */
@@ -685,11 +685,11 @@ void MPID_Request_release(MPID_Request *req)
         }
 
         if (req->dev.datatype_ptr != NULL) {
-            MPID_Datatype_release(req->dev.datatype_ptr);
+            MPIDU_Datatype_release(req->dev.datatype_ptr);
         }
 
         if (req->dev.segment_ptr != NULL) {
-            MPID_Segment_free(req->dev.segment_ptr);
+            MPIDU_Segment_free(req->dev.segment_ptr);
         }
 
         if (MPIDI_Request_get_srbuf_flag(req)) {
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index a989988..2d80b11 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -45,7 +45,7 @@ int MPIDI_CH3I_Put(const void *origin_addr, int origin_count, MPI_Datatype
 {
     int mpi_errno = MPI_SUCCESS;
     int dt_contig ATTRIBUTE((unused)), rank;
-    MPID_Datatype *dtp;
+    MPIDU_Datatype*dtp;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
     intptr_t data_sz;
     MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
@@ -127,16 +127,16 @@ int MPIDI_CH3I_Put(const void *origin_addr, int origin_count, MPI_Datatype
         /* if source or target datatypes are derived, increment their
          * reference counts */
         if (!MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) {
-            MPID_Datatype_get_ptr(origin_datatype, dtp);
-            MPID_Datatype_add_ref(dtp);
+            MPIDU_Datatype_get_ptr(origin_datatype, dtp);
+            MPIDU_Datatype_add_ref(dtp);
         }
         if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
-            MPID_Datatype_get_ptr(target_datatype, dtp);
-            MPID_Datatype_add_ref(dtp);
+            MPIDU_Datatype_get_ptr(target_datatype, dtp);
+            MPIDU_Datatype_add_ref(dtp);
         }
 
-        MPID_Datatype_is_contig(origin_datatype, &is_origin_contig);
-        MPID_Datatype_is_contig(target_datatype, &is_target_contig);
+        MPIDU_Datatype_is_contig(origin_datatype, &is_origin_contig);
+        MPIDU_Datatype_is_contig(target_datatype, &is_target_contig);
 
         /* Judge if we can use IMMED data packet */
         if (MPIR_DATATYPE_IS_PREDEFINED(origin_datatype) &&
@@ -224,7 +224,7 @@ int MPIDI_CH3I_Get(void *origin_addr, int origin_count, MPI_Datatype
     intptr_t orig_data_sz, target_data_sz;
     int dt_contig ATTRIBUTE((unused)), rank;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
-    MPID_Datatype *dtp;
+    MPIDU_Datatype*dtp;
     MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
     int made_progress = 0;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_GET);
@@ -306,18 +306,18 @@ int MPIDI_CH3I_Get(void *origin_addr, int origin_count, MPI_Datatype
         /* if source or target datatypes are derived, increment their
          * reference counts */
         if (!MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) {
-            MPID_Datatype_get_ptr(origin_datatype, dtp);
-            MPID_Datatype_add_ref(dtp);
+            MPIDU_Datatype_get_ptr(origin_datatype, dtp);
+            MPIDU_Datatype_add_ref(dtp);
         }
         if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
-            MPID_Datatype_get_ptr(target_datatype, dtp);
-            MPID_Datatype_add_ref(dtp);
+            MPIDU_Datatype_get_ptr(target_datatype, dtp);
+            MPIDU_Datatype_add_ref(dtp);
         }
 
-        MPID_Datatype_is_contig(origin_datatype, &is_origin_contig);
-        MPID_Datatype_is_contig(target_datatype, &is_target_contig);
+        MPIDU_Datatype_is_contig(origin_datatype, &is_origin_contig);
+        MPIDU_Datatype_is_contig(target_datatype, &is_target_contig);
 
-        MPID_Datatype_get_size_macro(target_datatype, target_type_size);
+        MPIDU_Datatype_get_size_macro(target_datatype, target_type_size);
         MPIU_Assign_trunc(target_data_sz, target_count * target_type_size, intptr_t);
 
         /* Judge if we can use IMMED data response packet */
@@ -394,7 +394,7 @@ int MPIDI_CH3I_Accumulate(const void *origin_addr, int origin_count, MPI_Datatyp
     intptr_t data_sz;
     int dt_contig ATTRIBUTE((unused)), rank;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
-    MPID_Datatype *dtp;
+    MPIDU_Datatype*dtp;
     MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
     int made_progress = 0;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_ACCUMULATE);
@@ -455,7 +455,7 @@ int MPIDI_CH3I_Accumulate(const void *origin_addr, int origin_count, MPI_Datatyp
         int is_origin_contig, is_target_contig;
         MPI_Aint stream_elem_count, stream_unit_count;
         MPI_Aint predefined_dtp_size, predefined_dtp_count, predefined_dtp_extent;
-        MPID_Datatype *origin_dtp = NULL, *target_dtp = NULL;
+        MPIDU_Datatype*origin_dtp = NULL, *target_dtp = NULL;
         int i;
 
         /* queue it up */
@@ -478,23 +478,23 @@ int MPIDI_CH3I_Accumulate(const void *origin_addr, int origin_count, MPI_Datatyp
         /* if source or target datatypes are derived, increment their
          * reference counts */
         if (!MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) {
-            MPID_Datatype_get_ptr(origin_datatype, origin_dtp);
+            MPIDU_Datatype_get_ptr(origin_datatype, origin_dtp);
         }
         if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
-            MPID_Datatype_get_ptr(target_datatype, target_dtp);
+            MPIDU_Datatype_get_ptr(target_datatype, target_dtp);
         }
 
         /* Get size and count for predefined datatype elements */
         if (MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) {
-            MPID_Datatype_get_size_macro(origin_datatype, predefined_dtp_size);
+            MPIDU_Datatype_get_size_macro(origin_datatype, predefined_dtp_size);
             predefined_dtp_count = origin_count;
-            MPID_Datatype_get_extent_macro(origin_datatype, predefined_dtp_extent);
+            MPIDU_Datatype_get_extent_macro(origin_datatype, predefined_dtp_extent);
         }
         else {
             MPIU_Assert(origin_dtp->basic_type != MPI_DATATYPE_NULL);
-            MPID_Datatype_get_size_macro(origin_dtp->basic_type, predefined_dtp_size);
+            MPIDU_Datatype_get_size_macro(origin_dtp->basic_type, predefined_dtp_size);
             predefined_dtp_count = data_sz / predefined_dtp_size;
-            MPID_Datatype_get_extent_macro(origin_dtp->basic_type, predefined_dtp_extent);
+            MPIDU_Datatype_get_extent_macro(origin_dtp->basic_type, predefined_dtp_extent);
         }
         MPIU_Assert(predefined_dtp_count > 0 && predefined_dtp_size > 0 &&
                     predefined_dtp_extent > 0);
@@ -507,15 +507,15 @@ int MPIDI_CH3I_Accumulate(const void *origin_addr, int origin_count, MPI_Datatyp
 
         for (i = 0; i < stream_unit_count; i++) {
             if (origin_dtp != NULL) {
-                MPID_Datatype_add_ref(origin_dtp);
+                MPIDU_Datatype_add_ref(origin_dtp);
             }
             if (target_dtp != NULL) {
-                MPID_Datatype_add_ref(target_dtp);
+                MPIDU_Datatype_add_ref(target_dtp);
             }
         }
 
-        MPID_Datatype_is_contig(origin_datatype, &is_origin_contig);
-        MPID_Datatype_is_contig(target_datatype, &is_target_contig);
+        MPIDU_Datatype_is_contig(origin_datatype, &is_origin_contig);
+        MPIDU_Datatype_is_contig(target_datatype, &is_target_contig);
 
         /* Judge if we can use IMMED data packet */
         if (MPIR_DATATYPE_IS_PREDEFINED(origin_datatype) &&
@@ -607,7 +607,7 @@ int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count,
     int rank;
     int dt_contig ATTRIBUTE((unused));
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
-    MPID_Datatype *dtp;
+    MPIDU_Datatype*dtp;
     MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
     int made_progress = 0;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_GET_ACCUMULATE);
@@ -672,7 +672,7 @@ int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count,
         int is_origin_contig, is_target_contig, is_result_contig;
         MPI_Aint stream_elem_count, stream_unit_count;
         MPI_Aint predefined_dtp_size, predefined_dtp_count, predefined_dtp_extent;
-        MPID_Datatype *origin_dtp = NULL, *target_dtp = NULL, *result_dtp = NULL;
+        MPIDU_Datatype*origin_dtp = NULL, *target_dtp = NULL, *result_dtp = NULL;
         int is_empty_origin = FALSE;
 
         /* Judge if origin buffer is empty */
@@ -704,17 +704,17 @@ int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count,
         /* if source or target datatypes are derived, increment their
          * reference counts */
         if (is_empty_origin == FALSE && !MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) {
-            MPID_Datatype_get_ptr(origin_datatype, origin_dtp);
+            MPIDU_Datatype_get_ptr(origin_datatype, origin_dtp);
         }
         if (!MPIR_DATATYPE_IS_PREDEFINED(result_datatype)) {
-            MPID_Datatype_get_ptr(result_datatype, result_dtp);
+            MPIDU_Datatype_get_ptr(result_datatype, result_dtp);
         }
         if (!MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
-            MPID_Datatype_get_ptr(target_datatype, target_dtp);
+            MPIDU_Datatype_get_ptr(target_datatype, target_dtp);
         }
 
         if (is_empty_origin == FALSE) {
-            MPID_Datatype_get_size_macro(origin_datatype, origin_type_size);
+            MPIDU_Datatype_get_size_macro(origin_datatype, origin_type_size);
             MPIU_Assign_trunc(orig_data_sz, origin_count * origin_type_size, intptr_t);
         }
         else {
@@ -722,19 +722,19 @@ int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count,
             orig_data_sz = 0;
         }
 
-        MPID_Datatype_get_size_macro(target_datatype, target_type_size);
+        MPIDU_Datatype_get_size_macro(target_datatype, target_type_size);
 
         /* Get size and count for predefined datatype elements */
         if (MPIR_DATATYPE_IS_PREDEFINED(target_datatype)) {
             predefined_dtp_size = target_type_size;
             predefined_dtp_count = target_count;
-            MPID_Datatype_get_extent_macro(target_datatype, predefined_dtp_extent);
+            MPIDU_Datatype_get_extent_macro(target_datatype, predefined_dtp_extent);
         }
         else {
             MPIU_Assert(target_dtp->basic_type != MPI_DATATYPE_NULL);
-            MPID_Datatype_get_size_macro(target_dtp->basic_type, predefined_dtp_size);
+            MPIDU_Datatype_get_size_macro(target_dtp->basic_type, predefined_dtp_size);
             predefined_dtp_count = target_data_sz / predefined_dtp_size;
-            MPID_Datatype_get_extent_macro(target_dtp->basic_type, predefined_dtp_extent);
+            MPIDU_Datatype_get_extent_macro(target_dtp->basic_type, predefined_dtp_extent);
         }
         MPIU_Assert(predefined_dtp_count > 0 && predefined_dtp_size > 0 &&
                     predefined_dtp_extent > 0);
@@ -747,25 +747,25 @@ int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count,
 
         for (i = 0; i < stream_unit_count; i++) {
             if (origin_dtp != NULL) {
-                MPID_Datatype_add_ref(origin_dtp);
+                MPIDU_Datatype_add_ref(origin_dtp);
             }
             if (target_dtp != NULL) {
-                MPID_Datatype_add_ref(target_dtp);
+                MPIDU_Datatype_add_ref(target_dtp);
             }
             if (result_dtp != NULL) {
-                MPID_Datatype_add_ref(result_dtp);
+                MPIDU_Datatype_add_ref(result_dtp);
             }
         }
 
         if (is_empty_origin == FALSE) {
-            MPID_Datatype_is_contig(origin_datatype, &is_origin_contig);
+            MPIDU_Datatype_is_contig(origin_datatype, &is_origin_contig);
         }
         else {
             /* If origin buffer is empty, mark origin data as contig data */
             is_origin_contig = 1;
         }
-        MPID_Datatype_is_contig(target_datatype, &is_target_contig);
-        MPID_Datatype_is_contig(result_datatype, &is_result_contig);
+        MPIDU_Datatype_is_contig(target_datatype, &is_target_contig);
+        MPIDU_Datatype_is_contig(result_datatype, &is_result_contig);
 
         /* Judge if we can use IMMED data packet */
         if ((is_empty_origin == TRUE || MPIR_DATATYPE_IS_PREDEFINED(origin_datatype)) &&
@@ -1047,7 +1047,7 @@ int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr,
 
         /* REQUIRE: All datatype arguments must be of the same, builtin
          * type and counts must be 1. */
-        MPID_Datatype_get_size_macro(datatype, type_size);
+        MPIDU_Datatype_get_size_macro(datatype, type_size);
         MPIU_Assert(type_size <= sizeof(MPIDI_CH3_CAS_Immed_u));
 
         src = (void *) origin_addr, dest = (void *) (&(cas_pkt->origin_data));
@@ -1169,10 +1169,10 @@ int MPID_Fetch_and_op(const void *origin_addr, void *result_addr,
 
         /************** Setting packet struct areas in operation ****************/
 
-        MPID_Datatype_get_size_macro(datatype, type_size);
+        MPIDU_Datatype_get_size_macro(datatype, type_size);
         MPIU_Assert(type_size <= sizeof(MPIDI_CH3_FOP_Immed_u));
 
-        MPID_Datatype_is_contig(datatype, &is_contig);
+        MPIDU_Datatype_is_contig(datatype, &is_contig);
 
         if (is_contig) {
             /* Judge if we can use IMMED data packet */
diff --git a/src/mpid/ch3/src/ch3u_rma_pkthandler.c b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
index 7aed6dc..d9da632 100644
--- a/src/mpid/ch3/src/ch3u_rma_pkthandler.c
+++ b/src/mpid/ch3/src/ch3u_rma_pkthandler.c
@@ -294,7 +294,7 @@ int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         /* Immed packet type is used when target datatype is predefined datatype. */
         MPIU_Assert(MPIR_DATATYPE_IS_PREDEFINED(put_pkt->datatype));
 
-        MPID_Datatype_get_size_macro(put_pkt->datatype, type_size);
+        MPIDU_Datatype_get_size_macro(put_pkt->datatype, type_size);
 
         /* copy data from packet header to target buffer */
         MPIU_Memcpy(put_pkt->addr, put_pkt->info.data, put_pkt->count * type_size);
@@ -331,7 +331,7 @@ int MPIDI_CH3_PktHandler_Put(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
             MPIDI_Request_set_type(req, MPIDI_REQUEST_TYPE_PUT_RECV);
             req->dev.datatype = put_pkt->datatype;
 
-            MPID_Datatype_get_size_macro(put_pkt->datatype, type_size);
+            MPIDU_Datatype_get_size_macro(put_pkt->datatype, type_size);
 
             req->dev.recv_data_sz = type_size * put_pkt->count;
             MPIU_Assert(req->dev.recv_data_sz > 0);
@@ -510,9 +510,9 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         get_resp_pkt->target_rank = win_ptr->comm_ptr->rank;
 
         /* length of target data */
-        MPID_Datatype_get_size_macro(get_pkt->datatype, type_size);
+        MPIDU_Datatype_get_size_macro(get_pkt->datatype, type_size);
 
-        MPID_Datatype_is_contig(get_pkt->datatype, &is_contig);
+        MPIDU_Datatype_is_contig(get_pkt->datatype, &is_contig);
 
         if (get_pkt->flags & MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP) {
             MPIU_Assign_trunc(len, get_pkt->count * type_size, size_t);
@@ -556,11 +556,11 @@ int MPIDI_CH3_PktHandler_Get(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * 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();
+            req->dev.segment_ptr = MPIDU_Segment_alloc();
             MPIR_ERR_CHKANDJUMP1(req->dev.segment_ptr == NULL, mpi_errno,
-                                 MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
+                                 MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
 
-            MPID_Segment_init(get_pkt->addr, get_pkt->count,
+            MPIDU_Segment_init(get_pkt->addr, get_pkt->count,
                               get_pkt->datatype, req->dev.segment_ptr, 0);
             req->dev.segment_first = 0;
             req->dev.segment_size = get_pkt->count * type_size;
@@ -748,7 +748,7 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
             else {
                 req->dev.OnFinal = MPIDI_CH3_ReqHandler_AccumRecvComplete;
 
-                MPID_Datatype_get_extent_macro(accum_pkt->datatype, extent);
+                MPIDU_Datatype_get_extent_macro(accum_pkt->datatype, extent);
 
                 MPIU_Assert(!MPIDI_Request_get_srbuf_flag(req));
                 /* allocate a SRBuf for receiving stream unit */
@@ -766,7 +766,7 @@ int MPIDI_CH3_PktHandler_Accumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 
                 req->dev.user_buf = req->dev.tmpbuf;
 
-                MPID_Datatype_get_size_macro(accum_pkt->datatype, type_size);
+                MPIDU_Datatype_get_size_macro(accum_pkt->datatype, type_size);
 
                 total_len = type_size * accum_pkt->count;
                 stream_elem_count = MPIDI_CH3U_SRBuf_size / extent;
@@ -919,7 +919,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         win_ptr->at_completion_counter++;
 
         /* Calculate the length of reponse data, ensure that it fits into immed packet. */
-        MPID_Datatype_get_size_macro(get_accum_pkt->datatype, type_size);
+        MPIDU_Datatype_get_size_macro(get_accum_pkt->datatype, type_size);
         MPIU_Assign_trunc(len, get_accum_pkt->count * type_size, size_t);
 
         MPIDI_Pkt_init(get_accum_resp_pkt, MPIDI_CH3_PKT_GET_ACCUM_RESP_IMMED);
@@ -1035,7 +1035,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
                     complete = 1;
                 }
                 else {
-                    MPID_Datatype_get_extent_macro(get_accum_pkt->datatype, extent);
+                    MPIDU_Datatype_get_extent_macro(get_accum_pkt->datatype, extent);
 
                     MPIU_Assert(!MPIDI_Request_get_srbuf_flag(req));
                     /* allocate a SRBuf for receiving stream unit */
@@ -1053,7 +1053,7 @@ int MPIDI_CH3_PktHandler_GetAccumulate(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
 
                     req->dev.user_buf = req->dev.tmpbuf;
 
-                    MPID_Datatype_get_size_macro(get_accum_pkt->datatype, type_size);
+                    MPIDU_Datatype_get_size_macro(get_accum_pkt->datatype, type_size);
                     total_len = type_size * get_accum_pkt->count;
                     stream_elem_count = MPIDI_CH3U_SRBuf_size / extent;
 
@@ -1195,7 +1195,7 @@ int MPIDI_CH3_PktHandler_CAS(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         cas_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_ACK;
 
     /* Copy old value into the response packet */
-    MPID_Datatype_get_size_macro(cas_pkt->datatype, len);
+    MPIDU_Datatype_get_size_macro(cas_pkt->datatype, len);
     MPIU_Assert(len <= sizeof(MPIDI_CH3_CAS_Immed_u));
 
     if (win_ptr->shm_allocated == TRUE)
@@ -1293,7 +1293,7 @@ int MPIDI_CH3_PktHandler_CASResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
             MPIR_ERR_POP(mpi_errno);
     }
 
-    MPID_Datatype_get_size_macro(req->dev.datatype, len);
+    MPIDU_Datatype_get_size_macro(req->dev.datatype, len);
 
     MPIU_Memcpy(req->dev.user_buf, (void *) &cas_resp_pkt->info.data, len);
 
@@ -1352,7 +1352,7 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
     (*buflen) = sizeof(MPIDI_CH3_Pkt_t);
     (*rreqp) = NULL;
 
-    MPID_Datatype_get_size_macro(fop_pkt->datatype, type_size);
+    MPIDU_Datatype_get_size_macro(fop_pkt->datatype, type_size);
 
     if (pkt->type == MPIDI_CH3_PKT_FOP_IMMED) {
 
@@ -1462,7 +1462,7 @@ int MPIDI_CH3_PktHandler_FOP(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
             data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
             data_buf = (char *) pkt + sizeof(MPIDI_CH3_Pkt_t);
 
-            MPID_Datatype_get_extent_macro(fop_pkt->datatype, extent);
+            MPIDU_Datatype_get_extent_macro(fop_pkt->datatype, extent);
 
             req->dev.user_buf = MPL_malloc(extent);
             if (!req->dev.user_buf) {
@@ -1549,7 +1549,7 @@ int MPIDI_CH3_PktHandler_FOPResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
     data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
     data_buf = (char *) pkt + sizeof(MPIDI_CH3_Pkt_t);
 
-    MPID_Datatype_get_size_macro(req->dev.datatype, type_size);
+    MPIDU_Datatype_get_size_macro(req->dev.datatype, type_size);
     req->dev.recv_data_sz = type_size;
     req->dev.user_count = 1;
 
@@ -1637,7 +1637,7 @@ int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
     data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
     data_buf = (char *) pkt + sizeof(MPIDI_CH3_Pkt_t);
 
-    MPID_Datatype_get_size_macro(req->dev.datatype, type_size);
+    MPIDU_Datatype_get_size_macro(req->dev.datatype, type_size);
 
     *rreqp = req;
 
@@ -1667,8 +1667,8 @@ int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
             basic_type = req->dev.datatype_ptr->basic_type;
         }
 
-        MPID_Datatype_get_extent_macro(basic_type, basic_type_extent);
-        MPID_Datatype_get_size_macro(basic_type, basic_type_size);
+        MPIDU_Datatype_get_extent_macro(basic_type, basic_type_extent);
+        MPIDU_Datatype_get_size_macro(basic_type, basic_type_size);
 
         /* Note: here we get the stream_offset from the extended packet header
          * in the response request, which is set in issue_get_acc_op() funcion.
@@ -1697,8 +1697,8 @@ int MPIDI_CH3_PktHandler_Get_AccumResp(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt,
         else {
             *buflen = sizeof(MPIDI_CH3_Pkt_t);
 
-            req->dev.segment_ptr = MPID_Segment_alloc();
-            MPID_Segment_init(req->dev.user_buf, req->dev.user_count, req->dev.datatype,
+            req->dev.segment_ptr = MPIDU_Segment_alloc();
+            MPIDU_Segment_init(req->dev.user_buf, req->dev.user_count, req->dev.datatype,
                               req->dev.segment_ptr, 0);
             req->dev.segment_first = contig_stream_offset;
             req->dev.segment_size = contig_stream_offset + req->dev.recv_data_sz;
@@ -1832,7 +1832,7 @@ int MPIDI_CH3_PktHandler_GetResp(MPIDI_VC_t * vc ATTRIBUTE((unused)),
     data_len = *buflen - sizeof(MPIDI_CH3_Pkt_t);
     data_buf = (char *) pkt + sizeof(MPIDI_CH3_Pkt_t);
 
-    MPID_Datatype_get_size_macro(req->dev.datatype, type_size);
+    MPIDU_Datatype_get_size_macro(req->dev.datatype, type_size);
     req->dev.recv_data_sz = type_size * req->dev.user_count;
 
     *rreqp = req;
diff --git a/src/mpid/ch3/src/ch3u_rma_reqops.c b/src/mpid/ch3/src/ch3u_rma_reqops.c
index 4882a48..ec871fd 100644
--- a/src/mpid/ch3/src/ch3u_rma_reqops.c
+++ b/src/mpid/ch3/src/ch3u_rma_reqops.c
@@ -19,7 +19,7 @@ int MPID_Rput(const void *origin_addr, int origin_count,
 {
     int mpi_errno = MPI_SUCCESS;
     int dt_contig ATTRIBUTE((unused));
-    MPID_Datatype *dtp;
+    MPIDU_Datatype*dtp;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
     intptr_t data_sz;
     MPID_Request *ureq;
@@ -82,7 +82,7 @@ int MPID_Rget(void *origin_addr, int origin_count,
 {
     int mpi_errno = MPI_SUCCESS;
     int dt_contig ATTRIBUTE((unused));
-    MPID_Datatype *dtp;
+    MPIDU_Datatype*dtp;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
     intptr_t data_sz;
     MPID_Request *ureq;
@@ -145,7 +145,7 @@ int MPID_Raccumulate(const void *origin_addr, int origin_count,
 {
     int mpi_errno = MPI_SUCCESS;
     int dt_contig ATTRIBUTE((unused));
-    MPID_Datatype *dtp;
+    MPIDU_Datatype*dtp;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
     intptr_t data_sz;
     MPID_Request *ureq;
@@ -209,7 +209,7 @@ int MPID_Rget_accumulate(const void *origin_addr, int origin_count,
 {
     int mpi_errno = MPI_SUCCESS;
     int dt_contig ATTRIBUTE((unused));
-    MPID_Datatype *dtp;
+    MPIDU_Datatype*dtp;
     MPI_Aint dt_true_lb ATTRIBUTE((unused));
     intptr_t data_sz, trg_data_sz;
     MPID_Request *ureq;
diff --git a/src/mpid/ch3/src/ch3u_rndv.c b/src/mpid/ch3/src/ch3u_rndv.c
index 96aa8c5..1787628 100644
--- a/src/mpid/ch3/src/ch3u_rndv.c
+++ b/src/mpid/ch3/src/ch3u_rndv.c
@@ -206,7 +206,7 @@ int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
     int dt_contig;
     MPI_Aint dt_true_lb;
     intptr_t data_sz;
-    MPID_Datatype * dt_ptr;
+    MPIDU_Datatype* dt_ptr;
     int mpi_errno = MPI_SUCCESS;
     
     MPL_DBG_MSG(MPIDI_CH3_DBG_OTHER,VERBOSE,"received rndv CTS pkt");
@@ -258,9 +258,9 @@ int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
     }
     else
     {
-	sreq->dev.segment_ptr = MPID_Segment_alloc( );
-        MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPID_Segment_alloc");
-	MPID_Segment_init(sreq->dev.user_buf, sreq->dev.user_count, 
+	sreq->dev.segment_ptr = MPIDU_Segment_alloc( );
+        MPIR_ERR_CHKANDJUMP1((sreq->dev.segment_ptr == NULL), mpi_errno, MPI_ERR_OTHER, "**nomem", "**nomem %s", "MPIDU_Segment_alloc");
+	MPIDU_Segment_init(sreq->dev.user_buf, sreq->dev.user_count, 
 			  sreq->dev.datatype, sreq->dev.segment_ptr, 0);
 	sreq->dev.segment_first = 0;
 	sreq->dev.segment_size = data_sz;
diff --git a/src/mpid/ch3/src/mpid_imrecv.c b/src/mpid/ch3/src/mpid_imrecv.c
index c9f3a98..8b46e1e 100644
--- a/src/mpid/ch3/src/mpid_imrecv.c
+++ b/src/mpid/ch3/src/mpid_imrecv.c
@@ -99,8 +99,8 @@ int MPID_Imrecv(void *buf, int count, MPI_Datatype datatype,
                entire message has arrived. */
             if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
             {
-                MPID_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
-                MPID_Datatype_add_ref(rreq->dev.datatype_ptr);
+                MPIDU_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
+                MPIDU_Datatype_add_ref(rreq->dev.datatype_ptr);
             }
 
         }
@@ -113,8 +113,8 @@ int MPID_Imrecv(void *buf, int count, MPI_Datatype datatype,
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
         if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
         {
-            MPID_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
-            MPID_Datatype_add_ref(rreq->dev.datatype_ptr);
+            MPIDU_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
+            MPIDU_Datatype_add_ref(rreq->dev.datatype_ptr);
         }
     }
     else if (MPIDI_Request_get_msg_type(rreq) == MPIDI_REQUEST_SELF_MSG)
diff --git a/src/mpid/ch3/src/mpid_irecv.c b/src/mpid/ch3/src/mpid_irecv.c
index 8338b2c..3261621 100644
--- a/src/mpid/ch3/src/mpid_irecv.c
+++ b/src/mpid/ch3/src/mpid_irecv.c
@@ -106,8 +106,8 @@ int MPID_Irecv(void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int
 		   entire message has arrived. */
 		if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 		{
-		    MPID_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
-		    MPID_Datatype_add_ref(rreq->dev.datatype_ptr);
+		    MPIDU_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
+		    MPIDU_Datatype_add_ref(rreq->dev.datatype_ptr);
 		}
 	    
 	    }
@@ -120,8 +120,8 @@ int MPID_Irecv(void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int
 	    if (mpi_errno) MPIR_ERR_POP( mpi_errno );
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
-		MPID_Datatype_add_ref(rreq->dev.datatype_ptr);
+		MPIDU_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
+		MPIDU_Datatype_add_ref(rreq->dev.datatype_ptr);
 	    }
 	}
 	else if (MPIDI_Request_get_msg_type(rreq) == MPIDI_REQUEST_SELF_MSG)
@@ -151,8 +151,8 @@ int MPID_Irecv(void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int
 	
 	if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	{
-	    MPID_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
-	    MPID_Datatype_add_ref(rreq->dev.datatype_ptr);
+	    MPIDU_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
+	    MPIDU_Datatype_add_ref(rreq->dev.datatype_ptr);
 	}
 
 	rreq->dev.recv_pending_count = 1;
diff --git a/src/mpid/ch3/src/mpid_irsend.c b/src/mpid/ch3/src/mpid_irsend.c
index b11bb1b..bc3b78d 100644
--- a/src/mpid/ch3/src/mpid_irsend.c
+++ b/src/mpid/ch3/src/mpid_irsend.c
@@ -23,7 +23,7 @@ int MPID_Irsend(const void * buf, int count, MPI_Datatype datatype, int rank, in
     intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPID_Datatype * dt_ptr;
+    MPIDU_Datatype* dt_ptr;
     MPID_Request * sreq;
     MPIDI_VC_t * vc;
 #if defined(MPID_USE_SEQUENCE_NUMBERS)
@@ -127,7 +127,7 @@ int MPID_Irsend(const void * buf, int count, MPI_Datatype datatype, int rank, in
             /* If we're not complete, then add a reference to the datatype */
             if (sreq && sreq->dev.OnDataAvail) {
                 sreq->dev.datatype_ptr = dt_ptr;
-                MPID_Datatype_add_ref(dt_ptr);
+                MPIDU_Datatype_add_ref(dt_ptr);
             }
         }
     } else {
@@ -140,7 +140,7 @@ int MPID_Irsend(const void * buf, int count, MPI_Datatype datatype, int rank, in
                                      context_offset );
 	if (sreq && dt_ptr != NULL) {
 	    sreq->dev.datatype_ptr = dt_ptr;
-	    MPID_Datatype_add_ref(dt_ptr);
+	    MPIDU_Datatype_add_ref(dt_ptr);
 	}
     }
 
diff --git a/src/mpid/ch3/src/mpid_isend.c b/src/mpid/ch3/src/mpid_isend.c
index f823d62..7e774be 100644
--- a/src/mpid/ch3/src/mpid_isend.c
+++ b/src/mpid/ch3/src/mpid_isend.c
@@ -34,7 +34,7 @@ int MPID_Isend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank
     intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPID_Datatype * dt_ptr;
+    MPIDU_Datatype* dt_ptr;
     MPID_Request * sreq;
     MPIDI_VC_t * vc=0;
 #if defined(MPID_USE_SEQUENCE_NUMBERS)
@@ -151,7 +151,7 @@ int MPID_Isend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank
 	    /* If we're not complete, then add a reference to the datatype */
 	    if (sreq && sreq->dev.OnDataAvail) {
 		sreq->dev.datatype_ptr = dt_ptr;
-		MPID_Datatype_add_ref(dt_ptr);
+		MPIDU_Datatype_add_ref(dt_ptr);
 	    }
 	}
     }
@@ -171,7 +171,7 @@ int MPID_Isend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank
 	if (sreq && dt_ptr != NULL)
 	{
 	    sreq->dev.datatype_ptr = dt_ptr;
-	    MPID_Datatype_add_ref(dt_ptr);
+	    MPIDU_Datatype_add_ref(dt_ptr);
 	}
     }
 
diff --git a/src/mpid/ch3/src/mpid_issend.c b/src/mpid/ch3/src/mpid_issend.c
index 1d71357..1ee104b 100644
--- a/src/mpid/ch3/src/mpid_issend.c
+++ b/src/mpid/ch3/src/mpid_issend.c
@@ -21,7 +21,7 @@ int MPID_Issend(const void * buf, int count, MPI_Datatype datatype, int rank, in
     intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPID_Datatype * dt_ptr;
+    MPIDU_Datatype* dt_ptr;
     MPID_Request * sreq;
     MPIDI_VC_t * vc=0;
 #if defined(MPID_USE_SEQUENCE_NUMBERS)
@@ -95,7 +95,7 @@ int MPID_Issend(const void * buf, int count, MPI_Datatype datatype, int rank, in
 	/* If we're not complete, then add a reference to the datatype */
 	if (sreq && sreq->dev.OnDataAvail) {
 	    sreq->dev.datatype_ptr = dt_ptr;
-	    MPID_Datatype_add_ref(dt_ptr);
+	    MPIDU_Datatype_add_ref(dt_ptr);
 	}
     }
     else
@@ -115,7 +115,7 @@ int MPID_Issend(const void * buf, int count, MPI_Datatype datatype, int rank, in
 	if (sreq && dt_ptr != NULL)
 	{
 	    sreq->dev.datatype_ptr = dt_ptr;
-	    MPID_Datatype_add_ref(dt_ptr);
+	    MPIDU_Datatype_add_ref(dt_ptr);
 	}
     }
 
diff --git a/src/mpid/ch3/src/mpid_recv.c b/src/mpid/ch3/src/mpid_recv.c
index 6b3b45f..9dc5f3d 100644
--- a/src/mpid/ch3/src/mpid_recv.c
+++ b/src/mpid/ch3/src/mpid_recv.c
@@ -119,8 +119,8 @@ int MPID_Recv(void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int t
 		   entire message has arrived. */
 		if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 		{
-		    MPID_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
-		    MPID_Datatype_add_ref(rreq->dev.datatype_ptr);
+		    MPIDU_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
+		    MPIDU_Datatype_add_ref(rreq->dev.datatype_ptr);
 		}
 	    }
 	}
@@ -132,8 +132,8 @@ int MPID_Recv(void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int t
 	    if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
-		MPID_Datatype_add_ref(rreq->dev.datatype_ptr);
+		MPIDU_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
+		MPIDU_Datatype_add_ref(rreq->dev.datatype_ptr);
 	    }
 	}
 	else if (MPIDI_Request_get_msg_type(rreq) == MPIDI_REQUEST_SELF_MSG)
@@ -172,8 +172,8 @@ int MPID_Recv(void * buf, MPI_Aint count, MPI_Datatype datatype, int rank, int t
 	   decremented, and are freed if the refs are zero) */
 	if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	{
-	    MPID_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
-	    MPID_Datatype_add_ref(rreq->dev.datatype_ptr);
+	    MPIDU_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
+	    MPIDU_Datatype_add_ref(rreq->dev.datatype_ptr);
 	}
 
 	rreq->dev.recv_pending_count = 1;
diff --git a/src/mpid/ch3/src/mpid_rsend.c b/src/mpid/ch3/src/mpid_rsend.c
index 2b321fc..960aac9 100644
--- a/src/mpid/ch3/src/mpid_rsend.c
+++ b/src/mpid/ch3/src/mpid_rsend.c
@@ -25,7 +25,7 @@ int MPID_Rsend(const void * buf, int count, MPI_Datatype datatype, int rank, int
     intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPID_Datatype * dt_ptr;
+    MPIDU_Datatype* dt_ptr;
     MPID_Request * sreq = NULL;
     MPIDI_VC_t * vc;
 #if defined(MPID_USE_SEQUENCE_NUMBERS)
diff --git a/src/mpid/ch3/src/mpid_send.c b/src/mpid/ch3/src/mpid_send.c
index 81f2416..2f1b477 100644
--- a/src/mpid/ch3/src/mpid_send.c
+++ b/src/mpid/ch3/src/mpid_send.c
@@ -22,7 +22,7 @@ int MPID_Send(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank,
     intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPID_Datatype * dt_ptr;
+    MPIDU_Datatype* dt_ptr;
     MPID_Request * sreq = NULL;
     MPIDI_VC_t * vc;
 #if defined(MPID_USE_SEQUENCE_NUMBERS)
diff --git a/src/mpid/ch3/src/mpid_ssend.c b/src/mpid/ch3/src/mpid_ssend.c
index 31957b3..f1db29d 100644
--- a/src/mpid/ch3/src/mpid_ssend.c
+++ b/src/mpid/ch3/src/mpid_ssend.c
@@ -21,7 +21,7 @@ int MPID_Ssend(const void * buf, MPI_Aint count, MPI_Datatype datatype, int rank
     intptr_t data_sz;
     int dt_contig;
     MPI_Aint dt_true_lb;
-    MPID_Datatype * dt_ptr;
+    MPIDU_Datatype * dt_ptr;
     MPID_Request * sreq = NULL;
     MPIDI_VC_t * vc;
 #if defined(MPID_USE_SEQUENCE_NUMBERS)
diff --git a/src/mpid/ch3/src/mpid_startall.c b/src/mpid/ch3/src/mpid_startall.c
index b726f6d..f288dfb 100644
--- a/src/mpid/ch3/src/mpid_startall.c
+++ b/src/mpid/ch3/src/mpid_startall.c
@@ -175,8 +175,8 @@ int MPID_Send_init(const void * buf, int count, MPI_Datatype datatype, int rank,
     MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_SEND);
     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
     {
-	MPID_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
-	MPID_Datatype_add_ref(sreq->dev.datatype_ptr);
+	MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
+	MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
     }
     *request = sreq;
 
@@ -205,8 +205,8 @@ int MPID_Ssend_init(const void * buf, int count, MPI_Datatype datatype, int rank
     MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_SSEND);
     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
     {
-	MPID_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
-	MPID_Datatype_add_ref(sreq->dev.datatype_ptr);
+	MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
+	MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
     }
     *request = sreq;
 
@@ -235,8 +235,8 @@ int MPID_Rsend_init(const void * buf, int count, MPI_Datatype datatype, int rank
     MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_RSEND);
     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
     {
-	MPID_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
-	MPID_Datatype_add_ref(sreq->dev.datatype_ptr);
+	MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
+	MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
     }
     *request = sreq;
 
@@ -265,8 +265,8 @@ int MPID_Bsend_init(const void * buf, int count, MPI_Datatype datatype, int rank
     MPIDI_Request_set_type(sreq, MPIDI_REQUEST_TYPE_BSEND);
     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
     {
-	MPID_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
-	MPID_Datatype_add_ref(sreq->dev.datatype_ptr);
+	MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
+	MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
     }
     *request = sreq;
 
@@ -323,8 +323,8 @@ int MPID_Recv_init(void * buf, int count, MPI_Datatype datatype, int rank, int t
     MPIDI_Request_set_type(rreq, MPIDI_REQUEST_TYPE_RECV);
     if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
     {
-	MPID_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
-	MPID_Datatype_add_ref(rreq->dev.datatype_ptr);
+	MPIDU_Datatype_get_ptr(datatype, rreq->dev.datatype_ptr);
+	MPIDU_Datatype_add_ref(rreq->dev.datatype_ptr);
     }
     *request = rreq;
 
diff --git a/src/mpid/ch3/src/mpidi_isend_self.c b/src/mpid/ch3/src/mpidi_isend_self.c
index 75e5d22..412dd66 100644
--- a/src/mpid/ch3/src/mpidi_isend_self.c
+++ b/src/mpid/ch3/src/mpidi_isend_self.c
@@ -115,12 +115,12 @@ int MPIDI_Isend_self(const void * buf, MPI_Aint count, MPI_Datatype datatype, in
           "added receive request to unexpected queue; attaching send request");
 	    if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
 	    {
-		MPID_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
-		MPID_Datatype_add_ref(sreq->dev.datatype_ptr);
+		MPIDU_Datatype_get_ptr(datatype, sreq->dev.datatype_ptr);
+		MPIDU_Datatype_add_ref(sreq->dev.datatype_ptr);
 	    }
 	    rreq->partner_request = sreq;
 	    rreq->dev.sender_req_id = sreq->handle;
-	    MPID_Datatype_get_size_macro(datatype, dt_sz);
+	    MPIDU_Datatype_get_size_macro(datatype, dt_sz);
 	    MPIR_STATUS_SET_COUNT(rreq->status, count * dt_sz);
 	}
 	else
diff --git a/src/mpid/common/datatype/dataloop/dataloop_parts.h b/src/mpid/common/datatype/dataloop/dataloop_parts.h
index 56d6bd5..47c77f9 100644
--- a/src/mpid/common/datatype/dataloop/dataloop_parts.h
+++ b/src/mpid/common/datatype/dataloop/dataloop_parts.h
@@ -52,7 +52,7 @@
  * optimizations may be applied. They are also passed in at Segment_init
  * time to specify which dataloop to use.
  *
- * Note: The flag to MPID_Segment_init() was originally simply "hetero"
+ * Note: The flag to MPIDU_Segment_init() was originally simply "hetero"
  * and was a boolean value (0 meaning homogeneous). Some MPICH code
  * may still rely on HOMOGENEOUS being "0" and HETEROGENEOUS being "1".
  */
diff --git a/src/mpid/common/datatype/dataloop/segment_flatten.c b/src/mpid/common/datatype/dataloop/segment_flatten.c
index e38ca97..5b6015a 100644
--- a/src/mpid/common/datatype/dataloop/segment_flatten.c
+++ b/src/mpid/common/datatype/dataloop/segment_flatten.c
@@ -52,7 +52,7 @@ struct PREPEND_PREFIX(mpi_flatten_params) {
     MPI_Aint *disps;
 };
 
-/* MPID_Segment_mpi_flatten - flatten a type into a representation
+/* MPIDU_Segment_mpi_flatten - flatten a type into a representation
  *                            appropriate for passing to hindexed create.
  *
  * NOTE: blocks will be in units of bytes when returned.
@@ -96,7 +96,7 @@ void PREPEND_PREFIX(Segment_mpi_flatten)(DLOOP_Segment *segp,
 				       NULL,
 				       &params);
 
-    /* last value already handled by MPID_Segment_manipulate */
+    /* last value already handled by MPIDU_Segment_manipulate */
     *lengthp = params.index;
     return;
 }
diff --git a/src/mpid/common/datatype/dataloop/segment_packunpack.c b/src/mpid/common/datatype/dataloop/segment_packunpack.c
index 86f9f00..26a491f 100644
--- a/src/mpid/common/datatype/dataloop/segment_packunpack.c
+++ b/src/mpid/common/datatype/dataloop/segment_packunpack.c
@@ -303,7 +303,7 @@ int PREPEND_PREFIX(Segment_vector_m2m)(DLOOP_Offset *blocks_p,
     return 0;
 }
 
-/* MPID_Segment_blkidx_m2m
+/* MPIDU_Segment_blkidx_m2m
  */
 int PREPEND_PREFIX(Segment_blkidx_m2m)(DLOOP_Offset *blocks_p,
 				       DLOOP_Count count,
@@ -383,7 +383,7 @@ int PREPEND_PREFIX(Segment_blkidx_m2m)(DLOOP_Offset *blocks_p,
     return 0;
 }
 
-/* MPID_Segment_index_m2m
+/* MPIDU_Segment_index_m2m
  */
 int PREPEND_PREFIX(Segment_index_m2m)(DLOOP_Offset *blocks_p,
 				      DLOOP_Count count,
diff --git a/src/mpid/common/datatype/mpid_contents_support.c b/src/mpid/common/datatype/mpid_contents_support.c
index 3294a73..7a85542 100644
--- a/src/mpid/common/datatype/mpid_contents_support.c
+++ b/src/mpid/common/datatype/mpid_contents_support.c
@@ -8,20 +8,20 @@
 #include <mpi.h>
 #include <mpid_datatype.h>
 
-void MPID_Type_access_contents(MPI_Datatype type,
+void MPIDU_Type_access_contents(MPI_Datatype type,
 			       int **ints_p,
 			       MPI_Aint **aints_p,
 			       MPI_Datatype **types_p)
 {
     int nr_ints, nr_aints, nr_types, combiner;
     int types_sz, struct_sz, ints_sz, epsilon, align_sz = 8;
-    MPID_Datatype *dtp;
-    MPID_Datatype_contents *cp;
+    MPIDU_Datatype *dtp;
+    MPIDU_Datatype_contents *cp;
 
     MPIR_Type_get_envelope_impl(type, &nr_ints, &nr_aints, &nr_types, &combiner);
 
     /* hardcoded handling of MPICH contents format... */
-    MPID_Datatype_get_ptr(type, dtp);
+    MPIDU_Datatype_get_ptr(type, dtp);
     DLOOP_Assert(dtp != NULL);
 
     cp = dtp->contents;
@@ -33,7 +33,7 @@ void MPID_Type_access_contents(MPI_Datatype type,
     }
 #endif
 
-    struct_sz = sizeof(MPID_Datatype_contents);
+    struct_sz = sizeof(MPIDU_Datatype_contents);
     types_sz  = nr_types * sizeof(MPI_Datatype);
     ints_sz   = nr_ints * sizeof(int);
 
@@ -57,7 +57,7 @@ void MPID_Type_access_contents(MPI_Datatype type,
 /* FIXME: Is this routine complete?  Why is it needed? If it is needed, it 
    must have a comment that describes why it is needed and the arguments 
    must have ATTRIBUTE((unused)) */
-void MPID_Type_release_contents(MPI_Datatype type,
+void MPIDU_Type_release_contents(MPI_Datatype type,
 				int **ints_p,
 				MPI_Aint **aints_p,
 				MPI_Datatype **types_p)
diff --git a/src/mpid/common/datatype/mpid_dataloop.h b/src/mpid/common/datatype/mpid_dataloop.h
index dd1e5ea..f3f0a63 100644
--- a/src/mpid/common/datatype/mpid_dataloop.h
+++ b/src/mpid/common/datatype/mpid_dataloop.h
@@ -13,7 +13,7 @@
 /* Note: this is where you define the prefix that will be prepended on
  * all externally visible generic dataloop and segment functions.
  */
-#define PREPEND_PREFIX(fn) MPID_ ## fn
+#define PREPEND_PREFIX(fn) MPIDU_ ## fn
 
 /* These following dataloop-specific types will be used throughout the DLOOP
  * instance:
@@ -44,31 +44,31 @@
  * as we see that we need them elsewhere.
  */
 #define DLOOP_Handle_get_loopdepth_macro(handle_,depth_,flag_) \
-    MPID_Datatype_get_loopdepth_macro(handle_,depth_,flag_)
+    MPIDU_Datatype_get_loopdepth_macro(handle_,depth_,flag_)
 
 #define DLOOP_Handle_get_loopsize_macro(handle_,size_,flag_) \
-    MPID_Datatype_get_loopsize_macro(handle_,size_,flag_)
+    MPIDU_Datatype_get_loopsize_macro(handle_,size_,flag_)
 
 #define DLOOP_Handle_set_loopptr_macro(handle_,lptr_,flag_) \
-    MPID_Datatype_set_loopptr_macro(handle_,lptr_,flag_)
+    MPIDU_Datatype_set_loopptr_macro(handle_,lptr_,flag_)
 
 #define DLOOP_Handle_set_loopdepth_macro(handle_,depth_,flag_) \
-    MPID_Datatype_set_loopdepth_macro(handle_,depth_,flag_)
+    MPIDU_Datatype_set_loopdepth_macro(handle_,depth_,flag_)
 
 #define DLOOP_Handle_set_loopsize_macro(handle_,size_,flag_) \
-    MPID_Datatype_set_loopsize_macro(handle_,size_,flag_)
+    MPIDU_Datatype_set_loopsize_macro(handle_,size_,flag_)
 
 #define DLOOP_Handle_get_loopptr_macro(handle_,lptr_,flag_) \
-    MPID_Datatype_get_loopptr_macro(handle_,lptr_,flag_)
+    MPIDU_Datatype_get_loopptr_macro(handle_,lptr_,flag_)
 
 #define DLOOP_Handle_get_size_macro(handle_,size_) \
-    MPID_Datatype_get_size_macro(handle_,size_)
+    MPIDU_Datatype_get_size_macro(handle_,size_)
 
 #define DLOOP_Handle_get_basic_type_macro(handle_,basic_type_) \
-    MPID_Datatype_get_basic_type(handle_, basic_type_)
+    MPIDU_Datatype_get_basic_type(handle_, basic_type_)
 
 #define DLOOP_Handle_get_extent_macro(handle_,extent_) \
-    MPID_Datatype_get_extent_macro(handle_,extent_)
+    MPIDU_Datatype_get_extent_macro(handle_,extent_)
 
 #define DLOOP_Handle_hasloop_macro(handle_)                           \
     ((HANDLE_GET_KIND(handle_) == HANDLE_KIND_BUILTIN) ? 0 : 1)
@@ -106,9 +106,9 @@
  * Note: DLOOP_DATALOOP_ALL_BYTES is used only when the device
  * defines MPID_NEEDS_DLOOP_ALL_BYTES.
  */
-#define MPID_DATALOOP_HETEROGENEOUS DLOOP_DATALOOP_HETEROGENEOUS
-#define MPID_DATALOOP_HOMOGENEOUS   DLOOP_DATALOOP_HOMOGENEOUS
-#define MPID_DATALOOP_ALL_BYTES     DLOOP_DATALOOP_ALL_BYTES
+#define MPIDU_DATALOOP_HETEROGENEOUS DLOOP_DATALOOP_HETEROGENEOUS
+#define MPIDU_DATALOOP_HOMOGENEOUS   DLOOP_DATALOOP_HOMOGENEOUS
+#define MPIDU_DATALOOP_ALL_BYTES     DLOOP_DATALOOP_ALL_BYTES
 
 #include <mpiimpl.h>
 
diff --git a/src/mpid/common/datatype/mpid_datatype.h b/src/mpid/common/datatype/mpid_datatype.h
index 4761f67..b648bb2 100644
--- a/src/mpid/common/datatype/mpid_datatype.h
+++ b/src/mpid/common/datatype/mpid_datatype.h
@@ -11,30 +11,30 @@
 #include "mpihandlemem.h"
 
 /* NOTE: 
- * - struct MPID_Dataloop and MPID_Segment are defined in 
+ * - struct MPIDU_Dataloop and MPIDU_Segment are defined in 
  *   src/mpid/common/datatype/mpid_dataloop.h (and gen_dataloop.h).
  * - MPIU_Object_alloc_t is defined in src/include/mpihandle.h
  */
 
-#define MPID_Datatype_get_ptr(a,ptr)   MPID_Getb_ptr(Datatype,a,0x000000ff,ptr)
-/* MPID_Datatype_get_basic_id() is useful for creating and indexing into arrays
+#define MPIDU_Datatype_get_ptr(a,ptr)   MPID_Getb_ptr(Datatype,a,0x000000ff,ptr)
+/* MPIDU_Datatype_get_basic_id() is useful for creating and indexing into arrays
    that store data on a per-basic type basis */
-#define MPID_Datatype_get_basic_id(a) ((a)&0x000000ff)
-#define MPID_Datatype_get_basic_size(a) (((a)&0x0000ff00)>>8)
+#define MPIDU_Datatype_get_basic_id(a) ((a)&0x000000ff)
+#define MPIDU_Datatype_get_basic_size(a) (((a)&0x0000ff00)>>8)
 
-#define MPID_Datatype_add_ref(datatype_ptr) MPIU_Object_add_ref((datatype_ptr))
+#define MPIDU_Datatype_add_ref(datatype_ptr) MPIU_Object_add_ref((datatype_ptr))
 
-#define MPID_Datatype_get_basic_type(a,basic_type_) do {                    \
+#define MPIDU_Datatype_get_basic_type(a,basic_type_) do {                    \
     void *ptr;								\
     switch (HANDLE_GET_KIND(a)) {					\
         case HANDLE_KIND_DIRECT:					\
-            ptr = MPID_Datatype_direct+HANDLE_INDEX(a);			\
-            basic_type_ = ((MPID_Datatype *) ptr)->basic_type;			\
+            ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a);			\
+            basic_type_ = ((MPIDU_Datatype *) ptr)->basic_type;			\
             break;							\
         case HANDLE_KIND_INDIRECT:					\
-            ptr = ((MPID_Datatype *)					\
-		   MPIU_Handle_get_ptr_indirect(a,&MPID_Datatype_mem));	\
-            basic_type_ = ((MPID_Datatype *) ptr)->basic_type;			\
+            ptr = ((MPIDU_Datatype *)					\
+		   MPIU_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem));	\
+            basic_type_ = ((MPIDU_Datatype *) ptr)->basic_type;			\
             break;							\
         case HANDLE_KIND_BUILTIN:					\
             basic_type_ = a;						\
@@ -53,11 +53,11 @@
         basic_type_ = MPI_DATATYPE_NULL;                                    \
  } while(0)
 
-/* MPID_Datatype_release decrements the reference count on the MPID_Datatype
- * and, if the refct is then zero, frees the MPID_Datatype and associated
+/* MPIDU_Datatype_release decrements the reference count on the MPID_Datatype
+ * and, if the refct is then zero, frees the MPIDU_Datatype and associated
  * structures.
  */
-#define MPID_Datatype_release(datatype_ptr) do {                            \
+#define MPIDU_Datatype_release(datatype_ptr) do {                            \
     int inuse_;								    \
 									    \
     MPIU_Object_release_ref((datatype_ptr),&inuse_);			    \
@@ -76,27 +76,27 @@
 	     }								    \
 	} */								    \
         if (lmpi_errno == MPI_SUCCESS) {				    \
-	    MPID_Datatype_free(datatype_ptr);				    \
+	    MPIDU_Datatype_free(datatype_ptr);				    \
         }								    \
     }                                                                       \
 } while(0)
 
 /* Note: Probably there is some clever way to build all of these from a macro.
  */
-#define MPID_Datatype_get_size_macro(a,size_) do {                      \
+#define MPIDU_Datatype_get_size_macro(a,size_) do {                      \
     void *ptr;								\
     switch (HANDLE_GET_KIND(a)) {					\
         case HANDLE_KIND_DIRECT:					\
-            ptr = MPID_Datatype_direct+HANDLE_INDEX(a);			\
-            size_ = ((MPID_Datatype *) ptr)->size;			\
+            ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a);			\
+            size_ = ((MPIDU_Datatype *) ptr)->size;			\
             break;							\
         case HANDLE_KIND_INDIRECT:					\
-            ptr = ((MPID_Datatype *)					\
-		   MPIU_Handle_get_ptr_indirect(a,&MPID_Datatype_mem));	\
-            size_ = ((MPID_Datatype *) ptr)->size;			\
+            ptr = ((MPIDU_Datatype *)					\
+		   MPIU_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem));	\
+            size_ = ((MPIDU_Datatype *) ptr)->size;			\
             break;							\
         case HANDLE_KIND_BUILTIN:					\
-            size_ = MPID_Datatype_get_basic_size(a);			\
+            size_ = MPIDU_Datatype_get_basic_size(a);			\
             break;							\
         case HANDLE_KIND_INVALID:					\
         default:							\
@@ -109,44 +109,44 @@
 /*
  * The following macro allows us to reference either the regular or 
  * hetero value for the 3 fields (NULL,_size,_depth) in the
- * MPID_Datatype structure.  This is used in the many
+ * MPIDU_Datatype structure.  This is used in the many
  * macros that access fields of the datatype.  We need this macro
  * to simplify the definition of the other macros in the case where
  * MPID_HAS_HETERO is *not* defined.
  */
 #if defined(MPID_HAS_HETERO) || 1
-#define MPID_GET_FIELD(hetero_,value_,fieldname_) do {                          \
-        if (hetero_ != MPID_DATALOOP_HETEROGENEOUS)                             \
-            value_ = ((MPID_Datatype *)ptr)->dataloop##fieldname_;              \
-        else value_ = ((MPID_Datatype *) ptr)->hetero_dloop##fieldname_;        \
+#define MPIDU_GET_FIELD(hetero_,value_,fieldname_) do {                          \
+        if (hetero_ != MPIDU_DATALOOP_HETEROGENEOUS)                             \
+            value_ = ((MPIDU_Datatype *)ptr)->dataloop##fieldname_;              \
+        else value_ = ((MPIDU_Datatype *) ptr)->hetero_dloop##fieldname_;        \
     } while(0)
 #else
-#define MPID_GET_FIELD(hetero_,value_,fieldname_) \
-      value_ = ((MPID_Datatype *)ptr)->dataloop##fieldname_
+#define MPIDU_GET_FIELD(hetero_,value_,fieldname_) \
+      value_ = ((MPIDU_Datatype *)ptr)->dataloop##fieldname_
 #endif
 
 #if defined(MPID_HAS_HETERO) || 1
-#define MPID_SET_FIELD(hetero_,value_,fieldname_) do {                          \
-        if (hetero_ != MPID_DATALOOP_HETEROGENEOUS)                             \
-            ((MPID_Datatype *)ptr)->dataloop##fieldname_ = value_;              \
-        else ((MPID_Datatype *) ptr)->hetero_dloop##fieldname_ = value_;        \
+#define MPIDU_SET_FIELD(hetero_,value_,fieldname_) do {                          \
+        if (hetero_ != MPIDU_DATALOOP_HETEROGENEOUS)                             \
+            ((MPIDU_Datatype *)ptr)->dataloop##fieldname_ = value_;              \
+        else ((MPIDU_Datatype *) ptr)->hetero_dloop##fieldname_ = value_;        \
     } while(0)
 #else
-#define MPID_SET_FIELD(hetero_,value_,fieldname_) \
-    ((MPID_Datatype *)ptr)->dataloop##fieldname_ = value_
+#define MPIDU_SET_FIELD(hetero_,value_,fieldname_) \
+    ((MPIDU_Datatype *)ptr)->dataloop##fieldname_ = value_
 #endif
  
-#define MPID_Datatype_get_loopdepth_macro(a,depth_,hetero_) do {        \
+#define MPIDU_Datatype_get_loopdepth_macro(a,depth_,hetero_) do {        \
     void *ptr;								\
     switch (HANDLE_GET_KIND(a)) {					\
         case HANDLE_KIND_DIRECT:					\
-            ptr = MPID_Datatype_direct+HANDLE_INDEX(a);			\
-            MPID_GET_FIELD(hetero_,depth_,_depth);                      \
+            ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a);			\
+            MPIDU_GET_FIELD(hetero_,depth_,_depth);                      \
             break;							\
         case HANDLE_KIND_INDIRECT:					\
-            ptr = ((MPID_Datatype *)					\
-		   MPIU_Handle_get_ptr_indirect(a,&MPID_Datatype_mem));	\
-            MPID_GET_FIELD(hetero_,depth_,_depth);                      \
+            ptr = ((MPIDU_Datatype *)					\
+		   MPIU_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem));	\
+            MPIDU_GET_FIELD(hetero_,depth_,_depth);                      \
             break;							\
         case HANDLE_KIND_INVALID:					\
         case HANDLE_KIND_BUILTIN:					\
@@ -156,17 +156,17 @@
     }                                                                   \
 } while(0)
 
-#define MPID_Datatype_get_loopsize_macro(a,depth_,hetero_) do {         \
+#define MPIDU_Datatype_get_loopsize_macro(a,depth_,hetero_) do {         \
     void *ptr;								\
     switch (HANDLE_GET_KIND(a)) {					\
         case HANDLE_KIND_DIRECT:					\
-            ptr = MPID_Datatype_direct+HANDLE_INDEX(a);			\
-            MPID_GET_FIELD(hetero_,depth_,_size);                       \
+            ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a);			\
+            MPIDU_GET_FIELD(hetero_,depth_,_size);                       \
             break;							\
         case HANDLE_KIND_INDIRECT:					\
-            ptr = ((MPID_Datatype *)					\
-		   MPIU_Handle_get_ptr_indirect(a,&MPID_Datatype_mem));	\
-            MPID_GET_FIELD(hetero_,depth_,_size);                       \
+            ptr = ((MPIDU_Datatype *)					\
+		   MPIU_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem));	\
+            MPIDU_GET_FIELD(hetero_,depth_,_size);                       \
             break;							\
         case HANDLE_KIND_INVALID:					\
         case HANDLE_KIND_BUILTIN:					\
@@ -176,17 +176,17 @@
     }                                                                   \
 } while(0)
 
-#define MPID_Datatype_get_loopptr_macro(a,lptr_,hetero_) do {  		\
+#define MPIDU_Datatype_get_loopptr_macro(a,lptr_,hetero_) do {  		\
     void *ptr;								\
     switch (HANDLE_GET_KIND(a)) {					\
         case HANDLE_KIND_DIRECT:					\
-            ptr = MPID_Datatype_direct+HANDLE_INDEX(a);			\
-            MPID_GET_FIELD(hetero_,lptr_,);                             \
+            ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a);			\
+            MPIDU_GET_FIELD(hetero_,lptr_,);                             \
             break;							\
         case HANDLE_KIND_INDIRECT:					\
-            ptr = ((MPID_Datatype *)					\
-		   MPIU_Handle_get_ptr_indirect(a,&MPID_Datatype_mem));	\
-            MPID_GET_FIELD(hetero_,lptr_,);                             \
+            ptr = ((MPIDU_Datatype *)					\
+		   MPIU_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem));	\
+            MPIDU_GET_FIELD(hetero_,lptr_,);                             \
             break;							\
         case HANDLE_KIND_INVALID:					\
         case HANDLE_KIND_BUILTIN:					\
@@ -195,17 +195,17 @@
             break;							\
     }									\
 } while(0)
-#define MPID_Datatype_set_loopdepth_macro(a,depth_,hetero_) do {        \
+#define MPIDU_Datatype_set_loopdepth_macro(a,depth_,hetero_) do {        \
     void *ptr;								\
     switch (HANDLE_GET_KIND(a)) {					\
         case HANDLE_KIND_DIRECT:					\
-            ptr = MPID_Datatype_direct+HANDLE_INDEX(a);			\
-            MPID_SET_FIELD(hetero_,depth_,_depth);                      \
+            ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a);			\
+            MPIDU_SET_FIELD(hetero_,depth_,_depth);                      \
             break;							\
         case HANDLE_KIND_INDIRECT:					\
-            ptr = ((MPID_Datatype *)					\
-		   MPIU_Handle_get_ptr_indirect(a,&MPID_Datatype_mem));	\
-            MPID_SET_FIELD(hetero_,depth_,_depth);                      \
+            ptr = ((MPIDU_Datatype *)					\
+		   MPIU_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem));	\
+            MPIDU_SET_FIELD(hetero_,depth_,_depth);                      \
             break;							\
         case HANDLE_KIND_INVALID:					\
         case HANDLE_KIND_BUILTIN:					\
@@ -215,17 +215,17 @@
     }                                                                   \
 } while(0)
 
-#define MPID_Datatype_set_loopsize_macro(a,depth_,hetero_) do {         \
+#define MPIDU_Datatype_set_loopsize_macro(a,depth_,hetero_) do {         \
     void *ptr;								\
     switch (HANDLE_GET_KIND(a)) {					\
         case HANDLE_KIND_DIRECT:					\
-            ptr = MPID_Datatype_direct+HANDLE_INDEX(a);			\
-            MPID_SET_FIELD(hetero_,depth_,_size);                       \
+            ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a);			\
+            MPIDU_SET_FIELD(hetero_,depth_,_size);                       \
             break;							\
         case HANDLE_KIND_INDIRECT:					\
-            ptr = ((MPID_Datatype *)					\
-		   MPIU_Handle_get_ptr_indirect(a,&MPID_Datatype_mem));	\
-            MPID_SET_FIELD(hetero_,depth_,_size);                       \
+            ptr = ((MPIDU_Datatype *)					\
+		   MPIU_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem));	\
+            MPIDU_SET_FIELD(hetero_,depth_,_size);                       \
             break;							\
         case HANDLE_KIND_INVALID:					\
         case HANDLE_KIND_BUILTIN:					\
@@ -235,17 +235,17 @@
     }                                                                   \
 } while(0)
 
-#define MPID_Datatype_set_loopptr_macro(a,lptr_,hetero_) do {  		\
+#define MPIDU_Datatype_set_loopptr_macro(a,lptr_,hetero_) do {  		\
     void *ptr;								\
     switch (HANDLE_GET_KIND(a)) {					\
         case HANDLE_KIND_DIRECT:					\
-            ptr = MPID_Datatype_direct+HANDLE_INDEX(a);			\
-            MPID_SET_FIELD(hetero_,lptr_,);                             \
+            ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a);			\
+            MPIDU_SET_FIELD(hetero_,lptr_,);                             \
             break;							\
         case HANDLE_KIND_INDIRECT:					\
-            ptr = ((MPID_Datatype *)					\
-		   MPIU_Handle_get_ptr_indirect(a,&MPID_Datatype_mem));	\
-            MPID_SET_FIELD(hetero_,lptr_,);                             \
+            ptr = ((MPIDU_Datatype *)					\
+		   MPIU_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem));	\
+            MPIDU_SET_FIELD(hetero_,lptr_,);                             \
             break;							\
         case HANDLE_KIND_INVALID:					\
         case HANDLE_KIND_BUILTIN:					\
@@ -255,33 +255,33 @@
     }									\
 } while(0)
         
-#define MPID_Datatype_get_extent_macro(a,extent_) do {                      \
+#define MPIDU_Datatype_get_extent_macro(a,extent_) do {                      \
     void *ptr;								    \
     switch (HANDLE_GET_KIND(a)) {					    \
         case HANDLE_KIND_DIRECT:					    \
-            ptr = MPID_Datatype_direct+HANDLE_INDEX(a);			    \
-            extent_ = ((MPID_Datatype *) ptr)->extent;			    \
+            ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a);			    \
+            extent_ = ((MPIDU_Datatype *) ptr)->extent;			    \
             break;							    \
         case HANDLE_KIND_INDIRECT:					    \
-            ptr = ((MPID_Datatype *)					    \
-		   MPIU_Handle_get_ptr_indirect(a,&MPID_Datatype_mem));	    \
-            extent_ = ((MPID_Datatype *) ptr)->extent;			    \
+            ptr = ((MPIDU_Datatype *)					    \
+		   MPIU_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem));	    \
+            extent_ = ((MPIDU_Datatype *) ptr)->extent;			    \
             break;							    \
         case HANDLE_KIND_INVALID:					    \
         case HANDLE_KIND_BUILTIN:					    \
         default:							    \
-            extent_ = MPID_Datatype_get_basic_size(a);  /* same as size */  \
+            extent_ = MPIDU_Datatype_get_basic_size(a);  /* same as size */  \
             break;							    \
     }									    \
 } while(0)
 
-#define MPID_Datatype_valid_ptr(ptr,err) MPID_Valid_ptr_class(Datatype,ptr,MPI_ERR_TYPE,err)
+#define MPIDU_Datatype_valid_ptr(ptr,err) MPID_Valid_ptr_class(Datatype,ptr,MPI_ERR_TYPE,err)
 
-/* to be used only after MPID_Datatype_valid_ptr(); the check on
+/* to be used only after MPIDU_Datatype_valid_ptr(); the check on
  * err == MPI_SUCCESS ensures that we won't try to dereference the
  * pointer if something has already been detected as wrong.
  */
-#define MPID_Datatype_committed_ptr(ptr,err) do {               \
+#define MPIDU_Datatype_committed_ptr(ptr,err) do {               \
     if ((err == MPI_SUCCESS) && !((ptr)->is_committed))		\
         err = MPIR_Err_create_code(MPI_SUCCESS,			\
 				   MPIR_ERR_RECOVERABLE,	\
@@ -293,7 +293,7 @@
 } while(0)
 
 /*S
-  MPID_Datatype_contents - Holds envelope and contents data for a given
+  MPIDU_Datatype_contents - Holds envelope and contents data for a given
                            datatype
 
   Notes:
@@ -301,7 +301,7 @@
   arrays of types, ints, and aints, in that order.
 
   S*/
-typedef struct MPID_Datatype_contents {
+typedef struct MPIDU_Datatype_contents {
     int combiner;
     int nr_ints;
     int nr_aints;
@@ -309,11 +309,11 @@ typedef struct MPID_Datatype_contents {
     /* space allocated beyond structure used to store the types[],
      * ints[], and aints[], in that order.
      */
-} MPID_Datatype_contents;
+} MPIDU_Datatype_contents;
 
 /* Datatype Structure */
 /*S
-  MPID_Datatype - Description of the MPID Datatype structure
+  MPIDU_Datatype - Description of the MPID Datatype structure
 
   Notes:
   The 'ref_count' is needed for nonblocking operations such as
@@ -359,7 +359,7 @@ typedef struct MPID_Datatype_contents {
   'MPIU_Object_release_ref', to increment and decrement the reference count.
 
   S*/
-typedef struct MPID_Datatype { 
+typedef struct MPIDU_Datatype { 
     /* handle and ref_count are filled in by MPIU_Handle_obj_alloc() */
     MPIU_OBJECT_HEADER; /* adds handle and ref_count fields */
 
@@ -400,16 +400,16 @@ typedef struct MPID_Datatype {
     MPI_Aint max_contig_blocks;
 
     /* pointer to contents and envelope data for the datatype */
-    MPID_Datatype_contents *contents;
+    MPIDU_Datatype_contents *contents;
 
     /* dataloop members, including a pointer to the loop, the size in bytes,
      * and a depth used to verify that we can process it (limited stack depth
      */
-    struct MPID_Dataloop *dataloop; /* might be optimized for homogenous */
+    struct MPIDU_Dataloop *dataloop; /* might be optimized for homogenous */
     MPI_Aint              dataloop_size;
     int                   dataloop_depth;
 #if defined(MPID_HAS_HETERO) || 1
-    struct MPID_Dataloop *hetero_dloop; /* heterogeneous dataloop */
+    struct MPIDU_Dataloop *hetero_dloop; /* heterogeneous dataloop */
     MPI_Aint              hetero_dloop_size;
     int                   hetero_dloop_depth;
 #endif /* MPID_HAS_HETERO */
@@ -423,15 +423,15 @@ typedef struct MPID_Datatype {
     int32_t cache_id;
     /* MPID_Lpidmask mask; */
 
-    /* int (*free_fn)( struct MPID_Datatype * ); */ /* Function to free this datatype */
+    /* int (*free_fn)( struct MPIDU_Datatype * ); */ /* Function to free this datatype */
 
     /* Other, device-specific information */
 #ifdef MPID_DEV_DATATYPE_DECL
     MPID_DEV_DATATYPE_DECL
 #endif
-} MPID_Datatype;
+} MPIDU_Datatype;
 
-extern MPIU_Object_alloc_t MPID_Datatype_mem;
+extern MPIU_Object_alloc_t MPIDU_Datatype_mem;
 
 /* Preallocated datatype objects */
 /* This value should be set to greatest value used as the type index suffix in
@@ -442,25 +442,25 @@ extern MPIU_Object_alloc_t MPID_Datatype_mem;
  * automatic and less error prone */
 /* FIXME: Given that this is relatively static, an adequate alternative is
    to provide a check that this value is valid. */
-#define MPID_DATATYPE_N_BUILTIN 69
-extern MPID_Datatype MPID_Datatype_builtin[MPID_DATATYPE_N_BUILTIN + 1];
-extern MPID_Datatype MPID_Datatype_direct[];
+#define MPIDU_DATATYPE_N_BUILTIN 69
+extern MPIDU_Datatype MPIDU_Datatype_builtin[MPIDU_DATATYPE_N_BUILTIN + 1];
+extern MPIDU_Datatype MPIDU_Datatype_direct[];
 
-#define MPID_DTYPE_BEGINNING  0
-#define MPID_DTYPE_END       -1
+#define MPIDU_DTYPE_BEGINNING  0
+#define MPIDU_DTYPE_END       -1
 
 /* LB/UB calculation helper macros */
 
-/* MPID_DATATYPE_CONTIG_LB_UB()
+/* MPIDU_DATATYPE_CONTIG_LB_UB()
  *
  * Determines the new LB and UB for a block of old types given the
  * old type's LB, UB, and extent, and a count of these types in the
  * block.
  *
- * Note: if the displacement is non-zero, the MPID_DATATYPE_BLOCK_LB_UB()
+ * Note: if the displacement is non-zero, the MPIDU_DATATYPE_BLOCK_LB_UB()
  * should be used instead (see below).
  */
-#define MPID_DATATYPE_CONTIG_LB_UB(cnt_,		\
+#define MPIDU_DATATYPE_CONTIG_LB_UB(cnt_,		\
 				   old_lb_,		\
 				   old_ub_,		\
 				   old_extent_,	\
@@ -481,13 +481,13 @@ do {							\
     }                                                   \
 } while(0)
 
-/* MPID_DATATYPE_VECTOR_LB_UB()
+/* MPIDU_DATATYPE_VECTOR_LB_UB()
  *
  * Determines the new LB and UB for a vector of blocks of old types
  * given the old type's LB, UB, and extent, and a count, stride, and
  * blocklen describing the vectorization.
  */
-#define MPID_DATATYPE_VECTOR_LB_UB(cnt_,			\
+#define MPIDU_DATATYPE_VECTOR_LB_UB(cnt_,			\
 				   stride_,			\
 				   blklen_,			\
 				   old_lb_,			\
@@ -520,7 +520,7 @@ do {								\
     }								\
 } while(0)
 
-/* MPID_DATATYPE_BLOCK_LB_UB()
+/* MPIDU_DATATYPE_BLOCK_LB_UB()
  *
  * Determines the new LB and UB for a block of old types given the LB,
  * UB, and extent of the old type as well as a new displacement and count
@@ -529,7 +529,7 @@ do {								\
  * Note: we need the extent here in addition to the lb and ub because the
  * extent might have some padding in it that we need to take into account.
  */
-#define MPID_DATATYPE_BLOCK_LB_UB(cnt_,				\
+#define MPIDU_DATATYPE_BLOCK_LB_UB(cnt_,				\
 				  disp_,				\
 				  old_lb_,				\
 				  old_ub_,				\
@@ -553,83 +553,83 @@ do {									\
 
 /* helper macro: takes an MPI_Datatype handle value and returns TRUE in
  * (*is_config_) if the type is contiguous */
-#define MPID_Datatype_is_contig(dtype_, is_contig_)                            \
+#define MPIDU_Datatype_is_contig(dtype_, is_contig_)                            \
     do {                                                                       \
         if (HANDLE_GET_KIND(dtype_) == HANDLE_KIND_BUILTIN) {                  \
             *(is_contig_) = TRUE;                                              \
         }                                                                      \
         else {                                                                 \
-            MPID_Datatype *dtp_ = NULL;                                        \
-            MPID_Datatype_get_ptr((dtype_), dtp_);                             \
+            MPIDU_Datatype *dtp_ = NULL;                                        \
+            MPIDU_Datatype_get_ptr((dtype_), dtp_);                             \
             *(is_contig_) = dtp_->is_contig;                                   \
         }                                                                      \
     } while (0)
 
 /* helper macro: takes an MPI_Datatype handle value and returns true_lb in
  * (*true_lb_) */
-#define MPID_Datatype_get_true_lb(dtype_, true_lb_)                            \
+#define MPIDU_Datatype_get_true_lb(dtype_, true_lb_)                            \
     do {                                                                       \
         if (HANDLE_GET_KIND(dtype_) == HANDLE_KIND_BUILTIN) {                  \
             *(true_lb_) = 0;                                                   \
         }                                                                      \
         else {                                                                 \
-            MPID_Datatype *dtp_ = NULL;                                        \
-            MPID_Datatype_get_ptr((dtype_), dtp_);                             \
+            MPIDU_Datatype *dtp_ = NULL;                                        \
+            MPIDU_Datatype_get_ptr((dtype_), dtp_);                             \
             *(true_lb_) = dtp_->true_lb;                                       \
         }                                                                      \
     } while (0)
 
 /* Datatype functions */
-int MPID_Type_commit(MPI_Datatype *type);
+int MPIDU_Type_commit(MPI_Datatype *type);
 
-int MPID_Type_dup(MPI_Datatype oldtype,
+int MPIDU_Type_dup(MPI_Datatype oldtype,
 		  MPI_Datatype *newtype);
 
-int MPID_Type_struct(int count,
+int MPIDU_Type_struct(int count,
 		     const int *blocklength_array,
 		     const MPI_Aint *displacement_array,
 		     const MPI_Datatype *oldtype_array,
 		     MPI_Datatype *newtype);
 
-int MPID_Type_indexed(int count,
+int MPIDU_Type_indexed(int count,
 		      const int *blocklength_array,
 		      const void *displacement_array,
 		      int dispinbytes,
 		      MPI_Datatype oldtype,
 		      MPI_Datatype *newtype);
 
-int MPID_Type_blockindexed(int count,
+int MPIDU_Type_blockindexed(int count,
 			   int blocklength,
 			   const void *displacement_array,
 			   int dispinbytes,
 			   MPI_Datatype oldtype,
 			   MPI_Datatype *newtype);
 
-int MPID_Type_vector(int count,
+int MPIDU_Type_vector(int count,
 		     int blocklength,
 		     MPI_Aint stride,
 		     int strideinbytes,
 		     MPI_Datatype oldtype,
 		     MPI_Datatype *newtype);
 
-int MPID_Type_contiguous(int count,
+int MPIDU_Type_contiguous(int count,
 			 MPI_Datatype oldtype,
 			 MPI_Datatype *newtype);
 
-int MPID_Type_zerolen(MPI_Datatype *newtype);
+int MPIDU_Type_zerolen(MPI_Datatype *newtype);
 
-int MPID_Type_create_resized(MPI_Datatype oldtype,
+int MPIDU_Type_create_resized(MPI_Datatype oldtype,
 			     MPI_Aint lb,
 			     MPI_Aint extent,
 			     MPI_Datatype *newtype);
 
-int MPID_Type_get_envelope(MPI_Datatype datatype,
+int MPIDU_Type_get_envelope(MPI_Datatype datatype,
 			   int *num_integers,
 			   int *num_addresses,
 			   int *num_datatypes,
 			   int *combiner);
 
-int MPID_Type_get_contents(MPI_Datatype datatype, 
+int MPIDU_Type_get_contents(MPI_Datatype datatype, 
 			   int max_integers, 
 			   int max_addresses, 
 			   int max_datatypes, 
@@ -637,8 +637,8 @@ int MPID_Type_get_contents(MPI_Datatype datatype,
 			   MPI_Aint array_of_addresses[], 
 			   MPI_Datatype array_of_datatypes[]);
 
-int MPID_Type_create_pairtype(MPI_Datatype datatype,
-                              MPID_Datatype *new_dtp);
+int MPIDU_Type_create_pairtype(MPI_Datatype datatype,
+                              MPIDU_Datatype *new_dtp);
 
 /* internal debugging functions */
 void MPIDI_Datatype_printf(MPI_Datatype type,
@@ -648,49 +648,49 @@ void MPIDI_Datatype_printf(MPI_Datatype type,
 			   int header);
 
 /* Dataloop functions */
-void MPID_Dataloop_copy(void *dest,
+void MPIDU_Dataloop_copy(void *dest,
 			void *src,
 			MPI_Aint size);
 
-void MPID_Dataloop_print(struct MPID_Dataloop *dataloop,
+void MPIDU_Dataloop_print(struct MPIDU_Dataloop *dataloop,
 			 int depth);
 
-void MPID_Dataloop_alloc(int kind,
+void MPIDU_Dataloop_alloc(int kind,
 			 MPI_Aint count,
 			 DLOOP_Dataloop **new_loop_p,
 			 MPI_Aint *new_loop_sz_p);
 
-void MPID_Dataloop_alloc_and_copy(int kind,
+void MPIDU_Dataloop_alloc_and_copy(int kind,
 				  MPI_Aint count,
 				  struct DLOOP_Dataloop *old_loop,
 				  MPI_Aint old_loop_sz,
 				  struct DLOOP_Dataloop **new_loop_p,
 				  MPI_Aint *new_loop_sz_p);
-void MPID_Dataloop_struct_alloc(MPI_Aint count,
+void MPIDU_Dataloop_struct_alloc(MPI_Aint count,
 				MPI_Aint old_loop_sz,
 				int basic_ct,
 				DLOOP_Dataloop **old_loop_p,
 				DLOOP_Dataloop **new_loop_p,
 				MPI_Aint *new_loop_sz_p);
-void MPID_Dataloop_dup(DLOOP_Dataloop *old_loop,
+void MPIDU_Dataloop_dup(DLOOP_Dataloop *old_loop,
 		       MPI_Aint old_loop_sz,
 		       DLOOP_Dataloop **new_loop_p);
-void MPID_Dataloop_free(struct MPID_Dataloop **dataloop);
+void MPIDU_Dataloop_free(struct MPIDU_Dataloop **dataloop);
 
 /* Segment functions specific to MPICH */
-void MPID_Segment_pack_vector(struct DLOOP_Segment *segp,
+void MPIDU_Segment_pack_vector(struct DLOOP_Segment *segp,
 			      DLOOP_Offset first,
 			      DLOOP_Offset *lastp,
 			      DLOOP_VECTOR *vector,
 			      int *lengthp);
 
-void MPID_Segment_unpack_vector(struct DLOOP_Segment *segp,
+void MPIDU_Segment_unpack_vector(struct DLOOP_Segment *segp,
 				DLOOP_Offset first,
 				DLOOP_Offset *lastp,
 				DLOOP_VECTOR *vector,
 				int *lengthp);
 
-void MPID_Segment_flatten(struct DLOOP_Segment *segp,
+void MPIDU_Segment_flatten(struct DLOOP_Segment *segp,
 			  DLOOP_Offset first,
 			  DLOOP_Offset *lastp,
 			  DLOOP_Offset *offp,
@@ -698,7 +698,7 @@ void MPID_Segment_flatten(struct DLOOP_Segment *segp,
 			  DLOOP_Offset *lengthp);
 
 /* misc */
-int MPID_Datatype_set_contents(struct MPID_Datatype *ptr,
+int MPIDU_Datatype_set_contents(struct MPIDU_Datatype *ptr,
 			       int combiner,
 			       int nr_ints,
 			       int nr_aints,
@@ -707,17 +707,17 @@ int MPID_Datatype_set_contents(struct MPID_Datatype *ptr,
 			       const MPI_Aint *aints,
 			       const MPI_Datatype *types);
 
-void MPID_Datatype_free_contents(struct MPID_Datatype *ptr);
-void MPIDI_Datatype_get_contents_aints(MPID_Datatype_contents *cp,
+void MPIDU_Datatype_free_contents(struct MPIDU_Datatype *ptr);
+void MPIDI_Datatype_get_contents_aints(MPIDU_Datatype_contents *cp,
 				       MPI_Aint *user_aints);
-void MPIDI_Datatype_get_contents_types(MPID_Datatype_contents *cp,
+void MPIDI_Datatype_get_contents_types(MPIDU_Datatype_contents *cp,
 				       MPI_Datatype *user_types);
-void MPIDI_Datatype_get_contents_ints(MPID_Datatype_contents *cp,
+void MPIDI_Datatype_get_contents_ints(MPIDU_Datatype_contents *cp,
 				      int *user_ints);
 
-void MPID_Datatype_free(struct MPID_Datatype *ptr);
+void MPIDU_Datatype_free(struct MPIDU_Datatype *ptr);
 
-void MPID_Dataloop_update(struct DLOOP_Dataloop *dataloop,
+void MPIDU_Dataloop_update(struct DLOOP_Dataloop *dataloop,
 			  MPI_Aint ptrdiff);
 
 int MPIR_Type_flatten(MPI_Datatype type,
@@ -725,17 +725,17 @@ int MPIR_Type_flatten(MPI_Datatype type,
 		      DLOOP_Size *size_array,
 		      MPI_Aint *array_len_p);
 
-void MPID_Segment_pack_external32(struct DLOOP_Segment *segp,
+void MPIDU_Segment_pack_external32(struct DLOOP_Segment *segp,
 				  DLOOP_Offset first,
 				  DLOOP_Offset *lastp, 
 				  void *pack_buffer);
 
-void MPID_Segment_unpack_external32(struct DLOOP_Segment *segp,
+void MPIDU_Segment_unpack_external32(struct DLOOP_Segment *segp,
 				    DLOOP_Offset first,
 				    DLOOP_Offset *lastp,
 				    DLOOP_Buffer unpack_buffer);
 
-MPI_Aint MPID_Datatype_size_external32(MPI_Datatype type);
+MPI_Aint MPIDU_Datatype_size_external32(MPI_Datatype type);
 MPI_Aint MPIDI_Datatype_get_basic_size_external32(MPI_Datatype el_type);
 
 /* debugging helper functions */
@@ -744,14 +744,81 @@ char *MPIDU_Datatype_combiner_to_string(int combiner);
 void MPIDU_Datatype_debug(MPI_Datatype type, int array_ct);
 
 /* contents accessor functions */
-void MPID_Type_access_contents(MPI_Datatype type,
+void MPIDU_Type_access_contents(MPI_Datatype type,
 			       int **ints_p,
 			       MPI_Aint **aints_p,
 			       MPI_Datatype **types_p);
-void MPID_Type_release_contents(MPI_Datatype type,
+void MPIDU_Type_release_contents(MPI_Datatype type,
 				int **ints_p,
 				MPI_Aint **aints_p,
 				MPI_Datatype **types_p);
 
+/* FIXME:Temorary coversion for compatibility in MPI layer
+ * These should be eventially put in mpid/include/mpid.h
+ */
+/* Variables */
+#define MPID_Datatype_direct MPIDU_Datatype_direct
+#define MPID_Datatype_builtin MPIDU_Datatype_builtin
+#define MPID_Datatype_mem MPIDU_Datatype_mem
+
+/* Macros */
+#define MPID_DATATYPE_N_BUILTIN MPIDU_DATATYPE_N_BUILTIN
+#define MPID_DTYPE_BEGINNING MPIDU_DTYPE_BEGINNING
+#define MPID_DTYPE_END MPIDU_DTYPE_END
+
+typedef MPIDU_Datatype MPID_Datatype;
+typedef MPIDU_Datatype_contents MPID_Datatype_contents;
+
+#define MPID_Datatype_add_ref MPIDU_Datatype_add_ref
+#define MPID_Datatype_committed_ptr MPIDU_Datatype_committed_ptr
+#define MPID_Datatype_get_basic_size MPIDU_Datatype_get_basic_size
+#define MPID_Datatype_get_basic_type MPIDU_Datatype_get_basic_type
+
+#define MPID_Datatype_get_ptr MPIDU_Datatype_get_ptr
+#define MPID_Datatype_get_size_macro MPIDU_Datatype_get_size_macro
+#define MPID_Datatype_get_extent_macro MPIDU_Datatype_get_extent_macro
+#define MPID_Datatype_is_contig MPIDU_Datatype_is_contig
+#define MPID_Datatype_release MPIDU_Datatype_release
+#define MPID_Datatype_valid_ptr MPIDU_Datatype_valid_ptr
+
+#define MPID_Datatype_get_loopdepth_macro MPIDU_Datatype_get_loopdepth_macro
+#define MPID_Datatype_get_loopptr_macro MPIDU_Datatype_get_loopptr_macro
+#define MPID_Datatype_get_loopsize_macro MPIDU_Datatype_get_loopsize_macro
+#define MPID_Datatype_set_loopdepth_macro MPIDU_Datatype_set_loopdepth_macro
+#define MPID_Datatype_set_loopptr_macro MPIDU_Datatype_set_loopptr_macro
+#define MPID_Datatype_set_loopsize_macro MPIDU_Datatype_set_loopsize_macro
+
+#define MPID_Datatype_free MPIDU_Datatype_free
+#define MPID_Datatype_free_contents MPIDU_Datatype_free_contents
+#define MPID_Datatype_set_contents MPIDU_Datatype_set_contents
+#define MPID_Datatype_size_external32 MPIDU_Datatype_size_external32
+
+/* MPID_Segment */
+typedef struct DLOOP_Segment MPID_Segment; /* MPIDU_Segment */
+
+#define MPID_Segment_init MPIDU_Segment_init
+#define MPID_Segment_alloc MPIDU_Segment_alloc
+#define MPID_Segment_free MPIDU_Segment_free
+#define MPID_Segment_pack MPIDU_Segment_pack
+#define MPID_Segment_unpack MPIDU_Segment_unpack
+#define MPID_Segment_pack_external32 MPIDU_Segment_pack_external32
+#define MPID_Segment_unpack_external32 MPIDU_Segment_unpack_external32
+
+/* MPID_Type */
+#define MPID_Type_access_contents MPIDU_Type_access_contents
+#define MPID_Type_blockindexed MPIDU_Type_blockindexed
+#define MPID_Type_commit MPIDU_Type_commit
+#define MPID_Type_contiguous MPIDU_Type_contiguous
+#define MPID_Type_create_pairtype MPIDU_Type_create_pairtype
+#define MPID_Type_create_resized MPIDU_Type_create_resized
+#define MPID_Type_dup MPIDU_Type_dup
+#define MPID_Type_get_contents MPIDU_Type_get_contents
+#define MPID_Type_get_envelope MPIDU_Type_get_envelope
+#define MPID_Type_indexed MPIDU_Type_indexed
+#define MPID_Type_release_contents MPIDU_Type_release_contents
+#define MPID_Type_struct MPIDU_Type_struct
+#define MPID_Type_vector MPIDU_Type_vector
+#define MPID_Type_zerolen MPIDU_Type_zerolen
+
 /* end of file */
 #endif
diff --git a/src/mpid/common/datatype/mpid_datatype_contents.c b/src/mpid/common/datatype/mpid_datatype_contents.c
index 6b82950..2625b88 100644
--- a/src/mpid/common/datatype/mpid_datatype_contents.c
+++ b/src/mpid/common/datatype/mpid_datatype_contents.c
@@ -11,12 +11,12 @@
 #include <limits.h>
 
 /*@
-  MPID_Datatype_set_contents - store contents information for use in
+  MPIDU_Datatype_set_contents - store contents information for use in
                                MPI_Type_get_contents.
 
   Returns MPI_SUCCESS on success, MPI error code on error.
 @*/
-int MPID_Datatype_set_contents(MPID_Datatype *new_dtp,
+int MPIDU_Datatype_set_contents(MPIDU_Datatype *new_dtp,
 			       int combiner,
 			       int nr_ints,
 			       int nr_aints,
@@ -27,8 +27,8 @@ int MPID_Datatype_set_contents(MPID_Datatype *new_dtp,
 {
     int i, contents_size, align_sz = 8, epsilon, mpi_errno;
     int struct_sz, ints_sz, aints_sz, types_sz;
-    MPID_Datatype_contents *cp;
-    MPID_Datatype *old_dtp;
+    MPIDU_Datatype_contents *cp;
+    MPIDU_Datatype *old_dtp;
     char *ptr;
 
 #ifdef HAVE_MAX_STRUCT_ALIGNMENT
@@ -37,7 +37,7 @@ int MPID_Datatype_set_contents(MPID_Datatype *new_dtp,
     }
 #endif
 
-    struct_sz = sizeof(MPID_Datatype_contents);
+    struct_sz = sizeof(MPIDU_Datatype_contents);
     types_sz  = nr_types * sizeof(MPI_Datatype);
     ints_sz   = nr_ints * sizeof(int);
     aints_sz  = nr_aints * sizeof(MPI_Aint);
@@ -59,12 +59,12 @@ int MPID_Datatype_set_contents(MPID_Datatype *new_dtp,
 
     contents_size = struct_sz + types_sz + ints_sz + aints_sz;
 
-    cp = (MPID_Datatype_contents *) MPL_malloc(contents_size);
+    cp = (MPIDU_Datatype_contents *) MPL_malloc(contents_size);
     /* --BEGIN ERROR HANDLING-- */
     if (cp == NULL) {
 	mpi_errno = MPIR_Err_create_code(MPI_SUCCESS,
 					 MPIR_ERR_RECOVERABLE,
-					 "MPID_Datatype_set_contents",
+					 "MPIDU_Datatype_set_contents",
 					 __LINE__,
 					 MPI_ERR_OTHER,
 					 "**nomem",
@@ -101,19 +101,19 @@ int MPID_Datatype_set_contents(MPID_Datatype *new_dtp,
     /* increment reference counts on all the derived types used here */
     for (i=0; i < nr_types; i++) {
 	if (HANDLE_GET_KIND(array_of_types[i]) != HANDLE_KIND_BUILTIN) {
-	    MPID_Datatype_get_ptr(array_of_types[i], old_dtp);
-	    MPID_Datatype_add_ref(old_dtp);
+	    MPIDU_Datatype_get_ptr(array_of_types[i], old_dtp);
+	    MPIDU_Datatype_add_ref(old_dtp);
 	}
     }
 
     return MPI_SUCCESS;
 }
 
-void MPID_Datatype_free_contents(MPID_Datatype *dtp)
+void MPIDU_Datatype_free_contents(MPIDU_Datatype *dtp)
 {
-    int i, struct_sz = sizeof(MPID_Datatype_contents);
+    int i, struct_sz = sizeof(MPIDU_Datatype_contents);
     int align_sz = 8, epsilon;
-    MPID_Datatype *old_dtp;
+    MPIDU_Datatype *old_dtp;
     MPI_Datatype *array_of_types;
 
     if ((epsilon = struct_sz % align_sz)) {
@@ -125,8 +125,8 @@ void MPID_Datatype_free_contents(MPID_Datatype *dtp)
 
     for (i=0; i < dtp->contents->nr_types; i++) {
 	if (HANDLE_GET_KIND(array_of_types[i]) != HANDLE_KIND_BUILTIN) {
-	    MPID_Datatype_get_ptr(array_of_types[i], old_dtp);
-	    MPID_Datatype_release(old_dtp);
+	    MPIDU_Datatype_get_ptr(array_of_types[i], old_dtp);
+	    MPIDU_Datatype_release(old_dtp);
 	}
     }
 
@@ -134,7 +134,7 @@ void MPID_Datatype_free_contents(MPID_Datatype *dtp)
     dtp->contents = NULL;
 }
 
-void MPIDI_Datatype_get_contents_ints(MPID_Datatype_contents *cp,
+void MPIDI_Datatype_get_contents_ints(MPIDU_Datatype_contents *cp,
 				      int *user_ints)
 {
     char *ptr;
@@ -147,7 +147,7 @@ void MPIDI_Datatype_get_contents_ints(MPID_Datatype_contents *cp,
     }
 #endif
 
-    struct_sz = sizeof(MPID_Datatype_contents);
+    struct_sz = sizeof(MPIDU_Datatype_contents);
     types_sz  = cp->nr_types * sizeof(MPI_Datatype);
 
     /* pad the struct, types, and ints before we allocate.
@@ -168,7 +168,7 @@ void MPIDI_Datatype_get_contents_ints(MPID_Datatype_contents *cp,
     return;
 }
 
-void MPIDI_Datatype_get_contents_aints(MPID_Datatype_contents *cp,
+void MPIDI_Datatype_get_contents_aints(MPIDU_Datatype_contents *cp,
 				       MPI_Aint *user_aints)
 {
     char *ptr;
@@ -181,7 +181,7 @@ void MPIDI_Datatype_get_contents_aints(MPID_Datatype_contents *cp,
     }
 #endif
 
-    struct_sz = sizeof(MPID_Datatype_contents);
+    struct_sz = sizeof(MPIDU_Datatype_contents);
     types_sz  = cp->nr_types * sizeof(MPI_Datatype);
     ints_sz   = cp->nr_ints * sizeof(int);
 
@@ -206,7 +206,7 @@ void MPIDI_Datatype_get_contents_aints(MPID_Datatype_contents *cp,
     return;
 }
 
-void MPIDI_Datatype_get_contents_types(MPID_Datatype_contents *cp,
+void MPIDI_Datatype_get_contents_types(MPIDU_Datatype_contents *cp,
 				       MPI_Datatype *user_types)
 {
     char *ptr;
@@ -219,7 +219,7 @@ void MPIDI_Datatype_get_contents_types(MPID_Datatype_contents *cp,
     }
 #endif
 
-    struct_sz = sizeof(MPID_Datatype_contents);
+    struct_sz = sizeof(MPIDU_Datatype_contents);
 
     /* pad the struct, types, and ints before we allocate.
      *
diff --git a/src/mpid/common/datatype/mpid_datatype_free.c b/src/mpid/common/datatype/mpid_datatype_free.c
index 2d8e585..293a4c9 100644
--- a/src/mpid/common/datatype/mpid_datatype_free.c
+++ b/src/mpid/common/datatype/mpid_datatype_free.c
@@ -13,10 +13,10 @@
 
 /*@
 
-  MPID_Datatype_free
+  MPIDU_Datatype_free
 
 Input Parameters:
-. MPID_Datatype ptr - pointer to MPID datatype structure that is no longer
+. MPIDU_Datatype ptr - pointer to MPID datatype structure that is no longer
   referenced
 
 Output Parameters:
@@ -26,34 +26,34 @@ Output Parameters:
   none
 
   This function handles freeing dynamically allocated memory associated with
-  the datatype.  In the process MPID_Datatype_free_contents() is also called,
+  the datatype.  In the process MPIDU_Datatype_free_contents() is also called,
   which handles decrementing reference counts to constituent types (in
   addition to freeing the space used for contents information).
-  MPID_Datatype_free_contents() will call MPID_Datatype_free() on constituent
+  MPIDU_Datatype_free_contents() will call MPIDU_Datatype_free() on constituent
   types that are no longer referenced as well.
 
   @*/
-void MPID_Datatype_free(MPID_Datatype *ptr)
+void MPIDU_Datatype_free(MPIDU_Datatype *ptr)
 {
     MPL_DBG_MSG_P(MPIR_DBG_DATATYPE,VERBOSE,"type %x freed.", ptr->handle);
 
-#ifdef MPID_Dev_datatype_destroy_hook
-       MPID_Dev_datatype_destroy_hook(ptr);
-#endif /* MPID_Dev_datatype_destroy_hook */
+#ifdef MPIDU_Dev_datatype_destroy_hook
+       MPIDU_Dev_datatype_destroy_hook(ptr);
+#endif /* MPIDU_Dev_datatype_destroy_hook */
 
     /* before freeing the contents, check whether the pointer is not
        null because it is null in the case of a datatype shipped to the target
        for RMA ops */  
     if (ptr->contents) {
-        MPID_Datatype_free_contents(ptr);
+        MPIDU_Datatype_free_contents(ptr);
     }
     if (ptr->dataloop) {
-	MPID_Dataloop_free(&(ptr->dataloop));
+	MPIDU_Dataloop_free(&(ptr->dataloop));
     }
 #if defined(MPID_HAS_HETERO) || 1
     if (ptr->hetero_dloop) {
-	MPID_Dataloop_free(&(ptr->hetero_dloop));
+	MPIDU_Dataloop_free(&(ptr->hetero_dloop));
     }
 #endif /* MPID_HAS_HETERO */
-    MPIU_Handle_obj_free(&MPID_Datatype_mem, ptr);
+    MPIU_Handle_obj_free(&MPIDU_Datatype_mem, ptr);
 }
diff --git a/src/mpid/common/datatype/mpid_ext32_datatype.c b/src/mpid/common/datatype/mpid_ext32_datatype.c
index e8f8a84..0311917 100644
--- a/src/mpid/common/datatype/mpid_ext32_datatype.c
+++ b/src/mpid/common/datatype/mpid_ext32_datatype.c
@@ -101,17 +101,17 @@ MPI_Aint MPIDI_Datatype_get_basic_size_external32(MPI_Datatype el_type)
     return ret;
 }
 
-MPI_Aint MPID_Datatype_size_external32(MPI_Datatype type)
+MPI_Aint MPIDU_Datatype_size_external32(MPI_Datatype type)
 {
     if (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) {
 	return MPIDI_Datatype_get_basic_size_external32(type);
     }
     else {
-	MPID_Dataloop *dlp = NULL;
+	MPIDU_Dataloop *dlp = NULL;
 
-	MPID_Datatype_get_loopptr_macro(type, dlp, MPID_DATALOOP_HETEROGENEOUS);
+	MPIDU_Datatype_get_loopptr_macro(type, dlp, MPIDU_DATALOOP_HETEROGENEOUS);
 
-	return MPID_Dataloop_stream_size(dlp,
+	return MPIDU_Dataloop_stream_size(dlp,
 					 MPIDI_Datatype_get_basic_size_external32);
     }
 }
diff --git a/src/mpid/common/datatype/mpid_ext32_segment.c b/src/mpid/common/datatype/mpid_ext32_segment.c
index 120aaef..2101dda 100644
--- a/src/mpid/common/datatype/mpid_ext32_segment.c
+++ b/src/mpid/common/datatype/mpid_ext32_segment.c
@@ -17,13 +17,13 @@
 
 #include "mpid_ext32_segment.h"
 
-/* MPID_Segment_piece_params
+/* MPIDU_Segment_piece_params
  *
  * This structure is used to pass function-specific parameters into our 
  * segment processing function.  This allows us to get additional parameters
  * to the functions it calls without changing the prototype.
  */
-struct MPID_Segment_piece_params {
+struct MPIDU_Segment_piece_params {
     union {
         struct {
             char *pack_buffer;
@@ -169,22 +169,22 @@ static int external32_float_convert(char *dest_buf,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPID_Segment_contig_pack_external32_to_buf
+#define FUNCNAME MPIDU_Segment_contig_pack_external32_to_buf
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int MPID_Segment_contig_pack_external32_to_buf(DLOOP_Offset *blocks_p,
+static int MPIDU_Segment_contig_pack_external32_to_buf(DLOOP_Offset *blocks_p,
                                                       DLOOP_Type el_type,
                                                       DLOOP_Offset rel_off,
                                                       void *bufp,
                                                       void *v_paramp)
 {
     int src_el_size, dest_el_size;
-    struct MPID_Segment_piece_params *paramp = v_paramp;
+    struct MPIDU_Segment_piece_params *paramp = v_paramp;
     MPIDI_STATE_DECL(MPID_STATE_MPID_SEGMENT_CONTIG_PACK_EXTERNAL32_TO_BUF);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_SEGMENT_CONTIG_PACK_EXTERNAL32_TO_BUF);
 
-    src_el_size = MPID_Datatype_get_basic_size(el_type);
+    src_el_size = MPIDU_Datatype_get_basic_size(el_type);
     dest_el_size = MPIDI_Datatype_get_basic_size_external32(el_type);
     MPIU_Assert(dest_el_size);
 
@@ -232,22 +232,22 @@ static int MPID_Segment_contig_pack_external32_to_buf(DLOOP_Offset *blocks_p,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPID_Segment_contig_unpack_external32_to_buf
+#define FUNCNAME MPIDU_Segment_contig_unpack_external32_to_buf
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-static int MPID_Segment_contig_unpack_external32_to_buf(DLOOP_Offset *blocks_p,
+static int MPIDU_Segment_contig_unpack_external32_to_buf(DLOOP_Offset *blocks_p,
                                                         DLOOP_Type el_type,
                                                         DLOOP_Offset rel_off,
                                                         void *bufp,
                                                         void *v_paramp)
 {
     int src_el_size, dest_el_size;
-    struct MPID_Segment_piece_params *paramp = v_paramp;
+    struct MPIDU_Segment_piece_params *paramp = v_paramp;
     MPIDI_STATE_DECL(MPID_STATE_MPID_SEGMENT_CONTIG_UNPACK_EXTERNAL32_TO_BUF);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_SEGMENT_CONTIG_UNPACK_EXTERNAL32_TO_BUF);
 
-    src_el_size = MPID_Datatype_get_basic_size(el_type);
+    src_el_size = MPIDU_Datatype_get_basic_size(el_type);
     dest_el_size = MPIDI_Datatype_get_basic_size_external32(el_type);
     MPIU_Assert(dest_el_size);
 
@@ -295,27 +295,27 @@ static int MPID_Segment_contig_unpack_external32_to_buf(DLOOP_Offset *blocks_p,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPID_Segment_pack_external32
+#define FUNCNAME MPIDU_Segment_pack_external32
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-void MPID_Segment_pack_external32(struct DLOOP_Segment *segp,
+void MPIDU_Segment_pack_external32(struct DLOOP_Segment *segp,
 				  DLOOP_Offset first,
 				  DLOOP_Offset *lastp, 
 				  void *pack_buffer)
 {
-    struct MPID_Segment_piece_params pack_params;
+    struct MPIDU_Segment_piece_params pack_params;
     MPIDI_STATE_DECL(MPID_STATE_MPID_SEGMENT_PACK_EXTERNAL);
     
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_SEGMENT_PACK_EXTERNAL);
 
     pack_params.u.pack.pack_buffer = (DLOOP_Buffer)pack_buffer;
-    MPID_Segment_manipulate(segp,
+    MPIDU_Segment_manipulate(segp,
 			    first,
 			    lastp,
-			    MPID_Segment_contig_pack_external32_to_buf,
-                            NULL, /* MPID_Segment_vector_pack_external32_to_buf, */
+			    MPIDU_Segment_contig_pack_external32_to_buf,
+                            NULL, /* MPIDU_Segment_vector_pack_external32_to_buf, */
 			    NULL, /* blkidx */
-                            NULL, /* MPID_Segment_index_pack_external32_to_buf, */
+                            NULL, /* MPIDU_Segment_index_pack_external32_to_buf, */
                             MPIDI_Datatype_get_basic_size_external32,
 			    &pack_params);
 
@@ -324,27 +324,27 @@ void MPID_Segment_pack_external32(struct DLOOP_Segment *segp,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPID_Segment_unpack_external32
+#define FUNCNAME MPIDU_Segment_unpack_external32
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-void MPID_Segment_unpack_external32(struct DLOOP_Segment *segp,
+void MPIDU_Segment_unpack_external32(struct DLOOP_Segment *segp,
 				    DLOOP_Offset first,
 				    DLOOP_Offset *lastp,
 				    DLOOP_Buffer unpack_buffer)
 {
-    struct MPID_Segment_piece_params pack_params;
+    struct MPIDU_Segment_piece_params pack_params;
     MPIDI_STATE_DECL(MPID_STATE_MPID_SEGMENT_UNPACK_EXTERNAL32);
     
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_SEGMENT_UNPACK_EXTERNAL32);
 
     pack_params.u.unpack.unpack_buffer = unpack_buffer;
-    MPID_Segment_manipulate(segp,
+    MPIDU_Segment_manipulate(segp,
 			    first,
 			    lastp,
-			    MPID_Segment_contig_unpack_external32_to_buf,
-                            NULL, /* MPID_Segment_vector_unpack_external32_to_buf, */
+			    MPIDU_Segment_contig_unpack_external32_to_buf,
+                            NULL, /* MPIDU_Segment_vector_unpack_external32_to_buf, */
 			    NULL, /* blkidx */
-                            NULL, /* MPID_Segment_index_unpack_external32_to_buf, */
+                            NULL, /* MPIDU_Segment_index_unpack_external32_to_buf, */
                             MPIDI_Datatype_get_basic_size_external32,
 			    &pack_params);
 
diff --git a/src/mpid/common/datatype/mpid_segment.c b/src/mpid/common/datatype/mpid_segment.c
index 810940a..8cf4d85 100644
--- a/src/mpid/common/datatype/mpid_segment.c
+++ b/src/mpid/common/datatype/mpid_segment.c
@@ -17,13 +17,13 @@
 #undef MPID_SP_VERBOSE
 #undef MPID_SU_VERBOSE
 
-/* MPID_Segment_piece_params
+/* MPIDU_Segment_piece_params
 *
 * This structure is used to pass function-specific parameters into our
 * segment processing function.  This allows us to get additional parameters
 * to the functions it calls without changing the prototype.
 */
-struct MPID_Segment_piece_params {
+struct MPIDU_Segment_piece_params {
     union {
 	struct {
 	    char *pack_buffer;
@@ -53,7 +53,7 @@ struct MPID_Segment_piece_params {
 };
 
 /* prototypes of internal functions */
-static int MPID_Segment_vector_pack_to_iov(DLOOP_Offset *blocks_p,
+static int MPIDU_Segment_vector_pack_to_iov(DLOOP_Offset *blocks_p,
 				       DLOOP_Count count,
 				       DLOOP_Size blksz,
 				       DLOOP_Offset stride,
@@ -62,19 +62,19 @@ static int MPID_Segment_vector_pack_to_iov(DLOOP_Offset *blocks_p,
 				       void *bufp,
 				       void *v_paramp);
 
-static int MPID_Segment_contig_pack_to_iov(DLOOP_Offset *blocks_p,
+static int MPIDU_Segment_contig_pack_to_iov(DLOOP_Offset *blocks_p,
                                            DLOOP_Type el_type,
 					   DLOOP_Offset rel_off,
 					   void *bufp,
 					   void *v_paramp);
 
-static int MPID_Segment_contig_flatten(DLOOP_Offset *blocks_p,
+static int MPIDU_Segment_contig_flatten(DLOOP_Offset *blocks_p,
 				   DLOOP_Type el_type,
 				   DLOOP_Offset rel_off,
 				   void *bufp,
 				   void *v_paramp);
 
-static int MPID_Segment_vector_flatten(DLOOP_Offset *blocks_p,
+static int MPIDU_Segment_vector_flatten(DLOOP_Offset *blocks_p,
 				   DLOOP_Count count,
 				   DLOOP_Size blksz,
 				   DLOOP_Offset stride,
@@ -86,10 +86,10 @@ static int MPID_Segment_vector_flatten(DLOOP_Offset *blocks_p,
 /********** EXTERNALLY VISIBLE FUNCTIONS FOR TYPE MANIPULATION **********/
 
 #undef FUNCNAME
-#define FUNCNAME MPID_Segment_pack_vector
+#define FUNCNAME MPIDU_Segment_pack_vector
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-/* MPID_Segment_pack_vector
+/* MPIDU_Segment_pack_vector
 *
 * Parameters:
 * segp    - pointer to segment structure
@@ -101,13 +101,13 @@ static int MPID_Segment_vector_flatten(DLOOP_Offset *blocks_p,
 * lengthp - in/out parameter describing length of array (and afterwards
 *           the amount of the array that has actual data)
 */
-void MPID_Segment_pack_vector(struct DLOOP_Segment *segp,
+void MPIDU_Segment_pack_vector(struct DLOOP_Segment *segp,
 			  DLOOP_Offset first,
 			  DLOOP_Offset *lastp,
 			  DLOOP_VECTOR *vectorp,
 			  int *lengthp)
 {
-struct MPID_Segment_piece_params packvec_params;
+struct MPIDU_Segment_piece_params packvec_params;
 MPIDI_STATE_DECL(MPID_STATE_MPID_SEGMENT_PACK_VECTOR);
 
 MPIDI_FUNC_ENTER(MPID_STATE_MPID_SEGMENT_PACK_VECTOR);
@@ -118,31 +118,31 @@ packvec_params.u.pack_vector.length  = *lengthp;
 
 MPIU_Assert(*lengthp > 0);
 
-MPID_Segment_manipulate(segp,
+MPIDU_Segment_manipulate(segp,
 			first,
 			lastp,
-			MPID_Segment_contig_pack_to_iov,
-			MPID_Segment_vector_pack_to_iov,
+			MPIDU_Segment_contig_pack_to_iov,
+			MPIDU_Segment_vector_pack_to_iov,
 			NULL, /* blkidx fn */
 			NULL, /* index fn */
 			NULL,
 			&packvec_params);
 
-/* last value already handled by MPID_Segment_manipulate */
+/* last value already handled by MPIDU_Segment_manipulate */
 *lengthp = packvec_params.u.pack_vector.index;
 MPIDI_FUNC_EXIT(MPID_STATE_MPID_SEGMENT_PACK_VECTOR);
 return;
 }
 
-/* MPID_Segment_unpack_vector
+/* MPIDU_Segment_unpack_vector
 *
 * Q: Should this be any different from pack vector?
 */
 #undef FUNCNAME
-#define FUNCNAME MPID_Segment_unpack_vector
+#define FUNCNAME MPIDU_Segment_unpack_vector
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-void MPID_Segment_unpack_vector(struct DLOOP_Segment *segp,
+void MPIDU_Segment_unpack_vector(struct DLOOP_Segment *segp,
 			    DLOOP_Offset first,
 			    DLOOP_Offset *lastp,
 			    DLOOP_VECTOR *vectorp,
@@ -150,16 +150,16 @@ void MPID_Segment_unpack_vector(struct DLOOP_Segment *segp,
 {
 MPIDI_STATE_DECL(MPID_STATE_MPID_SEGMENT_UNPACK_VECTOR);
 MPIDI_FUNC_ENTER(MPID_STATE_MPID_SEGMENT_UNPACK_VECTOR);
-MPID_Segment_pack_vector(segp, first, lastp, vectorp, lengthp);
+MPIDU_Segment_pack_vector(segp, first, lastp, vectorp, lengthp);
 MPIDI_FUNC_EXIT(MPID_STATE_MPID_SEGMENT_UNPACK_VECTOR);
 return;
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPID_Segment_flatten
+#define FUNCNAME MPIDU_Segment_flatten
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-/* MPID_Segment_flatten
+/* MPIDU_Segment_flatten
 *
 * offp    - pointer to array to fill in with offsets
 * sizep   - pointer to array to fill in with sizes
@@ -169,14 +169,14 @@ return;
 *
 * TODO: MAKE SIZES Aints IN ROMIO, CHANGE THIS TO USE INTS TOO.
 */
-void MPID_Segment_flatten(struct DLOOP_Segment *segp,
+void MPIDU_Segment_flatten(struct DLOOP_Segment *segp,
 		      DLOOP_Offset first,
 		      DLOOP_Offset *lastp,
 		      DLOOP_Offset *offp,
 		      DLOOP_Size *sizep,
 		      DLOOP_Offset *lengthp)
 {
-struct MPID_Segment_piece_params packvec_params;
+struct MPIDU_Segment_piece_params packvec_params;
 MPIDI_STATE_DECL(MPID_STATE_MPID_SEGMENT_FLATTEN);
 
 MPIDI_FUNC_ENTER(MPID_STATE_MPID_SEGMENT_FLATTEN);
@@ -188,17 +188,17 @@ packvec_params.u.flatten.length  = *lengthp;
 
 MPIU_Assert(*lengthp > 0);
 
-MPID_Segment_manipulate(segp,
+MPIDU_Segment_manipulate(segp,
 			first,
 			lastp,
-			MPID_Segment_contig_flatten,
-			MPID_Segment_vector_flatten,
+			MPIDU_Segment_contig_flatten,
+			MPIDU_Segment_vector_flatten,
 			NULL, /* blkidx fn */
 			NULL,
 			NULL,
 			&packvec_params);
 
-/* last value already handled by MPID_Segment_manipulate */
+/* last value already handled by MPIDU_Segment_manipulate */
 *lengthp = packvec_params.u.flatten.index;
 MPIDI_FUNC_EXIT(MPID_STATE_MPID_SEGMENT_FLATTEN);
 return;
@@ -212,12 +212,12 @@ return;
 /********** FUNCTIONS FOR CREATING AN IOV DESCRIBING BUFFER **********/
 
 #undef FUNCNAME
-#define FUNCNAME MPID_Segment_contig_pack_to_iov
+#define FUNCNAME MPIDU_Segment_contig_pack_to_iov
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-/* MPID_Segment_contig_pack_to_iov
+/* MPIDU_Segment_contig_pack_to_iov
 */
-static int MPID_Segment_contig_pack_to_iov(DLOOP_Offset *blocks_p,
+static int MPIDU_Segment_contig_pack_to_iov(DLOOP_Offset *blocks_p,
                                            DLOOP_Type el_type,
 					   DLOOP_Offset rel_off,
 					   void *bufp,
@@ -226,12 +226,12 @@ static int MPID_Segment_contig_pack_to_iov(DLOOP_Offset *blocks_p,
     int el_size, last_idx;
     DLOOP_Offset size;
     char *last_end = NULL;
-    struct MPID_Segment_piece_params *paramp = v_paramp;
+    struct MPIDU_Segment_piece_params *paramp = v_paramp;
     MPIDI_STATE_DECL(MPID_STATE_MPID_SEGMENT_CONTIG_PACK_TO_IOV);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_SEGMENT_CONTIG_PACK_TO_IOV);
 
-    el_size = MPID_Datatype_get_basic_size(el_type);
+    el_size = MPIDU_Datatype_get_basic_size(el_type);
     size = *blocks_p * (DLOOP_Offset) el_size;
 
     MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE,VERBOSE,(MPL_DBG_FDEST,
@@ -275,10 +275,10 @@ static int MPID_Segment_contig_pack_to_iov(DLOOP_Offset *blocks_p,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPID_Segment_vector_pack_to_iov
+#define FUNCNAME MPIDU_Segment_vector_pack_to_iov
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-/* MPID_Segment_vector_pack_to_iov
+/* MPIDU_Segment_vector_pack_to_iov
  *
  * Input Parameters:
  * blocks_p - [inout] pointer to a count of blocks (total, for all noncontiguous pieces)
@@ -291,7 +291,7 @@ static int MPID_Segment_contig_pack_to_iov(DLOOP_Offset *blocks_p,
  * Note: this is only called when the starting position is at the beginning
  * of a whole block in a vector type.
  */
-static int MPID_Segment_vector_pack_to_iov(DLOOP_Offset *blocks_p,
+static int MPIDU_Segment_vector_pack_to_iov(DLOOP_Offset *blocks_p,
 					   DLOOP_Count count,
 					   DLOOP_Size blksz,
 					   DLOOP_Offset stride,
@@ -302,12 +302,12 @@ static int MPID_Segment_vector_pack_to_iov(DLOOP_Offset *blocks_p,
 {
     int i;
     DLOOP_Offset size, blocks_left, basic_size;
-    struct MPID_Segment_piece_params *paramp = v_paramp;
+    struct MPIDU_Segment_piece_params *paramp = v_paramp;
     MPIDI_STATE_DECL(MPID_STATE_MPID_SEGMENT_VECTOR_PACK_TO_IOV);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_SEGMENT_VECTOR_PACK_TO_IOV);
 
-    basic_size = (DLOOP_Offset) MPID_Datatype_get_basic_size(el_type);
+    basic_size = (DLOOP_Offset) MPIDU_Datatype_get_basic_size(el_type);
     blocks_left = *blocks_p;
 
     MPL_DBG_MSG_FMT(MPIR_DBG_DATATYPE,VERBOSE,(MPL_DBG_FDEST,
@@ -397,12 +397,12 @@ static int MPID_Segment_vector_pack_to_iov(DLOOP_Offset *blocks_p,
 /********** FUNCTIONS FOR FLATTENING A TYPE **********/
 
 #undef FUNCNAME
-#define FUNCNAME MPID_Segment_contig_flatten
+#define FUNCNAME MPIDU_Segment_contig_flatten
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-/* MPID_Segment_contig_flatten
+/* MPIDU_Segment_contig_flatten
  */
-static int MPID_Segment_contig_flatten(DLOOP_Offset *blocks_p,
+static int MPIDU_Segment_contig_flatten(DLOOP_Offset *blocks_p,
 				       DLOOP_Type el_type,
 				       DLOOP_Offset rel_off,
 				       void *bufp,
@@ -410,12 +410,12 @@ static int MPID_Segment_contig_flatten(DLOOP_Offset *blocks_p,
 {
     int idx, el_size;
     DLOOP_Offset size;
-    struct MPID_Segment_piece_params *paramp = v_paramp;
+    struct MPIDU_Segment_piece_params *paramp = v_paramp;
     MPIDI_STATE_DECL(MPID_STATE_MPID_SEGMENT_CONTIG_FLATTEN);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_SEGMENT_CONTIG_FLATTEN);
 
-    el_size = MPID_Datatype_get_basic_size(el_type);
+    el_size = MPIDU_Datatype_get_basic_size(el_type);
     size = *blocks_p * (DLOOP_Offset) el_size;
     idx = paramp->u.flatten.index;
 
@@ -454,20 +454,20 @@ static int MPID_Segment_contig_flatten(DLOOP_Offset *blocks_p,
 }
 
 #undef FUNCNAME
-#define FUNCNAME MPID_Segment_vector_flatten
+#define FUNCNAME MPIDU_Segment_vector_flatten
 #undef FCNAME
 #define FCNAME MPL_QUOTE(FUNCNAME)
-/* MPID_Segment_vector_flatten
+/* MPIDU_Segment_vector_flatten
  *
  * Notes:
  * - this is only called when the starting position is at the beginning
  *   of a whole block in a vector type.
- * - this was a virtual copy of MPID_Segment_pack_to_iov; now it has improvements
- *   that MPID_Segment_pack_to_iov needs.
+ * - this was a virtual copy of MPIDU_Segment_pack_to_iov; now it has improvements
+ *   that MPIDU_Segment_pack_to_iov needs.
  * - we return the number of blocks that we did process in region pointed to by
  *   blocks_p.
  */
-static int MPID_Segment_vector_flatten(DLOOP_Offset *blocks_p,
+static int MPIDU_Segment_vector_flatten(DLOOP_Offset *blocks_p,
 				       DLOOP_Count count,
 				       DLOOP_Size blksz,
 				       DLOOP_Offset stride,
@@ -478,12 +478,12 @@ static int MPID_Segment_vector_flatten(DLOOP_Offset *blocks_p,
 {
     int i;
     DLOOP_Offset size, blocks_left, basic_size;
-    struct MPID_Segment_piece_params *paramp = v_paramp;
+    struct MPIDU_Segment_piece_params *paramp = v_paramp;
     MPIDI_STATE_DECL(MPID_STATE_MPID_SEGMENT_VECTOR_FLATTEN);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPID_SEGMENT_VECTOR_FLATTEN);
 
-    basic_size = (DLOOP_Offset) MPID_Datatype_get_basic_size(el_type);
+    basic_size = (DLOOP_Offset) MPIDU_Datatype_get_basic_size(el_type);
     blocks_left = *blocks_p;
 
     for (i=0; i < count && blocks_left > 0; i++) {
diff --git a/src/mpid/common/datatype/mpid_type_blockindexed.c b/src/mpid/common/datatype/mpid_type_blockindexed.c
index a3caf24..274db4d 100644
--- a/src/mpid/common/datatype/mpid_type_blockindexed.c
+++ b/src/mpid/common/datatype/mpid_type_blockindexed.c
@@ -12,7 +12,7 @@
 #undef MPID_TYPE_ALLOC_DEBUG
 
 /*@
-  MPID_Type_blockindexed - create a block indexed datatype
+  MPIDU_Type_blockindexed - create a block indexed datatype
 
 Input Parameters:
 + count - number of blocks in type
@@ -30,7 +30,7 @@ Output Parameters:
   MPI_SUCCESS on success, MPI error on failure.
 @*/
 
-int MPID_Type_blockindexed(int count,
+int MPIDU_Type_blockindexed(int count,
 			   int blocklength,
 			   const void *displacement_array,
 			   int dispinbytes,
@@ -45,17 +45,17 @@ int MPID_Type_blockindexed(int count,
     MPI_Aint old_lb, old_ub, old_extent, old_true_lb, old_true_ub;
     MPI_Aint min_lb = 0, max_ub = 0, eff_disp;
 
-    MPID_Datatype *new_dtp;
+    MPIDU_Datatype *new_dtp;
 
-    if (count == 0) return MPID_Type_zerolen(newtype);
+    if (count == 0) return MPIDU_Type_zerolen(newtype);
 
     /* allocate new datatype object and handle */
-    new_dtp = (MPID_Datatype *) MPIU_Handle_obj_alloc(&MPID_Datatype_mem);
+    new_dtp = (MPIDU_Datatype *) MPIU_Handle_obj_alloc(&MPIDU_Datatype_mem);
     /* --BEGIN ERROR HANDLING-- */
     if (!new_dtp)
     {
 	mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
-					 "MPID_Type_vector", __LINE__,
+					 "MPIDU_Type_vector", __LINE__,
 					 MPI_ERR_OTHER, "**nomem", 0);
 	return mpi_errno;
     }
@@ -81,7 +81,7 @@ int MPID_Type_blockindexed(int count,
 
     if (is_builtin)
     {
-	el_sz   = (MPI_Aint) MPID_Datatype_get_basic_size(oldtype);
+	el_sz   = (MPI_Aint) MPIDU_Datatype_get_basic_size(oldtype);
 	el_type = oldtype;
 
 	old_lb        = 0;
@@ -106,9 +106,9 @@ int MPID_Type_blockindexed(int count,
     else
     {
 	/* user-defined base type (oldtype) */
-	MPID_Datatype *old_dtp;
+	MPIDU_Datatype *old_dtp;
 
-	MPID_Datatype_get_ptr(oldtype, old_dtp);
+	MPIDU_Datatype_get_ptr(oldtype, old_dtp);
 	el_sz   = old_dtp->builtin_element_size;
 	el_type = old_dtp->basic_type;
 
@@ -136,7 +136,7 @@ int MPID_Type_blockindexed(int count,
     /* priming for loop */
     eff_disp = (dispinbytes) ? ((MPI_Aint *) displacement_array)[0] :
 	(((MPI_Aint) ((int *) displacement_array)[0]) * old_extent);
-    MPID_DATATYPE_BLOCK_LB_UB((MPI_Aint) blocklength,
+    MPIDU_DATATYPE_BLOCK_LB_UB((MPI_Aint) blocklength,
 			      eff_disp,
 			      old_lb,
 			      old_ub,
@@ -151,7 +151,7 @@ int MPID_Type_blockindexed(int count,
 
 	eff_disp = (dispinbytes) ? ((MPI_Aint *) displacement_array)[i] :
 	    (((MPI_Aint) ((int *) displacement_array)[i]) * old_extent);
-	MPID_DATATYPE_BLOCK_LB_UB((MPI_Aint) blocklength,
+	MPIDU_DATATYPE_BLOCK_LB_UB((MPI_Aint) blocklength,
 				  eff_disp,
 				  old_lb,
 				  old_ub,
@@ -176,7 +176,7 @@ int MPID_Type_blockindexed(int count,
     new_dtp->is_contig = 0;
     if (old_is_contig)
     {
-	contig_count = MPID_Type_blockindexed_count_contig(count,
+	contig_count = MPIDU_Type_blockindexed_count_contig(count,
 							   blocklength,
 							   displacement_array,
 							   dispinbytes,
diff --git a/src/mpid/common/datatype/mpid_type_commit.c b/src/mpid/common/datatype/mpid_type_commit.c
index 08dc22e..1764ef4 100644
--- a/src/mpid/common/datatype/mpid_type_commit.c
+++ b/src/mpid/common/datatype/mpid_type_commit.c
@@ -9,7 +9,7 @@
 #include <stdlib.h>
 
 /*@
-  MPID_Type_commit
+  MPIDU_Type_commit
  
 Input Parameters:
 . datatype_p - pointer to MPI datatype
@@ -20,14 +20,14 @@ Output Parameters:
   0 on success, -1 on failure.
 @*/
 
-int MPID_Type_commit(MPI_Datatype *datatype_p)
+int MPIDU_Type_commit(MPI_Datatype *datatype_p)
 {
     int           mpi_errno=MPI_SUCCESS;
-    MPID_Datatype *datatype_ptr;
+    MPIDU_Datatype *datatype_ptr;
 
     MPIU_Assert(HANDLE_GET_KIND(*datatype_p) != HANDLE_KIND_BUILTIN);
 
-    MPID_Datatype_get_ptr(*datatype_p, datatype_ptr);
+    MPIDU_Datatype_get_ptr(*datatype_p, datatype_ptr);
 
     if (datatype_ptr->is_committed == 0) {
        datatype_ptr->is_committed = 1;
@@ -35,25 +35,25 @@ int MPID_Type_commit(MPI_Datatype *datatype_p)
 #ifdef MPID_NEEDS_DLOOP_ALL_BYTES
         /* If MPID implementation needs use to reduce everything to
            a byte stream, do that. */
-	MPID_Dataloop_create(*datatype_p,
+	MPIDU_Dataloop_create(*datatype_p,
 			     &datatype_ptr->dataloop,
 			     &datatype_ptr->dataloop_size,
 			     &datatype_ptr->dataloop_depth,
-			     MPID_DATALOOP_ALL_BYTES);
+			     MPIDU_DATALOOP_ALL_BYTES);
 #else
-	MPID_Dataloop_create(*datatype_p,
+	MPIDU_Dataloop_create(*datatype_p,
 			     &datatype_ptr->dataloop,
 			     &datatype_ptr->dataloop_size,
 			     &datatype_ptr->dataloop_depth,
-			     MPID_DATALOOP_HOMOGENEOUS);
+			     MPIDU_DATALOOP_HOMOGENEOUS);
 #endif
 
 	/* create heterogeneous dataloop */
-	MPID_Dataloop_create(*datatype_p,
+	MPIDU_Dataloop_create(*datatype_p,
 			     &datatype_ptr->hetero_dloop,
 			     &datatype_ptr->hetero_dloop_size,
 			     &datatype_ptr->hetero_dloop_depth,
-			     MPID_DATALOOP_HETEROGENEOUS);
+			     MPIDU_DATALOOP_HETEROGENEOUS);
 
 	MPL_DBG_MSG_D(MPIR_DBG_DATATYPE,TERSE,"# contig blocks = %d\n",
                        (int) datatype_ptr->max_contig_blocks);
@@ -62,9 +62,9 @@ int MPID_Type_commit(MPI_Datatype *datatype_p)
         MPIDI_Dataloop_dot_printf(datatype_ptr->dataloop, 0, 1);
 #endif
 
-#ifdef MPID_Dev_datatype_commit_hook
-       MPID_Dev_datatype_commit_hook(datatype_p);
-#endif /* MPID_Dev_datatype_commit_hook */
+#ifdef MPIDU_Dev_datatype_commit_hook
+       MPIDU_Dev_datatype_commit_hook(datatype_p);
+#endif /* MPIDU_Dev_datatype_commit_hook */
 
     }
     return mpi_errno;
diff --git a/src/mpid/common/datatype/mpid_type_contiguous.c b/src/mpid/common/datatype/mpid_type_contiguous.c
index 6b0d901..fb0b481 100644
--- a/src/mpid/common/datatype/mpid_type_contiguous.c
+++ b/src/mpid/common/datatype/mpid_type_contiguous.c
@@ -12,7 +12,7 @@
 /* #define MPID_TYPE_ALLOC_DEBUG */
 
 /*@
-  MPID_Type_contiguous - create a contiguous datatype
+  MPIDU_Type_contiguous - create a contiguous datatype
 
 Input Parameters:
 + count - number of elements in the contiguous block
@@ -24,7 +24,7 @@ Output Parameters:
   Return Value:
   MPI_SUCCESS on success, MPI error code on failure.
 @*/
-int MPID_Type_contiguous(int count,
+int MPIDU_Type_contiguous(int count,
 			 MPI_Datatype oldtype,
 			 MPI_Datatype *newtype)
 {
@@ -32,17 +32,17 @@ int MPID_Type_contiguous(int count,
     int is_builtin;
     MPI_Aint el_sz;
     MPI_Datatype el_type;
-    MPID_Datatype *new_dtp;
+    MPIDU_Datatype *new_dtp;
 
-    if (count == 0) return MPID_Type_zerolen(newtype);
+    if (count == 0) return MPIDU_Type_zerolen(newtype);
 
     /* allocate new datatype object and handle */
-    new_dtp = (MPID_Datatype *) MPIU_Handle_obj_alloc(&MPID_Datatype_mem);
+    new_dtp = (MPIDU_Datatype *) MPIU_Handle_obj_alloc(&MPIDU_Datatype_mem);
     /* --BEGIN ERROR HANDLING-- */
     if (!new_dtp)
     {
 	mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
-					 "MPID_Type_contiguous",
+					 "MPIDU_Type_contiguous",
 					 __LINE__, MPI_ERR_OTHER,
 					 "**nomem", 0);
 	return mpi_errno;
@@ -69,7 +69,7 @@ int MPID_Type_contiguous(int count,
 
     if (is_builtin)
     {
-	el_sz   = MPID_Datatype_get_basic_size(oldtype);
+	el_sz   = MPIDU_Datatype_get_basic_size(oldtype);
 	el_type = oldtype;
 
 	new_dtp->size          = count * el_sz;
@@ -92,9 +92,9 @@ int MPID_Type_contiguous(int count,
     else
     {
 	/* user-defined base type (oldtype) */
-	MPID_Datatype *old_dtp;
+	MPIDU_Datatype *old_dtp;
 
-	MPID_Datatype_get_ptr(oldtype, old_dtp);
+	MPIDU_Datatype_get_ptr(oldtype, old_dtp);
 	el_sz   = old_dtp->builtin_element_size;
 	el_type = old_dtp->basic_type;
 
@@ -102,7 +102,7 @@ int MPID_Type_contiguous(int count,
 	new_dtp->has_sticky_ub  = old_dtp->has_sticky_ub;
 	new_dtp->has_sticky_lb  = old_dtp->has_sticky_lb;
 
-	MPID_DATATYPE_CONTIG_LB_UB((MPI_Aint) count,
+	MPIDU_DATATYPE_CONTIG_LB_UB((MPI_Aint) count,
 				   old_dtp->lb,
 				   old_dtp->ub,
 				   old_dtp->extent,
diff --git a/src/mpid/common/datatype/mpid_type_create_pairtype.c b/src/mpid/common/datatype/mpid_type_create_pairtype.c
index e0de9ce..ef83d0e 100644
--- a/src/mpid/common/datatype/mpid_type_create_pairtype.c
+++ b/src/mpid/common/datatype/mpid_type_create_pairtype.c
@@ -23,17 +23,17 @@
 	true_ub_ = (MPIU_VOID_PTR_CAST_TO_MPI_AINT ((char *) &foo.b -     \
                                                   (char *) &foo.a)) +   \
                   (MPI_Aint) sizeof(foo.b);                             \
-	alignsize_ = MPL_MAX(MPID_Datatype_get_basic_size(mt1_),	\
-                             MPID_Datatype_get_basic_size(mt2_));	\
+	alignsize_ = MPL_MAX(MPIDU_Datatype_get_basic_size(mt1_),	\
+                             MPIDU_Datatype_get_basic_size(mt2_));	\
     }
 
 /*@
-  MPID_Type_create_pairtype - create necessary data structures for certain
+  MPIDU_Type_create_pairtype - create necessary data structures for certain
   pair types (all but MPI_2INT etc., which never have the size != extent
   issue).
 
-  This function is different from the other MPID_Type_create functions in that
-  it fills in an already- allocated MPID_Datatype.  This is important for
+  This function is different from the other MPIDU_Type_create functions in that
+  it fills in an already- allocated MPIDU_Datatype.  This is important for
   allowing configure-time determination of the MPI type values (these types
   are stored in the "direct" space, for those familiar with how MPICH deals
   with type allocation).
@@ -63,8 +63,8 @@ Input Parameters:
   Thus in our implementation we have chosen to instead use the actual
   difference in starting locations of the two types in an actual struct.
 @*/
-int MPID_Type_create_pairtype(MPI_Datatype type,
-			      MPID_Datatype *new_dtp)
+int MPIDU_Type_create_pairtype(MPI_Datatype type,
+			      MPIDU_Datatype *new_dtp)
 {
     int err, mpi_errno = MPI_SUCCESS;
     int type_size, alignsize;
@@ -111,7 +111,7 @@ int MPID_Type_create_pairtype(MPI_Datatype type,
 	    /* --BEGIN ERROR HANDLING-- */
 	    mpi_errno = MPIR_Err_create_code(MPI_SUCCESS,
 					     MPIR_ERR_RECOVERABLE,
-					     "MPID_Type_create_pairtype",
+					     "MPIDU_Type_create_pairtype",
 					     __LINE__,
 					     MPI_ERR_OTHER,
 					     "**dtype", 0);
@@ -186,32 +186,32 @@ int MPID_Type_create_pairtype(MPI_Datatype type,
 #ifdef MPID_NEEDS_DLOOP_ALL_BYTES
     /* If MPID implementation needs use to reduce everything to
        a byte stream, do that. */
-    err = MPID_Dataloop_create_pairtype(type,
+    err = MPIDU_Dataloop_create_pairtype(type,
 					&(new_dtp->dataloop),
 					&(new_dtp->dataloop_size),
 					&(new_dtp->dataloop_depth),
-					MPID_DATALOOP_ALL_BYTES);
+					MPIDU_DATALOOP_ALL_BYTES);
 #else
-    err = MPID_Dataloop_create_pairtype(type,
+    err = MPIDU_Dataloop_create_pairtype(type,
 					&(new_dtp->dataloop),
 					&(new_dtp->dataloop_size),
 					&(new_dtp->dataloop_depth),
-					MPID_DATALOOP_HOMOGENEOUS);
+					MPIDU_DATALOOP_HOMOGENEOUS);
 #endif
 
     if (!err) {
-	err = MPID_Dataloop_create_pairtype(type,
+	err = MPIDU_Dataloop_create_pairtype(type,
 					    &(new_dtp->hetero_dloop),
 					    &(new_dtp->hetero_dloop_size),
 					    &(new_dtp->hetero_dloop_depth),
-					    MPID_DATALOOP_HETEROGENEOUS);
+					    MPIDU_DATALOOP_HETEROGENEOUS);
     }
 
     /* --BEGIN ERROR HANDLING-- */
     if (err) {
 	mpi_errno = MPIR_Err_create_code(MPI_SUCCESS,
 					 MPIR_ERR_RECOVERABLE,
-					 "MPID_Dataloop_create_pairtype",
+					 "MPIDU_Dataloop_create_pairtype",
 					 __LINE__,
 					 MPI_ERR_OTHER,
 					 "**nomem",
diff --git a/src/mpid/common/datatype/mpid_type_create_resized.c b/src/mpid/common/datatype/mpid_type_create_resized.c
index 7e89257..16a4545 100644
--- a/src/mpid/common/datatype/mpid_type_create_resized.c
+++ b/src/mpid/common/datatype/mpid_type_create_resized.c
@@ -13,14 +13,14 @@
 
 static int MPIDI_Type_create_resized_memory_error(void);
 
-int MPID_Type_create_resized(MPI_Datatype oldtype,
+int MPIDU_Type_create_resized(MPI_Datatype oldtype,
 			     MPI_Aint lb,
 			     MPI_Aint extent,
 			     MPI_Datatype *newtype_p)
 {
-    MPID_Datatype *new_dtp;
+    MPIDU_Datatype *new_dtp;
 
-    new_dtp = (MPID_Datatype *) MPIU_Handle_obj_alloc(&MPID_Datatype_mem);
+    new_dtp = (MPIDU_Datatype *) MPIU_Handle_obj_alloc(&MPIDU_Datatype_mem);
     /* --BEGIN ERROR HANDLING-- */
     if (!new_dtp) return MPIDI_Type_create_resized_memory_error();
     /* --END ERROR HANDLING-- */
@@ -44,7 +44,7 @@ int MPID_Type_create_resized(MPI_Datatype oldtype,
     /* if oldtype is a basic, we build a contiguous dataloop of count = 1 */
     if (HANDLE_GET_KIND(oldtype) == HANDLE_KIND_BUILTIN)
     {
-	int oldsize = MPID_Datatype_get_basic_size(oldtype);
+	int oldsize = MPIDU_Datatype_get_basic_size(oldtype);
 
 	new_dtp->size           = oldsize;
 	new_dtp->has_sticky_ub  = 0;
@@ -65,9 +65,9 @@ int MPID_Type_create_resized(MPI_Datatype oldtype,
     else
     {
 	/* user-defined base type */
-	MPID_Datatype *old_dtp;
+	MPIDU_Datatype *old_dtp;
 
-	MPID_Datatype_get_ptr(oldtype, old_dtp);
+	MPIDU_Datatype_get_ptr(oldtype, old_dtp);
 
 	new_dtp->size           = old_dtp->size;
 	new_dtp->has_sticky_ub  = 0;
@@ -103,7 +103,7 @@ static int MPIDI_Type_create_resized_memory_error(void)
 
     mpi_errno = MPIR_Err_create_code(MPI_SUCCESS,
 				     MPIR_ERR_RECOVERABLE,
-				     "MPID_Type_create_resized",
+				     "MPIDU_Type_create_resized",
 				     __LINE__,
 				     MPI_ERR_OTHER,
 				     "**nomem",
diff --git a/src/mpid/common/datatype/mpid_type_debug.c b/src/mpid/common/datatype/mpid_type_debug.c
index 586bec4..31872b3 100644
--- a/src/mpid/common/datatype/mpid_type_debug.c
+++ b/src/mpid/common/datatype/mpid_type_debug.c
@@ -22,7 +22,7 @@
 
 
 void MPIDI_Datatype_dot_printf(MPI_Datatype type, int depth, int header);
-void MPIDI_Dataloop_dot_printf(MPID_Dataloop *loop_p, int depth, int header);
+void MPIDI_Dataloop_dot_printf(MPIDU_Dataloop *loop_p, int depth, int header);
 void MPIDI_Datatype_contents_printf(MPI_Datatype type, int depth, int acount);
 static char *MPIDI_Datatype_depth_spacing(int depth) ATTRIBUTE((unused));
 
@@ -44,10 +44,10 @@ void MPIDI_Datatype_dot_printf(MPI_Datatype type,
 	return;
     }
     else {
-	MPID_Datatype *dt_p;
-	MPID_Dataloop *loop_p;
+	MPIDU_Datatype *dt_p;
+	MPIDU_Dataloop *loop_p;
 
-	MPID_Datatype_get_ptr(type, dt_p);
+	MPIDU_Datatype_get_ptr(type, dt_p);
 	loop_p = dt_p->dataloop;
 
 	MPIDI_Dataloop_dot_printf(loop_p, depth, header);
@@ -55,7 +55,7 @@ void MPIDI_Datatype_dot_printf(MPI_Datatype type,
     }
 }
 
-void MPIDI_Dataloop_dot_printf(MPID_Dataloop *loop_p,
+void MPIDI_Dataloop_dot_printf(MPIDU_Dataloop *loop_p,
 			       int depth,
 			       int header)
 {
@@ -248,9 +248,9 @@ void MPIDI_Datatype_printf(MPI_Datatype type,
 	else sticky_ub = 0;
     }
     else {
-	MPID_Datatype *type_ptr;
+	MPIDU_Datatype *type_ptr;
 
-	MPID_Datatype_get_ptr(type, type_ptr);
+	MPIDU_Datatype_get_ptr(type, type_ptr);
 	string = MPIDU_Datatype_combiner_to_string(type_ptr->contents->combiner);
 	sticky_lb = type_ptr->has_sticky_lb;
 	sticky_ub = type_ptr->has_sticky_ub;
@@ -441,7 +441,7 @@ void MPIDU_Datatype_debug(MPI_Datatype type,
 			  int array_ct)
 {
     int is_builtin;
-    MPID_Datatype *dtp ATTRIBUTE((unused));
+    MPIDU_Datatype *dtp ATTRIBUTE((unused));
 
     is_builtin = (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN);
 
@@ -462,7 +462,7 @@ void MPIDU_Datatype_debug(MPI_Datatype type,
 
     if (is_builtin) return;
 
-    MPID_Datatype_get_ptr(type, dtp);
+    MPIDU_Datatype_get_ptr(type, dtp);
     MPIU_Assert(dtp != NULL);
 
     MPL_DBG_OUT_FMT(MPIR_DBG_DATATYPE,(MPL_DBG_FDEST,
@@ -516,8 +516,8 @@ void MPIDI_Datatype_contents_printf(MPI_Datatype type,
 				    int acount)
 {
     int i;
-    MPID_Datatype *dtp;
-    MPID_Datatype_contents *cp;
+    MPIDU_Datatype *dtp;
+    MPIDU_Datatype_contents *cp;
 
     MPI_Aint *aints = NULL;
     MPI_Datatype *types = NULL;
@@ -530,7 +530,7 @@ void MPIDI_Datatype_contents_printf(MPI_Datatype type,
 	return;
     }
 
-    MPID_Datatype_get_ptr(type, dtp);
+    MPIDU_Datatype_get_ptr(type, dtp);
     cp = dtp->contents;
 
     if (cp == NULL) {
diff --git a/src/mpid/common/datatype/mpid_type_dup.c b/src/mpid/common/datatype/mpid_type_dup.c
index d6328fd..13349ac 100644
--- a/src/mpid/common/datatype/mpid_type_dup.c
+++ b/src/mpid/common/datatype/mpid_type_dup.c
@@ -10,12 +10,12 @@
 #include <stdlib.h>
 
 #undef FCNAME
-#define FCNAME "MPID_Type_dup"
+#define FCNAME "MPIDU_Type_dup"
 
 /* #define MPID_TYPE_ALLOC_DEBUG */
 
 /*@
-  MPID_Type_dup - create a copy of a datatype
+  MPIDU_Type_dup - create a copy of a datatype
  
 Input Parameters:
 - oldtype - handle of original datatype
@@ -26,30 +26,30 @@ Output Parameters:
   Return Value:
   0 on success, MPI error code on failure.
 @*/
-int MPID_Type_dup(MPI_Datatype oldtype,
+int MPIDU_Type_dup(MPI_Datatype oldtype,
 		  MPI_Datatype *newtype)
 {
     int mpi_errno = MPI_SUCCESS;
-    MPID_Datatype *new_dtp = 0, *old_dtp;
+    MPIDU_Datatype *new_dtp = 0, *old_dtp;
 
     if (HANDLE_GET_KIND(oldtype) == HANDLE_KIND_BUILTIN) {
 	/* create a new type and commit it. */
-	mpi_errno = MPID_Type_contiguous(1, oldtype, newtype);
+	mpi_errno = MPIDU_Type_contiguous(1, oldtype, newtype);
 	if (mpi_errno) { MPIR_ERR_POP(mpi_errno); }
     }
     else {
       	/* allocate new datatype object and handle */
-	new_dtp = (MPID_Datatype *) MPIU_Handle_obj_alloc(&MPID_Datatype_mem);
+	new_dtp = (MPIDU_Datatype *) MPIU_Handle_obj_alloc(&MPIDU_Datatype_mem);
 	if (!new_dtp) {
 	    /* --BEGIN ERROR HANDLING-- */
 	    mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
-					     "MPID_Type_dup", __LINE__, MPI_ERR_OTHER,
+					     "MPIDU_Type_dup", __LINE__, MPI_ERR_OTHER,
 					     "**nomem", 0);
 	    goto fn_fail;
 	    /* --END ERROR HANDLING-- */
 	}
 
-	MPID_Datatype_get_ptr(oldtype, old_dtp);
+	MPIDU_Datatype_get_ptr(oldtype, old_dtp);
 
 	/* fill in datatype */
 	MPIU_Object_set_ref(new_dtp, 1);
@@ -86,21 +86,21 @@ int MPID_Type_dup(MPI_Datatype oldtype,
 
 	if (old_dtp->is_committed) {
 	    MPIU_Assert(old_dtp->dataloop != NULL);
-	    MPID_Dataloop_dup(old_dtp->dataloop,
+	    MPIDU_Dataloop_dup(old_dtp->dataloop,
 			      old_dtp->dataloop_size,
 			      &new_dtp->dataloop);
 	    if (old_dtp->hetero_dloop != NULL) {
 		/* at this time MPI_COMPLEX doesn't have this loop...
 		 * -- RBR, 02/01/2007
 		 */
-		MPID_Dataloop_dup(old_dtp->hetero_dloop,
+		MPIDU_Dataloop_dup(old_dtp->hetero_dloop,
 				  old_dtp->hetero_dloop_size,
 				  &new_dtp->hetero_dloop);
 	    }
 
-#ifdef MPID_Dev_datatype_commit_hook
-            MPID_Dev_datatype_dup_hook(new_dtp);
-#endif /* MPID_Dev_datatype_commit_hook */
+#ifdef MPIDU_Dev_datatype_commit_hook
+            MPIDU_Dev_datatype_dup_hook(new_dtp);
+#endif /* MPIDU_Dev_datatype_commit_hook */
       }
     }
 
diff --git a/src/mpid/common/datatype/mpid_type_get_contents.c b/src/mpid/common/datatype/mpid_type_get_contents.c
index 60aadba..5592cb4 100644
--- a/src/mpid/common/datatype/mpid_type_get_contents.c
+++ b/src/mpid/common/datatype/mpid_type_get_contents.c
@@ -11,7 +11,7 @@
 #include <mpid_dataloop.h>
 
 /*@
-  MPID_Type_get_contents - get content information from datatype
+  MPIDU_Type_get_contents - get content information from datatype
 
 Input Parameters:
 + datatype - MPI datatype
@@ -25,7 +25,7 @@ Output Parameters:
 - array_of_datatypes - MPI_Datatypes used in creating type
 
 @*/
-int MPID_Type_get_contents(MPI_Datatype datatype, 
+int MPIDU_Type_get_contents(MPI_Datatype datatype, 
 			   int max_integers, 
 			   int max_addresses, 
 			   int max_datatypes, 
@@ -34,8 +34,8 @@ int MPID_Type_get_contents(MPI_Datatype datatype,
 			   MPI_Datatype array_of_datatypes[])
 {
     int i, mpi_errno;
-    MPID_Datatype *dtp;
-    MPID_Datatype_contents *cp;
+    MPIDU_Datatype *dtp;
+    MPIDU_Datatype_contents *cp;
 
     /* --BEGIN ERROR HANDLING-- */
     /* these are checked at the MPI layer, so I feel that asserts
@@ -49,7 +49,7 @@ int MPID_Type_get_contents(MPI_Datatype datatype,
 		datatype != MPI_LONG_DOUBLE_INT);
     /* --END ERROR HANDLING-- */
 
-    MPID_Datatype_get_ptr(datatype, dtp);
+    MPIDU_Datatype_get_ptr(datatype, dtp);
     cp = dtp->contents;
     MPIU_Assert(cp != NULL);
 
@@ -59,7 +59,7 @@ int MPID_Type_get_contents(MPI_Datatype datatype,
 	max_datatypes < cp->nr_types)
     {
 	mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
-					 "MPID_Type_get_contents", __LINE__,
+					 "MPIDU_Type_get_contents", __LINE__,
 					 MPI_ERR_OTHER, "**dtype", 0);
 	return mpi_errno;
     }
@@ -82,8 +82,8 @@ int MPID_Type_get_contents(MPI_Datatype datatype,
     {
     	if (HANDLE_GET_KIND(array_of_datatypes[i]) != HANDLE_KIND_BUILTIN)
 	{
-	    MPID_Datatype_get_ptr(array_of_datatypes[i], dtp);
-	    MPID_Datatype_add_ref(dtp);
+	    MPIDU_Datatype_get_ptr(array_of_datatypes[i], dtp);
+	    MPIDU_Datatype_add_ref(dtp);
 	}
     }
 
diff --git a/src/mpid/common/datatype/mpid_type_get_envelope.c b/src/mpid/common/datatype/mpid_type_get_envelope.c
index 665c6b9..4485ee1 100644
--- a/src/mpid/common/datatype/mpid_type_get_envelope.c
+++ b/src/mpid/common/datatype/mpid_type_get_envelope.c
@@ -11,7 +11,7 @@
 #include <mpid_dataloop.h>
 
 /*@
-  MPID_Type_get_envelope - get envelope information from datatype
+  MPIDU_Type_get_envelope - get envelope information from datatype
 
 Input Parameters:
 . datatype - MPI datatype
@@ -23,7 +23,7 @@ Output Parameters:
 - combiner - function type used to create datatype
 @*/
 
-int MPID_Type_get_envelope(MPI_Datatype datatype,
+int MPIDU_Type_get_envelope(MPI_Datatype datatype,
 			   int *num_integers,
 			   int *num_addresses,
 			   int *num_datatypes,
@@ -42,9 +42,9 @@ int MPID_Type_get_envelope(MPI_Datatype datatype,
 	*num_datatypes = 0;
     }
     else {
-	MPID_Datatype *dtp;
+	MPIDU_Datatype *dtp;
 
-	MPID_Datatype_get_ptr(datatype, dtp);
+	MPIDU_Datatype_get_ptr(datatype, dtp);
 
 	*combiner      = dtp->contents->combiner;
 	*num_integers  = dtp->contents->nr_ints;
diff --git a/src/mpid/common/datatype/mpid_type_indexed.c b/src/mpid/common/datatype/mpid_type_indexed.c
index 6ec22c3..ecb44e7 100644
--- a/src/mpid/common/datatype/mpid_type_indexed.c
+++ b/src/mpid/common/datatype/mpid_type_indexed.c
@@ -12,7 +12,7 @@
 #undef MPID_TYPE_ALLOC_DEBUG
 
 /*@
-  MPID_Type_indexed - create an indexed datatype
+  MPIDU_Type_indexed - create an indexed datatype
 
 Input Parameters:
 + count - number of blocks in type
@@ -31,7 +31,7 @@ Output Parameters:
   0 on success, -1 on failure.
 @*/
 
-int MPID_Type_indexed(int count,
+int MPIDU_Type_indexed(int count,
 		      const int *blocklength_array,
 		      const void *displacement_array,
 		      int dispinbytes,
@@ -47,9 +47,9 @@ int MPID_Type_indexed(int count,
     MPI_Aint min_lb = 0, max_ub = 0, eff_disp;
     MPI_Datatype el_type;
 
-    MPID_Datatype *new_dtp;
+    MPIDU_Datatype *new_dtp;
 
-    if (count == 0) return MPID_Type_zerolen(newtype);
+    if (count == 0) return MPIDU_Type_zerolen(newtype);
 
     /* sanity check that blocklens are all non-negative */
     for (i = 0; i < count; ++i) {
@@ -57,13 +57,13 @@ int MPID_Type_indexed(int count,
     }
 
     /* allocate new datatype object and handle */
-    new_dtp = (MPID_Datatype *) MPIU_Handle_obj_alloc(&MPID_Datatype_mem);
+    new_dtp = (MPIDU_Datatype *) MPIU_Handle_obj_alloc(&MPIDU_Datatype_mem);
     /* --BEGIN ERROR HANDLING-- */
     if (!new_dtp)
     {
 	mpi_errno = MPIR_Err_create_code(MPI_SUCCESS,
 					 MPIR_ERR_RECOVERABLE,
-					 "MPID_Type_indexed",
+					 "MPIDU_Type_indexed",
 					 __LINE__,
 					 MPI_ERR_OTHER,
 					 "**nomem",
@@ -95,7 +95,7 @@ int MPID_Type_indexed(int count,
 	/* builtins are handled differently than user-defined types because
 	 * they have no associated dataloop or datatype structure.
 	 */
-	el_sz      = MPID_Datatype_get_basic_size(oldtype);
+	el_sz      = MPIDU_Datatype_get_basic_size(oldtype);
 	old_sz     = el_sz;
 	el_ct      = 1;
 	el_type    = oldtype;
@@ -119,9 +119,9 @@ int MPID_Type_indexed(int count,
     else
     {
 	/* user-defined base type (oldtype) */
-	MPID_Datatype *old_dtp;
+	MPIDU_Datatype *old_dtp;
 
-	MPID_Datatype_get_ptr(oldtype, old_dtp);
+	MPIDU_Datatype_get_ptr(oldtype, old_dtp);
 
 	/* Ensure that "builtin_element_size" fits into an int datatype. */
 	MPIU_Ensure_Aint_fits_in_int(old_dtp->builtin_element_size);
@@ -155,8 +155,8 @@ int MPID_Type_indexed(int count,
     while (i < count && blocklength_array[i] == 0) i++;
 
     if (i == count) {
-	MPIU_Handle_obj_free(&MPID_Datatype_mem, new_dtp);
-	return MPID_Type_zerolen(newtype);
+	MPIU_Handle_obj_free(&MPIDU_Datatype_mem, new_dtp);
+	return MPIDU_Type_zerolen(newtype);
     }
 
     /* priming for loop */
@@ -164,7 +164,7 @@ int MPID_Type_indexed(int count,
     eff_disp = (dispinbytes) ? ((MPI_Aint *) displacement_array)[i] :
 	(((MPI_Aint) ((int *) displacement_array)[i]) * old_extent);
 
-    MPID_DATATYPE_BLOCK_LB_UB((MPI_Aint) blocklength_array[i],
+    MPIDU_DATATYPE_BLOCK_LB_UB((MPI_Aint) blocklength_array[i],
 			      eff_disp,
 			      old_lb,
 			      old_ub,
@@ -186,7 +186,7 @@ int MPID_Type_indexed(int count,
 		(((MPI_Aint) ((int *) displacement_array)[i]) * old_extent);
 	
 	    /* calculate ub and lb for this block */
-	    MPID_DATATYPE_BLOCK_LB_UB((MPI_Aint)(blocklength_array[i]),
+	    MPIDU_DATATYPE_BLOCK_LB_UB((MPI_Aint)(blocklength_array[i]),
 				      eff_disp,
 				      old_lb,
 				      old_ub,
@@ -219,7 +219,7 @@ int MPID_Type_indexed(int count,
 	MPI_Aint *blklens = MPL_malloc(count *sizeof(MPI_Aint));
 	for (i=0; i<count; i++)
 		blklens[i] = blocklength_array[i];
-        contig_count = MPID_Type_indexed_count_contig(count,
+        contig_count = MPIDU_Type_indexed_count_contig(count,
 						  blklens,
 						  displacement_array,
 						  dispinbytes,
diff --git a/src/mpid/common/datatype/mpid_type_struct.c b/src/mpid/common/datatype/mpid_type_struct.c
index cabd164..2d79c1b 100644
--- a/src/mpid/common/datatype/mpid_type_struct.c
+++ b/src/mpid/common/datatype/mpid_type_struct.c
@@ -13,11 +13,11 @@
 #undef MPID_STRUCT_FLATTEN_DEBUG
 #undef MPID_STRUCT_DEBUG
 
-static MPI_Aint MPID_Type_struct_alignsize(int count,
+static MPI_Aint MPIDU_Type_struct_alignsize(int count,
 				      const MPI_Datatype *oldtype_array,
 				      const MPI_Aint *displacement_array);
 
-/* MPID_Type_struct_alignsize
+/* MPIDU_Type_struct_alignsize
  *
  * This function guesses at how the C compiler would align a structure
  * with the given components.
@@ -39,7 +39,7 @@ static MPI_Aint MPID_Type_struct_alignsize(int count,
  * have different natural alignments).  Linux on X86, however, does not have
  * different rules for this case.
  */
-static MPI_Aint MPID_Type_struct_alignsize(int count,
+static MPI_Aint MPIDU_Type_struct_alignsize(int count,
 				      const MPI_Datatype *oldtype_array,
 				      const MPI_Aint *displacement_array)
 {
@@ -52,7 +52,7 @@ static MPI_Aint MPID_Type_struct_alignsize(int count,
 	if (oldtype_array[i] == MPI_LB || oldtype_array[i] == MPI_UB) continue;
 	else if (HANDLE_GET_KIND(oldtype_array[i]) == HANDLE_KIND_BUILTIN)
 	{
-	    tmp_alignsize = MPID_Datatype_get_basic_size(oldtype_array[i]);
+	    tmp_alignsize = MPIDU_Datatype_get_basic_size(oldtype_array[i]);
 
 #ifdef HAVE_DOUBLE_ALIGNMENT_EXCEPTION
 	    if (oldtype_array[i] == MPI_DOUBLE) {
@@ -112,9 +112,9 @@ static MPI_Aint MPID_Type_struct_alignsize(int count,
 	}
 	else
 	{
-	    MPID_Datatype *dtp;
+	    MPIDU_Datatype *dtp;
 
-	    MPID_Datatype_get_ptr(oldtype_array[i], dtp);
+	    MPIDU_Datatype_get_ptr(oldtype_array[i], dtp);
 	    tmp_alignsize = dtp->alignsize;
 	    if (derived_alignsize < tmp_alignsize)
 		derived_alignsize = tmp_alignsize;
@@ -128,7 +128,7 @@ static MPI_Aint MPID_Type_struct_alignsize(int count,
 
 
 /*@
-  MPID_Type_struct - create a struct datatype
+  MPIDU_Type_struct - create a struct datatype
 
 Input Parameters:
 + count - number of blocks in vector
@@ -142,7 +142,7 @@ Output Parameters:
   Return Value:
   MPI_SUCCESS on success, MPI errno on failure.
 @*/
-int MPID_Type_struct(int count,
+int MPIDU_Type_struct(int count,
 		     const int *blocklength_array,
 		     const MPI_Aint *displacement_array,
 		     const MPI_Datatype *oldtype_array,
@@ -158,9 +158,9 @@ int MPID_Type_struct(int count,
     MPI_Aint true_lb_disp = 0, true_ub_disp = 0, sticky_lb_disp = 0,
 	sticky_ub_disp = 0, lb_disp = 0, ub_disp = 0;
 
-    MPID_Datatype *new_dtp;
+    MPIDU_Datatype *new_dtp;
 
-    if (count == 0) return MPID_Type_zerolen(newtype);
+    if (count == 0) return MPIDU_Type_zerolen(newtype);
 
 #ifdef MPID_STRUCT_DEBUG
     MPIDI_Datatype_printf(oldtype_array[0], 1, displacement_array[0],
@@ -173,12 +173,12 @@ int MPID_Type_struct(int count,
 #endif
 
     /* allocate new datatype object and handle */
-    new_dtp = (MPID_Datatype *) MPIU_Handle_obj_alloc(&MPID_Datatype_mem);
+    new_dtp = (MPIDU_Datatype *) MPIU_Handle_obj_alloc(&MPIDU_Datatype_mem);
     /* --BEGIN ERROR HANDLING-- */
     if (!new_dtp)
     {
 	mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
-					 "MPID_Type_struct",
+					 "MPIDU_Type_struct",
 					 __LINE__, MPI_ERR_OTHER,
 					 "**nomem", 0);
 	return mpi_errno;
@@ -206,8 +206,8 @@ int MPID_Type_struct(int count,
 
     if (i == count)
     {
-	MPIU_Handle_obj_free(&MPID_Datatype_mem, new_dtp);
-	return MPID_Type_zerolen(newtype);
+	MPIU_Handle_obj_free(&MPIDU_Datatype_mem, new_dtp);
+	return MPIDU_Type_zerolen(newtype);
     }
 
     new_dtp->max_contig_blocks = 0;
@@ -218,7 +218,7 @@ int MPID_Type_struct(int count,
 	MPI_Aint tmp_lb, tmp_ub, tmp_true_lb, tmp_true_ub;
 	MPI_Aint tmp_el_sz;
 	MPI_Datatype tmp_el_type;
-	MPID_Datatype *old_dtp = NULL;
+	MPIDU_Datatype *old_dtp = NULL;
 
 	/* Interpreting typemap to not include 0 blklen things, including
 	 * MPI_LB and MPI_UB. -- Rob Ross, 10/31/2005
@@ -227,10 +227,10 @@ int MPID_Type_struct(int count,
 
 	if (is_builtin)
 	{
-	    tmp_el_sz   = MPID_Datatype_get_basic_size(oldtype_array[i]);
+	    tmp_el_sz   = MPIDU_Datatype_get_basic_size(oldtype_array[i]);
 	    tmp_el_type = oldtype_array[i];
 
-	    MPID_DATATYPE_BLOCK_LB_UB((MPI_Aint)(blocklength_array[i]),
+	    MPIDU_DATATYPE_BLOCK_LB_UB((MPI_Aint)(blocklength_array[i]),
 				      displacement_array[i],
 				      0,
 				      tmp_el_sz,
@@ -246,7 +246,7 @@ int MPID_Type_struct(int count,
 	}
 	else
 	{
-	    MPID_Datatype_get_ptr(oldtype_array[i], old_dtp);
+	    MPIDU_Datatype_get_ptr(oldtype_array[i], old_dtp);
 
 	    /* Ensure that "builtin_element_size" fits into an int datatype. */
 	    MPIU_Ensure_Aint_fits_in_int(old_dtp->builtin_element_size);
@@ -254,7 +254,7 @@ int MPID_Type_struct(int count,
 	    tmp_el_sz   = old_dtp->builtin_element_size;
 	    tmp_el_type = old_dtp->basic_type;
 
-	    MPID_DATATYPE_BLOCK_LB_UB((MPI_Aint) blocklength_array[i],
+	    MPIDU_DATATYPE_BLOCK_LB_UB((MPI_Aint) blocklength_array[i],
 				      displacement_array[i],
 				      old_dtp->lb,
 				      old_dtp->ub,
@@ -398,7 +398,7 @@ int MPID_Type_struct(int count,
     new_dtp->true_ub       = true_ub_disp;
     new_dtp->ub = (found_sticky_ub) ? sticky_ub_disp : ub_disp;
 
-    new_dtp->alignsize = MPID_Type_struct_alignsize(count,
+    new_dtp->alignsize = MPIDU_Type_struct_alignsize(count,
 						    oldtype_array,
 						    displacement_array);
 
diff --git a/src/mpid/common/datatype/mpid_type_vector.c b/src/mpid/common/datatype/mpid_type_vector.c
index 390db33..14c988e 100644
--- a/src/mpid/common/datatype/mpid_type_vector.c
+++ b/src/mpid/common/datatype/mpid_type_vector.c
@@ -12,7 +12,7 @@
 /* #define MPID_TYPE_ALLOC_DEBUG */
 
 /*@
-  MPID_Type_vector - create a vector datatype
+  MPIDU_Type_vector - create a vector datatype
 
 Input Parameters:
 + count - number of blocks in vector
@@ -29,7 +29,7 @@ Output Parameters:
   Return Value:
   0 on success, MPI error code on failure.
 @*/
-int MPID_Type_vector(int count,
+int MPIDU_Type_vector(int count,
 		     int blocklength,
 		     MPI_Aint stride,
 		     int strideinbytes,
@@ -42,16 +42,16 @@ int MPID_Type_vector(int count,
     MPI_Datatype el_type;
     MPI_Aint old_lb, old_ub, old_extent, old_true_lb, old_true_ub, eff_stride;
 
-    MPID_Datatype *new_dtp;
+    MPIDU_Datatype *new_dtp;
 
-    if (count == 0) return MPID_Type_zerolen(newtype);
+    if (count == 0) return MPIDU_Type_zerolen(newtype);
 
     /* allocate new datatype object and handle */
-    new_dtp = (MPID_Datatype *) MPIU_Handle_obj_alloc(&MPID_Datatype_mem);
+    new_dtp = (MPIDU_Datatype *) MPIU_Handle_obj_alloc(&MPIDU_Datatype_mem);
     if (!new_dtp) {
 	/* --BEGIN ERROR HANDLING-- */
 	mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
-					 "MPID_Type_vector", __LINE__,
+					 "MPIDU_Type_vector", __LINE__,
 					 MPI_ERR_OTHER, "**nomem", 0);
 	return mpi_errno;
 	/* --END ERROR HANDLING-- */
@@ -76,7 +76,7 @@ int MPID_Type_vector(int count,
     is_builtin = (HANDLE_GET_KIND(oldtype) == HANDLE_KIND_BUILTIN);
 
     if (is_builtin) {
-	el_sz   = (MPI_Aint) MPID_Datatype_get_basic_size(oldtype);
+	el_sz   = (MPI_Aint) MPIDU_Datatype_get_basic_size(oldtype);
 	el_type = oldtype;
 
 	old_lb        = 0;
@@ -102,9 +102,9 @@ int MPID_Type_vector(int count,
 	eff_stride = (strideinbytes) ? stride : (stride * el_sz);
     }
     else /* user-defined base type (oldtype) */ {
-	MPID_Datatype *old_dtp;
+	MPIDU_Datatype *old_dtp;
 
-	MPID_Datatype_get_ptr(oldtype, old_dtp);
+	MPIDU_Datatype_get_ptr(oldtype, old_dtp);
 	el_sz   = old_dtp->builtin_element_size;
 	el_type = old_dtp->basic_type;
 
@@ -130,7 +130,7 @@ int MPID_Type_vector(int count,
 	eff_stride = (strideinbytes) ? stride : (stride * old_dtp->extent);
     }
 
-    MPID_DATATYPE_VECTOR_LB_UB((MPI_Aint) count,
+    MPIDU_DATATYPE_VECTOR_LB_UB((MPI_Aint) count,
 			       eff_stride,
 			       (MPI_Aint) blocklength,
 			       old_lb,
diff --git a/src/mpid/common/datatype/mpid_type_zerolen.c b/src/mpid/common/datatype/mpid_type_zerolen.c
index 630eb46..ef12577 100644
--- a/src/mpid/common/datatype/mpid_type_zerolen.c
+++ b/src/mpid/common/datatype/mpid_type_zerolen.c
@@ -12,7 +12,7 @@
 /* #define MPID_TYPE_ALLOC_DEBUG */
 
 /*@
-  MPID_Type_zerolen - create an empty datatype
+  MPIDU_Type_zerolen - create an empty datatype
  
 Input Parameters:
 . none
@@ -24,18 +24,18 @@ Output Parameters:
   MPI_SUCCESS on success, MPI error code on failure.
 @*/
 
-int MPID_Type_zerolen(MPI_Datatype *newtype)
+int MPIDU_Type_zerolen(MPI_Datatype *newtype)
 {
     int mpi_errno;
-    MPID_Datatype *new_dtp;
+    MPIDU_Datatype *new_dtp;
 
     /* allocate new datatype object and handle */
-    new_dtp = (MPID_Datatype *) MPIU_Handle_obj_alloc(&MPID_Datatype_mem);
+    new_dtp = (MPIDU_Datatype *) MPIU_Handle_obj_alloc(&MPIDU_Datatype_mem);
     /* --BEGIN ERROR HANDLING-- */
     if (!new_dtp)
     {
 	mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
-					 "MPID_Type_zerolen",
+					 "MPIDU_Type_zerolen",
 					 __LINE__, MPI_ERR_OTHER,
 					 "**nomem", 0);
 	return mpi_errno;
diff --git a/src/mpid/common/datatype/mpir_type_flatten.c b/src/mpid/common/datatype/mpir_type_flatten.c
index 10cdab6..8886692 100644
--- a/src/mpid/common/datatype/mpir_type_flatten.c
+++ b/src/mpid/common/datatype/mpir_type_flatten.c
@@ -30,22 +30,22 @@ int MPIR_Type_flatten(MPI_Datatype type,
 {
     int err;
     MPI_Aint first, last;
-    MPID_Datatype *datatype_ptr ATTRIBUTE((unused));
-    MPID_Segment *segp;
+    MPIDU_Datatype *datatype_ptr ATTRIBUTE((unused));
+    MPIDU_Segment *segp;
 
     if (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) {
 	off_array[0] = 0;
-	MPID_Datatype_get_size_macro(type, size_array[0]);
+	MPIDU_Datatype_get_size_macro(type, size_array[0]);
 	*array_len_p = 1;
 	return 0;
     }
 
-    MPID_Datatype_get_ptr(type, datatype_ptr);
+    MPIDU_Datatype_get_ptr(type, datatype_ptr);
     MPIU_Assert(datatype_ptr->is_committed);
     MPIU_Assert(*array_len_p >= datatype_ptr->max_contig_blocks);
 
-    segp = MPID_Segment_alloc();
-    err = MPID_Segment_init(0, 1, type, segp, 0); /* first 0 is bufptr,
+    segp = MPIDU_Segment_alloc();
+    err = MPIDU_Segment_init(0, 1, type, segp, 0); /* first 0 is bufptr,
                                                    * 1 is count
                                                    * last 0 is homogeneous
                                                    */
@@ -54,14 +54,14 @@ int MPIR_Type_flatten(MPI_Datatype type,
     first = 0;
     last  = SEGMENT_IGNORE_LAST;
 
-    MPID_Segment_flatten(segp,
+    MPIDU_Segment_flatten(segp,
 			 first,
 			 &last,
 			 off_array,
 			 size_array,
 			 array_len_p);
 
-    MPID_Segment_free(segp);
+    MPIDU_Segment_free(segp);
 
     return 0;
 }
diff --git a/src/mpid/common/sched/mpidu_sched.c b/src/mpid/common/sched/mpidu_sched.c
index 5af6535..f95d1c7 100644
--- a/src/mpid/common/sched/mpidu_sched.c
+++ b/src/mpid/common/sched/mpidu_sched.c
@@ -26,9 +26,9 @@
         if ((datatype_) != MPI_DATATYPE_NULL &&                    \
             HANDLE_GET_KIND((datatype_)) != HANDLE_KIND_BUILTIN)   \
         {                                                          \
-            MPID_Datatype *dtp_ = NULL;                            \
-            MPID_Datatype_get_ptr((datatype_), dtp_);              \
-            MPID_Datatype_add_ref(dtp_);                           \
+            MPIDU_Datatype *dtp_ = NULL;                            \
+            MPIDU_Datatype_get_ptr((datatype_), dtp_);              \
+            MPIDU_Datatype_add_ref(dtp_);                           \
         }                                                          \
     } while (0)
 #define dtype_release_if_not_builtin(datatype_)                    \
@@ -36,9 +36,9 @@
         if ((datatype_) != MPI_DATATYPE_NULL &&                    \
             HANDLE_GET_KIND((datatype_)) != HANDLE_KIND_BUILTIN)   \
         {                                                          \
-            MPID_Datatype *dtp_ = NULL;                            \
-            MPID_Datatype_get_ptr((datatype_), dtp_);              \
-            MPID_Datatype_release(dtp_);                           \
+            MPIDU_Datatype *dtp_ = NULL;                            \
+            MPIDU_Datatype_get_ptr((datatype_), dtp_);              \
+            MPIDU_Datatype_release(dtp_);                           \
         }                                                          \
     } while (0)
 
@@ -763,8 +763,8 @@ int MPIDU_Sched_copy(const void *inbuf, MPI_Aint incount, MPI_Datatype intype,
 #if defined(HAVE_ERROR_CHECKING) && !defined(NDEBUG)
     {
         MPI_Aint intype_size, outtype_size;
-        MPID_Datatype_get_size_macro(intype, intype_size);
-        MPID_Datatype_get_size_macro(outtype, outtype_size);
+        MPIDU_Datatype_get_size_macro(intype, intype_size);
+        MPIDU_Datatype_get_size_macro(outtype, outtype_size);
         if (incount * intype_size > outcount * outtype_size) {
             MPL_error_printf("truncation: intype=%#x, intype_size=" MPI_AINT_FMT_DEC_SPEC ", incount=" MPI_AINT_FMT_DEC_SPEC ", outtype=%#x, outtype_size=" MPI_AINT_FMT_DEC_SPEC " outcount=" MPI_AINT_FMT_DEC_SPEC "\n",
                               intype, intype_size,
diff --git a/src/mpid/pamid/include/mpidi_datatypes.h b/src/mpid/pamid/include/mpidi_datatypes.h
index 11c07e2..53083b9 100644
--- a/src/mpid/pamid/include/mpidi_datatypes.h
+++ b/src/mpid/pamid/include/mpidi_datatypes.h
@@ -272,7 +272,7 @@ typedef struct
 struct MPIDI_Request
 {
   struct MPID_Request  *next;         /**< Link to next req. in queue */
-  struct MPID_Datatype *datatype_ptr; /**< Info about the datatype    */
+  struct MPIDU_Datatype*datatype_ptr; /**< Info about the datatype    */
   pami_work_t           post_request; /**<                            */
 
   MPIDI_MsgEnvelope     envelope;
diff --git a/src/mpid/pamid/include/mpidi_macros.h b/src/mpid/pamid/include/mpidi_macros.h
index 8c79b3b..d1a62c9 100644
--- a/src/mpid/pamid/include/mpidi_macros.h
+++ b/src/mpid/pamid/include/mpidi_macros.h
@@ -66,11 +66,11 @@ _dt_contig_out, _data_sz_out, _dt_ptr, _dt_true_lb)             \
         (_dt_contig_out) = TRUE;                                \
         (_dt_true_lb)    = 0;                                   \
         (_data_sz_out)   = (_count) *                           \
-        MPID_Datatype_get_basic_size(_datatype);                \
+        MPIDU_Datatype_get_basic_size(_datatype);                \
     }                                                           \
   else                                                          \
     {                                                           \
-        MPID_Datatype_get_ptr((_datatype), (_dt_ptr));          \
+        MPIDU_Datatype_get_ptr((_datatype), (_dt_ptr));          \
         (_dt_contig_out) = (_dt_ptr)->is_contig;                \
         (_dt_true_lb)    = (_dt_ptr)->true_lb;                  \
         (_data_sz_out)   = (_count) * (_dt_ptr)->size;          \
@@ -86,12 +86,12 @@ _data_sz_out)                                                   \
   if (HANDLE_GET_KIND(_datatype) == HANDLE_KIND_BUILTIN)        \
     {                                                           \
         (_data_sz_out)   = (_count) *                           \
-        MPID_Datatype_get_basic_size(_datatype);                \
+        MPIDU_Datatype_get_basic_size(_datatype);                \
     }                                                           \
   else                                                          \
     {                                                           \
-        MPID_Datatype *_dt_ptr;                                 \
-        MPID_Datatype_get_ptr((_datatype), (_dt_ptr));          \
+        MPIDU_Datatype*_dt_ptr;                                 \
+        MPIDU_Datatype_get_ptr((_datatype), (_dt_ptr));          \
         (_data_sz_out)   = (_count) * (_dt_ptr)->size;          \
     }                                                           \
 })
diff --git a/src/mpid/pamid/include/mpidpre.h b/src/mpid/pamid/include/mpidpre.h
index 2ca50d2..e308cfd 100644
--- a/src/mpid/pamid/include/mpidpre.h
+++ b/src/mpid/pamid/include/mpidpre.h
@@ -87,8 +87,8 @@ int MPID_Wtime_init(void);
 #else
 #define MPID_DEV_DATATYPE_DECL void *device_datatype;
 #endif
-#define MPID_Dev_datatype_commit_hook(ptr) MPIDI_PAMI_datatype_commit_hook(ptr)
-#define MPID_Dev_datatype_destroy_hook(ptr) MPIDI_PAMI_datatype_destroy_hook(ptr)
-#define MPID_Dev_datatype_dup_hook(ptr) MPIDI_PAMI_datatype_dup_hook(ptr)
+#define MPIDU_Dev_datatype_commit_hook(ptr) MPIDI_PAMI_datatype_commit_hook(ptr)
+#define MPIDU_Dev_datatype_destroy_hook(ptr) MPIDI_PAMI_datatype_destroy_hook(ptr)
+#define MPIDU_Dev_datatype_dup_hook(ptr) MPIDI_PAMI_datatype_dup_hook(ptr)
 
 #endif
diff --git a/src/mpid/pamid/src/coll/allgather/mpido_allgather.c b/src/mpid/pamid/src/coll/allgather/mpido_allgather.c
index f09c068..2d4d8a3 100644
--- a/src/mpid/pamid/src/coll/allgather/mpido_allgather.c
+++ b/src/mpid/pamid/src/coll/allgather/mpido_allgather.c
@@ -172,7 +172,7 @@ int MPIDO_Allgather_bcast(const void *sendbuf,
   const int rank = comm_ptr->rank;
 
   np = comm_ptr ->local_size;
-  MPID_Datatype_get_extent_macro(recvtype, extent);
+  MPIDU_Datatype_get_extent_macro(recvtype, extent);
 
   MPIU_Ensure_Aint_fits_in_pointer ((MPIU_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
 				     np * recvcount * extent));
@@ -302,7 +302,7 @@ MPIDO_Allgather(const void *sendbuf,
    */
    const struct MPIDI_Comm* const mpid = &(comm_ptr->mpid);
    int config[6], i;
-   MPID_Datatype * dt_null = NULL;
+   MPIDU_Datatype* dt_null = NULL;
    MPI_Aint send_true_lb = 0;
    MPI_Aint recv_true_lb = 0;
    int comm_size = comm_ptr->local_size;
@@ -360,8 +360,8 @@ MPIDO_Allgather(const void *sendbuf,
     if(MPIDI_Process.cuda_aware_support_on)
     {
        MPI_Aint sdt_extent,rdt_extent;
-       MPID_Datatype_get_extent_macro(sendtype, sdt_extent);
-       MPID_Datatype_get_extent_macro(recvtype, rdt_extent);
+       MPIDU_Datatype_get_extent_macro(sendtype, sdt_extent);
+       MPIDU_Datatype_get_extent_macro(recvtype, rdt_extent);
        char *scbuf = NULL;
        char *rcbuf = NULL;
        int is_send_dev_buf = MPIDI_cuda_is_device_buf(sendbuf);
@@ -646,14 +646,14 @@ MPIDO_Allgather_simple(const void *sendbuf,
    * *********************************
    */
    const struct MPIDI_Comm* const mpid = &(comm_ptr->mpid);
-   MPID_Datatype * dt_null = NULL;
+   MPIDU_Datatype* dt_null = NULL;
    void *snd_noncontig_buff = NULL, *rcv_noncontig_buff = NULL;
    MPI_Aint send_true_lb = 0;
    MPI_Aint recv_true_lb = 0;
    int snd_data_contig = 1, rcv_data_contig = 1;
    size_t send_size = 0;
    size_t recv_size = 0;
-   MPID_Segment segment;
+   MPIDU_Segment segment;
    volatile unsigned allgather_active = 1;
    const int rank = comm_ptr->rank;
    const int size = comm_ptr->local_size;
@@ -720,7 +720,7 @@ MPIDO_Allgather_simple(const void *sendbuf,
     {
       sbuf = PAMI_IN_PLACE;
       size_t extent;
-      MPID_Datatype_get_extent_macro(recvtype,extent);
+      MPIDU_Datatype_get_extent_macro(recvtype,extent);
       MPIR_Localcopy(recvbuf + (rank*recvcount*extent), recvcount, recvtype,
                        rcv_noncontig_buff + (rank*recv_size), recv_size,MPI_CHAR);
     }
@@ -747,8 +747,8 @@ MPIDO_Allgather_simple(const void *sendbuf,
               "Fatal:  Cannot allocate pack buffer");
         }
         DLOOP_Offset last = send_size;
-        MPID_Segment_init(sendbuf, sendcount, sendtype, &segment, 0);
-        MPID_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
+        MPIDU_Segment_init(sendbuf, sendcount, sendtype, &segment, 0);
+        MPIDU_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
      }
   }
   else
diff --git a/src/mpid/pamid/src/coll/allgatherv/mpido_allgatherv.c b/src/mpid/pamid/src/coll/allgatherv/mpido_allgatherv.c
index 6ae680f..8bc3523 100644
--- a/src/mpid/pamid/src/coll/allgatherv/mpido_allgatherv.c
+++ b/src/mpid/pamid/src/coll/allgatherv/mpido_allgatherv.c
@@ -178,7 +178,7 @@ int MPIDO_Allgatherv_bcast(const void *sendbuf,
    TRACE_ERR("Entering MPIDO_Allgatherv_bcast\n");
   int i, rc=MPI_ERR_INTERN;
   MPI_Aint extent;
-  MPID_Datatype_get_extent_macro(recvtype, extent);
+  MPIDU_Datatype_get_extent_macro(recvtype, extent);
 
   if (sendbuf != MPI_IN_PLACE)
   {
@@ -307,7 +307,7 @@ MPIDO_Allgatherv(const void *sendbuf,
   /* function pointer to be used to point to approperiate algorithm */
 
   /* Check the nature of the buffers */
-  MPID_Datatype *dt_null = NULL;
+  MPIDU_Datatype*dt_null = NULL;
   MPI_Aint send_true_lb  = 0;
   MPI_Aint recv_true_lb  = 0;
   size_t   send_size     = 0;
@@ -374,8 +374,8 @@ MPIDO_Allgatherv(const void *sendbuf,
     if(MPIDI_Process.cuda_aware_support_on)
     {
        MPI_Aint sdt_extent,rdt_extent;
-       MPID_Datatype_get_extent_macro(sendtype, sdt_extent);
-       MPID_Datatype_get_extent_macro(recvtype, rdt_extent);
+       MPIDU_Datatype_get_extent_macro(sendtype, sdt_extent);
+       MPIDU_Datatype_get_extent_macro(recvtype, rdt_extent);
        char *scbuf = NULL;
        char *rcbuf = NULL;
        int is_send_dev_buf = MPIDI_cuda_is_device_buf(sendbuf);
@@ -552,7 +552,7 @@ MPIDO_Allgatherv(const void *sendbuf,
           if(my_md->check_correct.values.rangeminmax)
            {
              MPI_Aint data_true_lb;
-             MPID_Datatype *data_ptr;
+             MPIDU_Datatype*data_ptr;
              int data_size, data_contig;
              MPIDI_Datatype_get_info(sendcount, sendtype, data_contig, data_size, data_ptr, data_true_lb); 
              if((my_md->range_lo <= data_size) &&
@@ -690,7 +690,7 @@ MPIDO_Allgatherv_simple(const void *sendbuf,
    TRACE_ERR("Entering MPIDO_Allgatherv_optimized\n");
   /* function pointer to be used to point to approperiate algorithm */
   /* Check the nature of the buffers */
-  MPID_Datatype *dt_null = NULL;
+  MPIDU_Datatype*dt_null = NULL;
   MPI_Aint send_true_lb  = 0;
   MPI_Aint recv_true_lb  = 0;
   size_t   send_size     = 0;
@@ -818,7 +818,7 @@ MPIDO_Allgatherv_simple(const void *sendbuf,
     if(inplace)
     {
       size_t extent;
-      MPID_Datatype_get_extent_macro(recvtype,extent);
+      MPIDU_Datatype_get_extent_macro(recvtype,extent);
       MPIR_Localcopy(recvbuf + displs[rank]*extent, recvcounts[rank], recvtype,
                      rcv_noncontig_buff + precvdispls[rank], precvcounts[rank],MPI_CHAR);
       scount = precvcounts[rank];
@@ -862,7 +862,7 @@ MPIDO_Allgatherv_simple(const void *sendbuf,
     {
       size_t extent;
       int i;
-      MPID_Datatype_get_extent_macro(recvtype,extent);
+      MPIDU_Datatype_get_extent_macro(recvtype,extent);
       for(i=0; i<size; ++i)
       {
         char* scbuf = (char*)rcv_noncontig_buff+ precvdispls[i];
diff --git a/src/mpid/pamid/src/coll/allreduce/mpido_allreduce.c b/src/mpid/pamid/src/coll/allreduce/mpido_allreduce.c
index aba15ef..58f8dff 100644
--- a/src/mpid/pamid/src/coll/allreduce/mpido_allreduce.c
+++ b/src/mpid/pamid/src/coll/allreduce/mpido_allreduce.c
@@ -121,7 +121,7 @@ int MPIDO_Allreduce(const void *sendbuf,
     if(MPIDI_Process.cuda_aware_support_on)
     {
        MPI_Aint dt_extent;
-       MPID_Datatype_get_extent_macro(dt, dt_extent);
+       MPIDU_Datatype_get_extent_macro(dt, dt_extent);
        char *scbuf = NULL;
        char *rcbuf = NULL;
        int is_send_dev_buf = MPIDI_cuda_is_device_buf(sendbuf);
@@ -467,7 +467,7 @@ int MPIDO_Allreduce_simple(const void *sendbuf,
    pami_xfer_t allred;
    const pami_metadata_t *my_allred_md = (pami_metadata_t *)NULL;
    const struct MPIDI_Comm* const mpid = &(comm_ptr->mpid);
-   MPID_Datatype *data_ptr;
+   MPIDU_Datatype*data_ptr;
    MPI_Aint data_true_lb = 0;
    int data_size, data_contig;
 
diff --git a/src/mpid/pamid/src/coll/alltoall/mpido_alltoall.c b/src/mpid/pamid/src/coll/alltoall/mpido_alltoall.c
index 84f5500..66dc8ac 100644
--- a/src/mpid/pamid/src/coll/alltoall/mpido_alltoall.c
+++ b/src/mpid/pamid/src/coll/alltoall/mpido_alltoall.c
@@ -51,7 +51,7 @@ int MPIDO_Alltoall(const void *sendbuf,
 #endif
    TRACE_ERR("Entering MPIDO_Alltoall\n");
    volatile unsigned active = 1;
-   MPID_Datatype *sdt, *rdt;
+   MPIDU_Datatype*sdt, *rdt;
    pami_type_t stype, rtype;
    MPI_Aint sdt_true_lb=0, rdt_true_lb;
    MPIDI_Post_coll_t alltoall_post;
@@ -95,8 +95,8 @@ int MPIDO_Alltoall(const void *sendbuf,
     if(MPIDI_Process.cuda_aware_support_on)
     {
        MPI_Aint sdt_extent,rdt_extent;
-       MPID_Datatype_get_extent_macro(sendtype, sdt_extent);
-       MPID_Datatype_get_extent_macro(recvtype, rdt_extent);
+       MPIDU_Datatype_get_extent_macro(sendtype, sdt_extent);
+       MPIDU_Datatype_get_extent_macro(recvtype, rdt_extent);
        char *scbuf = NULL;
        char *rcbuf = NULL;
        int is_send_dev_buf = MPIDI_cuda_is_device_buf(sendbuf);
@@ -200,7 +200,7 @@ int MPIDO_Alltoall(const void *sendbuf,
          if(my_md->check_correct.values.rangeminmax)
          {
             MPI_Aint data_true_lb ATTRIBUTE((unused));
-            MPID_Datatype *data_ptr;
+            MPIDU_Datatype*data_ptr;
             int data_size, data_contig ATTRIBUTE((unused));
             MPIDI_Datatype_get_info(sendcount, sendtype, data_contig, data_size, data_ptr, data_true_lb); 
             if((my_md->range_lo <= data_size) &&
@@ -288,8 +288,8 @@ int MPIDO_Alltoall_simple(const void *sendbuf,
    void *sbuf = NULL, *rbuf = NULL;
    size_t send_size = 0;
    size_t recv_size = 0;
-   MPID_Segment segment;
-   MPID_Datatype *sdt, *rdt;
+   MPIDU_Segment segment;
+   MPIDU_Datatype*sdt, *rdt;
    MPI_Aint sdt_true_lb=0, rdt_true_lb;
    MPIDI_Post_coll_t alltoall_post;
    int sndlen, rcvlen, snd_contig = 1, rcv_contig = 1;
@@ -346,8 +346,8 @@ int MPIDO_Alltoall_simple(const void *sendbuf,
                    "Fatal:  Cannot allocate pack buffer");
       }
       DLOOP_Offset last = send_size*size;
-      MPID_Segment_init(sendbuf, sendcount*size, sendtype, &segment, 0);
-      MPID_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
+      MPIDU_Segment_init(sendbuf, sendcount*size, sendtype, &segment, 0);
+      MPIDU_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
 
     }
   }
@@ -364,7 +364,7 @@ int MPIDO_Alltoall_simple(const void *sendbuf,
     if(sendbuf == MPI_IN_PLACE)
     {
       size_t extent;
-      MPID_Datatype_get_extent_macro(recvtype,extent);
+      MPIDU_Datatype_get_extent_macro(recvtype,extent);
       MPIR_Localcopy(recvbuf + (rank*recvcount*extent), recvcount, recvtype,
                      rcv_noncontig_buff + (rank*recv_size), recv_size,MPI_CHAR);
     }
diff --git a/src/mpid/pamid/src/coll/alltoallv/mpido_alltoallv.c b/src/mpid/pamid/src/coll/alltoallv/mpido_alltoallv.c
index bbd3a4e..4a6215f 100644
--- a/src/mpid/pamid/src/coll/alltoallv/mpido_alltoallv.c
+++ b/src/mpid/pamid/src/coll/alltoallv/mpido_alltoallv.c
@@ -56,7 +56,7 @@ int MPIDO_Alltoallv(const void *sendbuf,
    void *sbuf = NULL, *rbuf = NULL;
    int recvok=PAMI_SUCCESS, sendok=PAMI_SUCCESS;
    int sndtypelen, rcvtypelen, snd_contig=0, rcv_contig=0;
-   MPID_Datatype *sdt, *rdt;
+   MPIDU_Datatype*sdt, *rdt;
    pami_type_t stype, rtype;
    MPI_Aint sdt_true_lb, rdt_true_lb;
    MPIDI_Post_coll_t alltoallv_post;
@@ -133,7 +133,7 @@ int MPIDO_Alltoallv(const void *sendbuf,
         else
         {
            size_t extent; 
-           MPID_Datatype_get_extent_macro(sendtype,extent);
+           MPIDU_Datatype_get_extent_macro(sendtype,extent);
            for(i=0; i<size; ++i)
            {
               char* scbuf = (char*)sendbuf + senddispls[i]*extent;
@@ -217,7 +217,7 @@ int MPIDO_Alltoallv(const void *sendbuf,
         else
         {
            size_t extent; 
-           MPID_Datatype_get_extent_macro(recvtype,extent);
+           MPIDU_Datatype_get_extent_macro(recvtype,extent);
            for(i=0; i<size; ++i)
            {
               char* scbuf = (char*)recvbuf + recvdispls[i]*extent;
@@ -296,7 +296,7 @@ int MPIDO_Alltoallv(const void *sendbuf,
          if(my_md->check_correct.values.rangeminmax)
          {
             MPI_Aint data_true_lb;
-            MPID_Datatype *data_ptr;
+            MPIDU_Datatype*data_ptr;
             int data_size, data_contig;
             MPIDI_Datatype_get_info(??, sendtype, data_contig, data_size, data_ptr, data_true_lb); 
             if((my_md->range_lo <= data_size) &&
@@ -369,7 +369,7 @@ int MPIDO_Alltoallv(const void *sendbuf,
       {
          size_t extent; 
          int i;
-         MPID_Datatype_get_extent_macro(recvtype,extent);
+         MPIDU_Datatype_get_extent_macro(recvtype,extent);
          for(i=0; i<size; ++i)
          {
             char* scbuf = (char*)rcv_noncontig_buff+ precvdispls[i];
@@ -418,7 +418,7 @@ int MPIDO_Alltoallv_simple(const void *sendbuf,
    TRACE_ERR("Entering MPIDO_Alltoallv_optimized\n");
    volatile unsigned active = 1;
   int sndtypelen, rcvtypelen, snd_contig = 1, rcv_contig = 1;
-   MPID_Datatype *sdt, *rdt;
+   MPIDU_Datatype*sdt, *rdt;
    pami_type_t stype = NULL, rtype;
    MPI_Aint sdt_true_lb = 0, rdt_true_lb;
    MPIDI_Post_coll_t alltoallv_post;
@@ -525,7 +525,7 @@ int MPIDO_Alltoallv_simple(const void *sendbuf,
       else
       {
         size_t extent; 
-        MPID_Datatype_get_extent_macro(sendtype,extent);
+        MPIDU_Datatype_get_extent_macro(sendtype,extent);
         for(i=0; i<size; ++i)
         {
           char* scbuf = (char*)sendbuf + senddispls[i]*extent;
@@ -609,7 +609,7 @@ int MPIDO_Alltoallv_simple(const void *sendbuf,
       else
       {
         size_t extent; 
-        MPID_Datatype_get_extent_macro(recvtype,extent);
+        MPIDU_Datatype_get_extent_macro(recvtype,extent);
         for(i=0; i<size; ++i)
         {
           char* scbuf = (char*)recvbuf + recvdispls[i]*extent;
@@ -670,7 +670,7 @@ int MPIDO_Alltoallv_simple(const void *sendbuf,
     {
       size_t extent; 
       int i;
-      MPID_Datatype_get_extent_macro(recvtype,extent);
+      MPIDU_Datatype_get_extent_macro(recvtype,extent);
       for(i=0; i<size; ++i)
       {
         char* scbuf = (char*)rcv_noncontig_buff+ precvdispls[i];
diff --git a/src/mpid/pamid/src/coll/bcast/mpido_bcast.c b/src/mpid/pamid/src/coll/bcast/mpido_bcast.c
index 404fec6..f6be944 100644
--- a/src/mpid/pamid/src/coll/bcast/mpido_bcast.c
+++ b/src/mpid/pamid/src/coll/bcast/mpido_bcast.c
@@ -46,8 +46,8 @@ int MPIDO_Bcast(void *buffer,
         *noncontig_buff = NULL;
    volatile unsigned active = 1;
    MPI_Aint data_true_lb = 0;
-   MPID_Datatype *data_ptr;
-   MPID_Segment segment;
+   MPIDU_Datatype*data_ptr;
+   MPIDU_Segment segment;
    MPIDI_Post_coll_t bcast_post;
    const struct MPIDI_Comm* const mpid = &(comm_ptr->mpid);
    const int rank = comm_ptr->rank;
@@ -122,8 +122,8 @@ int MPIDO_Bcast(void *buffer,
       if(rank == root)
       {
          DLOOP_Offset last = data_size;
-         MPID_Segment_init(buffer, count, datatype, &segment, 0);
-         MPID_Segment_pack(&segment, 0, &last, noncontig_buff);
+         MPIDU_Segment_init(buffer, count, datatype, &segment, 0);
+         MPIDU_Segment_pack(&segment, 0, &last, noncontig_buff);
       }
    }
 
@@ -282,8 +282,8 @@ int MPIDO_Bcast_simple(void *buffer,
         *noncontig_buff = NULL;
    volatile unsigned active = 1;
    MPI_Aint data_true_lb = 0;
-   MPID_Datatype *data_ptr;
-   MPID_Segment segment;
+   MPIDU_Datatype*data_ptr;
+   MPIDU_Segment segment;
    MPIDI_Post_coll_t bcast_post;
    const struct MPIDI_Comm* const mpid = &(comm_ptr->mpid);
    const int rank = comm_ptr->rank;
@@ -335,8 +335,8 @@ int MPIDO_Bcast_simple(void *buffer,
       if(rank == root)
       {
          DLOOP_Offset last = data_size;
-         MPID_Segment_init(buffer, count, datatype, &segment, 0);
-         MPID_Segment_pack(&segment, 0, &last, noncontig_buff);
+         MPIDU_Segment_init(buffer, count, datatype, &segment, 0);
+         MPIDU_Segment_pack(&segment, 0, &last, noncontig_buff);
       }
    }
 
diff --git a/src/mpid/pamid/src/coll/gather/mpido_gather.c b/src/mpid/pamid/src/coll/gather/mpido_gather.c
index 117f7ee..75df3ee 100644
--- a/src/mpid/pamid/src/coll/gather/mpido_gather.c
+++ b/src/mpid/pamid/src/coll/gather/mpido_gather.c
@@ -47,7 +47,7 @@ int MPIDO_Gather_reduce(void * sendbuf,
 			MPID_Comm * comm_ptr,
 			int *mpierrno)
 {
-  MPID_Datatype * data_ptr;
+  MPIDU_Datatype* data_ptr;
   MPI_Aint true_lb ATTRIBUTE((unused));
   const int rank = comm_ptr->rank;
   const int size = comm_ptr->local_size;
@@ -138,7 +138,7 @@ int MPIDO_Gather(const void *sendbuf,
     return -1;
   }
 #endif
-  MPID_Datatype * data_ptr;
+  MPIDU_Datatype* data_ptr;
   MPI_Aint true_lb ATTRIBUTE((unused));
   pami_xfer_t gather;
   MPIDI_Post_coll_t gather_post;
@@ -195,8 +195,8 @@ int MPIDO_Gather(const void *sendbuf,
     if(MPIDI_Process.cuda_aware_support_on)
     {
        MPI_Aint sdt_extent,rdt_extent;
-       MPID_Datatype_get_extent_macro(sendtype, sdt_extent);
-       MPID_Datatype_get_extent_macro(recvtype, rdt_extent);
+       MPIDU_Datatype_get_extent_macro(sendtype, sdt_extent);
+       MPIDU_Datatype_get_extent_macro(recvtype, rdt_extent);
        char *scbuf = NULL;
        char *rcbuf = NULL;
        int is_send_dev_buf = MPIDI_cuda_is_device_buf(sendbuf);
@@ -436,7 +436,7 @@ int MPIDO_Gather_simple(const void *sendbuf,
     return -1;
   }
 #endif
-  MPID_Datatype * data_ptr;
+  MPIDU_Datatype* data_ptr;
   MPI_Aint true_lb = 0;
   pami_xfer_t gather;
   MPIDI_Post_coll_t gather_post;
@@ -445,7 +445,7 @@ int MPIDO_Gather_simple(const void *sendbuf,
   void *sbuf = NULL, *rbuf = NULL;
   int send_size = 0;
   int recv_size = 0;
-  MPID_Segment segment;
+  MPIDU_Segment segment;
   const int rank = comm_ptr->rank;
   const int size = comm_ptr->local_size;
   const struct MPIDI_Comm* const mpid = &(comm_ptr->mpid);
@@ -494,8 +494,8 @@ int MPIDO_Gather_simple(const void *sendbuf,
               "Fatal:  Cannot allocate pack buffer");
         }
         DLOOP_Offset last = send_size;
-        MPID_Segment_init(sendbuf, sendcount, sendtype, &segment, 0);
-        MPID_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
+        MPIDU_Segment_init(sendbuf, sendcount, sendtype, &segment, 0);
+        MPIDU_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
     }
   }
   else
@@ -547,7 +547,7 @@ int MPIDO_Gather_simple(const void *sendbuf,
         if(sendbuf == MPI_IN_PLACE)
         {
           size_t extent;
-          MPID_Datatype_get_extent_macro(recvtype,extent);
+          MPIDU_Datatype_get_extent_macro(recvtype,extent);
           MPIR_Localcopy(recvbuf + (rank*recvcount*extent), recvcount, recvtype,
                          rcv_noncontig_buff + (rank*recv_size), recv_size,MPI_CHAR);
         }
diff --git a/src/mpid/pamid/src/coll/gatherv/mpido_gatherv.c b/src/mpid/pamid/src/coll/gatherv/mpido_gatherv.c
index 7975b83..d675318 100644
--- a/src/mpid/pamid/src/coll/gatherv/mpido_gatherv.c
+++ b/src/mpid/pamid/src/coll/gatherv/mpido_gatherv.c
@@ -53,7 +53,7 @@ int MPIDO_Gatherv(const void *sendbuf,
    int i;
    int contig ATTRIBUTE((unused)), rsize ATTRIBUTE((unused)), ssize ATTRIBUTE((unused));
    int pamidt = 1;
-   MPID_Datatype *dt_ptr = NULL;
+   MPIDU_Datatype*dt_ptr = NULL;
    MPI_Aint send_true_lb, recv_true_lb;
    char *sbuf, *rbuf;
    pami_type_t stype, rtype;
@@ -88,8 +88,8 @@ int MPIDO_Gatherv(const void *sendbuf,
     if(MPIDI_Process.cuda_aware_support_on)
     {
        MPI_Aint sdt_extent,rdt_extent;
-       MPID_Datatype_get_extent_macro(sendtype, sdt_extent);
-       MPID_Datatype_get_extent_macro(recvtype, rdt_extent);
+       MPIDU_Datatype_get_extent_macro(sendtype, sdt_extent);
+       MPIDU_Datatype_get_extent_macro(recvtype, rdt_extent);
        char *scbuf = NULL;
        char *rcbuf = NULL;
        int is_send_dev_buf = MPIDI_cuda_is_device_buf(sendbuf);
@@ -223,7 +223,7 @@ int MPIDO_Gatherv(const void *sendbuf,
          if(my_md->check_correct.values.rangeminmax)
          {
             MPI_Aint data_true_lb;
-            MPID_Datatype *data_ptr;
+            MPIDU_Datatype*data_ptr;
             int data_size, data_contig;
             MPIDI_Datatype_get_info(sendcount, sendtype, data_contig, data_size, data_ptr, data_true_lb); 
             if((my_md->range_lo <= data_size) &&
@@ -323,8 +323,8 @@ int MPIDO_Gatherv_simple(const void *sendbuf,
    int rcvlen    = 0;
   int totalrecvcount  = 0;
    pami_type_t rtype = PAMI_TYPE_NULL;
-   MPID_Segment segment;
-   MPID_Datatype *data_ptr = NULL;
+   MPIDU_Segment segment;
+   MPIDU_Datatype*data_ptr = NULL;
    int send_true_lb, recv_true_lb = 0;
    int i, tmp;
    volatile unsigned gatherv_active = 1;
@@ -378,8 +378,8 @@ int MPIDO_Gatherv_simple(const void *sendbuf,
                    "Fatal:  Cannot allocate pack buffer");
       }
       DLOOP_Offset last = send_size;
-      MPID_Segment_init(sendbuf, sendcount, sendtype, &segment, 0);
-      MPID_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
+      MPIDU_Segment_init(sendbuf, sendcount, sendtype, &segment, 0);
+      MPIDU_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
     }
   }
   else
@@ -447,7 +447,7 @@ int MPIDO_Gatherv_simple(const void *sendbuf,
       if(sendbuf == MPI_IN_PLACE)
       {
         size_t extent;
-        MPID_Datatype_get_extent_macro(recvtype,extent);
+        MPIDU_Datatype_get_extent_macro(recvtype,extent);
         MPIR_Localcopy(recvbuf + displs[rank]*extent, recvcounts[rank], recvtype,
                      rcv_noncontig_buff + rdispls[rank], rcounts[rank],MPI_CHAR);
       }
@@ -507,7 +507,7 @@ int MPIDO_Gatherv_simple(const void *sendbuf,
     else
     {
       size_t extent;
-      MPID_Datatype_get_extent_macro(recvtype,extent);
+      MPIDU_Datatype_get_extent_macro(recvtype,extent);
       for(i=0; i<size; ++i)
       {
         char* scbuf = (char*)rcv_noncontig_buff+ rdispls[i];
diff --git a/src/mpid/pamid/src/coll/red_scat/mpido_red_scat.c b/src/mpid/pamid/src/coll/red_scat/mpido_red_scat.c
index b3fd99d..d4740c6 100644
--- a/src/mpid/pamid/src/coll/red_scat/mpido_red_scat.c
+++ b/src/mpid/pamid/src/coll/red_scat/mpido_red_scat.c
@@ -48,7 +48,7 @@ int MPIDO_Reduce_scatter(const void *sendbuf,
     if(MPIDI_Process.cuda_aware_support_on)
     {
        MPI_Aint dt_extent;
-       MPID_Datatype_get_extent_macro(datatype, dt_extent);
+       MPIDU_Datatype_get_extent_macro(datatype, dt_extent);
        char *scbuf = NULL;
        char *rcbuf = NULL;
        int is_send_dev_buf = MPIDI_cuda_is_device_buf(sendbuf);
@@ -127,7 +127,7 @@ int MPIDO_Reduce_scatter_block(const void *sendbuf,
     if(MPIDI_Process.cuda_aware_support_on)
     {
        MPI_Aint dt_extent;
-       MPID_Datatype_get_extent_macro(datatype, dt_extent);
+       MPIDU_Datatype_get_extent_macro(datatype, dt_extent);
        char *scbuf = NULL;
        char *rcbuf = NULL;
        int is_send_dev_buf = MPIDI_cuda_is_device_buf(sendbuf);
diff --git a/src/mpid/pamid/src/coll/reduce/mpido_reduce.c b/src/mpid/pamid/src/coll/reduce/mpido_reduce.c
index e5ff16b..bfea33b 100644
--- a/src/mpid/pamid/src/coll/reduce/mpido_reduce.c
+++ b/src/mpid/pamid/src/coll/reduce/mpido_reduce.c
@@ -47,7 +47,7 @@ int MPIDO_Reduce(const void *sendbuf,
     return -1;
   }
 #endif
-   MPID_Datatype *dt_null = NULL;
+   MPIDU_Datatype*dt_null = NULL;
    MPI_Aint true_lb = 0;
    int dt_contig ATTRIBUTE((unused)), tsize;
    int mu;
@@ -121,7 +121,7 @@ int MPIDO_Reduce(const void *sendbuf,
       if(MPIDI_Process.cuda_aware_support_on)
       {
          MPI_Aint dt_extent;
-         MPID_Datatype_get_extent_macro(datatype, dt_extent);
+         MPIDU_Datatype_get_extent_macro(datatype, dt_extent);
          char *scbuf = NULL;
          char *rcbuf = NULL;
          int is_send_dev_buf = MPIDI_cuda_is_device_buf(sendbuf);
@@ -212,7 +212,7 @@ int MPIDO_Reduce(const void *sendbuf,
          if(my_md->check_correct.values.rangeminmax)
          {
             MPI_Aint data_true_lb ATTRIBUTE((unused));
-            MPID_Datatype *data_ptr;
+            MPIDU_Datatype*data_ptr;
             int data_size, data_contig ATTRIBUTE((unused));
             MPIDI_Datatype_get_info(count, datatype, data_contig, data_size, data_ptr, data_true_lb); 
             if((my_md->range_lo <= data_size) &&
@@ -306,7 +306,7 @@ int MPIDO_Reduce_simple(const void *sendbuf,
     return -1;
   }
 #endif
-   MPID_Datatype *dt_null = NULL;
+   MPIDU_Datatype*dt_null = NULL;
    MPI_Aint true_lb = 0;
    int dt_contig, tsize;
    int mu;
diff --git a/src/mpid/pamid/src/coll/scan/mpido_scan.c b/src/mpid/pamid/src/coll/scan/mpido_scan.c
index 9c2c29a..37d1fb7 100644
--- a/src/mpid/pamid/src/coll/scan/mpido_scan.c
+++ b/src/mpid/pamid/src/coll/scan/mpido_scan.c
@@ -103,7 +103,7 @@ int MPIDO_Doscan(const void *sendbuf, void *recvbuf,
     return -1;
   }
 #endif
-   MPID_Datatype *dt_null = NULL;
+   MPIDU_Datatype*dt_null = NULL;
    MPI_Aint true_lb = 0;
    int dt_contig ATTRIBUTE((unused)), tsize ATTRIBUTE((unused));
    int mu;
@@ -139,7 +139,7 @@ int MPIDO_Doscan(const void *sendbuf, void *recvbuf,
       if(MPIDI_Process.cuda_aware_support_on)
       {
          MPI_Aint dt_extent;
-         MPID_Datatype_get_extent_macro(datatype, dt_extent);
+         MPIDU_Datatype_get_extent_macro(datatype, dt_extent);
          char *scbuf = NULL;
          char *rcbuf = NULL;
          int is_send_dev_buf = MPIDI_cuda_is_device_buf(sendbuf);
@@ -242,7 +242,7 @@ int MPIDO_Doscan(const void *sendbuf, void *recvbuf,
          if(my_md->check_correct.values.rangeminmax)
          {
             MPI_Aint data_true_lb ATTRIBUTE((unused));
-            MPID_Datatype *data_ptr;
+            MPIDU_Datatype*data_ptr;
             int data_size ATTRIBUTE((unused)), data_contig ATTRIBUTE((unused));
             MPIDI_Datatype_get_info(count, datatype, data_contig, data_size, data_ptr, data_true_lb); 
             if((my_md->range_lo <= data_size) &&
@@ -320,7 +320,7 @@ int MPIDO_Doscan_simple(const void *sendbuf, void *recvbuf,
     return -1;
   }
 #endif
-   MPID_Datatype *dt_null = NULL;
+   MPIDU_Datatype*dt_null = NULL;
    MPI_Aint true_lb = 0;
    int dt_contig, tsize;
    int mu;
diff --git a/src/mpid/pamid/src/coll/scatter/mpido_scatter.c b/src/mpid/pamid/src/coll/scatter/mpido_scatter.c
index 8262c51..e8f7ebf 100644
--- a/src/mpid/pamid/src/coll/scatter/mpido_scatter.c
+++ b/src/mpid/pamid/src/coll/scatter/mpido_scatter.c
@@ -106,7 +106,7 @@ int MPIDO_Scatter(const void *sendbuf,
     return -1;
   }
 #endif
-  MPID_Datatype * data_ptr;
+  MPIDU_Datatype* data_ptr;
   MPI_Aint true_lb ATTRIBUTE((unused));
   int contig, nbytes ATTRIBUTE((unused));
   const int rank = comm_ptr->rank;
@@ -143,8 +143,8 @@ int MPIDO_Scatter(const void *sendbuf,
     if(MPIDI_Process.cuda_aware_support_on)
     {
        MPI_Aint sdt_extent,rdt_extent;
-       MPID_Datatype_get_extent_macro(sendtype, sdt_extent);
-       MPID_Datatype_get_extent_macro(recvtype, rdt_extent);
+       MPIDU_Datatype_get_extent_macro(sendtype, sdt_extent);
+       MPIDU_Datatype_get_extent_macro(recvtype, rdt_extent);
        char *scbuf = NULL;
        char *rcbuf = NULL;
        int is_send_dev_buf = (rank == root) ? MPIDI_cuda_is_device_buf(sendbuf) : 0;
@@ -365,14 +365,14 @@ int MPIDO_Scatter_simple(const void *sendbuf,
     return -1;
   }
 #endif
-  MPID_Datatype * data_ptr;
+  MPIDU_Datatype* data_ptr;
   const int rank = comm_ptr->rank;
   int success = 1, snd_contig = 1, rcv_contig = 1;
   void *snd_noncontig_buff = NULL, *rcv_noncontig_buff = NULL;
   void *sbuf = NULL, *rbuf = NULL;
   size_t send_size = 0, recv_size = 0, data_size = 0;
   MPI_Aint snd_true_lb = 0, rcv_true_lb = 0; 
-  MPID_Segment segment;
+  MPIDU_Segment segment;
   const struct MPIDI_Comm* const mpid = &(comm_ptr->mpid);
   const int size = comm_ptr->local_size;
   advisor_algorithm_t advisor_algorithms[1];
@@ -427,8 +427,8 @@ int MPIDO_Scatter_simple(const void *sendbuf,
               "Fatal:  Cannot allocate pack buffer");
         }
         DLOOP_Offset last = send_size * size;
-        MPID_Segment_init(sendbuf, sendcount * size, sendtype, &segment, 0);
-        MPID_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
+        MPIDU_Segment_init(sendbuf, sendcount * size, sendtype, &segment, 0);
+        MPIDU_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
       }
     }
     else
diff --git a/src/mpid/pamid/src/coll/scatterv/mpido_scatterv.c b/src/mpid/pamid/src/coll/scatterv/mpido_scatterv.c
index c479870..958b20c 100644
--- a/src/mpid/pamid/src/coll/scatterv/mpido_scatterv.c
+++ b/src/mpid/pamid/src/coll/scatterv/mpido_scatterv.c
@@ -226,7 +226,7 @@ int MPIDO_Scatterv(const void *sendbuf,
   int contig ATTRIBUTE((unused));
   int ssize ATTRIBUTE((unused));
   int rsize ATTRIBUTE((unused));
-  MPID_Datatype *dt_ptr = NULL;
+  MPIDU_Datatype*dt_ptr = NULL;
   MPI_Aint send_true_lb=0, recv_true_lb;
   char *sbuf, *rbuf;
   pami_type_t stype, rtype;
@@ -250,8 +250,8 @@ int MPIDO_Scatterv(const void *sendbuf,
     if(MPIDI_Process.cuda_aware_support_on)
     {
        MPI_Aint sdt_extent,rdt_extent;
-       MPID_Datatype_get_extent_macro(sendtype, sdt_extent);
-       MPID_Datatype_get_extent_macro(recvtype, rdt_extent);
+       MPIDU_Datatype_get_extent_macro(sendtype, sdt_extent);
+       MPIDU_Datatype_get_extent_macro(recvtype, rdt_extent);
        char *scbuf = NULL;
        char *rcbuf = NULL;
        int is_send_dev_buf = (rank == root) ? MPIDI_cuda_is_device_buf(sendbuf) : 0;
@@ -392,7 +392,7 @@ int MPIDO_Scatterv(const void *sendbuf,
          if(my_md->check_correct.values.rangeminmax)
          {
            MPI_Aint data_true_lb;
-           MPID_Datatype *data_ptr;
+           MPIDU_Datatype*data_ptr;
            int data_size, data_contig;
            MPIDI_Datatype_get_info(recvcount, recvtype, data_contig, data_size, data_ptr, data_true_lb); 
            if((my_md->range_lo <= data_size) &&
@@ -482,13 +482,13 @@ int MPIDO_Scatterv_simple(const void *sendbuf,
   int rcv_contig = 1;
   int send_size = 0, recv_size = 0;
   int ssize = 0;
-  MPID_Datatype *dt_ptr = NULL;
+  MPIDU_Datatype*dt_ptr = NULL;
   MPI_Aint send_true_lb=0, recv_true_lb=0;
   void *snd_noncontig_buff = NULL, *rcv_noncontig_buff = NULL;
   void *sbuf = NULL, *rbuf = NULL;
   int *sdispls = NULL, *scounts = NULL;
   int sndcount  = 0;
-  MPID_Segment segment;
+  MPIDU_Segment segment;
   int tmp, i;
   pami_type_t stype = PAMI_TYPE_NULL;
   const int rank = comm_ptr->rank;
@@ -580,8 +580,8 @@ int MPIDO_Scatterv_simple(const void *sendbuf,
                 "Fatal:  Cannot allocate pack buffer");
           }
           DLOOP_Offset last = send_size;
-          MPID_Segment_init(sendbuf, sndcount, sendtype, &segment, 0);
-          MPID_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
+          MPIDU_Segment_init(sendbuf, sndcount, sendtype, &segment, 0);
+          MPIDU_Segment_pack(&segment, 0, &last, snd_noncontig_buff);
        }
      }
      if(recvbuf == MPI_IN_PLACE)
diff --git a/src/mpid/pamid/src/mpid_buffer.c b/src/mpid/pamid/src/mpid_buffer.c
index 6e21dea..5129d37 100644
--- a/src/mpid/pamid/src/mpid_buffer.c
+++ b/src/mpid/pamid/src/mpid_buffer.c
@@ -54,8 +54,8 @@ void MPIDI_Buffer_copy(
     MPI_Aint sdt_true_lb, rdt_true_lb;
     intptr_t sdata_sz;
     intptr_t rdata_sz;
-    MPID_Datatype * sdt_ptr;
-    MPID_Datatype * rdt_ptr;
+    MPIDU_Datatype* sdt_ptr;
+    MPIDU_Datatype* rdt_ptr;
 
     MPI_Aint  sdt_extent;
     MPI_Aint  rdt_extent;
@@ -103,15 +103,15 @@ void MPIDI_Buffer_copy(
       // 2 - Copy unpacked data into user buffer from temp buffer.
       if(MPIDI_Process.cuda_aware_support_on && MPIDI_cuda_is_device_buf(rbuf))
       {
-        MPID_Datatype_get_extent_macro(rdt, rdt_extent);
+        MPIDU_Datatype_get_extent_macro(rdt, rdt_extent);
         char *buf =  MPL_malloc(rdt_extent * rcount);
         memset(buf, 0, rdt_extent * rcount);        
-        MPID_Segment seg;
+        MPIDU_Segment seg;
         DLOOP_Offset last;
 
-        MPID_Segment_init(buf, rcount, rdt, &seg, 0);
+        MPIDU_Segment_init(buf, rcount, rdt, &seg, 0);
         last = sdata_sz;
-        MPID_Segment_unpack(&seg, 0, &last, (char*)sbuf + sdt_true_lb);
+        MPIDU_Segment_unpack(&seg, 0, &last, (char*)sbuf + sdt_true_lb);
         /* --BEGIN ERROR HANDLING-- */
         if (last != sdata_sz)
         {
@@ -131,12 +131,12 @@ void MPIDI_Buffer_copy(
       }
 #endif
 
-        MPID_Segment seg;
+        MPIDU_Segment seg;
         DLOOP_Offset last;
 
-        MPID_Segment_init(rbuf, rcount, rdt, &seg, 0);
+        MPIDU_Segment_init(rbuf, rcount, rdt, &seg, 0);
         last = sdata_sz;
-        MPID_Segment_unpack(&seg, 0, &last, (char*)sbuf + sdt_true_lb);
+        MPIDU_Segment_unpack(&seg, 0, &last, (char*)sbuf + sdt_true_lb);
         /* --BEGIN ERROR HANDLING-- */
         if (last != sdata_sz)
         {
@@ -148,12 +148,12 @@ void MPIDI_Buffer_copy(
     }
     else if (rdt_contig)
     {
-        MPID_Segment seg;
+        MPIDU_Segment seg;
         DLOOP_Offset last;
 
-        MPID_Segment_init(sbuf, scount, sdt, &seg, 0);
+        MPIDU_Segment_init(sbuf, scount, sdt, &seg, 0);
         last = sdata_sz;
-        MPID_Segment_pack(&seg, 0, &last, (char*)rbuf + rdt_true_lb);
+        MPIDU_Segment_pack(&seg, 0, &last, (char*)rbuf + rdt_true_lb);
         /* --BEGIN ERROR HANDLING-- */
         if (last != sdata_sz)
         {
@@ -167,9 +167,9 @@ void MPIDI_Buffer_copy(
     {
         char * buf;
         intptr_t buf_off;
-        MPID_Segment sseg;
+        MPIDU_Segment sseg;
         intptr_t sfirst;
-        MPID_Segment rseg;
+        MPIDU_Segment rseg;
         intptr_t rfirst;
 
         buf = MPL_malloc(MPIDI_COPY_BUFFER_SZ);
@@ -183,8 +183,8 @@ void MPIDI_Buffer_copy(
         }
         /* --END ERROR HANDLING-- */
 
-        MPID_Segment_init(sbuf, scount, sdt, &sseg, 0);
-        MPID_Segment_init(rbuf, rcount, rdt, &rseg, 0);
+        MPIDU_Segment_init(sbuf, scount, sdt, &sseg, 0);
+        MPIDU_Segment_init(rbuf, rcount, rdt, &rseg, 0);
 
         sfirst = 0;
         rfirst = 0;
@@ -204,7 +204,7 @@ void MPIDI_Buffer_copy(
                 last = sdata_sz;
             }
 
-            MPID_Segment_pack(&sseg, sfirst, &last, buf + buf_off);
+            MPIDU_Segment_pack(&sseg, sfirst, &last, buf + buf_off);
             /* --BEGIN ERROR HANDLING-- */
             MPID_assert(last > sfirst);
             /* --END ERROR HANDLING-- */
@@ -212,7 +212,7 @@ void MPIDI_Buffer_copy(
             buf_end = buf + buf_off + (last - sfirst);
             sfirst = last;
 
-            MPID_Segment_unpack(&rseg, rfirst, &last, buf);
+            MPIDU_Segment_unpack(&rseg, rfirst, &last, buf);
             /* --BEGIN ERROR HANDLING-- */
             MPID_assert(last > rfirst);
             /* --END ERROR HANDLING-- */
diff --git a/src/mpid/pamid/src/mpid_imrecv.c b/src/mpid/pamid/src/mpid_imrecv.c
index 7bbb7ab..9fda5ad 100644
--- a/src/mpid/pamid/src/mpid_imrecv.c
+++ b/src/mpid/pamid/src/mpid_imrecv.c
@@ -47,7 +47,7 @@ int MPID_Imrecv(void *buf, int count, MPI_Datatype datatype,
 #ifdef MPIDI_TRACE
 {
   size_t ll;
-  ll = count * MPID_Datatype_get_basic_size(datatype);
+  ll = count * MPIDU_Datatype_get_basic_size(datatype);
   /*MPIDI_SET_PR_REC(rreq,buf,count,ll,datatype,pami_source,rank,tag,comm,is_blocking); */
 }
 #endif
diff --git a/src/mpid/pamid/src/mpid_request.h b/src/mpid/pamid/src/mpid_request.h
index f25ae00..4b16b96 100644
--- a/src/mpid/pamid/src/mpid_request.h
+++ b/src/mpid/pamid/src/mpid_request.h
@@ -282,7 +282,7 @@ MPID_Request_release_inline(MPID_Request *req)
 
     if (req->comm)              MPIR_Comm_release(req->comm, 0);
     if (req->greq_fns)          MPL_free(req->greq_fns);
-    if (req->mpid.datatype_ptr) MPID_Datatype_release(req->mpid.datatype_ptr);
+    if (req->mpid.datatype_ptr) MPIDU_Datatype_release(req->mpid.datatype_ptr);
     if (req->mpid.uebuf_malloc== mpiuMalloc) {
         MPL_free(req->mpid.uebuf);
     }
diff --git a/src/mpid/pamid/src/mpidi_pami_datatype.c b/src/mpid/pamid/src/mpidi_pami_datatype.c
index 395f613..0296dd6 100644
--- a/src/mpid/pamid/src/mpidi_pami_datatype.c
+++ b/src/mpid/pamid/src/mpidi_pami_datatype.c
@@ -38,8 +38,8 @@ void MPIDI_PAMI_datatype_commit_hook (MPI_Datatype *ptr)
      */
     if (MPIDI_Process.typed_onesided == 1) {
 
-      MPID_Datatype *datatype_ptr;
-      MPID_Datatype_get_ptr(*ptr, datatype_ptr);
+      MPIDU_Datatype*datatype_ptr;
+      MPIDU_Datatype_get_ptr(*ptr, datatype_ptr);
 
       pami_result_t pami_dtop_result;
       datatype_ptr->device_datatype = (pami_type_t *) MPL_malloc(sizeof(pami_type_t));
@@ -83,10 +83,10 @@ void MPIDI_PAMI_datatype_commit_hook (MPI_Datatype *ptr)
  * \brief Destroy PAMI datatype representation of MPI Datatype.
  *
  */
-void MPIDI_PAMI_datatype_destroy_hook (MPID_Datatype *ptr)
+void MPIDI_PAMI_datatype_destroy_hook (MPIDU_Datatype*ptr)
 {
     /* If a PAMI datatype was created, destroy it if this is the
-     * last reference to the MPID_Datatype ptr.
+     * last reference to the MPIDU_Datatypeptr.
      */
     if ((MPIDI_Process.typed_onesided == 1) && (ptr->is_committed)) {
       if (ptr->device_datatype) {
@@ -113,8 +113,8 @@ void MPIDI_PAMI_datatype_dup_hook (MPI_Datatype *ptr)
      */
     if (MPIDI_Process.typed_onesided == 1) {
 
-      MPID_Datatype *datatype_ptr;
-      MPID_Datatype_get_ptr(*ptr, datatype_ptr);
+      MPIDU_Datatype*datatype_ptr;
+      MPIDU_Datatype_get_ptr(*ptr, datatype_ptr);
 
       pami_result_t pami_dtop_result;
       datatype_ptr->device_datatype = (pami_type_t *) MPL_malloc(sizeof(pami_type_t));
diff --git a/src/mpid/pamid/src/onesided/mpid_1s.c b/src/mpid/pamid/src/onesided/mpid_1s.c
index 7d3db88..65131f6 100644
--- a/src/mpid/pamid/src/onesided/mpid_1s.c
+++ b/src/mpid/pamid/src/onesided/mpid_1s.c
@@ -43,7 +43,7 @@ MPIDI_Win_DoneCB(pami_context_t  context,
                                      req->origin.count,
                                      req->origin.datatype);
           MPID_assert(mpi_errno == MPI_SUCCESS);
-          MPID_Datatype_release(req->origin.dt.pointer);
+          MPIDU_Datatype_release(req->origin.dt.pointer);
           MPL_free(req->buffer);
           MPL_free(req->user_buffer);
           req->buffer_free = 0;
@@ -84,12 +84,12 @@ MPIDI_Win_DoneCB(pami_context_t  context,
     }
   if ((MPIDI_Process.typed_onesided == 1) && (!req->target.dt.contig || !req->origin.dt.contig)) {
     /* We used the PAMI_Rput/Rget_typed call and added a ref so any MPI_Type_free before the context
-     * executes the put/get would not free the MPID_Datatype, which would also free the associated PAMI datatype
+     * executes the put/get would not free the MPIDU_Datatype, which would also free the associated PAMI datatype
      * which was still needed for communication -- that communication has completed, so now release the ref
-     * in the callback to allow the MPID_Datatype to be freed.
+     * in the callback to allow the MPIDU_Datatypeto be freed.
      */
-    MPID_Datatype_release(req->origin.dt.pointer);
-    MPID_Datatype_release(req->target.dt.pointer);
+    MPIDU_Datatype_release(req->origin.dt.pointer);
+    MPIDU_Datatype_release(req->target.dt.pointer);
   }
   MPIDI_Progress_signal();
 }
@@ -129,9 +129,9 @@ MPIDI_Win_datatype_map(MPIDI_Datatype * dt)
       MPID_assert(dt->map != NULL);
 
       DLOOP_Offset last = dt->pointer->size*dt->count;
-      MPID_Segment seg;
-      MPID_Segment_init(NULL, dt->count, dt->type, &seg, 0);
-      MPID_Segment_pack_vector(&seg, 0, &last, dt->map, &dt->num_contig);
+      MPIDU_Segment seg;
+      MPIDU_Segment_init(NULL, dt->count, dt->type, &seg, 0);
+      MPIDU_Segment_pack_vector(&seg, 0, &last, dt->map, &dt->num_contig);
       MPID_assert((unsigned)dt->num_contig <= map_size);
 #ifdef TRACE_ON
       TRACE_ERR("dt->pointer->size=%d  num_contig:  orig=%u  new=%d\n", dt->pointer->size, map_size, dt->num_contig);
diff --git a/src/mpid/pamid/src/onesided/mpid_win_accumulate.c b/src/mpid/pamid/src/onesided/mpid_win_accumulate.c
index 39ecead..30170ca 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_accumulate.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_accumulate.c
@@ -302,7 +302,7 @@ MPID_Accumulate(const void   *origin_addr,
        disp_unit = win->mpid.info[target_rank].disp_unit;
        dest_addr = (char *) base + disp_unit * target_disp;
 
-       MPID_Datatype_get_size_macro(origin_datatype, len);
+       MPIDU_Datatype_get_size_macro(origin_datatype, len);
 
        uop = MPIR_OP_HDL_TO_FN(op);
        one = 1;
@@ -317,8 +317,8 @@ MPID_Accumulate(const void   *origin_addr,
   {
     win->mpid.sync.total += req->target.dt.num_contig;
     MPI_Datatype basic_type = MPI_DATATYPE_NULL;
-    MPID_Datatype_get_basic_type(origin_datatype, basic_type);
-    /* MPID_Datatype_get_basic_type() doesn't handle the struct types */
+    MPIDU_Datatype_get_basic_type(origin_datatype, basic_type);
+    /* MPIDU_Datatype_get_basic_type() doesn't handle the struct types */
     if ((origin_datatype == MPI_FLOAT_INT)  ||
         (origin_datatype == MPI_DOUBLE_INT) ||
         (origin_datatype == MPI_LONG_INT)   ||
diff --git a/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c b/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c
index f20410e..3e06145 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c
@@ -129,7 +129,7 @@ int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr,
     win->mpid.sync.total += 1; 
 
     MPI_Datatype basic_type = MPI_DATATYPE_NULL;
-    MPID_Datatype_get_basic_type(datatype, basic_type);
+    MPIDU_Datatype_get_basic_type(datatype, basic_type);
     MPID_assert(basic_type != MPI_DATATYPE_NULL);
     req->origin.datatype=basic_type;
 
diff --git a/src/mpid/pamid/src/onesided/mpid_win_fetch_and_op.c b/src/mpid/pamid/src/onesided/mpid_win_fetch_and_op.c
index 5cf1508..07a5dfb 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_fetch_and_op.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_fetch_and_op.c
@@ -66,7 +66,7 @@ MPIDI_WinAtomicCB(pami_context_t    context,
 
   void *dest_addr = ahdr->remote_addr; 
   int len;       
-  len = MPID_Datatype_get_basic_size (ahdr->datatype);
+  len = MPIDU_Datatype_get_basic_size (ahdr->datatype);
 
   if (ahdr->atomic_type == MPIDI_WIN_REQUEST_COMPARE_AND_SWAP) {
 
@@ -125,7 +125,7 @@ MPIDI_WinAtomicAckCB(pami_context_t    context,
   MPIDI_AtomicHeader_t *ahdr = (MPIDI_AtomicHeader_t *) _hdr;
   //We have a valid result addr
   if (ahdr->result_addr != NULL) {
-    len = MPID_Datatype_get_basic_size (ahdr->datatype);
+    len = MPIDU_Datatype_get_basic_size (ahdr->datatype);
     MPIU_Memcpy(ahdr->result_addr, ahdr->buf, len);
   }
     
@@ -142,7 +142,7 @@ MPIDI_Atomic (pami_context_t   context,
   MPIDI_AtomicHeader_t atomic_hdr;
   int len;
 
-  len = MPID_Datatype_get_basic_size (req->origin.datatype);
+  len = MPIDU_Datatype_get_basic_size (req->origin.datatype);
   assert(len <= MAX_ATOMIC_TYPE_SIZE);
   if (req->buffer)
     MPIU_Memcpy(atomic_hdr.buf, req->buffer, len);
@@ -211,7 +211,7 @@ int MPID_Fetch_and_op(const void *origin_addr, void *result_addr,
       return MPI_SUCCESS;
 
   MPI_Datatype basic_type = MPI_DATATYPE_NULL;
-  MPID_Datatype_get_basic_type(datatype, basic_type);
+  MPIDU_Datatype_get_basic_type(datatype, basic_type);
   if ((datatype == MPI_FLOAT_INT)  ||
       (datatype == MPI_DOUBLE_INT) ||
       (datatype == MPI_LONG_INT)   ||
diff --git a/src/mpid/pamid/src/onesided/mpid_win_get.c b/src/mpid/pamid/src/onesided/mpid_win_get.c
index 835888c..04ffbd3 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_get.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_get.c
@@ -345,7 +345,7 @@ MPID_Get(void         *origin_addr,
       req->buffer      = MPL_malloc(req->origin.dt.size);
       MPID_assert(req->buffer != NULL);
 
-      MPID_Datatype_add_ref(req->origin.dt.pointer);
+      MPIDU_Datatype_add_ref(req->origin.dt.pointer);
       req->origin.addr  = origin_addr;
       req->origin.count = origin_count;
       req->origin.datatype = origin_datatype;
@@ -408,12 +408,12 @@ MPID_Get(void         *origin_addr,
 
   if ((MPIDI_Process.typed_onesided == 1) && (!req->target.dt.contig || !req->origin.dt.contig)) {
     /* We will use the PAMI_Rget_typed call so we need to make sure any MPI_Type_free before the context
-     * executes the get does not free the MPID_Datatype, which would also free the associated PAMI datatype which
+     * executes the get does not free the MPIDU_Datatype, which would also free the associated PAMI datatype which
      * is still needed for communication -- decrement the ref in the callback to allow the MPID_Datatype
      * to be freed once the PAMI communication has completed.
      */
-    MPID_Datatype_add_ref(req->origin.dt.pointer);
-    MPID_Datatype_add_ref(req->target.dt.pointer);
+    MPIDU_Datatype_add_ref(req->origin.dt.pointer);
+    MPIDU_Datatype_add_ref(req->target.dt.pointer);
   }
   /* The pamid one-sided design requires context post in order to handle the
    * case where the number of pending rma operation exceeds the
diff --git a/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c b/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
index 07b402f..415567a 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
@@ -44,7 +44,7 @@ MPIDI_Fetch_data_op(const void   * origin_addr,
            disp_unit = win->mpid.info[target_rank].disp_unit;
         dest_addr = (char *) base + disp_unit * target_disp;
 
-        MPID_Datatype_get_size_macro(origin_datatype, len);
+        MPIDU_Datatype_get_size_macro(origin_datatype, len);
         MPIU_Memcpy(result_addr, dest_addr, len);
         if (op != MPI_NO_OP) {
             uop = MPIR_OP_HDL_TO_FN(op);
@@ -535,8 +535,8 @@ MPID_Get_accumulate(const void   * origin_addr,
   win->mpid.sync.total += (1 + req->target.dt.num_contig);
   {
     MPI_Datatype basic_type = MPI_DATATYPE_NULL;
-    MPID_Datatype_get_basic_type(origin_datatype, basic_type);
-    /* MPID_Datatype_get_basic_type() doesn't handle the struct types */
+    MPIDU_Datatype_get_basic_type(origin_datatype, basic_type);
+    /* MPIDU_Datatype_get_basic_type() doesn't handle the struct types */
     if ((origin_datatype == MPI_FLOAT_INT)  ||
         (origin_datatype == MPI_DOUBLE_INT) ||
         (origin_datatype == MPI_LONG_INT)   ||
diff --git a/src/mpid/pamid/src/onesided/mpid_win_put.c b/src/mpid/pamid/src/onesided/mpid_win_put.c
index 2d7b8e3..c049b28 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_put.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_put.c
@@ -408,12 +408,12 @@ MPID_Put(const void   *origin_addr,
   }
   if ((MPIDI_Process.typed_onesided == 1) && (!req->target.dt.contig || !req->origin.dt.contig)) {
     /* We will use the PAMI_Rput_typed call so we need to make sure any MPI_Type_free before the context
-     * executes the put does not free the MPID_Datatype, which would also free the associated PAMI datatype which
+     * executes the put does not free the MPIDU_Datatype, which would also free the associated PAMI datatype which
      * is still needed for communication -- decrement the ref in the callback to allow the MPID_Datatype
      * to be freed once the PAMI communication has completed.
      */
-    MPID_Datatype_add_ref(req->origin.dt.pointer);
-    MPID_Datatype_add_ref(req->target.dt.pointer);
+    MPIDU_Datatype_add_ref(req->origin.dt.pointer);
+    MPIDU_Datatype_add_ref(req->target.dt.pointer);
   }
   /* The pamid one-sided design requires context post in order to handle the
    * case where the number of pending rma operation exceeds the
diff --git a/src/mpid/pamid/src/onesided/mpidi_onesided.h b/src/mpid/pamid/src/onesided/mpidi_onesided.h
index e669d31..c00136e 100644
--- a/src/mpid/pamid/src/onesided/mpidi_onesided.h
+++ b/src/mpid/pamid/src/onesided/mpidi_onesided.h
@@ -183,7 +183,7 @@ typedef struct MPIDI_WinLock_info
 
 typedef struct
 {
-  MPID_Datatype * pointer;
+  MPIDU_Datatype* pointer;
   MPI_Datatype    type;
   int             count;
   int             contig;
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c b/src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c
index e5f0fc4..583474f 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c
@@ -224,7 +224,7 @@ MPIDI_RecvCB(pami_context_t    context,
   /*  Calculate message length for reception.  */
   /* ----------------------------------------- */
   unsigned dt_contig, dt_size;
-  MPID_Datatype *dt_ptr;
+  MPIDU_Datatype*dt_ptr;
   MPI_Aint dt_true_lb;
   MPIDI_Datatype_get_info(rreq->mpid.userbufcount,
                           rreq->mpid.datatype,
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_callback_short.c b/src/mpid/pamid/src/pt2pt/mpidi_callback_short.c
index 946a9cd..3f9914a 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_callback_short.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_callback_short.c
@@ -175,7 +175,7 @@ MPIDI_RecvShortCB(pami_context_t    context,
       goto fn_exit_short;
     }
 
-  size_t dt_size = rreq->mpid.userbufcount * MPID_Datatype_get_basic_size(rreq->mpid.datatype);
+  size_t dt_size = rreq->mpid.userbufcount * MPIDU_Datatype_get_basic_size(rreq->mpid.datatype);
 
   /* ----------------------------- */
   /*  Test for truncated message.  */
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_callback_util.c b/src/mpid/pamid/src/pt2pt/mpidi_callback_util.c
index 8a439aa..834e93a 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_callback_util.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_callback_util.c
@@ -144,7 +144,7 @@ MPIDI_Callback_process_userdefined_dt(pami_context_t      context,
                                       MPID_Request      * rreq)
 {
   unsigned dt_contig, dt_size;
-  MPID_Datatype *dt_ptr;
+  MPIDU_Datatype*dt_ptr;
   MPI_Aint dt_true_lb;
   MPIDI_Datatype_get_info(rreq->mpid.userbufcount,
                           rreq->mpid.datatype,
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_done.c b/src/mpid/pamid/src/pt2pt/mpidi_done.c
index 91ad3de..edb6d3e 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_done.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_done.c
@@ -182,7 +182,7 @@ void MPIDI_Recvq_process_out_of_order_msgs(pami_task_t src, pami_context_t conte
         /*  Calculate message length for reception.  */
         /* ----------------------------------------- */
         unsigned dt_contig, dt_size;
-        MPID_Datatype *dt_ptr;
+        MPIDU_Datatype*dt_ptr;
         MPI_Aint dt_true_lb;
         MPIDI_Datatype_get_info(rreq->mpid.userbufcount,
                                 rreq->mpid.datatype,
@@ -206,8 +206,8 @@ void MPIDI_Recvq_process_out_of_order_msgs(pami_task_t src, pami_context_t conte
         ooreq->mpid.datatype = rreq->mpid.datatype;
 	if (HANDLE_GET_KIND(ooreq->mpid.datatype) != HANDLE_KIND_BUILTIN)
           {
-            MPID_Datatype_get_ptr(ooreq->mpid.datatype, ooreq->mpid.datatype_ptr);
-            MPID_Datatype_add_ref(ooreq->mpid.datatype_ptr);
+            MPIDU_Datatype_get_ptr(ooreq->mpid.datatype, ooreq->mpid.datatype_ptr);
+            MPIDU_Datatype_add_ref(ooreq->mpid.datatype_ptr);
           }
 #ifdef QUEUE_BINARY_SEARCH_SUPPORT
         if(MPIDI_Process.queue_binary_search_support_on)
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_recv.h b/src/mpid/pamid/src/pt2pt/mpidi_recv.h
index f63cd87..7b518fd 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_recv.h
+++ b/src/mpid/pamid/src/pt2pt/mpidi_recv.h
@@ -234,8 +234,8 @@ MPIDI_Recv(void          * buf,
       /* ----------------------------------------------------------- */
       if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
         {
-          MPID_Datatype_get_ptr(datatype, rreq->mpid.datatype_ptr);
-          MPID_Datatype_add_ref(rreq->mpid.datatype_ptr);
+          MPIDU_Datatype_get_ptr(datatype, rreq->mpid.datatype_ptr);
+          MPIDU_Datatype_add_ref(rreq->mpid.datatype_ptr);
         }
       MPIU_THREAD_CS_EXIT(MSGQUEUE,0);
     }
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c b/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
index 05543bb..c565305 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
@@ -49,8 +49,8 @@ MPIDI_RecvMsg_Unexp(MPID_Request  * rreq,
       /* -------------------------------------------------------- */
       if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
         {
-          MPID_Datatype_get_ptr(datatype, rreq->mpid.datatype_ptr);
-          MPID_Datatype_add_ref(rreq->mpid.datatype_ptr);
+          MPIDU_Datatype_get_ptr(datatype, rreq->mpid.datatype_ptr);
+          MPIDU_Datatype_add_ref(rreq->mpid.datatype_ptr);
         }
 
       if (likely((is_sync+is_zero) == 0))
@@ -127,8 +127,8 @@ MPIDI_RecvMsg_Unexp(MPID_Request  * rreq,
         }
       if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
         {
-          MPID_Datatype_get_ptr(datatype, rreq->mpid.datatype_ptr);
-          MPID_Datatype_add_ref(rreq->mpid.datatype_ptr);
+          MPIDU_Datatype_get_ptr(datatype, rreq->mpid.datatype_ptr);
+          MPIDU_Datatype_add_ref(rreq->mpid.datatype_ptr);
         }
      }
     }
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_rendezvous.c b/src/mpid/pamid/src/pt2pt/mpidi_rendezvous.c
index cf3e65e..f8c77ad 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_rendezvous.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_rendezvous.c
@@ -51,7 +51,7 @@ MPIDI_RendezvousTransfer(pami_context_t   context,
   /* -------------------------------------- */
   unsigned dt_contig;
   size_t dt_size;
-  MPID_Datatype *dt_ptr;
+  MPIDU_Datatype*dt_ptr;
   MPI_Aint dt_true_lb;
   MPIDI_Datatype_get_info(rreq->mpid.userbufcount,
                           rreq->mpid.datatype,
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_sendmsg.c b/src/mpid/pamid/src/pt2pt/mpidi_sendmsg.c
index c9263fc..71f5ec5 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_sendmsg.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_sendmsg.c
@@ -316,7 +316,7 @@ MPIDI_SendMsg_process_userdefined_dt(MPID_Request      * sreq,
   size_t          data_sz;
   int             dt_contig;
   MPI_Aint        dt_true_lb;
-  MPID_Datatype * dt_ptr;
+  MPIDU_Datatype* dt_ptr;
   void          * sndbuf;
 
   /*
@@ -354,7 +354,7 @@ MPIDI_SendMsg_process_userdefined_dt(MPID_Request      * sreq,
       if(MPIDI_Process.cuda_aware_support_on && on_device)
       {
         MPI_Aint dt_extent;
-        MPID_Datatype_get_extent_macro(sreq->mpid.datatype, dt_extent);
+        MPIDU_Datatype_get_extent_macro(sreq->mpid.datatype, dt_extent);
         buf =  MPL_malloc(dt_extent * sreq->mpid.userbufcount);
 
         cudaError_t cudaerr = CudaMemcpy(buf, sreq->mpid.userbuf, dt_extent * sreq->mpid.userbufcount, cudaMemcpyDeviceToHost);
@@ -365,7 +365,7 @@ MPIDI_SendMsg_process_userdefined_dt(MPID_Request      * sreq,
       }
 #endif
 
-      MPID_Segment segment;
+      MPIDU_Segment segment;
 
       if(data_sz != 0) {
         sreq->mpid.uebuf = sndbuf = MPL_malloc(data_sz);
@@ -387,12 +387,12 @@ MPIDI_SendMsg_process_userdefined_dt(MPID_Request      * sreq,
 #endif
         MPID_assert(buf != NULL);
 
-        MPID_Segment_init(buf,
+        MPIDU_Segment_init(buf,
                           sreq->mpid.userbufcount,
                           sreq->mpid.datatype,
                           &segment,
                           0);
-        MPID_Segment_pack(&segment, 0, &last, sndbuf);
+        MPIDU_Segment_pack(&segment, 0, &last, sndbuf);
         MPID_assert(last == data_sz);
 #if CUDA_AWARE_SUPPORT
         if(MPIDI_Process.cuda_aware_support_on && on_device)
@@ -458,7 +458,7 @@ if (!TOKEN_FLOW_CONTROL_ON) {
   if (likely(HANDLE_GET_KIND(sreq->mpid.datatype) == HANDLE_KIND_BUILTIN))
     {
       sndbuf   = sreq->mpid.userbuf;
-      data_sz  = sreq->mpid.userbufcount * MPID_Datatype_get_basic_size(sreq->mpid.datatype);
+      data_sz  = sreq->mpid.userbufcount * MPIDU_Datatype_get_basic_size(sreq->mpid.datatype);
     }
   else
     {
@@ -561,7 +561,7 @@ if (!TOKEN_FLOW_CONTROL_ON) {
        if (likely(HANDLE_GET_KIND(sreq->mpid.datatype) == HANDLE_KIND_BUILTIN))
          {
            sndbuf   = sreq->mpid.userbuf;
-           data_sz  = sreq->mpid.userbufcount * MPID_Datatype_get_basic_size(sreq->mpid.datatype);
+           data_sz  = sreq->mpid.userbufcount * MPIDU_Datatype_get_basic_size(sreq->mpid.datatype);
          }
        else
         {
diff --git a/src/mpid/pamid/src/pt2pt/persistent/mpid_recv_init.c b/src/mpid/pamid/src/pt2pt/persistent/mpid_recv_init.c
index e3acd41..46c8c91 100644
--- a/src/mpid/pamid/src/pt2pt/persistent/mpid_recv_init.c
+++ b/src/mpid/pamid/src/pt2pt/persistent/mpid_recv_init.c
@@ -48,8 +48,8 @@ int MPID_Recv_init(void * buf,
   MPIDI_Request_setPType(rreq, MPIDI_REQUEST_PTYPE_RECV);
   if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
     {
-      MPID_Datatype_get_ptr(datatype, rreq->mpid.datatype_ptr);
-      MPID_Datatype_add_ref(rreq->mpid.datatype_ptr);
+      MPIDU_Datatype_get_ptr(datatype, rreq->mpid.datatype_ptr);
+      MPIDU_Datatype_add_ref(rreq->mpid.datatype_ptr);
     }
 
   return MPI_SUCCESS;
diff --git a/src/mpid/pamid/src/pt2pt/persistent/mpid_send_init.c b/src/mpid/pamid/src/pt2pt/persistent/mpid_send_init.c
index 5bf50f2..f07e116 100644
--- a/src/mpid/pamid/src/pt2pt/persistent/mpid_send_init.c
+++ b/src/mpid/pamid/src/pt2pt/persistent/mpid_send_init.c
@@ -53,8 +53,8 @@ MPID_PSendRequest(const void    * buf,
 
   if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
     {
-      MPID_Datatype_get_ptr(datatype, sreq->mpid.datatype_ptr);
-      MPID_Datatype_add_ref(sreq->mpid.datatype_ptr);
+      MPIDU_Datatype_get_ptr(datatype, sreq->mpid.datatype_ptr);
+      MPIDU_Datatype_add_ref(sreq->mpid.datatype_ptr);
     }
 
   return MPI_SUCCESS;

http://git.mpich.org/mpich.git/commitdiff/40bdb8429f3dc61c2849fe1ac93e3103483d7735

commit 40bdb8429f3dc61c2849fe1ac93e3103483d7735
Author: Yanfei Guo <yguo at anl.gov>
Date:   Thu Dec 17 09:44:26 2015 -0600

    mpid/common/datatype: remove unused function prototype
    
    The MPIR_Type_get_contig_blocks is not used anywhere in the code.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/common/datatype/mpid_datatype.h b/src/mpid/common/datatype/mpid_datatype.h
index 073fd32..4761f67 100644
--- a/src/mpid/common/datatype/mpid_datatype.h
+++ b/src/mpid/common/datatype/mpid_datatype.h
@@ -720,9 +720,6 @@ void MPID_Datatype_free(struct MPID_Datatype *ptr);
 void MPID_Dataloop_update(struct DLOOP_Dataloop *dataloop,
 			  MPI_Aint ptrdiff);
 
-MPI_Count MPIR_Type_get_contig_blocks(MPI_Datatype type,
-				MPI_Count *nr_blocks_p);
-
 int MPIR_Type_flatten(MPI_Datatype type,
 		      MPI_Aint *off_array,
 		      DLOOP_Size *size_array,

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

Summary of changes:
 .gitignore                                         |    4 +-
 configure.ac                                       |    8 +-
 .../ch3/channels/nemesis/include/mpid_nem_inline.h |   14 +-
 .../ch3/channels/nemesis/include/mpid_nem_post.h   |    4 +-
 .../ch3/channels/nemesis/netmod/llc/llc_poll.c     |    4 +-
 .../ch3/channels/nemesis/netmod/llc/llc_send.c     |   26 +-
 .../ch3/channels/nemesis/netmod/mxm/mxm_poll.c     |   22 +-
 .../ch3/channels/nemesis/netmod/mxm/mxm_send.c     |   72 +-
 src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c |    2 +-
 .../nemesis/netmod/ofi/ofi_tagged_template.c       |    2 +-
 .../ch3/channels/nemesis/netmod/portals4/ptl_nm.c  |    4 +-
 .../channels/nemesis/netmod/portals4/ptl_recv.c    |   52 +-
 .../channels/nemesis/netmod/portals4/ptl_send.c    |   26 +-
 src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c   |    2 +-
 .../ch3/channels/nemesis/src/mpid_nem_lmt_dma.c    |   16 +-
 .../ch3/channels/nemesis/src/mpid_nem_lmt_shm.c    |   12 +-
 .../channels/nemesis/src/mpid_nem_lmt_vmsplice.c   |    8 +-
 src/mpid/ch3/include/mpid_rma_issue.h              |   76 +-
 src/mpid/ch3/include/mpid_rma_shm.h                |   52 +-
 src/mpid/ch3/include/mpidimpl.h                    |    6 +-
 src/mpid/ch3/include/mpidpost.h                    |    2 +-
 src/mpid/ch3/include/mpidpre.h                     |    8 +-
 src/mpid/ch3/include/mpidrma.h                     |   22 +-
 src/mpid/ch3/src/ch3u_buffer.c                     |   28 +-
 src/mpid/ch3/src/ch3u_eager.c                      |   16 +-
 src/mpid/ch3/src/ch3u_eagersync.c                  |    6 +-
 src/mpid/ch3/src/ch3u_handle_recv_pkt.c            |   18 +-
 src/mpid/ch3/src/ch3u_handle_recv_req.c            |  138 ++--
 src/mpid/ch3/src/ch3u_request.c                    |   20 +-
 src/mpid/ch3/src/ch3u_rma_ops.c                    |   92 ++--
 src/mpid/ch3/src/ch3u_rma_pkthandler.c             |   46 +-
 src/mpid/ch3/src/ch3u_rma_reqops.c                 |    8 +-
 src/mpid/ch3/src/ch3u_rndv.c                       |    8 +-
 src/mpid/ch3/src/mpid_imrecv.c                     |    8 +-
 src/mpid/ch3/src/mpid_irecv.c                      |   12 +-
 src/mpid/ch3/src/mpid_irsend.c                     |    6 +-
 src/mpid/ch3/src/mpid_isend.c                      |    6 +-
 src/mpid/ch3/src/mpid_issend.c                     |    6 +-
 src/mpid/ch3/src/mpid_recv.c                       |   12 +-
 src/mpid/ch3/src/mpid_rsend.c                      |    2 +-
 src/mpid/ch3/src/mpid_send.c                       |    2 +-
 src/mpid/ch3/src/mpid_ssend.c                      |    2 +-
 src/mpid/ch3/src/mpid_startall.c                   |   20 +-
 src/mpid/ch3/src/mpidi_isend_self.c                |    6 +-
 src/mpid/common/datatype/Makefile.mk               |   47 +-
 src/mpid/common/datatype/dataloop/dataloop.c       |    4 +-
 src/mpid/common/datatype/dataloop/dataloop.h       |    2 +-
 src/mpid/common/datatype/dataloop/dataloop_parts.h |    2 +-
 .../common/datatype/dataloop/segment_flatten.c     |    4 +-
 .../common/datatype/dataloop/segment_packunpack.c  |    4 +-
 src/mpid/common/datatype/mpid_contents_support.c   |   67 --
 src/mpid/common/datatype/mpid_dataloop.h           |  115 ---
 src/mpid/common/datatype/mpid_datatype.h           |  760 --------------------
 src/mpid/common/datatype/mpid_datatype_contents.c  |  237 ------
 src/mpid/common/datatype/mpid_datatype_fallback.h  |   75 ++
 src/mpid/common/datatype/mpid_datatype_free.c      |   59 --
 src/mpid/common/datatype/mpid_ext32_datatype.c     |  118 ---
 src/mpid/common/datatype/mpid_ext32_segment.c      |  353 ---------
 src/mpid/common/datatype/mpid_ext32_segment.h      |  417 -----------
 src/mpid/common/datatype/mpid_segment.c            |  528 --------------
 src/mpid/common/datatype/mpid_type_blockindexed.c  |  194 -----
 src/mpid/common/datatype/mpid_type_commit.c        |   72 --
 src/mpid/common/datatype/mpid_type_contiguous.c    |  138 ----
 .../common/datatype/mpid_type_create_pairtype.c    |  225 ------
 .../common/datatype/mpid_type_create_resized.c     |  113 ---
 src/mpid/common/datatype/mpid_type_debug.c         |  670 -----------------
 src/mpid/common/datatype/mpid_type_dup.c           |  111 ---
 src/mpid/common/datatype/mpid_type_get_contents.c  |   91 ---
 src/mpid/common/datatype/mpid_type_get_envelope.c  |   56 --
 src/mpid/common/datatype/mpid_type_indexed.c       |  238 ------
 src/mpid/common/datatype/mpid_type_struct.c        |  439 -----------
 src/mpid/common/datatype/mpid_type_vector.c        |  166 -----
 src/mpid/common/datatype/mpid_type_zerolen.c       |   78 --
 src/mpid/common/datatype/mpidu_contents_support.c  |   68 ++
 src/mpid/common/datatype/mpidu_dataloop.h          |  115 +++
 src/mpid/common/datatype/mpidu_datatype.h          |  757 +++++++++++++++++++
 src/mpid/common/datatype/mpidu_datatype_contents.c |  237 ++++++
 src/mpid/common/datatype/mpidu_datatype_free.c     |   59 ++
 src/mpid/common/datatype/mpidu_ext32_datatype.c    |  118 +++
 src/mpid/common/datatype/mpidu_ext32_segment.c     |  353 +++++++++
 src/mpid/common/datatype/mpidu_ext32_segment.h     |  417 +++++++++++
 src/mpid/common/datatype/mpidu_segment.c           |  528 ++++++++++++++
 src/mpid/common/datatype/mpidu_type_blockindexed.c |  194 +++++
 src/mpid/common/datatype/mpidu_type_commit.c       |   72 ++
 src/mpid/common/datatype/mpidu_type_contiguous.c   |  138 ++++
 .../common/datatype/mpidu_type_create_pairtype.c   |  225 ++++++
 .../common/datatype/mpidu_type_create_resized.c    |  113 +++
 src/mpid/common/datatype/mpidu_type_debug.c        |  670 +++++++++++++++++
 src/mpid/common/datatype/mpidu_type_dup.c          |  111 +++
 src/mpid/common/datatype/mpidu_type_get_contents.c |   91 +++
 src/mpid/common/datatype/mpidu_type_get_envelope.c |   56 ++
 src/mpid/common/datatype/mpidu_type_indexed.c      |  238 ++++++
 src/mpid/common/datatype/mpidu_type_struct.c       |  439 +++++++++++
 src/mpid/common/datatype/mpidu_type_vector.c       |  166 +++++
 src/mpid/common/datatype/mpidu_type_zerolen.c      |   78 ++
 src/mpid/common/datatype/mpir_type_flatten.c       |   18 +-
 src/mpid/common/sched/mpidu_sched.c                |   16 +-
 src/mpid/pamid/include/mpidi_datatypes.h           |    2 +-
 src/mpid/pamid/include/mpidi_macros.h              |   10 +-
 src/mpid/pamid/include/mpidpost.h                  |    2 +-
 src/mpid/pamid/include/mpidpre.h                   |    8 +-
 .../pamid/src/coll/allgather/mpido_allgather.c     |   18 +-
 .../pamid/src/coll/allgatherv/mpido_allgatherv.c   |   16 +-
 .../pamid/src/coll/allreduce/mpido_allreduce.c     |    4 +-
 src/mpid/pamid/src/coll/alltoall/mpido_alltoall.c  |   18 +-
 .../pamid/src/coll/alltoallv/mpido_alltoallv.c     |   18 +-
 src/mpid/pamid/src/coll/bcast/mpido_bcast.c        |   16 +-
 src/mpid/pamid/src/coll/gather/mpido_gather.c      |   18 +-
 src/mpid/pamid/src/coll/gatherv/mpido_gatherv.c    |   20 +-
 src/mpid/pamid/src/coll/red_scat/mpido_red_scat.c  |    4 +-
 src/mpid/pamid/src/coll/reduce/mpido_reduce.c      |    8 +-
 src/mpid/pamid/src/coll/scan/mpido_scan.c          |    8 +-
 src/mpid/pamid/src/coll/scatter/mpido_scatter.c    |   14 +-
 src/mpid/pamid/src/coll/scatterv/mpido_scatterv.c  |   16 +-
 src/mpid/pamid/src/mpid_buffer.c                   |   36 +-
 src/mpid/pamid/src/mpid_imrecv.c                   |    2 +-
 src/mpid/pamid/src/mpid_request.h                  |    4 +-
 src/mpid/pamid/src/mpidi_pami_datatype.c           |   12 +-
 src/mpid/pamid/src/onesided/mpid_1s.c              |   16 +-
 src/mpid/pamid/src/onesided/mpid_win_accumulate.c  |    6 +-
 .../pamid/src/onesided/mpid_win_compare_and_swap.c |    2 +-
 .../pamid/src/onesided/mpid_win_fetch_and_op.c     |    8 +-
 src/mpid/pamid/src/onesided/mpid_win_get.c         |    8 +-
 .../pamid/src/onesided/mpid_win_get_accumulate.c   |    6 +-
 src/mpid/pamid/src/onesided/mpid_win_put.c         |    6 +-
 src/mpid/pamid/src/onesided/mpidi_onesided.h       |    2 +-
 src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c    |    2 +-
 src/mpid/pamid/src/pt2pt/mpidi_callback_short.c    |    2 +-
 src/mpid/pamid/src/pt2pt/mpidi_callback_util.c     |    2 +-
 src/mpid/pamid/src/pt2pt/mpidi_done.c              |    6 +-
 src/mpid/pamid/src/pt2pt/mpidi_recv.h              |    6 +-
 src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c           |    8 +-
 src/mpid/pamid/src/pt2pt/mpidi_rendezvous.c        |    2 +-
 src/mpid/pamid/src/pt2pt/mpidi_sendmsg.c           |   14 +-
 .../pamid/src/pt2pt/persistent/mpid_recv_init.c    |    4 +-
 .../pamid/src/pt2pt/persistent/mpid_send_init.c    |    4 +-
 136 files changed, 5999 insertions(+), 5925 deletions(-)
 delete mode 100644 src/mpid/common/datatype/mpid_contents_support.c
 delete mode 100644 src/mpid/common/datatype/mpid_dataloop.h
 delete mode 100644 src/mpid/common/datatype/mpid_datatype.h
 delete mode 100644 src/mpid/common/datatype/mpid_datatype_contents.c
 create mode 100644 src/mpid/common/datatype/mpid_datatype_fallback.h
 delete mode 100644 src/mpid/common/datatype/mpid_datatype_free.c
 delete mode 100644 src/mpid/common/datatype/mpid_ext32_datatype.c
 delete mode 100644 src/mpid/common/datatype/mpid_ext32_segment.c
 delete mode 100644 src/mpid/common/datatype/mpid_ext32_segment.h
 delete mode 100644 src/mpid/common/datatype/mpid_segment.c
 delete mode 100644 src/mpid/common/datatype/mpid_type_blockindexed.c
 delete mode 100644 src/mpid/common/datatype/mpid_type_commit.c
 delete mode 100644 src/mpid/common/datatype/mpid_type_contiguous.c
 delete mode 100644 src/mpid/common/datatype/mpid_type_create_pairtype.c
 delete mode 100644 src/mpid/common/datatype/mpid_type_create_resized.c
 delete mode 100644 src/mpid/common/datatype/mpid_type_debug.c
 delete mode 100644 src/mpid/common/datatype/mpid_type_dup.c
 delete mode 100644 src/mpid/common/datatype/mpid_type_get_contents.c
 delete mode 100644 src/mpid/common/datatype/mpid_type_get_envelope.c
 delete mode 100644 src/mpid/common/datatype/mpid_type_indexed.c
 delete mode 100644 src/mpid/common/datatype/mpid_type_struct.c
 delete mode 100644 src/mpid/common/datatype/mpid_type_vector.c
 delete mode 100644 src/mpid/common/datatype/mpid_type_zerolen.c
 create mode 100644 src/mpid/common/datatype/mpidu_contents_support.c
 create mode 100644 src/mpid/common/datatype/mpidu_dataloop.h
 create mode 100644 src/mpid/common/datatype/mpidu_datatype.h
 create mode 100644 src/mpid/common/datatype/mpidu_datatype_contents.c
 create mode 100644 src/mpid/common/datatype/mpidu_datatype_free.c
 create mode 100644 src/mpid/common/datatype/mpidu_ext32_datatype.c
 create mode 100644 src/mpid/common/datatype/mpidu_ext32_segment.c
 create mode 100644 src/mpid/common/datatype/mpidu_ext32_segment.h
 create mode 100644 src/mpid/common/datatype/mpidu_segment.c
 create mode 100644 src/mpid/common/datatype/mpidu_type_blockindexed.c
 create mode 100644 src/mpid/common/datatype/mpidu_type_commit.c
 create mode 100644 src/mpid/common/datatype/mpidu_type_contiguous.c
 create mode 100644 src/mpid/common/datatype/mpidu_type_create_pairtype.c
 create mode 100644 src/mpid/common/datatype/mpidu_type_create_resized.c
 create mode 100644 src/mpid/common/datatype/mpidu_type_debug.c
 create mode 100644 src/mpid/common/datatype/mpidu_type_dup.c
 create mode 100644 src/mpid/common/datatype/mpidu_type_get_contents.c
 create mode 100644 src/mpid/common/datatype/mpidu_type_get_envelope.c
 create mode 100644 src/mpid/common/datatype/mpidu_type_indexed.c
 create mode 100644 src/mpid/common/datatype/mpidu_type_struct.c
 create mode 100644 src/mpid/common/datatype/mpidu_type_vector.c
 create mode 100644 src/mpid/common/datatype/mpidu_type_zerolen.c


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list