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

Service Account noreply at mpich.org
Wed Aug 19 19:12:47 CDT 2015


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

The branch, master has been updated
       via  e74901c335bcc9877006d53d4bd76f2490513027 (commit)
       via  f861b31224ffa1f75625ab46d55edc494d328689 (commit)
       via  377a8d4f9549cae4d9b4ee5dcf9dcc6c289f4f9d (commit)
       via  ccc85ec603b52e1779cddc45c9b74eebbfa95dc2 (commit)
       via  9bd06e8cea9b042eadb60f1cbfc4a33432dc722b (commit)
       via  56824b049b37ea155a046257aca21718555acd1b (commit)
       via  35bf5005f251d8b89aa740e52abf7178dd4322e6 (commit)
       via  d396438faca35c113f06c5370067948a595c0c62 (commit)
       via  1ea0abc722dd38b8945f32746ede3bd47e5330db (commit)
       via  481d13c7c114f9218f8f5ec49511655a93393554 (commit)
       via  652b2b90d1dcc9e0e7d8c6b0110c6a1ee49bb791 (commit)
       via  8eb41fe7b8639d8e69281c5db9d984c357116a94 (commit)
       via  1d32ecbbb488fa9fc1419bc96f1be4fb0f273d5a (commit)
       via  4cd47a98a9c5663be64d33ce9934525b0aa476bd (commit)
       via  c48eb2e980b02fe930850b8ce8e5a497d347d836 (commit)
       via  2585ac4257b5d91c3d27bc0f779efb59233fecc2 (commit)
       via  652f3da913c5504a4b028ba098a344658fad1392 (commit)
       via  405da02e4c6ba2fbe471ce7837905ef47a542bfe (commit)
       via  1e4ebcd0e6ef7beb01547a2f73cc6b0ba7abc291 (commit)
       via  e3a08a394a86c01d577fd2d3380519d979bc5c8c (commit)
       via  94202a803712c9216bb556cf103263f4dad26c61 (commit)
       via  123e516a49f67257cd329f36d1a999bf6a2314b7 (commit)
      from  f89c13fd2f4b6604e0f8c3ea9bc2618786986fab (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/e74901c335bcc9877006d53d4bd76f2490513027

commit e74901c335bcc9877006d53d4bd76f2490513027
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 19 03:13:37 2015 -0500

    Replace the direct usage of MPIU_Thread with MPID_Thread.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpi/errhan/errnames.txt b/src/mpi/errhan/errnames.txt
index 111f13d..1f60dd1 100644
--- a/src/mpi/errhan/errnames.txt
+++ b/src/mpi/errhan/errnames.txt
@@ -434,12 +434,12 @@ unexpected messages queued.
 #**argnull %s:Invalid null parameter %s
 **commstack:Internal overflow in stack used for MPI_Comm_split
 
-**cond_create:MPIU_Thread_cond_create failed
-**cond_create %s:MPIU_Thread_cond_create failed: %s
-**mutex_create:MPIU_Thread_mutex_create failed
-**mutex_create %s:MPIU_Thread_mutex_create failed: %s
-**thread_create:MPIU_Thread_create failed
-**thread_create %s:MPIU_Thread_create failed: %s
+**cond_create:MPID_Thread_cond_create failed
+**cond_create %s:MPID_Thread_cond_create failed: %s
+**mutex_create:MPID_Thread_mutex_create failed
+**mutex_create %s:MPID_Thread_mutex_create failed: %s
+**thread_create:MPID_Thread_create failed
+**thread_create %s:MPID_Thread_create failed: %s
 
 #
 # Errors common to several devices
diff --git a/src/mpi/init/async.c b/src/mpi/init/async.c
index f9fc9cd..72bfe52 100644
--- a/src/mpi/init/async.c
+++ b/src/mpi/init/async.c
@@ -12,9 +12,9 @@
 
 #if MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE
 static MPID_Comm *progress_comm_ptr;
-static MPIU_Thread_id_t progress_thread_id;
-static MPIU_Thread_mutex_t progress_mutex;
-static MPIU_Thread_cond_t progress_cond;
+static MPID_Thread_id_t progress_thread_id;
+static MPID_Thread_mutex_t progress_mutex;
+static MPID_Thread_cond_t progress_cond;
 static volatile int progress_thread_done = 0;
 
 /* We can use whatever tag we want; we use a different communicator
@@ -54,15 +54,15 @@ static void progress_fn(void * data)
     MPIU_Assert(!mpi_errno);
 
     /* Send a signal to the main thread saying we are done */
-    MPIU_Thread_mutex_lock(&progress_mutex, &mpi_errno);
+    MPID_Thread_mutex_lock(&progress_mutex, &mpi_errno);
     MPIU_Assert(!mpi_errno);
 
     progress_thread_done = 1;
 
-    MPIU_Thread_mutex_unlock(&progress_mutex, &mpi_errno);
+    MPID_Thread_mutex_unlock(&progress_mutex, &mpi_errno);
     MPIU_Assert(!mpi_errno);
 
-    MPIU_Thread_cond_signal(&progress_cond, &mpi_errno);
+    MPID_Thread_cond_signal(&progress_cond, &mpi_errno);
     MPIU_Assert(!mpi_errno);
 
     MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
@@ -92,13 +92,13 @@ int MPIR_Init_async_thread(void)
     mpi_errno = MPIR_Comm_dup_impl(comm_self_ptr, &progress_comm_ptr);
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
-    MPIU_Thread_cond_create(&progress_cond, &err);
+    MPID_Thread_cond_create(&progress_cond, &err);
     MPIR_ERR_CHKANDJUMP1(err, mpi_errno, MPI_ERR_OTHER, "**cond_create", "**cond_create %s", strerror(err));
     
-    MPIU_Thread_mutex_create(&progress_mutex, &err);
+    MPID_Thread_mutex_create(&progress_mutex, &err);
     MPIR_ERR_CHKANDJUMP1(err, mpi_errno, MPI_ERR_OTHER, "**mutex_create", "**mutex_create %s", strerror(err));
     
-    MPIU_Thread_create((MPIU_Thread_func_t) progress_fn, NULL, &progress_thread_id, &err);
+    MPID_Thread_create((MPID_Thread_func_t) progress_fn, NULL, &progress_thread_id, &err);
     MPIR_ERR_CHKANDJUMP1(err, mpi_errno, MPI_ERR_OTHER, "**mutex_create", "**mutex_create %s", strerror(err));
     
     MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_INIT_ASYNC_THREAD);
@@ -137,15 +137,15 @@ int MPIR_Finalize_async_thread(void)
     /* XXX DJG why is this unlock/lock necessary?  Should we just YIELD here or later?  */
     MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
 
-    MPIU_Thread_mutex_lock(&progress_mutex, &mpi_errno);
+    MPID_Thread_mutex_lock(&progress_mutex, &mpi_errno);
     MPIU_Assert(!mpi_errno);
 
     while (!progress_thread_done) {
-        MPIU_Thread_cond_wait(&progress_cond, &progress_mutex, &mpi_errno);
+        MPID_Thread_cond_wait(&progress_cond, &progress_mutex, &mpi_errno);
         MPIU_Assert(!mpi_errno);
     }
 
-    MPIU_Thread_mutex_unlock(&progress_mutex, &mpi_errno);
+    MPID_Thread_mutex_unlock(&progress_mutex, &mpi_errno);
     MPIU_Assert(!mpi_errno);
 
     mpi_errno = MPIR_Comm_free_impl(progress_comm_ptr);
@@ -153,10 +153,10 @@ int MPIR_Finalize_async_thread(void)
 
     MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
 
-    MPIU_Thread_cond_destroy(&progress_cond, &mpi_errno);
+    MPID_Thread_cond_destroy(&progress_cond, &mpi_errno);
     MPIU_Assert(!mpi_errno);
 
-    MPIU_Thread_mutex_destroy(&progress_mutex, &mpi_errno);
+    MPID_Thread_mutex_destroy(&progress_mutex, &mpi_errno);
     MPIU_Assert(!mpi_errno);
 
     MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_FINALIZE_ASYNC_THREAD);

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

commit f861b31224ffa1f75625ab46d55edc494d328689
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 19 03:10:05 2015 -0500

    Remove unused declarations of thread private variables.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/binding/fortran/use_mpi/create_f90_complex.c b/src/binding/fortran/use_mpi/create_f90_complex.c
index 842ec69..cb485b7 100644
--- a/src/binding/fortran/use_mpi/create_f90_complex.c
+++ b/src/binding/fortran/use_mpi/create_f90_complex.c
@@ -75,7 +75,6 @@ int MPI_Type_create_f90_complex( int precision, int range, MPI_Datatype *newtype
     static realModel f90_real_model[2] = { 
 	{ MPIR_F90_REAL_MODEL, MPI_COMPLEX},
 	{ MPIR_F90_DOUBLE_MODEL, MPI_DOUBLE_COMPLEX } };
-    MPID_THREADPRIV_DECL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_CREATE_F90_COMPLEX);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/binding/fortran/use_mpi/create_f90_int.c b/src/binding/fortran/use_mpi/create_f90_int.c
index b827937..24484df 100644
--- a/src/binding/fortran/use_mpi/create_f90_int.c
+++ b/src/binding/fortran/use_mpi/create_f90_int.c
@@ -69,7 +69,6 @@ int MPI_Type_create_f90_integer( int range, MPI_Datatype *newtype )
     MPI_Datatype basetype = MPI_DATATYPE_NULL;
     static intModel f90_integer_map[] = { MPIR_F90_INTEGER_MODEL_MAP
 					  {0, 0, 0 } };
-    MPID_THREADPRIV_DECL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_CREATE_F90_INTEGER);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/binding/fortran/use_mpi/create_f90_real.c b/src/binding/fortran/use_mpi/create_f90_real.c
index 33ded68..1b1282a 100644
--- a/src/binding/fortran/use_mpi/create_f90_real.c
+++ b/src/binding/fortran/use_mpi/create_f90_real.c
@@ -74,7 +74,6 @@ int MPI_Type_create_f90_real( int precision, int range, MPI_Datatype *newtype )
     static realModel f90_real_model[2] = { 
 	{ MPIR_F90_REAL_MODEL, MPI_REAL},
 	{ MPIR_F90_DOUBLE_MODEL, MPI_DOUBLE_PRECISION } };
-    MPID_THREADPRIV_DECL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_CREATE_F90_REAL);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();

http://git.mpich.org/mpich.git/commitdiff/377a8d4f9549cae4d9b4ee5dcf9dcc6c289f4f9d

commit 377a8d4f9549cae4d9b4ee5dcf9dcc6c289f4f9d
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 19 02:26:36 2015 -0500

    Remove unused datatype.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/thread/mpiu_thread_solaris.h b/src/util/thread/mpiu_thread_solaris.h
index 835d3f1..e723c91 100644
--- a/src/util/thread/mpiu_thread_solaris.h
+++ b/src/util/thread/mpiu_thread_solaris.h
@@ -13,7 +13,6 @@
 typedef mutex_t MPIU_Thread_mutex_t;
 typedef cond_t MPIU_Thread_cond_t;
 typedef thread_t MPIU_Thread_id_t;
-typedef thread_key_t MPIU_Thread_key_t;
 
 typedef void (*MPIU_Thread_func_t) (void *data);
 void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t * id, int *err);

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

commit ccc85ec603b52e1779cddc45c9b74eebbfa95dc2
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 19 02:24:23 2015 -0500

    Expose MPIU_THREADPRIV macros through MPID.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/binding/fortran/use_mpi/create_f90_complex.c b/src/binding/fortran/use_mpi/create_f90_complex.c
index 7368276..842ec69 100644
--- a/src/binding/fortran/use_mpi/create_f90_complex.c
+++ b/src/binding/fortran/use_mpi/create_f90_complex.c
@@ -75,7 +75,7 @@ int MPI_Type_create_f90_complex( int precision, int range, MPI_Datatype *newtype
     static realModel f90_real_model[2] = { 
 	{ MPIR_F90_REAL_MODEL, MPI_COMPLEX},
 	{ MPIR_F90_DOUBLE_MODEL, MPI_DOUBLE_COMPLEX } };
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_CREATE_F90_COMPLEX);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/binding/fortran/use_mpi/create_f90_int.c b/src/binding/fortran/use_mpi/create_f90_int.c
index db705a2..b827937 100644
--- a/src/binding/fortran/use_mpi/create_f90_int.c
+++ b/src/binding/fortran/use_mpi/create_f90_int.c
@@ -69,7 +69,7 @@ int MPI_Type_create_f90_integer( int range, MPI_Datatype *newtype )
     MPI_Datatype basetype = MPI_DATATYPE_NULL;
     static intModel f90_integer_map[] = { MPIR_F90_INTEGER_MODEL_MAP
 					  {0, 0, 0 } };
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_CREATE_F90_INTEGER);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/binding/fortran/use_mpi/create_f90_real.c b/src/binding/fortran/use_mpi/create_f90_real.c
index 77f6d42..33ded68 100644
--- a/src/binding/fortran/use_mpi/create_f90_real.c
+++ b/src/binding/fortran/use_mpi/create_f90_real.c
@@ -74,7 +74,7 @@ int MPI_Type_create_f90_real( int precision, int range, MPI_Datatype *newtype )
     static realModel f90_real_model[2] = { 
 	{ MPIR_F90_REAL_MODEL, MPI_REAL},
 	{ MPIR_F90_DOUBLE_MODEL, MPI_DOUBLE_PRECISION } };
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_CREATE_F90_REAL);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/coll/exscan.c b/src/mpi/coll/exscan.c
index a57bd42..a17e54b 100644
--- a/src/mpi/coll/exscan.c
+++ b/src/mpi/coll/exscan.c
@@ -102,17 +102,17 @@ int MPIR_Exscan (
     void *partial_scan, *tmp_buf;
     MPID_Op *op_ptr;
     MPIU_CHKLMEM_DECL(2);
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     
     if (count == 0) return MPI_SUCCESS;
 
-    MPIU_THREADPRIV_GET;
+    MPID_THREADPRIV_GET;
 
     comm_size = comm_ptr->local_size;
     rank = comm_ptr->rank;
     
     /* set op_errno to 0. stored in perthread structure */
-    MPIU_THREADPRIV_FIELD(op_errno) = 0;
+    MPID_THREADPRIV_FIELD(op_errno) = 0;
 
     if (HANDLE_GET_KIND(op) == HANDLE_KIND_BUILTIN) {
         is_commutative = 1;
@@ -215,8 +215,8 @@ int MPIR_Exscan (
     /* check if multiple threads are calling this collective function */
     MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
 
-    if (MPIU_THREADPRIV_FIELD(op_errno)) 
-	mpi_errno = MPIU_THREADPRIV_FIELD(op_errno);
+    if (MPID_THREADPRIV_FIELD(op_errno)) 
+	mpi_errno = MPID_THREADPRIV_FIELD(op_errno);
 
 fn_exit:
     MPIU_CHKLMEM_FREEALL();
diff --git a/src/mpi/coll/ireduce.c b/src/mpi/coll/ireduce.c
index 805f4e5..262312e 100644
--- a/src/mpi/coll/ireduce.c
+++ b/src/mpi/coll/ireduce.c
@@ -41,7 +41,7 @@ int MPIR_Ireduce_binomial(const void *sendbuf, void *recvbuf, int count, MPI_Dat
     MPI_Aint true_lb, true_extent, extent;
     void *tmp_buf;
     MPIR_SCHED_CHKPMEM_DECL(2);
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
     MPIU_Assert(comm_ptr->comm_kind == MPID_INTRACOMM);
 
@@ -51,8 +51,8 @@ int MPIR_Ireduce_binomial(const void *sendbuf, void *recvbuf, int count, MPI_Dat
     rank = comm_ptr->rank;
 
     /* set op_errno to 0. stored in perthread structure */
-    MPIU_THREADPRIV_GET;
-    MPIU_THREADPRIV_FIELD(op_errno) = 0;
+    MPID_THREADPRIV_GET;
+    MPID_THREADPRIV_FIELD(op_errno) = 0;
 
     /* Create a temporary buffer */
 
diff --git a/src/mpi/coll/opband.c b/src/mpi/coll/opband.c
index 4cd501b..210dba7 100644
--- a/src/mpi/coll/opband.c
+++ b/src/mpi/coll/opband.c
@@ -42,9 +42,9 @@ void MPIR_BAND (
 #undef MPIR_OP_TYPE_MACRO
         /* --BEGIN ERROR HANDLING-- */
         default: {
-            MPIU_THREADPRIV_DECL;
-            MPIU_THREADPRIV_GET;
-            MPIU_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_BAND" );
+            MPID_THREADPRIV_DECL;
+            MPID_THREADPRIV_GET;
+            MPID_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_BAND" );
             break;
         }
         /* --END ERROR HANDLING-- */
diff --git a/src/mpi/coll/opbor.c b/src/mpi/coll/opbor.c
index c15dc5c..57e0001 100644
--- a/src/mpi/coll/opbor.c
+++ b/src/mpi/coll/opbor.c
@@ -42,9 +42,9 @@ void MPIR_BOR (
 #undef MPIR_OP_TYPE_MACRO
         /* --BEGIN ERROR HANDLING-- */
         default: {
-            MPIU_THREADPRIV_DECL;
-            MPIU_THREADPRIV_GET;
-            MPIU_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_BOR" );
+            MPID_THREADPRIV_DECL;
+            MPID_THREADPRIV_GET;
+            MPID_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_BOR" );
             break;
         }
         /* --END ERROR HANDLING-- */
diff --git a/src/mpi/coll/opbxor.c b/src/mpi/coll/opbxor.c
index 78eb17f..7edb83f 100644
--- a/src/mpi/coll/opbxor.c
+++ b/src/mpi/coll/opbxor.c
@@ -42,9 +42,9 @@ void MPIR_BXOR (
 #undef MPIR_OP_TYPE_MACRO
 	/* --BEGIN ERROR HANDLING-- */
         default: {
-            MPIU_THREADPRIV_DECL;
-            MPIU_THREADPRIV_GET;
-            MPIU_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_BXOR" );
+            MPID_THREADPRIV_DECL;
+            MPID_THREADPRIV_GET;
+            MPID_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_BXOR" );
             break;
         }
 	/* --END ERROR HANDLING-- */
diff --git a/src/mpi/coll/opland.c b/src/mpi/coll/opland.c
index 509de0c..25660af 100644
--- a/src/mpi/coll/opland.c
+++ b/src/mpi/coll/opland.c
@@ -73,9 +73,9 @@ void MPIR_LAND (
 #undef MPIR_OP_TYPE_MACRO
         /* --BEGIN ERROR HANDLING-- */
         default: {
-            MPIU_THREADPRIV_DECL;
-            MPIU_THREADPRIV_GET;
-            MPIU_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_LAND" );
+            MPID_THREADPRIV_DECL;
+            MPID_THREADPRIV_GET;
+            MPID_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_LAND" );
             break;
         }
         /* --END ERROR HANDLING-- */
diff --git a/src/mpi/coll/oplor.c b/src/mpi/coll/oplor.c
index ac1f0a7..c3d48f4 100644
--- a/src/mpi/coll/oplor.c
+++ b/src/mpi/coll/oplor.c
@@ -73,9 +73,9 @@ void MPIR_LOR (
 #undef MPIR_OP_TYPE_MACRO
 	/* --BEGIN ERROR HANDLING-- */
         default: {
-            MPIU_THREADPRIV_DECL;
-            MPIU_THREADPRIV_GET;
-            MPIU_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_LOR" );
+            MPID_THREADPRIV_DECL;
+            MPID_THREADPRIV_GET;
+            MPID_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_LOR" );
             break;
         }
 	/* --END ERROR HANDLING-- */
diff --git a/src/mpi/coll/oplxor.c b/src/mpi/coll/oplxor.c
index 17c6542..0880073 100644
--- a/src/mpi/coll/oplxor.c
+++ b/src/mpi/coll/oplxor.c
@@ -73,9 +73,9 @@ void MPIR_LXOR (
 #undef MPIR_OP_TYPE_MACRO
         /* --BEGIN ERROR HANDLING-- */
         default: {
-            MPIU_THREADPRIV_DECL;
-            MPIU_THREADPRIV_GET;
-            MPIU_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_LXOR" );
+            MPID_THREADPRIV_DECL;
+            MPID_THREADPRIV_GET;
+            MPID_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_LXOR" );
             break;
         }
         /* --END ERROR HANDLING-- */
diff --git a/src/mpi/coll/opmax.c b/src/mpi/coll/opmax.c
index f5795d6..ec72607 100644
--- a/src/mpi/coll/opmax.c
+++ b/src/mpi/coll/opmax.c
@@ -39,9 +39,9 @@ void MPIR_MAXF(
 #undef MPIR_OP_TYPE_MACRO
         /* --BEGIN ERROR HANDLING-- */
         default: {
-            MPIU_THREADPRIV_DECL;
-            MPIU_THREADPRIV_GET;
-            MPIU_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_MAX" );
+            MPID_THREADPRIV_DECL;
+            MPID_THREADPRIV_GET;
+            MPID_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_MAX" );
             break;
         }
         /* --END ERROR HANDLING-- */
diff --git a/src/mpi/coll/opmaxloc.c b/src/mpi/coll/opmaxloc.c
index 3a6949f..52b1f70 100644
--- a/src/mpi/coll/opmaxloc.c
+++ b/src/mpi/coll/opmaxloc.c
@@ -112,10 +112,10 @@ void MPIR_MAXLOC(
 #endif
 	/* --BEGIN ERROR HANDLING-- */
     default: {
-	MPIU_THREADPRIV_DECL;
-	MPIU_THREADPRIV_GET;
+	MPID_THREADPRIV_DECL;
+	MPID_THREADPRIV_GET;
         MPIR_ERR_SET1(mpi_errno, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_MAXLOC" );
-        MPIU_THREADPRIV_FIELD(op_errno) = mpi_errno;
+        MPID_THREADPRIV_FIELD(op_errno) = mpi_errno;
         break;
     }
 	/* --END ERROR HANDLING-- */
diff --git a/src/mpi/coll/opmin.c b/src/mpi/coll/opmin.c
index d73929d..7634f07 100644
--- a/src/mpi/coll/opmin.c
+++ b/src/mpi/coll/opmin.c
@@ -38,9 +38,9 @@ void MPIR_MINF (
 #undef MPIR_OP_TYPE_MACRO
         /* --BEGIN ERROR HANDLING-- */
         default: {
-            MPIU_THREADPRIV_DECL;
-            MPIU_THREADPRIV_GET;
-            MPIU_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_MIN" );
+            MPID_THREADPRIV_DECL;
+            MPID_THREADPRIV_GET;
+            MPID_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_MIN" );
             break;
         }
         /* --END ERROR HANDLING-- */
diff --git a/src/mpi/coll/opminloc.c b/src/mpi/coll/opminloc.c
index 46aebdf..1c934e9 100644
--- a/src/mpi/coll/opminloc.c
+++ b/src/mpi/coll/opminloc.c
@@ -111,10 +111,10 @@ void MPIR_MINLOC(
 #endif
 	/* --BEGIN ERROR HANDLING-- */
     default: {
-	MPIU_THREADPRIV_DECL;
-	MPIU_THREADPRIV_GET;
+	MPID_THREADPRIV_DECL;
+	MPID_THREADPRIV_GET;
         MPIR_ERR_SET1(mpi_errno, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_MINLOC" );
-        MPIU_THREADPRIV_FIELD(op_errno) = mpi_errno;
+        MPID_THREADPRIV_FIELD(op_errno) = mpi_errno;
         break;
     }
 	/* --END ERROR HANDLING-- */
diff --git a/src/mpi/coll/opprod.c b/src/mpi/coll/opprod.c
index 277b235..38b363f 100644
--- a/src/mpi/coll/opprod.c
+++ b/src/mpi/coll/opprod.c
@@ -62,9 +62,9 @@ void MPIR_PROD (
 #define MPIR_OP_C_COMPLEX_TYPE_MACRO(mpi_type_,c_type_,type_name_) MPIR_OP_TYPE_MACRO(mpi_type_,c_type_,type_name_)
         /* --BEGIN ERROR HANDLING-- */
         default: {
-            MPIU_THREADPRIV_DECL;
-            MPIU_THREADPRIV_GET;
-            MPIU_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_PROD" );
+            MPID_THREADPRIV_DECL;
+            MPID_THREADPRIV_GET;
+            MPID_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_PROD" );
             break;
         }
         /* --END ERROR HANDLING-- */
diff --git a/src/mpi/coll/opsum.c b/src/mpi/coll/opsum.c
index b256c91..c500da7 100644
--- a/src/mpi/coll/opsum.c
+++ b/src/mpi/coll/opsum.c
@@ -61,9 +61,9 @@ void MPIR_SUM (
 #define MPIR_OP_C_COMPLEX_TYPE_MACRO(mpi_type_,c_type_,type_name_) MPIR_OP_TYPE_MACRO(mpi_type_,c_type_,type_name_)
         /* --BEGIN ERROR HANDLING-- */
         default: {
-            MPIU_THREADPRIV_DECL;
-            MPIU_THREADPRIV_GET;
-            MPIU_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_SUM" );
+            MPID_THREADPRIV_DECL;
+            MPID_THREADPRIV_GET;
+            MPID_THREADPRIV_FIELD(op_errno) = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opundefined","**opundefined %s", "MPI_SUM" );
             break;
         }
         /* --END ERROR HANDLING-- */
diff --git a/src/mpi/coll/red_scat.c b/src/mpi/coll/red_scat.c
index 2d92ff6..bf5d6c1 100644
--- a/src/mpi/coll/red_scat.c
+++ b/src/mpi/coll/red_scat.c
@@ -256,15 +256,15 @@ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recv
     MPI_Datatype sendtype, recvtype;
     int nprocs_completed, tmp_mask, tree_root, is_commutative;
     MPID_Op *op_ptr;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPIU_CHKLMEM_DECL(5);
 
     comm_size = comm_ptr->local_size;
     rank = comm_ptr->rank;
 
     /* set op_errno to 0. stored in perthread structure */
-    MPIU_THREADPRIV_GET;
-    MPIU_THREADPRIV_FIELD(op_errno) = 0;
+    MPID_THREADPRIV_GET;
+    MPID_THREADPRIV_FIELD(op_errno) = 0;
 
     MPID_Datatype_get_extent_macro(datatype, extent);
     MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent);
@@ -873,8 +873,8 @@ fn_exit:
     /* check if multiple threads are calling this collective function */
     MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
 
-    if (MPIU_THREADPRIV_FIELD(op_errno)) 
-	mpi_errno = MPIU_THREADPRIV_FIELD(op_errno);
+    if (MPID_THREADPRIV_FIELD(op_errno)) 
+	mpi_errno = MPID_THREADPRIV_FIELD(op_errno);
 
     if (mpi_errno_ret)
         mpi_errno = mpi_errno_ret;
diff --git a/src/mpi/coll/red_scat_block.c b/src/mpi/coll/red_scat_block.c
index 8436582..a937c38 100644
--- a/src/mpi/coll/red_scat_block.c
+++ b/src/mpi/coll/red_scat_block.c
@@ -256,15 +256,15 @@ int MPIR_Reduce_scatter_block_intra (
     MPI_Datatype sendtype, recvtype;
     int nprocs_completed, tmp_mask, tree_root, is_commutative;
     MPID_Op *op_ptr;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPIU_CHKLMEM_DECL(5);
 
     comm_size = comm_ptr->local_size;
     rank = comm_ptr->rank;
 
     /* set op_errno to 0. stored in perthread structure */
-    MPIU_THREADPRIV_GET;
-    MPIU_THREADPRIV_FIELD(op_errno) = 0;
+    MPID_THREADPRIV_GET;
+    MPID_THREADPRIV_FIELD(op_errno) = 0;
 
     if (recvcount == 0) {
         goto fn_exit;
@@ -844,8 +844,8 @@ fn_exit:
     /* check if multiple threads are calling this collective function */
     MPIDU_ERR_CHECK_MULTIPLE_THREADS_EXIT( comm_ptr );
 
-    if (MPIU_THREADPRIV_FIELD(op_errno)) 
-	mpi_errno = MPIU_THREADPRIV_FIELD(op_errno);
+    if (MPID_THREADPRIV_FIELD(op_errno)) 
+	mpi_errno = MPID_THREADPRIV_FIELD(op_errno);
 
     /* --BEGIN ERROR HANDLING-- */
     if (mpi_errno_ret)
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index 0c9b6f7..aaeffa3 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -302,14 +302,14 @@ static int MPIR_Reduce_redscat_gather (
     void *tmp_buf;
 
     MPIU_CHKLMEM_DECL(4);
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
     comm_size = comm_ptr->local_size;
     rank = comm_ptr->rank;
 
     /* set op_errno to 0. stored in perthread structure */
-    MPIU_THREADPRIV_GET;
-    MPIU_THREADPRIV_FIELD(op_errno) = 0;
+    MPID_THREADPRIV_GET;
+    MPID_THREADPRIV_FIELD(op_errno) = 0;
 
     /* Create a temporary buffer */
 
@@ -634,8 +634,8 @@ static int MPIR_Reduce_redscat_gather (
     /* FIXME does this need to be checked after each uop invocation for
        predefined operators? */
     /* --BEGIN ERROR HANDLING-- */
-    if (MPIU_THREADPRIV_FIELD(op_errno)) {
-        mpi_errno = MPIU_THREADPRIV_FIELD(op_errno);
+    if (MPID_THREADPRIV_FIELD(op_errno)) {
+        mpi_errno = MPID_THREADPRIV_FIELD(op_errno);
         goto fn_fail;
     }
     /* --END ERROR HANDLING-- */
diff --git a/src/mpi/coll/reduce_local.c b/src/mpi/coll/reduce_local.c
index eb77d0b..b171b39 100644
--- a/src/mpi/coll/reduce_local.c
+++ b/src/mpi/coll/reduce_local.c
@@ -44,12 +44,12 @@ int MPIR_Reduce_local_impl(const void *inbuf, void *inoutbuf, int count, MPI_Dat
 #if defined(HAVE_FORTRAN_BINDING) && !defined(HAVE_FINT_IS_INT)
     int is_f77_uop = 0;
 #endif
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
     if (count == 0) goto fn_exit;
 
-    MPIU_THREADPRIV_GET;
-    MPIU_THREADPRIV_FIELD(op_errno) = MPI_SUCCESS;
+    MPID_THREADPRIV_GET;
+    MPID_THREADPRIV_FIELD(op_errno) = MPI_SUCCESS;
 
     if (HANDLE_GET_KIND(op) == HANDLE_KIND_BUILTIN) {
         /* get the function by indexing into the op table */
@@ -103,8 +103,8 @@ int MPIR_Reduce_local_impl(const void *inbuf, void *inoutbuf, int count, MPI_Dat
     }
 
     /* --BEGIN ERROR HANDLING-- */
-    if (MPIU_THREADPRIV_FIELD(op_errno))
-        mpi_errno = MPIU_THREADPRIV_FIELD(op_errno);
+    if (MPID_THREADPRIV_FIELD(op_errno))
+        mpi_errno = MPID_THREADPRIV_FIELD(op_errno);
     /* --END ERROR HANDLING-- */
 
 fn_exit:
diff --git a/src/mpi/coll/scan.c b/src/mpi/coll/scan.c
index 9a1fad4..cd5366b 100644
--- a/src/mpi/coll/scan.c
+++ b/src/mpi/coll/scan.c
@@ -86,7 +86,7 @@ static int MPIR_Scan_generic (
     MPI_Aint true_extent, true_lb, extent;
     void *partial_scan, *tmp_buf;
     MPID_Op *op_ptr;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPIU_CHKLMEM_DECL(2);
     
     if (count == 0) return MPI_SUCCESS;
@@ -97,9 +97,9 @@ static int MPIR_Scan_generic (
     comm_size = comm_ptr->local_size;
     rank = comm_ptr->rank;
 
-    MPIU_THREADPRIV_GET;
+    MPID_THREADPRIV_GET;
     /* set op_errno to 0. stored in perthread structure */
-    MPIU_THREADPRIV_FIELD(op_errno) = 0;
+    MPID_THREADPRIV_FIELD(op_errno) = 0;
 
     if (HANDLE_GET_KIND(op) == HANDLE_KIND_BUILTIN) {
         is_commutative = 1;
@@ -192,8 +192,8 @@ static int MPIR_Scan_generic (
         mask <<= 1;
     }
     
-    if (MPIU_THREADPRIV_FIELD(op_errno)) {
-	mpi_errno = MPIU_THREADPRIV_FIELD(op_errno);
+    if (MPID_THREADPRIV_FIELD(op_errno)) {
+	mpi_errno = MPID_THREADPRIV_FIELD(op_errno);
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     }
     
@@ -233,7 +233,7 @@ int MPIR_Scan(
     int mpi_errno = MPI_SUCCESS;
     int mpi_errno_ret = MPI_SUCCESS;
     MPIU_CHKLMEM_DECL(3);
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     int rank = comm_ptr->rank;
     MPI_Status status;
     void *tempbuf = NULL, *localfulldata = NULL, *prefulldata = NULL;
@@ -251,7 +251,7 @@ int MPIR_Scan(
         return MPIR_Scan_generic(sendbuf, recvbuf, count, datatype, op, comm_ptr, errflag);
     }
     
-    MPIU_THREADPRIV_GET;
+    MPID_THREADPRIV_GET;
     MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent);
 
     MPID_Datatype_get_extent_macro(datatype, extent);
diff --git a/src/mpi/comm/intercomm_merge.c b/src/mpi/comm/intercomm_merge.c
index ac0d4d5..3fe11c2 100644
--- a/src/mpi/comm/intercomm_merge.c
+++ b/src/mpi/comm/intercomm_merge.c
@@ -255,7 +255,7 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm)
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
     MPID_Comm *new_intracomm_ptr;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_INTERCOMM_MERGE);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -263,7 +263,7 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm)
     MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);  
     MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INTERCOMM_MERGE);
 
-    MPIU_THREADPRIV_GET;
+    MPID_THREADPRIV_GET;
     
     /* Validate parameters, especially handles needing to be converted */
 #   ifdef HAVE_ERROR_CHECKING
diff --git a/src/mpi/datatype/register_datarep.c b/src/mpi/datatype/register_datarep.c
index e12dfe5..c445927 100644
--- a/src/mpi/datatype/register_datarep.c
+++ b/src/mpi/datatype/register_datarep.c
@@ -55,7 +55,7 @@ int MPI_Register_datarep(char *datarep,
 {
     static const char FCNAME[] = "MPI_Register_datarep";
     int mpi_errno = MPI_SUCCESS;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_REGISTER_DATAREP);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
diff --git a/src/mpi/datatype/type_match_size.c b/src/mpi/datatype/type_match_size.c
index 1689c99..7e7e735 100644
--- a/src/mpi/datatype/type_match_size.c
+++ b/src/mpi/datatype/type_match_size.c
@@ -83,7 +83,7 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype)
     MPI_Datatype matched_datatype = MPI_DATATYPE_NULL;
     int i;
     MPI_Aint tsize;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_MATCH_SIZE);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
@@ -92,7 +92,7 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype)
     MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
     MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_MATCH_SIZE);
 
-    MPIU_THREADPRIV_GET;
+    MPID_THREADPRIV_GET;
     
     /* Validate parameters and objects (post conversion) */
 #   ifdef HAVE_ERROR_CHECKING
diff --git a/src/mpi/errhan/file_call_errhandler.c b/src/mpi/errhan/file_call_errhandler.c
index 3b86c7c..8a120a3 100644
--- a/src/mpi/errhan/file_call_errhandler.c
+++ b/src/mpi/errhan/file_call_errhandler.c
@@ -57,14 +57,14 @@ int MPI_File_call_errhandler(MPI_File fh, int errorcode)
     MPID_Errhandler *e;
     MPI_Errhandler eh;
 #endif
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_FILE_CALL_ERRHANDLER);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
     
     MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_FILE_CALL_ERRHANDLER);
 
-    MPIU_THREADPRIV_GET;
+    MPID_THREADPRIV_GET;
 
 #ifdef MPI_MODE_RDONLY
     /* Validate parameters, especially handles needing to be converted */
diff --git a/src/mpi/errhan/win_call_errhandler.c b/src/mpi/errhan/win_call_errhandler.c
index 5d4b92f..03395ce 100644
--- a/src/mpi/errhan/win_call_errhandler.c
+++ b/src/mpi/errhan/win_call_errhandler.c
@@ -57,14 +57,14 @@ int MPI_Win_call_errhandler(MPI_Win win, int errorcode)
     int mpi_errno = MPI_SUCCESS;
     MPID_Win *win_ptr = NULL;
     int in_cs = FALSE;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_WIN_CALL_ERRHANDLER);
 
     MPIR_ERRTEST_INITIALIZED_ORDIE();
     
     MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_CALL_ERRHANDLER);
 
-    MPIU_THREADPRIV_GET;
+    MPID_THREADPRIV_GET;
     
     /* Validate parameters, especially handles needing to be converted */
 #   ifdef HAVE_ERROR_CHECKING
diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index 21cd6b0..0e1e45a 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -166,7 +166,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
 static int thread_cs_init( void )
 {
     int err;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
 #if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL
 /* There is a single, global lock, held for the duration of an MPI call */
@@ -202,8 +202,8 @@ static int thread_cs_init( void )
 #error Unrecognized thread granularity
 #endif
 
-    MPIU_THREADPRIV_INITKEY;
-    MPIU_THREADPRIV_INIT;
+    MPID_THREADPRIV_INITKEY;
+    MPID_THREADPRIV_INIT;
 
     MPIU_DBG_MSG(THREAD,TYPICAL,"Created global mutex and private storage");
     return MPI_SUCCESS;
@@ -252,7 +252,7 @@ int MPIR_Thread_CS_Finalize( void )
 #error Unrecognized thread granularity
 #endif
 
-    MPIU_THREADPRIV_FINALIZE;
+    MPID_THREADPRIV_FINALIZE;
 
     return MPI_SUCCESS;
 }
diff --git a/src/mpi/romio/adio/include/adioi.h b/src/mpi/romio/adio/include/adioi.h
index 4ac7d81..63190fb 100644
--- a/src/mpi/romio/adio/include/adioi.h
+++ b/src/mpi/romio/adio/include/adioi.h
@@ -1035,7 +1035,7 @@ int  ADIOI_MPE_iwrite_b;
   #define ADIOI_ENSURE_AINT_FITS_IN_PTR(aint_value) 
   #define ADIOI_Assert assert
   #define MPIU_Upint unsigned long
-  #define MPIU_THREADPRIV_DECL
+  #define MPID_THREADPRIV_DECL
 #endif
 
 #ifdef USE_DBG_LOGGING    /*todo fix dependency on mpich?*/
diff --git a/src/mpi/romio/mpi-io/get_errh.c b/src/mpi/romio/mpi-io/get_errh.c
index 0f46ab5..e51c851 100644
--- a/src/mpi/romio/mpi-io/get_errh.c
+++ b/src/mpi/romio/mpi-io/get_errh.c
@@ -42,7 +42,7 @@ int MPI_File_get_errhandler(MPI_File mpi_fh, MPI_Errhandler *errhandler)
     int error_code = MPI_SUCCESS;
     ADIO_File fh;
     static char myname[] = "MPI_FILE_GET_ERRHANDLER";
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
     if (mpi_fh == MPI_FILE_NULL) {
 	*errhandler = ADIOI_DFLT_ERR_HANDLER;
diff --git a/src/mpi/romio/mpi-io/ioreq_c2f.c b/src/mpi/romio/mpi-io/ioreq_c2f.c
index 37f129e..1aaf002 100644
--- a/src/mpi/romio/mpi-io/ioreq_c2f.c
+++ b/src/mpi/romio/mpi-io/ioreq_c2f.c
@@ -47,7 +47,7 @@ MPI_Fint MPIO_Request_c2f(MPIO_Request request)
     return (MPI_Fint) request;
 #else
     int i;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
     /* We can make this test outside of the GLOBAL mutex because it does
        not access any shared data */
diff --git a/src/mpi/romio/mpi-io/ioreq_f2c.c b/src/mpi/romio/mpi-io/ioreq_f2c.c
index 1a4b628..4b47cda 100644
--- a/src/mpi/romio/mpi-io/ioreq_f2c.c
+++ b/src/mpi/romio/mpi-io/ioreq_f2c.c
@@ -43,7 +43,7 @@ MPIO_Request MPIO_Request_f2c(MPI_Fint request)
 {
     int error_code;
     static char myname[] = "MPIO_REQUEST_F2C";
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
 #ifndef INT_LT_POINTER
     return (MPIO_Request) request;
diff --git a/src/mpi/romio/mpi-io/iotest.c b/src/mpi/romio/mpi-io/iotest.c
index 708638a..89d2412 100644
--- a/src/mpi/romio/mpi-io/iotest.c
+++ b/src/mpi/romio/mpi-io/iotest.c
@@ -47,7 +47,7 @@ int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status)
 {
     int error_code;
     static char myname[] = "MPIO_TEST";
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 #ifdef MPI_hpux
     int fl_xmpi;
 
diff --git a/src/mpi/romio/mpi-io/iotestall.c b/src/mpi/romio/mpi-io/iotestall.c
index a5bacb2..bde51c9 100644
--- a/src/mpi/romio/mpi-io/iotestall.c
+++ b/src/mpi/romio/mpi-io/iotestall.c
@@ -32,7 +32,7 @@ int MPIO_Testall(int count, MPIO_Request requests[], int *flag,
 		 MPI_Status statuses[])
 {
     int done, i, err; 
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
     if (count == 1)  {
 	    err = MPIO_Test( requests, flag, statuses );
diff --git a/src/mpi/romio/mpi-io/iotestany.c b/src/mpi/romio/mpi-io/iotestany.c
index 3586a7b..eaf4844 100644
--- a/src/mpi/romio/mpi-io/iotestany.c
+++ b/src/mpi/romio/mpi-io/iotestany.c
@@ -32,7 +32,7 @@ int MPIO_Testany(int count, MPIO_Request requests[], int *index,
 		 int *flag, MPI_Status *status)
 {
     int i, err; 
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
     if (count == 1) {
 	err = MPIO_Test( requests, flag, status );
diff --git a/src/mpi/romio/mpi-io/iotestsome.c b/src/mpi/romio/mpi-io/iotestsome.c
index 4288d1b..01276d2 100644
--- a/src/mpi/romio/mpi-io/iotestsome.c
+++ b/src/mpi/romio/mpi-io/iotestsome.c
@@ -33,7 +33,7 @@ int MPIO_Testsome(int count, MPIO_Request requests[], int *outcount,
 {
     int i, err; 
     int flag;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
     if (count == 1) {
 	err = MPIO_Test( requests, &flag, statuses );
diff --git a/src/mpi/romio/mpi-io/iowait.c b/src/mpi/romio/mpi-io/iowait.c
index 4c2ad20..e1cdda6 100644
--- a/src/mpi/romio/mpi-io/iowait.c
+++ b/src/mpi/romio/mpi-io/iowait.c
@@ -46,7 +46,7 @@ int MPIO_Wait(MPIO_Request *request, MPI_Status *status)
 {
     int error_code;
     static char myname[] = "MPIO_WAIT";
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
 #ifdef MPI_hpux
     int fl_xmpi;
diff --git a/src/mpi/romio/mpi-io/iowaitall.c b/src/mpi/romio/mpi-io/iowaitall.c
index aeb10ed..7e6ddf6 100644
--- a/src/mpi/romio/mpi-io/iowaitall.c
+++ b/src/mpi/romio/mpi-io/iowaitall.c
@@ -31,7 +31,7 @@
 int MPIO_Waitall( int count, MPIO_Request requests[], MPI_Status statuses[] )
 {
     int notdone, i, flag, err; 
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
     if (count == 1)  {
 	    err = MPIO_Wait(requests, statuses);
diff --git a/src/mpi/romio/mpi-io/iowaitany.c b/src/mpi/romio/mpi-io/iowaitany.c
index 402266b..cd53825 100644
--- a/src/mpi/romio/mpi-io/iowaitany.c
+++ b/src/mpi/romio/mpi-io/iowaitany.c
@@ -32,7 +32,7 @@ int MPIO_Waitany(int count, MPIO_Request requests[], int *index,
 		 MPI_Status *status)
 {
     int i, flag, err; 
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
     if (count == 1) {
 	err = MPIO_Wait( requests, status );
diff --git a/src/mpi/romio/mpi-io/iowaitsome.c b/src/mpi/romio/mpi-io/iowaitsome.c
index 05fed29..143384a 100644
--- a/src/mpi/romio/mpi-io/iowaitsome.c
+++ b/src/mpi/romio/mpi-io/iowaitsome.c
@@ -32,7 +32,7 @@ int MPIO_Waitsome(int count, MPIO_Request requests[], int *outcount,
 		  int indices[], MPI_Status *statuses)
 {
     int i, flag, err; 
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
     if (count == 1) {
 	err = MPIO_Wait( requests, statuses );
diff --git a/src/mpi/romio/mpi-io/set_errh.c b/src/mpi/romio/mpi-io/set_errh.c
index b9f4203..046ecf9 100644
--- a/src/mpi/romio/mpi-io/set_errh.c
+++ b/src/mpi/romio/mpi-io/set_errh.c
@@ -40,7 +40,7 @@ int MPI_File_set_errhandler(MPI_File mpi_fh, MPI_Errhandler errhandler)
     int error_code = MPI_SUCCESS;
     static char myname[] = "MPI_FILE_SET_ERRHANDLER";
     ADIO_File fh;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
 
     if (mpi_fh == MPI_FILE_NULL) {
 	ADIOI_DFLT_ERR_HANDLER = errhandler;
diff --git a/src/mpid/ch3/include/mpid_thread.h b/src/mpid/ch3/include/mpid_thread.h
index 1e1be57..82565ae 100644
--- a/src/mpid/ch3/include/mpid_thread.h
+++ b/src/mpid/ch3/include/mpid_thread.h
@@ -57,4 +57,11 @@ typedef MPIDU_Thread_func_t  MPID_Thread_func_t;
 
 #define MPID_OBJ_PUBLISH_HANDLE  MPIDU_OBJ_PUBLISH_HANDLE
 
+#define MPID_THREADPRIV_INITKEY  MPIDU_THREADPRIV_INITKEY
+#define MPID_THREADPRIV_INIT     MPIDU_THREADPRIV_INIT
+#define MPID_THREADPRIV_GET      MPIDU_THREADPRIV_GET
+#define MPID_THREADPRIV_DECL     MPIDU_THREADPRIV_DECL
+#define MPID_THREADPRIV_FIELD    MPIDU_THREADPRIV_FIELD
+#define MPID_THREADPRIV_FINALIZE MPIDU_THREADPRIV_FINALIZE
+
 #endif /* !defined(MPID_THREAD_H_INCLUDED) */
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index cb8aa79..dbea0be 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -255,9 +255,9 @@ extern MPIDI_Process_t MPIDI_Process;
 #  define MPIDI_Request_tls_alloc(req) \
     do { \
         int i;                                                         \
-        MPIU_THREADPRIV_DECL;                                          \
-        MPIU_THREADPRIV_GET;                                           \
-        if (!MPIU_THREADPRIV_FIELD(request_handles)) {                 \
+        MPID_THREADPRIV_DECL;                                          \
+        MPID_THREADPRIV_GET;                                           \
+        if (!MPID_THREADPRIV_FIELD(request_handles)) {                 \
             MPID_Request *prev, *cur;                                  \
             /* batch allocate a linked list of requests */             \
             MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_HANDLE_MUTEX);                        \
@@ -271,12 +271,12 @@ extern MPIDI_Process_t MPIDI_Process;
                 prev = cur;                                            \
             }                                                          \
             MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_HANDLE_MUTEX);                         \
-            MPIU_THREADPRIV_FIELD(request_handles) = cur;              \
-            MPIU_THREADPRIV_FIELD(request_handle_count) += MPID_REQUEST_TLS_MAX;    \
+            MPID_THREADPRIV_FIELD(request_handles) = cur;              \
+            MPID_THREADPRIV_FIELD(request_handle_count) += MPID_REQUEST_TLS_MAX;    \
         }                                                              \
-        (req) = MPIU_THREADPRIV_FIELD(request_handles);                \
-        MPIU_THREADPRIV_FIELD(request_handles) = req->next;            \
-        MPIU_THREADPRIV_FIELD(request_handle_count) -= 1;              \
+        (req) = MPID_THREADPRIV_FIELD(request_handles);                \
+        MPID_THREADPRIV_FIELD(request_handles) = req->next;            \
+        MPID_THREADPRIV_FIELD(request_handle_count) -= 1;              \
     } while (0)
 #elif MPIU_HANDLE_ALLOCATION_METHOD == MPIU_HANDLE_ALLOCATION_MUTEX
 #  define MPIDI_Request_tls_alloc(req_) \
diff --git a/src/mpid/common/thread/mpidu_thread_fallback.h b/src/mpid/common/thread/mpidu_thread_fallback.h
index a7ad4ef..b7e65ca 100644
--- a/src/mpid/common/thread/mpidu_thread_fallback.h
+++ b/src/mpid/common/thread/mpidu_thread_fallback.h
@@ -304,5 +304,12 @@ M*/
 
 #define MPIDU_OBJ_PUBLISH_HANDLE  MPIU_OBJ_PUBLISH_HANDLE
 
+#define MPIDU_THREADPRIV_INITKEY  MPIU_THREADPRIV_INITKEY
+#define MPIDU_THREADPRIV_INIT     MPIU_THREADPRIV_INIT
+#define MPIDU_THREADPRIV_GET      MPIU_THREADPRIV_GET
+#define MPIDU_THREADPRIV_DECL     MPIU_THREADPRIV_DECL
+#define MPIDU_THREADPRIV_FIELD    MPIU_THREADPRIV_FIELD
+#define MPIDU_THREADPRIV_FINALIZE MPIU_THREADPRIV_FINALIZE
+
 
 #endif /* !defined(MPIDU_THREAD_H_INCLUDED) */
diff --git a/src/nameserv/pmi/pmi_nameserv.c b/src/nameserv/pmi/pmi_nameserv.c
index eb71da6..53ef856 100644
--- a/src/nameserv/pmi/pmi_nameserv.c
+++ b/src/nameserv/pmi/pmi_nameserv.c
@@ -45,7 +45,7 @@ int MPID_NS_Publish( MPID_NS_Handle handle, const MPID_Info *info_ptr,
 {
     int mpi_errno = MPI_SUCCESS;
     int rc;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPIU_UNREFERENCED_ARG(info_ptr);
     MPIU_UNREFERENCED_ARG(handle);
 
@@ -72,7 +72,7 @@ int MPID_NS_Lookup( MPID_NS_Handle handle, const MPID_Info *info_ptr,
 {
     int mpi_errno = MPI_SUCCESS;
     int rc;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPIU_UNREFERENCED_ARG(info_ptr);
     MPIU_UNREFERENCED_ARG(handle);
 
@@ -99,7 +99,7 @@ int MPID_NS_Unpublish( MPID_NS_Handle handle, const MPID_Info *info_ptr,
 {
     int mpi_errno = MPI_SUCCESS;
     int rc;
-    MPIU_THREADPRIV_DECL;
+    MPID_THREADPRIV_DECL;
     MPIU_UNREFERENCED_ARG(info_ptr);
     MPIU_UNREFERENCED_ARG(handle);
 
diff --git a/src/util/mem/strerror.c b/src/util/mem/strerror.c
index c7a96cd..243b406 100644
--- a/src/util/mem/strerror.c
+++ b/src/util/mem/strerror.c
@@ -22,9 +22,9 @@ const char *MPIU_Strerror(int errnum)
 {
 #if defined(HAVE_STRERROR_R)
     char *buf;
-    MPIU_THREADPRIV_DECL;
-    MPIU_THREADPRIV_GET;
-    buf = MPIU_THREADPRIV_FIELD(strerrbuf);
+    MPID_THREADPRIV_DECL;
+    MPID_THREADPRIV_GET;
+    buf = MPID_THREADPRIV_FIELD(strerrbuf);
 #  if defined(STRERROR_R_CHAR_P)
     /* strerror_r returns char ptr (old GNU-flavor).  Static strings for known
      * errnums are in returned buf, unknown errnums put a message in buf and

http://git.mpich.org/mpich.git/commitdiff/9bd06e8cea9b042eadb60f1cbfc4a33432dc722b

commit 9bd06e8cea9b042eadb60f1cbfc4a33432dc722b
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 19 02:18:42 2015 -0500

    MPIR_THREAD_GRANULARITY should be MPICH_THREAD_GRANULARITY.
    
    This is generated by configure.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/configure.ac b/configure.ac
index 81026b1..96d56e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1361,20 +1361,20 @@ if test "$MPICH_THREAD_LEVEL" != "MPI_THREAD_SINGLE"; then
 fi
 
 # Check for value thread_cs choice; set the refcount default if necessary
-thread_granularity=MPIR_THREAD_GRANULARITY_SINGLE
+thread_granularity=MPICH_THREAD_GRANULARITY_SINGLE
 thread_refcount=MPIU_REFCOUNT_NONE
 if test "$enable_threads" = "multiple" ; then
     case $enable_thread_cs in 
     global)
-    thread_granularity=MPIR_THREAD_GRANULARITY_GLOBAL
+    thread_granularity=MPICH_THREAD_GRANULARITY_GLOBAL
     if test "$enable_refcount" = "default" ; then enable_refcount=none ; fi
     ;;
     per-object|per_object)
-    thread_granularity=MPIR_THREAD_GRANULARITY_PER_OBJECT
+    thread_granularity=MPICH_THREAD_GRANULARITY_PER_OBJECT
     if test "$enable_refcount" = "default" ; then enable_refcount=lock-free ; fi
     ;;
     lock-free|lock_free|lockfree)
-    thread_granularity=MPIR_THREAD_GRANULARITY_LOCK_FREE
+    thread_granularity=MPICH_THREAD_GRANULARITY_LOCK_FREE
     if test "$enable_refcount" = "default" ; then enable_refcount=lock-free ; fi
     if test "$enable_predefined_refcount" = "default" ; then enable_predefined_refcount=no ; fi
     AC_MSG_ERROR([--enable-thread-cs=lock-free is not supported yet, please select a different granularity])
diff --git a/src/include/mpichconfconst.h b/src/include/mpichconfconst.h
index 946a8de..43370ef 100644
--- a/src/include/mpichconfconst.h
+++ b/src/include/mpichconfconst.h
@@ -29,12 +29,12 @@
  * A configure choice will set MPICH_THREAD_GRANULARITY to one of these values */
 
 /* _INVALID exists to avoid accidental macro evaluations to 0 */
-#define MPIR_THREAD_GRANULARITY_INVALID 0
-#define MPIR_THREAD_GRANULARITY_GLOBAL 1
-#define MPIR_THREAD_GRANULARITY_PER_OBJECT 2
-#define MPIR_THREAD_GRANULARITY_LOCK_FREE 3
+#define MPICH_THREAD_GRANULARITY_INVALID 0
+#define MPICH_THREAD_GRANULARITY_GLOBAL 1
+#define MPICH_THREAD_GRANULARITY_PER_OBJECT 2
+#define MPICH_THREAD_GRANULARITY_LOCK_FREE 3
 /* _SINGLE is the "null" granularity, where all processes are single-threaded */
-#define MPIR_THREAD_GRANULARITY_SINGLE 4
+#define MPICH_THREAD_GRANULARITY_SINGLE 4
 
 /* controls the allocation mechanism for MPID_Request handles, which can greatly
  * affect concurrency on the critical path */
diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index 293edac..21cd6b0 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -168,13 +168,13 @@ static int thread_cs_init( void )
     int err;
     MPIU_THREADPRIV_DECL;
 
-#if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL
+#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL
 /* There is a single, global lock, held for the duration of an MPI call */
     MPID_Thread_mutex_create(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err);
     MPIU_Assert(err == 0);
 
-#elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT
-    /* MPIR_THREAD_GRANULARITY_PER_OBJECT: Multiple locks */
+#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT
+    /* MPICH_THREAD_GRANULARITY_PER_OBJECT: Multiple locks */
     MPID_Thread_mutex_create(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err);
     MPIU_Assert(err == 0);
     MPID_Thread_mutex_create(&MPIR_THREAD_HANDLE_MUTEX, &err);
@@ -190,12 +190,12 @@ static int thread_cs_init( void )
     MPID_Thread_mutex_create(&MPIR_THREAD_MEMALLOC_MUTEX, &err);
     MPIU_Assert(err == 0);
 
-#elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_LOCK_FREE
+#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_LOCK_FREE
 /* Updates to shared data and access to shared services is handled without 
    locks where ever possible. */
 #error lock-free not yet implemented
 
-#elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_SINGLE
+#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_SINGLE
 /* No thread support, make all operations a no-op */
 
 #else
@@ -218,13 +218,13 @@ int MPIR_Thread_CS_Finalize( void )
     int err;
 
     MPIU_DBG_MSG(THREAD,TYPICAL,"Freeing global mutex and private storage");
-#if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL
+#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL
 /* There is a single, global lock, held for the duration of an MPI call */
     MPID_Thread_mutex_destroy(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err);
     MPIU_Assert(err == 0);
 
-#elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT
-    /* MPIR_THREAD_GRANULARITY_PER_OBJECT: There are multiple locks,
+#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT
+    /* MPICH_THREAD_GRANULARITY_PER_OBJECT: There are multiple locks,
      * one for each logical class (e.g., each type of object) */
     MPID_Thread_mutex_destroy(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err);
     MPIU_Assert(err == 0);
@@ -240,12 +240,12 @@ int MPIR_Thread_CS_Finalize( void )
     MPIU_Assert(err == 0);
 
 
-#elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_LOCK_FREE
+#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_LOCK_FREE
 /* Updates to shared data and access to shared services is handled without 
    locks where ever possible. */
 #error lock-free not yet implemented
 
-#elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_SINGLE
+#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_SINGLE
 /* No thread support, make all operations a no-op */
 
 #else
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
index ed75801..245fe61 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
@@ -253,7 +253,7 @@ int MPIDI_CH3I_Shm_send_progress(void)
     {
         /* MT FIXME-N1 race under per-object, harmless to disable here but
          * its a symptom of a bigger problem... */
-#if !(defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT))
+#if !(defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT))
         MPIU_Assert(MPIDI_Request_get_type(sreq) != MPIDI_REQUEST_TYPE_GET_RESP);
 #endif
 
@@ -676,7 +676,7 @@ static int MPIDI_CH3I_Progress_delay(unsigned int completion_count)
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS_DELAY);
     /* FIXME should be appropriately abstracted somehow */
-#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL)
+#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL)
     {
         MPID_Thread_cond_wait(&MPIDI_CH3I_progress_completion_cond, &MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX/*MPIDCOMM*/, &err);
     }
@@ -699,7 +699,7 @@ static int MPIDI_CH3I_Progress_continue(unsigned int completion_count/*unused*/)
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS_CONTINUE);
     /* FIXME should be appropriately abstracted somehow */
-#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL)
+#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL)
     {
         /* we currently hold the MPIDCOMM CS */
         MPID_Thread_cond_broadcast(&MPIDI_CH3I_progress_completion_cond, &err);
@@ -883,7 +883,7 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
                 if (!reqFn)
                 {
                     /* MT FIXME-N1 */
-#if !(defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT))
+#if !(defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT))
                     MPIU_Assert(MPIDI_Request_get_type(rreq) != MPIDI_REQUEST_TYPE_GET_RESP);
 #endif
                     mpi_errno = MPID_Request_complete(rreq);
@@ -949,7 +949,7 @@ int MPIDI_CH3I_Progress_init(void)
 
     MPID_THREAD_CHECK_BEGIN
     /* FIXME should be appropriately abstracted somehow */
-#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL)
+#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL)
     {
         int err;
 	MPID_Thread_cond_create(&MPIDI_CH3I_progress_completion_cond, &err);
@@ -1324,7 +1324,7 @@ void MPIDI_CH3I_Posted_recv_enqueued(MPID_Request *rreq)
          * ways to do this that don't require a hook on every request post, but
          * instead do some sort of caching or something analogous to branch
          * prediction. */
-#if !(defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT))
+#if !(defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT))
         /* enqueue fastbox */
 
         /* don't enqueue a fastbox for yourself */
@@ -1370,7 +1370,7 @@ int MPIDI_CH3I_Posted_recv_dequeued(MPID_Request *rreq)
     /* MT FIXME we unfortunately must disable this optimization for now in
      * per_object mode. There are possibly other ways to synchronize the
      * fboxes that won't cause lock-ordering deadlocks */
-#if !(defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT))
+#if !(defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT))
     else
     {
         if (rreq->dev.match.parts.rank == rreq->comm->rank)
diff --git a/src/mpid/ch3/channels/sock/src/ch3_progress.c b/src/mpid/ch3/channels/sock/src/ch3_progress.c
index d87981c..2ab4eed 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_progress.c
@@ -315,7 +315,7 @@ int MPIDI_CH3I_Progress_init(void)
 
     MPID_THREAD_CHECK_BEGIN
     /* FIXME should be appropriately abstracted somehow */
-#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL)
+#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL)
     {
         int err;
 	MPID_Thread_cond_create(&MPIDI_CH3I_progress_completion_cond, &err);
@@ -399,7 +399,7 @@ int MPIDI_CH3I_Progress_finalize(void)
 
     MPID_THREAD_CHECK_BEGIN
     /* FIXME should be appropriately abstracted somehow */
-#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL)
+#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL)
     {
         int err;
 	MPID_Thread_cond_destroy(&MPIDI_CH3I_progress_completion_cond, &err);
@@ -737,7 +737,7 @@ static int MPIDI_CH3I_Progress_delay(unsigned int completion_count)
     int mpi_errno = MPI_SUCCESS, err;
     
     /* FIXME should be appropriately abstracted somehow */
-#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL)
+#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL)
     {
 	while (completion_count == MPIDI_CH3I_progress_completion_count)
 	{
@@ -762,7 +762,7 @@ static int MPIDI_CH3I_Progress_continue(unsigned int completion_count)
 
     MPID_THREAD_CHECK_BEGIN
     /* FIXME should be appropriately abstracted somehow */
-#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL)
+#   if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL)
     {
         MPID_Thread_cond_broadcast(&MPIDI_CH3I_progress_completion_cond,&err);
     }
diff --git a/src/mpid/ch3/src/mpid_vc.c b/src/mpid/ch3/src/mpid_vc.c
index 9df8ecf..8090a16 100644
--- a/src/mpid/ch3/src/mpid_vc.c
+++ b/src/mpid/ch3/src/mpid_vc.c
@@ -639,7 +639,7 @@ int MPIDI_VC_Init( MPIDI_VC_t *vc, MPIDI_PG_t *pg, int rank )
 #endif
     /* FIXME: We need a better abstraction for initializing the thread state 
        for an object */
-#if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT
+#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT
     {
         int err;
         MPID_Thread_mutex_create(&vc->pobj_mutex,&err);
diff --git a/src/mpid/common/sock/iocp/sock.c b/src/mpid/common/sock/iocp/sock.c
index 0813837..2f3ff2c 100644
--- a/src/mpid/common/sock/iocp/sock.c
+++ b/src/mpid/common/sock/iocp/sock.c
@@ -1780,7 +1780,7 @@ int MPIDU_Sock_wait(MPIDU_Sock_set_t set, int timeout, MPIDU_Sock_event_t * out)
     for (;;) 
     {
 #if defined(MPICH_IS_THREADED)
-#       if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL)
+#       if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL)
 	{
             int err;
 	    /* Release the lock so that other threads may make progress while this thread waits for something to do */
@@ -1805,7 +1805,7 @@ int MPIDU_Sock_wait(MPIDU_Sock_set_t set, int timeout, MPIDU_Sock_event_t * out)
 	    /*printf("[%d] GetQueuedCompletionStatus took %.3f seconds for sock: %d\n", getpid(), t2-t1, sock->sock);*/
 	    MPIDI_FUNC_EXIT(MPID_STATE_GETQUEUEDCOMPLETIONSTATUS);
 #if defined(MPICH_IS_THREADED)
-#           if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL)
+#           if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL)
 	    {
                 int err;
 		/* Reaquire the lock before processing any of the information returned from GetQueuedCompletionStatus */
@@ -2398,7 +2398,7 @@ int MPIDU_Sock_wait(MPIDU_Sock_set_t set, int timeout, MPIDU_Sock_event_t * out)
 	else
 	{
 #if defined(MPICH_IS_THREADED)
-#           if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL)
+#           if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL)
 	    {
                 int err;
 		/* Reaquire the lock before processing any of the information returned from GetQueuedCompletionStatus */
diff --git a/src/mpid/common/sock/poll/sock_wait.i b/src/mpid/common/sock/poll/sock_wait.i
index 4e29681..eb7f6b8 100644
--- a/src/mpid/common/sock/poll/sock_wait.i
+++ b/src/mpid/common/sock/poll/sock_wait.i
@@ -7,7 +7,7 @@
 
 /* Make sure that we can properly ensure atomic access to the poll routine */
 #ifdef MPICH_IS_THREADED
-#if !(MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL)
+#if !(MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL)
 #error selected multi-threaded implementation is not supported
 #endif
 #endif
diff --git a/src/mpid/pamid/include/mpidi_macros.h b/src/mpid/pamid/include/mpidi_macros.h
index a6b6426..24a5722 100644
--- a/src/mpid/pamid/include/mpidi_macros.h
+++ b/src/mpid/pamid/include/mpidi_macros.h
@@ -157,7 +157,7 @@ MPIDI_Context_post(pami_context_t       context,
                    pami_work_function   fn,
                    void               * cookie)
 {
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
   /* It is possible that a work function posted to a context may attempt to
    * initiate a communication operation and, if context post were disabled, that
    * operation would be performed directly on the context BY TAKING A LOCK that
@@ -176,7 +176,7 @@ MPIDI_Context_post(pami_context_t       context,
   pami_result_t rc;
   rc = PAMI_Context_post(context, work, fn, cookie);
   MPID_assert(rc == PAMI_SUCCESS);
-#else /* (MPICH_THREAD_GRANULARITY != MPIR_THREAD_GRANULARITY_PER_OBJECT) */
+#else /* (MPICH_THREAD_GRANULARITY != MPICH_THREAD_GRANULARITY_PER_OBJECT) */
   /*
    * It is not necessary to lock the context before access in the "global"
    * mpich lock mode because all threads, application and async progress,
@@ -186,7 +186,7 @@ MPIDI_Context_post(pami_context_t       context,
 #endif
 }
 
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
 #define MPIDI_Send_post(__func, __req)                          \
 ({                                                              \
   pami_context_t context = MPIDI_Context_local(__req);          \
@@ -207,11 +207,11 @@ MPIDI_Context_post(pami_context_t       context,
       PAMI_Context_unlock(context);                             \
     }                                                           \
 })
-#else /* (MPICH_THREAD_GRANULARITY != MPIR_THREAD_GRANULARITY_PER_OBJECT) */
+#else /* (MPICH_THREAD_GRANULARITY != MPICH_THREAD_GRANULARITY_PER_OBJECT) */
 #define MPIDI_Send_post(__func, __req)                          \
 ({                                                              \
   __func(MPIDI_Context[0], __req);                              \
 })
-#endif /* #if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT) */
+#endif /* #if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT) */
 
 #endif
diff --git a/src/mpid/pamid/include/mpidi_mutex.h b/src/mpid/pamid/include/mpidi_mutex.h
index 752d141..396cdec 100644
--- a/src/mpid/pamid/include/mpidi_mutex.h
+++ b/src/mpid/pamid/include/mpidi_mutex.h
@@ -310,11 +310,11 @@ MPIDI_Mutex_initialize()
   extern int pthread_mutexattr_settype(pthread_mutexattr_t *__attr, int __kind);
 #endif
 #ifndef __PE__
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
    rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
-#else /*(MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)*/
+#else /*(MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)*/
    rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK_NP);
-#endif /*(MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)*/
+#endif /*(MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)*/
 #else /* __PE__ */
 #if !defined(__AIX__)
    rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
diff --git a/src/mpid/pamid/include/mpidi_thread.h b/src/mpid/pamid/include/mpidi_thread.h
index 82d9968..d279f27 100644
--- a/src/mpid/pamid/include/mpidi_thread.h
+++ b/src/mpid/pamid/include/mpidi_thread.h
@@ -67,7 +67,7 @@
 #define MPIU_THREAD_CS_SCHED_YIELD(name,_context) MPIU_THREAD_CS_##name##_SCHED_YIELD(_context)
 #define MPIU_THREAD_CS_TRY(name,_context)   MPIU_THREAD_CS_##name##_TRY(_context)
 
-#if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL
+#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL
 
 #define MPIDI_CS_ENTER(m) ({ if (MPIR_ThreadInfo.isThreaded) {                                             MPIDI_Mutex_acquire(m); } })
 #define MPIDI_CS_EXIT(m)  ({ if (MPIR_ThreadInfo.isThreaded) { MPIDI_Mutex_sync(); MPIDI_Mutex_release(m);                         } })
@@ -105,7 +105,7 @@
 #define MPIU_THREAD_CS_ASYNC_ENTER(_context)        MPIDI_CS_ENTER(8)
 #define MPIU_THREAD_CS_ASYNC_EXIT(_context)         MPIDI_CS_EXIT (8)
 
-#elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT
+#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT
 
 #define MPIDI_CS_ENTER(m)                               \
     do {                                                \
@@ -178,7 +178,7 @@
 #define MPIU_THREAD_CS_ASYNC_ENTER(_context)        MPIDI_CS_ENTER(8)
 #define MPIU_THREAD_CS_ASYNC_EXIT(_context)         MPIDI_CS_EXIT (8)
 
-#endif /* MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL */
+#endif /* MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL */
 
 
 #endif /* !MPICH_MPIDTHREAD_H_INCLUDED */
diff --git a/src/mpid/pamid/src/mpid_init.c b/src/mpid/pamid/src/mpid_init.c
index 8175859..1ea26bb 100644
--- a/src/mpid/pamid/src/mpid_init.c
+++ b/src/mpid/pamid/src/mpid_init.c
@@ -56,7 +56,7 @@ MPIDI_Process_t  MPIDI_Process = {
   .verbose               = 0,
   .statistics            = 0,
 
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
   .avail_contexts        = MPIDI_MAX_CONTEXTS,
   .async_progress = {
     .active              = 0,
@@ -675,7 +675,7 @@ MPIDI_PAMI_context_init(int* threading, int *size)
 #endif
   int  numTasks;
 
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
   /*
    * ASYNC_PROGRESS_MODE_LOCKED requires context post because the async thread
    * will hold the context lock indefinitely; the only option for an application
@@ -694,7 +694,7 @@ MPIDI_PAMI_context_init(int* threading, int *size)
       MPIDI_Process.perobj.context_post.requested == 0)
     MPID_Abort (NULL, 0, 1, "'locking' async progress requires context post");
 
-#else /* MPICH_THREAD_GRANULARITY != MPIR_THREAD_GRANULARITY_PER_OBJECT */
+#else /* MPICH_THREAD_GRANULARITY != MPICH_THREAD_GRANULARITY_PER_OBJECT */
   /*
    * ASYNC_PROGRESS_MODE_LOCKED is not applicable in the "global lock" thread
    * mode. See discussion in src/mpid/pamid/src/mpid_progress.h for more
@@ -709,7 +709,7 @@ MPIDI_PAMI_context_init(int* threading, int *size)
   /* ----------------------------------
    *  Figure out the context situation
    * ---------------------------------- */
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
 
   /* Limit the number of requested contexts by the maximum number of contexts
    * allowed.  The default number of requested contexts depends on the mpich
@@ -744,7 +744,7 @@ MPIDI_PAMI_context_init(int* threading, int *size)
     --MPIDI_Process.avail_contexts;
   MPID_assert_always(MPIDI_Process.avail_contexts);
 
-#else /* (MPICH_THREAD_GRANULARITY != MPIR_THREAD_GRANULARITY_PER_OBJECT) */
+#else /* (MPICH_THREAD_GRANULARITY != MPICH_THREAD_GRANULARITY_PER_OBJECT) */
 
   /* Only a single context is supported in the 'global' mpich lock mode.
    *
@@ -1072,7 +1072,7 @@ MPIDI_PAMI_init(int* rank, int* size, int* threading)
             break;
         }
       printf("MPICH_THREAD_GRANULARITY : '%s'\n",
-             (MPICH_THREAD_GRANULARITY==MPIR_THREAD_GRANULARITY_PER_OBJECT)?"per object":"global");
+             (MPICH_THREAD_GRANULARITY==MPICH_THREAD_GRANULARITY_PER_OBJECT)?"per object":"global");
 #ifdef ASSERT_LEVEL
       printf("ASSERT_LEVEL            : %d\n", ASSERT_LEVEL);
 #else
diff --git a/src/mpid/pamid/src/mpid_progress.c b/src/mpid/pamid/src/mpid_progress.c
index 6f28d76..4a93f95 100644
--- a/src/mpid/pamid/src/mpid_progress.c
+++ b/src/mpid/pamid/src/mpid_progress.c
@@ -159,7 +159,7 @@ MPIDI_Progress_init()
   pamix_progress_function progress_fn = MPIDI_Progress_async_poll;
   uintptr_t i;
 
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
   /* In the "per object" mpich lock mode the only possible progress functions
    * are the "context lock" trigger progress function and the 'NULL' progress
    * function.
@@ -227,7 +227,7 @@ MPIDI_Progress_async_start(pami_context_t context, void *cookie)
    */
   MPIU_THREAD_CS_ENTER(ASYNC,);
 
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
   if (MPIDI_Process.async_progress.active == 0)
     {
       /* Asynchronous progress was completely disabled and now async progress
@@ -260,7 +260,7 @@ MPIDI_Progress_async_end  (pami_context_t context, void *cookie)
 
   MPIDI_Process.async_progress.active -= 1;
 
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
   if (MPIDI_Process.async_progress.active == 0)
     {
       /* Asynchronous progress is now completely disabled on all contexts. */
diff --git a/src/mpid/pamid/src/mpid_progress.h b/src/mpid/pamid/src/mpid_progress.h
index edb454c..aace473 100644
--- a/src/mpid/pamid/src/mpid_progress.h
+++ b/src/mpid/pamid/src/mpid_progress.h
@@ -239,7 +239,7 @@ MPID_Progress_wait_inline(unsigned loop_count)
 {
   pami_result_t rc = 0;
 
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
   /*
    * In the "per object" thread mode the "global" lock is defined as a noop and
    * therefore no locks are held at this point.
diff --git a/src/mpid/pamid/src/mpid_request.c b/src/mpid/pamid/src/mpid_request.c
index f7c1fa9..19d2c6c 100644
--- a/src/mpid/pamid/src/mpid_request.c
+++ b/src/mpid/pamid/src/mpid_request.c
@@ -22,7 +22,7 @@
 #include <mpidimpl.h>
 
 #ifndef MPID_REQUEST_PREALLOC
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL)
 #define  MPID_REQUEST_PREALLOC 16
 #elif (MPIU_HANDLE_ALLOCATION_METHOD == MPIU_HANDLE_ALLOCATION_THREAD_LOCAL)
 #define  MPID_REQUEST_PREALLOC 512  //Have direct more reqyests for all threads
diff --git a/src/mpid/pamid/src/mpidi_env.c b/src/mpid/pamid/src/mpidi_env.c
index ba9c2b7..09d7764 100644
--- a/src/mpid/pamid/src/mpidi_env.c
+++ b/src/mpid/pamid/src/mpidi_env.c
@@ -547,7 +547,7 @@ MPIDI_Env_setup(int rank, int requested)
     unsigned value = (unsigned)-1;
     char* names[] = {"PAMID_THREAD_MULTIPLE", NULL};
     ENV_Unsigned(names, &value, 1, &found_deprecated_env_var, rank);
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
     /* Any mpich work function posted to a context that eventually initiates
      * other communcation transfers will hang on a lock attempt if the
      * 'context post' feature is not enabled. Until this code flow is fixed
@@ -610,7 +610,7 @@ MPIDI_Env_setup(int rank, int requested)
 
     if (value != -1)
     {
-#if (MPICH_THREAD_GRANULARITY != MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY != MPICH_THREAD_GRANULARITY_PER_OBJECT)
       /* The 'global' mpich lock mode only supports a single context.
        * See discussion in mpich/src/mpid/pamid/src/mpid_init.c for more
        * information.
@@ -643,7 +643,7 @@ MPIDI_Env_setup(int rank, int requested)
     ENV_Unsigned(names, &value, 1, &found_deprecated_env_var, rank);
     if (value != -1)
     {
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
       MPIDI_Process.perobj.context_post.requested = (value > 0);
 #else
       found_deprecated_env_var++;
@@ -665,7 +665,7 @@ MPIDI_Env_setup(int rank, int requested)
     {
       if (value != ASYNC_PROGRESS_MODE_DISABLED)
       {
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
         if (value == ASYNC_PROGRESS_MODE_LOCKED &&
             MPIDI_Process.perobj.context_post.requested == 0)
         {
@@ -679,7 +679,7 @@ MPIDI_Env_setup(int rank, int requested)
             fprintf(stderr, "The environment variable \"PAMID_ASYNC_PROGRESS=1\" requires \"PAMID_CONTEXT_POST=1\".\n");
         }
 
-#else /* (MPICH_THREAD_GRANULARITY != MPIR_THREAD_GRANULARITY_PER_OBJECT) */
+#else /* (MPICH_THREAD_GRANULARITY != MPICH_THREAD_GRANULARITY_PER_OBJECT) */
         if (value == ASYNC_PROGRESS_MODE_LOCKED)
         {
           /* The only valid async progress mode when using the 'global' mpich
@@ -1091,7 +1091,7 @@ MPIDI_Env_setup(int rank, int requested)
         MPIDI_Process.mp_interrupts=user_interrupts;
         MPIDI_Process.perobj.context_post.requested = 0;
         MPIDI_Process.async_progress.mode    = ASYNC_PROGRESS_MODE_TRIGGER;
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
         MPIDI_Process.avail_contexts         = MPIDI_MAX_CONTEXTS;
 #else
         MPIDI_Process.avail_contexts         = 1;
diff --git a/src/mpid/pamid/src/pt2pt/mpid_cancel.c b/src/mpid/pamid/src/pt2pt/mpid_cancel.c
index 5a174df..a7c2b8d 100644
--- a/src/mpid/pamid/src/pt2pt/mpid_cancel.c
+++ b/src/mpid/pamid/src/pt2pt/mpid_cancel.c
@@ -102,7 +102,7 @@ MPID_Cancel_send(MPID_Request * sreq)
 
   pami_context_t context = MPIDI_Context_local(sreq);
 
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
   if (likely(MPIDI_Process.perobj.context_post.active > 0))
     {
       /* This leaks intentionally.  At this time, the amount of work
@@ -123,7 +123,7 @@ MPID_Cancel_send(MPID_Request * sreq)
        MPIDI_CancelReq_post(context, sreq);
        PAMI_Context_unlock(context);
     }
-#else /* (MPICH_THREAD_GRANULARITY != MPIR_THREAD_GRANULARITY_PER_OBJECT) */
+#else /* (MPICH_THREAD_GRANULARITY != MPICH_THREAD_GRANULARITY_PER_OBJECT) */
   /*
    * It is not necessary to lock the context before access in the "global" mpich
    * lock mode because all application threads must first acquire the global
diff --git a/src/mpid/pamid/src/pt2pt/mpid_isend.h b/src/mpid/pamid/src/pt2pt/mpid_isend.h
index 581420a..82046be 100644
--- a/src/mpid/pamid/src/pt2pt/mpid_isend.h
+++ b/src/mpid/pamid/src/pt2pt/mpid_isend.h
@@ -30,7 +30,7 @@
 static inline unsigned
 MPIDI_Context_hash(pami_task_t rank, unsigned ctxt, unsigned bias, unsigned ncontexts)
 {
-#if (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT)
+#if (MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT)
   return (( rank + ctxt + bias ) & (ncontexts-1));
 #else
   /* The 'global' mpich lock mode only supports a single context. See
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index d0eab48..a39d9d5 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -46,10 +46,10 @@ typedef int MPIU_Thread_tls_t;
 #define MPIU_THREAD_SUCCESS 0
 /* FIXME: Define other error codes.  For now, any non-zero value is an error. */
 
-#if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_INVALID
+#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_INVALID
 #  error Invalid thread granularity option specified (possibly none)
-#elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_LOCK_FREE
-#  error MPIR_THREAD_GRANULARITY_LOCK_FREE not implemented yet
+#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_LOCK_FREE
+#  error MPICH_THREAD_GRANULARITY_LOCK_FREE not implemented yet
 #endif
 
 typedef struct {
@@ -71,12 +71,12 @@ typedef struct {
 #endif                          /* MPICH_IS_THREADED */
 
     /* Define the mutex values used for each kind of implementation */
-#if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL || \
-    MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT
+#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL || \
+    MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT
     MPIU_Thread_mutex_t global_mutex;
 #endif
 
-#if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT
+#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT
     MPIU_Thread_mutex_t handle_mutex;
     MPIU_Thread_mutex_t msgq_mutex;
     MPIU_Thread_mutex_t completion_mutex;
diff --git a/src/util/thread/mpiu_thread_multiple.h b/src/util/thread/mpiu_thread_multiple.h
index 442aad3..082c920 100644
--- a/src/util/thread/mpiu_thread_multiple.h
+++ b/src/util/thread/mpiu_thread_multiple.h
@@ -43,11 +43,11 @@
 #define MPIU_THREAD_CS_YIELD(name, mutex) MPIUI_THREAD_CS_YIELD_##name(mutex)
 
 /* Definitions of the thread support for various levels of thread granularity */
-#if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL
+#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_GLOBAL
 #include "mpiu_thread_global.h"
-#elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT
+#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_PER_OBJECT
 #include "mpiu_thread_pobj.h"
-#elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_LOCK_FREE
+#elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_LOCK_FREE
 #error lock-free not yet implemented
 #else
 #error Unrecognized thread granularity

http://git.mpich.org/mpich.git/commitdiff/56824b049b37ea155a046257aca21718555acd1b

commit 56824b049b37ea155a046257aca21718555acd1b
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 19 02:14:26 2015 -0500

    MPIU_OBJ_PUBLISH_HANDLE should not be used directly.
    
    Move object to MPID_OBJ_PUBLISH_HANDLE.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpi/attr/comm_create_keyval.c b/src/mpi/attr/comm_create_keyval.c
index 7b888f7..01b18aa 100644
--- a/src/mpi/attr/comm_create_keyval.c
+++ b/src/mpi/attr/comm_create_keyval.c
@@ -70,7 +70,7 @@ int MPIR_Comm_create_keyval_impl(MPI_Comm_copy_attr_function *comm_copy_attr_fn,
     keyval_ptr->delfn.user_function = comm_delete_attr_fn;
     keyval_ptr->delfn.proxy = MPIR_Attr_delete_c_proxy;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*comm_keyval, keyval_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*comm_keyval, keyval_ptr->handle);
 
  fn_exit:
     return mpi_errno;
diff --git a/src/mpi/attr/type_create_keyval.c b/src/mpi/attr/type_create_keyval.c
index 251fa22..f9436cb 100644
--- a/src/mpi/attr/type_create_keyval.c
+++ b/src/mpi/attr/type_create_keyval.c
@@ -122,7 +122,7 @@ int MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn,
     /* Tell finalize to check for attributes on permenant types */
     MPIR_DatatypeAttrFinalize();
     
-    MPIU_OBJ_PUBLISH_HANDLE(*type_keyval, keyval_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*type_keyval, keyval_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/attr/win_create_keyval.c b/src/mpi/attr/win_create_keyval.c
index 96cb8ec..433869a 100644
--- a/src/mpi/attr/win_create_keyval.c
+++ b/src/mpi/attr/win_create_keyval.c
@@ -119,7 +119,7 @@ int MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn,
     keyval_ptr->delfn.user_function = win_delete_attr_fn;
     keyval_ptr->delfn.proxy = MPIR_Attr_delete_c_proxy;
     
-    MPIU_OBJ_PUBLISH_HANDLE(*win_keyval, keyval_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*win_keyval, keyval_ptr->handle);
     /* ... end of body of routine ... */
 
   fn_exit:
diff --git a/src/mpi/coll/op_create.c b/src/mpi/coll/op_create.c
index 49d22e0..416fc7a 100644
--- a/src/mpi/coll/op_create.c
+++ b/src/mpi/coll/op_create.c
@@ -129,7 +129,7 @@ int MPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op)
 				   const int *, const MPI_Datatype *))user_fn;
     MPIU_Object_set_ref(op_ptr,1);
 
-    MPIU_OBJ_PUBLISH_HANDLE(*op, op_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*op, op_ptr->handle);
     /* ... end of body of routine ... */
 
   fn_exit:
diff --git a/src/mpi/comm/comm_create.c b/src/mpi/comm/comm_create.c
index 182b509..9edeeab 100644
--- a/src/mpi/comm/comm_create.c
+++ b/src/mpi/comm/comm_create.c
@@ -546,7 +546,7 @@ int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm)
         if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     }
     if (newcomm_ptr)
-        MPIU_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
+        MPID_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
     else
         *newcomm = MPI_COMM_NULL;
     /* ... end of body of routine ... */
diff --git a/src/mpi/comm/comm_create_group.c b/src/mpi/comm/comm_create_group.c
index a07c5b7..545a83e 100644
--- a/src/mpi/comm/comm_create_group.c
+++ b/src/mpi/comm/comm_create_group.c
@@ -209,7 +209,7 @@ int MPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int tag, MPI_Comm * ne
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
     if (newcomm_ptr)
-        MPIU_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
+        MPID_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
     else
         *newcomm = MPI_COMM_NULL;
     /* ... end of body of routine ... */
diff --git a/src/mpi/comm/comm_dup.c b/src/mpi/comm/comm_dup.c
index bd1f522..725b253 100644
--- a/src/mpi/comm/comm_dup.c
+++ b/src/mpi/comm/comm_dup.c
@@ -161,7 +161,7 @@ int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm)
     mpi_errno = MPIR_Comm_dup_impl(comm_ptr, &newcomm_ptr);
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
     /* ... end of body of routine ... */
 
   fn_exit:
diff --git a/src/mpi/comm/comm_dup_with_info.c b/src/mpi/comm/comm_dup_with_info.c
index a13a032..a3542ec 100644
--- a/src/mpi/comm/comm_dup_with_info.c
+++ b/src/mpi/comm/comm_dup_with_info.c
@@ -132,7 +132,7 @@ int MPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm * newcomm)
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
     /* ... end of body of routine ... */
 
   fn_exit:
diff --git a/src/mpi/comm/comm_idup.c b/src/mpi/comm/comm_idup.c
index 6f3b96c..10f2ce5 100644
--- a/src/mpi/comm/comm_idup.c
+++ b/src/mpi/comm/comm_idup.c
@@ -143,7 +143,7 @@ int MPI_Comm_idup(MPI_Comm comm, MPI_Comm *newcomm, MPI_Request *request)
     /* NOTE: this is a publication for most of the comm, but the context ID
      * won't be valid yet, so we must "republish" relative to the request
      * handle at request completion time. */
-    MPIU_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
     *request = dreq->handle;
 
     /* ... end of body of routine ... */
diff --git a/src/mpi/comm/comm_shrink.c b/src/mpi/comm/comm_shrink.c
index b21bff1..e9cdd1e 100644
--- a/src/mpi/comm/comm_shrink.c
+++ b/src/mpi/comm/comm_shrink.c
@@ -173,7 +173,7 @@ int MPIX_Comm_shrink(MPI_Comm comm, MPI_Comm *newcomm)
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
     if (newcomm_ptr)
-        MPIU_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
+        MPID_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
     else
         *newcomm = MPI_COMM_NULL;
     /* ... end of body of routine ... */
diff --git a/src/mpi/comm/comm_split.c b/src/mpi/comm/comm_split.c
index a20dabc..6a489a2 100644
--- a/src/mpi/comm/comm_split.c
+++ b/src/mpi/comm/comm_split.c
@@ -478,7 +478,7 @@ int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm)
     mpi_errno = MPIR_Comm_split_impl(comm_ptr, color, key, &newcomm_ptr);
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     if (newcomm_ptr)
-        MPIU_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
+        MPID_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
     else
         *newcomm = MPI_COMM_NULL;
 
diff --git a/src/mpi/comm/comm_split_type.c b/src/mpi/comm/comm_split_type.c
index 2372634..b122126 100644
--- a/src/mpi/comm/comm_split_type.c
+++ b/src/mpi/comm/comm_split_type.c
@@ -142,7 +142,7 @@ int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info,
     if (mpi_errno)
         MPIR_ERR_POP(mpi_errno);
     if (newcomm_ptr)
-        MPIU_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
+        MPID_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
     else
         *newcomm = MPI_COMM_NULL;
 
diff --git a/src/mpi/comm/intercomm_create.c b/src/mpi/comm/intercomm_create.c
index 10c689c..4f42a2d 100644
--- a/src/mpi/comm/intercomm_create.c
+++ b/src/mpi/comm/intercomm_create.c
@@ -520,7 +520,7 @@ int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader,
                                            remote_leader, tag, &new_intercomm_ptr);
     if (mpi_errno) goto fn_fail;
     
-    MPIU_OBJ_PUBLISH_HANDLE(*newintercomm, new_intercomm_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newintercomm, new_intercomm_ptr->handle);
     /* ... end of body of routine ... */
     
   fn_exit:
diff --git a/src/mpi/comm/intercomm_merge.c b/src/mpi/comm/intercomm_merge.c
index 1affdad..ac0d4d5 100644
--- a/src/mpi/comm/intercomm_merge.c
+++ b/src/mpi/comm/intercomm_merge.c
@@ -337,7 +337,7 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm)
     mpi_errno = MPIR_Intercomm_merge_impl(comm_ptr, high, &new_intracomm_ptr);
     if (mpi_errno) goto fn_fail;
     
-    MPIU_OBJ_PUBLISH_HANDLE(*newintracomm, new_intracomm_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newintracomm, new_intracomm_ptr->handle);
 
     /* ... end of body of routine ... */
     
diff --git a/src/mpi/datatype/type_contiguous.c b/src/mpi/datatype/type_contiguous.c
index 20c6393..f033cf2 100644
--- a/src/mpi/datatype/type_contiguous.c
+++ b/src/mpi/datatype/type_contiguous.c
@@ -55,7 +55,7 @@ int MPIR_Type_contiguous_impl(int count,
 
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
 
  fn_exit:
     return mpi_errno;
diff --git a/src/mpi/datatype/type_create_darray.c b/src/mpi/datatype/type_create_darray.c
index 8ca9074..e8c73db 100644
--- a/src/mpi/datatype/type_create_darray.c
+++ b/src/mpi/datatype/type_create_darray.c
@@ -739,7 +739,7 @@ int MPI_Type_create_darray(int size,
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
     /* --END ERROR HANDLING-- */
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
     /* ... end of body of routine ... */
 
   fn_exit:
diff --git a/src/mpi/datatype/type_create_hindexed.c b/src/mpi/datatype/type_create_hindexed.c
index b417a80..c987a7a 100644
--- a/src/mpi/datatype/type_create_hindexed.c
+++ b/src/mpi/datatype/type_create_hindexed.c
@@ -133,7 +133,7 @@ int MPI_Type_create_hindexed(int count,
 
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
     /* ... end of body of routine ... */
 
   fn_exit:
diff --git a/src/mpi/datatype/type_create_hindexed_block.c b/src/mpi/datatype/type_create_hindexed_block.c
index 5df8878..752a8ac 100644
--- a/src/mpi/datatype/type_create_hindexed_block.c
+++ b/src/mpi/datatype/type_create_hindexed_block.c
@@ -59,7 +59,7 @@ int MPIR_Type_create_hindexed_block_impl(int count, int blocklength,
                                            &oldtype);
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
 
   fn_exit:
     return mpi_errno;
diff --git a/src/mpi/datatype/type_create_hvector.c b/src/mpi/datatype/type_create_hvector.c
index eb6c13d..23a871a 100644
--- a/src/mpi/datatype/type_create_hvector.c
+++ b/src/mpi/datatype/type_create_hvector.c
@@ -116,7 +116,7 @@ int MPI_Type_create_hvector(int count,
 
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
     /* ... end of body of routine ... */
 
   fn_exit:
diff --git a/src/mpi/datatype/type_create_indexed_block.c b/src/mpi/datatype/type_create_indexed_block.c
index 856a4ad..c297d55 100644
--- a/src/mpi/datatype/type_create_indexed_block.c
+++ b/src/mpi/datatype/type_create_indexed_block.c
@@ -69,7 +69,7 @@ int MPIR_Type_create_indexed_block_impl(int count,
 				           &oldtype);
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
 
  fn_exit:
     MPIU_CHKLMEM_FREEALL();
diff --git a/src/mpi/datatype/type_create_resized.c b/src/mpi/datatype/type_create_resized.c
index 3c0714a..b3b4b4f 100644
--- a/src/mpi/datatype/type_create_resized.c
+++ b/src/mpi/datatype/type_create_resized.c
@@ -110,7 +110,7 @@ int MPI_Type_create_resized(MPI_Datatype oldtype,
 
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
     /* ... end of body of routine ... */
 
   fn_exit:
diff --git a/src/mpi/datatype/type_create_struct.c b/src/mpi/datatype/type_create_struct.c
index 6d0de18..a64803d 100644
--- a/src/mpi/datatype/type_create_struct.c
+++ b/src/mpi/datatype/type_create_struct.c
@@ -69,7 +69,7 @@ int MPIR_Type_create_struct_impl(int count,
 				           array_of_types);
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
         
  fn_exit:
     MPIU_CHKLMEM_FREEALL();
diff --git a/src/mpi/datatype/type_create_subarray.c b/src/mpi/datatype/type_create_subarray.c
index 509979e..2725a0d 100644
--- a/src/mpi/datatype/type_create_subarray.c
+++ b/src/mpi/datatype/type_create_subarray.c
@@ -327,7 +327,7 @@ int MPI_Type_create_subarray(int ndims,
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
     /* ... end of body of routine ... */
 
   fn_exit:
diff --git a/src/mpi/datatype/type_dup.c b/src/mpi/datatype/type_dup.c
index ef87c52..817ea31 100644
--- a/src/mpi/datatype/type_dup.c
+++ b/src/mpi/datatype/type_dup.c
@@ -129,7 +129,7 @@ int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype)
 
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
     /* ... end of body of routine ... */
 
   fn_exit:
diff --git a/src/mpi/datatype/type_hindexed.c b/src/mpi/datatype/type_hindexed.c
index e6ea6f0..7ed7a2f 100644
--- a/src/mpi/datatype/type_hindexed.c
+++ b/src/mpi/datatype/type_hindexed.c
@@ -159,7 +159,7 @@ int MPI_Type_hindexed(int count,
 				           &oldtype);
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
     /* ... end of body of routine ... */
 
   fn_exit:
diff --git a/src/mpi/datatype/type_hvector.c b/src/mpi/datatype/type_hvector.c
index c04f71f..a7ef432 100644
--- a/src/mpi/datatype/type_hvector.c
+++ b/src/mpi/datatype/type_hvector.c
@@ -58,7 +58,7 @@ int MPIR_Type_hvector_impl(int count, int blocklength, MPI_Aint stride, MPI_Data
 				           &oldtype);
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
 
  fn_exit:
     return mpi_errno;
diff --git a/src/mpi/datatype/type_indexed.c b/src/mpi/datatype/type_indexed.c
index 6a3b8c3..b4eda63 100644
--- a/src/mpi/datatype/type_indexed.c
+++ b/src/mpi/datatype/type_indexed.c
@@ -73,7 +73,7 @@ int MPIR_Type_indexed_impl(int count, const int *array_of_blocklengths,
 					   &oldtype);
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
     
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
 
  fn_exit:
     MPIU_CHKLMEM_FREEALL();
diff --git a/src/mpi/datatype/type_struct.c b/src/mpi/datatype/type_struct.c
index 6471e92..fde6b8a 100644
--- a/src/mpi/datatype/type_struct.c
+++ b/src/mpi/datatype/type_struct.c
@@ -67,7 +67,7 @@ int MPIR_Type_struct_impl(int count, const int *array_of_blocklengths,
     
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
 
  fn_exit:
     MPIU_CHKLMEM_FREEALL();
diff --git a/src/mpi/datatype/type_vector.c b/src/mpi/datatype/type_vector.c
index 033a84b..3402fce 100644
--- a/src/mpi/datatype/type_vector.c
+++ b/src/mpi/datatype/type_vector.c
@@ -60,7 +60,7 @@ int MPIR_Type_vector_impl(int count, int blocklength, int stride, MPI_Datatype o
                                            &oldtype);
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newtype, new_handle);
     
  fn_exit:
     return mpi_errno;
diff --git a/src/mpi/errhan/comm_create_errhandler.c b/src/mpi/errhan/comm_create_errhandler.c
index 5e30b74..de7bd8e 100644
--- a/src/mpi/errhan/comm_create_errhandler.c
+++ b/src/mpi/errhan/comm_create_errhandler.c
@@ -44,7 +44,7 @@ int MPIR_Comm_create_errhandler_impl(MPI_Comm_errhandler_function *comm_errhandl
     MPIU_Object_set_ref(errhan_ptr,1);
     errhan_ptr->errfn.C_Comm_Handler_function = comm_errhandler_fn;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*errhandler, errhan_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*errhandler, errhan_ptr->handle);
  fn_exit:
     return mpi_errno;
  fn_fail:
diff --git a/src/mpi/errhan/file_create_errhandler.c b/src/mpi/errhan/file_create_errhandler.c
index c34175c..467585a 100644
--- a/src/mpi/errhan/file_create_errhandler.c
+++ b/src/mpi/errhan/file_create_errhandler.c
@@ -81,7 +81,7 @@ int MPI_File_create_errhandler(MPI_File_errhandler_function *file_errhandler_fn,
     MPIU_Object_set_ref(errhan_ptr,1);
     errhan_ptr->errfn.C_File_Handler_function = file_errhandler_fn;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*errhandler, errhan_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*errhandler, errhan_ptr->handle);
     /* ... end of body of routine ... */
 
   fn_exit:
diff --git a/src/mpi/errhan/win_create_errhandler.c b/src/mpi/errhan/win_create_errhandler.c
index b26ecef..a805bdd 100644
--- a/src/mpi/errhan/win_create_errhandler.c
+++ b/src/mpi/errhan/win_create_errhandler.c
@@ -84,7 +84,7 @@ int MPI_Win_create_errhandler(MPI_Win_errhandler_function *win_errhandler_fn,
     MPIU_Object_set_ref(errhan_ptr,1);
     errhan_ptr->errfn.C_Win_Handler_function = win_errhandler_fn;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*errhandler, errhan_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*errhandler, errhan_ptr->handle);
     /* ... end of body of routine ... */
 
   fn_exit:
diff --git a/src/mpi/group/group_difference.c b/src/mpi/group/group_difference.c
index 85dd0a0..bb79d8e 100644
--- a/src/mpi/group/group_difference.c
+++ b/src/mpi/group/group_difference.c
@@ -185,7 +185,7 @@ int MPI_Group_difference(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup
     mpi_errno = MPIR_Group_difference_impl(group_ptr1, group_ptr2, &new_group_ptr);
     if (mpi_errno) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/group/group_excl.c b/src/mpi/group/group_excl.c
index a8258f8..d158a7c 100644
--- a/src/mpi/group/group_excl.c
+++ b/src/mpi/group/group_excl.c
@@ -166,7 +166,7 @@ int MPI_Group_excl(MPI_Group group, int n, const int ranks[], MPI_Group *newgrou
     mpi_errno = MPIR_Group_excl_impl(group_ptr, n, ranks, &new_group_ptr);
     if (mpi_errno) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/group/group_incl.c b/src/mpi/group/group_incl.c
index 174ef34..98ee62b 100644
--- a/src/mpi/group/group_incl.c
+++ b/src/mpi/group/group_incl.c
@@ -155,7 +155,7 @@ int MPI_Group_incl(MPI_Group group, int n, const int ranks[], MPI_Group *newgrou
     mpi_errno = MPIR_Group_incl_impl(group_ptr, n, ranks, &new_group_ptr);
     if (mpi_errno) goto fn_fail;
     
-    MPIU_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/group/group_intersection.c b/src/mpi/group/group_intersection.c
index 01c7ed1..e337628 100644
--- a/src/mpi/group/group_intersection.c
+++ b/src/mpi/group/group_intersection.c
@@ -185,7 +185,7 @@ int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgro
     mpi_errno = MPIR_Group_intersection_impl(group_ptr1, group_ptr2, &new_group_ptr);
     if (mpi_errno) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/group/group_range_excl.c b/src/mpi/group/group_range_excl.c
index 4f72b10..ee42a72 100644
--- a/src/mpi/group/group_range_excl.c
+++ b/src/mpi/group/group_range_excl.c
@@ -202,7 +202,7 @@ int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3],
     mpi_errno = MPIR_Group_range_excl_impl(group_ptr, n, ranges, &new_group_ptr);
     if (mpi_errno) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/group/group_range_incl.c b/src/mpi/group/group_range_incl.c
index 61b71fd..26ece15 100644
--- a/src/mpi/group/group_range_incl.c
+++ b/src/mpi/group/group_range_incl.c
@@ -178,7 +178,7 @@ int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3],
     mpi_errno = MPIR_Group_range_incl_impl(group_ptr, n, ranges, &new_group_ptr);
     if (mpi_errno) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/group/group_union.c b/src/mpi/group/group_union.c
index c026bb6..4e56608 100644
--- a/src/mpi/group/group_union.c
+++ b/src/mpi/group/group_union.c
@@ -218,7 +218,7 @@ int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup)
     mpi_errno = MPIR_Group_union_impl(group_ptr1, group_ptr2, &new_group_ptr);
     if (mpi_errno) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newgroup, new_group_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/pt2pt/bsend_init.c b/src/mpi/pt2pt/bsend_init.c
index e444c45..6313626 100644
--- a/src/mpi/pt2pt/bsend_init.c
+++ b/src/mpi/pt2pt/bsend_init.c
@@ -125,7 +125,7 @@ int MPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype,
     MPIR_SENDQ_REMEMBER(request_ptr, dest, tag, comm_ptr->context_id);
 
     /* return the handle of the request to the user */
-    MPIU_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
 
     /* ... end of body of routine ... */
     
diff --git a/src/mpi/pt2pt/greq_start.c b/src/mpi/pt2pt/greq_start.c
index 1b6deda..e60d9a7 100644
--- a/src/mpi/pt2pt/greq_start.c
+++ b/src/mpi/pt2pt/greq_start.c
@@ -203,7 +203,7 @@ int MPI_Grequest_start( MPI_Grequest_query_function *query_fn,
     mpi_errno = MPIR_Grequest_start_impl(query_fn, free_fn, cancel_fn, extra_state, &request_ptr);
     if (mpi_errno) goto fn_fail;
     
-    MPIU_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
 
     /* ... end of body of routine ... */
 
@@ -304,7 +304,7 @@ int MPIX_Grequest_class_create(MPI_Grequest_query_function *query_fn,
             MPIR_Grequest_registered_finalizer = 1;
         }
 
-        MPIU_OBJ_PUBLISH_HANDLE(*greq_class, class_ptr->handle);
+        MPID_OBJ_PUBLISH_HANDLE(*greq_class, class_ptr->handle);
 
 	/* ... end of body of routine ... */
 fn_exit:
diff --git a/src/mpi/pt2pt/ibsend.c b/src/mpi/pt2pt/ibsend.c
index 979f87f..8313f25 100644
--- a/src/mpi/pt2pt/ibsend.c
+++ b/src/mpi/pt2pt/ibsend.c
@@ -117,7 +117,7 @@ int MPIR_Ibsend_impl(const void *buf, int count, MPI_Datatype datatype, int dest
     /* The request is immediately complete because the MPIR_Bsend_isend has
        already moved the data out of the user's buffer */
     MPIR_Grequest_complete_impl(new_request_ptr);
-    MPIU_OBJ_PUBLISH_HANDLE(*request, new_request_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*request, new_request_ptr->handle);
   
  fn_exit:
     return mpi_errno;
diff --git a/src/mpi/pt2pt/recv_init.c b/src/mpi/pt2pt/recv_init.c
index c65c7ba..d684439 100644
--- a/src/mpi/pt2pt/recv_init.c
+++ b/src/mpi/pt2pt/recv_init.c
@@ -130,7 +130,7 @@ int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source,
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
     /* return the handle of the request to the user */
-    MPIU_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
 
     /* ... end of body of routine ... */
     
diff --git a/src/mpi/pt2pt/rsend_init.c b/src/mpi/pt2pt/rsend_init.c
index 63af433..3991348 100644
--- a/src/mpi/pt2pt/rsend_init.c
+++ b/src/mpi/pt2pt/rsend_init.c
@@ -130,7 +130,7 @@ int MPI_Rsend_init(const void *buf, int count, MPI_Datatype datatype, int dest,
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
     /* return the handle of the request to the user */
-    MPIU_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
 
     /* ... end of body of routine ... */
     
diff --git a/src/mpi/pt2pt/send_init.c b/src/mpi/pt2pt/send_init.c
index 67346da..6d51c13 100644
--- a/src/mpi/pt2pt/send_init.c
+++ b/src/mpi/pt2pt/send_init.c
@@ -131,7 +131,7 @@ int MPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest,
     MPIR_SENDQ_REMEMBER(request_ptr, dest, tag, comm_ptr->context_id);
     
     /* return the handle of the request to the user */
-    MPIU_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
 
     /* ... end of body of routine ... */
     
diff --git a/src/mpi/pt2pt/ssend_init.c b/src/mpi/pt2pt/ssend_init.c
index 6e64b1a..b4c7a5b 100644
--- a/src/mpi/pt2pt/ssend_init.c
+++ b/src/mpi/pt2pt/ssend_init.c
@@ -127,7 +127,7 @@ int MPI_Ssend_init(const void *buf, int count, MPI_Datatype datatype, int dest,
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
     /* return the handle of the request to the user */
-    MPIU_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*request, request_ptr->handle);
 
     /* ... end of body of routine ... */
     
diff --git a/src/mpi/rma/win_allocate.c b/src/mpi/rma/win_allocate.c
index ab2969e..3ee66f1 100644
--- a/src/mpi/rma/win_allocate.c
+++ b/src/mpi/rma/win_allocate.c
@@ -147,7 +147,7 @@ int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info,
     win_ptr->errhandler = 0;
 
     /* return the handle of the window object to the user */
-    MPIU_OBJ_PUBLISH_HANDLE(*win, win_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*win, win_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/rma/win_allocate_shared.c b/src/mpi/rma/win_allocate_shared.c
index 7965d7d..0c84cdb 100644
--- a/src/mpi/rma/win_allocate_shared.c
+++ b/src/mpi/rma/win_allocate_shared.c
@@ -145,7 +145,7 @@ int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Com
     win_ptr->errhandler = 0;
 
     /* return the handle of the window object to the user */
-    MPIU_OBJ_PUBLISH_HANDLE(*win, win_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*win, win_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/rma/win_create.c b/src/mpi/rma/win_create.c
index 947a95e..21747af 100644
--- a/src/mpi/rma/win_create.c
+++ b/src/mpi/rma/win_create.c
@@ -175,7 +175,7 @@ int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, MPI_Info info,
     win_ptr->errhandler = 0;
 
     /* return the handle of the window object to the user */
-    MPIU_OBJ_PUBLISH_HANDLE(*win, win_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*win, win_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/rma/win_create_dynamic.c b/src/mpi/rma/win_create_dynamic.c
index b9d6c28..7d5ac94 100644
--- a/src/mpi/rma/win_create_dynamic.c
+++ b/src/mpi/rma/win_create_dynamic.c
@@ -139,7 +139,7 @@ int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win)
     win_ptr->errhandler = 0;
 
     /* return the handle of the window object to the user */
-    MPIU_OBJ_PUBLISH_HANDLE(*win, win_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*win, win_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/spawn/comm_accept.c b/src/mpi/spawn/comm_accept.c
index 3af5c54..4063784 100644
--- a/src/mpi/spawn/comm_accept.c
+++ b/src/mpi/spawn/comm_accept.c
@@ -112,7 +112,7 @@ int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, MPI_Comm com
     mpi_errno = MPIR_Comm_accept_impl(port_name, info_ptr, root, comm_ptr, &newcomm_ptr);
     if (mpi_errno) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/spawn/comm_connect.c b/src/mpi/spawn/comm_connect.c
index dec1f5c..332b25e 100644
--- a/src/mpi/spawn/comm_connect.c
+++ b/src/mpi/spawn/comm_connect.c
@@ -112,7 +112,7 @@ int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, MPI_Comm co
     mpi_errno = MPIR_Comm_connect_impl(port_name, info_ptr, root, comm_ptr, &newcomm_ptr);
     if (mpi_errno) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*newcomm, newcomm_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/spawn/comm_join.c b/src/mpi/spawn/comm_join.c
index 1956257..6684bf9 100644
--- a/src/mpi/spawn/comm_join.c
+++ b/src/mpi/spawn/comm_join.c
@@ -179,7 +179,7 @@ int MPI_Comm_join(int fd, MPI_Comm *intercomm)
     mpi_errno = MPIR_Close_port_impl(local_port);
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
-    MPIU_OBJ_PUBLISH_HANDLE(*intercomm, intercomm_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*intercomm, intercomm_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/spawn/comm_spawn.c b/src/mpi/spawn/comm_spawn.c
index ddc28df..6f540da 100644
--- a/src/mpi/spawn/comm_spawn.c
+++ b/src/mpi/spawn/comm_spawn.c
@@ -127,7 +127,7 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf
                                          array_of_errcodes); 
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*intercomm, intercomm_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*intercomm, intercomm_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/spawn/comm_spawn_multiple.c b/src/mpi/spawn/comm_spawn_multiple.c
index f9eade6..a94ca7f 100644
--- a/src/mpi/spawn/comm_spawn_multiple.c
+++ b/src/mpi/spawn/comm_spawn_multiple.c
@@ -144,7 +144,7 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[],
                                          array_of_errcodes);
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*intercomm, intercomm_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*intercomm, intercomm_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/topo/cart_create.c b/src/mpi/topo/cart_create.c
index 722cc26..f31181e 100644
--- a/src/mpi/topo/cart_create.c
+++ b/src/mpi/topo/cart_create.c
@@ -156,7 +156,7 @@ int MPIR_Cart_create( MPID_Comm *comm_ptr, int ndims, const int dims[],
     mpi_errno = MPIR_Topology_put( newcomm_ptr, cart_ptr );
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
-    MPIU_OBJ_PUBLISH_HANDLE(*comm_cart, newcomm_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*comm_cart, newcomm_ptr->handle);
 
  fn_exit:
     return mpi_errno;
diff --git a/src/mpi/topo/dist_gr_create.c b/src/mpi/topo/dist_gr_create.c
index 3be158d..b11d8bc 100644
--- a/src/mpi/topo/dist_gr_create.c
+++ b/src/mpi/topo/dist_gr_create.c
@@ -393,7 +393,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
 
     MPIU_CHKPMEM_COMMIT();
 
-    MPIU_OBJ_PUBLISH_HANDLE(*comm_dist_graph, comm_dist_graph_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*comm_dist_graph, comm_dist_graph_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpi/topo/dist_gr_create_adj.c b/src/mpi/topo/dist_gr_create_adj.c
index 6d7dea1..bdf066b 100644
--- a/src/mpi/topo/dist_gr_create_adj.c
+++ b/src/mpi/topo/dist_gr_create_adj.c
@@ -177,7 +177,7 @@ int MPI_Dist_graph_create_adjacent(MPI_Comm comm_old,
     mpi_errno = MPIR_Topology_put(comm_dist_graph_ptr, topo_ptr);
     if (mpi_errno) MPIR_ERR_POP(mpi_errno);
 
-    MPIU_OBJ_PUBLISH_HANDLE(*comm_dist_graph, comm_dist_graph_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*comm_dist_graph, comm_dist_graph_ptr->handle);
     MPIU_CHKPMEM_COMMIT();
     /* ... end of body of routine ... */
   fn_exit:
diff --git a/src/mpi/topo/graphcreate.c b/src/mpi/topo/graphcreate.c
index 94c3296..cbc943d 100644
--- a/src/mpi/topo/graphcreate.c
+++ b/src/mpi/topo/graphcreate.c
@@ -106,7 +106,7 @@ int MPIR_Graph_create( MPID_Comm *comm_ptr, int nnodes,
     mpi_errno = MPIR_Topology_put( newcomm_ptr, graph_ptr );
     if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-    MPIU_OBJ_PUBLISH_HANDLE(*comm_graph, newcomm_ptr->handle);
+    MPID_OBJ_PUBLISH_HANDLE(*comm_graph, newcomm_ptr->handle);
 
     /* ... end of body of routine ... */
 
diff --git a/src/mpid/ch3/include/mpid_thread.h b/src/mpid/ch3/include/mpid_thread.h
index 83d1af6..1e1be57 100644
--- a/src/mpid/ch3/include/mpid_thread.h
+++ b/src/mpid/ch3/include/mpid_thread.h
@@ -55,5 +55,6 @@ typedef MPIDU_Thread_func_t  MPID_Thread_func_t;
 #define MPID_cc_incr         MPIDU_cc_incr
 #define MPID_cc_decr         MPIDU_cc_decr
 
+#define MPID_OBJ_PUBLISH_HANDLE  MPIDU_OBJ_PUBLISH_HANDLE
 
 #endif /* !defined(MPID_THREAD_H_INCLUDED) */
diff --git a/src/mpid/common/thread/mpidu_thread_fallback.h b/src/mpid/common/thread/mpidu_thread_fallback.h
index ac9b137..a7ad4ef 100644
--- a/src/mpid/common/thread/mpidu_thread_fallback.h
+++ b/src/mpid/common/thread/mpidu_thread_fallback.h
@@ -302,5 +302,7 @@ M*/
 #define MPIDU_cc_incr         MPIU_cc_incr
 #define MPIDU_cc_decr         MPIU_cc_decr
 
+#define MPIDU_OBJ_PUBLISH_HANDLE  MPIU_OBJ_PUBLISH_HANDLE
+
 
 #endif /* !defined(MPIDU_THREAD_H_INCLUDED) */

http://git.mpich.org/mpich.git/commitdiff/35bf5005f251d8b89aa740e52abf7178dd4322e6

commit 35bf5005f251d8b89aa740e52abf7178dd4322e6
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 19 02:21:38 2015 -0500

    Rename MPEI functionality to MPIUI.
    
    MPEI is just a different name for internal functionality, for which we
    have been using MPIUI.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/thread/mpiu_thread_posix.c b/src/util/thread/mpiu_thread_posix.c
index 4315aa5..f2ec417 100644
--- a/src/util/thread/mpiu_thread_posix.c
+++ b/src/util/thread/mpiu_thread_posix.c
@@ -30,19 +30,19 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
 #include "mpimem.h"
 
 /*
- * struct MPEI_Thread_info
+ * struct MPIUI_Thread_info
  *
  * Structure used to pass the user function and data to the intermediate
- * function, MPEI_Thread_start.  See comment in
- * MPEI_Thread_start() header for more information.
+ * function, MPIUI_Thread_start.  See comment in
+ * MPIUI_Thread_start() header for more information.
  */
-struct MPEI_Thread_info {
+struct MPIUI_Thread_info {
     MPIU_Thread_func_t func;
     void *data;
 };
 
 
-void *MPEI_Thread_start(void *arg);
+void *MPIUI_Thread_start(void *arg);
 
 
 /*
@@ -50,11 +50,11 @@ void *MPEI_Thread_start(void *arg);
  */
 void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t * idp, int *errp)
 {
-    struct MPEI_Thread_info *thread_info;
+    struct MPIUI_Thread_info *thread_info;
     int err = MPIU_THREAD_SUCCESS;
 
     /* FIXME: faster allocation, or avoid it all together? */
-    thread_info = (struct MPEI_Thread_info *) MPIU_Malloc(sizeof(struct MPEI_Thread_info));
+    thread_info = (struct MPIUI_Thread_info *) MPIU_Malloc(sizeof(struct MPIUI_Thread_info));
     if (thread_info != NULL) {
         pthread_attr_t attr;
 
@@ -64,7 +64,7 @@ void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t *
         pthread_attr_init(&attr);
         pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
 
-        err = pthread_create(idp, &attr, MPEI_Thread_start, thread_info);
+        err = pthread_create(idp, &attr, MPIUI_Thread_start, thread_info);
         /* FIXME: convert error to an MPIU_THREAD_ERR value */
 
         pthread_attr_destroy(&attr);
@@ -80,16 +80,16 @@ void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t *
 
 
 /*
- * MPEI_Thread_start()
+ * MPIUI_Thread_start()
  *
  * Start functions in pthreads are expected to return a void pointer.  Since
  * our start functions do not return a value we must
  * use an intermediate function to perform call to the user's start function
  * and then return a value of NULL.
  */
-void *MPEI_Thread_start(void *arg)
+void *MPIUI_Thread_start(void *arg)
 {
-    struct MPEI_Thread_info *thread_info = (struct MPEI_Thread_info *) arg;
+    struct MPIUI_Thread_info *thread_info = (struct MPIUI_Thread_info *) arg;
     MPIU_Thread_func_t func = thread_info->func;
     void *data = thread_info->data;
 
diff --git a/src/util/thread/mpiu_thread_solaris.c b/src/util/thread/mpiu_thread_solaris.c
index b4bee49..3795f14 100644
--- a/src/util/thread/mpiu_thread_solaris.c
+++ b/src/util/thread/mpiu_thread_solaris.c
@@ -26,18 +26,18 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
 /* begin solaris impl */
 
 /*
- * struct MPEI_Thread_info
+ * struct MPIUI_Thread_info
  *
- * Structure used to pass the user function and data to the intermediate function, MPEI_Thread_start.  See comment in
- * MPEI_Thread_start() header for more information.
+ * Structure used to pass the user function and data to the intermediate function, MPIUI_Thread_start.  See comment in
+ * MPIUI_Thread_start() header for more information.
  */
-struct MPEI_Thread_info {
+struct MPIUI_Thread_info {
     MPIU_Thread_func_t func;
     void *data;
 };
 
 
-void *MPEI_Thread_start(void *arg);
+void *MPIUI_Thread_start(void *arg);
 
 
 /*
@@ -45,16 +45,16 @@ void *MPEI_Thread_start(void *arg);
  */
 void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t * idp, int *errp)
 {
-    struct MPEI_Thread_info *thread_info;
+    struct MPIUI_Thread_info *thread_info;
     int err = MPIU_THREAD_SUCCESS;
 
     /* FIXME: faster allocation, or avoid it all together? */
-    thread_info = (struct MPEI_Thread_info *) MPIU_Malloc(sizeof(struct MPEI_Thread_info));
+    thread_info = (struct MPIUI_Thread_info *) MPIU_Malloc(sizeof(struct MPIUI_Thread_info));
     if (thread_info != NULL) {
         thread_info->func = func;
         thread_info->data = data;
 
-        err = thr_create(NULL, 0, MPEI_Thread_start, thread_info, THR_DETACHED, idp);
+        err = thr_create(NULL, 0, MPIUI_Thread_start, thread_info, THR_DETACHED, idp);
         /* FIXME: convert error to an MPIU_THREAD_ERR value */
     }
     else {
@@ -68,14 +68,14 @@ void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t *
 
 
 /*
- * MPEI_Thread_start()
+ * MPIUI_Thread_start()
  *
  * Start functions in Solaris threads are expected to return a void pointer.  Since our start functions do not return a value we
  * must use an intermediate function to perform call to the user's start function and then return a value of NULL.
  */
-void *MPEI_Thread_start(void *arg)
+void *MPIUI_Thread_start(void *arg)
 {
-    struct MPEI_Thread_info *thread_info = (struct MPEI_Thread_info *) arg;
+    struct MPIUI_Thread_info *thread_info = (struct MPIUI_Thread_info *) arg;
     MPIU_Thread_func_t func = thread_info->func;
     void *data = thread_info->data;
 
diff --git a/src/util/thread/mpiu_thread_win.c b/src/util/thread/mpiu_thread_win.c
index 6006417..bcf1891 100644
--- a/src/util/thread/mpiu_thread_win.c
+++ b/src/util/thread/mpiu_thread_win.c
@@ -28,32 +28,32 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
 #include "mpimem.h"
 
 /*
- * struct MPEI_Thread_info
+ * struct MPIUI_Thread_info
  *
- * Structure used to pass the user function and data to the intermediate function, MPEI_Thread_start.  See comment in
- * MPEI_Thread_start() header for more information.
+ * Structure used to pass the user function and data to the intermediate function, MPIUI_Thread_start.  See comment in
+ * MPIUI_Thread_start() header for more information.
  */
-struct MPEI_Thread_info {
+struct MPIUI_Thread_info {
     MPIU_Thread_func_t func;
     void *data;
 };
 
 
-DWORD WINAPI MPEI_Thread_start(LPVOID arg);
+DWORD WINAPI MPIUI_Thread_start(LPVOID arg);
 
 /*
  * MPIU_Thread_create()
  */
 void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t * idp, int *errp)
 {
-    struct MPEI_Thread_info *thread_info;
+    struct MPIUI_Thread_info *thread_info;
     int err = MPIU_THREAD_SUCCESS;
 
-    thread_info = (struct MPEI_Thread_info *) MPIU_Malloc(sizeof(struct MPEI_Thread_info));
+    thread_info = (struct MPIUI_Thread_info *) MPIU_Malloc(sizeof(struct MPIUI_Thread_info));
     if (thread_info != NULL) {
         thread_info->func = func;
         thread_info->data = data;
-        *idp = CreateThread(NULL, 0, MPEI_Thread_start, thread_info, 0, NULL);
+        *idp = CreateThread(NULL, 0, MPIUI_Thread_start, thread_info, 0, NULL);
         if (*idp == NULL) {
             err = GetLastError();
         }
@@ -69,14 +69,14 @@ void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t *
 
 
 /*
- * MPEI_Thread_start()
+ * MPIUI_Thread_start()
  *
  * Start functions in Windows are expected to return a DWORD.  Since our start functions do not return a value we must
  * use an intermediate function to perform the call to the user's start function and then return a value of 0.
  */
-DWORD WINAPI MPEI_Thread_start(LPVOID arg)
+DWORD WINAPI MPIUI_Thread_start(LPVOID arg)
 {
-    struct MPEI_Thread_info *thread_info = (struct MPEI_Thread_info *) arg;
+    struct MPIUI_Thread_info *thread_info = (struct MPIUI_Thread_info *) arg;
     MPIU_Thread_func_t func = thread_info->func;
     void *data = thread_info->data;
 

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

commit d396438faca35c113f06c5370067948a595c0c62
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 19 02:10:07 2015 -0500

    Convert internal MPIU_ variables and macros to MPIUI_.
    
    Only functionality that is exposed by the threads utils should be
    called MPIU_.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/thread/mpiu_thread.c b/src/util/thread/mpiu_thread.c
index 9c4cc7e..789e2b3 100644
--- a/src/util/thread/mpiu_thread.c
+++ b/src/util/thread/mpiu_thread.c
@@ -9,17 +9,17 @@
 #if !defined(MPICH_IS_THREADED)
 
 /* If single threaded, we preallocate this.  Otherwise, we create it */
-MPIU_Per_thread_t MPIU_Thread = { 0 };
+MPIUI_Per_thread_t MPIUI_Thread = { 0 };
 
 #elif defined(MPICH_TLS_SPECIFIER)
 
-MPICH_TLS_SPECIFIER MPIU_Per_thread_t MPIU_Thread = { 0 };
+MPICH_TLS_SPECIFIER MPIUI_Per_thread_t MPIUI_Thread = { 0 };
 
 #else /* defined(MPICH_IS_THREADED) && !defined(MPICH_TLS_SPECIFIER) */
 
 /* If we may be single threaded, we need a preallocated version to use
  * if we are single threaded case */
-MPIU_Per_thread_t MPIU_ThreadSingle = { 0 };
+MPIUI_Per_thread_t MPIUI_ThreadSingle = { 0 };
 
 /* This routine is called when a thread exits; it is passed the value
  * associated with the key.  In our case, this is simply storage
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index 7c443df..d0eab48 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -116,7 +116,7 @@ typedef struct {
 
     /* error string storage for MPIU_Strerror */
     char strerrbuf[MPIU_STRERROR_BUF_SIZE];
-} MPIU_Per_thread_t;
+} MPIUI_Per_thread_t;
 
 #if defined (MPICH_IS_THREADED)
 #include "mpiu_thread_multiple.h"
diff --git a/src/util/thread/mpiu_thread_global.h b/src/util/thread/mpiu_thread_global.h
index 567331a..0b72c29 100644
--- a/src/util/thread/mpiu_thread_global.h
+++ b/src/util/thread/mpiu_thread_global.h
@@ -8,14 +8,14 @@
 #define MPIU_THREAD_GLOBAL_H_INCLUDED
 
 /* GLOBAL locks are all real ops */
-#define MPIU_THREAD_CS_ENTER_GLOBAL(mutex) MPIU_THREAD_CS_ENTER_REAL("GLOBAL", mutex)
-#define MPIU_THREAD_CS_EXIT_GLOBAL(mutex) MPIU_THREAD_CS_EXIT_REAL("GLOBAL", mutex)
-#define MPIU_THREAD_CS_YIELD_GLOBAL(mutex) MPIU_THREAD_CS_YIELD_REAL("GLOBAL", mutex)
+#define MPIUI_THREAD_CS_ENTER_GLOBAL(mutex) MPIUI_THREAD_CS_ENTER_REAL("GLOBAL", mutex)
+#define MPIUI_THREAD_CS_EXIT_GLOBAL(mutex) MPIUI_THREAD_CS_EXIT_REAL("GLOBAL", mutex)
+#define MPIUI_THREAD_CS_YIELD_GLOBAL(mutex) MPIUI_THREAD_CS_YIELD_REAL("GLOBAL", mutex)
 
 /* POBJ locks are all NO-OPs */
-#define MPIU_THREAD_CS_ENTER_POBJ(mutex)
-#define MPIU_THREAD_CS_EXIT_POBJ(mutex)
-#define MPIU_THREAD_CS_YIELD_POBJ(mutex)
+#define MPIUI_THREAD_CS_ENTER_POBJ(mutex)
+#define MPIUI_THREAD_CS_EXIT_POBJ(mutex)
+#define MPIUI_THREAD_CS_YIELD_POBJ(mutex)
 
 
 /* define a type for the completion counter */
diff --git a/src/util/thread/mpiu_thread_multiple.h b/src/util/thread/mpiu_thread_multiple.h
index a4e88c1..442aad3 100644
--- a/src/util/thread/mpiu_thread_multiple.h
+++ b/src/util/thread/mpiu_thread_multiple.h
@@ -12,7 +12,7 @@
 #define MPIU_THREAD_CHECK_BEGIN if (MPIR_ThreadInfo.isThreaded) {
 #define MPIU_THREAD_CHECK_END   }
 
-#define MPIU_THREAD_CS_ENTER_REAL(lockname, mutex)                      \
+#define MPIUI_THREAD_CS_ENTER_REAL(lockname, mutex)                      \
     do {                                                                \
         int err_;                                                       \
         MPIU_THREAD_CHECK_BEGIN;                                        \
@@ -21,7 +21,7 @@
         MPIU_THREAD_CHECK_END;                                          \
     } while (0)
 
-#define MPIU_THREAD_CS_EXIT_REAL(lockname, mutex)                       \
+#define MPIUI_THREAD_CS_EXIT_REAL(lockname, mutex)                       \
     do {                                                                \
         int err_;                                                       \
         MPIU_THREAD_CHECK_BEGIN;                                        \
@@ -30,7 +30,7 @@
         MPIU_THREAD_CHECK_END;                                          \
     } while (0)
 
-#define MPIU_THREAD_CS_YIELD_REAL(lockname, mutex)                      \
+#define MPIUI_THREAD_CS_YIELD_REAL(lockname, mutex)                      \
     do {                                                                \
         MPIU_THREAD_CHECK_BEGIN;                                        \
         MPIU_DBG_MSG_S(THREAD, TYPICAL, "yielding %s", lockname);       \
@@ -38,9 +38,9 @@
         MPIU_THREAD_CHECK_END;                                          \
     } while (0)
 
-#define MPIU_THREAD_CS_ENTER(name, mutex) MPIU_THREAD_CS_ENTER_##name(mutex)
-#define MPIU_THREAD_CS_EXIT(name, mutex) MPIU_THREAD_CS_EXIT_##name(mutex)
-#define MPIU_THREAD_CS_YIELD(name, mutex) MPIU_THREAD_CS_YIELD_##name(mutex)
+#define MPIU_THREAD_CS_ENTER(name, mutex) MPIUI_THREAD_CS_ENTER_##name(mutex)
+#define MPIU_THREAD_CS_EXIT(name, mutex) MPIUI_THREAD_CS_EXIT_##name(mutex)
+#define MPIU_THREAD_CS_YIELD(name, mutex) MPIUI_THREAD_CS_YIELD_##name(mutex)
 
 /* Definitions of the thread support for various levels of thread granularity */
 #if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL
diff --git a/src/util/thread/mpiu_thread_pobj.h b/src/util/thread/mpiu_thread_pobj.h
index 5145303..8990cdd 100644
--- a/src/util/thread/mpiu_thread_pobj.h
+++ b/src/util/thread/mpiu_thread_pobj.h
@@ -75,14 +75,14 @@
  * reverse order. */
 
 /* POBJ locks are all real ops */
-#define MPIU_THREAD_CS_ENTER_POBJ(mutex) MPIU_THREAD_CS_ENTER_REAL("POBJ", mutex)
-#define MPIU_THREAD_CS_EXIT_POBJ(mutex) MPIU_THREAD_CS_EXIT_REAL("POBJ", mutex)
-#define MPIU_THREAD_CS_YIELD_POBJ(mutex) MPIU_THREAD_CS_YIELD_REAL("POBJ", mutex)
+#define MPIUI_THREAD_CS_ENTER_POBJ(mutex) MPIUI_THREAD_CS_ENTER_REAL("POBJ", mutex)
+#define MPIUI_THREAD_CS_EXIT_POBJ(mutex) MPIUI_THREAD_CS_EXIT_REAL("POBJ", mutex)
+#define MPIUI_THREAD_CS_YIELD_POBJ(mutex) MPIUI_THREAD_CS_YIELD_REAL("POBJ", mutex)
 
 /* GLOBAL locks are all NO-OPs */
-#define MPIU_THREAD_CS_ENTER_GLOBAL(mutex)
-#define MPIU_THREAD_CS_EXIT_GLOBAL(mutex)
-#define MPIU_THREAD_CS_YIELD_GLOBAL(mutex)
+#define MPIUI_THREAD_CS_ENTER_GLOBAL(mutex)
+#define MPIUI_THREAD_CS_EXIT_GLOBAL(mutex)
+#define MPIUI_THREAD_CS_YIELD_GLOBAL(mutex)
 
 /* define a type for the completion counter */
 #include "opa_primitives.h"
diff --git a/src/util/thread/mpiu_thread_priv.h b/src/util/thread/mpiu_thread_priv.h
index 38432e9..1e53b3d 100644
--- a/src/util/thread/mpiu_thread_priv.h
+++ b/src/util/thread/mpiu_thread_priv.h
@@ -32,17 +32,17 @@ void MPIUI_Cleanup_tls(void *a);
    need a blended version of the non-threaded and the thread-multiple
    definitions.
 
-   The approach is to have TWO MPIU_Per_thread_t pointers.  One is local
+   The approach is to have TWO MPIUI_Per_thread_t pointers.  One is local
    (The MPIU_THREADPRIV_DECL is used in the routines local definitions),
    as in the threaded version of these macros.  This is set by using a routine
    to get thread-private storage.  The second is a preallocated, extern
-   MPIU_Per_thread_t struct, as in the single threaded case.  Based on
+   MPIUI_Per_thread_t struct, as in the single threaded case.  Based on
    MPIR_Process.isThreaded, one or the other is used.
 
  */
 /* For the single threaded case, we use a preallocated structure
    This structure is allocated in src/mpi/init/initthread.c */
-extern MPIU_Per_thread_t MPIU_ThreadSingle;
+extern MPIUI_Per_thread_t MPIUI_ThreadSingle;
 
 #define MPIU_THREADPRIV_INITKEY                                         \
     do {                                                                \
@@ -57,41 +57,41 @@ extern MPIU_Per_thread_t MPIU_ThreadSingle;
     do {                                                                \
         if (MPIR_ThreadInfo.isThreaded) {                               \
             int init_err_;                                              \
-            MPIU_Thread_ptr = (MPIU_Per_thread_t *) MPIU_Calloc(1, sizeof(MPIU_Per_thread_t)); \
-            MPIU_Assert(MPIU_Thread_ptr);                               \
-            MPIU_Thread_tls_set(&MPIR_ThreadInfo.thread_storage, (void *)MPIU_Thread_ptr, &init_err_); \
+            MPIUI_Thread_ptr = (MPIUI_Per_thread_t *) MPIU_Calloc(1, sizeof(MPIUI_Per_thread_t)); \
+            MPIU_Assert(MPIUI_Thread_ptr);                               \
+            MPIU_Thread_tls_set(&MPIR_ThreadInfo.thread_storage, (void *)MPIUI_Thread_ptr, &init_err_); \
             MPIU_Assert(init_err_ == 0);                                \
         }                                                               \
     } while (0)
 
 #define MPIU_THREADPRIV_GET                                             \
     do {                                                                \
-        if (!MPIU_Thread_ptr) {                                         \
+        if (!MPIUI_Thread_ptr) {                                         \
             if (MPIR_ThreadInfo.isThreaded) {                           \
                 int get_err_;                                           \
-                MPIU_Thread_tls_get(&MPIR_ThreadInfo.thread_storage, (void **) &MPIU_Thread_ptr, &get_err_); \
+                MPIU_Thread_tls_get(&MPIR_ThreadInfo.thread_storage, (void **) &MPIUI_Thread_ptr, &get_err_); \
                 MPIU_Assert(get_err_ == 0);                             \
-                if (!MPIU_Thread_ptr) {                                 \
-                    MPIU_THREADPRIV_INIT; /* subtle, sets MPIU_Thread_ptr */ \
+                if (!MPIUI_Thread_ptr) {                                 \
+                    MPIU_THREADPRIV_INIT; /* subtle, sets MPIUI_Thread_ptr */ \
                 }                                                       \
             }                                                           \
             else {                                                      \
-                MPIU_Thread_ptr = &MPIU_ThreadSingle;                   \
+                MPIUI_Thread_ptr = &MPIUI_ThreadSingle;                   \
             }                                                           \
-            MPIU_Assert(MPIU_Thread_ptr);                               \
+            MPIU_Assert(MPIUI_Thread_ptr);                               \
         }                                                               \
     } while (0)
 
 /* common definitions when using MPIU_Thread-based TLS */
-#define MPIU_THREADPRIV_DECL MPIU_Per_thread_t *MPIU_Thread_ptr = NULL
-#define MPIU_THREADPRIV_FIELD(a_) (MPIU_Thread_ptr->a_)
+#define MPIU_THREADPRIV_DECL MPIUI_Per_thread_t *MPIUI_Thread_ptr = NULL
+#define MPIU_THREADPRIV_FIELD(a_) (MPIUI_Thread_ptr->a_)
 #define MPIU_THREADPRIV_FINALIZE                                        \
     do {                                                                \
         MPIU_THREADPRIV_DECL;                                           \
         if (MPIR_ThreadInfo.isThreaded) {                               \
             int tpf_err_; /* unique name to not conflict with vars in called macros */ \
             MPIU_THREADPRIV_GET;                                        \
-            MPIU_Free(MPIU_Thread_ptr);                                 \
+            MPIU_Free(MPIUI_Thread_ptr);                                 \
             MPIU_Thread_tls_set(&MPIR_ThreadInfo.thread_storage,NULL, &tpf_err_); \
             MPIU_Assert(tpf_err_ == 0);                                 \
             MPIU_Thread_tls_destroy(&MPIR_ThreadInfo.thread_storage,&tpf_err_); \
@@ -103,13 +103,13 @@ extern MPIU_Per_thread_t MPIU_ThreadSingle;
 
 /* We have proper thread-local storage (TLS) support from the compiler, which
  * should yield the best performance and simplest code, so we'll use that. */
-extern MPICH_TLS_SPECIFIER MPIU_Per_thread_t MPIU_Thread;
+extern MPICH_TLS_SPECIFIER MPIUI_Per_thread_t MPIUI_Thread;
 
 #define MPIU_THREADPRIV_INITKEY
 #define MPIU_THREADPRIV_INIT
 #define MPIU_THREADPRIV_DECL
 #define MPIU_THREADPRIV_GET
-#define MPIU_THREADPRIV_FIELD(a_) (MPIU_Thread.a_)
+#define MPIU_THREADPRIV_FIELD(a_) (MPIUI_Thread.a_)
 #define MPIU_THREADPRIV_FINALIZE do {} while (0)
 
 #endif /* defined(MPICH_TLS_SPECIFIER) */
diff --git a/src/util/thread/mpiu_thread_single.h b/src/util/thread/mpiu_thread_single.h
index dbcb845..c16f3fb 100644
--- a/src/util/thread/mpiu_thread_single.h
+++ b/src/util/thread/mpiu_thread_single.h
@@ -12,13 +12,13 @@
 
 /* If single threaded, make this point at a pre-allocated segment.
    This structure is allocated in src/mpi/init/initthread.c */
-extern MPIU_Per_thread_t MPIU_Thread;
+extern MPIUI_Per_thread_t MPIUI_Thread;
 
 #define MPIU_THREADPRIV_INITKEY
 #define MPIU_THREADPRIV_INIT
 #define MPIU_THREADPRIV_DECL
 #define MPIU_THREADPRIV_GET
-#define MPIU_THREADPRIV_FIELD(a_) (MPIU_Thread.a_)
+#define MPIU_THREADPRIV_FIELD(a_) (MPIUI_Thread.a_)
 
 /* Helper definitions for the default macro definitions */
 #define MPIU_THREAD_CS_ENTER(_name,_context)
diff --git a/src/util/thread/mpiu_thread_win.c b/src/util/thread/mpiu_thread_win.c
index d0f522e..6006417 100644
--- a/src/util/thread/mpiu_thread_win.c
+++ b/src/util/thread/mpiu_thread_win.c
@@ -205,7 +205,7 @@ void MPIU_Thread_cond_create(MPIU_Thread_cond_t * cond, int *err)
 
 void MPIU_Thread_cond_destroy(MPIU_Thread_cond_t * cond, int *err)
 {
-    MPIU_Thread_cond_fifo_t *iter;
+    MPIUI_Win_thread_cond_fifo_t *iter;
 
     while (cond->fifo_head) {
         iter = cond->fifo_head;
@@ -251,12 +251,12 @@ void MPIU_Thread_cond_wait(MPIU_Thread_cond_t * cond, MPIU_Thread_mutex_t * mute
         return;
     }
     if (cond->fifo_tail == NULL) {
-        cond->fifo_tail = (MPIU_Thread_cond_fifo_t *) MPIU_Malloc(sizeof(MPIU_Thread_cond_fifo_t));
+        cond->fifo_tail = (MPIUI_Win_thread_cond_fifo_t *) MPIU_Malloc(sizeof(MPIUI_Win_thread_cond_fifo_t));
         cond->fifo_head = cond->fifo_tail;
     }
     else {
         cond->fifo_tail->next =
-            (MPIU_Thread_cond_fifo_t *) MPIU_Malloc(sizeof(MPIU_Thread_cond_fifo_t));
+            (MPIUI_Win_thread_cond_fifo_t *) MPIU_Malloc(sizeof(MPIUI_Win_thread_cond_fifo_t));
         cond->fifo_tail = cond->fifo_tail->next;
     }
     if (cond->fifo_tail == NULL) {
@@ -303,7 +303,7 @@ void MPIU_Thread_cond_wait(MPIU_Thread_cond_t * cond, MPIU_Thread_mutex_t * mute
 
 void MPIU_Thread_cond_broadcast(MPIU_Thread_cond_t * cond, int *err)
 {
-    MPIU_Thread_cond_fifo_t *fifo, *temp;
+    MPIUI_Win_thread_cond_fifo_t *fifo, *temp;
     MPIU_Thread_mutex_lock(&cond->fifo_mutex, err);
     if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
         return;
@@ -333,7 +333,7 @@ void MPIU_Thread_cond_broadcast(MPIU_Thread_cond_t * cond, int *err)
 
 void MPIU_Thread_cond_signal(MPIU_Thread_cond_t * cond, int *err)
 {
-    MPIU_Thread_cond_fifo_t *fifo;
+    MPIUI_Win_thread_cond_fifo_t *fifo;
     MPIU_Thread_mutex_lock(&cond->fifo_mutex, err);
     if (err != NULL && *err != MPIU_THREAD_SUCCESS) {
         return;
diff --git a/src/util/thread/mpiu_thread_win.h b/src/util/thread/mpiu_thread_win.h
index 73b36c7..6ec0003 100644
--- a/src/util/thread/mpiu_thread_win.h
+++ b/src/util/thread/mpiu_thread_win.h
@@ -16,14 +16,14 @@ typedef HANDLE MPIU_Thread_mutex_t;
 typedef HANDLE MPIU_Thread_id_t;
 typedef DWORD MPIU_Thread_tls_t;
 
-typedef struct MPIU_Thread_cond_fifo_t {
+typedef struct MPIUI_Win_thread_cond_fifo_t {
     HANDLE event;
-    struct MPIU_Thread_cond_fifo_t *next;
-} MPIU_Thread_cond_fifo_t;
+    struct MPIUI_Win_thread_cond_fifo_t *next;
+} MPIUI_Win_thread_cond_fifo_t;
 typedef struct MPIU_Thread_cond_t {
     MPIU_Thread_tls_t tls;
     MPIU_Thread_mutex_t fifo_mutex;
-    MPIU_Thread_cond_fifo_t *fifo_head, *fifo_tail;
+    MPIUI_Win_thread_cond_fifo_t *fifo_head, *fifo_tail;
 } MPIU_Thread_cond_t;
 
 typedef void (*MPIU_Thread_func_t) (void *data);

http://git.mpich.org/mpich.git/commitdiff/1ea0abc722dd38b8945f32746ede3bd47e5330db

commit 1ea0abc722dd38b8945f32746ede3bd47e5330db
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 19 02:02:34 2015 -0500

    MPIU_ to MPICH_ conversion for configure-generated macros.
    
    The thread package and TLS specifier are decided by configure and
    populated in mpichconf.h.  They are not MPIU decided macros.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/confdb/ax_tls.m4 b/confdb/ax_tls.m4
index 4447a36..3f6a0ac 100644
--- a/confdb/ax_tls.m4
+++ b/confdb/ax_tls.m4
@@ -82,9 +82,9 @@ AC_DEFUN([AX_TLS], [
 
   if test "$ac_cv_tls" != "none"; then
     # MPICH modification: this was "TLS" before instead of
-    # "MPIU_TLS_SPECIFIER", but TLS had a reasonably high chance of conflicting
+    # "MPICH_TLS_SPECIFIER", but TLS had a reasonably high chance of conflicting
     # with a system library.
-    AC_DEFINE_UNQUOTED([MPIU_TLS_SPECIFIER], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
+    AC_DEFINE_UNQUOTED([MPICH_TLS_SPECIFIER], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
   fi
   AC_MSG_RESULT($ac_cv_tls)
 ])
diff --git a/configure.ac b/configure.ac
index 8f14f58..81026b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5253,7 +5253,7 @@ if test "${thread_pkg_required}" = "yes" -a "${with_thread_package}" = "none" ;
    AC_ERROR([if no thread package is available, use --enable-threads=single or funneled])
 fi
 
-MPIU_THREAD_PACKAGE_NAME=MPIU_THREAD_PACKAGE_INVALID
+MPICH_THREAD_PACKAGE_NAME=MPICH_THREAD_PACKAGE_INVALID
 case $with_thread_package in 
     posix|pthreads)
 	with_thread_package=posix
@@ -5324,7 +5324,7 @@ void f1(void *a) { return; }],
 
 	PAC_FUNC_NEEDS_DECL([#include <pthread.h>],pthread_mutexattr_settype)
 
-        MPIU_THREAD_PACKAGE_NAME=MPIU_THREAD_PACKAGE_POSIX
+        MPICH_THREAD_PACKAGE_NAME=MPICH_THREAD_PACKAGE_POSIX
 	;;
     solaris)
 	AC_CHECK_HEADERS(thread.h)
@@ -5334,16 +5334,16 @@ void f1(void *a) { return; }],
 	   AC_MSG_ERROR([unable to find Solaris threads library])
 	fi
 	# FIXME: need to add -mt if using solaris compilers
-        MPIU_THREAD_PACKAGE_NAME=MPIU_THREAD_PACKAGE_SOLARIS
+        MPICH_THREAD_PACKAGE_NAME=MPICH_THREAD_PACKAGE_SOLARIS
 	;;
     win|windows)
         with_thread_package=win
-        MPIU_THREAD_PACKAGE_NAME=MPIU_THREAD_PACKAGE_WIN
+        MPICH_THREAD_PACKAGE_NAME=MPICH_THREAD_PACKAGE_WIN
         AC_MSG_ERROR([The 'win' thread package is not supported via autoconf builds at this time.])
         ;;
     no|none)
 	with_thread_package=none
-        MPIU_THREAD_PACKAGE_NAME=MPIU_THREAD_PACKAGE_NONE
+        MPICH_THREAD_PACKAGE_NAME=MPICH_THREAD_PACKAGE_NONE
 	;;
     *)
 	AC_MSG_ERROR([The specified thread package, $with_thread_package, is not supported.]) 
@@ -5352,9 +5352,9 @@ esac
 
 # Define and export the selected thread library so that other packages
 # know what's used in MPICH
-AC_DEFINE_UNQUOTED([MPIU_THREAD_PACKAGE_NAME],[$MPIU_THREAD_PACKAGE_NAME],[set to the name of the thread package])
+AC_DEFINE_UNQUOTED([MPICH_THREAD_PACKAGE_NAME],[$MPICH_THREAD_PACKAGE_NAME],[set to the name of the thread package])
 
-# check for compiler-support for thread-local storage (MPIU_TLS_SPECIFIER)
+# check for compiler-support for thread-local storage (MPICH_TLS_SPECIFIER)
 AX_TLS
 
 AC_CHECK_FUNCS(getpid)
diff --git a/src/util/thread/mpiu_thread.c b/src/util/thread/mpiu_thread.c
index dc427f2..9c4cc7e 100644
--- a/src/util/thread/mpiu_thread.c
+++ b/src/util/thread/mpiu_thread.c
@@ -11,11 +11,11 @@
 /* If single threaded, we preallocate this.  Otherwise, we create it */
 MPIU_Per_thread_t MPIU_Thread = { 0 };
 
-#elif defined(MPIU_TLS_SPECIFIER)
+#elif defined(MPICH_TLS_SPECIFIER)
 
-MPIU_TLS_SPECIFIER MPIU_Per_thread_t MPIU_Thread = { 0 };
+MPICH_TLS_SPECIFIER MPIU_Per_thread_t MPIU_Thread = { 0 };
 
-#else /* defined(MPICH_IS_THREADED) && !defined(MPIU_TLS_SPECIFIER) */
+#else /* defined(MPICH_IS_THREADED) && !defined(MPICH_TLS_SPECIFIER) */
 
 /* If we may be single threaded, we need a preallocated version to use
  * if we are single threaded case */
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index 64fc8ad..7c443df 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -8,7 +8,7 @@
 #define MPIU_THREAD_H_INCLUDED
 
 #include "mpi.h"
-#include "mpichconf.h"  /* defines MPIU_THREAD_PACKAGE_NAME */
+#include "mpichconf.h"  /* defines MPICH_THREAD_PACKAGE_NAME */
 #include "mpichconfconst.h"
 #include "mpidbg.h"
 #include "mpiassert.h"
@@ -21,19 +21,19 @@
 #include "mpimem.h"
 
 /* _INVALID exists to avoid accidental macro evaluations to 0 */
-#define MPIU_THREAD_PACKAGE_INVALID 0
-#define MPIU_THREAD_PACKAGE_NONE    1
-#define MPIU_THREAD_PACKAGE_POSIX   2
-#define MPIU_THREAD_PACKAGE_SOLARIS 3
-#define MPIU_THREAD_PACKAGE_WIN     4
+#define MPICH_THREAD_PACKAGE_INVALID 0
+#define MPICH_THREAD_PACKAGE_NONE    1
+#define MPICH_THREAD_PACKAGE_POSIX   2
+#define MPICH_THREAD_PACKAGE_SOLARIS 3
+#define MPICH_THREAD_PACKAGE_WIN     4
 
-#if defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_POSIX)
+#if defined(MPICH_THREAD_PACKAGE_NAME) && (MPICH_THREAD_PACKAGE_NAME == MPICH_THREAD_PACKAGE_POSIX)
 #  include "mpiu_thread_posix.h"
-#elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_SOLARIS)
+#elif defined(MPICH_THREAD_PACKAGE_NAME) && (MPICH_THREAD_PACKAGE_NAME == MPICH_THREAD_PACKAGE_SOLARIS)
 #  include "mpiu_thread_solaris.h"
-#elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_WIN)
+#elif defined(MPICH_THREAD_PACKAGE_NAME) && (MPICH_THREAD_PACKAGE_NAME == MPICH_THREAD_PACKAGE_WIN)
 #  include "mpiu_thread_win.h"
-#elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_NONE)
+#elif defined(MPICH_THREAD_PACKAGE_NAME) && (MPICH_THREAD_PACKAGE_NAME == MPICH_THREAD_PACKAGE_NONE)
 typedef int MPIU_Thread_mutex_t;
 typedef int MPIU_Thread_cond_t;
 typedef int MPIU_Thread_id_t;
@@ -55,7 +55,7 @@ typedef int MPIU_Thread_tls_t;
 typedef struct {
     int thread_provided;        /* Provided level of thread support */
 
-#if defined(MPICH_IS_THREADED) && !defined(MPIU_TLS_SPECIFIER)
+#if defined(MPICH_IS_THREADED) && !defined(MPICH_TLS_SPECIFIER)
     MPIU_Thread_tls_t thread_storage;   /* Id for perthread data */
 #endif
 
diff --git a/src/util/thread/mpiu_thread_posix.c b/src/util/thread/mpiu_thread_posix.c
index 22ba3d8..4315aa5 100644
--- a/src/util/thread/mpiu_thread_posix.c
+++ b/src/util/thread/mpiu_thread_posix.c
@@ -6,7 +6,7 @@
 
 /* common header includes */
 #include <stdlib.h>
-#include "mpichconf.h"  /* defines MPIU_THREAD_PACKAGE_NAME */
+#include "mpichconf.h"  /* defines MPICH_THREAD_PACKAGE_NAME */
 #include "mpl.h"
 #include "mpiutil.h"    /* for HAS_NO_SYMBOLS_WARNING */
 #include "mpiu_thread.h"
@@ -21,7 +21,7 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
  * header files and included as needed. [goodell@ 2009-06-24] */
 
 /* Implementation specific function definitions (usually in the form of macros) */
-#if defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_POSIX)
+#if defined(MPICH_THREAD_PACKAGE_NAME) && (MPICH_THREAD_PACKAGE_NAME == MPICH_THREAD_PACKAGE_POSIX)
 /* begin posix impl */
 
 /* stdio.h is needed for mpimem, which prototypes a few routines that
diff --git a/src/util/thread/mpiu_thread_priv.h b/src/util/thread/mpiu_thread_priv.h
index ea5ee17..38432e9 100644
--- a/src/util/thread/mpiu_thread_priv.h
+++ b/src/util/thread/mpiu_thread_priv.h
@@ -23,7 +23,7 @@
    the declaration.
 */
 
-#if !defined(MPIU_TLS_SPECIFIER)
+#if !defined(MPICH_TLS_SPECIFIER)
 /* We need to provide a function that will cleanup the storage attached
  * to the key.  */
 void MPIUI_Cleanup_tls(void *a);
@@ -99,11 +99,11 @@ extern MPIU_Per_thread_t MPIU_ThreadSingle;
         }                                                               \
         } while (0)
 
-#else /* defined(MPIU_TLS_SPECIFIER) */
+#else /* defined(MPICH_TLS_SPECIFIER) */
 
 /* We have proper thread-local storage (TLS) support from the compiler, which
  * should yield the best performance and simplest code, so we'll use that. */
-extern MPIU_TLS_SPECIFIER MPIU_Per_thread_t MPIU_Thread;
+extern MPICH_TLS_SPECIFIER MPIU_Per_thread_t MPIU_Thread;
 
 #define MPIU_THREADPRIV_INITKEY
 #define MPIU_THREADPRIV_INIT
@@ -112,6 +112,6 @@ extern MPIU_TLS_SPECIFIER MPIU_Per_thread_t MPIU_Thread;
 #define MPIU_THREADPRIV_FIELD(a_) (MPIU_Thread.a_)
 #define MPIU_THREADPRIV_FINALIZE do {} while (0)
 
-#endif /* defined(MPIU_TLS_SPECIFIER) */
+#endif /* defined(MPICH_TLS_SPECIFIER) */
 
 #endif /* !defined(MPIU_THREAD_PRIV_H_INCLUDED) */
diff --git a/src/util/thread/mpiu_thread_solaris.c b/src/util/thread/mpiu_thread_solaris.c
index 390185f..b4bee49 100644
--- a/src/util/thread/mpiu_thread_solaris.c
+++ b/src/util/thread/mpiu_thread_solaris.c
@@ -6,7 +6,7 @@
 
 /* common header includes */
 #include <stdlib.h>
-#include "mpichconf.h"  /* defines MPIU_THREAD_PACKAGE_NAME */
+#include "mpichconf.h"  /* defines MPICH_THREAD_PACKAGE_NAME */
 #include "mpl.h"
 #include "mpiutil.h"    /* for HAS_NO_SYMBOLS_WARNING */
 #include "mpiu_thread.h"
@@ -22,7 +22,7 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
 
 /* Implementation specific function definitions (usually in the form of macros) */
 
-#if defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_SOLARIS)
+#if defined(MPICH_THREAD_PACKAGE_NAME) && (MPICH_THREAD_PACKAGE_NAME == MPICH_THREAD_PACKAGE_SOLARIS)
 /* begin solaris impl */
 
 /*
diff --git a/src/util/thread/mpiu_thread_win.c b/src/util/thread/mpiu_thread_win.c
index 1afff43..d0f522e 100644
--- a/src/util/thread/mpiu_thread_win.c
+++ b/src/util/thread/mpiu_thread_win.c
@@ -6,7 +6,7 @@
 
 /* common header includes */
 #include <stdlib.h>
-#include "mpichconf.h"  /* defines MPIU_THREAD_PACKAGE_NAME */
+#include "mpichconf.h"  /* defines MPICH_THREAD_PACKAGE_NAME */
 #include "mpl.h"
 #include "mpiutil.h"    /* for HAS_NO_SYMBOLS_WARNING */
 #include "mpiu_thread.h"
@@ -22,7 +22,7 @@ MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
 
 /* Implementation specific function definitions (usually in the form of macros) */
 
-#if defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_WIN)
+#if defined(MPICH_THREAD_PACKAGE_NAME) && (MPICH_THREAD_PACKAGE_NAME == MPICH_THREAD_PACKAGE_WIN)
 /* begin win impl */
 
 #include "mpimem.h"

http://git.mpich.org/mpich.git/commitdiff/481d13c7c114f9218f8f5ec49511655a93393554

commit 481d13c7c114f9218f8f5ec49511655a93393554
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Aug 18 23:19:58 2015 -0500

    Remove unnecessary enum.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index 83f94db..64fc8ad 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -52,14 +52,6 @@ typedef int MPIU_Thread_tls_t;
 #  error MPIR_THREAD_GRANULARITY_LOCK_FREE not implemented yet
 #endif
 
-
-/* I don't have a better place for this at the moment, so it lives here for now. */
-enum MPIU_Thread_cs_name {
-    MPIU_THREAD_CS_NAME_GLOBAL = 0,
-    MPIU_THREAD_CS_NAME_POBJ,
-    MPIU_THREAD_CS_NUM_NAMES
-};
-
 typedef struct {
     int thread_provided;        /* Provided level of thread support */
 

http://git.mpich.org/mpich.git/commitdiff/652b2b90d1dcc9e0e7d8c6b0110c6a1ee49bb791

commit 652b2b90d1dcc9e0e7d8c6b0110c6a1ee49bb791
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Aug 18 23:14:33 2015 -0500

    MPICH_PerThread_t should be MPIU_Per_thread_t.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/thread/mpiu_thread.c b/src/util/thread/mpiu_thread.c
index c132d49..dc427f2 100644
--- a/src/util/thread/mpiu_thread.c
+++ b/src/util/thread/mpiu_thread.c
@@ -9,17 +9,17 @@
 #if !defined(MPICH_IS_THREADED)
 
 /* If single threaded, we preallocate this.  Otherwise, we create it */
-MPICH_PerThread_t MPIU_Thread = { 0 };
+MPIU_Per_thread_t MPIU_Thread = { 0 };
 
 #elif defined(MPIU_TLS_SPECIFIER)
 
-MPIU_TLS_SPECIFIER MPICH_PerThread_t MPIU_Thread = { 0 };
+MPIU_TLS_SPECIFIER MPIU_Per_thread_t MPIU_Thread = { 0 };
 
 #else /* defined(MPICH_IS_THREADED) && !defined(MPIU_TLS_SPECIFIER) */
 
 /* If we may be single threaded, we need a preallocated version to use
  * if we are single threaded case */
-MPICH_PerThread_t MPIU_ThreadSingle = { 0 };
+MPIU_Per_thread_t MPIU_ThreadSingle = { 0 };
 
 /* This routine is called when a thread exits; it is passed the value
  * associated with the key.  In our case, this is simply storage
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index 3ef12fd..83f94db 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -124,7 +124,7 @@ typedef struct {
 
     /* error string storage for MPIU_Strerror */
     char strerrbuf[MPIU_STRERROR_BUF_SIZE];
-} MPICH_PerThread_t;
+} MPIU_Per_thread_t;
 
 #if defined (MPICH_IS_THREADED)
 #include "mpiu_thread_multiple.h"
diff --git a/src/util/thread/mpiu_thread_priv.h b/src/util/thread/mpiu_thread_priv.h
index f6fa3ff..ea5ee17 100644
--- a/src/util/thread/mpiu_thread_priv.h
+++ b/src/util/thread/mpiu_thread_priv.h
@@ -32,17 +32,17 @@ void MPIUI_Cleanup_tls(void *a);
    need a blended version of the non-threaded and the thread-multiple
    definitions.
 
-   The approach is to have TWO MPICH_PerThread_t pointers.  One is local
+   The approach is to have TWO MPIU_Per_thread_t pointers.  One is local
    (The MPIU_THREADPRIV_DECL is used in the routines local definitions),
    as in the threaded version of these macros.  This is set by using a routine
    to get thread-private storage.  The second is a preallocated, extern
-   MPICH_PerThread_t struct, as in the single threaded case.  Based on
+   MPIU_Per_thread_t struct, as in the single threaded case.  Based on
    MPIR_Process.isThreaded, one or the other is used.
 
  */
 /* For the single threaded case, we use a preallocated structure
    This structure is allocated in src/mpi/init/initthread.c */
-extern MPICH_PerThread_t MPIU_ThreadSingle;
+extern MPIU_Per_thread_t MPIU_ThreadSingle;
 
 #define MPIU_THREADPRIV_INITKEY                                         \
     do {                                                                \
@@ -57,7 +57,7 @@ extern MPICH_PerThread_t MPIU_ThreadSingle;
     do {                                                                \
         if (MPIR_ThreadInfo.isThreaded) {                               \
             int init_err_;                                              \
-            MPIU_Thread_ptr = (MPICH_PerThread_t *) MPIU_Calloc(1, sizeof(MPICH_PerThread_t)); \
+            MPIU_Thread_ptr = (MPIU_Per_thread_t *) MPIU_Calloc(1, sizeof(MPIU_Per_thread_t)); \
             MPIU_Assert(MPIU_Thread_ptr);                               \
             MPIU_Thread_tls_set(&MPIR_ThreadInfo.thread_storage, (void *)MPIU_Thread_ptr, &init_err_); \
             MPIU_Assert(init_err_ == 0);                                \
@@ -83,7 +83,7 @@ extern MPICH_PerThread_t MPIU_ThreadSingle;
     } while (0)
 
 /* common definitions when using MPIU_Thread-based TLS */
-#define MPIU_THREADPRIV_DECL MPICH_PerThread_t *MPIU_Thread_ptr = NULL
+#define MPIU_THREADPRIV_DECL MPIU_Per_thread_t *MPIU_Thread_ptr = NULL
 #define MPIU_THREADPRIV_FIELD(a_) (MPIU_Thread_ptr->a_)
 #define MPIU_THREADPRIV_FINALIZE                                        \
     do {                                                                \
@@ -103,7 +103,7 @@ extern MPICH_PerThread_t MPIU_ThreadSingle;
 
 /* We have proper thread-local storage (TLS) support from the compiler, which
  * should yield the best performance and simplest code, so we'll use that. */
-extern MPIU_TLS_SPECIFIER MPICH_PerThread_t MPIU_Thread;
+extern MPIU_TLS_SPECIFIER MPIU_Per_thread_t MPIU_Thread;
 
 #define MPIU_THREADPRIV_INITKEY
 #define MPIU_THREADPRIV_INIT
diff --git a/src/util/thread/mpiu_thread_single.h b/src/util/thread/mpiu_thread_single.h
index 3d4df92..dbcb845 100644
--- a/src/util/thread/mpiu_thread_single.h
+++ b/src/util/thread/mpiu_thread_single.h
@@ -12,7 +12,7 @@
 
 /* If single threaded, make this point at a pre-allocated segment.
    This structure is allocated in src/mpi/init/initthread.c */
-extern MPICH_PerThread_t MPIU_Thread;
+extern MPIU_Per_thread_t MPIU_Thread;
 
 #define MPIU_THREADPRIV_INITKEY
 #define MPIU_THREADPRIV_INIT

http://git.mpich.org/mpich.git/commitdiff/8eb41fe7b8639d8e69281c5db9d984c357116a94

commit 8eb41fe7b8639d8e69281c5db9d984c357116a94
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Aug 18 23:02:56 2015 -0500

    Remove incorrect redundant structure name.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index 8ecf6be..3ef12fd 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -60,7 +60,7 @@ enum MPIU_Thread_cs_name {
     MPIU_THREAD_CS_NUM_NAMES
 };
 
-typedef struct MPIR_Thread_info_t {
+typedef struct {
     int thread_provided;        /* Provided level of thread support */
 
 #if defined(MPICH_IS_THREADED) && !defined(MPIU_TLS_SPECIFIER)
@@ -119,7 +119,7 @@ extern MPIR_Thread_info_t MPIR_ThreadInfo;
  * Note that any pointers to dynamically allocated memory stored in this
  * structure must be externally cleaned up.
  * */
-typedef struct MPICH_PerThread_t {
+typedef struct {
     int op_errno;               /* For errors in predefined MPI_Ops */
 
     /* error string storage for MPIU_Strerror */

http://git.mpich.org/mpich.git/commitdiff/1d32ecbbb488fa9fc1419bc96f1be4fb0f273d5a

commit 1d32ecbbb488fa9fc1419bc96f1be4fb0f273d5a
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Aug 18 23:01:41 2015 -0500

    Rename MPICH_ThreadInfo_t to MPIR_Thread_info_t.
    
    MPICH_ is used for configure generated constants.  MPI-level data
    structures should be named MPIR_.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index 8722eaa..293edac 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -84,7 +84,7 @@ int MPI_Init_thread(int *argc, char ***argv, int required, int *provided) __attr
 /* Global variables can be initialized here */
 MPICH_PerProcess_t MPIR_Process = { OPA_INT_T_INITIALIZER(MPICH_PRE_INIT) };
      /* all other fields in MPIR_Process are irrelevant */
-MPICH_ThreadInfo_t MPIR_ThreadInfo = { 0 };
+MPIR_Thread_info_t MPIR_ThreadInfo = { 0 };
 
 /* These are initialized as null (avoids making these into common symbols).
    If the Fortran binding is supported, these can be initialized to 
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index a567c5a..8ecf6be 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -60,7 +60,7 @@ enum MPIU_Thread_cs_name {
     MPIU_THREAD_CS_NUM_NAMES
 };
 
-typedef struct MPICH_ThreadInfo_t {
+typedef struct MPIR_Thread_info_t {
     int thread_provided;        /* Provided level of thread support */
 
 #if defined(MPICH_IS_THREADED) && !defined(MPIU_TLS_SPECIFIER)
@@ -92,8 +92,8 @@ typedef struct MPICH_ThreadInfo_t {
     MPIU_Thread_mutex_t pmi_mutex;
     MPIU_Thread_mutex_t memalloc_mutex; /* for MPIU_{Malloc,Free,Calloc} */
 #endif
-} MPICH_ThreadInfo_t;
-extern MPICH_ThreadInfo_t MPIR_ThreadInfo;
+} MPIR_Thread_info_t;
+extern MPIR_Thread_info_t MPIR_ThreadInfo;
 
 #define MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX      MPIR_ThreadInfo.global_mutex
 #define MPIR_THREAD_HANDLE_MUTEX      MPIR_ThreadInfo.handle_mutex

http://git.mpich.org/mpich.git/commitdiff/4cd47a98a9c5663be64d33ce9934525b0aa476bd

commit 4cd47a98a9c5663be64d33ce9934525b0aa476bd
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Aug 18 22:39:21 2015 -0500

    Rename files for consistency.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/thread/Makefile.mk b/src/util/thread/Makefile.mk
index c5bc0cb..39d134f 100644
--- a/src/util/thread/Makefile.mk
+++ b/src/util/thread/Makefile.mk
@@ -14,9 +14,9 @@ noinst_HEADERS +=                               \
     src/util/thread/mpiu_thread_global.h        \
     src/util/thread/mpiu_thread_pobj.h  	\
     src/util/thread/mpiu_thread_priv.h	      	\
-    src/util/thread/mpiu_thread_posix_funcs.h   \
-    src/util/thread/mpiu_thread_solaris_funcs.h \
-    src/util/thread/mpiu_thread_win_funcs.h
+    src/util/thread/mpiu_thread_posix.h   	\
+    src/util/thread/mpiu_thread_solaris.h 	\
+    src/util/thread/mpiu_thread_win.h
 
 mpi_core_sources += \
     src/util/thread/mpiu_thread.c \
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index cb4199f..a567c5a 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -28,11 +28,11 @@
 #define MPIU_THREAD_PACKAGE_WIN     4
 
 #if defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_POSIX)
-#  include "mpiu_thread_posix_funcs.h"
+#  include "mpiu_thread_posix.h"
 #elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_SOLARIS)
-#  include "mpiu_thread_solaris_funcs.h"
+#  include "mpiu_thread_solaris.h"
 #elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_WIN)
-#  include "mpiu_thread_win_funcs.h"
+#  include "mpiu_thread_win.h"
 #elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_NONE)
 typedef int MPIU_Thread_mutex_t;
 typedef int MPIU_Thread_cond_t;
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix.h
similarity index 99%
rename from src/util/thread/mpiu_thread_posix_funcs.h
rename to src/util/thread/mpiu_thread_posix.h
index d15f6a2..14c052c 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix.h
@@ -8,8 +8,8 @@
 /*
  * Threads
  */
-#ifndef MPIU_THREAD_POSIX_FUNCS_H_INCLUDED
-#define MPIU_THREAD_POSIX_FUNCS_H_INCLUDED
+#ifndef MPIU_THREAD_POSIX_H_INCLUDED
+#define MPIU_THREAD_POSIX_H_INCLUDED
 
 #include "mpiu_process_wrappers.h"      /* for MPIU_PW_Sched_yield */
 
@@ -285,4 +285,4 @@ void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t *
         *(int *)(err_ptr_) = MPIU_THREAD_SUCCESS;               \
     } while (0)
 
-#endif /* MPIU_THREAD_POSIX_FUNCS_H_INCLUDED */
+#endif /* MPIU_THREAD_POSIX_H_INCLUDED */
diff --git a/src/util/thread/mpiu_thread_solaris_funcs.h b/src/util/thread/mpiu_thread_solaris.h
similarity index 98%
rename from src/util/thread/mpiu_thread_solaris_funcs.h
rename to src/util/thread/mpiu_thread_solaris.h
index d70cb06..835d3f1 100644
--- a/src/util/thread/mpiu_thread_solaris_funcs.h
+++ b/src/util/thread/mpiu_thread_solaris.h
@@ -4,8 +4,8 @@
  *  (C) 2001 by Argonne National Laboratory.
  *      See COPYRIGHT in top-level directory.
  */
-#ifndef MPIU_THREAD_SOLARIS_FUNCS_H_INCLUDED
-#define MPIU_THREAD_SOLARIS_FUNCS_H_INCLUDED
+#ifndef MPIU_THREAD_SOLARIS_H_INCLUDED
+#define MPIU_THREAD_SOLARIS_H_INCLUDED
 
 #include <thread.h>
 #include <synch.h>
@@ -199,4 +199,4 @@ void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t *
         }                                                               \
     } while (0)
 
-#endif /* MPIU_THREAD_SOLARIS_FUNCS_H_INCLUDED */
+#endif /* MPIU_THREAD_SOLARIS_H_INCLUDED */
diff --git a/src/util/thread/mpiu_thread_win_funcs.h b/src/util/thread/mpiu_thread_win.h
similarity index 97%
rename from src/util/thread/mpiu_thread_win_funcs.h
rename to src/util/thread/mpiu_thread_win.h
index 11c0306..73b36c7 100644
--- a/src/util/thread/mpiu_thread_win_funcs.h
+++ b/src/util/thread/mpiu_thread_win.h
@@ -5,8 +5,8 @@
  *      See COPYRIGHT in top-level directory.
  */
 
-#ifndef MPIU_THREAD_WIN_FUNCS_H_INCLUDED
-#define MPIU_THREAD_WIN_FUNCS_H_INCLUDED
+#ifndef MPIU_THREAD_WIN_H_INCLUDED
+#define MPIU_THREAD_WIN_H_INCLUDED
 
 #define WIN32_LEAN_AND_MEAN
 
@@ -103,4 +103,4 @@ void MPIU_Thread_cond_signal(MPIU_Thread_cond_t * cond, int *err);
         }                                                               \
     } while (0)
 
-#endif /* MPIU_THREAD_WIN_FUNCS_H_INCLUDED */
+#endif /* MPIU_THREAD_WIN_H_INCLUDED */

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

commit c48eb2e980b02fe930850b8ce8e5a497d347d836
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Aug 18 20:23:53 2015 -0500

    Remove unused macro.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index 5540077..d15f6a2 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -25,8 +25,6 @@ typedef pthread_cond_t MPIU_Thread_cond_t;
 typedef pthread_t MPIU_Thread_id_t;
 typedef pthread_key_t MPIU_Thread_tls_t;
 
-#define MPIU_THREAD_TLS_T_NULL 0
-
 #if defined(NEEDS_PTHREAD_MUTEXATTR_SETTYPE_DECL)
 int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
 #endif /* NEEDS_PTHREAD_MUTEXATTR_SETTYPE_DECL */

http://git.mpich.org/mpich.git/commitdiff/2585ac4257b5d91c3d27bc0f779efb59233fecc2

commit 2585ac4257b5d91c3d27bc0f779efb59233fecc2
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Aug 18 20:21:05 2015 -0500

    Get rid of the types/funcs separation for each threads implementation.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/thread/Makefile.mk b/src/util/thread/Makefile.mk
index edf143b..c5bc0cb 100644
--- a/src/util/thread/Makefile.mk
+++ b/src/util/thread/Makefile.mk
@@ -15,11 +15,8 @@ noinst_HEADERS +=                               \
     src/util/thread/mpiu_thread_pobj.h  	\
     src/util/thread/mpiu_thread_priv.h	      	\
     src/util/thread/mpiu_thread_posix_funcs.h   \
-    src/util/thread/mpiu_thread_posix_types.h   \
     src/util/thread/mpiu_thread_solaris_funcs.h \
-    src/util/thread/mpiu_thread_solaris_types.h \
-    src/util/thread/mpiu_thread_win_funcs.h     \
-    src/util/thread/mpiu_thread_win_types.h
+    src/util/thread/mpiu_thread_win_funcs.h
 
 mpi_core_sources += \
     src/util/thread/mpiu_thread.c \
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index 82461e6..cb4199f 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -28,11 +28,11 @@
 #define MPIU_THREAD_PACKAGE_WIN     4
 
 #if defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_POSIX)
-#  include "mpiu_thread_posix_types.h"
+#  include "mpiu_thread_posix_funcs.h"
 #elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_SOLARIS)
-#  include "mpiu_thread_solaris_types.h"
+#  include "mpiu_thread_solaris_funcs.h"
 #elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_WIN)
-#  include "mpiu_thread_win_types.h"
+#  include "mpiu_thread_win_funcs.h"
 #elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_NONE)
 typedef int MPIU_Thread_mutex_t;
 typedef int MPIU_Thread_cond_t;
@@ -46,20 +46,6 @@ typedef int MPIU_Thread_tls_t;
 #define MPIU_THREAD_SUCCESS 0
 /* FIXME: Define other error codes.  For now, any non-zero value is an error. */
 
-/* Implementation specific function definitions (usually in the form of macros) */
-#if defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_POSIX)
-#  include "mpiu_thread_posix_funcs.h"
-#elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_SOLARIS)
-#  include "mpiu_thread_solaris_funcs.h"
-#elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_WIN)
-#  include "mpiu_thread_win_funcs.h"
-#elif defined(MPIU_THREAD_PACKAGE_NAME) && (MPIU_THREAD_PACKAGE_NAME == MPIU_THREAD_PACKAGE_NONE)
-/* do nothing */
-#else
-#  error "thread package not defined or unknown"
-#endif
-
-
 #if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_INVALID
 #  error Invalid thread granularity option specified (possibly none)
 #elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_LOCK_FREE
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index d777cb9..5540077 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -13,6 +13,20 @@
 
 #include "mpiu_process_wrappers.h"      /* for MPIU_PW_Sched_yield */
 
+#include <errno.h>
+#include <pthread.h>
+#include "opa_primitives.h"
+
+typedef struct {
+    pthread_mutex_t mutex;
+    OPA_int_t num_queued_threads;
+} MPIU_Thread_mutex_t;
+typedef pthread_cond_t MPIU_Thread_cond_t;
+typedef pthread_t MPIU_Thread_id_t;
+typedef pthread_key_t MPIU_Thread_tls_t;
+
+#define MPIU_THREAD_TLS_T_NULL 0
+
 #if defined(NEEDS_PTHREAD_MUTEXATTR_SETTYPE_DECL)
 int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
 #endif /* NEEDS_PTHREAD_MUTEXATTR_SETTYPE_DECL */
diff --git a/src/util/thread/mpiu_thread_posix_types.h b/src/util/thread/mpiu_thread_posix_types.h
deleted file mode 100644
index 024e590..0000000
--- a/src/util/thread/mpiu_thread_posix_types.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- *
- *  (C) 2001 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-#ifndef MPIU_THREAD_POSIX_TYPES_H_INCLUDED
-#define MPIU_THREAD_POSIX_TYPES_H_INCLUDED
-
-#include <errno.h>
-#include <pthread.h>
-#include "opa_primitives.h"
-
-typedef struct {
-    pthread_mutex_t mutex;
-    OPA_int_t num_queued_threads;
-} MPIU_Thread_mutex_t;
-typedef pthread_cond_t MPIU_Thread_cond_t;
-typedef pthread_t MPIU_Thread_id_t;
-typedef pthread_key_t MPIU_Thread_tls_t;
-
-#define MPIU_THREAD_TLS_T_NULL 0
-
-#endif /* MPIU_THREAD_POSIX_TYPES_H_INCLUDED */
diff --git a/src/util/thread/mpiu_thread_solaris_funcs.h b/src/util/thread/mpiu_thread_solaris_funcs.h
index 9bf971b..d70cb06 100644
--- a/src/util/thread/mpiu_thread_solaris_funcs.h
+++ b/src/util/thread/mpiu_thread_solaris_funcs.h
@@ -7,6 +7,14 @@
 #ifndef MPIU_THREAD_SOLARIS_FUNCS_H_INCLUDED
 #define MPIU_THREAD_SOLARIS_FUNCS_H_INCLUDED
 
+#include <thread.h>
+#include <synch.h>
+
+typedef mutex_t MPIU_Thread_mutex_t;
+typedef cond_t MPIU_Thread_cond_t;
+typedef thread_t MPIU_Thread_id_t;
+typedef thread_key_t MPIU_Thread_key_t;
+
 typedef void (*MPIU_Thread_func_t) (void *data);
 void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t * id, int *err);
 
diff --git a/src/util/thread/mpiu_thread_solaris_types.h b/src/util/thread/mpiu_thread_solaris_types.h
deleted file mode 100644
index 25530c5..0000000
--- a/src/util/thread/mpiu_thread_solaris_types.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- *
- *  (C) 2001 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-
-#ifndef MPIU_THREAD_SOLARIS_TYPES_H_INCLUDED
-#define MPIU_THREAD_SOLARIS_TYPES_H_INCLUDED
-
-#include <thread.h>
-#include <synch.h>
-
-typedef mutex_t MPIU_Thread_mutex_t;
-typedef cond_t MPIU_Thread_cond_t;
-typedef thread_t MPIU_Thread_id_t;
-typedef thread_key_t MPIU_Thread_key_t;
-
-#endif /* MPIU_THREAD_SOLARIS_TYPES_H_INCLUDED */
diff --git a/src/util/thread/mpiu_thread_win_funcs.h b/src/util/thread/mpiu_thread_win_funcs.h
index c37af40..11c0306 100644
--- a/src/util/thread/mpiu_thread_win_funcs.h
+++ b/src/util/thread/mpiu_thread_win_funcs.h
@@ -8,6 +8,24 @@
 #ifndef MPIU_THREAD_WIN_FUNCS_H_INCLUDED
 #define MPIU_THREAD_WIN_FUNCS_H_INCLUDED
 
+#define WIN32_LEAN_AND_MEAN
+
+#include <windows.h>
+
+typedef HANDLE MPIU_Thread_mutex_t;
+typedef HANDLE MPIU_Thread_id_t;
+typedef DWORD MPIU_Thread_tls_t;
+
+typedef struct MPIU_Thread_cond_fifo_t {
+    HANDLE event;
+    struct MPIU_Thread_cond_fifo_t *next;
+} MPIU_Thread_cond_fifo_t;
+typedef struct MPIU_Thread_cond_t {
+    MPIU_Thread_tls_t tls;
+    MPIU_Thread_mutex_t fifo_mutex;
+    MPIU_Thread_cond_fifo_t *fifo_head, *fifo_tail;
+} MPIU_Thread_cond_t;
+
 typedef void (*MPIU_Thread_func_t) (void *data);
 
 void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t * id, int *err);
diff --git a/src/util/thread/mpiu_thread_win_types.h b/src/util/thread/mpiu_thread_win_types.h
deleted file mode 100644
index a2d3286..0000000
--- a/src/util/thread/mpiu_thread_win_types.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- *
- *  (C) 2001 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-
-/* For "historical" reasons windows.h includes winsock.h
- * internally and WIN32_MEAN_AND_LEAN is to be defined
- * if we plan to include winsock2.h later on -- in the
- * include hierarchy -- to prevent type redefinition
- * errors...
- */
-#ifndef MPIU_THREAD_WIN_TYPES_H_INCLUDED
-#define MPIU_THREAD_WIN_TYPES_H_INCLUDED
-
-#define WIN32_LEAN_AND_MEAN
-
-#include <windows.h>
-
-typedef HANDLE MPIU_Thread_mutex_t;
-typedef HANDLE MPIU_Thread_id_t;
-typedef DWORD MPIU_Thread_tls_t;
-
-typedef struct MPIU_Thread_cond_fifo_t {
-    HANDLE event;
-    struct MPIU_Thread_cond_fifo_t *next;
-} MPIU_Thread_cond_fifo_t;
-typedef struct MPIU_Thread_cond_t {
-    MPIU_Thread_tls_t tls;
-    MPIU_Thread_mutex_t fifo_mutex;
-    MPIU_Thread_cond_fifo_t *fifo_head, *fifo_tail;
-} MPIU_Thread_cond_t;
-
-#endif /* MPIU_THREAD_WIN_TYPES_H_INCLUDED */

http://git.mpich.org/mpich.git/commitdiff/652f3da913c5504a4b028ba098a344658fad1392

commit 652f3da913c5504a4b028ba098a344658fad1392
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Aug 18 20:15:22 2015 -0500

    Have each threads implementation define what it exposes as functions/macros.
    
    We were incorrectly creating function prototypes for all API calls,
    while some implementations were implementing it as macros.  With this
    patch, each implementation decides what is a function (and hence needs
    a prototype) vs. what is a macro.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index d5fdc13..82461e6 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -42,33 +42,6 @@ typedef int MPIU_Thread_tls_t;
 #  error "thread package not defined or unknown"
 #endif
 
-/*
- * threading function prototypes
- *
- * Typically some or all of these are actually implemented as macros
- * rather than actual or even inline functions.
- */
-
-typedef void (*MPIU_Thread_func_t) (void *data);
-
-void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t * id, int *err);
-void MPIU_Thread_exit(void);
-void MPIU_Thread_self(MPIU_Thread_id_t * id);
-void MPIU_Thread_same(MPIU_Thread_id_t * id1, MPIU_Thread_id_t * id2, int *same);
-void MPIU_Thread_yield(void);
-
-void MPIU_Thread_mutex_create(MPIU_Thread_mutex_t * mutex, int *err);
-void MPIU_Thread_mutex_destroy(MPIU_Thread_mutex_t * mutex, int *err);
-void MPIU_Thread_mutex_lock(MPIU_Thread_mutex_t * mutex, int *err);
-void MPIU_Thread_mutex_unlock(MPIU_Thread_mutex_t * mutex, int *err);
-
-void MPIU_Thread_cond_create(MPIU_Thread_cond_t * cond, int *err);
-void MPIU_Thread_cond_destroy(MPIU_Thread_cond_t * cond, int *err);
-void MPIU_Thread_cond_wait(MPIU_Thread_cond_t * cond, MPIU_Thread_mutex_t * mutex, int *err);
-void MPIU_Thread_cond_broadcast(MPIU_Thread_cond_t * cond, int *err);
-void MPIU_Thread_cond_signal(MPIU_Thread_cond_t * cond, int *err);
-
-
 /* Error values */
 #define MPIU_THREAD_SUCCESS 0
 /* FIXME: Define other error codes.  For now, any non-zero value is an error. */
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index 326c3bf..d777cb9 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -17,7 +17,8 @@
 int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
 #endif /* NEEDS_PTHREAD_MUTEXATTR_SETTYPE_DECL */
 
-/* MPIU_Thread_create() defined in mpiu_thread_posix.c */
+typedef void (*MPIU_Thread_func_t) (void *data);
+void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t * id, int *err);
 
 #define MPIU_Thread_exit()			\
     do {                                        \
diff --git a/src/util/thread/mpiu_thread_solaris_funcs.h b/src/util/thread/mpiu_thread_solaris_funcs.h
index 3556ecc..9bf971b 100644
--- a/src/util/thread/mpiu_thread_solaris_funcs.h
+++ b/src/util/thread/mpiu_thread_solaris_funcs.h
@@ -7,12 +7,13 @@
 #ifndef MPIU_THREAD_SOLARIS_FUNCS_H_INCLUDED
 #define MPIU_THREAD_SOLARIS_FUNCS_H_INCLUDED
 
+typedef void (*MPIU_Thread_func_t) (void *data);
+void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t * id, int *err);
+
 /*
  * Threads
  */
 
-/* MPIU_Thread_create() defined in mpiu_thread.c */
-
 #define MPIU_Thread_exit()			\
     do {                                        \
         thr_exit(NULL);				\
diff --git a/src/util/thread/mpiu_thread_win_funcs.h b/src/util/thread/mpiu_thread_win_funcs.h
index 0280b2c..c37af40 100644
--- a/src/util/thread/mpiu_thread_win_funcs.h
+++ b/src/util/thread/mpiu_thread_win_funcs.h
@@ -8,6 +8,25 @@
 #ifndef MPIU_THREAD_WIN_FUNCS_H_INCLUDED
 #define MPIU_THREAD_WIN_FUNCS_H_INCLUDED
 
+typedef void (*MPIU_Thread_func_t) (void *data);
+
+void MPIU_Thread_create(MPIU_Thread_func_t func, void *data, MPIU_Thread_id_t * id, int *err);
+void MPIU_Thread_exit(void);
+void MPIU_Thread_self(MPIU_Thread_id_t * id);
+void MPIU_Thread_same(MPIU_Thread_id_t * id1, MPIU_Thread_id_t * id2, int *same);
+void MPIU_Thread_yield(void);
+
+void MPIU_Thread_mutex_create(MPIU_Thread_mutex_t * mutex, int *err);
+void MPIU_Thread_mutex_destroy(MPIU_Thread_mutex_t * mutex, int *err);
+void MPIU_Thread_mutex_lock(MPIU_Thread_mutex_t * mutex, int *err);
+void MPIU_Thread_mutex_unlock(MPIU_Thread_mutex_t * mutex, int *err);
+
+void MPIU_Thread_cond_create(MPIU_Thread_cond_t * cond, int *err);
+void MPIU_Thread_cond_destroy(MPIU_Thread_cond_t * cond, int *err);
+void MPIU_Thread_cond_wait(MPIU_Thread_cond_t * cond, MPIU_Thread_mutex_t * mutex, int *err);
+void MPIU_Thread_cond_broadcast(MPIU_Thread_cond_t * cond, int *err);
+void MPIU_Thread_cond_signal(MPIU_Thread_cond_t * cond, int *err);
+
 /*
  * Thread Local Storage
  */

http://git.mpich.org/mpich.git/commitdiff/405da02e4c6ba2fbe471ce7837905ef47a542bfe

commit 405da02e4c6ba2fbe471ce7837905ef47a542bfe
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Aug 18 19:55:40 2015 -0500

    Separate out thread_storage to be only be available for thread multiple.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index 36751b3..d5fdc13 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -103,12 +103,14 @@ enum MPIU_Thread_cs_name {
 
 typedef struct MPICH_ThreadInfo_t {
     int thread_provided;        /* Provided level of thread support */
+
+#if defined(MPICH_IS_THREADED) && !defined(MPIU_TLS_SPECIFIER)
+    MPIU_Thread_tls_t thread_storage;   /* Id for perthread data */
+#endif
+
     /* This is a special case for is_thread_main, which must be
      * implemented even if MPICH itself is single threaded.  */
-#if (MPICH_THREAD_LEVEL >= MPI_THREAD_SERIALIZED)
-#  if !defined(MPIU_TLS_SPECIFIER)
-    MPIU_Thread_tls_t thread_storage;   /* Id for perthread data */
-#  endif                        /* !TLS */
+#if MPICH_THREAD_LEVEL >= MPI_THREAD_SERIALIZED
     MPIU_Thread_id_t master_thread;     /* Thread that started MPI */
 #endif
 

http://git.mpich.org/mpich.git/commitdiff/1e4ebcd0e6ef7beb01547a2f73cc6b0ba7abc291

commit 1e4ebcd0e6ef7beb01547a2f73cc6b0ba7abc291
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Aug 18 19:30:02 2015 -0500

    Make memalloc_mutex consistent with the other mutexes.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index 8f7ec82..8722eaa 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -168,14 +168,6 @@ static int thread_cs_init( void )
     int err;
     MPIU_THREADPRIV_DECL;
 
-    /* we create this at all granularities right now */
-    MPID_Thread_mutex_create(&MPIR_THREAD_MEMALLOC_MUTEX, &err);
-    MPIU_Assert(err == 0);
-
-    /* must come after memalloc_mutex creation */
-    MPIU_THREADPRIV_INITKEY;
-    MPIU_THREADPRIV_INIT;
-
 #if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL
 /* There is a single, global lock, held for the duration of an MPI call */
     MPID_Thread_mutex_create(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err);
@@ -195,6 +187,8 @@ static int thread_cs_init( void )
     MPIU_Assert(err == 0);
     MPID_Thread_mutex_create(&MPIR_THREAD_PMI_MUTEX, &err);
     MPIU_Assert(err == 0);
+    MPID_Thread_mutex_create(&MPIR_THREAD_MEMALLOC_MUTEX, &err);
+    MPIU_Assert(err == 0);
 
 #elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_LOCK_FREE
 /* Updates to shared data and access to shared services is handled without 
@@ -207,6 +201,10 @@ static int thread_cs_init( void )
 #else
 #error Unrecognized thread granularity
 #endif
+
+    MPIU_THREADPRIV_INITKEY;
+    MPIU_THREADPRIV_INIT;
+
     MPIU_DBG_MSG(THREAD,TYPICAL,"Created global mutex and private storage");
     return MPI_SUCCESS;
 }
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index 1c3afa8..36751b3 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -129,9 +129,6 @@ typedef struct MPICH_ThreadInfo_t {
     MPIU_Thread_mutex_t completion_mutex;
     MPIU_Thread_mutex_t ctx_mutex;
     MPIU_Thread_mutex_t pmi_mutex;
-#endif
-
-#if (MPICH_THREAD_LEVEL >= MPI_THREAD_SERIALIZED)
     MPIU_Thread_mutex_t memalloc_mutex; /* for MPIU_{Malloc,Free,Calloc} */
 #endif
 } MPICH_ThreadInfo_t;

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

commit e3a08a394a86c01d577fd2d3380519d979bc5c8c
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Aug 18 17:52:56 2015 -0500

    Handle mutex is only used in the per-object code.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index 03af8d0..8f7ec82 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -180,8 +180,6 @@ static int thread_cs_init( void )
 /* There is a single, global lock, held for the duration of an MPI call */
     MPID_Thread_mutex_create(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err);
     MPIU_Assert(err == 0);
-    MPID_Thread_mutex_create(&MPIR_THREAD_HANDLE_MUTEX, &err);
-    MPIU_Assert(err == 0);
 
 #elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT
     /* MPIR_THREAD_GRANULARITY_PER_OBJECT: Multiple locks */
@@ -226,8 +224,6 @@ int MPIR_Thread_CS_Finalize( void )
 /* There is a single, global lock, held for the duration of an MPI call */
     MPID_Thread_mutex_destroy(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err);
     MPIU_Assert(err == 0);
-    MPID_Thread_mutex_destroy(&MPIR_THREAD_HANDLE_MUTEX, &err);
-    MPIU_Assert(err == 0);
 
 #elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT
     /* MPIR_THREAD_GRANULARITY_PER_OBJECT: There are multiple locks,
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index 42cd56f..1c3afa8 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -121,10 +121,10 @@ typedef struct MPICH_ThreadInfo_t {
 #if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL || \
     MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT
     MPIU_Thread_mutex_t global_mutex;
-    MPIU_Thread_mutex_t handle_mutex;
 #endif
 
 #if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT
+    MPIU_Thread_mutex_t handle_mutex;
     MPIU_Thread_mutex_t msgq_mutex;
     MPIU_Thread_mutex_t completion_mutex;
     MPIU_Thread_mutex_t ctx_mutex;

http://git.mpich.org/mpich.git/commitdiff/94202a803712c9216bb556cf103263f4dad26c61

commit 94202a803712c9216bb556cf103263f4dad26c61
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Aug 18 17:52:39 2015 -0500

    Remove unused variable.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index dd6103a..42cd56f 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -133,7 +133,6 @@ typedef struct MPICH_ThreadInfo_t {
 
 #if (MPICH_THREAD_LEVEL >= MPI_THREAD_SERIALIZED)
     MPIU_Thread_mutex_t memalloc_mutex; /* for MPIU_{Malloc,Free,Calloc} */
-    MPIU_Thread_id_t cs_holder[MPIU_THREAD_CS_NUM_NAMES];
 #endif
 } MPICH_ThreadInfo_t;
 extern MPICH_ThreadInfo_t MPIR_ThreadInfo;

http://git.mpich.org/mpich.git/commitdiff/123e516a49f67257cd329f36d1a999bf6a2314b7

commit 123e516a49f67257cd329f36d1a999bf6a2314b7
Author: Pavan Balaji <balaji at anl.gov>
Date:   Tue Aug 18 17:52:06 2015 -0500

    Remove mpiu_timer.h.
    
    There's no timer functionality used in the threading code.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index 83b8e3d..dd6103a 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -12,11 +12,7 @@
 #include "mpichconfconst.h"
 #include "mpidbg.h"
 #include "mpiassert.h"
-/* Time stamps */
-/* Get the timer definitions.  The source file for this include is
-   src/util/timers/mpiu_timer.h.in */
 #include "mpiu_strerror.h"
-#include "mpiu_timer.h"
 
 /* FIXME: we should not be including an MPIR-level header here.  But
  * the code is currently a rat-hole where the MPIU and MPIR functions

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

Summary of changes:
 confdb/ax_tls.m4                                   |    4 +-
 configure.ac                                       |   22 ++--
 src/binding/fortran/use_mpi/create_f90_complex.c   |    1 -
 src/binding/fortran/use_mpi/create_f90_int.c       |    1 -
 src/binding/fortran/use_mpi/create_f90_real.c      |    1 -
 src/include/mpichconfconst.h                       |   10 +-
 src/mpi/attr/comm_create_keyval.c                  |    2 +-
 src/mpi/attr/type_create_keyval.c                  |    2 +-
 src/mpi/attr/win_create_keyval.c                   |    2 +-
 src/mpi/coll/exscan.c                              |   10 +-
 src/mpi/coll/ireduce.c                             |    6 +-
 src/mpi/coll/op_create.c                           |    2 +-
 src/mpi/coll/opband.c                              |    6 +-
 src/mpi/coll/opbor.c                               |    6 +-
 src/mpi/coll/opbxor.c                              |    6 +-
 src/mpi/coll/opland.c                              |    6 +-
 src/mpi/coll/oplor.c                               |    6 +-
 src/mpi/coll/oplxor.c                              |    6 +-
 src/mpi/coll/opmax.c                               |    6 +-
 src/mpi/coll/opmaxloc.c                            |    6 +-
 src/mpi/coll/opmin.c                               |    6 +-
 src/mpi/coll/opminloc.c                            |    6 +-
 src/mpi/coll/opprod.c                              |    6 +-
 src/mpi/coll/opsum.c                               |    6 +-
 src/mpi/coll/red_scat.c                            |   10 +-
 src/mpi/coll/red_scat_block.c                      |   10 +-
 src/mpi/coll/reduce.c                              |   10 +-
 src/mpi/coll/reduce_local.c                        |   10 +-
 src/mpi/coll/scan.c                                |   14 +-
 src/mpi/comm/comm_create.c                         |    2 +-
 src/mpi/comm/comm_create_group.c                   |    2 +-
 src/mpi/comm/comm_dup.c                            |    2 +-
 src/mpi/comm/comm_dup_with_info.c                  |    2 +-
 src/mpi/comm/comm_idup.c                           |    2 +-
 src/mpi/comm/comm_shrink.c                         |    2 +-
 src/mpi/comm/comm_split.c                          |    2 +-
 src/mpi/comm/comm_split_type.c                     |    2 +-
 src/mpi/comm/intercomm_create.c                    |    2 +-
 src/mpi/comm/intercomm_merge.c                     |    6 +-
 src/mpi/datatype/register_datarep.c                |    2 +-
 src/mpi/datatype/type_contiguous.c                 |    2 +-
 src/mpi/datatype/type_create_darray.c              |    2 +-
 src/mpi/datatype/type_create_hindexed.c            |    2 +-
 src/mpi/datatype/type_create_hindexed_block.c      |    2 +-
 src/mpi/datatype/type_create_hvector.c             |    2 +-
 src/mpi/datatype/type_create_indexed_block.c       |    2 +-
 src/mpi/datatype/type_create_resized.c             |    2 +-
 src/mpi/datatype/type_create_struct.c              |    2 +-
 src/mpi/datatype/type_create_subarray.c            |    2 +-
 src/mpi/datatype/type_dup.c                        |    2 +-
 src/mpi/datatype/type_hindexed.c                   |    2 +-
 src/mpi/datatype/type_hvector.c                    |    2 +-
 src/mpi/datatype/type_indexed.c                    |    2 +-
 src/mpi/datatype/type_match_size.c                 |    4 +-
 src/mpi/datatype/type_struct.c                     |    2 +-
 src/mpi/datatype/type_vector.c                     |    2 +-
 src/mpi/errhan/comm_create_errhandler.c            |    2 +-
 src/mpi/errhan/errnames.txt                        |   12 +-
 src/mpi/errhan/file_call_errhandler.c              |    4 +-
 src/mpi/errhan/file_create_errhandler.c            |    2 +-
 src/mpi/errhan/win_call_errhandler.c               |    4 +-
 src/mpi/errhan/win_create_errhandler.c             |    2 +-
 src/mpi/group/group_difference.c                   |    2 +-
 src/mpi/group/group_excl.c                         |    2 +-
 src/mpi/group/group_incl.c                         |    2 +-
 src/mpi/group/group_intersection.c                 |    2 +-
 src/mpi/group/group_range_excl.c                   |    2 +-
 src/mpi/group/group_range_incl.c                   |    2 +-
 src/mpi/group/group_union.c                        |    2 +-
 src/mpi/init/async.c                               |   28 +++---
 src/mpi/init/initthread.c                          |   44 +++----
 src/mpi/pt2pt/bsend_init.c                         |    2 +-
 src/mpi/pt2pt/greq_start.c                         |    4 +-
 src/mpi/pt2pt/ibsend.c                             |    2 +-
 src/mpi/pt2pt/recv_init.c                          |    2 +-
 src/mpi/pt2pt/rsend_init.c                         |    2 +-
 src/mpi/pt2pt/send_init.c                          |    2 +-
 src/mpi/pt2pt/ssend_init.c                         |    2 +-
 src/mpi/rma/win_allocate.c                         |    2 +-
 src/mpi/rma/win_allocate_shared.c                  |    2 +-
 src/mpi/rma/win_create.c                           |    2 +-
 src/mpi/rma/win_create_dynamic.c                   |    2 +-
 src/mpi/romio/adio/include/adioi.h                 |    2 +-
 src/mpi/romio/mpi-io/get_errh.c                    |    2 +-
 src/mpi/romio/mpi-io/ioreq_c2f.c                   |    2 +-
 src/mpi/romio/mpi-io/ioreq_f2c.c                   |    2 +-
 src/mpi/romio/mpi-io/iotest.c                      |    2 +-
 src/mpi/romio/mpi-io/iotestall.c                   |    2 +-
 src/mpi/romio/mpi-io/iotestany.c                   |    2 +-
 src/mpi/romio/mpi-io/iotestsome.c                  |    2 +-
 src/mpi/romio/mpi-io/iowait.c                      |    2 +-
 src/mpi/romio/mpi-io/iowaitall.c                   |    2 +-
 src/mpi/romio/mpi-io/iowaitany.c                   |    2 +-
 src/mpi/romio/mpi-io/iowaitsome.c                  |    2 +-
 src/mpi/romio/mpi-io/set_errh.c                    |    2 +-
 src/mpi/spawn/comm_accept.c                        |    2 +-
 src/mpi/spawn/comm_connect.c                       |    2 +-
 src/mpi/spawn/comm_join.c                          |    2 +-
 src/mpi/spawn/comm_spawn.c                         |    2 +-
 src/mpi/spawn/comm_spawn_multiple.c                |    2 +-
 src/mpi/topo/cart_create.c                         |    2 +-
 src/mpi/topo/dist_gr_create.c                      |    2 +-
 src/mpi/topo/dist_gr_create_adj.c                  |    2 +-
 src/mpi/topo/graphcreate.c                         |    2 +-
 src/mpid/ch3/channels/nemesis/src/ch3_progress.c   |   14 +-
 src/mpid/ch3/channels/sock/src/ch3_progress.c      |    8 +-
 src/mpid/ch3/include/mpid_thread.h                 |    8 ++
 src/mpid/ch3/include/mpidimpl.h                    |   16 ++--
 src/mpid/ch3/src/mpid_vc.c                         |    2 +-
 src/mpid/common/sock/iocp/sock.c                   |    6 +-
 src/mpid/common/sock/poll/sock_wait.i              |    2 +-
 src/mpid/common/thread/mpidu_thread_fallback.h     |    9 ++
 src/mpid/pamid/include/mpidi_macros.h              |   10 +-
 src/mpid/pamid/include/mpidi_mutex.h               |    6 +-
 src/mpid/pamid/include/mpidi_thread.h              |    6 +-
 src/mpid/pamid/src/mpid_init.c                     |   12 +-
 src/mpid/pamid/src/mpid_progress.c                 |    6 +-
 src/mpid/pamid/src/mpid_progress.h                 |    2 +-
 src/mpid/pamid/src/mpid_request.c                  |    2 +-
 src/mpid/pamid/src/mpidi_env.c                     |   12 +-
 src/mpid/pamid/src/pt2pt/mpid_cancel.c             |    4 +-
 src/mpid/pamid/src/pt2pt/mpid_isend.h              |    2 +-
 src/nameserv/pmi/pmi_nameserv.c                    |    6 +-
 src/util/mem/strerror.c                            |    6 +-
 src/util/thread/Makefile.mk                        |    9 +-
 src/util/thread/mpiu_thread.c                      |   10 +-
 src/util/thread/mpiu_thread.h                      |  117 +++++--------------
 src/util/thread/mpiu_thread_global.h               |   12 +-
 src/util/thread/mpiu_thread_multiple.h             |   18 ++--
 src/util/thread/mpiu_thread_pobj.h                 |   12 +-
 src/util/thread/mpiu_thread_posix.c                |   26 ++--
 ...iu_thread_posix_funcs.h => mpiu_thread_posix.h} |   21 +++-
 src/util/thread/mpiu_thread_posix_types.h          |   24 ----
 src/util/thread/mpiu_thread_priv.h                 |   40 ++++----
 src/util/thread/mpiu_thread_single.h               |    4 +-
 src/util/thread/mpiu_thread_solaris.c              |   26 ++--
 ...hread_solaris_funcs.h => mpiu_thread_solaris.h} |   18 ++-
 src/util/thread/mpiu_thread_solaris_types.h        |   19 ---
 src/util/thread/mpiu_thread_win.c                  |   36 +++---
 .../{mpiu_thread_win_funcs.h => mpiu_thread_win.h} |   43 +++++++-
 src/util/thread/mpiu_thread_win_types.h            |   35 ------
 141 files changed, 484 insertions(+), 554 deletions(-)
 rename src/util/thread/{mpiu_thread_posix_funcs.h => mpiu_thread_posix.h} (96%)
 delete mode 100644 src/util/thread/mpiu_thread_posix_types.h
 rename src/util/thread/{mpiu_thread_solaris_funcs.h => mpiu_thread_solaris.h} (95%)
 delete mode 100644 src/util/thread/mpiu_thread_solaris_types.h
 rename src/util/thread/{mpiu_thread_win_funcs.h => mpiu_thread_win.h} (67%)
 delete mode 100644 src/util/thread/mpiu_thread_win_types.h


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list