commits
Threads by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
August 2015
- 1 participants
- 51 discussions
[mpich] MPICH primary repository branch, master, updated. v3.2b4-188-g78bc8c8
by noreply@mpich.org 21 Aug '15
by noreply@mpich.org 21 Aug '15
21 Aug '15
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 78bc8c8a11ed5e2a3e38b0f72c397fcd9e76bfc1 (commit)
from f291cee1c7e7905875bbd7d464752532b0bc8379 (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/78bc8c8a11ed5e2a3e38b0f72c397fcd9…
commit 78bc8c8a11ed5e2a3e38b0f72c397fcd9e76bfc1
Author: Charles J Archer <charles.j.archer(a)intel.com>
Date: Thu Aug 20 10:16:07 2015 -0700
Thread package none compile/link fix
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index a39d9d5..cd96c3e 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -38,6 +38,9 @@ typedef int MPIU_Thread_mutex_t;
typedef int MPIU_Thread_cond_t;
typedef int MPIU_Thread_id_t;
typedef int MPIU_Thread_tls_t;
+typedef void (*MPIU_Thread_func_t) (void *data);
+#define MPIU_Thread_mutex_create(mutex_ptr_, err_ptr_)
+#define MPIU_Thread_mutex_destroy(mutex_ptr_, err_ptr_)
#else
# error "thread package not defined or unknown"
#endif
-----------------------------------------------------------------------
Summary of changes:
src/util/thread/mpiu_thread.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b4-187-gf291cee
by noreply@mpich.org 20 Aug '15
by noreply@mpich.org 20 Aug '15
20 Aug '15
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 f291cee1c7e7905875bbd7d464752532b0bc8379 (commit)
from e74901c335bcc9877006d53d4bd76f2490513027 (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/f291cee1c7e7905875bbd7d464752532b…
commit f291cee1c7e7905875bbd7d464752532b0bc8379
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Wed Aug 19 10:31:42 2015 -0500
binding/mpif_h: fix memory leak
Guard alloc/free of temporary buffer for instances where it is not
needed.
Signed-off-by: Junchao Zhang <jczhang(a)mcs.anl.gov>
diff --git a/src/binding/fortran/mpif_h/buildiface b/src/binding/fortran/mpif_h/buildiface
index f6571fb..cd47698 100755
--- a/src/binding/fortran/mpif_h/buildiface
+++ b/src/binding/fortran/mpif_h/buildiface
@@ -3325,7 +3325,7 @@ sub chararray_ftoc {
}
print $OUTFD "\
p$count = (char **)$malloc( asize$count * sizeof(char *) );
- ptmp = (char *)$malloc( asize$count * (d$count + 1) );
+ if (asize$count-1 > 0) ptmp = (char *)$malloc( asize$count * (d$count + 1) );
for (i=0; i<asize$count-1; i++) {
char *p = v$count + i * d$count, *pin, *pdest;
int j;
@@ -3342,7 +3342,7 @@ sub chararray_ftoc {
/* Null terminate the array */
p$count\[asize$count-1\] = 0;
}\n";
- $clean_up .= " $free( p$count\[0\] );\n $free( p$count );\n";
+ $clean_up .= " if (asize$count-1 > 0) $free( p$count\[0\] );\n $free( p$count );\n";
}
# Add null to 2-dimensional arrays of input strings. Used only
-----------------------------------------------------------------------
Summary of changes:
src/binding/fortran/mpif_h/buildiface | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b4-186-ge74901c
by noreply@mpich.org 19 Aug '15
by noreply@mpich.org 19 Aug '15
19 Aug '15
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/e74901c335bcc9877006d53d4bd76f249…
commit e74901c335bcc9877006d53d4bd76f2490513027
Author: Pavan Balaji <balaji(a)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(a)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/f861b31224ffa1f75625ab46d55edc494…
commit f861b31224ffa1f75625ab46d55edc494d328689
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Wed Aug 19 03:10:05 2015 -0500
Remove unused declarations of thread private variables.
Signed-off-by: Ken Raffenetti <raffenet(a)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/377a8d4f9549cae4d9b4ee5dcf9dcc6c2…
commit 377a8d4f9549cae4d9b4ee5dcf9dcc6c289f4f9d
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Wed Aug 19 02:26:36 2015 -0500
Remove unused datatype.
Signed-off-by: Ken Raffenetti <raffenet(a)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/ccc85ec603b52e1779cddc45c9b74eebb…
commit ccc85ec603b52e1779cddc45c9b74eebbfa95dc2
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Wed Aug 19 02:24:23 2015 -0500
Expose MPIU_THREADPRIV macros through MPID.
Signed-off-by: Ken Raffenetti <raffenet(a)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/9bd06e8cea9b042eadb60f1cbfc4a3343…
commit 9bd06e8cea9b042eadb60f1cbfc4a33432dc722b
Author: Pavan Balaji <balaji(a)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(a)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/56824b049b37ea155a046257aca217185…
commit 56824b049b37ea155a046257aca21718555acd1b
Author: Pavan Balaji <balaji(a)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(a)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/35bf5005f251d8b89aa740e52abf7178d…
commit 35bf5005f251d8b89aa740e52abf7178dd4322e6
Author: Pavan Balaji <balaji(a)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(a)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/d396438faca35c113f06c5370067948a5…
commit d396438faca35c113f06c5370067948a595c0c62
Author: Pavan Balaji <balaji(a)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(a)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/1ea0abc722dd38b8945f32746ede3bd47…
commit 1ea0abc722dd38b8945f32746ede3bd47e5330db
Author: Pavan Balaji <balaji(a)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(a)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/481d13c7c114f9218f8f5ec49511655a9…
commit 481d13c7c114f9218f8f5ec49511655a93393554
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 23:19:58 2015 -0500
Remove unnecessary enum.
Signed-off-by: Ken Raffenetti <raffenet(a)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/652b2b90d1dcc9e0e7d8c6b0110c6a1ee…
commit 652b2b90d1dcc9e0e7d8c6b0110c6a1ee49bb791
Author: Pavan Balaji <balaji(a)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(a)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/8eb41fe7b8639d8e69281c5db9d984c35…
commit 8eb41fe7b8639d8e69281c5db9d984c357116a94
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 23:02:56 2015 -0500
Remove incorrect redundant structure name.
Signed-off-by: Ken Raffenetti <raffenet(a)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/1d32ecbbb488fa9fc1419bc96f1be4fb0…
commit 1d32ecbbb488fa9fc1419bc96f1be4fb0f273d5a
Author: Pavan Balaji <balaji(a)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(a)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/4cd47a98a9c5663be64d33ce9934525b0…
commit 4cd47a98a9c5663be64d33ce9934525b0aa476bd
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 22:39:21 2015 -0500
Rename files for consistency.
Signed-off-by: Ken Raffenetti <raffenet(a)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/c48eb2e980b02fe930850b8ce8e5a497d…
commit c48eb2e980b02fe930850b8ce8e5a497d347d836
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 20:23:53 2015 -0500
Remove unused macro.
Signed-off-by: Ken Raffenetti <raffenet(a)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/2585ac4257b5d91c3d27bc0f779efb592…
commit 2585ac4257b5d91c3d27bc0f779efb59233fecc2
Author: Pavan Balaji <balaji(a)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(a)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/652f3da913c5504a4b028ba098a344658…
commit 652f3da913c5504a4b028ba098a344658fad1392
Author: Pavan Balaji <balaji(a)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(a)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/405da02e4c6ba2fbe471ce7837905ef47…
commit 405da02e4c6ba2fbe471ce7837905ef47a542bfe
Author: Pavan Balaji <balaji(a)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(a)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/1e4ebcd0e6ef7beb01547a2f73cc6b0ba…
commit 1e4ebcd0e6ef7beb01547a2f73cc6b0ba7abc291
Author: Pavan Balaji <balaji(a)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(a)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/e3a08a394a86c01d577fd2d3380519d97…
commit e3a08a394a86c01d577fd2d3380519d979bc5c8c
Author: Pavan Balaji <balaji(a)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(a)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/94202a803712c9216bb556cf103263f4d…
commit 94202a803712c9216bb556cf103263f4dad26c61
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 17:52:39 2015 -0500
Remove unused variable.
Signed-off-by: Ken Raffenetti <raffenet(a)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/123e516a49f67257cd329f36d1a999bf6…
commit 123e516a49f67257cd329f36d1a999bf6a2314b7
Author: Pavan Balaji <balaji(a)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(a)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
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b4-164-gf89c13f
by noreply@mpich.org 19 Aug '15
by noreply@mpich.org 19 Aug '15
19 Aug '15
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 f89c13fd2f4b6604e0f8c3ea9bc2618786986fab (commit)
from 0d5760ae5eccc0db7c2559909f75ada30ee4bb33 (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/f89c13fd2f4b6604e0f8c3ea9bc261878…
commit f89c13fd2f4b6604e0f8c3ea9bc2618786986fab
Author: Lena Oden <loden(a)anl.gov>
Date: Mon Aug 17 13:29:58 2015 -0500
Add a new test for comm_idup error handling
Compared to the test of too_many_icomms, this test calls comm_idup
several times before waiting with MPI_Waitall. Thus, when error happens,
there will be several pending comm_idups to be cleaned. This test
checks if the remaining comm_idups are handled correctly.
Refs #2296
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/test/mpi/errors/comm/Makefile.am b/test/mpi/errors/comm/Makefile.am
index 5957b13..5bf1b00 100644
--- a/test/mpi/errors/comm/Makefile.am
+++ b/test/mpi/errors/comm/Makefile.am
@@ -12,5 +12,5 @@ EXTRA_DIST = testlist
## for all programs that are just built from the single corresponding source
## file, we don't need per-target _SOURCES rules, automake will infer them
## correctly
-noinst_PROGRAMS = cfree ccreate1 manysplit userdup too_many_comms too_many_comms2 too_many_comms3 too_many_icomms
+noinst_PROGRAMS = cfree ccreate1 manysplit userdup too_many_comms too_many_comms2 too_many_comms3 too_many_icomms too_many_icomms2
diff --git a/test/mpi/errors/comm/testlist b/test/mpi/errors/comm/testlist
index d5c58e1..0a18cd3 100644
--- a/test/mpi/errors/comm/testlist
+++ b/test/mpi/errors/comm/testlist
@@ -6,3 +6,4 @@ too_many_comms 4 strict=FALSE
too_many_icomms 4 strict=FALSE
too_many_comms2 4 strict=FALSE
too_many_comms3 4 strict=FALSE
+too_many_icomms2 4 strict=FALSE
diff --git a/test/mpi/errors/comm/too_many_icomms2.c b/test/mpi/errors/comm/too_many_icomms2.c
new file mode 100644
index 0000000..bb0afd6
--- /dev/null
+++ b/test/mpi/errors/comm/too_many_icomms2.c
@@ -0,0 +1,82 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2015 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+/* This test attempts to create a large number of communicators, in an effort
+ * to exceed the number of communicators that the MPI implementation can
+ * provide. It checks that the implementation detects this error correctly
+ * handles it.
+ */
+
+/* In this version, we duplicate MPI_COMM_WORLD in a non-blocking
+ * fashion until we run out of context IDs. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <mpi.h>
+#include "mpitest.h"
+
+#define MAX_NCOMM 100000
+#define WAIT_COMM 7
+static const int verbose = 0;
+
+int main(int argc, char **argv)
+{
+ int rank, nproc, mpi_errno;
+ int i, ncomm, block;
+ int errors = 1;
+ MPI_Comm *comm_hdls;
+ MPI_Request req[WAIT_COMM];
+
+ MPI_Init(&argc, &argv);
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &nproc);
+
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+ comm_hdls = malloc(sizeof(MPI_Comm) * MAX_NCOMM);
+
+
+ ncomm = 0;
+ block = 0;
+ for (i = 0; i < MAX_NCOMM; i++) {
+ /* Note: the comms we create are all dups of MPI_COMM_WORLD */
+ MPI_Comm_idup(MPI_COMM_WORLD, &comm_hdls[i], &req[block++]);
+ if(block == WAIT_COMM ){
+ mpi_errno = MPI_Waitall(block, req, MPI_STATUSES_IGNORE);
+ if (mpi_errno == MPI_SUCCESS) {
+ ncomm+=block;
+ }
+ else {
+ if (verbose)
+ printf("%d: Error creating comm %d\n", rank, i);
+ errors = 0;
+ block = 0;
+ break;
+ }
+ block = 0;
+ }
+ }
+ if(block != 0) {
+ mpi_errno = MPI_Waitall(block, req, MPI_STATUSES_IGNORE);
+ if (mpi_errno == MPI_SUCCESS) {
+ ncomm+=block;
+ }
+ else {
+ if (verbose)
+ printf("%d: Error creating comm %d\n", rank, i);
+ errors = 0;
+ }
+ }
+ for (i = 0; i < ncomm; i++)
+ MPI_Comm_free(&comm_hdls[i]);
+
+ free(comm_hdls);
+ MTest_Finalize(errors);
+ MPI_Finalize();
+
+ return 0;
+}
-----------------------------------------------------------------------
Summary of changes:
test/mpi/errors/comm/Makefile.am | 2 +-
test/mpi/errors/comm/testlist | 1 +
.../comm/{too_many_icomms.c => too_many_icomms2.c} | 33 ++++++++++++++-----
3 files changed, 26 insertions(+), 10 deletions(-)
copy test/mpi/errors/comm/{too_many_icomms.c => too_many_icomms2.c} (66%)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b4-163-g0d5760a
by noreply@mpich.org 18 Aug '15
by noreply@mpich.org 18 Aug '15
18 Aug '15
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 0d5760ae5eccc0db7c2559909f75ada30ee4bb33 (commit)
via fa11ecd3c995d3b4cc86a58366ac90ae814f2f9d (commit)
via d484022edb5f865760b063b9908895bdbfbef7fb (commit)
via da4f2e5f73ed4dcfff87fe11ec49b602da9c9447 (commit)
via 78413c55c4820a50cd31f0df6ec009891ff42917 (commit)
from 88affa5941155e68ead5eedd59ce093f6d2fb625 (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/0d5760ae5eccc0db7c2559909f75ada30…
commit 0d5760ae5eccc0db7c2559909f75ada30ee4bb33
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 14:34:57 2015 -0500
Simplify threading code.
There were unnecessary intermediate macros which didn't serve any
purpose. This patch removes them and directly calls the mutex
acquire/release functions.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/util/thread/mpiu_thread_global.h b/src/util/thread/mpiu_thread_global.h
index 371c26b..567331a 100644
--- a/src/util/thread/mpiu_thread_global.h
+++ b/src/util/thread/mpiu_thread_global.h
@@ -7,33 +7,15 @@
#if !defined(MPIU_THREAD_GLOBAL_H_INCLUDED)
#define MPIU_THREAD_GLOBAL_H_INCLUDED
-/* There is a single, global lock, held for the duration of an MPI call */
-#define MPIU_THREAD_CS_ENTER_GLOBAL(_context) \
- do { \
- MPIU_THREAD_CHECK_BEGIN; \
- MPIU_THREAD_CS_ENTER_LOCKNAME(GLOBAL,_context); \
- MPIU_THREAD_CHECK_END; \
- } while (0)
-
-#define MPIU_THREAD_CS_EXIT_GLOBAL(_context) \
- do { \
- MPIU_THREAD_CHECK_BEGIN; \
- MPIU_THREAD_CS_EXIT_LOCKNAME(GLOBAL,_context); \
- MPIU_THREAD_CHECK_END; \
- } while (0)
-
-#define MPIU_THREAD_CS_YIELD_GLOBAL(_context) \
- do { \
- MPIU_THREAD_CHECK_BEGIN; \
- MPIU_THREAD_CS_YIELD_LOCKNAME(GLOBAL,_context); \
- MPIU_THREAD_CHECK_END; \
- } while (0)
-
+/* 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)
/* POBJ locks are all NO-OPs */
-#define MPIU_THREAD_CS_ENTER_POBJ(_context)
-#define MPIU_THREAD_CS_EXIT_POBJ(_context)
-#define MPIU_THREAD_CS_YIELD_POBJ(_context)
+#define MPIU_THREAD_CS_ENTER_POBJ(mutex)
+#define MPIU_THREAD_CS_EXIT_POBJ(mutex)
+#define MPIU_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 834a69a..a4e88c1 100644
--- a/src/util/thread/mpiu_thread_multiple.h
+++ b/src/util/thread/mpiu_thread_multiple.h
@@ -12,28 +12,35 @@
#define MPIU_THREAD_CHECK_BEGIN if (MPIR_ThreadInfo.isThreaded) {
#define MPIU_THREAD_CHECK_END }
-#define MPIU_THREAD_CS_ENTER(_name,_context) MPIU_THREAD_CS_ENTER_##_name(_context)
-#define MPIU_THREAD_CS_EXIT(_name,_context) MPIU_THREAD_CS_EXIT_##_name(_context)
-#define MPIU_THREAD_CS_YIELD(_name,_context) MPIU_THREAD_CS_YIELD_##_name(_context)
-
-#define MPIU_THREAD_CS_ENTER_LOCKNAME(name_,mutex_) \
+#define MPIU_THREAD_CS_ENTER_REAL(lockname, mutex) \
do { \
- MPIU_DBG_MSG_S(THREAD,VERBOSE,"attempting to ENTER lockname=%s", #name_); \
- MPIU_Thread_CS_enter_lockname_impl_(#name_, &mutex_); \
+ int err_; \
+ MPIU_THREAD_CHECK_BEGIN; \
+ MPIU_DBG_MSG_S(THREAD, TYPICAL, "locking %s", lockname); \
+ MPIU_Thread_mutex_lock(&mutex, &err_); \
+ MPIU_THREAD_CHECK_END; \
} while (0)
-#define MPIU_THREAD_CS_EXIT_LOCKNAME(name_,mutex_) \
+#define MPIU_THREAD_CS_EXIT_REAL(lockname, mutex) \
do { \
- MPIU_DBG_MSG_S(THREAD,VERBOSE,"attempting to EXIT lockname=%s", #name_); \
- MPIU_Thread_CS_exit_lockname_impl_(#name_, &mutex_); \
+ int err_; \
+ MPIU_THREAD_CHECK_BEGIN; \
+ MPIU_DBG_MSG_S(THREAD, TYPICAL, "unlocking %s", lockname); \
+ MPIU_Thread_mutex_unlock(&mutex, &err_); \
+ MPIU_THREAD_CHECK_END; \
} while (0)
-#define MPIU_THREAD_CS_YIELD_LOCKNAME(name_,mutex_) \
+#define MPIU_THREAD_CS_YIELD_REAL(lockname, mutex) \
do { \
- MPIU_DBG_MSG_S(THREAD,VERBOSE,"attempting to YIELD lockname=%s", #name_); \
- MPIU_Thread_CS_yield_lockname_impl_(#name_, &mutex_); \
+ MPIU_THREAD_CHECK_BEGIN; \
+ MPIU_DBG_MSG_S(THREAD, TYPICAL, "yielding %s", lockname); \
+ MPIU_Thread_yield(&mutex); \
+ 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)
/* Definitions of the thread support for various levels of thread granularity */
#if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL
@@ -46,49 +53,4 @@
#error Unrecognized thread granularity
#endif
-
-#undef FUNCNAME
-#define FUNCNAME MPIU_Thread_CS_enter_lockname_impl_
-#undef FCNAME
-#define FCNAME MPL_QUOTE(FUNCNAME)
-/* these are inline functions instead of macros to avoid some of the
- * MPIU_THREADPRIV_DECL scoping issues */
-MPL_DBG_ATTRIBUTE_NOINLINE ATTRIBUTE((unused))
-static MPL_DBG_INLINE_KEYWORD void
-MPIU_Thread_CS_enter_lockname_impl_(const char *lockname, MPIU_Thread_mutex_t * mutex)
-{
- int err;
- MPIU_DBG_MSG_S(THREAD, TYPICAL, "locking %s", lockname);
- MPIU_Thread_mutex_lock(mutex, &err);
-}
-
-#undef FUNCNAME
-#define FUNCNAME MPIU_Thread_CS_exit_lockname_impl_
-#undef FCNAME
-#define FCNAME MPL_QUOTE(FUNCNAME)
-MPL_DBG_ATTRIBUTE_NOINLINE ATTRIBUTE((unused))
-static MPL_DBG_INLINE_KEYWORD void
-MPIU_Thread_CS_exit_lockname_impl_(const char *lockname, MPIU_Thread_mutex_t * mutex)
-{
- int err;
- MPIU_DBG_MSG_S(THREAD, TYPICAL, "unlocking %s", lockname);
- MPIU_Thread_mutex_unlock(mutex, &err);
-}
-
-#undef FUNCNAME
-#define FUNCNAME MPIU_Thread_CS_yield_lockname_impl_
-#undef FCNAME
-#define FCNAME MPL_QUOTE(FUNCNAME)
-MPL_DBG_ATTRIBUTE_NOINLINE ATTRIBUTE((unused))
-static MPL_DBG_INLINE_KEYWORD void
-MPIU_Thread_CS_yield_lockname_impl_(const char *lockname, MPIU_Thread_mutex_t * mutex)
-{
- MPIU_DBG_MSG_S(THREAD, TYPICAL, "yielding %s", lockname);
- MPIU_Thread_yield(mutex);
-}
-
-/* undef for safety, this is a commonly-included header */
-#undef FUNCNAME
-#undef FCNAME
-
#endif /* !defined(MPIU_THREAD_MULTIPLE_H_INCLUDED) */
diff --git a/src/util/thread/mpiu_thread_pobj.h b/src/util/thread/mpiu_thread_pobj.h
index 40b287c..5145303 100644
--- a/src/util/thread/mpiu_thread_pobj.h
+++ b/src/util/thread/mpiu_thread_pobj.h
@@ -74,31 +74,15 @@
* the order should be to acquire MPIDCOMM first, then MSGQUEUE. Release in
* reverse order. */
-#define MPIU_THREAD_CS_ENTER_GLOBAL(_context)
-#define MPIU_THREAD_CS_EXIT_GLOBAL(_context)
-#define MPIU_THREAD_CS_YIELD_GLOBAL(_context)
-
-#define MPIU_THREAD_CS_ENTER_POBJ(_context) \
- do { \
- MPIU_THREAD_CHECK_BEGIN; \
- MPIU_THREAD_CS_ENTER_LOCKNAME(POBJ,_context); \
- MPIU_THREAD_CHECK_END; \
- } while (0)
-
-#define MPIU_THREAD_CS_EXIT_POBJ(_context) \
- do { \
- MPIU_THREAD_CHECK_BEGIN; \
- MPIU_THREAD_CS_EXIT_LOCKNAME(POBJ,_context); \
- MPIU_THREAD_CHECK_END; \
- } while (0)
-
-#define MPIU_THREAD_CS_YIELD_POBJ(_context) \
- do { \
- MPIU_THREAD_CHECK_BEGIN; \
- MPIU_THREAD_CS_YIELD_LOCKNAME(POBJ,_context); \
- MPIU_THREAD_CHECK_END; \
- } while (0)
-
+/* 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)
+
+/* 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 a type for the completion counter */
#include "opa_primitives.h"
http://git.mpich.org/mpich.git/commitdiff/fa11ecd3c995d3b4cc86a58366ac90ae8…
commit fa11ecd3c995d3b4cc86a58366ac90ae814f2f9d
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 14:13:27 2015 -0500
Get rid of recursive locks.
Now that ROMIO internally maintains thread safety for its pieces, we
no longer need recursive locks.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index 3c5da8c..03af8d0 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -168,8 +168,6 @@ static int thread_cs_init( void )
int err;
MPIU_THREADPRIV_DECL;
- MPIU_Assert(MPICH_MAX_LOCKS >= MPIU_NEST_NUM_MUTEXES);
-
/* we create this at all granularities right now */
MPID_Thread_mutex_create(&MPIR_THREAD_MEMALLOC_MUTEX, &err);
MPIU_Assert(err == 0);
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index fc07114..83b8e3d 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -125,7 +125,6 @@ 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;
- /* We need the handle mutex to avoid problems with lock nesting */
MPIU_Thread_mutex_t handle_mutex;
#endif
@@ -161,9 +160,6 @@ extern MPICH_ThreadInfo_t MPIR_ThreadInfo;
* destruction time */
#define MPIU_STRERROR_BUF_SIZE (1024)
-/* FIXME should really be MPIU_NEST_NUM_MUTEXES, but it's defined later */
-#define MPICH_MAX_LOCKS (6)
-
/* This structure contains all thread-local variables and will be zeroed at
* allocation time.
*
@@ -175,10 +171,6 @@ typedef struct MPICH_PerThread_t {
/* error string storage for MPIU_Strerror */
char strerrbuf[MPIU_STRERROR_BUF_SIZE];
-
-#if (MPICH_THREAD_LEVEL >= MPI_THREAD_SERIALIZED)
- int lock_depth[MPICH_MAX_LOCKS];
-#endif
} MPICH_PerThread_t;
#if defined (MPICH_IS_THREADED)
diff --git a/src/util/thread/mpiu_thread_global.h b/src/util/thread/mpiu_thread_global.h
index d99944f..371c26b 100644
--- a/src/util/thread/mpiu_thread_global.h
+++ b/src/util/thread/mpiu_thread_global.h
@@ -8,28 +8,24 @@
#define MPIU_THREAD_GLOBAL_H_INCLUDED
/* There is a single, global lock, held for the duration of an MPI call */
-/* FIXME this shouldn't need to be recursive, but using a recursive mutex here
- * greatly simplifies thread safety in ROMIO right now. In the long term we
- * should make ROMIO internally thread safe and then this can go back to being a
- * non-recursive mutex. [goodell@ 2010-10-15] */
#define MPIU_THREAD_CS_ENTER_GLOBAL(_context) \
do { \
MPIU_THREAD_CHECK_BEGIN; \
- MPIU_THREAD_CS_ENTER_LOCKNAME_RECURSIVE(GLOBAL,_context); \
+ MPIU_THREAD_CS_ENTER_LOCKNAME(GLOBAL,_context); \
MPIU_THREAD_CHECK_END; \
} while (0)
#define MPIU_THREAD_CS_EXIT_GLOBAL(_context) \
do { \
MPIU_THREAD_CHECK_BEGIN; \
- MPIU_THREAD_CS_EXIT_LOCKNAME_RECURSIVE(GLOBAL,_context); \
+ MPIU_THREAD_CS_EXIT_LOCKNAME(GLOBAL,_context); \
MPIU_THREAD_CHECK_END; \
} while (0)
#define MPIU_THREAD_CS_YIELD_GLOBAL(_context) \
do { \
MPIU_THREAD_CHECK_BEGIN; \
- MPIU_THREAD_CS_YIELD_LOCKNAME_RECURSIVE(GLOBAL,_context); \
+ MPIU_THREAD_CS_YIELD_LOCKNAME(GLOBAL,_context); \
MPIU_THREAD_CHECK_END; \
} while (0)
diff --git a/src/util/thread/mpiu_thread_multiple.h b/src/util/thread/mpiu_thread_multiple.h
index 20ec810..834a69a 100644
--- a/src/util/thread/mpiu_thread_multiple.h
+++ b/src/util/thread/mpiu_thread_multiple.h
@@ -16,26 +16,6 @@
#define MPIU_THREAD_CS_EXIT(_name,_context) MPIU_THREAD_CS_EXIT_##_name(_context)
#define MPIU_THREAD_CS_YIELD(_name,_context) MPIU_THREAD_CS_YIELD_##_name(_context)
-/* recursive locks */
-#define MPIU_THREAD_CS_ENTER_LOCKNAME_RECURSIVE(name_,mutex_) \
- do { \
- MPIU_DBG_MSG_S(THREAD,VERBOSE,"attempting to recursively ENTER lockname=%s", #name_); \
- MPIU_Thread_CS_enter_lockname_recursive_impl_(MPIU_NEST_##name_, #name_, &mutex_); \
- } while (0)
-
-#define MPIU_THREAD_CS_EXIT_LOCKNAME_RECURSIVE(name_,mutex_) \
- do { \
- MPIU_DBG_MSG_S(THREAD,VERBOSE,"attempting to recursively EXIT lockname=%s", #name_); \
- MPIU_Thread_CS_exit_lockname_recursive_impl_(MPIU_NEST_##name_, #name_, &mutex_); \
- } while (0)
-
-#define MPIU_THREAD_CS_YIELD_LOCKNAME_RECURSIVE(name_,mutex_) \
- do { \
- MPIU_DBG_MSG_S(THREAD,VERBOSE,"attempting to recursively YIELD lockname=%s", #name_); \
- MPIU_Thread_CS_yield_lockname_recursive_impl_(MPIU_NEST_##name_, #name_, &mutex_); \
- } while (0)
-
-/* regular locks */
#define MPIU_THREAD_CS_ENTER_LOCKNAME(name_,mutex_) \
do { \
MPIU_DBG_MSG_S(THREAD,VERBOSE,"attempting to ENTER lockname=%s", #name_); \
@@ -55,13 +35,6 @@
} while (0)
-enum MPIU_Nest_mutexes {
- MPIU_NEST_GLOBAL = 0,
- MPIU_NEST_POBJ, /* Nesting does not really make sense for POBJ */
- MPIU_NEST_NUM_MUTEXES
-};
-
-
/* Definitions of the thread support for various levels of thread granularity */
#if MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL
#include "mpiu_thread_global.h"
@@ -114,85 +87,6 @@ MPIU_Thread_CS_yield_lockname_impl_(const char *lockname, MPIU_Thread_mutex_t *
MPIU_Thread_yield(mutex);
}
-/* ------------------------------------------------------------------- */
-/* recursive versions, these are for the few locks where it is difficult or
- * impossible to eliminate recursive locking usage */
-
-#undef FUNCNAME
-#define FUNCNAME MPIU_Thread_CS_enter_lockname_recursive_impl_
-#undef FCNAME
-#define FCNAME MPL_QUOTE(FUNCNAME)
-/* these are inline functions instead of macros to avoid some of the
- * MPIU_THREADPRIV_DECL scoping issues */
-MPL_DBG_ATTRIBUTE_NOINLINE ATTRIBUTE((unused))
-static MPL_DBG_INLINE_KEYWORD void
-MPIU_Thread_CS_enter_lockname_recursive_impl_(enum MPIU_Nest_mutexes kind,
- const char *lockname, MPIU_Thread_mutex_t * mutex)
-{
- int depth, err;
- MPIU_THREADPRIV_DECL;
- MPIU_THREADPRIV_GET;
- depth = MPIU_THREADPRIV_FIELD(lock_depth)[kind];
- MPIU_DBG_MSG_D(THREAD, TYPICAL, "recursive enter, depth=%d", depth);
-
- MPIU_Assert(depth >= 0 && depth < 10); /* probably a mismatch if we hit this */
-
- if (depth == 0) {
- MPIU_DBG_MSG_S(THREAD, TYPICAL, "locking %s", lockname);
- MPIU_Thread_mutex_lock(mutex, &err);
- }
- MPIU_THREADPRIV_FIELD(lock_depth)[kind] += 1;
-}
-
-#undef FUNCNAME
-#define FUNCNAME MPIU_Thread_CS_exit_lockname_recursive_impl_
-#undef FCNAME
-#define FCNAME MPL_QUOTE(FUNCNAME)
-MPL_DBG_ATTRIBUTE_NOINLINE ATTRIBUTE((unused))
-static MPL_DBG_INLINE_KEYWORD void
-MPIU_Thread_CS_exit_lockname_recursive_impl_(enum MPIU_Nest_mutexes kind,
- const char *lockname, MPIU_Thread_mutex_t * mutex)
-{
- int depth, err;
- MPIU_THREADPRIV_DECL;
- MPIU_THREADPRIV_GET;
- depth = MPIU_THREADPRIV_FIELD(lock_depth)[kind];
- MPIU_DBG_MSG_D(THREAD, TYPICAL, "recursive exit, depth=%d", depth);
-
- MPIU_Assert(depth > 0 && depth < 10); /* probably a mismatch if we hit this */
-
- if (depth == 1) {
- MPIU_DBG_MSG_S(THREAD, TYPICAL, "unlocking %s", lockname);
- MPIU_Thread_mutex_unlock(mutex, &err);
- MPIU_Assert_fmt_msg(err == MPIU_THREAD_SUCCESS,
- ("mutex_unlock failed, err=%d (%s)", err, MPIU_Strerror(err)));
-
- }
- MPIU_THREADPRIV_FIELD(lock_depth)[kind] -= 1;
-}
-
-#undef FUNCNAME
-#define FUNCNAME MPIU_Thread_CS_yield_lockname_recursive_impl_
-#undef FCNAME
-#define FCNAME MPL_QUOTE(FUNCNAME)
-MPL_DBG_ATTRIBUTE_NOINLINE ATTRIBUTE((unused))
-static MPL_DBG_INLINE_KEYWORD void
-MPIU_Thread_CS_yield_lockname_recursive_impl_(enum MPIU_Nest_mutexes kind,
- const char *lockname, MPIU_Thread_mutex_t * mutex)
-{
- int depth ATTRIBUTE((unused));
- MPIU_THREADPRIV_DECL;
- MPIU_THREADPRIV_GET;
- depth = MPIU_THREADPRIV_FIELD(lock_depth)[kind];
- MPIU_DBG_MSG_D(THREAD, TYPICAL, "recursive yield, depth=%d", depth);
-
- MPIU_Assert(depth > 0 && depth < 10); /* we must hold the mutex */
- /* no need to update depth, this is a thread-local value */
-
- MPIU_DBG_MSG_S(THREAD, TYPICAL, "yielding %s", lockname);
- MPIU_Thread_yield(mutex);
-}
-
/* undef for safety, this is a commonly-included header */
#undef FUNCNAME
#undef FCNAME
http://git.mpich.org/mpich.git/commitdiff/d484022edb5f865760b063b9908895bdb…
commit d484022edb5f865760b063b9908895bdbfbef7fb
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Tue Aug 18 14:53:32 2015 -0500
sync ROMIO locations that touch global state
Lock entry/ unlock exit points for those parts of ROMIO touching global
state. Global state appears to be
- flattened datatype representation
- the cb_config_list
- the error handler
- user define data representation
- some f2c and c2f bookeeping structures
This patch also assumes that ROMIO always resides within MPICH. We
are dropping support for non-MPICH builds of ROMIO.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/mpi/romio/adio/common/ad_end.c b/src/mpi/romio/adio/common/ad_end.c
index 76712ae..2350f0a 100644
--- a/src/mpi/romio/adio/common/ad_end.c
+++ b/src/mpi/romio/adio/common/ad_end.c
@@ -61,6 +61,8 @@ void ADIO_End(int *error_code)
int ADIOI_End_call(MPI_Comm comm, int keyval, void *attribute_val, void
*extra_state)
{
+ /* though we are touching global variables here, only one thread can call
+ * MPI_Finalize so we can be less carefuil w. r. t. critical sections */
int error_code;
ADIOI_UNREFERENCED_ARG(comm);
diff --git a/src/mpi/romio/adio/common/cb_config_list.c b/src/mpi/romio/adio/common/cb_config_list.c
index 626709f..60cb6c1 100644
--- a/src/mpi/romio/adio/common/cb_config_list.c
+++ b/src/mpi/romio/adio/common/cb_config_list.c
@@ -133,6 +133,7 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm,
ADIO_cb_name_array array = NULL;
int alloc_size;
+ MPIR_Ext_cs_enter(ADIO_THREAD_MUTEX);
if (ADIOI_cb_config_list_keyval == MPI_KEYVAL_INVALID) {
/* cleaned up by ADIOI_End_call */
MPI_Keyval_create((MPI_Copy_function *) ADIOI_cb_copy_name_array,
@@ -147,6 +148,7 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm,
return 0;
}
}
+ MPIR_Ext_cs_exit(ADIO_THREAD_MUTEX);
MPI_Comm_size(dupcomm, &commsize);
MPI_Comm_rank(dupcomm, &commrank);
diff --git a/src/mpi/romio/adio/common/flatten.c b/src/mpi/romio/adio/common/flatten.c
index db13a7b..1fb7f54 100644
--- a/src/mpi/romio/adio/common/flatten.c
+++ b/src/mpi/romio/adio/common/flatten.c
@@ -25,6 +25,8 @@ void ADIOI_Flatten_datatype(MPI_Datatype datatype)
int is_contig;
ADIOI_Flatlist_node *flat, *prev=0;
+ MPIR_Ext_cs_enter(ADIO_THREAD_MUTEX);
+
/* check if necessary to flatten. */
/* is it entirely contiguous? */
@@ -98,6 +100,7 @@ void ADIOI_Flatten_datatype(MPI_Datatype datatype)
);
}
#endif
+ MPIR_Ext_cs_exit(ADIO_THREAD_MUTEX);
}
@@ -1182,6 +1185,7 @@ void ADIOI_Optimize_flattened(ADIOI_Flatlist_node *flat_type)
void ADIOI_Delete_flattened(MPI_Datatype datatype)
{
ADIOI_Flatlist_node *flat, *prev;
+ MPIR_Ext_cs_enter(ADIO_THREAD_MUTEX);
prev = flat = ADIOI_Flatlist;
while (flat && (flat->type != datatype)) {
@@ -1194,13 +1198,16 @@ void ADIOI_Delete_flattened(MPI_Datatype datatype)
if (flat->indices) ADIOI_Free(flat->indices);
ADIOI_Free(flat);
}
+ MPIR_Ext_cs_exit(ADIO_THREAD_MUTEX);
}
ADIOI_Flatlist_node * ADIOI_Flatten_and_find(MPI_Datatype datatype)
{
ADIOI_Flatlist_node *node;
+ MPIR_Ext_cs_enter(ADIO_THREAD_MUTEX);
ADIOI_Flatten_datatype(datatype);
node = ADIOI_Flatlist;
while (node->type != datatype) node = node->next;
+ MPIR_Ext_cs_exit(ADIO_THREAD_MUTEX);
return node;
}
diff --git a/src/mpi/romio/mpi-io/glue/mpich/mpio_file.c b/src/mpi/romio/mpi-io/glue/mpich/mpio_file.c
index 6f6c902..0aabe27 100644
--- a/src/mpi/romio/mpi-io/glue/mpich/mpio_file.c
+++ b/src/mpi/romio/mpi-io/glue/mpich/mpio_file.c
@@ -69,6 +69,7 @@ MPI_Fint MPIO_File_c2f(MPI_File fh)
if (fh->fortran_handle != -1)
return fh->fortran_handle;
+ MPIR_Ext_cs_enter(ADIO_THREAD_MUTEX);
if (!ADIOI_Ftable) {
ADIOI_Ftable_max = 1024;
ADIOI_Ftable = (MPI_File *)
@@ -87,6 +88,7 @@ MPI_Fint MPIO_File_c2f(MPI_File fh)
ADIOI_Ftable_ptr++;
ADIOI_Ftable[ADIOI_Ftable_ptr] = fh;
fh->fortran_handle = ADIOI_Ftable_ptr;
+ MPIR_Ext_cs_exit(ADIO_THREAD_MUTEX);
return (MPI_Fint) ADIOI_Ftable_ptr;
#endif
}
http://git.mpich.org/mpich.git/commitdiff/da4f2e5f73ed4dcfff87fe11ec49b602d…
commit da4f2e5f73ed4dcfff87fe11ec49b602da9c9447
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Tue Aug 18 14:06:01 2015 -0500
move flattend resolution to a separate function
if we do this "flatten type, then find it in the global linked list" in
a separate function, we can make that function thread-safe instead of
sprinking lock/unlock code through 50 locations in ROMIO
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
index 355ad22..dd71643 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c
@@ -534,9 +534,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype
ADIOI_Datatype_iscontig(datatype, &buftype_is_contig);
if (!buftype_is_contig) {
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
}
MPI_Type_extent(datatype, &buftype_extent);
diff --git a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
index b5b7be6..b8d4366 100644
--- a/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
+++ b/src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c
@@ -658,9 +658,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, const void *buf, MPI_Datatype
ADIOI_Datatype_iscontig(datatype, &buftype_is_contig);
if (!buftype_is_contig) {
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(dataype);
}
MPI_Type_extent(datatype, &buftype_extent);
diff --git a/src/mpi/romio/adio/ad_gridftp/ad_gridftp_read.c b/src/mpi/romio/adio/ad_gridftp/ad_gridftp_read.c
index 6a0fc9c..19351b7 100644
--- a/src/mpi/romio/adio/ad_gridftp/ad_gridftp_read.c
+++ b/src/mpi/romio/adio/ad_gridftp/ad_gridftp_read.c
@@ -241,10 +241,7 @@ void ADIOI_GRIDFTP_ReadDiscontig(ADIO_File fd, void *buf, int count,
/* from here we can assume btype_extent==btype_size */
/* Flatten out fd->filetype so we know which blocks to skip */
- ADIOI_Flatten_datatype(fd->filetype);
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype && flat_file->next!=NULL)
- flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
/* Figure out how big the area to read is */
start=(globus_off_t)(offset*etype_size);
diff --git a/src/mpi/romio/adio/ad_gridftp/ad_gridftp_write.c b/src/mpi/romio/adio/ad_gridftp/ad_gridftp_write.c
index 0400dae..22e2523 100644
--- a/src/mpi/romio/adio/ad_gridftp/ad_gridftp_write.c
+++ b/src/mpi/romio/adio/ad_gridftp/ad_gridftp_write.c
@@ -242,10 +242,7 @@ void ADIOI_GRIDFTP_WriteDiscontig(ADIO_File fd, void *buf, int count,
/* from here we can assume btype_extent==btype_size */
/* Flatten out fd->filetype so we know which blocks to skip */
- ADIOI_Flatten_datatype(fd->filetype);
- flat_file = ADIOI_Flatlist;
- while (flat_file->type != fd->filetype && flat_file->next!=NULL)
- flat_file = flat_file->next;
+ flat_file = ADIOI_Flatten_and_find(fd->filetype);
/* Figure out how big the area to write is */
/* ASSUMPTION: ftype_size is an integer multiple of btype_size or vice versa. */
diff --git a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
index 774cb53..9dca62d 100644
--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c
@@ -415,10 +415,7 @@ static void ADIOI_LUSTRE_Exch_and_write(ADIO_File fd, const void *buf,
ADIOI_Datatype_iscontig(datatype, &buftype_is_contig);
if (!buftype_is_contig) {
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype)
- flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
}
MPI_Type_extent(datatype, &buftype_extent);
/* I need to check if there are any outstanding nonblocking writes to
diff --git a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c
index 2f1ffb9..071c51e 100644
--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c
+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c
@@ -209,10 +209,7 @@ void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, const void *buf, int count,
/* Different buftype to different filetype */
if (!buftype_is_contig && filetype_is_contig) {
/* noncontiguous in memory, contiguous in file. */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype)
- flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind :
fd->disp + (ADIO_Offset)etype_size * offset;
@@ -436,10 +433,7 @@ void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, const void *buf, int count,
}
else {
/* noncontiguous in memory as well as in file */
-
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
k = num = buf_count = 0;
i_offset = flat_buf->indices[0];
diff --git a/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c b/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c
index 18dfde7..dd2f1c8 100644
--- a/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c
+++ b/src/mpi/romio/adio/ad_nfs/ad_nfs_read.c
@@ -215,9 +215,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count,
/* noncontiguous in memory, contiguous in file. */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind :
fd->disp + etype_size * offset;
@@ -460,9 +458,7 @@ void ADIOI_NFS_ReadStrided(ADIO_File fd, void *buf, int count,
else {
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
k = num = buf_count = 0;
i = (int) (flat_buf->indices[0]);
diff --git a/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c b/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c
index 660e868..d9ee5d2 100644
--- a/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c
+++ b/src/mpi/romio/adio/ad_nfs/ad_nfs_write.c
@@ -318,9 +318,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count,
/* noncontiguous in memory, contiguous in file. */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind :
fd->disp + etype_size * offset;
@@ -565,9 +563,7 @@ void ADIOI_NFS_WriteStrided(ADIO_File fd, const void *buf, int count,
else {
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
k = num = buf_count = 0;
i = (int) (flat_buf->indices[0]);
diff --git a/src/mpi/romio/adio/ad_piofs/ad_piofs_write.c b/src/mpi/romio/adio/ad_piofs/ad_piofs_write.c
index 4e1c7f1..4da38ba 100644
--- a/src/mpi/romio/adio/ad_piofs/ad_piofs_write.c
+++ b/src/mpi/romio/adio/ad_piofs/ad_piofs_write.c
@@ -112,9 +112,7 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count,
/* noncontiguous in memory, contiguous in file. use writev */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
/* There is a limit of 16 on the number of iovecs for readv/writev! */
@@ -258,9 +256,7 @@ void ADIOI_PIOFS_WriteStrided(ADIO_File fd, void *buf, int count,
else {
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
k = num = buf_count = 0;
indx = flat_buf->indices[0];
diff --git a/src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c b/src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c
index 71b558a..1d294ea 100644
--- a/src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c
+++ b/src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c
@@ -171,9 +171,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count,
int64_t file_offsets;
int32_t file_lengths;
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind :
fd->disp + etype_size * offset;
@@ -415,9 +413,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count,
else {
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
size_read = 0;
n_filetypes = st_n_filetypes;
diff --git a/src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c b/src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c
index 4e874d9..5388de4 100644
--- a/src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c
+++ b/src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c
@@ -150,9 +150,7 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count,
ADIO_Offset combine_buf_remain;
/* noncontiguous in memory, contiguous in file. use writev */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
/* allocate our "combine buffer" to pack data into before writing */
combine_buf = (char *) ADIOI_Malloc(fd->hints->ind_wr_buffer_size);
@@ -366,9 +364,7 @@ void ADIOI_PVFS_WriteStrided(ADIO_File fd, void *buf, int count,
else {
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
k = num = buf_count = 0;
indx = flat_buf->indices[0];
@@ -539,9 +535,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count,
int64_t file_offsets;
int32_t file_lengths;
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
off = fd->disp + etype_size * offset;
@@ -808,9 +802,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count,
else {
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
size_wrote = 0;
n_filetypes = st_n_filetypes;
diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c
index c5d03d1..39befcc 100644
--- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c
+++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c
@@ -82,10 +82,7 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count,
ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
if (buftype_is_contig == 0)
{
- ADIOI_Flatten_datatype(datatype);
- flat_buf_p = ADIOI_Flatlist;
- while (flat_buf_p->type != datatype)
- flat_buf_p = flat_buf_p->next;
+ flat_buf_p = ADIOI_Flatten_and_find(datatype);
}
else
{
@@ -108,10 +105,7 @@ int ADIOI_PVFS2_StridedListIO(ADIO_File fd, void *buf, int count,
/* TODO: why does avery say this should already have been
* flattened in Open, but also says contig types don't get
* flattened */
- ADIOI_Flatten_datatype(fd->filetype);
- flat_file_p = ADIOI_Flatlist;
- while (flat_file_p->type != fd->filetype)
- flat_file_p = flat_file_p->next;
+ flat_file_p = ADIOI_Flatten_and_find(fd->filetype);
}
else
{
diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c
index 2aee893..40ff2c1 100644
--- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c
+++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_read_list_classic.c
@@ -93,9 +93,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count,
int64_t file_offset;
int32_t file_length;
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind :
fd->disp + etype_size * offset;
@@ -469,9 +467,7 @@ void ADIOI_PVFS2_OldReadStrided(ADIO_File fd, void *buf, int count,
else {
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
size_read = 0;
n_filetypes = st_n_filetypes;
diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c
index f51bf79..5adae31 100644
--- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c
+++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_write_list_classic.c
@@ -109,9 +109,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count,
int64_t file_offset;
int32_t file_length;
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
off = fd->disp + etype_size * offset;
@@ -515,9 +513,7 @@ void ADIOI_PVFS2_OldWriteStrided(ADIO_File fd, const void *buf, int count,
else {
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
size_wrote = 0;
n_filetypes = st_n_filetypes;
diff --git a/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c b/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c
index d48a06c..3541072 100644
--- a/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c
+++ b/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c
@@ -95,9 +95,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count,
uint64_t file_offsets;
uint64_t file_lengths;
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind :
fd->disp + etype_size * offset;
@@ -410,9 +408,7 @@ void ADIOI_ZOIDFS_ReadStrided(ADIO_File fd, void *buf, int count,
else {
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
size_read = 0;
n_filetypes = st_n_filetypes;
diff --git a/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c b/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c
index 8ca0594..040d92a 100644
--- a/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c
+++ b/src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_write_list.c
@@ -109,9 +109,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count,
uint64_t file_offsets;
uint64_t file_lengths;
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
off = fd->disp + etype_size * offset;
@@ -441,9 +439,7 @@ void ADIOI_ZOIDFS_WriteStrided(ADIO_File fd, void *buf, int count,
else {
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
size_wrote = 0;
n_filetypes = st_n_filetypes;
diff --git a/src/mpi/romio/adio/common/ad_coll_exch_new.c b/src/mpi/romio/adio/common/ad_coll_exch_new.c
index d121589..cbc6454 100644
--- a/src/mpi/romio/adio/common/ad_coll_exch_new.c
+++ b/src/mpi/romio/adio/common/ad_coll_exch_new.c
@@ -150,10 +150,7 @@ void ADIOI_Exch_file_views(int myrank, int nprocs, int file_ptr_type,
flat_mem_p->blocklens[0] = memtype_sz*count;
}
else {
- ADIOI_Flatten_datatype(datatype);
- flat_mem_p = ADIOI_Flatlist;
- while (flat_mem_p->type != datatype)
- flat_mem_p = flat_mem_p->next;
+ flat_mem_p = ADIOI_Flatten_and_find(datatype);
}
MPI_Type_extent(fd->filetype, &filetype_extent);
diff --git a/src/mpi/romio/adio/common/ad_iread_coll.c b/src/mpi/romio/adio/common/ad_iread_coll.c
index 605d0db..1cd8ed9 100644
--- a/src/mpi/romio/adio/common/ad_iread_coll.c
+++ b/src/mpi/romio/adio/common/ad_iread_coll.c
@@ -589,7 +589,6 @@ static void ADIOI_Iread_and_exch(ADIOI_NBC_Request *nbc_req, int *error_code)
int i, j;
ADIO_Offset st_loc = -1, end_loc = -1;
- ADIOI_Flatlist_node *flat_buf = NULL;
int coll_bufsize;
*error_code = MPI_SUCCESS; /* changed below if error */
@@ -671,10 +670,7 @@ static void ADIOI_Iread_and_exch(ADIOI_NBC_Request *nbc_req, int *error_code)
ADIOI_Datatype_iscontig(datatype, &vars->buftype_is_contig);
if (!vars->buftype_is_contig) {
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
- vars->flat_buf = flat_buf;
+ vars->flat_buf = ADIOI_Flatten_and_find(datatype);
}
MPI_Type_extent(datatype, &vars->buftype_extent);
diff --git a/src/mpi/romio/adio/common/ad_iwrite_coll.c b/src/mpi/romio/adio/common/ad_iwrite_coll.c
index 11b26c0..c5ac8b4 100644
--- a/src/mpi/romio/adio/common/ad_iwrite_coll.c
+++ b/src/mpi/romio/adio/common/ad_iwrite_coll.c
@@ -636,7 +636,6 @@ static void ADIOI_Iexch_and_write(ADIOI_NBC_Request *nbc_req, int *error_code)
int i, j;
ADIO_Offset st_loc = -1, end_loc = -1;
- ADIOI_Flatlist_node *flat_buf = NULL;
int info_flag, coll_bufsize;
char *value;
@@ -719,10 +718,7 @@ static void ADIOI_Iexch_and_write(ADIOI_NBC_Request *nbc_req, int *error_code)
ADIOI_Datatype_iscontig(datatype, &vars->buftype_is_contig);
if (!vars->buftype_is_contig) {
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
- vars->flat_buf = flat_buf;
+ vars->flat_buf = ADIOI_Flatten_and_find(datatype);
}
MPI_Type_extent(datatype, &vars->buftype_extent);
diff --git a/src/mpi/romio/adio/common/ad_read_coll.c b/src/mpi/romio/adio/common/ad_read_coll.c
index 5aa38e4..4cd481b 100644
--- a/src/mpi/romio/adio/common/ad_read_coll.c
+++ b/src/mpi/romio/adio/common/ad_read_coll.c
@@ -601,9 +601,7 @@ static void ADIOI_Read_and_exch(ADIO_File fd, void *buf, MPI_Datatype
ADIOI_Datatype_iscontig(datatype, &buftype_is_contig);
if (!buftype_is_contig) {
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
}
MPI_Type_extent(datatype, &buftype_extent);
diff --git a/src/mpi/romio/adio/common/ad_read_str.c b/src/mpi/romio/adio/common/ad_read_str.c
index bec361b..9b22a44 100644
--- a/src/mpi/romio/adio/common/ad_read_str.c
+++ b/src/mpi/romio/adio/common/ad_read_str.c
@@ -115,9 +115,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count,
/* noncontiguous in memory, contiguous in file. */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind :
fd->disp + (ADIO_Offset)etype_size * offset;
@@ -321,9 +319,7 @@ void ADIOI_GEN_ReadStrided(ADIO_File fd, void *buf, int count,
else {
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
k = num = buf_count = 0;
i_offset = flat_buf->indices[0];
diff --git a/src/mpi/romio/adio/common/ad_read_str_naive.c b/src/mpi/romio/adio/common/ad_read_str_naive.c
index 93dc0ea..44abee7 100644
--- a/src/mpi/romio/adio/common/ad_read_str_naive.c
+++ b/src/mpi/romio/adio/common/ad_read_str_naive.c
@@ -57,9 +57,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count,
int b_count;
/* noncontiguous in memory, contiguous in file. */
- ADIOI_Flatten_datatype(buftype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != buftype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(buftype);
off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind :
fd->disp + etype_size * offset;
@@ -289,9 +287,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count,
ADIO_Offset i_offset, tmp_bufsize = 0;
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(buftype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != buftype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(buftype);
b_index = buf_count = 0;
i_offset = flat_buf->indices[0];
diff --git a/src/mpi/romio/adio/common/ad_write_coll.c b/src/mpi/romio/adio/common/ad_write_coll.c
index 3207085..ce4d620 100644
--- a/src/mpi/romio/adio/common/ad_write_coll.c
+++ b/src/mpi/romio/adio/common/ad_write_coll.c
@@ -402,9 +402,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype
ADIOI_Datatype_iscontig(datatype, &buftype_is_contig);
if (!buftype_is_contig) {
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
}
MPI_Type_extent(datatype, &buftype_extent);
diff --git a/src/mpi/romio/adio/common/ad_write_nolock.c b/src/mpi/romio/adio/common/ad_write_nolock.c
index f22ba7f..e26474c 100644
--- a/src/mpi/romio/adio/common/ad_write_nolock.c
+++ b/src/mpi/romio/adio/common/ad_write_nolock.c
@@ -84,9 +84,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count,
ADIO_Offset combine_buf_remain;
/* noncontiguous in memory, contiguous in file. use writev */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
/* allocate our "combine buffer" to pack data into before writing */
combine_buf = (char *) ADIOI_Malloc(fd->hints->ind_wr_buffer_size);
@@ -311,9 +309,7 @@ void ADIOI_NOLOCK_WriteStrided(ADIO_File fd, const void *buf, int count,
else {
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
k = num = buf_count = 0;
indx = flat_buf->indices[0];
diff --git a/src/mpi/romio/adio/common/ad_write_str.c b/src/mpi/romio/adio/common/ad_write_str.c
index f3b6c89..6c62a7c 100644
--- a/src/mpi/romio/adio/common/ad_write_str.c
+++ b/src/mpi/romio/adio/common/ad_write_str.c
@@ -180,9 +180,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count,
/* noncontiguous in memory, contiguous in file. */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind :
fd->disp + (ADIO_Offset)etype_size * offset;
@@ -395,9 +393,7 @@ void ADIOI_GEN_WriteStrided(ADIO_File fd, const void *buf, int count,
else {
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(datatype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != datatype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(datatype);
k = num = buf_count = 0;
i_offset = flat_buf->indices[0];
diff --git a/src/mpi/romio/adio/common/ad_write_str_naive.c b/src/mpi/romio/adio/common/ad_write_str_naive.c
index 935753d..f004cd8 100644
--- a/src/mpi/romio/adio/common/ad_write_str_naive.c
+++ b/src/mpi/romio/adio/common/ad_write_str_naive.c
@@ -58,9 +58,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count,
int b_count;
/* noncontiguous in memory, contiguous in file. */
- ADIOI_Flatten_datatype(buftype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != buftype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(buftype);
off = (file_ptr_type == ADIO_INDIVIDUAL) ? fd->fp_ind :
fd->disp + (ADIO_Offset)etype_size * offset;
@@ -289,9 +287,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, const void *buf, int count,
ADIO_Offset i_offset, tmp_bufsize = 0;
/* noncontiguous in memory as well as in file */
- ADIOI_Flatten_datatype(buftype);
- flat_buf = ADIOI_Flatlist;
- while (flat_buf->type != buftype) flat_buf = flat_buf->next;
+ flat_buf = ADIOI_Flatten_and_find(buftype);
b_index = buf_count = 0;
i_offset = flat_buf->indices[0];
diff --git a/src/mpi/romio/adio/common/flatten.c b/src/mpi/romio/adio/common/flatten.c
index 1a2bf1a..db13a7b 100644
--- a/src/mpi/romio/adio/common/flatten.c
+++ b/src/mpi/romio/adio/common/flatten.c
@@ -1195,3 +1195,12 @@ void ADIOI_Delete_flattened(MPI_Datatype datatype)
ADIOI_Free(flat);
}
}
+
+ADIOI_Flatlist_node * ADIOI_Flatten_and_find(MPI_Datatype datatype)
+{
+ ADIOI_Flatlist_node *node;
+ ADIOI_Flatten_datatype(datatype);
+ node = ADIOI_Flatlist;
+ while (node->type != datatype) node = node->next;
+ return node;
+}
diff --git a/src/mpi/romio/adio/common/onesided_aggregation.c b/src/mpi/romio/adio/common/onesided_aggregation.c
index 84d8333..f4ae0de 100644
--- a/src/mpi/romio/adio/common/onesided_aggregation.c
+++ b/src/mpi/romio/adio/common/onesided_aggregation.c
@@ -109,9 +109,7 @@ void ADIOI_OneSidedWriteAggregation(ADIO_File fd,
if (!bufTypeIsContig) {
/* Flatten the non-contiguous source datatype.
*/
- ADIOI_Flatten_datatype(datatype);
- flatBuf = ADIOI_Flatlist;
- while (flatBuf->type != datatype) flatBuf = flatBuf->next;
+ flatBuf = ADIOI_Flatten_and_find(datatype);
MPI_Type_extent(datatype, &bufTypeExtent);
#ifdef onesidedtrace
printf("flatBuf->count is %d bufTypeExtent is %d\n", flatBuf->count,bufTypeExtent);
@@ -1126,9 +1124,7 @@ void ADIOI_OneSidedReadAggregation(ADIO_File fd,
if (!bufTypeIsContig) {
/* Flatten the non-contiguous source datatype.
*/
- ADIOI_Flatten_datatype(datatype);
- flatBuf = ADIOI_Flatlist;
- while (flatBuf->type != datatype) flatBuf = flatBuf->next;
+ flatBuf = ADIOI_Flatten_and_find(datatype);
MPI_Type_extent(datatype, &bufTypeExtent);
}
#ifdef onesidedtrace
diff --git a/src/mpi/romio/adio/include/adioi.h b/src/mpi/romio/adio/include/adioi.h
index dc045c3..4ac7d81 100644
--- a/src/mpi/romio/adio/include/adioi.h
+++ b/src/mpi/romio/adio/include/adioi.h
@@ -351,6 +351,7 @@ void ADIOI_Flatten_datatype(MPI_Datatype type);
void ADIOI_Flatten(MPI_Datatype type, ADIOI_Flatlist_node *flat,
ADIO_Offset st_offset, MPI_Count *curr_index);
void ADIOI_Delete_flattened(MPI_Datatype datatype);
+ADIOI_Flatlist_node * ADIOI_Flatten_and_find(MPI_Datatype);
MPI_Count ADIOI_Count_contiguous_blocks(MPI_Datatype type, MPI_Count *curr_index);
void ADIOI_Complete_async(int *error_code);
void *ADIOI_Malloc_fn(size_t size, int lineno, const char *fname);
http://git.mpich.org/mpich.git/commitdiff/78413c55c4820a50cd31f0df6ec009891…
commit 78413c55c4820a50cd31f0df6ec009891ff42917
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 13:16:17 2015 -0500
Initial draft of ROMIO managed thread locks.
ROMIO was implicitly sharing MPICH locks, which is incorrect.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/glue/romio/glue_romio.c b/src/glue/romio/glue_romio.c
index fa327ab..f78afc3 100644
--- a/src/glue/romio/glue_romio.c
+++ b/src/glue/romio/glue_romio.c
@@ -35,27 +35,50 @@ int MPIR_Ext_assert_fail(const char *cond, const char *file_name, int line_num)
return MPIR_Assert_fail(cond, file_name, line_num);
}
+void MPIR_Ext_thread_mutex_create(void **mutex_p_p)
+{
+ int err;
+ MPID_Thread_mutex_t *m;
+
+ m = (MPID_Thread_mutex_t *) MPIU_Malloc(sizeof(MPID_Thread_mutex_t));
+ MPID_Thread_mutex_create(m, &err);
+ MPIU_Assert(err == 0);
+
+ *mutex_p_p = (void *) m;
+}
+
+void MPIR_Ext_thread_mutex_destroy(void *mutex_p)
+{
+ int err;
+ MPID_Thread_mutex_t *m = (MPID_Thread_mutex_t *) mutex_p;
+
+ MPID_Thread_mutex_destroy(m, &err);
+ MPIU_Assert(err == 0);
+
+ MPIU_Free(mutex_p);
+}
+
/* These two routines export the GLOBAL CS_ENTER/EXIT macros as functions so
* that ROMIO can use them. These routines only support the GLOBAL granularity
* of MPICH threading; other accommodations must be made for finer-grained
* threading strategies. */
-void MPIR_Ext_cs_enter(void)
+void MPIR_Ext_cs_enter(void *mutex_p)
{
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, *((MPID_Thread_mutex_t *) mutex_p));
}
-void MPIR_Ext_cs_exit(void)
+void MPIR_Ext_cs_exit(void *mutex_p)
{
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, *((MPID_Thread_mutex_t *) mutex_p));
}
/* This routine is for a thread to yield control when the thread is waiting for
* the completion of communication inside a ROMIO routine but the progress
* engine is blocked by another thread. */
-void MPIR_Ext_cs_yield(void)
+void MPIR_Ext_cs_yield(void *mutex_p)
{
/* TODO: check whether the progress engine is blocked */
- MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ MPID_THREAD_CS_YIELD(GLOBAL, *((MPID_Thread_mutex_t *) mutex_p));
}
/* will consider MPI_DATATYPE_NULL to be an error */
diff --git a/src/include/glue_romio.h.in b/src/include/glue_romio.h.in
index 9623833..72ce3ac 100644
--- a/src/include/glue_romio.h.in
+++ b/src/include/glue_romio.h.in
@@ -51,9 +51,11 @@ extern int MPIR_Ext_dbg_romio_verbose_enabled;
* glue code that cannot be initialized statically */
int MPIR_Ext_init(void);
-void MPIR_Ext_cs_enter(void);
-void MPIR_Ext_cs_exit(void);
-void MPIR_Ext_cs_yield(void);
+void MPIR_Ext_thread_mutex_create(void **mutex_p_p);
+void MPIR_Ext_thread_mutex_destroy(void *mutex_p);
+void MPIR_Ext_cs_enter(void *mutex_p);
+void MPIR_Ext_cs_exit(void *mutex_p);
+void MPIR_Ext_cs_yield(void *mutex_p);
/* to facilitate error checking */
int MPIR_Ext_datatype_iscommitted(MPI_Datatype datatype);
diff --git a/src/mpi/romio/adio/common/ad_end.c b/src/mpi/romio/adio/common/ad_end.c
index ea4dfeb..76712ae 100644
--- a/src/mpi/romio/adio/common/ad_end.c
+++ b/src/mpi/romio/adio/common/ad_end.c
@@ -76,5 +76,8 @@ int ADIOI_End_call(MPI_Comm comm, int keyval, void *attribute_val, void
MPI_Keyval_free(&ADIOI_cb_config_list_keyval);
ADIO_End(&error_code);
+
+ MPIR_Ext_thread_mutex_destroy((void *) ADIO_THREAD_MUTEX);
+
return error_code;
}
diff --git a/src/mpi/romio/adio/common/ad_iread_coll.c b/src/mpi/romio/adio/common/ad_iread_coll.c
index b1c05d8..605d0db 100644
--- a/src/mpi/romio/adio/common/ad_iread_coll.c
+++ b/src/mpi/romio/adio/common/ad_iread_coll.c
@@ -1333,10 +1333,6 @@ static int ADIOI_GEN_irc_wait_fn(int count, void **array_of_states,
if ((timeout > 0) && (timeout < (MPI_Wtime() - starttime)))
goto fn_exit;
-
- /* If the progress engine is blocked, we have to yield for another
- thread to be able to unblock the progress engine. */
- ROMIO_THREAD_CS_YIELD();
}
}
diff --git a/src/mpi/romio/adio/common/ad_iwrite_coll.c b/src/mpi/romio/adio/common/ad_iwrite_coll.c
index 47c73ba..11b26c0 100644
--- a/src/mpi/romio/adio/common/ad_iwrite_coll.c
+++ b/src/mpi/romio/adio/common/ad_iwrite_coll.c
@@ -1558,10 +1558,6 @@ static int ADIOI_GEN_iwc_wait_fn(int count, void **array_of_states,
if ((timeout > 0) && (timeout < (MPI_Wtime() - starttime)))
goto fn_exit;
-
- /* If the progress engine is blocked, we have to yield for another
- thread to be able to unblock the progress engine. */
- ROMIO_THREAD_CS_YIELD();
}
}
diff --git a/src/mpi/romio/adio/include/adioi.h b/src/mpi/romio/adio/include/adioi.h
index 96a63f9..dc045c3 100644
--- a/src/mpi/romio/adio/include/adioi.h
+++ b/src/mpi/romio/adio/include/adioi.h
@@ -1084,4 +1084,6 @@ ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
#endif
+extern void *ADIO_THREAD_MUTEX;
+
#endif /* ADIOI_INCLUDE */
diff --git a/src/mpi/romio/mpi-io/close.c b/src/mpi/romio/mpi-io/close.c
index 3f2b0b1..57b2019 100644
--- a/src/mpi/romio/mpi-io/close.c
+++ b/src/mpi/romio/mpi-io/close.c
@@ -44,8 +44,6 @@ int MPI_File_close(MPI_File *fh)
HPMP_IO_WSTART(fl_xmpi, BLKMPIFILECLOSE, TRDTBLOCK, *adio_fh);
#endif /* MPI_hpux */
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(*fh);
/* --BEGIN ERROR HANDLING-- */
@@ -90,7 +88,6 @@ int MPI_File_close(MPI_File *fh)
#endif /* MPI_hpux */
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return error_code;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/romio/mpi-io/delete.c b/src/mpi/romio/mpi-io/delete.c
index 47b52a0..d9a3e0f 100644
--- a/src/mpi/romio/mpi-io/delete.c
+++ b/src/mpi/romio/mpi-io/delete.c
@@ -48,8 +48,6 @@ int MPI_File_delete(ROMIO_CONST char *filename, MPI_Info info)
MPIU_UNREFERENCED_ARG(info);
- ROMIO_THREAD_CS_ENTER();
-
MPIR_MPIOInit(&error_code);
if (error_code != MPI_SUCCESS) goto fn_exit;
@@ -90,6 +88,5 @@ int MPI_File_delete(ROMIO_CONST char *filename, MPI_Info info)
#endif /* MPI_hpux */
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/fsync.c b/src/mpi/romio/mpi-io/fsync.c
index 7b2ef12..03a2138 100644
--- a/src/mpi/romio/mpi-io/fsync.c
+++ b/src/mpi/romio/mpi-io/fsync.c
@@ -45,7 +45,6 @@ int MPI_File_sync(MPI_File fh)
HPMP_IO_START(fl_xmpi, BLKMPIFILESYNC, TRDTBLOCK, adio_fh,
MPI_DATATYPE_NULL, -1);
#endif /* MPI_hpux */
- ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -71,6 +70,5 @@ int MPI_File_sync(MPI_File fh)
#endif /* MPI_hpux */
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/get_errh.c b/src/mpi/romio/mpi-io/get_errh.c
index 985dcb5..0f46ab5 100644
--- a/src/mpi/romio/mpi-io/get_errh.c
+++ b/src/mpi/romio/mpi-io/get_errh.c
@@ -44,8 +44,6 @@ int MPI_File_get_errhandler(MPI_File mpi_fh, MPI_Errhandler *errhandler)
static char myname[] = "MPI_FILE_GET_ERRHANDLER";
MPIU_THREADPRIV_DECL;
- ROMIO_THREAD_CS_ENTER();
-
if (mpi_fh == MPI_FILE_NULL) {
*errhandler = ADIOI_DFLT_ERR_HANDLER;
}
@@ -66,6 +64,5 @@ int MPI_File_get_errhandler(MPI_File mpi_fh, MPI_Errhandler *errhandler)
}
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return MPI_SUCCESS;
}
diff --git a/src/mpi/romio/mpi-io/get_group.c b/src/mpi/romio/mpi-io/get_group.c
index 2b3077c..75475c3 100644
--- a/src/mpi/romio/mpi-io/get_group.c
+++ b/src/mpi/romio/mpi-io/get_group.c
@@ -43,8 +43,6 @@ int MPI_File_get_group(MPI_File fh, MPI_Group *group)
ADIO_File adio_fh;
static char myname[] = "MPI_FILE_GET_GROUP";
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -59,6 +57,5 @@ int MPI_File_get_group(MPI_File fh, MPI_Group *group)
error_code = MPI_Comm_group(adio_fh->comm, group);
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/get_info.c b/src/mpi/romio/mpi-io/get_info.c
index e923e2b..c3df84f 100644
--- a/src/mpi/romio/mpi-io/get_info.c
+++ b/src/mpi/romio/mpi-io/get_info.c
@@ -42,8 +42,6 @@ int MPI_File_get_info(MPI_File fh, MPI_Info *info_used)
ADIO_File adio_fh;
static char myname[] = "MPI_FILE_GET_INFO";
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -57,6 +55,5 @@ int MPI_File_get_info(MPI_File fh, MPI_Info *info_used)
/* --END ERROR HANDLING-- */
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/get_view.c b/src/mpi/romio/mpi-io/get_view.c
index 46b0926..38ed63c 100644
--- a/src/mpi/romio/mpi-io/get_view.c
+++ b/src/mpi/romio/mpi-io/get_view.c
@@ -52,8 +52,6 @@ int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype,
int i, j, k, combiner;
MPI_Datatype copy_etype, copy_filetype;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -96,7 +94,5 @@ int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype,
}
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return MPI_SUCCESS;
}
diff --git a/src/mpi/romio/mpi-io/ioreq_c2f.c b/src/mpi/romio/mpi-io/ioreq_c2f.c
index c21c967..37f129e 100644
--- a/src/mpi/romio/mpi-io/ioreq_c2f.c
+++ b/src/mpi/romio/mpi-io/ioreq_c2f.c
@@ -56,7 +56,6 @@ MPI_Fint MPIO_Request_c2f(MPIO_Request request)
return (MPI_Fint) 0;
}
- ROMIO_THREAD_CS_ENTER();
if (!ADIOI_Reqtable) {
ADIOI_Reqtable_max = 1024;
ADIOI_Reqtable = (MPIO_Request *)
@@ -75,7 +74,6 @@ MPI_Fint MPIO_Request_c2f(MPIO_Request request)
ADIOI_Reqtable_ptr++;
ADIOI_Reqtable[ADIOI_Reqtable_ptr] = request;
- ROMIO_THREAD_CS_EXIT();
return (MPI_Fint) ADIOI_Reqtable_ptr;
#endif
}
diff --git a/src/mpi/romio/mpi-io/ioreq_f2c.c b/src/mpi/romio/mpi-io/ioreq_f2c.c
index 4d3e509..1a4b628 100644
--- a/src/mpi/romio/mpi-io/ioreq_f2c.c
+++ b/src/mpi/romio/mpi-io/ioreq_f2c.c
@@ -49,8 +49,6 @@ MPIO_Request MPIO_Request_f2c(MPI_Fint request)
return (MPIO_Request) request;
#else
- ROMIO_THREAD_CS_ENTER();
-
if (!request) {
return MPIO_REQUEST_NULL;
}
@@ -65,7 +63,6 @@ MPIO_Request MPIO_Request_f2c(MPI_Fint request)
/* --END ERROR HANDLING-- */
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return ADIOI_Reqtable[request];
#endif
}
diff --git a/src/mpi/romio/mpi-io/iotest.c b/src/mpi/romio/mpi-io/iotest.c
index f019626..708638a 100644
--- a/src/mpi/romio/mpi-io/iotest.c
+++ b/src/mpi/romio/mpi-io/iotest.c
@@ -56,8 +56,6 @@ int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status)
}
#endif /* MPI_hpux */
- ROMIO_THREAD_CS_ENTER();
-
if (*request == MPIO_REQUEST_NULL) {
error_code = MPI_SUCCESS;
goto fn_exit;
@@ -89,7 +87,6 @@ int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status)
#endif /* MPI_hpux */
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iotestall.c b/src/mpi/romio/mpi-io/iotestall.c
index 21ff93d..a5bacb2 100644
--- a/src/mpi/romio/mpi-io/iotestall.c
+++ b/src/mpi/romio/mpi-io/iotestall.c
@@ -34,7 +34,6 @@ int MPIO_Testall(int count, MPIO_Request requests[], int *flag,
int done, i, err;
MPIU_THREADPRIV_DECL;
- ROMIO_THREAD_CS_ENTER();
if (count == 1) {
err = MPIO_Test( requests, flag, statuses );
goto fn_exit;
@@ -71,7 +70,6 @@ int MPIO_Testall(int count, MPIO_Request requests[], int *flag,
err = MPI_SUCCESS;
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return err;
}
diff --git a/src/mpi/romio/mpi-io/iotestany.c b/src/mpi/romio/mpi-io/iotestany.c
index 3f9d7af..3586a7b 100644
--- a/src/mpi/romio/mpi-io/iotestany.c
+++ b/src/mpi/romio/mpi-io/iotestany.c
@@ -34,8 +34,6 @@ int MPIO_Testany(int count, MPIO_Request requests[], int *index,
int i, err;
MPIU_THREADPRIV_DECL;
- ROMIO_THREAD_CS_ENTER();
-
if (count == 1) {
err = MPIO_Test( requests, flag, status );
if (!err) *index = 0;
@@ -76,6 +74,5 @@ int MPIO_Testany(int count, MPIO_Request requests[], int *index,
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return err;
}
diff --git a/src/mpi/romio/mpi-io/iotestsome.c b/src/mpi/romio/mpi-io/iotestsome.c
index 4cc603c..4288d1b 100644
--- a/src/mpi/romio/mpi-io/iotestsome.c
+++ b/src/mpi/romio/mpi-io/iotestsome.c
@@ -35,8 +35,6 @@ int MPIO_Testsome(int count, MPIO_Request requests[], int *outcount,
int flag;
MPIU_THREADPRIV_DECL;
- ROMIO_THREAD_CS_ENTER();
-
if (count == 1) {
err = MPIO_Test( requests, &flag, statuses );
if (!err) {
@@ -80,7 +78,5 @@ int MPIO_Testsome(int count, MPIO_Request requests[], int *outcount,
}
fn_exit:
-
- ROMIO_THREAD_CS_EXIT();
return err;
}
diff --git a/src/mpi/romio/mpi-io/iowait.c b/src/mpi/romio/mpi-io/iowait.c
index 40801c5..4c2ad20 100644
--- a/src/mpi/romio/mpi-io/iowait.c
+++ b/src/mpi/romio/mpi-io/iowait.c
@@ -56,8 +56,6 @@ int MPIO_Wait(MPIO_Request *request, MPI_Status *status)
}
#endif /* MPI_hpux */
- ROMIO_THREAD_CS_ENTER();
-
if (*request == MPIO_REQUEST_NULL) {
error_code = MPI_SUCCESS;
goto fn_exit;
@@ -90,7 +88,6 @@ int MPIO_Wait(MPIO_Request *request, MPI_Status *status)
#endif /* MPI_hpux */
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iowaitall.c b/src/mpi/romio/mpi-io/iowaitall.c
index e51768c..aeb10ed 100644
--- a/src/mpi/romio/mpi-io/iowaitall.c
+++ b/src/mpi/romio/mpi-io/iowaitall.c
@@ -33,8 +33,6 @@ int MPIO_Waitall( int count, MPIO_Request requests[], MPI_Status statuses[] )
int notdone, i, flag, err;
MPIU_THREADPRIV_DECL;
- ROMIO_THREAD_CS_ENTER();
-
if (count == 1) {
err = MPIO_Wait(requests, statuses);
goto fn_exit;
@@ -67,8 +65,6 @@ int MPIO_Waitall( int count, MPIO_Request requests[], MPI_Status statuses[] )
err = MPI_SUCCESS;
fn_exit:
-
- ROMIO_THREAD_CS_EXIT();
return err;
}
diff --git a/src/mpi/romio/mpi-io/iowaitany.c b/src/mpi/romio/mpi-io/iowaitany.c
index fa80f96..402266b 100644
--- a/src/mpi/romio/mpi-io/iowaitany.c
+++ b/src/mpi/romio/mpi-io/iowaitany.c
@@ -34,8 +34,6 @@ int MPIO_Waitany(int count, MPIO_Request requests[], int *index,
int i, flag, err;
MPIU_THREADPRIV_DECL;
- ROMIO_THREAD_CS_ENTER();
-
if (count == 1) {
err = MPIO_Wait( requests, status );
if (!err) *index = 0;
@@ -78,7 +76,5 @@ int MPIO_Waitany(int count, MPIO_Request requests[], int *index,
} while (flag == 0);
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return err;
}
diff --git a/src/mpi/romio/mpi-io/iowaitsome.c b/src/mpi/romio/mpi-io/iowaitsome.c
index bfa3976..05fed29 100644
--- a/src/mpi/romio/mpi-io/iowaitsome.c
+++ b/src/mpi/romio/mpi-io/iowaitsome.c
@@ -34,8 +34,6 @@ int MPIO_Waitsome(int count, MPIO_Request requests[], int *outcount,
int i, flag, err;
MPIU_THREADPRIV_DECL;
- ROMIO_THREAD_CS_ENTER();
-
if (count == 1) {
err = MPIO_Wait( requests, statuses );
if (!err) {
@@ -76,6 +74,5 @@ int MPIO_Waitsome(int count, MPIO_Request requests[], int *outcount,
} while (*outcount == 0);
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return err;
}
diff --git a/src/mpi/romio/mpi-io/iread.c b/src/mpi/romio/mpi-io/iread.c
index 4b23a11..0ff2a3e 100644
--- a/src/mpi/romio/mpi-io/iread.c
+++ b/src/mpi/romio/mpi-io/iread.c
@@ -83,8 +83,6 @@ int MPIOI_File_iread(MPI_File fh, MPI_Offset offset, int file_ptr_type, void *bu
ADIO_Offset off, bufsize;
MPI_Offset nbytes=0;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -154,8 +152,6 @@ int MPIOI_File_iread(MPI_File fh, MPI_Offset offset, int file_ptr_type, void *bu
offset, request, &error_code);
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iread_all.c b/src/mpi/romio/mpi-io/iread_all.c
index afe44f6..f0959f8 100644
--- a/src/mpi/romio/mpi-io/iread_all.c
+++ b/src/mpi/romio/mpi-io/iread_all.c
@@ -89,8 +89,6 @@ int MPIOI_File_iread_all(MPI_File fh,
ADIO_File adio_fh;
void *xbuf=NULL, *e32_buf=NULL;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -142,8 +140,6 @@ int MPIOI_File_iread_all(MPI_File fh,
}
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iread_sh.c b/src/mpi/romio/mpi-io/iread_sh.c
index bd64313..1fac1bc 100644
--- a/src/mpi/romio/mpi-io/iread_sh.c
+++ b/src/mpi/romio/mpi-io/iread_sh.c
@@ -55,8 +55,6 @@ int MPI_File_iread_shared(MPI_File fh, void *buf, int count,
ADIO_Offset off, shared_fp;
MPI_Offset nbytes=0;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -134,7 +132,6 @@ int MPI_File_iread_shared(MPI_File fh, void *buf, int count,
/* --END ERROR HANDLING-- */
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iwrite.c b/src/mpi/romio/mpi-io/iwrite.c
index ae6c6ae..1103b09 100644
--- a/src/mpi/romio/mpi-io/iwrite.c
+++ b/src/mpi/romio/mpi-io/iwrite.c
@@ -90,7 +90,6 @@ int MPIOI_File_iwrite(MPI_File fh,
ADIO_File adio_fh;
MPI_Offset nbytes=0;
- ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -162,7 +161,6 @@ int MPIOI_File_iwrite(MPI_File fh,
offset, request, &error_code);
}
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iwrite_all.c b/src/mpi/romio/mpi-io/iwrite_all.c
index 9f486e7..a6de14d 100644
--- a/src/mpi/romio/mpi-io/iwrite_all.c
+++ b/src/mpi/romio/mpi-io/iwrite_all.c
@@ -84,8 +84,6 @@ int MPIOI_File_iwrite_all(MPI_File fh,
void *e32buf=NULL;
const void *xbuf=NULL;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -131,8 +129,6 @@ int MPIOI_File_iwrite_all(MPI_File fh,
fn_exit:
if (e32buf != NULL) ADIOI_Free(e32buf);
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iwrite_sh.c b/src/mpi/romio/mpi-io/iwrite_sh.c
index 3f9612a..67bdfd9 100644
--- a/src/mpi/romio/mpi-io/iwrite_sh.c
+++ b/src/mpi/romio/mpi-io/iwrite_sh.c
@@ -55,8 +55,6 @@ int MPI_File_iwrite_shared(MPI_File fh, ROMIO_CONST void *buf, int count,
ADIO_Offset off, shared_fp;
static char myname[] = "MPI_FILE_IWRITE_SHARED";
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -114,7 +112,5 @@ int MPI_File_iwrite_shared(MPI_File fh, ROMIO_CONST void *buf, int count,
shared_fp, request, &error_code);
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/mpioimpl.h b/src/mpi/romio/mpi-io/mpioimpl.h
index 074ad42..c96ec64 100644
--- a/src/mpi/romio/mpi-io/mpioimpl.h
+++ b/src/mpi/romio/mpi-io/mpioimpl.h
@@ -18,9 +18,9 @@
#ifdef ROMIO_INSIDE_MPICH
#include "glue_romio.h"
-#define ROMIO_THREAD_CS_ENTER() MPIR_Ext_cs_enter()
-#define ROMIO_THREAD_CS_EXIT() MPIR_Ext_cs_exit()
-#define ROMIO_THREAD_CS_YIELD() MPIR_Ext_cs_yield()
+#define ROMIO_THREAD_CS_ENTER(mutex) MPIR_Ext_cs_enter(mutex)
+#define ROMIO_THREAD_CS_EXIT(mutex) MPIR_Ext_cs_exit(mutex)
+#define ROMIO_THREAD_CS_YIELD(mutex) MPIR_Ext_cs_yield(mutex)
/* committed datatype checking support in ROMIO */
#define MPIO_DATATYPE_ISCOMMITTED(dtype_, err_) \
@@ -33,9 +33,9 @@
error reporting features provided by MPICH must implement these
four functions. Defining these as empty should not change the behavior
of correct programs */
-#define ROMIO_THREAD_CS_ENTER()
-#define ROMIO_THREAD_CS_EXIT()
-#define ROMIO_THREAD_CS_YIELD()
+#define ROMIO_THREAD_CS_ENTER(mutex)
+#define ROMIO_THREAD_CS_EXIT(mutex)
+#define ROMIO_THREAD_CS_YIELD(mutex)
#define MPIO_DATATYPE_ISCOMMITTED(dtype_, err_) do {} while (0)
#ifdef HAVE_WINDOWS_H
#define MPIU_UNREFERENCED_ARG(a) a
diff --git a/src/mpi/romio/mpi-io/mpir-mpioinit.c b/src/mpi/romio/mpi-io/mpir-mpioinit.c
index be78b45..a7f9d08 100644
--- a/src/mpi/romio/mpi-io/mpir-mpioinit.c
+++ b/src/mpi/romio/mpi-io/mpir-mpioinit.c
@@ -13,6 +13,7 @@
#endif
extern int ADIO_Init_keyval;
+void *ADIO_THREAD_MUTEX = NULL;
/* common code to stuff an attribute on a communicator for the purpose of
* cleaning up in MPI_Finalize() */
@@ -48,6 +49,9 @@ void MPIR_MPIOInit(int * error_code) {
/* initialize ADIO */
ADIO_Init( (int *)0, (char ***)0, error_code);
+
+ /* create mutexes */
+ MPIR_Ext_thread_mutex_create((void **) &ADIO_THREAD_MUTEX);
}
*error_code = MPI_SUCCESS;
}
diff --git a/src/mpi/romio/mpi-io/open.c b/src/mpi/romio/mpi-io/open.c
index 7cebb5a..f100022 100644
--- a/src/mpi/romio/mpi-io/open.c
+++ b/src/mpi/romio/mpi-io/open.c
@@ -59,8 +59,6 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode,
HPMP_IO_OPEN_START(fl_xmpi, comm);
#endif /* MPI_hpux */
- ROMIO_THREAD_CS_ENTER();
-
/* --BEGIN ERROR HANDLING-- */
MPIO_CHECK_COMM(comm, myname, error_code);
MPIO_CHECK_INFO_ALL(info, error_code, comm);
@@ -198,7 +196,6 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode,
#endif /* MPI_hpux */
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return error_code;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/romio/mpi-io/prealloc.c b/src/mpi/romio/mpi-io/prealloc.c
index 1542e47..c258295 100644
--- a/src/mpi/romio/mpi-io/prealloc.c
+++ b/src/mpi/romio/mpi-io/prealloc.c
@@ -48,8 +48,6 @@ int MPI_File_preallocate(MPI_File fh, MPI_Offset size)
adio_fh, MPI_DATATYPE_NULL, -1);
#endif /* MPI_hpux */
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -99,8 +97,6 @@ int MPI_File_preallocate(MPI_File fh, MPI_Offset size)
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
/* TODO: bcast result? */
if (!mynod) return error_code;
else return MPI_SUCCESS;
diff --git a/src/mpi/romio/mpi-io/read.c b/src/mpi/romio/mpi-io/read.c
index 6f12914..05ed206 100644
--- a/src/mpi/romio/mpi-io/read.c
+++ b/src/mpi/romio/mpi-io/read.c
@@ -79,8 +79,6 @@ int MPIOI_File_read(MPI_File fh,
ADIO_Offset off, bufsize;
void *xbuf=NULL, *e32_buf=NULL;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -180,8 +178,6 @@ int MPIOI_File_read(MPI_File fh,
}
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/read_all.c b/src/mpi/romio/mpi-io/read_all.c
index e0b605d..eed2606 100644
--- a/src/mpi/romio/mpi-io/read_all.c
+++ b/src/mpi/romio/mpi-io/read_all.c
@@ -80,8 +80,6 @@ int MPIOI_File_read_all(MPI_File fh,
ADIO_File adio_fh;
void *xbuf=NULL, *e32_buf=NULL;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -135,8 +133,6 @@ int MPIOI_File_read_all(MPI_File fh,
}
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/read_allb.c b/src/mpi/romio/mpi-io/read_allb.c
index 2110f71..5e2b31a 100644
--- a/src/mpi/romio/mpi-io/read_allb.c
+++ b/src/mpi/romio/mpi-io/read_allb.c
@@ -67,8 +67,6 @@ int MPIOI_File_read_all_begin(MPI_File fh,
ADIO_File adio_fh;
void *xbuf=NULL, *e32_buf=NULL;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -132,8 +130,6 @@ int MPIOI_File_read_all_begin(MPI_File fh,
}
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/read_alle.c b/src/mpi/romio/mpi-io/read_alle.c
index e2853c1..1754b6c 100644
--- a/src/mpi/romio/mpi-io/read_alle.c
+++ b/src/mpi/romio/mpi-io/read_alle.c
@@ -60,8 +60,6 @@ int MPIOI_File_read_all_end(MPI_File fh,
MPIU_UNREFERENCED_ARG(buf);
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -83,8 +81,6 @@ int MPIOI_File_read_all_end(MPI_File fh,
adio_fh->split_coll_count = 0;
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/read_ord.c b/src/mpi/romio/mpi-io/read_ord.c
index be87763..0560d89 100644
--- a/src/mpi/romio/mpi-io/read_ord.c
+++ b/src/mpi/romio/mpi-io/read_ord.c
@@ -53,8 +53,6 @@ int MPI_File_read_ordered(MPI_File fh, void *buf, int count,
ADIO_Offset shared_fp=0;
ADIO_File adio_fh;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -104,8 +102,6 @@ int MPI_File_read_ordered(MPI_File fh, void *buf, int count,
/* --END ERROR HANDLING-- */
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
/* FIXME: Check for error code from ReadStridedColl? */
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_ordb.c b/src/mpi/romio/mpi-io/read_ordb.c
index 5548bde..88fbc9b 100644
--- a/src/mpi/romio/mpi-io/read_ordb.c
+++ b/src/mpi/romio/mpi-io/read_ordb.c
@@ -50,8 +50,6 @@ int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count,
static char myname[] = "MPI_FILE_READ_ORDERED_BEGIN";
void *xbuf=NULL, *e32_buf=NULL;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -131,7 +129,5 @@ int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count,
}
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_orde.c b/src/mpi/romio/mpi-io/read_orde.c
index 542f687..649d2e0 100644
--- a/src/mpi/romio/mpi-io/read_orde.c
+++ b/src/mpi/romio/mpi-io/read_orde.c
@@ -45,8 +45,6 @@ int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status)
MPIU_UNREFERENCED_ARG(buf);
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -69,7 +67,5 @@ int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status)
adio_fh->split_coll_count = 0;
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_sh.c b/src/mpi/romio/mpi-io/read_sh.c
index 8ebbf87..34e76b0 100644
--- a/src/mpi/romio/mpi-io/read_sh.c
+++ b/src/mpi/romio/mpi-io/read_sh.c
@@ -52,8 +52,6 @@ int MPI_File_read_shared(MPI_File fh, void *buf, int count,
ADIO_File adio_fh;
void *xbuf=NULL, *e32_buf=NULL;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -149,7 +147,5 @@ int MPI_File_read_shared(MPI_File fh, void *buf, int count,
ADIOI_Free(e32_buf);
}
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/register_datarep.c b/src/mpi/romio/mpi-io/register_datarep.c
index 3895872..53ebe3c 100644
--- a/src/mpi/romio/mpi-io/register_datarep.c
+++ b/src/mpi/romio/mpi-io/register_datarep.c
@@ -62,8 +62,6 @@ int MPI_Register_datarep(ROMIO_CONST char *datarep,
ADIOI_Datarep *adio_datarep;
static char myname[] = "MPI_REGISTER_DATAREP";
- ROMIO_THREAD_CS_ENTER();
-
/* --BEGIN ERROR HANDLING-- */
/* check datarep name (use strlen instead of strnlen because
strnlen is not portable) */
@@ -139,7 +137,5 @@ int MPI_Register_datarep(ROMIO_CONST char *datarep,
error_code = MPI_SUCCESS;
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/seek.c b/src/mpi/romio/mpi-io/seek.c
index c68394a..78602b1 100644
--- a/src/mpi/romio/mpi-io/seek.c
+++ b/src/mpi/romio/mpi-io/seek.c
@@ -49,8 +49,6 @@ int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence)
HPMP_IO_START(fl_xmpi, BLKMPIFILESEEK, TRDTBLOCK, adio_fh, MPI_DATATYPE_NULL, -1);
#endif /* MPI_hpux */
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -134,6 +132,5 @@ int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence)
error_code = MPI_SUCCESS;
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/seek_sh.c b/src/mpi/romio/mpi-io/seek_sh.c
index d3ce1ab..18396a5 100644
--- a/src/mpi/romio/mpi-io/seek_sh.c
+++ b/src/mpi/romio/mpi-io/seek_sh.c
@@ -41,8 +41,6 @@ int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence)
MPI_Offset curr_offset, eof_offset, tmp_offset;
ADIO_File adio_fh;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -178,7 +176,5 @@ int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence)
error_code = MPI_SUCCESS;
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/set_atom.c b/src/mpi/romio/mpi-io/set_atom.c
index 00be9fc..7cd5c5f 100644
--- a/src/mpi/romio/mpi-io/set_atom.c
+++ b/src/mpi/romio/mpi-io/set_atom.c
@@ -41,8 +41,6 @@ int MPI_File_set_atomicity(MPI_File fh, int flag)
ADIO_Fcntl_t *fcntl_struct;
ADIO_File adio_fh;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -86,6 +84,5 @@ int MPI_File_set_atomicity(MPI_File fh, int flag)
ADIOI_Free(fcntl_struct);
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/set_errh.c b/src/mpi/romio/mpi-io/set_errh.c
index 5a299f9..b9f4203 100644
--- a/src/mpi/romio/mpi-io/set_errh.c
+++ b/src/mpi/romio/mpi-io/set_errh.c
@@ -42,8 +42,6 @@ int MPI_File_set_errhandler(MPI_File mpi_fh, MPI_Errhandler errhandler)
ADIO_File fh;
MPIU_THREADPRIV_DECL;
- ROMIO_THREAD_CS_ENTER();
-
if (mpi_fh == MPI_FILE_NULL) {
ADIOI_DFLT_ERR_HANDLER = errhandler;
}
@@ -71,6 +69,5 @@ int MPI_File_set_errhandler(MPI_File mpi_fh, MPI_Errhandler errhandler)
}
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/set_info.c b/src/mpi/romio/mpi-io/set_info.c
index 2c898fe..4eb1405 100644
--- a/src/mpi/romio/mpi-io/set_info.c
+++ b/src/mpi/romio/mpi-io/set_info.c
@@ -40,8 +40,6 @@ int MPI_File_set_info(MPI_File fh, MPI_Info info)
static char myname[] = "MPI_FILE_SET_INFO";
ADIO_File adio_fh;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -58,8 +56,6 @@ fn_exit:
error_code = MPIO_Err_return_file(adio_fh, error_code);
/* --END ERROR HANDLING-- */
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
fn_fail:
goto fn_exit;
diff --git a/src/mpi/romio/mpi-io/set_size.c b/src/mpi/romio/mpi-io/set_size.c
index b658929..26a8b4d 100644
--- a/src/mpi/romio/mpi-io/set_size.c
+++ b/src/mpi/romio/mpi-io/set_size.c
@@ -48,8 +48,6 @@ int MPI_File_set_size(MPI_File fh, MPI_Offset size)
MPI_DATATYPE_NULL, -1);
#endif /* MPI_hpux */
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -99,7 +97,5 @@ int MPI_File_set_size(MPI_File fh, MPI_Offset size)
#endif /* MPI_hpux */
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/set_view.c b/src/mpi/romio/mpi-io/set_view.c
index 4d98fdd..e5fc2ef 100644
--- a/src/mpi/romio/mpi-io/set_view.c
+++ b/src/mpi/romio/mpi-io/set_view.c
@@ -48,8 +48,6 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype,
ADIO_Offset shared_fp, byte_off;
ADIO_File adio_fh;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -193,8 +191,6 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype,
adio_fh->is_external32 = 1;
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/romio/mpi-io/write.c b/src/mpi/romio/mpi-io/write.c
index eb9a77f..8aa22d1 100644
--- a/src/mpi/romio/mpi-io/write.c
+++ b/src/mpi/romio/mpi-io/write.c
@@ -80,8 +80,6 @@ int MPIOI_File_write(MPI_File fh,
void *e32buf=NULL;
const void *xbuf=NULL;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -179,8 +177,6 @@ int MPIOI_File_write(MPI_File fh,
fn_exit:
if (e32buf!= NULL) ADIOI_Free(e32buf);
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/write_all.c b/src/mpi/romio/mpi-io/write_all.c
index 6f17cc3..e48fe98 100644
--- a/src/mpi/romio/mpi-io/write_all.c
+++ b/src/mpi/romio/mpi-io/write_all.c
@@ -81,8 +81,6 @@ int MPIOI_File_write_all(MPI_File fh,
void *e32buf=NULL;
const void *xbuf=NULL;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -127,8 +125,6 @@ int MPIOI_File_write_all(MPI_File fh,
fn_exit:
if (e32buf != NULL) ADIOI_Free(e32buf);
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/write_allb.c b/src/mpi/romio/mpi-io/write_allb.c
index e184723..40b2fe9 100644
--- a/src/mpi/romio/mpi-io/write_allb.c
+++ b/src/mpi/romio/mpi-io/write_allb.c
@@ -67,8 +67,6 @@ int MPIOI_File_write_all_begin(MPI_File fh,
void *e32buf=NULL;
const void *xbuf=NULL;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -125,8 +123,6 @@ int MPIOI_File_write_all_begin(MPI_File fh,
fn_exit:
if ( e32buf != NULL) ADIOI_Free(e32buf);
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/write_alle.c b/src/mpi/romio/mpi-io/write_alle.c
index 6dc7f6d..5699858 100644
--- a/src/mpi/romio/mpi-io/write_alle.c
+++ b/src/mpi/romio/mpi-io/write_alle.c
@@ -59,8 +59,6 @@ int MPIOI_File_write_all_end(MPI_File fh,
MPIU_UNREFERENCED_ARG(buf);
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -88,8 +86,6 @@ int MPIOI_File_write_all_end(MPI_File fh,
error_code = MPI_SUCCESS;
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/write_ord.c b/src/mpi/romio/mpi-io/write_ord.c
index eb72734..17b8d21 100644
--- a/src/mpi/romio/mpi-io/write_ord.c
+++ b/src/mpi/romio/mpi-io/write_ord.c
@@ -56,8 +56,6 @@ int MPI_File_write_ordered(MPI_File fh, ROMIO_CONST void *buf, int count,
void *e32buf=NULL;
const void *xbuf;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -120,7 +118,6 @@ int MPI_File_write_ordered(MPI_File fh, ROMIO_CONST void *buf, int count,
fn_exit:
if (e32buf != NULL) ADIOI_Free(e32buf);
- ROMIO_THREAD_CS_EXIT();
/* FIXME: Check for error code from WriteStridedColl? */
return error_code;
diff --git a/src/mpi/romio/mpi-io/write_ordb.c b/src/mpi/romio/mpi-io/write_ordb.c
index 8b5a302..829f13e 100644
--- a/src/mpi/romio/mpi-io/write_ordb.c
+++ b/src/mpi/romio/mpi-io/write_ordb.c
@@ -52,8 +52,6 @@ int MPI_File_write_ordered_begin(MPI_File fh, ROMIO_CONST void *buf, int count,
void *e32buf = NULL;
const void *xbuf=NULL;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -125,8 +123,6 @@ int MPI_File_write_ordered_begin(MPI_File fh, ROMIO_CONST void *buf, int count,
/* --END ERROR HANDLING-- */
fn_exit:
- ROMIO_THREAD_CS_EXIT();
-
/* FIXME: Check for error code from WriteStridedColl? */
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/write_orde.c b/src/mpi/romio/mpi-io/write_orde.c
index 8cfdba2..4d294b8 100644
--- a/src/mpi/romio/mpi-io/write_orde.c
+++ b/src/mpi/romio/mpi-io/write_orde.c
@@ -45,8 +45,6 @@ int MPI_File_write_ordered_end(MPI_File fh, ROMIO_CONST void *buf, MPI_Status *s
MPIU_UNREFERENCED_ARG(buf);
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -68,8 +66,6 @@ int MPI_File_write_ordered_end(MPI_File fh, ROMIO_CONST void *buf, MPI_Status *s
#endif
adio_fh->split_coll_count = 0;
-
fn_exit:
- ROMIO_THREAD_CS_EXIT();
return MPI_SUCCESS;
}
diff --git a/src/mpi/romio/mpi-io/write_sh.c b/src/mpi/romio/mpi-io/write_sh.c
index ed8e1c1..ce6444b 100644
--- a/src/mpi/romio/mpi-io/write_sh.c
+++ b/src/mpi/romio/mpi-io/write_sh.c
@@ -54,8 +54,6 @@ int MPI_File_write_shared(MPI_File fh, ROMIO_CONST void *buf, int count,
void *e32buf = NULL;
const void *xbuf = NULL;
- ROMIO_THREAD_CS_ENTER();
-
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -144,6 +142,5 @@ int MPI_File_write_shared(MPI_File fh, ROMIO_CONST void *buf, int count,
fn_exit:
if (e32buf != NULL) ADIOI_Free(e32buf);
- ROMIO_THREAD_CS_EXIT();
return error_code;
}
-----------------------------------------------------------------------
Summary of changes:
src/glue/romio/glue_romio.c | 35 +++-
src/include/glue_romio.h.in | 8 +-
src/mpi/init/initthread.c | 2 -
src/mpi/romio/adio/ad_gpfs/ad_gpfs_rdcoll.c | 4 +-
src/mpi/romio/adio/ad_gpfs/ad_gpfs_wrcoll.c | 4 +-
src/mpi/romio/adio/ad_gridftp/ad_gridftp_read.c | 5 +-
src/mpi/romio/adio/ad_gridftp/ad_gridftp_write.c | 5 +-
src/mpi/romio/adio/ad_lustre/ad_lustre_wrcoll.c | 5 +-
src/mpi/romio/adio/ad_lustre/ad_lustre_wrstr.c | 10 +-
src/mpi/romio/adio/ad_nfs/ad_nfs_read.c | 8 +-
src/mpi/romio/adio/ad_nfs/ad_nfs_write.c | 8 +-
src/mpi/romio/adio/ad_piofs/ad_piofs_write.c | 8 +-
src/mpi/romio/adio/ad_pvfs/ad_pvfs_read.c | 8 +-
src/mpi/romio/adio/ad_pvfs/ad_pvfs_write.c | 16 +--
src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_io_list.c | 10 +-
.../adio/ad_pvfs2/ad_pvfs2_read_list_classic.c | 8 +-
.../adio/ad_pvfs2/ad_pvfs2_write_list_classic.c | 8 +-
src/mpi/romio/adio/ad_zoidfs/ad_zoidfs_read_list.c | 8 +-
.../romio/adio/ad_zoidfs/ad_zoidfs_write_list.c | 8 +-
src/mpi/romio/adio/common/ad_coll_exch_new.c | 5 +-
src/mpi/romio/adio/common/ad_end.c | 5 +
src/mpi/romio/adio/common/ad_iread_coll.c | 10 +-
src/mpi/romio/adio/common/ad_iwrite_coll.c | 10 +-
src/mpi/romio/adio/common/ad_read_coll.c | 4 +-
src/mpi/romio/adio/common/ad_read_str.c | 8 +-
src/mpi/romio/adio/common/ad_read_str_naive.c | 8 +-
src/mpi/romio/adio/common/ad_write_coll.c | 4 +-
src/mpi/romio/adio/common/ad_write_nolock.c | 8 +-
src/mpi/romio/adio/common/ad_write_str.c | 8 +-
src/mpi/romio/adio/common/ad_write_str_naive.c | 8 +-
src/mpi/romio/adio/common/cb_config_list.c | 2 +
src/mpi/romio/adio/common/flatten.c | 16 ++
src/mpi/romio/adio/common/onesided_aggregation.c | 8 +-
src/mpi/romio/adio/include/adioi.h | 3 +
src/mpi/romio/mpi-io/close.c | 3 -
src/mpi/romio/mpi-io/delete.c | 3 -
src/mpi/romio/mpi-io/fsync.c | 2 -
src/mpi/romio/mpi-io/get_errh.c | 3 -
src/mpi/romio/mpi-io/get_group.c | 3 -
src/mpi/romio/mpi-io/get_info.c | 3 -
src/mpi/romio/mpi-io/get_view.c | 4 -
src/mpi/romio/mpi-io/glue/mpich/mpio_file.c | 2 +
src/mpi/romio/mpi-io/ioreq_c2f.c | 2 -
src/mpi/romio/mpi-io/ioreq_f2c.c | 3 -
src/mpi/romio/mpi-io/iotest.c | 3 -
src/mpi/romio/mpi-io/iotestall.c | 2 -
src/mpi/romio/mpi-io/iotestany.c | 3 -
src/mpi/romio/mpi-io/iotestsome.c | 4 -
src/mpi/romio/mpi-io/iowait.c | 3 -
src/mpi/romio/mpi-io/iowaitall.c | 4 -
src/mpi/romio/mpi-io/iowaitany.c | 4 -
src/mpi/romio/mpi-io/iowaitsome.c | 3 -
src/mpi/romio/mpi-io/iread.c | 4 -
src/mpi/romio/mpi-io/iread_all.c | 4 -
src/mpi/romio/mpi-io/iread_sh.c | 3 -
src/mpi/romio/mpi-io/iwrite.c | 2 -
src/mpi/romio/mpi-io/iwrite_all.c | 4 -
src/mpi/romio/mpi-io/iwrite_sh.c | 4 -
src/mpi/romio/mpi-io/mpioimpl.h | 12 +-
src/mpi/romio/mpi-io/mpir-mpioinit.c | 4 +
src/mpi/romio/mpi-io/open.c | 3 -
src/mpi/romio/mpi-io/prealloc.c | 4 -
src/mpi/romio/mpi-io/read.c | 4 -
src/mpi/romio/mpi-io/read_all.c | 4 -
src/mpi/romio/mpi-io/read_allb.c | 4 -
src/mpi/romio/mpi-io/read_alle.c | 4 -
src/mpi/romio/mpi-io/read_ord.c | 4 -
src/mpi/romio/mpi-io/read_ordb.c | 4 -
src/mpi/romio/mpi-io/read_orde.c | 4 -
src/mpi/romio/mpi-io/read_sh.c | 4 -
src/mpi/romio/mpi-io/register_datarep.c | 4 -
src/mpi/romio/mpi-io/seek.c | 3 -
src/mpi/romio/mpi-io/seek_sh.c | 4 -
src/mpi/romio/mpi-io/set_atom.c | 3 -
src/mpi/romio/mpi-io/set_errh.c | 3 -
src/mpi/romio/mpi-io/set_info.c | 4 -
src/mpi/romio/mpi-io/set_size.c | 4 -
src/mpi/romio/mpi-io/set_view.c | 4 -
src/mpi/romio/mpi-io/write.c | 4 -
src/mpi/romio/mpi-io/write_all.c | 4 -
src/mpi/romio/mpi-io/write_allb.c | 4 -
src/mpi/romio/mpi-io/write_alle.c | 4 -
src/mpi/romio/mpi-io/write_ord.c | 3 -
src/mpi/romio/mpi-io/write_ordb.c | 4 -
src/mpi/romio/mpi-io/write_orde.c | 4 -
src/mpi/romio/mpi-io/write_sh.c | 3 -
src/util/thread/mpiu_thread.h | 8 -
src/util/thread/mpiu_thread_global.h | 36 +---
src/util/thread/mpiu_thread_multiple.h | 184 ++-----------------
src/util/thread/mpiu_thread_pobj.h | 32 +---
90 files changed, 153 insertions(+), 571 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b4-158-g88affa5
by noreply@mpich.org 18 Aug '15
by noreply@mpich.org 18 Aug '15
18 Aug '15
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 88affa5941155e68ead5eedd59ce093f6d2fb625 (commit)
via 62c11077417fb00077b7c99d10a2210480775b35 (commit)
via 2858b7ef5d24b8ef0a9f18b5c0cd7c2dd0b2eae2 (commit)
from cc4f192f5e7e492c1d92459ac1ef640641abcf3c (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/88affa5941155e68ead5eedd59ce093f6…
commit 88affa5941155e68ead5eedd59ce093f6d2fb625
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 13:40:29 2015 -0500
Consistently add error checking in all threading code.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index 8263735..326c3bf 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -102,6 +102,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
\
MPIU_DBG_MSG_P(THREAD,TYPICAL,"About to destroy MPIU_Thread_mutex %p", (mutex_ptr_)); \
err__ = pthread_mutex_destroy(&(mutex_ptr_)->mutex); \
+ if (unlikely(err__)) \
+ MPL_internal_sys_error_printf("pthread_mutex_destroy", err__, \
+ " %s:%d\n", __FILE__, __LINE__); \
*(int *)(err_ptr_) = err__; \
} while (0)
@@ -147,6 +150,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
int err__; \
\
err__ = pthread_cond_init((cond_ptr_), NULL); \
+ if (unlikely(err__)) \
+ MPL_internal_sys_error_printf("pthread_cond_init", err__, \
+ " %s:%d\n", __FILE__, __LINE__); \
MPIU_DBG_MSG_P(THREAD,TYPICAL,"Created MPIU_Thread_cond %p", (cond_ptr_)); \
*(int *)(err_ptr_) = err__; \
} while (0)
@@ -157,6 +163,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
\
MPIU_DBG_MSG_P(THREAD,TYPICAL,"About to destroy MPIU_Thread_cond %p", (cond_ptr_)); \
err__ = pthread_cond_destroy(cond_ptr_); \
+ if (unlikely(err__)) \
+ MPL_internal_sys_error_printf("pthread_cond_destroy", err__, \
+ " %s:%d\n", __FILE__, __LINE__); \
*(int *)(err_ptr_) = err__; \
} while (0)
@@ -173,6 +182,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
err__ = pthread_cond_wait((cond_ptr_), &(mutex_ptr_)->mutex); \
OPA_decr_int(&(mutex_ptr_)->num_queued_threads); \
} while (err__ == EINTR); \
+ if (unlikely(err__)) \
+ MPL_internal_sys_error_printf("pthread_cond_wait", err__, \
+ " %s:%d\n", __FILE__, __LINE__); \
\
*(int *)(err_ptr_) = err__; \
MPIU_Assert_fmt_msg(err__ == 0, \
@@ -186,6 +198,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
\
MPIU_DBG_MSG_P(THREAD,TYPICAL,"About to cond_broadcast on MPIU_Thread_cond %p", (cond_ptr_)); \
err__ = pthread_cond_broadcast(cond_ptr_); \
+ if (unlikely(err__)) \
+ MPL_internal_sys_error_printf("pthread_cond_broadcast", err__, \
+ " %s:%d\n", __FILE__, __LINE__); \
\
*(int *)(err_ptr_) = err__; \
MPIU_Assert_fmt_msg(err__ == 0, \
@@ -198,6 +213,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
\
MPIU_DBG_MSG_P(THREAD,TYPICAL,"About to cond_signal on MPIU_Thread_cond %p", (cond_ptr_)); \
err__ = pthread_cond_signal(cond_ptr_); \
+ if (unlikely(err__)) \
+ MPL_internal_sys_error_printf("pthread_cond_signal", err__, \
+ " %s:%d\n", __FILE__, __LINE__); \
\
*(int *)(err_ptr_) = err__; \
MPIU_Assert_fmt_msg(err__ == 0, \
@@ -214,6 +232,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
int err__; \
\
err__ = pthread_key_create((tls_ptr_), (exit_func_ptr_)); \
+ if (unlikely(err__)) \
+ MPL_internal_sys_error_printf("pthread_key_create", err__, \
+ " %s:%d\n", __FILE__, __LINE__); \
\
*(int *)(err_ptr_) = err__; \
} while (0)
@@ -223,6 +244,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
int err__; \
\
err__ = pthread_key_delete(*(tls_ptr_)); \
+ if (unlikely(err__)) \
+ MPL_internal_sys_error_printf("pthread_key_delete", err__, \
+ " %s:%d\n", __FILE__, __LINE__); \
\
*(int *)(err_ptr_) = err__; \
} while (0)
@@ -232,6 +256,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
int err__; \
\
err__ = pthread_setspecific(*(tls_ptr_), (value_)); \
+ if (unlikely(err__)) \
+ MPL_internal_sys_error_printf("pthread_setspecific", err__, \
+ " %s:%d\n", __FILE__, __LINE__); \
\
*(int *)(err_ptr_) = err__; \
MPIU_Assert_fmt_msg(err__ == 0, \
http://git.mpich.org/mpich.git/commitdiff/62c11077417fb00077b7c99d10a221048…
commit 62c11077417fb00077b7c99d10a2210480775b35
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 13:37:19 2015 -0500
Make error checking unlikely.
Improves performance when locks are used in the critical path.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index 8100581..8263735 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -69,7 +69,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
\
OPA_store_int(&(mutex_ptr_)->num_queued_threads, 0); \
err__ = pthread_mutex_init(&(mutex_ptr_)->mutex, NULL); \
- if (err__) \
+ if (unlikely(err__)) \
MPL_internal_sys_error_printf("pthread_mutex_init", err__, \
" %s:%d\n", __FILE__, __LINE__); \
*(int *)(err_ptr_) = err__; \
@@ -87,7 +87,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
pthread_mutexattr_init(&attr__); \
pthread_mutexattr_settype(&attr__, MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE); \
err__ = pthread_mutex_init(&(mutex_ptr_)->mutex, &attr__); \
- if (err__) \
+ if (unlikely(err__)) \
MPL_internal_sys_error_printf("pthread_mutex_init", err__, \
" %s:%d\n", __FILE__, __LINE__); \
*(int *)(err_ptr_) = err__; \
@@ -113,7 +113,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
OPA_incr_int(&(mutex_ptr_)->num_queued_threads); \
err__ = pthread_mutex_lock(&(mutex_ptr_)->mutex); \
OPA_decr_int(&(mutex_ptr_)->num_queued_threads); \
- if (err__) { \
+ if (unlikely(err__)) { \
MPIU_DBG_MSG_S(THREAD,TERSE," mutex lock error: %s", MPIU_Strerror(err__)); \
MPL_internal_sys_error_printf("pthread_mutex_lock", err__, \
" %s:%d\n", __FILE__, __LINE__); \
@@ -129,7 +129,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
\
MPIU_DBG_MSG_P(THREAD,VERBOSE,"MPIU_Thread_mutex_unlock %p", (mutex_ptr_)); \
err__ = pthread_mutex_unlock(&(mutex_ptr_)->mutex); \
- if (err__) { \
+ if (unlikely(err__)) { \
MPIU_DBG_MSG_S(THREAD,TERSE," mutex unlock error: %s", MPIU_Strerror(err__)); \
MPL_internal_sys_error_printf("pthread_mutex_unlock", err__, \
" %s:%d\n", __FILE__, __LINE__); \
http://git.mpich.org/mpich.git/commitdiff/2858b7ef5d24b8ef0a9f18b5c0cd7c2dd…
commit 2858b7ef5d24b8ef0a9f18b5c0cd7c2dd0b2eae2
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 13:22:28 2015 -0500
Bug-fix: Part of adioi.h code was outside the header macro protection.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/mpi/romio/adio/include/adioi.h b/src/mpi/romio/adio/include/adioi.h
index 4e8e35f..96a63f9 100644
--- a/src/mpi/romio/adio/include/adioi.h
+++ b/src/mpi/romio/adio/include/adioi.h
@@ -1076,12 +1076,12 @@ void *ADIOI_IO_Thread_Func(void *vptr_args);
#define PATH_MAX 65535
#endif
-#endif
-
-
#if (HAVE_DECL_PWRITE == 0)
#include <sys/types.h>
#include <unistd.h>
ssize_t pread(int fd, void *buf, size_t count, off_t offset);
ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
+
#endif
+
+#endif /* ADIOI_INCLUDE */
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/include/adioi.h | 6 ++--
src/util/thread/mpiu_thread_posix_funcs.h | 35 +++++++++++++++++++++++++---
2 files changed, 34 insertions(+), 7 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b4-155-gcc4f192
by noreply@mpich.org 18 Aug '15
by noreply@mpich.org 18 Aug '15
18 Aug '15
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 cc4f192f5e7e492c1d92459ac1ef640641abcf3c (commit)
from 8e449a06e6db8d277558296e6a15cfe86b59c61a (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/cc4f192f5e7e492c1d92459ac1ef64064…
commit cc4f192f5e7e492c1d92459ac1ef640641abcf3c
Author: Huiwei Lu <huiweilu(a)mcs.anl.gov>
Date: Tue Aug 11 20:25:54 2015 -0500
Fixing idup error handling
Adding error handling for idup context id exhaustion.
Fix #2296
Signed-off-by: Lena Oden <loden(a)anl.gov>
diff --git a/src/mpi/comm/contextid.c b/src/mpi/comm/contextid.c
index 6cace52..3f58f63 100644
--- a/src/mpi/comm/contextid.c
+++ b/src/mpi/comm/contextid.c
@@ -41,6 +41,7 @@ cvars:
*/
static uint32_t context_mask[MPIR_MAX_CONTEXT_MASK];
static int initialize_context_mask = 1;
+const int ALL_OWN_MASK_FLAG = MPIR_MAX_CONTEXT_MASK;
/* utility function to pretty print a context ID for debugging purposes, see
* mpiimpl.h for more info on the various fields */
@@ -325,7 +326,6 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
MPIU_Context_id_t * context_id, int ignore_id)
{
int mpi_errno = MPI_SUCCESS;
- const int ALL_OWN_MASK_FLAG = MPIR_MAX_CONTEXT_MASK;
uint32_t local_mask[MPIR_MAX_CONTEXT_MASK + 1];
int own_mask = 0;
int own_eager_mask = 0;
@@ -602,7 +602,7 @@ struct gcn_state {
MPID_Sched_t s;
MPID_Comm *new_comm;
MPID_Comm_kind_t gcn_cid_kind;
- uint32_t local_mask[MPIR_MAX_CONTEXT_MASK];
+ uint32_t local_mask[MPIR_MAX_CONTEXT_MASK+1];
};
static int sched_cb_gcn_copy_mask(MPID_Comm * comm, int tag, void *state);
@@ -691,6 +691,7 @@ static int sched_cb_gcn_allocate_cid(MPID_Comm * comm, int tag, void *state)
int mpi_errno = MPI_SUCCESS;
struct gcn_state *st = state;
MPIU_Context_id_t newctxid;
+ MPIR_Errflag_t errflag = MPIR_ERR_NONE;
if (st->own_eager_mask) {
newctxid = find_and_allocate_context_id(st->local_mask);
@@ -720,11 +721,32 @@ static int sched_cb_gcn_allocate_cid(MPID_Comm * comm, int tag, void *state)
}
if (*st->ctx0 == 0) {
- /* do not own mask, try again */
- mpi_errno = MPID_Sched_cb(&sched_cb_gcn_copy_mask, st, st->s);
- if (mpi_errno)
- MPIR_ERR_POP(mpi_errno);
- MPID_SCHED_BARRIER(st->s);
+ if (st->local_mask[ALL_OWN_MASK_FLAG] == 1) {
+ /* --BEGIN ERROR HANDLING-- */
+ int nfree = 0;
+ int ntotal = 0;
+ int minfree;
+ context_mask_stats(&nfree, &ntotal);
+ minfree = nfree;
+ MPIR_Allreduce_impl(MPI_IN_PLACE, &minfree, 1, MPI_INT,
+ MPI_MIN, st->comm_ptr, &errflag);
+ if (minfree > 0) {
+ MPIR_ERR_SETANDJUMP3(mpi_errno, MPI_ERR_OTHER,
+ "**toomanycommfrag", "**toomanycommfrag %d %d %d",
+ nfree, ntotal, minfree);
+ } else {
+ MPIR_ERR_SETANDJUMP3(mpi_errno, MPI_ERR_OTHER,
+ "**toomanycomm", "**toomanycomm %d %d %d",
+ nfree, ntotal, minfree);
+ }
+ /* --END ERROR HANDLING-- */
+ } else {
+ /* do not own mask, try again */
+ mpi_errno = MPID_Sched_cb(&sched_cb_gcn_copy_mask, st, st->s);
+ if (mpi_errno)
+ MPIR_ERR_POP(mpi_errno);
+ MPID_SCHED_BARRIER(st->s);
+ }
}
else {
/* Successfully allocated a context id */
@@ -738,10 +760,15 @@ static int sched_cb_gcn_allocate_cid(MPID_Comm * comm, int tag, void *state)
MPID_SCHED_BARRIER(st->s);
}
- /* --BEGIN ERROR HANDLING-- */
- /* --END ERROR HANDLING-- */
- fn_fail:
+ fn_exit:
return mpi_errno;
+ fn_fail:
+ /* In the case of failure, the new communicator was half created.
+ * So we need to clean the memory allocated for it. */
+ MPIR_Comm_map_free(st->new_comm);
+ MPIU_Handle_obj_free(&MPID_Comm_mem, st->new_comm);
+ MPIU_Free(st);
+ goto fn_exit;
}
#undef FUNCNAME
@@ -754,7 +781,7 @@ static int sched_cb_gcn_copy_mask(MPID_Comm * comm, int tag, void *state)
struct gcn_state *st = state;
if (st->first_iter) {
- memset(st->local_mask, 0, MPIR_MAX_CONTEXT_MASK * sizeof(int));
+ memset(st->local_mask, 0, (MPIR_MAX_CONTEXT_MASK+1) * sizeof(int));
st->own_eager_mask = 0;
/* Attempt to reserve the eager mask segment */
@@ -786,6 +813,7 @@ static int sched_cb_gcn_copy_mask(MPID_Comm * comm, int tag, void *state)
|| (st->comm_ptr->idup_count > 1 && st->seqnum != st->comm_ptr->idup_next_seqnum)) {
memset(st->local_mask, 0, MPIR_MAX_CONTEXT_MASK * sizeof(int));
st->own_mask = 0;
+ st->local_mask[ALL_OWN_MASK_FLAG] = 0;
}
else {
/* Copy safe mask segment to local_mask */
@@ -797,13 +825,13 @@ static int sched_cb_gcn_copy_mask(MPID_Comm * comm, int tag, void *state)
mask_in_use = 1;
st->own_mask = 1;
+ st->local_mask[ALL_OWN_MASK_FLAG] = 1;
}
-
}
mpi_errno =
st->comm_ptr->coll_fns->Iallreduce_sched(MPI_IN_PLACE, st->local_mask,
- MPIR_MAX_CONTEXT_MASK, MPI_UINT32_T, MPI_BAND,
+ MPIR_MAX_CONTEXT_MASK + 1, MPI_UINT32_T, MPI_BAND,
st->comm_ptr, st->s);
if (mpi_errno)
MPIR_ERR_POP(mpi_errno);
-----------------------------------------------------------------------
Summary of changes:
src/mpi/comm/contextid.c | 54 ++++++++++++++++++++++++++++++++++-----------
1 files changed, 41 insertions(+), 13 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b4-154-g8e449a0
by noreply@mpich.org 18 Aug '15
by noreply@mpich.org 18 Aug '15
18 Aug '15
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 8e449a06e6db8d277558296e6a15cfe86b59c61a (commit)
via 5df9e3fca627b3a8c2123ef0602483729243573b (commit)
via 5b88edfd7f998ba551215e16c0a957c5ddfdc5a5 (commit)
via 88da75d4b319bfa069090338a3963381e7b6a0af (commit)
via 18b85e565b6cd85fa075373f0abc1814aaa6d356 (commit)
via eba2205431896e565852430b67ed2dbd55ca6a6f (commit)
via 361e66e0918e667f188378d4387830b0ca99ffb5 (commit)
via c613340e4c8a9b221d772721560b84c728523696 (commit)
via 6cefbb509c0f37d7e7fee03a8e345076ac3d618c (commit)
via ada04ce8e8a64cb7ee3fe5649a30919af6adab64 (commit)
via bc56b6911c4d44b8d92a3498dc15802d01fc6df2 (commit)
via 3bb0d5061174dec31ecf471404b93bb4bb44dbf3 (commit)
via 14eb4f5808ba47d8d180390ad60b9fa7fbf6ec8c (commit)
via 51b0295efd74dc4316791b60700e9aed32fe914d (commit)
via 49bda7fc5c6ee51d90a077a461243b8efc639fe9 (commit)
from 7e35691bcbf560acb7cc3f1e466775d7751f260d (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/8e449a06e6db8d277558296e6a15cfe86…
commit 8e449a06e6db8d277558296e6a15cfe86b59c61a
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 01:56:25 2015 -0500
First round of cleanup for ROMIO threading.
ROMIO uses the same macro names as MPICH, but with different
semantics. This causes a lot of confusion as to what it really does.
This patch simply cleans up the usage and gives the macro a different
name. It also removes the unnecessary parameters since they are
simply ignored anyway. Having no parameters makes it clearer to
future developers that these macros do not require any arguments.
Signed-off-by: Rob Latham <robl(a)mcs.anl.gov>
diff --git a/src/glue/romio/glue_romio.c b/src/glue/romio/glue_romio.c
index 9d0971f..fa327ab 100644
--- a/src/glue/romio/glue_romio.c
+++ b/src/glue/romio/glue_romio.c
@@ -39,12 +39,12 @@ int MPIR_Ext_assert_fail(const char *cond, const char *file_name, int line_num)
* that ROMIO can use them. These routines only support the GLOBAL granularity
* of MPICH threading; other accommodations must be made for finer-grained
* threading strategies. */
-void MPIR_Ext_cs_enter_global(void)
+void MPIR_Ext_cs_enter(void)
{
MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
}
-void MPIR_Ext_cs_exit_global(void)
+void MPIR_Ext_cs_exit(void)
{
MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
}
@@ -52,7 +52,7 @@ void MPIR_Ext_cs_exit_global(void)
/* This routine is for a thread to yield control when the thread is waiting for
* the completion of communication inside a ROMIO routine but the progress
* engine is blocked by another thread. */
-void MPIR_Ext_cs_yield_global_if_progress_blocked(void)
+void MPIR_Ext_cs_yield(void)
{
/* TODO: check whether the progress engine is blocked */
MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
diff --git a/src/include/glue_romio.h.in b/src/include/glue_romio.h.in
index d4d859d..9623833 100644
--- a/src/include/glue_romio.h.in
+++ b/src/include/glue_romio.h.in
@@ -51,9 +51,9 @@ extern int MPIR_Ext_dbg_romio_verbose_enabled;
* glue code that cannot be initialized statically */
int MPIR_Ext_init(void);
-void MPIR_Ext_cs_enter_global(void);
-void MPIR_Ext_cs_exit_global(void);
-void MPIR_Ext_cs_yield_global_if_progress_blocked(void);
+void MPIR_Ext_cs_enter(void);
+void MPIR_Ext_cs_exit(void);
+void MPIR_Ext_cs_yield(void);
/* to facilitate error checking */
int MPIR_Ext_datatype_iscommitted(MPI_Datatype datatype);
diff --git a/src/mpi/romio/adio/common/ad_iread_coll.c b/src/mpi/romio/adio/common/ad_iread_coll.c
index 20c7308..b1c05d8 100644
--- a/src/mpi/romio/adio/common/ad_iread_coll.c
+++ b/src/mpi/romio/adio/common/ad_iread_coll.c
@@ -1336,7 +1336,7 @@ static int ADIOI_GEN_irc_wait_fn(int count, void **array_of_states,
/* If the progress engine is blocked, we have to yield for another
thread to be able to unblock the progress engine. */
- MPID_THREAD_CS_YIELD(GLOBAL,_if_progress_blocked);
+ ROMIO_THREAD_CS_YIELD();
}
}
diff --git a/src/mpi/romio/adio/common/ad_iwrite_coll.c b/src/mpi/romio/adio/common/ad_iwrite_coll.c
index b4e0fc4..47c73ba 100644
--- a/src/mpi/romio/adio/common/ad_iwrite_coll.c
+++ b/src/mpi/romio/adio/common/ad_iwrite_coll.c
@@ -1561,7 +1561,7 @@ static int ADIOI_GEN_iwc_wait_fn(int count, void **array_of_states,
/* If the progress engine is blocked, we have to yield for another
thread to be able to unblock the progress engine. */
- MPID_THREAD_CS_YIELD(GLOBAL,_if_progress_blocked);
+ ROMIO_THREAD_CS_YIELD();
}
}
diff --git a/src/mpi/romio/mpi-io/close.c b/src/mpi/romio/mpi-io/close.c
index 8bfa8fa..3f2b0b1 100644
--- a/src/mpi/romio/mpi-io/close.c
+++ b/src/mpi/romio/mpi-io/close.c
@@ -44,7 +44,7 @@ int MPI_File_close(MPI_File *fh)
HPMP_IO_WSTART(fl_xmpi, BLKMPIFILECLOSE, TRDTBLOCK, *adio_fh);
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(*fh);
@@ -90,7 +90,7 @@ int MPI_File_close(MPI_File *fh)
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/romio/mpi-io/delete.c b/src/mpi/romio/mpi-io/delete.c
index 598bfe8..47b52a0 100644
--- a/src/mpi/romio/mpi-io/delete.c
+++ b/src/mpi/romio/mpi-io/delete.c
@@ -48,7 +48,7 @@ int MPI_File_delete(ROMIO_CONST char *filename, MPI_Info info)
MPIU_UNREFERENCED_ARG(info);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
MPIR_MPIOInit(&error_code);
if (error_code != MPI_SUCCESS) goto fn_exit;
@@ -90,6 +90,6 @@ int MPI_File_delete(ROMIO_CONST char *filename, MPI_Info info)
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/fsync.c b/src/mpi/romio/mpi-io/fsync.c
index a9ba94d..7b2ef12 100644
--- a/src/mpi/romio/mpi-io/fsync.c
+++ b/src/mpi/romio/mpi-io/fsync.c
@@ -45,7 +45,7 @@ int MPI_File_sync(MPI_File fh)
HPMP_IO_START(fl_xmpi, BLKMPIFILESYNC, TRDTBLOCK, adio_fh,
MPI_DATATYPE_NULL, -1);
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -71,6 +71,6 @@ int MPI_File_sync(MPI_File fh)
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/get_errh.c b/src/mpi/romio/mpi-io/get_errh.c
index 4072949..985dcb5 100644
--- a/src/mpi/romio/mpi-io/get_errh.c
+++ b/src/mpi/romio/mpi-io/get_errh.c
@@ -44,7 +44,7 @@ int MPI_File_get_errhandler(MPI_File mpi_fh, MPI_Errhandler *errhandler)
static char myname[] = "MPI_FILE_GET_ERRHANDLER";
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
if (mpi_fh == MPI_FILE_NULL) {
*errhandler = ADIOI_DFLT_ERR_HANDLER;
@@ -66,6 +66,6 @@ int MPI_File_get_errhandler(MPI_File mpi_fh, MPI_Errhandler *errhandler)
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return MPI_SUCCESS;
}
diff --git a/src/mpi/romio/mpi-io/get_group.c b/src/mpi/romio/mpi-io/get_group.c
index 4139a4e..2b3077c 100644
--- a/src/mpi/romio/mpi-io/get_group.c
+++ b/src/mpi/romio/mpi-io/get_group.c
@@ -43,7 +43,7 @@ int MPI_File_get_group(MPI_File fh, MPI_Group *group)
ADIO_File adio_fh;
static char myname[] = "MPI_FILE_GET_GROUP";
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -59,6 +59,6 @@ int MPI_File_get_group(MPI_File fh, MPI_Group *group)
error_code = MPI_Comm_group(adio_fh->comm, group);
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/get_info.c b/src/mpi/romio/mpi-io/get_info.c
index c4a8508..e923e2b 100644
--- a/src/mpi/romio/mpi-io/get_info.c
+++ b/src/mpi/romio/mpi-io/get_info.c
@@ -42,7 +42,7 @@ int MPI_File_get_info(MPI_File fh, MPI_Info *info_used)
ADIO_File adio_fh;
static char myname[] = "MPI_FILE_GET_INFO";
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -57,6 +57,6 @@ int MPI_File_get_info(MPI_File fh, MPI_Info *info_used)
/* --END ERROR HANDLING-- */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/get_view.c b/src/mpi/romio/mpi-io/get_view.c
index 972b74a..46b0926 100644
--- a/src/mpi/romio/mpi-io/get_view.c
+++ b/src/mpi/romio/mpi-io/get_view.c
@@ -52,7 +52,7 @@ int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype,
int i, j, k, combiner;
MPI_Datatype copy_etype, copy_filetype;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -96,7 +96,7 @@ int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype,
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return MPI_SUCCESS;
}
diff --git a/src/mpi/romio/mpi-io/ioreq_c2f.c b/src/mpi/romio/mpi-io/ioreq_c2f.c
index 6e71c23..c21c967 100644
--- a/src/mpi/romio/mpi-io/ioreq_c2f.c
+++ b/src/mpi/romio/mpi-io/ioreq_c2f.c
@@ -56,7 +56,7 @@ MPI_Fint MPIO_Request_c2f(MPIO_Request request)
return (MPI_Fint) 0;
}
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
if (!ADIOI_Reqtable) {
ADIOI_Reqtable_max = 1024;
ADIOI_Reqtable = (MPIO_Request *)
@@ -75,7 +75,7 @@ MPI_Fint MPIO_Request_c2f(MPIO_Request request)
ADIOI_Reqtable_ptr++;
ADIOI_Reqtable[ADIOI_Reqtable_ptr] = request;
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return (MPI_Fint) ADIOI_Reqtable_ptr;
#endif
}
diff --git a/src/mpi/romio/mpi-io/ioreq_f2c.c b/src/mpi/romio/mpi-io/ioreq_f2c.c
index c9fa85a..4d3e509 100644
--- a/src/mpi/romio/mpi-io/ioreq_f2c.c
+++ b/src/mpi/romio/mpi-io/ioreq_f2c.c
@@ -49,7 +49,7 @@ MPIO_Request MPIO_Request_f2c(MPI_Fint request)
return (MPIO_Request) request;
#else
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
if (!request) {
return MPIO_REQUEST_NULL;
@@ -65,7 +65,7 @@ MPIO_Request MPIO_Request_f2c(MPI_Fint request)
/* --END ERROR HANDLING-- */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return ADIOI_Reqtable[request];
#endif
}
diff --git a/src/mpi/romio/mpi-io/iotest.c b/src/mpi/romio/mpi-io/iotest.c
index 1a2ba0c..f019626 100644
--- a/src/mpi/romio/mpi-io/iotest.c
+++ b/src/mpi/romio/mpi-io/iotest.c
@@ -56,7 +56,7 @@ int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status)
}
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
if (*request == MPIO_REQUEST_NULL) {
error_code = MPI_SUCCESS;
@@ -89,7 +89,7 @@ int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status)
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iotestall.c b/src/mpi/romio/mpi-io/iotestall.c
index 22016a8..21ff93d 100644
--- a/src/mpi/romio/mpi-io/iotestall.c
+++ b/src/mpi/romio/mpi-io/iotestall.c
@@ -34,7 +34,7 @@ int MPIO_Testall(int count, MPIO_Request requests[], int *flag,
int done, i, err;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
if (count == 1) {
err = MPIO_Test( requests, flag, statuses );
goto fn_exit;
@@ -71,7 +71,7 @@ int MPIO_Testall(int count, MPIO_Request requests[], int *flag,
err = MPI_SUCCESS;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return err;
}
diff --git a/src/mpi/romio/mpi-io/iotestany.c b/src/mpi/romio/mpi-io/iotestany.c
index b8a49da..3f9d7af 100644
--- a/src/mpi/romio/mpi-io/iotestany.c
+++ b/src/mpi/romio/mpi-io/iotestany.c
@@ -34,7 +34,7 @@ int MPIO_Testany(int count, MPIO_Request requests[], int *index,
int i, err;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
if (count == 1) {
err = MPIO_Test( requests, flag, status );
@@ -76,6 +76,6 @@ int MPIO_Testany(int count, MPIO_Request requests[], int *index,
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return err;
}
diff --git a/src/mpi/romio/mpi-io/iotestsome.c b/src/mpi/romio/mpi-io/iotestsome.c
index 08f4afb..4cc603c 100644
--- a/src/mpi/romio/mpi-io/iotestsome.c
+++ b/src/mpi/romio/mpi-io/iotestsome.c
@@ -35,7 +35,7 @@ int MPIO_Testsome(int count, MPIO_Request requests[], int *outcount,
int flag;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
if (count == 1) {
err = MPIO_Test( requests, &flag, statuses );
@@ -81,6 +81,6 @@ int MPIO_Testsome(int count, MPIO_Request requests[], int *outcount,
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return err;
}
diff --git a/src/mpi/romio/mpi-io/iowait.c b/src/mpi/romio/mpi-io/iowait.c
index 0166992..40801c5 100644
--- a/src/mpi/romio/mpi-io/iowait.c
+++ b/src/mpi/romio/mpi-io/iowait.c
@@ -56,7 +56,7 @@ int MPIO_Wait(MPIO_Request *request, MPI_Status *status)
}
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
if (*request == MPIO_REQUEST_NULL) {
error_code = MPI_SUCCESS;
@@ -90,7 +90,7 @@ int MPIO_Wait(MPIO_Request *request, MPI_Status *status)
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iowaitall.c b/src/mpi/romio/mpi-io/iowaitall.c
index b2a1643..e51768c 100644
--- a/src/mpi/romio/mpi-io/iowaitall.c
+++ b/src/mpi/romio/mpi-io/iowaitall.c
@@ -33,7 +33,7 @@ int MPIO_Waitall( int count, MPIO_Request requests[], MPI_Status statuses[] )
int notdone, i, flag, err;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
if (count == 1) {
err = MPIO_Wait(requests, statuses);
@@ -68,7 +68,7 @@ int MPIO_Waitall( int count, MPIO_Request requests[], MPI_Status statuses[] )
err = MPI_SUCCESS;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return err;
}
diff --git a/src/mpi/romio/mpi-io/iowaitany.c b/src/mpi/romio/mpi-io/iowaitany.c
index 4928617..fa80f96 100644
--- a/src/mpi/romio/mpi-io/iowaitany.c
+++ b/src/mpi/romio/mpi-io/iowaitany.c
@@ -34,7 +34,7 @@ int MPIO_Waitany(int count, MPIO_Request requests[], int *index,
int i, flag, err;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
if (count == 1) {
err = MPIO_Wait( requests, status );
@@ -78,7 +78,7 @@ int MPIO_Waitany(int count, MPIO_Request requests[], int *index,
} while (flag == 0);
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return err;
}
diff --git a/src/mpi/romio/mpi-io/iowaitsome.c b/src/mpi/romio/mpi-io/iowaitsome.c
index 53a410b..bfa3976 100644
--- a/src/mpi/romio/mpi-io/iowaitsome.c
+++ b/src/mpi/romio/mpi-io/iowaitsome.c
@@ -34,7 +34,7 @@ int MPIO_Waitsome(int count, MPIO_Request requests[], int *outcount,
int i, flag, err;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
if (count == 1) {
err = MPIO_Wait( requests, statuses );
@@ -76,6 +76,6 @@ int MPIO_Waitsome(int count, MPIO_Request requests[], int *outcount,
} while (*outcount == 0);
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return err;
}
diff --git a/src/mpi/romio/mpi-io/iread.c b/src/mpi/romio/mpi-io/iread.c
index 7fabb90..4b23a11 100644
--- a/src/mpi/romio/mpi-io/iread.c
+++ b/src/mpi/romio/mpi-io/iread.c
@@ -83,7 +83,7 @@ int MPIOI_File_iread(MPI_File fh, MPI_Offset offset, int file_ptr_type, void *bu
ADIO_Offset off, bufsize;
MPI_Offset nbytes=0;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -154,7 +154,7 @@ int MPIOI_File_iread(MPI_File fh, MPI_Offset offset, int file_ptr_type, void *bu
offset, request, &error_code);
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/iread_all.c b/src/mpi/romio/mpi-io/iread_all.c
index d0dec08..afe44f6 100644
--- a/src/mpi/romio/mpi-io/iread_all.c
+++ b/src/mpi/romio/mpi-io/iread_all.c
@@ -89,7 +89,7 @@ int MPIOI_File_iread_all(MPI_File fh,
ADIO_File adio_fh;
void *xbuf=NULL, *e32_buf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -142,7 +142,7 @@ int MPIOI_File_iread_all(MPI_File fh,
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/iread_sh.c b/src/mpi/romio/mpi-io/iread_sh.c
index f325aa9..bd64313 100644
--- a/src/mpi/romio/mpi-io/iread_sh.c
+++ b/src/mpi/romio/mpi-io/iread_sh.c
@@ -55,7 +55,7 @@ int MPI_File_iread_shared(MPI_File fh, void *buf, int count,
ADIO_Offset off, shared_fp;
MPI_Offset nbytes=0;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -134,7 +134,7 @@ int MPI_File_iread_shared(MPI_File fh, void *buf, int count,
/* --END ERROR HANDLING-- */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iwrite.c b/src/mpi/romio/mpi-io/iwrite.c
index 7f0e4ba..ae6c6ae 100644
--- a/src/mpi/romio/mpi-io/iwrite.c
+++ b/src/mpi/romio/mpi-io/iwrite.c
@@ -90,7 +90,7 @@ int MPIOI_File_iwrite(MPI_File fh,
ADIO_File adio_fh;
MPI_Offset nbytes=0;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -162,7 +162,7 @@ int MPIOI_File_iwrite(MPI_File fh,
offset, request, &error_code);
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iwrite_all.c b/src/mpi/romio/mpi-io/iwrite_all.c
index 32b32d0..9f486e7 100644
--- a/src/mpi/romio/mpi-io/iwrite_all.c
+++ b/src/mpi/romio/mpi-io/iwrite_all.c
@@ -84,7 +84,7 @@ int MPIOI_File_iwrite_all(MPI_File fh,
void *e32buf=NULL;
const void *xbuf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -131,7 +131,7 @@ int MPIOI_File_iwrite_all(MPI_File fh,
fn_exit:
if (e32buf != NULL) ADIOI_Free(e32buf);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/iwrite_sh.c b/src/mpi/romio/mpi-io/iwrite_sh.c
index 3774911..3f9612a 100644
--- a/src/mpi/romio/mpi-io/iwrite_sh.c
+++ b/src/mpi/romio/mpi-io/iwrite_sh.c
@@ -55,7 +55,7 @@ int MPI_File_iwrite_shared(MPI_File fh, ROMIO_CONST void *buf, int count,
ADIO_Offset off, shared_fp;
static char myname[] = "MPI_FILE_IWRITE_SHARED";
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -114,7 +114,7 @@ int MPI_File_iwrite_shared(MPI_File fh, ROMIO_CONST void *buf, int count,
shared_fp, request, &error_code);
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/mpioimpl.h b/src/mpi/romio/mpi-io/mpioimpl.h
index ee186ac..074ad42 100644
--- a/src/mpi/romio/mpi-io/mpioimpl.h
+++ b/src/mpi/romio/mpi-io/mpioimpl.h
@@ -18,12 +18,9 @@
#ifdef ROMIO_INSIDE_MPICH
#include "glue_romio.h"
-#define MPID_THREAD_CS_ENTER(name_,ctx_) MPID_THREAD_CS_ENTER_##name_(ctx_)
-#define MPID_THREAD_CS_EXIT(name_,ctx_) MPID_THREAD_CS_EXIT_##name_(ctx_)
-#define MPID_THREAD_CS_YIELD(name_,ctx_) MPID_THREAD_CS_YIELD_##name_(ctx_)
-#define MPID_THREAD_CS_ENTER_GLOBAL(ctx_) MPIR_Ext_cs_enter_global()
-#define MPID_THREAD_CS_EXIT_GLOBAL(ctx_) MPIR_Ext_cs_exit_global()
-#define MPID_THREAD_CS_YIELD_GLOBAL(ctx_) MPIR_Ext_cs_yield_global##ctx_()
+#define ROMIO_THREAD_CS_ENTER() MPIR_Ext_cs_enter()
+#define ROMIO_THREAD_CS_EXIT() MPIR_Ext_cs_exit()
+#define ROMIO_THREAD_CS_YIELD() MPIR_Ext_cs_yield()
/* committed datatype checking support in ROMIO */
#define MPIO_DATATYPE_ISCOMMITTED(dtype_, err_) \
@@ -36,9 +33,9 @@
error reporting features provided by MPICH must implement these
four functions. Defining these as empty should not change the behavior
of correct programs */
-#define MPID_THREAD_CS_ENTER(x,y)
-#define MPID_THREAD_CS_EXIT(x,y)
-#define MPID_THREAD_CS_YIELD(x,y)
+#define ROMIO_THREAD_CS_ENTER()
+#define ROMIO_THREAD_CS_EXIT()
+#define ROMIO_THREAD_CS_YIELD()
#define MPIO_DATATYPE_ISCOMMITTED(dtype_, err_) do {} while (0)
#ifdef HAVE_WINDOWS_H
#define MPIU_UNREFERENCED_ARG(a) a
diff --git a/src/mpi/romio/mpi-io/open.c b/src/mpi/romio/mpi-io/open.c
index 5fe9f82..7cebb5a 100644
--- a/src/mpi/romio/mpi-io/open.c
+++ b/src/mpi/romio/mpi-io/open.c
@@ -59,7 +59,7 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode,
HPMP_IO_OPEN_START(fl_xmpi, comm);
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
/* --BEGIN ERROR HANDLING-- */
MPIO_CHECK_COMM(comm, myname, error_code);
@@ -198,7 +198,7 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode,
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/romio/mpi-io/prealloc.c b/src/mpi/romio/mpi-io/prealloc.c
index b29c1fd..1542e47 100644
--- a/src/mpi/romio/mpi-io/prealloc.c
+++ b/src/mpi/romio/mpi-io/prealloc.c
@@ -48,7 +48,7 @@ int MPI_File_preallocate(MPI_File fh, MPI_Offset size)
adio_fh, MPI_DATATYPE_NULL, -1);
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -99,7 +99,7 @@ int MPI_File_preallocate(MPI_File fh, MPI_Offset size)
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
/* TODO: bcast result? */
if (!mynod) return error_code;
diff --git a/src/mpi/romio/mpi-io/read.c b/src/mpi/romio/mpi-io/read.c
index c737ea7..6f12914 100644
--- a/src/mpi/romio/mpi-io/read.c
+++ b/src/mpi/romio/mpi-io/read.c
@@ -79,7 +79,7 @@ int MPIOI_File_read(MPI_File fh,
ADIO_Offset off, bufsize;
void *xbuf=NULL, *e32_buf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -180,7 +180,7 @@ int MPIOI_File_read(MPI_File fh,
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_all.c b/src/mpi/romio/mpi-io/read_all.c
index 1e0e242..e0b605d 100644
--- a/src/mpi/romio/mpi-io/read_all.c
+++ b/src/mpi/romio/mpi-io/read_all.c
@@ -80,7 +80,7 @@ int MPIOI_File_read_all(MPI_File fh,
ADIO_File adio_fh;
void *xbuf=NULL, *e32_buf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -135,7 +135,7 @@ int MPIOI_File_read_all(MPI_File fh,
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_allb.c b/src/mpi/romio/mpi-io/read_allb.c
index 4155091..2110f71 100644
--- a/src/mpi/romio/mpi-io/read_allb.c
+++ b/src/mpi/romio/mpi-io/read_allb.c
@@ -67,7 +67,7 @@ int MPIOI_File_read_all_begin(MPI_File fh,
ADIO_File adio_fh;
void *xbuf=NULL, *e32_buf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -132,7 +132,7 @@ int MPIOI_File_read_all_begin(MPI_File fh,
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_alle.c b/src/mpi/romio/mpi-io/read_alle.c
index 9ff85f6..e2853c1 100644
--- a/src/mpi/romio/mpi-io/read_alle.c
+++ b/src/mpi/romio/mpi-io/read_alle.c
@@ -60,7 +60,7 @@ int MPIOI_File_read_all_end(MPI_File fh,
MPIU_UNREFERENCED_ARG(buf);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -83,7 +83,7 @@ int MPIOI_File_read_all_end(MPI_File fh,
adio_fh->split_coll_count = 0;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_ord.c b/src/mpi/romio/mpi-io/read_ord.c
index 6494c49..be87763 100644
--- a/src/mpi/romio/mpi-io/read_ord.c
+++ b/src/mpi/romio/mpi-io/read_ord.c
@@ -53,7 +53,7 @@ int MPI_File_read_ordered(MPI_File fh, void *buf, int count,
ADIO_Offset shared_fp=0;
ADIO_File adio_fh;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -104,7 +104,7 @@ int MPI_File_read_ordered(MPI_File fh, void *buf, int count,
/* --END ERROR HANDLING-- */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
/* FIXME: Check for error code from ReadStridedColl? */
return error_code;
diff --git a/src/mpi/romio/mpi-io/read_ordb.c b/src/mpi/romio/mpi-io/read_ordb.c
index 13b96bf..5548bde 100644
--- a/src/mpi/romio/mpi-io/read_ordb.c
+++ b/src/mpi/romio/mpi-io/read_ordb.c
@@ -50,7 +50,7 @@ int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count,
static char myname[] = "MPI_FILE_READ_ORDERED_BEGIN";
void *xbuf=NULL, *e32_buf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -131,7 +131,7 @@ int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count,
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_orde.c b/src/mpi/romio/mpi-io/read_orde.c
index d07e80a..542f687 100644
--- a/src/mpi/romio/mpi-io/read_orde.c
+++ b/src/mpi/romio/mpi-io/read_orde.c
@@ -45,7 +45,7 @@ int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status)
MPIU_UNREFERENCED_ARG(buf);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -69,7 +69,7 @@ int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status)
adio_fh->split_coll_count = 0;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_sh.c b/src/mpi/romio/mpi-io/read_sh.c
index 56f39d2..8ebbf87 100644
--- a/src/mpi/romio/mpi-io/read_sh.c
+++ b/src/mpi/romio/mpi-io/read_sh.c
@@ -52,7 +52,7 @@ int MPI_File_read_shared(MPI_File fh, void *buf, int count,
ADIO_File adio_fh;
void *xbuf=NULL, *e32_buf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -149,7 +149,7 @@ int MPI_File_read_shared(MPI_File fh, void *buf, int count,
ADIOI_Free(e32_buf);
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/register_datarep.c b/src/mpi/romio/mpi-io/register_datarep.c
index 6186e74..3895872 100644
--- a/src/mpi/romio/mpi-io/register_datarep.c
+++ b/src/mpi/romio/mpi-io/register_datarep.c
@@ -62,7 +62,7 @@ int MPI_Register_datarep(ROMIO_CONST char *datarep,
ADIOI_Datarep *adio_datarep;
static char myname[] = "MPI_REGISTER_DATAREP";
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
/* --BEGIN ERROR HANDLING-- */
/* check datarep name (use strlen instead of strnlen because
@@ -139,7 +139,7 @@ int MPI_Register_datarep(ROMIO_CONST char *datarep,
error_code = MPI_SUCCESS;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/seek.c b/src/mpi/romio/mpi-io/seek.c
index ad5b4f2..c68394a 100644
--- a/src/mpi/romio/mpi-io/seek.c
+++ b/src/mpi/romio/mpi-io/seek.c
@@ -49,7 +49,7 @@ int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence)
HPMP_IO_START(fl_xmpi, BLKMPIFILESEEK, TRDTBLOCK, adio_fh, MPI_DATATYPE_NULL, -1);
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -134,6 +134,6 @@ int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence)
error_code = MPI_SUCCESS;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/seek_sh.c b/src/mpi/romio/mpi-io/seek_sh.c
index 1c84f15..d3ce1ab 100644
--- a/src/mpi/romio/mpi-io/seek_sh.c
+++ b/src/mpi/romio/mpi-io/seek_sh.c
@@ -41,7 +41,7 @@ int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence)
MPI_Offset curr_offset, eof_offset, tmp_offset;
ADIO_File adio_fh;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -178,7 +178,7 @@ int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence)
error_code = MPI_SUCCESS;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/set_atom.c b/src/mpi/romio/mpi-io/set_atom.c
index eaeb575..00be9fc 100644
--- a/src/mpi/romio/mpi-io/set_atom.c
+++ b/src/mpi/romio/mpi-io/set_atom.c
@@ -41,7 +41,7 @@ int MPI_File_set_atomicity(MPI_File fh, int flag)
ADIO_Fcntl_t *fcntl_struct;
ADIO_File adio_fh;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -86,6 +86,6 @@ int MPI_File_set_atomicity(MPI_File fh, int flag)
ADIOI_Free(fcntl_struct);
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/set_errh.c b/src/mpi/romio/mpi-io/set_errh.c
index 5ac6653..5a299f9 100644
--- a/src/mpi/romio/mpi-io/set_errh.c
+++ b/src/mpi/romio/mpi-io/set_errh.c
@@ -42,7 +42,7 @@ int MPI_File_set_errhandler(MPI_File mpi_fh, MPI_Errhandler errhandler)
ADIO_File fh;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
if (mpi_fh == MPI_FILE_NULL) {
ADIOI_DFLT_ERR_HANDLER = errhandler;
@@ -71,6 +71,6 @@ int MPI_File_set_errhandler(MPI_File mpi_fh, MPI_Errhandler errhandler)
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/set_info.c b/src/mpi/romio/mpi-io/set_info.c
index 67726f6..2c898fe 100644
--- a/src/mpi/romio/mpi-io/set_info.c
+++ b/src/mpi/romio/mpi-io/set_info.c
@@ -40,7 +40,7 @@ int MPI_File_set_info(MPI_File fh, MPI_Info info)
static char myname[] = "MPI_FILE_SET_INFO";
ADIO_File adio_fh;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -58,7 +58,7 @@ fn_exit:
error_code = MPIO_Err_return_file(adio_fh, error_code);
/* --END ERROR HANDLING-- */
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
fn_fail:
diff --git a/src/mpi/romio/mpi-io/set_size.c b/src/mpi/romio/mpi-io/set_size.c
index 18d061f..b658929 100644
--- a/src/mpi/romio/mpi-io/set_size.c
+++ b/src/mpi/romio/mpi-io/set_size.c
@@ -48,7 +48,7 @@ int MPI_File_set_size(MPI_File fh, MPI_Offset size)
MPI_DATATYPE_NULL, -1);
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -99,7 +99,7 @@ int MPI_File_set_size(MPI_File fh, MPI_Offset size)
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/set_view.c b/src/mpi/romio/mpi-io/set_view.c
index 522caff..4d98fdd 100644
--- a/src/mpi/romio/mpi-io/set_view.c
+++ b/src/mpi/romio/mpi-io/set_view.c
@@ -48,7 +48,7 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype,
ADIO_Offset shared_fp, byte_off;
ADIO_File adio_fh;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -193,7 +193,7 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype,
adio_fh->is_external32 = 1;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
fn_fail:
diff --git a/src/mpi/romio/mpi-io/write.c b/src/mpi/romio/mpi-io/write.c
index 43401ae..eb9a77f 100644
--- a/src/mpi/romio/mpi-io/write.c
+++ b/src/mpi/romio/mpi-io/write.c
@@ -80,7 +80,7 @@ int MPIOI_File_write(MPI_File fh,
void *e32buf=NULL;
const void *xbuf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -179,7 +179,7 @@ int MPIOI_File_write(MPI_File fh,
fn_exit:
if (e32buf!= NULL) ADIOI_Free(e32buf);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/write_all.c b/src/mpi/romio/mpi-io/write_all.c
index 27b6ede..6f17cc3 100644
--- a/src/mpi/romio/mpi-io/write_all.c
+++ b/src/mpi/romio/mpi-io/write_all.c
@@ -81,7 +81,7 @@ int MPIOI_File_write_all(MPI_File fh,
void *e32buf=NULL;
const void *xbuf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -127,7 +127,7 @@ int MPIOI_File_write_all(MPI_File fh,
fn_exit:
if (e32buf != NULL) ADIOI_Free(e32buf);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/write_allb.c b/src/mpi/romio/mpi-io/write_allb.c
index bb1cd13..e184723 100644
--- a/src/mpi/romio/mpi-io/write_allb.c
+++ b/src/mpi/romio/mpi-io/write_allb.c
@@ -67,7 +67,7 @@ int MPIOI_File_write_all_begin(MPI_File fh,
void *e32buf=NULL;
const void *xbuf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -125,7 +125,7 @@ int MPIOI_File_write_all_begin(MPI_File fh,
fn_exit:
if ( e32buf != NULL) ADIOI_Free(e32buf);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/write_alle.c b/src/mpi/romio/mpi-io/write_alle.c
index 112afd6..6dc7f6d 100644
--- a/src/mpi/romio/mpi-io/write_alle.c
+++ b/src/mpi/romio/mpi-io/write_alle.c
@@ -59,7 +59,7 @@ int MPIOI_File_write_all_end(MPI_File fh,
MPIU_UNREFERENCED_ARG(buf);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -88,7 +88,7 @@ int MPIOI_File_write_all_end(MPI_File fh,
error_code = MPI_SUCCESS;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/write_ord.c b/src/mpi/romio/mpi-io/write_ord.c
index 2f407f1..eb72734 100644
--- a/src/mpi/romio/mpi-io/write_ord.c
+++ b/src/mpi/romio/mpi-io/write_ord.c
@@ -56,7 +56,7 @@ int MPI_File_write_ordered(MPI_File fh, ROMIO_CONST void *buf, int count,
void *e32buf=NULL;
const void *xbuf;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -120,7 +120,7 @@ int MPI_File_write_ordered(MPI_File fh, ROMIO_CONST void *buf, int count,
fn_exit:
if (e32buf != NULL) ADIOI_Free(e32buf);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
/* FIXME: Check for error code from WriteStridedColl? */
return error_code;
diff --git a/src/mpi/romio/mpi-io/write_ordb.c b/src/mpi/romio/mpi-io/write_ordb.c
index 349448c..8b5a302 100644
--- a/src/mpi/romio/mpi-io/write_ordb.c
+++ b/src/mpi/romio/mpi-io/write_ordb.c
@@ -52,7 +52,7 @@ int MPI_File_write_ordered_begin(MPI_File fh, ROMIO_CONST void *buf, int count,
void *e32buf = NULL;
const void *xbuf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -125,7 +125,7 @@ int MPI_File_write_ordered_begin(MPI_File fh, ROMIO_CONST void *buf, int count,
/* --END ERROR HANDLING-- */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
/* FIXME: Check for error code from WriteStridedColl? */
return error_code;
diff --git a/src/mpi/romio/mpi-io/write_orde.c b/src/mpi/romio/mpi-io/write_orde.c
index 67590d0..8cfdba2 100644
--- a/src/mpi/romio/mpi-io/write_orde.c
+++ b/src/mpi/romio/mpi-io/write_orde.c
@@ -45,7 +45,7 @@ int MPI_File_write_ordered_end(MPI_File fh, ROMIO_CONST void *buf, MPI_Status *s
MPIU_UNREFERENCED_ARG(buf);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -70,6 +70,6 @@ int MPI_File_write_ordered_end(MPI_File fh, ROMIO_CONST void *buf, MPI_Status *s
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return MPI_SUCCESS;
}
diff --git a/src/mpi/romio/mpi-io/write_sh.c b/src/mpi/romio/mpi-io/write_sh.c
index 3a8b127..ed8e1c1 100644
--- a/src/mpi/romio/mpi-io/write_sh.c
+++ b/src/mpi/romio/mpi-io/write_sh.c
@@ -54,7 +54,7 @@ int MPI_File_write_shared(MPI_File fh, ROMIO_CONST void *buf, int count,
void *e32buf = NULL;
const void *xbuf = NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_ENTER();
adio_fh = MPIO_File_resolve(fh);
@@ -144,6 +144,6 @@ int MPI_File_write_shared(MPI_File fh, ROMIO_CONST void *buf, int count,
fn_exit:
if (e32buf != NULL) ADIOI_Free(e32buf);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ ROMIO_THREAD_CS_EXIT();
return error_code;
}
http://git.mpich.org/mpich.git/commitdiff/5df9e3fca627b3a8c2123ef0602483729…
commit 5df9e3fca627b3a8c2123ef0602483729243573b
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 01:39:58 2015 -0500
Minor comment fix.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index 9b07558..8100581 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -17,7 +17,7 @@
int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
#endif /* NEEDS_PTHREAD_MUTEXATTR_SETTYPE_DECL */
-/* MPIU_Thread_create() defined in mpiu_thread.c */
+/* MPIU_Thread_create() defined in mpiu_thread_posix.c */
#define MPIU_Thread_exit() \
do { \
http://git.mpich.org/mpich.git/commitdiff/5b88edfd7f998ba551215e16c0a957c5d…
commit 5b88edfd7f998ba551215e16c0a957c5ddfdc5a5
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 01:26:27 2015 -0500
Get rid of unused trylock functionality.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/include/mpid_thread.h b/src/mpid/ch3/include/mpid_thread.h
index cefecba..83d1af6 100644
--- a/src/mpid/ch3/include/mpid_thread.h
+++ b/src/mpid/ch3/include/mpid_thread.h
@@ -36,7 +36,6 @@ typedef MPIDU_Thread_func_t MPID_Thread_func_t;
#define MPID_Thread_mutex_destroy MPIDU_Thread_mutex_destroy
#define MPID_Thread_mutex_lock MPIDU_Thread_mutex_lock
#define MPID_Thread_mutex_unlock MPIDU_Thread_mutex_unlock
-#define MPID_Thread_mutex_trylock MPIDU_Thread_mutex_trylock
#define MPID_Thread_cond_create MPIDU_Thread_cond_create
#define MPID_Thread_cond_destroy MPIDU_Thread_cond_destroy
diff --git a/src/mpid/common/thread/mpidu_thread_fallback.h b/src/mpid/common/thread/mpidu_thread_fallback.h
index a4ece3e..ac9b137 100644
--- a/src/mpid/common/thread/mpidu_thread_fallback.h
+++ b/src/mpid/common/thread/mpidu_thread_fallback.h
@@ -182,17 +182,6 @@ M*/
@*/
#define MPIDU_Thread_mutex_unlock MPIU_Thread_mutex_unlock
-/*@
- MPIDU_Thread_mutex_trylock - try to acquire a mutex, but return even if unsuccessful
-
- Input Parameter:
-. mutex - mutex
-
- Output Parameter:
-. flag - flag
-@*/
-#define MPIDU_Thread_mutex_trylock MPIU_Thread_mutex_trylock
-
/*
* Condition Variables
*/
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index ed6bef6..fc07114 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -65,7 +65,6 @@ 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_mutex_trylock(MPIU_Thread_mutex_t * mutex, int *flag, 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);
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index 95ddb29..9b07558 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -138,24 +138,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
} while (0)
-#define MPIU_Thread_mutex_trylock(mutex_ptr_, flag_ptr_, err_ptr_) \
- do { \
- int err__; \
- \
- err__ = pthread_mutex_trylock(&(mutex_ptr_)->mutex); \
- if (err__ && err__ != EBUSY) \
- { \
- MPIU_DBG_MSG_S(THREAD,TERSE," mutex trylock error: %s", MPIU_Strerror(err__)); \
- MPL_internal_sys_error_printf("pthread_mutex_trylock", err__, \
- " %s:%d\n", __FILE__, __LINE__); \
- } \
- *(flag_ptr_) = (err__ == 0) ? TRUE : FALSE; \
- MPIU_DBG_MSG_FMT(THREAD,VERBOSE,(MPIU_DBG_FDEST, "MPIU_Thread_mutex_trylock mutex=%p result=%s", (mutex_ptr_), (*(flag_ptr_) ? "success" : "failure"))); \
- *(int *)(err_ptr_) = (err__ == EBUSY) ? MPIU_THREAD_SUCCESS : err__; \
- } while (0)
-
-
-
/*
* Condition Variables
*/
diff --git a/src/util/thread/mpiu_thread_solaris_funcs.h b/src/util/thread/mpiu_thread_solaris_funcs.h
index 34c0735..3556ecc 100644
--- a/src/util/thread/mpiu_thread_solaris_funcs.h
+++ b/src/util/thread/mpiu_thread_solaris_funcs.h
@@ -82,18 +82,6 @@
} \
} while (0)
-#define MPIU_Thread_mutex_trylock(mutex_ptr_, flag_ptr_, err_ptr_) \
- do { \
- int err__; \
- \
- err__ = mutex_trylock(mutex_ptr_); \
- *(flag_ptr_) = (err__ == 0) ? TRUE : FALSE; \
- if ((err_ptr_) != NULL) { \
- *(err_ptr_) = (err__ == EBUSY) : MPIU_THREAD_SUCCESS ? err__; \
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
- } \
- } while (0)
-
/*
* Condition Variables
diff --git a/src/util/thread/mpiu_thread_win.c b/src/util/thread/mpiu_thread_win.c
index 161b102..1afff43 100644
--- a/src/util/thread/mpiu_thread_win.c
+++ b/src/util/thread/mpiu_thread_win.c
@@ -178,34 +178,6 @@ void MPIU_Thread_mutex_unlock(MPIU_Thread_mutex_t * mutex, int *err)
}
}
-void MPIU_Thread_mutex_trylock(MPIU_Thread_mutex_t * mutex, int *flag, int *err)
-{
- DWORD result;
-
- result = WaitForSingleObject(*mutex, 0);
- if (result == WAIT_OBJECT_0) {
- *flag = TRUE;
- if (err != NULL) {
- *err = MPIU_THREAD_SUCCESS;
- }
- }
- else {
- *flag = FALSE;
- if (err != NULL) {
- if (result == WAIT_TIMEOUT) {
- *err = MPIU_THREAD_SUCCESS;
- }
- else {
- if (result == WAIT_FAILED) {
- *err = GetLastError();
- }
- else {
- *err = result;
- }
- }
- }
- }
-}
/*
* Condition Variables
http://git.mpich.org/mpich.git/commitdiff/88da75d4b319bfa069090338a3963381e…
commit 88da75d4b319bfa069090338a3963381e7b6a0af
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 01:18:04 2015 -0500
White space cleanup.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index 056fd70..95ddb29 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -67,7 +67,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
do { \
int err__; \
\
- OPA_store_int(&(mutex_ptr_)->num_queued_threads,0); \
+ OPA_store_int(&(mutex_ptr_)->num_queued_threads, 0); \
err__ = pthread_mutex_init(&(mutex_ptr_)->mutex, NULL); \
if (err__) \
MPL_internal_sys_error_printf("pthread_mutex_init", err__, \
@@ -83,7 +83,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
int err__; \
pthread_mutexattr_t attr__; \
\
- OPA_store_int(&(mutex_ptr_)->num_queued_threads,0); \
+ OPA_store_int(&(mutex_ptr_)->num_queued_threads, 0); \
pthread_mutexattr_init(&attr__); \
pthread_mutexattr_settype(&attr__, MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE); \
err__ = pthread_mutex_init(&(mutex_ptr_)->mutex, &attr__); \
@@ -190,8 +190,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
OPA_incr_int(&(mutex_ptr_)->num_queued_threads); \
err__ = pthread_cond_wait((cond_ptr_), &(mutex_ptr_)->mutex); \
OPA_decr_int(&(mutex_ptr_)->num_queued_threads); \
- } \
- while (err__ == EINTR); \
+ } while (err__ == EINTR); \
\
*(int *)(err_ptr_) = err__; \
MPIU_Assert_fmt_msg(err__ == 0, \
@@ -237,13 +236,13 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
*(int *)(err_ptr_) = err__; \
} while (0)
-#define MPIU_Thread_tls_destroy(tls_ptr_, err_ptr_) \
- do { \
- int err__; \
- \
- err__ = pthread_key_delete(*(tls_ptr_)); \
- \
- *(int *)(err_ptr_) = err__; \
+#define MPIU_Thread_tls_destroy(tls_ptr_, err_ptr_) \
+ do { \
+ int err__; \
+ \
+ err__ = pthread_key_delete(*(tls_ptr_)); \
+ \
+ *(int *)(err_ptr_) = err__; \
} while (0)
#define MPIU_Thread_tls_set(tls_ptr_, value_, err_ptr_) \
http://git.mpich.org/mpich.git/commitdiff/18b85e565b6cd85fa075373f0abc1814a…
commit 18b85e565b6cd85fa075373f0abc1814aaa6d356
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 01:13:12 2015 -0500
List FIXME in one place instead of repeating it everywhere.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index 3e7951f..056fd70 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -58,6 +58,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
*/
/* FIXME: using constant initializer if available */
+
+/* FIXME: convert errors to an MPIU_THREAD_ERR value */
+
#if !defined(MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE)
#define MPIU_Thread_mutex_create(mutex_ptr_, err_ptr_) \
@@ -69,7 +72,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
if (err__) \
MPL_internal_sys_error_printf("pthread_mutex_init", err__, \
" %s:%d\n", __FILE__, __LINE__); \
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
MPIU_DBG_MSG_P(THREAD,TYPICAL,"Created MPIU_Thread_mutex %p", (mutex_ptr_)); \
} while (0)
@@ -88,7 +90,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
if (err__) \
MPL_internal_sys_error_printf("pthread_mutex_init", err__, \
" %s:%d\n", __FILE__, __LINE__); \
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
MPIU_DBG_MSG_P(THREAD,TYPICAL,"Created MPIU_Thread_mutex %p", (mutex_ptr_)); \
} while (0)
@@ -101,7 +102,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
\
MPIU_DBG_MSG_P(THREAD,TYPICAL,"About to destroy MPIU_Thread_mutex %p", (mutex_ptr_)); \
err__ = pthread_mutex_destroy(&(mutex_ptr_)->mutex); \
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
} while (0)
@@ -118,7 +118,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
MPL_internal_sys_error_printf("pthread_mutex_lock", err__, \
" %s:%d\n", __FILE__, __LINE__); \
} \
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
MPIU_DBG_MSG_P(THREAD,VERBOSE,"exit MPIU_Thread_mutex_lock %p", (mutex_ptr_)); \
} while (0)
@@ -135,7 +134,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
MPL_internal_sys_error_printf("pthread_mutex_unlock", err__, \
" %s:%d\n", __FILE__, __LINE__); \
} \
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
} while (0)
@@ -154,7 +152,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
*(flag_ptr_) = (err__ == 0) ? TRUE : FALSE; \
MPIU_DBG_MSG_FMT(THREAD,VERBOSE,(MPIU_DBG_FDEST, "MPIU_Thread_mutex_trylock mutex=%p result=%s", (mutex_ptr_), (*(flag_ptr_) ? "success" : "failure"))); \
*(int *)(err_ptr_) = (err__ == EBUSY) ? MPIU_THREAD_SUCCESS : err__; \
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
} while (0)
@@ -169,7 +166,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
\
err__ = pthread_cond_init((cond_ptr_), NULL); \
MPIU_DBG_MSG_P(THREAD,TYPICAL,"Created MPIU_Thread_cond %p", (cond_ptr_)); \
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
} while (0)
@@ -179,7 +175,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
\
MPIU_DBG_MSG_P(THREAD,TYPICAL,"About to destroy MPIU_Thread_cond %p", (cond_ptr_)); \
err__ = pthread_cond_destroy(cond_ptr_); \
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
} while (0)
@@ -198,7 +193,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
} \
while (err__ == EINTR); \
\
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
MPIU_Assert_fmt_msg(err__ == 0, \
("cond_wait failed, err=%d (%s)",err__,strerror(err__))); \
@@ -212,7 +206,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
MPIU_DBG_MSG_P(THREAD,TYPICAL,"About to cond_broadcast on MPIU_Thread_cond %p", (cond_ptr_)); \
err__ = pthread_cond_broadcast(cond_ptr_); \
\
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
MPIU_Assert_fmt_msg(err__ == 0, \
("cond_broadcast failed, err__=%d (%s)",err__,strerror(err__))); \
@@ -225,7 +218,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
MPIU_DBG_MSG_P(THREAD,TYPICAL,"About to cond_signal on MPIU_Thread_cond %p", (cond_ptr_)); \
err__ = pthread_cond_signal(cond_ptr_); \
\
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
MPIU_Assert_fmt_msg(err__ == 0, \
("cond_signal failed, err__=%d (%s)",err__,strerror(err__))); \
@@ -242,7 +234,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
\
err__ = pthread_key_create((tls_ptr_), (exit_func_ptr_)); \
\
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
} while (0)
@@ -252,7 +243,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
\
err__ = pthread_key_delete(*(tls_ptr_)); \
\
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
} while (0)
@@ -262,7 +252,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
\
err__ = pthread_setspecific(*(tls_ptr_), (value_)); \
\
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
MPIU_Assert_fmt_msg(err__ == 0, \
("tls_set failed, err__=%d (%s)",err__,strerror(err__))); \
@@ -272,7 +261,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
do { \
*(value_ptr_) = pthread_getspecific(*(tls_ptr_)); \
\
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = MPIU_THREAD_SUCCESS; \
} while (0)
http://git.mpich.org/mpich.git/commitdiff/eba2205431896e565852430b67ed2dbd5…
commit eba2205431896e565852430b67ed2dbd55ca6a6f
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 01:03:31 2015 -0500
Remove non-error-checking variants of mutex functions.
There are several problems with the original code:
1. The code seems to be confusing "debugging" with "error checking".
Protecting error checking with "debugging" checks does not make
sense.
2. For mutex create/destroy functionality, there's no reason to have
non-error-checking versions since they are not in the critical
path.
3. Possibly the most contentious: for mutex lock/unlock operations,
the extra branch for error checking is too small compared to the
cost of the actual lock acquisition and memory barriers. So the
error-checking version and non-error-checking versions should have
the same cost. It is OK to macro out the error checking when
errors are disabled, but they certainly should not be protected by
debugging checks, only by error checks.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index 05071f4..3e7951f 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -58,7 +58,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
*/
/* FIXME: using constant initializer if available */
-#if !defined(MPICH_DEBUG_MUTEX) || !defined(MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE)
+#if !defined(MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE)
#define MPIU_Thread_mutex_create(mutex_ptr_, err_ptr_) \
do { \
@@ -66,12 +66,15 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
\
OPA_store_int(&(mutex_ptr_)->num_queued_threads,0); \
err__ = pthread_mutex_init(&(mutex_ptr_)->mutex, NULL); \
+ if (err__) \
+ MPL_internal_sys_error_printf("pthread_mutex_init", err__, \
+ " %s:%d\n", __FILE__, __LINE__); \
/* FIXME: convert error to an MPIU_THREAD_ERR value */ \
*(int *)(err_ptr_) = err__; \
MPIU_DBG_MSG_P(THREAD,TYPICAL,"Created MPIU_Thread_mutex %p", (mutex_ptr_)); \
} while (0)
-#else /* defined(MPICH_DEBUG_MUTEX) && defined(MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE) */
+#else /* defined(MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE) */
#define MPIU_Thread_mutex_create(mutex_ptr_, err_ptr_) \
do { \
@@ -90,7 +93,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
MPIU_DBG_MSG_P(THREAD,TYPICAL,"Created MPIU_Thread_mutex %p", (mutex_ptr_)); \
} while (0)
-#endif /* defined(MPICH_DEBUG_MUTEX) && defined(MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE) */
+#endif /* defined(MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE) */
#define MPIU_Thread_mutex_destroy(mutex_ptr_, err_ptr_) \
do { \
@@ -103,22 +106,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
} while (0)
-#if !defined(MPICH_DEBUG_MUTEX)
-
-#define MPIU_Thread_mutex_lock(mutex_ptr_, err_ptr_) \
- do { \
- int err__; \
- MPIU_DBG_MSG_P(THREAD,VERBOSE,"enter MPIU_Thread_mutex_lock %p", (mutex_ptr_)); \
- OPA_incr_int(&(mutex_ptr_)->num_queued_threads); \
- err__ = pthread_mutex_lock(&(mutex_ptr_)->mutex); \
- OPA_decr_int(&(mutex_ptr_)->num_queued_threads); \
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
- *(int *)(err_ptr_) = err__; \
- MPIU_DBG_MSG_P(THREAD,VERBOSE,"exit MPIU_Thread_mutex_lock %p", (mutex_ptr_)); \
- } while (0)
-
-#else /* MPICH_DEBUG_MUTEX */
-
#define MPIU_Thread_mutex_lock(mutex_ptr_, err_ptr_) \
do { \
int err__; \
@@ -136,22 +123,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
MPIU_DBG_MSG_P(THREAD,VERBOSE,"exit MPIU_Thread_mutex_lock %p", (mutex_ptr_)); \
} while (0)
-#endif /* MPICH_DEBUG_MUTEX */
-
-
-#if !defined(MPICH_DEBUG_MUTEX)
-
-#define MPIU_Thread_mutex_unlock(mutex_ptr_, err_ptr_) \
- do { \
- int err__; \
- \
- MPIU_DBG_MSG_P(THREAD,TYPICAL,"MPIU_Thread_mutex_unlock %p", (mutex_ptr_)); \
- err__ = pthread_mutex_unlock(&(mutex_ptr_)->mutex); \
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
- *(int *)(err_ptr_) = err__; \
- } while (0)
-
-#else /* MPICH_DEBUG_MUTEX */
#define MPIU_Thread_mutex_unlock(mutex_ptr_, err_ptr_) \
do { \
@@ -168,23 +139,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
*(int *)(err_ptr_) = err__; \
} while (0)
-#endif /* MPICH_DEBUG_MUTEX */
-
-
-#if !defined(MPICH_DEBUG_MUTEX)
-
-#define MPIU_Thread_mutex_trylock(mutex_ptr_, flag_ptr_, err_ptr_) \
- do { \
- int err__; \
- \
- err__ = pthread_mutex_trylock(&(mutex_ptr_)->mutex); \
- *(flag_ptr_) = (err__ == 0) ? TRUE : FALSE; \
- MPIU_DBG_MSG_FMT(THREAD,VERBOSE,(MPIU_DBG_FDEST, "MPIU_Thread_mutex_trylock mutex=%p result=%s", (mutex_ptr_), (*(flag_ptr_) ? "success" : "failure"))); \
- *(int *)(err_ptr_) = (err__ == EBUSY) ? MPIU_THREAD_SUCCESS : err__; \
- /* FIXME: convert error to an MPIU_THREAD_ERR value */ \
- } while (0)
-
-#else /* MPICH_DEBUG_MUTEX */
#define MPIU_Thread_mutex_trylock(mutex_ptr_, flag_ptr_, err_ptr_) \
do { \
@@ -203,7 +157,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
/* FIXME: convert error to an MPIU_THREAD_ERR value */ \
} while (0)
-#endif /* MPICH_DEBUG_MUTEX */
/*
http://git.mpich.org/mpich.git/commitdiff/361e66e0918e667f188378d4387830b0c…
commit 361e66e0918e667f188378d4387830b0ca99ffb5
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 01:01:36 2015 -0500
Remove C99 semantics.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index ea7dc6f..05071f4 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -76,9 +76,9 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
#define MPIU_Thread_mutex_create(mutex_ptr_, err_ptr_) \
do { \
int err__; \
- OPA_store_int(&(mutex_ptr_)->num_queued_threads,0); \
pthread_mutexattr_t attr__; \
\
+ OPA_store_int(&(mutex_ptr_)->num_queued_threads,0); \
pthread_mutexattr_init(&attr__); \
pthread_mutexattr_settype(&attr__, MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE); \
err__ = pthread_mutex_init(&(mutex_ptr_)->mutex, &attr__); \
http://git.mpich.org/mpich.git/commitdiff/c613340e4c8a9b221d772721560b84c72…
commit c613340e4c8a9b221d772721560b84c728523696
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 01:00:46 2015 -0500
Prefix MPICH-defined constants with MPICH.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/configure.ac b/configure.ac
index 0f75788..8f14f58 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5315,10 +5315,10 @@ void f1(void *a) { return; }],
pac_cv_has_pthread_mutex_errorcheck=no)])
if test "$pac_cv_has_pthread_mutex_errorcheck" = yes ; then
- AC_DEFINE(PTHREAD_MUTEX_ERRORCHECK_VALUE,PTHREAD_MUTEX_ERRORCHECK,
+ AC_DEFINE(MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE,PTHREAD_MUTEX_ERRORCHECK,
[Define to an expression that will result in an error checking mutex type.])
elif test "$pac_cv_has_pthread_mutex_errorcheck_np" = yes ; then
- AC_DEFINE(PTHREAD_MUTEX_ERRORCHECK_VALUE,PTHREAD_MUTEX_ERRORCHECK_NP,
+ AC_DEFINE(MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE,PTHREAD_MUTEX_ERRORCHECK_NP,
[Define to an expression that will result in an error checking mutex type.])
fi
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index de617cb..ea7dc6f 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -58,7 +58,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
*/
/* FIXME: using constant initializer if available */
-#if !defined(MPICH_DEBUG_MUTEX) || !defined(PTHREAD_MUTEX_ERRORCHECK_VALUE)
+#if !defined(MPICH_DEBUG_MUTEX) || !defined(MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE)
#define MPIU_Thread_mutex_create(mutex_ptr_, err_ptr_) \
do { \
@@ -71,7 +71,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
MPIU_DBG_MSG_P(THREAD,TYPICAL,"Created MPIU_Thread_mutex %p", (mutex_ptr_)); \
} while (0)
-#else /* defined(MPICH_DEBUG_MUTEX) && defined(PTHREAD_MUTEX_ERRORCHECK_VALUE) */
+#else /* defined(MPICH_DEBUG_MUTEX) && defined(MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE) */
#define MPIU_Thread_mutex_create(mutex_ptr_, err_ptr_) \
do { \
@@ -80,7 +80,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
pthread_mutexattr_t attr__; \
\
pthread_mutexattr_init(&attr__); \
- pthread_mutexattr_settype(&attr__, PTHREAD_MUTEX_ERRORCHECK_VALUE); \
+ pthread_mutexattr_settype(&attr__, MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE); \
err__ = pthread_mutex_init(&(mutex_ptr_)->mutex, &attr__); \
if (err__) \
MPL_internal_sys_error_printf("pthread_mutex_init", err__, \
@@ -90,7 +90,7 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
MPIU_DBG_MSG_P(THREAD,TYPICAL,"Created MPIU_Thread_mutex %p", (mutex_ptr_)); \
} while (0)
-#endif /* defined(MPICH_DEBUG_MUTEX) && defined(PTHREAD_MUTEX_ERRORCHECK_VALUE) */
+#endif /* defined(MPICH_DEBUG_MUTEX) && defined(MPICH_PTHREAD_MUTEX_ERRORCHECK_VALUE) */
#define MPIU_Thread_mutex_destroy(mutex_ptr_, err_ptr_) \
do { \
http://git.mpich.org/mpich.git/commitdiff/6cefbb509c0f37d7e7fee03a8e345076a…
commit 6cefbb509c0f37d7e7fee03a8e345076ac3d618c
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 00:59:04 2015 -0500
Remove unnecessary and incorrect comment.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index 865e554..de617cb 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -79,11 +79,6 @@ int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);
OPA_store_int(&(mutex_ptr_)->num_queued_threads,0); \
pthread_mutexattr_t attr__; \
\
- /* FIXME this used to be PTHREAD_MUTEX_ERRORCHECK_NP, but we \
- * had to change it for the thread granularity work when we \
- * needed recursive mutexes. We should go through this code \
- * and see if there's any good way to implement error checked \
- * versions with the recursive mutexes. */ \
pthread_mutexattr_init(&attr__); \
pthread_mutexattr_settype(&attr__, PTHREAD_MUTEX_ERRORCHECK_VALUE); \
err__ = pthread_mutex_init(&(mutex_ptr_)->mutex, &attr__); \
http://git.mpich.org/mpich.git/commitdiff/ada04ce8e8a64cb7ee3fe5649a30919af…
commit ada04ce8e8a64cb7ee3fe5649a30919af6adab64
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Tue Aug 18 00:53:48 2015 -0500
Remove unused macros.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/configure.ac b/configure.ac
index a175928..0f75788 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5299,25 +5299,6 @@ void f1(void *a) { return; }],
fi
fi
- # Check for PTHREAD_MUTEX_RECURSIVE_NP and PTHREAD_MUTEX_RECURSIVE
- AC_CACHE_CHECK([whether pthread.h defines PTHREAD_MUTEX_RECURSIVE_NP],
- pac_cv_has_pthread_mutex_recursive_np,[
- AC_TRY_COMPILE([#include <pthread.h>],
- [int a=PTHREAD_MUTEX_RECURSIVE_NP;],
- pac_cv_has_pthread_mutex_recursive_np=yes,
- pac_cv_has_pthread_mutex_recursive_np=no)])
- AC_CACHE_CHECK([whether pthread.h defines PTHREAD_MUTEX_RECURSIVE],
- pac_cv_has_pthread_mutex_recursive,[
- AC_TRY_COMPILE([#include <pthread.h>],
- [int a=PTHREAD_MUTEX_RECURSIVE;],
- pac_cv_has_pthread_mutex_recursive=yes,
- pac_cv_has_pthread_mutex_recursive=no)])
- if test "$pac_cv_has_pthread_mutex_recursive_np" = yes ; then
- AC_DEFINE(HAVE_PTHREAD_MUTEX_RECURSIVE_NP,1,[Define if PTHREAD_MUTEX_RECURSIVE_NP is available in pthread.h])
- fi
- if test "$pac_cv_has_pthread_mutex_recursive" = yes ; then
- AC_DEFINE(HAVE_PTHREAD_MUTEX_RECURSIVE,1,[Define if PTHREAD_MUTEX_RECURSIVE is available in pthread.h])
- fi
# Check for PTHREAD_MUTEX_ERRORCHECK_NP and PTHREAD_MUTEX_ERRORCHECK
AC_CACHE_CHECK([whether pthread.h defines PTHREAD_MUTEX_ERRORCHECK_NP],
diff --git a/src/util/thread/mpiu_thread_posix_funcs.h b/src/util/thread/mpiu_thread_posix_funcs.h
index b82e7d3..865e554 100644
--- a/src/util/thread/mpiu_thread_posix_funcs.h
+++ b/src/util/thread/mpiu_thread_posix_funcs.h
@@ -13,20 +13,6 @@
#include "mpiu_process_wrappers.h" /* for MPIU_PW_Sched_yield */
-/*
- One of PTHREAD_MUTEX_RECURSIVE_NP and PTHREAD_MUTEX_RECURSIVE seem to be
- present in different versions. For example, Mac OS X 10.4 had
- PTHREAD_MUTEX_RECURSIVE_NP but Mac OS X 10.5 does not; instead it has
- PTHREAD_MUTEX_RECURSIVE
-*/
-#if defined(HAVE_PTHREAD_MUTEX_RECURSIVE_NP)
-#define PTHREAD_MUTEX_RECURSIVE_VALUE PTHREAD_MUTEX_RECURSIVE_NP
-#elif defined(HAVE_PTHREAD_MUTEX_RECURSIVE)
-#define PTHREAD_MUTEX_RECURSIVE_VALUE PTHREAD_MUTEX_RECURSIVE
-#else
-#error 'Unable to determine pthrad mutex recursive value'
-#endif /* pthread mutex recursive value */
-
#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/bc56b6911c4d44b8d92a3498dc15802d0…
commit bc56b6911c4d44b8d92a3498dc15802d01fc6df2
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Mon Aug 17 23:54:04 2015 -0500
Simplify the device thread functionality for ch3.
Remove duplicated descriptions from the mpidu_thread_fallback.h file.
Also, rename the file to mpid_thread.h to keep it consistent across
devices.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/Makefile.mk b/src/mpid/ch3/Makefile.mk
index 05b56cb..e04f49d 100644
--- a/src/mpid/ch3/Makefile.mk
+++ b/src/mpid/ch3/Makefile.mk
@@ -20,6 +20,7 @@ noinst_HEADERS += \
src/mpid/ch3/include/mpidpkt.h \
src/mpid/ch3/include/mpidpost.h \
src/mpid/ch3/include/mpidpre.h \
+ src/mpid/ch3/include/mpid_thread.h \
src/mpid/ch3/include/mpidrma.h
include $(top_srcdir)/src/mpid/ch3/src/Makefile.mk
diff --git a/src/mpid/ch3/include/mpid_thread.h b/src/mpid/ch3/include/mpid_thread.h
new file mode 100644
index 0000000..cefecba
--- /dev/null
+++ b/src/mpid/ch3/include/mpid_thread.h
@@ -0,0 +1,60 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2001 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#if !defined(MPID_THREAD_H_INCLUDED)
+#define MPID_THREAD_H_INCLUDED
+
+#include "mpidu_thread_fallback.h"
+#include "mpiutil.h"
+
+/* We simply use the fallback timer functionality and do not define
+ * our own */
+
+typedef MPIDU_Thread_mutex_t MPID_Thread_mutex_t;
+typedef MPIDU_Thread_cond_t MPID_Thread_cond_t;
+typedef MPIDU_Thread_id_t MPID_Thread_id_t;
+typedef MPIDU_Thread_tls_t MPID_Thread_tls_t;
+typedef MPIDU_Thread_func_t MPID_Thread_func_t;
+
+#define MPID_THREAD_CS_ENTER MPIDU_THREAD_CS_ENTER
+#define MPID_THREAD_CS_EXIT MPIDU_THREAD_CS_EXIT
+#define MPID_THREAD_CS_YIELD MPIDU_THREAD_CS_YIELD
+
+#define MPID_THREAD_CHECK_BEGIN MPIDU_THREAD_CHECK_BEGIN
+#define MPID_THREAD_CHECK_END MPIDU_THREAD_CHECK_END
+
+#define MPID_Thread_create MPIDU_Thread_create
+#define MPID_Thread_exit MPIDU_Thread_exit
+#define MPID_Thread_self MPIDU_Thread_self
+#define MPID_Thread_same MPIDU_Thread_same
+#define MPID_Thread_same MPIDU_Thread_same
+
+#define MPID_Thread_mutex_create MPIDU_Thread_mutex_create
+#define MPID_Thread_mutex_destroy MPIDU_Thread_mutex_destroy
+#define MPID_Thread_mutex_lock MPIDU_Thread_mutex_lock
+#define MPID_Thread_mutex_unlock MPIDU_Thread_mutex_unlock
+#define MPID_Thread_mutex_trylock MPIDU_Thread_mutex_trylock
+
+#define MPID_Thread_cond_create MPIDU_Thread_cond_create
+#define MPID_Thread_cond_destroy MPIDU_Thread_cond_destroy
+#define MPID_Thread_cond_wait MPIDU_Thread_cond_wait
+#define MPID_Thread_cond_broadcast MPIDU_Thread_cond_broadcast
+#define MPID_Thread_cond_signal MPIDU_Thread_cond_signal
+
+#define MPID_Thread_tls_create MPIDU_Thread_tls_create
+#define MPID_Thread_tls_destroy MPIDU_Thread_tls_destroy
+#define MPID_Thread_tls_set MPIDU_Thread_tls_set
+#define MPID_Thread_tls_get MPIDU_Thread_tls_get
+
+#define MPID_cc_t MPIDU_cc_t
+#define MPID_cc_get MPIDU_cc_get
+#define MPID_cc_set MPIDU_cc_set
+#define MPID_cc_is_complete MPIDU_cc_is_complete
+#define MPID_cc_incr MPIDU_cc_incr
+#define MPID_cc_decr MPIDU_cc_decr
+
+
+#endif /* !defined(MPID_THREAD_H_INCLUDED) */
diff --git a/src/mpid/ch3/include/mpid_thread_fallback.h b/src/mpid/ch3/include/mpid_thread_fallback.h
deleted file mode 100644
index 945899d..0000000
--- a/src/mpid/ch3/include/mpid_thread_fallback.h
+++ /dev/null
@@ -1,318 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- * (C) 2001 by Argonne National Laboratory.
- * See COPYRIGHT in top-level directory.
- */
-
-#if !defined(MPID_THREAD_FALLBACK_H_INCLUDED)
-#define MPID_THREAD_FALLBACK_H_INCLUDED
-
-#include "mpidu_thread_fallback.h"
-#include "mpiutil.h"
-
-/* some important critical section names:
- * GLOBAL - entered/exited at beginning/end of (nearly) every MPI_ function
- * INIT - entered before MPID_Init and exited near the end of MPI_Init(_thread)
- * See the analysis of the MPI routines for thread usage properties. Those
- * routines considered "Access Only" do not require GLOBAL. That analysis
- * was very general; in MPICH, some routines may have internal shared
- * state that isn't required by the MPI specification. Perhaps the
- * best example of this is the MPI_ERROR_STRING routine, where the
- * instance-specific error messages make use of shared state, and hence
- * must be accessed in a thread-safe fashion (e.g., require an GLOBAL
- * critical section). With such routines removed, the set of routines
- * that (probably) do not require GLOBAL include:
- *
- * MPI_CART_COORDS, MPI_CART_GET, MPI_CART_MAP, MPI_CART_RANK, MPI_CART_SHIFT,
- * MPI_CART_SUB, MPI_CARTDIM_GET, MPI_COMM_GET_NAME,
- * MPI_COMM_RANK, MPI_COMM_REMOTE_SIZE,
- * MPI_COMM_SET_NAME, MPI_COMM_SIZE, MPI_COMM_TEST_INTER, MPI_ERROR_CLASS,
- * MPI_FILE_GET_AMODE, MPI_FILE_GET_ATOMICITY, MPI_FILE_GET_BYTE_OFFSET,
- * MPI_FILE_GET_POSITION, MPI_FILE_GET_POSITION_SHARED, MPI_FILE_GET_SIZE
- * MPI_FILE_GET_TYPE_EXTENT, MPI_FILE_SET_SIZE,
-g * MPI_FINALIZED, MPI_GET_COUNT, MPI_GET_ELEMENTS, MPI_GRAPH_GET,
- * MPI_GRAPH_MAP, MPI_GRAPH_NEIGHBORS, MPI_GRAPH_NEIGHBORS_COUNT,
- * MPI_GRAPHDIMS_GET, MPI_GROUP_COMPARE, MPI_GROUP_RANK,
- * MPI_GROUP_SIZE, MPI_GROUP_TRANSLATE_RANKS, MPI_INITIALIZED,
- * MPI_PACK, MPI_PACK_EXTERNAL, MPI_PACK_SIZE, MPI_TEST_CANCELLED,
- * MPI_TOPO_TEST, MPI_TYPE_EXTENT, MPI_TYPE_GET_ENVELOPE,
- * MPI_TYPE_GET_EXTENT, MPI_TYPE_GET_NAME, MPI_TYPE_GET_TRUE_EXTENT,
- * MPI_TYPE_LB, MPI_TYPE_SET_NAME, MPI_TYPE_SIZE, MPI_TYPE_UB, MPI_UNPACK,
- * MPI_UNPACK_EXTERNAL, MPI_WIN_GET_NAME, MPI_WIN_SET_NAME
- *
- * Some of the routines that could be read-only, but internally may
- * require access or updates to shared data include
- * MPI_COMM_COMPARE (creation of group sets)
- * MPI_COMM_SET_ERRHANDLER (reference count on errhandler)
- * MPI_COMM_CALL_ERRHANDLER (actually ok, but risk high, usage low)
- * MPI_FILE_CALL_ERRHANDLER (ditto)
- * MPI_WIN_CALL_ERRHANDLER (ditto)
- * MPI_ERROR_STRING (access to instance-specific string, which could
- * be overwritten by another thread)
- * MPI_FILE_SET_VIEW (setting view a big deal)
- * MPI_TYPE_COMMIT (could update description of type internally,
- * including creating a new representation. Should
- * be ok, but, like call_errhandler, low usage)
- *
- * Note that other issues may force a routine to include the GLOBAL
- * critical section, such as debugging information that requires shared
- * state. Such situations should be avoided where possible.
- */
-
-typedef MPIDU_Thread_mutex_t MPID_Thread_mutex_t;
-typedef MPIDU_Thread_cond_t MPID_Thread_cond_t;
-typedef MPIDU_Thread_id_t MPID_Thread_id_t;
-typedef MPIDU_Thread_tls_t MPID_Thread_tls_t;
-typedef MPIDU_Thread_func_t MPID_Thread_func_t;
-
-/*M MPIDU_THREAD_CS_ENTER - Enter a named critical section
-
- Input Parameters:
-+ _name - name of the critical section
-- _context - A context (typically an object) of the critical section
-
-M*/
-#define MPID_THREAD_CS_ENTER MPIDU_THREAD_CS_ENTER
-
-/*M MPIDU_THREAD_CS_EXIT - Exit a named critical section
-
- Input Parameters:
-+ _name - cname of the critical section
-- _context - A context (typically an object) of the critical section
-
-M*/
-#define MPID_THREAD_CS_EXIT MPIDU_THREAD_CS_EXIT
-
-/*M MPIDU_THREAD_CS_YIELD - Temporarily release a critical section and yield
- to other threads
-
- Input Parameters:
-+ _name - cname of the critical section
-- _context - A context (typically an object) of the critical section
-
- M*/
-#define MPID_THREAD_CS_YIELD MPIDU_THREAD_CS_YIELD
-
-#define MPID_THREAD_CHECK_BEGIN MPIDU_THREAD_CHECK_BEGIN
-#define MPID_THREAD_CHECK_END MPIDU_THREAD_CHECK_END
-
-/*@
- MPID_Thread_create - create a new thread
-
- Input Parameters:
-+ func - function to run in new thread
-- data - data to be passed to thread function
-
- Output Parameters:
-+ id - identifier for the new thread
-- err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred
-
- Notes:
- The thread is created in a detach state, meaning that is may not be waited upon. If another thread needs to wait for this
- thread to complete, the threads must provide their own synchronization mechanism.
-@*/
-#define MPID_Thread_create MPIDU_Thread_create
-
-/*@
- MPID_Thread_exit - exit from the current thread
-@*/
-#define MPID_Thread_exit MPIDU_Thread_exit
-
-/*@
- MPID_Thread_self - get the identifier of the current thread
-
- Output Parameter:
-. id - identifier of current thread
-@*/
-#define MPID_Thread_self MPIDU_Thread_self
-
-/*@
- MPID_Thread_same - compare two threads identifiers to see if refer to the same thread
-
- Input Parameters:
-+ id1 - first identifier
-- id2 - second identifier
-
- Output Parameter:
-. same - TRUE if the two threads identifiers refer to the same thread; FALSE otherwise
-@*/
-#define MPID_Thread_same MPIDU_Thread_same
-
-/*@
- MPID_Thread_yield - voluntarily relinquish the CPU, giving other threads an opportunity to run
-@*/
-#define MPID_Thread_same MPIDU_Thread_same
-
-/*
- * Mutexes
- */
-
-/*@
- MPID_Thread_mutex_create - create a new mutex
-
- Output Parameters:
-+ mutex - mutex
-- err - error code (non-zero indicates an error has occurred)
-@*/
-#define MPID_Thread_mutex_create MPIDU_Thread_mutex_create
-
-/*@
- MPID_Thread_mutex_destroy - destroy an existing mutex
-
- Input Parameter:
-. mutex - mutex
-
- Output Parameter:
-. err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred
-@*/
-#define MPID_Thread_mutex_destroy MPIDU_Thread_mutex_destroy
-
-/*@
- MPID_Thread_lock - acquire a mutex
-
- Input Parameter:
-. mutex - mutex
-@*/
-#define MPID_Thread_mutex_lock MPIDU_Thread_mutex_lock
-
-/*@
- MPID_Thread_unlock - release a mutex
-
- Input Parameter:
-. mutex - mutex
-@*/
-#define MPID_Thread_mutex_unlock MPIDU_Thread_mutex_unlock
-
-/*@
- MPID_Thread_mutex_trylock - try to acquire a mutex, but return even if unsuccessful
-
- Input Parameter:
-. mutex - mutex
-
- Output Parameter:
-. flag - flag
-@*/
-#define MPID_Thread_mutex_trylock MPIDU_Thread_mutex_trylock
-
-/*
- * Condition Variables
- */
-
-/*@
- MPID_Thread_cond_create - create a new condition variable
-
- Output Parameters:
-+ cond - condition variable
-- err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred
-@*/
-#define MPID_Thread_cond_create MPIDU_Thread_cond_create
-
-/*@
- MPID_Thread_cond_destroy - destroy an existinga condition variable
-
- Input Parameter:
-. cond - condition variable
-
- Output Parameter:
-. err - location to store the error code; pointer may be NULL; error is zero
- for success, non-zero if a failure occurred
-@*/
-#define MPID_Thread_cond_destroy MPIDU_Thread_cond_destroy
-
-/*@
- MPID_Thread_cond_wait - wait (block) on a condition variable
-
- Input Parameters:
-+ cond - condition variable
-- mutex - mutex
-
- Notes:
- This function may return even though another thread has not requested that a
- thread be released. Therefore, the calling
- program must wrap the function in a while loop that verifies program state
- has changed in a way that warrants letting the
- thread proceed.
-@*/
-#define MPID_Thread_cond_wait MPIDU_Thread_cond_wait
-
-/*@
- MPID_Thread_cond_broadcast - release all threads currently waiting on a condition variable
-
- Input Parameter:
-. cond - condition variable
-@*/
-#define MPID_Thread_cond_broadcast MPIDU_Thread_cond_broadcast
-
-/*@
- MPID_Thread_cond_signal - release one thread currently waitng on a condition variable
-
- Input Parameter:
-. cond - condition variable
-@*/
-#define MPID_Thread_cond_signal MPIDU_Thread_cond_signal
-
-/*
- * Thread Local Storage
- */
-/*@
- MPID_Thread_tls_create - create a thread local storage space
-
- Input Parameter:
-. exit_func - function to be called when the thread exists; may be NULL if a
- callback is not desired
-
- Output Parameters:
-+ tls - new thread local storage space
-- err - location to store the error code; pointer may be NULL; error is zero
- for success, non-zero if a failure occurred
-@*/
-#define MPID_Thread_tls_create MPIDU_Thread_tls_create
-
-/*@
- MPID_Thread_tls_destroy - destroy a thread local storage space
-
- Input Parameter:
-. tls - thread local storage space to be destroyed
-
- Output Parameter:
-. err - location to store the error code; pointer may be NULL; error is zero
- for success, non-zero if a failure occurred
-
- Notes:
- The destroy function associated with the thread local storage will not
- called after the space has been destroyed.
-@*/
-#define MPID_Thread_tls_destroy MPIDU_Thread_tls_destroy
-
-/*@
- MPID_Thread_tls_set - associate a value with the current thread in the
- thread local storage space
-
- Input Parameters:
-+ tls - thread local storage space
-- value - value to associate with current thread
-@*/
-#define MPID_Thread_tls_set MPIDU_Thread_tls_set
-
-/*@
- MPID_Thread_tls_get - obtain the value associated with the current thread
- from the thread local storage space
-
- Input Parameter:
-. tls - thread local storage space
-
- Output Parameter:
-. value - value associated with current thread
-@*/
-#define MPID_Thread_tls_get MPIDU_Thread_tls_get
-
-
-#define MPID_cc_t MPIDU_cc_t
-#define MPID_cc_get MPIDU_cc_get
-#define MPID_cc_set MPIDU_cc_set
-#define MPID_cc_is_complete MPIDU_cc_is_complete
-#define MPID_cc_incr MPIDU_cc_incr
-#define MPID_cc_decr MPIDU_cc_decr
-
-
-#endif /* !defined(MPID_THREAD_FALLBACK_H_INCLUDED) */
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 393a98e..360b017 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -26,9 +26,10 @@ typedef MPIU_Pint MPIDI_msg_sz_t;
/* FIXME: Include here? */
#include "opa_primitives.h"
-/* We simply use the fallback thread functionality and do not define
+#include "mpid_thread.h"
+
+/* We simply use the fallback timer functionality and do not define
* our own */
-#include "mpid_thread_fallback.h"
#include "mpid_timers_fallback.h"
union MPIDI_CH3_Pkt;
http://git.mpich.org/mpich.git/commitdiff/3bb0d5061174dec31ecf471404b93bb4b…
commit 3bb0d5061174dec31ecf471404b93bb4bb44dbf3
Author: Charles J Archer <charles.j.archer(a)intel.com>
Date: Mon Aug 17 16:37:53 2015 -0700
Removed unused MPIXX_Thread_tls_exit_func_t typedefs
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/mpid/ch3/include/mpid_thread_fallback.h b/src/mpid/ch3/include/mpid_thread_fallback.h
index 1a27ae0..945899d 100644
--- a/src/mpid/ch3/include/mpid_thread_fallback.h
+++ b/src/mpid/ch3/include/mpid_thread_fallback.h
@@ -64,7 +64,6 @@ typedef MPIDU_Thread_cond_t MPID_Thread_cond_t;
typedef MPIDU_Thread_id_t MPID_Thread_id_t;
typedef MPIDU_Thread_tls_t MPID_Thread_tls_t;
typedef MPIDU_Thread_func_t MPID_Thread_func_t;
-typedef MPIDU_Thread_tls_exit_func_t MPID_Thread_tls_exit_func_t;
/*M MPIDU_THREAD_CS_ENTER - Enter a named critical section
diff --git a/src/mpid/common/thread/mpidu_thread_fallback.h b/src/mpid/common/thread/mpidu_thread_fallback.h
index ebfb180..a4ece3e 100644
--- a/src/mpid/common/thread/mpidu_thread_fallback.h
+++ b/src/mpid/common/thread/mpidu_thread_fallback.h
@@ -63,7 +63,6 @@ typedef MPIU_Thread_cond_t MPIDU_Thread_cond_t;
typedef MPIU_Thread_id_t MPIDU_Thread_id_t;
typedef MPIU_Thread_tls_t MPIDU_Thread_tls_t;
typedef MPIU_Thread_func_t MPIDU_Thread_func_t;
-typedef MPIU_Thread_tls_exit_func_t MPIDU_Thread_tls_exit_func_t;
/*M MPIU_THREAD_CS_ENTER - Enter a named critical section
http://git.mpich.org/mpich.git/commitdiff/14eb4f5808ba47d8d180390ad60b9fa7f…
commit 14eb4f5808ba47d8d180390ad60b9fa7fbf6ec8c
Author: Jithin Jose <jithin.jose(a)intel.com>
Date: Fri Aug 14 15:24:26 2015 -0700
Add fallback option for thread: MPID thread -> MPIDU thread -> MPIU thread
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/mpid/common/thread/mpid_thread_fallback.h b/src/mpid/ch3/include/mpid_thread_fallback.h
similarity index 77%
copy from src/mpid/common/thread/mpid_thread_fallback.h
copy to src/mpid/ch3/include/mpid_thread_fallback.h
index 09af49f..1a27ae0 100644
--- a/src/mpid/common/thread/mpid_thread_fallback.h
+++ b/src/mpid/ch3/include/mpid_thread_fallback.h
@@ -4,9 +4,10 @@
* See COPYRIGHT in top-level directory.
*/
-#if !defined(MPID_THREAD_H_INCLUDED)
-#define MPID_THREAD_H_INCLUDED
+#if !defined(MPID_THREAD_FALLBACK_H_INCLUDED)
+#define MPID_THREAD_FALLBACK_H_INCLUDED
+#include "mpidu_thread_fallback.h"
#include "mpiutil.h"
/* some important critical section names:
@@ -58,31 +59,32 @@ g * MPI_FINALIZED, MPI_GET_COUNT, MPI_GET_ELEMENTS, MPI_GRAPH_GET,
* state. Such situations should be avoided where possible.
*/
-typedef MPIU_Thread_mutex_t MPID_Thread_mutex_t;
-typedef MPIU_Thread_cond_t MPID_Thread_cond_t;
-typedef MPIU_Thread_id_t MPID_Thread_id_t;
-typedef MPIU_Thread_tls_t MPID_Thread_tls_t;
-typedef MPIU_Thread_func_t MPID_Thread_func_t;
+typedef MPIDU_Thread_mutex_t MPID_Thread_mutex_t;
+typedef MPIDU_Thread_cond_t MPID_Thread_cond_t;
+typedef MPIDU_Thread_id_t MPID_Thread_id_t;
+typedef MPIDU_Thread_tls_t MPID_Thread_tls_t;
+typedef MPIDU_Thread_func_t MPID_Thread_func_t;
+typedef MPIDU_Thread_tls_exit_func_t MPID_Thread_tls_exit_func_t;
-/*M MPIU_THREAD_CS_ENTER - Enter a named critical section
+/*M MPIDU_THREAD_CS_ENTER - Enter a named critical section
Input Parameters:
+ _name - name of the critical section
- _context - A context (typically an object) of the critical section
M*/
-#define MPID_THREAD_CS_ENTER MPIU_THREAD_CS_ENTER
+#define MPID_THREAD_CS_ENTER MPIDU_THREAD_CS_ENTER
-/*M MPIU_THREAD_CS_EXIT - Exit a named critical section
+/*M MPIDU_THREAD_CS_EXIT - Exit a named critical section
Input Parameters:
+ _name - cname of the critical section
- _context - A context (typically an object) of the critical section
M*/
-#define MPID_THREAD_CS_EXIT MPIU_THREAD_CS_EXIT
+#define MPID_THREAD_CS_EXIT MPIDU_THREAD_CS_EXIT
-/*M MPIU_THREAD_CS_YIELD - Temporarily release a critical section and yield
+/*M MPIDU_THREAD_CS_YIELD - Temporarily release a critical section and yield
to other threads
Input Parameters:
@@ -90,10 +92,10 @@ M*/
- _context - A context (typically an object) of the critical section
M*/
-#define MPID_THREAD_CS_YIELD MPIU_THREAD_CS_YIELD
+#define MPID_THREAD_CS_YIELD MPIDU_THREAD_CS_YIELD
-#define MPID_THREAD_CHECK_BEGIN MPIU_THREAD_CHECK_BEGIN
-#define MPID_THREAD_CHECK_END MPIU_THREAD_CHECK_END
+#define MPID_THREAD_CHECK_BEGIN MPIDU_THREAD_CHECK_BEGIN
+#define MPID_THREAD_CHECK_END MPIDU_THREAD_CHECK_END
/*@
MPID_Thread_create - create a new thread
@@ -110,12 +112,12 @@ M*/
The thread is created in a detach state, meaning that is may not be waited upon. If another thread needs to wait for this
thread to complete, the threads must provide their own synchronization mechanism.
@*/
-#define MPID_Thread_create MPIU_Thread_create
+#define MPID_Thread_create MPIDU_Thread_create
/*@
MPID_Thread_exit - exit from the current thread
@*/
-#define MPID_Thread_exit MPIU_Thread_exit
+#define MPID_Thread_exit MPIDU_Thread_exit
/*@
MPID_Thread_self - get the identifier of the current thread
@@ -123,7 +125,7 @@ M*/
Output Parameter:
. id - identifier of current thread
@*/
-#define MPID_Thread_self MPIU_Thread_self
+#define MPID_Thread_self MPIDU_Thread_self
/*@
MPID_Thread_same - compare two threads identifiers to see if refer to the same thread
@@ -135,12 +137,12 @@ M*/
Output Parameter:
. same - TRUE if the two threads identifiers refer to the same thread; FALSE otherwise
@*/
-#define MPID_Thread_same MPIU_Thread_same
+#define MPID_Thread_same MPIDU_Thread_same
/*@
MPID_Thread_yield - voluntarily relinquish the CPU, giving other threads an opportunity to run
@*/
-#define MPID_Thread_same MPIU_Thread_same
+#define MPID_Thread_same MPIDU_Thread_same
/*
* Mutexes
@@ -153,7 +155,7 @@ M*/
+ mutex - mutex
- err - error code (non-zero indicates an error has occurred)
@*/
-#define MPID_Thread_mutex_create MPIU_Thread_mutex_create
+#define MPID_Thread_mutex_create MPIDU_Thread_mutex_create
/*@
MPID_Thread_mutex_destroy - destroy an existing mutex
@@ -164,7 +166,7 @@ M*/
Output Parameter:
. err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred
@*/
-#define MPID_Thread_mutex_destroy MPIU_Thread_mutex_destroy
+#define MPID_Thread_mutex_destroy MPIDU_Thread_mutex_destroy
/*@
MPID_Thread_lock - acquire a mutex
@@ -172,7 +174,7 @@ M*/
Input Parameter:
. mutex - mutex
@*/
-#define MPID_Thread_mutex_lock MPIU_Thread_mutex_lock
+#define MPID_Thread_mutex_lock MPIDU_Thread_mutex_lock
/*@
MPID_Thread_unlock - release a mutex
@@ -180,7 +182,7 @@ M*/
Input Parameter:
. mutex - mutex
@*/
-#define MPID_Thread_mutex_unlock MPIU_Thread_mutex_unlock
+#define MPID_Thread_mutex_unlock MPIDU_Thread_mutex_unlock
/*@
MPID_Thread_mutex_trylock - try to acquire a mutex, but return even if unsuccessful
@@ -191,7 +193,7 @@ M*/
Output Parameter:
. flag - flag
@*/
-#define MPID_Thread_mutex_trylock MPIU_Thread_mutex_trylock
+#define MPID_Thread_mutex_trylock MPIDU_Thread_mutex_trylock
/*
* Condition Variables
@@ -204,7 +206,7 @@ M*/
+ cond - condition variable
- err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred
@*/
-#define MPID_Thread_cond_create MPIU_Thread_cond_create
+#define MPID_Thread_cond_create MPIDU_Thread_cond_create
/*@
MPID_Thread_cond_destroy - destroy an existinga condition variable
@@ -216,7 +218,7 @@ M*/
. err - location to store the error code; pointer may be NULL; error is zero
for success, non-zero if a failure occurred
@*/
-#define MPID_Thread_cond_destroy MPIU_Thread_cond_destroy
+#define MPID_Thread_cond_destroy MPIDU_Thread_cond_destroy
/*@
MPID_Thread_cond_wait - wait (block) on a condition variable
@@ -232,7 +234,7 @@ M*/
has changed in a way that warrants letting the
thread proceed.
@*/
-#define MPID_Thread_cond_wait MPIU_Thread_cond_wait
+#define MPID_Thread_cond_wait MPIDU_Thread_cond_wait
/*@
MPID_Thread_cond_broadcast - release all threads currently waiting on a condition variable
@@ -240,7 +242,7 @@ M*/
Input Parameter:
. cond - condition variable
@*/
-#define MPID_Thread_cond_broadcast MPIU_Thread_cond_broadcast
+#define MPID_Thread_cond_broadcast MPIDU_Thread_cond_broadcast
/*@
MPID_Thread_cond_signal - release one thread currently waitng on a condition variable
@@ -248,7 +250,7 @@ M*/
Input Parameter:
. cond - condition variable
@*/
-#define MPID_Thread_cond_signal MPIU_Thread_cond_signal
+#define MPID_Thread_cond_signal MPIDU_Thread_cond_signal
/*
* Thread Local Storage
@@ -265,7 +267,7 @@ M*/
- err - location to store the error code; pointer may be NULL; error is zero
for success, non-zero if a failure occurred
@*/
-#define MPID_Thread_tls_create MPIU_Thread_tls_create
+#define MPID_Thread_tls_create MPIDU_Thread_tls_create
/*@
MPID_Thread_tls_destroy - destroy a thread local storage space
@@ -281,7 +283,7 @@ M*/
The destroy function associated with the thread local storage will not
called after the space has been destroyed.
@*/
-#define MPID_Thread_tls_destroy MPIU_Thread_tls_destroy
+#define MPID_Thread_tls_destroy MPIDU_Thread_tls_destroy
/*@
MPID_Thread_tls_set - associate a value with the current thread in the
@@ -291,7 +293,7 @@ M*/
+ tls - thread local storage space
- value - value to associate with current thread
@*/
-#define MPID_Thread_tls_set MPIU_Thread_tls_set
+#define MPID_Thread_tls_set MPIDU_Thread_tls_set
/*@
MPID_Thread_tls_get - obtain the value associated with the current thread
@@ -303,15 +305,15 @@ M*/
Output Parameter:
. value - value associated with current thread
@*/
-#define MPID_Thread_tls_get MPIU_Thread_tls_get
+#define MPID_Thread_tls_get MPIDU_Thread_tls_get
-#define MPID_cc_t MPIU_cc_t
-#define MPID_cc_get MPIU_cc_get
-#define MPID_cc_set MPIU_cc_set
-#define MPID_cc_is_complete MPIU_cc_is_complete
-#define MPID_cc_incr MPIU_cc_incr
-#define MPID_cc_decr MPIU_cc_decr
+#define MPID_cc_t MPIDU_cc_t
+#define MPID_cc_get MPIDU_cc_get
+#define MPID_cc_set MPIDU_cc_set
+#define MPID_cc_is_complete MPIDU_cc_is_complete
+#define MPID_cc_incr MPIDU_cc_incr
+#define MPID_cc_decr MPIDU_cc_decr
-#endif /* !defined(MPID_THREAD_H_INCLUDED) */
+#endif /* !defined(MPID_THREAD_FALLBACK_H_INCLUDED) */
diff --git a/src/mpid/common/thread/Makefile.mk b/src/mpid/common/thread/Makefile.mk
index 5461ddd..2e1fe06 100644
--- a/src/mpid/common/thread/Makefile.mk
+++ b/src/mpid/common/thread/Makefile.mk
@@ -10,6 +10,6 @@ if BUILD_MPID_COMMON_THREAD
# so that clients can successfully include mpid_thread.h
AM_CPPFLAGS += -I$(top_srcdir)/src/mpid/common/thread
-noinst_HEADERS += src/mpid/common/thread/mpid_thread_fallback.h
+noinst_HEADERS += src/mpid/common/thread/mpidu_thread_fallback.h
endif BUILD_MPID_COMMON_THREAD
diff --git a/src/mpid/common/thread/mpid_thread_fallback.h b/src/mpid/common/thread/mpidu_thread_fallback.h
similarity index 67%
rename from src/mpid/common/thread/mpid_thread_fallback.h
rename to src/mpid/common/thread/mpidu_thread_fallback.h
index 09af49f..ebfb180 100644
--- a/src/mpid/common/thread/mpid_thread_fallback.h
+++ b/src/mpid/common/thread/mpidu_thread_fallback.h
@@ -4,8 +4,8 @@
* See COPYRIGHT in top-level directory.
*/
-#if !defined(MPID_THREAD_H_INCLUDED)
-#define MPID_THREAD_H_INCLUDED
+#if !defined(MPIDU_THREAD_H_INCLUDED)
+#define MPIDU_THREAD_H_INCLUDED
#include "mpiutil.h"
@@ -58,11 +58,12 @@ g * MPI_FINALIZED, MPI_GET_COUNT, MPI_GET_ELEMENTS, MPI_GRAPH_GET,
* state. Such situations should be avoided where possible.
*/
-typedef MPIU_Thread_mutex_t MPID_Thread_mutex_t;
-typedef MPIU_Thread_cond_t MPID_Thread_cond_t;
-typedef MPIU_Thread_id_t MPID_Thread_id_t;
-typedef MPIU_Thread_tls_t MPID_Thread_tls_t;
-typedef MPIU_Thread_func_t MPID_Thread_func_t;
+typedef MPIU_Thread_mutex_t MPIDU_Thread_mutex_t;
+typedef MPIU_Thread_cond_t MPIDU_Thread_cond_t;
+typedef MPIU_Thread_id_t MPIDU_Thread_id_t;
+typedef MPIU_Thread_tls_t MPIDU_Thread_tls_t;
+typedef MPIU_Thread_func_t MPIDU_Thread_func_t;
+typedef MPIU_Thread_tls_exit_func_t MPIDU_Thread_tls_exit_func_t;
/*M MPIU_THREAD_CS_ENTER - Enter a named critical section
@@ -71,7 +72,7 @@ typedef MPIU_Thread_func_t MPID_Thread_func_t;
- _context - A context (typically an object) of the critical section
M*/
-#define MPID_THREAD_CS_ENTER MPIU_THREAD_CS_ENTER
+#define MPIDU_THREAD_CS_ENTER MPIU_THREAD_CS_ENTER
/*M MPIU_THREAD_CS_EXIT - Exit a named critical section
@@ -80,7 +81,7 @@ M*/
- _context - A context (typically an object) of the critical section
M*/
-#define MPID_THREAD_CS_EXIT MPIU_THREAD_CS_EXIT
+#define MPIDU_THREAD_CS_EXIT MPIU_THREAD_CS_EXIT
/*M MPIU_THREAD_CS_YIELD - Temporarily release a critical section and yield
to other threads
@@ -90,13 +91,13 @@ M*/
- _context - A context (typically an object) of the critical section
M*/
-#define MPID_THREAD_CS_YIELD MPIU_THREAD_CS_YIELD
+#define MPIDU_THREAD_CS_YIELD MPIU_THREAD_CS_YIELD
-#define MPID_THREAD_CHECK_BEGIN MPIU_THREAD_CHECK_BEGIN
-#define MPID_THREAD_CHECK_END MPIU_THREAD_CHECK_END
+#define MPIDU_THREAD_CHECK_BEGIN MPIU_THREAD_CHECK_BEGIN
+#define MPIDU_THREAD_CHECK_END MPIU_THREAD_CHECK_END
/*@
- MPID_Thread_create - create a new thread
+ MPIDU_Thread_create - create a new thread
Input Parameters:
+ func - function to run in new thread
@@ -110,23 +111,23 @@ M*/
The thread is created in a detach state, meaning that is may not be waited upon. If another thread needs to wait for this
thread to complete, the threads must provide their own synchronization mechanism.
@*/
-#define MPID_Thread_create MPIU_Thread_create
+#define MPIDU_Thread_create MPIU_Thread_create
/*@
- MPID_Thread_exit - exit from the current thread
+ MPIDU_Thread_exit - exit from the current thread
@*/
-#define MPID_Thread_exit MPIU_Thread_exit
+#define MPIDU_Thread_exit MPIU_Thread_exit
/*@
- MPID_Thread_self - get the identifier of the current thread
+ MPIDU_Thread_self - get the identifier of the current thread
Output Parameter:
. id - identifier of current thread
@*/
-#define MPID_Thread_self MPIU_Thread_self
+#define MPIDU_Thread_self MPIU_Thread_self
/*@
- MPID_Thread_same - compare two threads identifiers to see if refer to the same thread
+ MPIDU_Thread_same - compare two threads identifiers to see if refer to the same thread
Input Parameters:
+ id1 - first identifier
@@ -135,28 +136,28 @@ M*/
Output Parameter:
. same - TRUE if the two threads identifiers refer to the same thread; FALSE otherwise
@*/
-#define MPID_Thread_same MPIU_Thread_same
+#define MPIDU_Thread_same MPIU_Thread_same
/*@
- MPID_Thread_yield - voluntarily relinquish the CPU, giving other threads an opportunity to run
+ MPIDU_Thread_yield - voluntarily relinquish the CPU, giving other threads an opportunity to run
@*/
-#define MPID_Thread_same MPIU_Thread_same
+#define MPIDU_Thread_same MPIU_Thread_same
/*
* Mutexes
*/
/*@
- MPID_Thread_mutex_create - create a new mutex
+ MPIDU_Thread_mutex_create - create a new mutex
Output Parameters:
+ mutex - mutex
- err - error code (non-zero indicates an error has occurred)
@*/
-#define MPID_Thread_mutex_create MPIU_Thread_mutex_create
+#define MPIDU_Thread_mutex_create MPIU_Thread_mutex_create
/*@
- MPID_Thread_mutex_destroy - destroy an existing mutex
+ MPIDU_Thread_mutex_destroy - destroy an existing mutex
Input Parameter:
. mutex - mutex
@@ -164,26 +165,26 @@ M*/
Output Parameter:
. err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred
@*/
-#define MPID_Thread_mutex_destroy MPIU_Thread_mutex_destroy
+#define MPIDU_Thread_mutex_destroy MPIU_Thread_mutex_destroy
/*@
- MPID_Thread_lock - acquire a mutex
+ MPIDU_Thread_lock - acquire a mutex
Input Parameter:
. mutex - mutex
@*/
-#define MPID_Thread_mutex_lock MPIU_Thread_mutex_lock
+#define MPIDU_Thread_mutex_lock MPIU_Thread_mutex_lock
/*@
- MPID_Thread_unlock - release a mutex
+ MPIDU_Thread_unlock - release a mutex
Input Parameter:
. mutex - mutex
@*/
-#define MPID_Thread_mutex_unlock MPIU_Thread_mutex_unlock
+#define MPIDU_Thread_mutex_unlock MPIU_Thread_mutex_unlock
/*@
- MPID_Thread_mutex_trylock - try to acquire a mutex, but return even if unsuccessful
+ MPIDU_Thread_mutex_trylock - try to acquire a mutex, but return even if unsuccessful
Input Parameter:
. mutex - mutex
@@ -191,23 +192,23 @@ M*/
Output Parameter:
. flag - flag
@*/
-#define MPID_Thread_mutex_trylock MPIU_Thread_mutex_trylock
+#define MPIDU_Thread_mutex_trylock MPIU_Thread_mutex_trylock
/*
* Condition Variables
*/
/*@
- MPID_Thread_cond_create - create a new condition variable
+ MPIDU_Thread_cond_create - create a new condition variable
Output Parameters:
+ cond - condition variable
- err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred
@*/
-#define MPID_Thread_cond_create MPIU_Thread_cond_create
+#define MPIDU_Thread_cond_create MPIU_Thread_cond_create
/*@
- MPID_Thread_cond_destroy - destroy an existinga condition variable
+ MPIDU_Thread_cond_destroy - destroy an existinga condition variable
Input Parameter:
. cond - condition variable
@@ -216,10 +217,10 @@ M*/
. err - location to store the error code; pointer may be NULL; error is zero
for success, non-zero if a failure occurred
@*/
-#define MPID_Thread_cond_destroy MPIU_Thread_cond_destroy
+#define MPIDU_Thread_cond_destroy MPIU_Thread_cond_destroy
/*@
- MPID_Thread_cond_wait - wait (block) on a condition variable
+ MPIDU_Thread_cond_wait - wait (block) on a condition variable
Input Parameters:
+ cond - condition variable
@@ -232,29 +233,29 @@ M*/
has changed in a way that warrants letting the
thread proceed.
@*/
-#define MPID_Thread_cond_wait MPIU_Thread_cond_wait
+#define MPIDU_Thread_cond_wait MPIU_Thread_cond_wait
/*@
- MPID_Thread_cond_broadcast - release all threads currently waiting on a condition variable
+ MPIDU_Thread_cond_broadcast - release all threads currently waiting on a condition variable
Input Parameter:
. cond - condition variable
@*/
-#define MPID_Thread_cond_broadcast MPIU_Thread_cond_broadcast
+#define MPIDU_Thread_cond_broadcast MPIU_Thread_cond_broadcast
/*@
- MPID_Thread_cond_signal - release one thread currently waitng on a condition variable
+ MPIDU_Thread_cond_signal - release one thread currently waitng on a condition variable
Input Parameter:
. cond - condition variable
@*/
-#define MPID_Thread_cond_signal MPIU_Thread_cond_signal
+#define MPIDU_Thread_cond_signal MPIU_Thread_cond_signal
/*
* Thread Local Storage
*/
/*@
- MPID_Thread_tls_create - create a thread local storage space
+ MPIDU_Thread_tls_create - create a thread local storage space
Input Parameter:
. exit_func - function to be called when the thread exists; may be NULL if a
@@ -265,10 +266,10 @@ M*/
- err - location to store the error code; pointer may be NULL; error is zero
for success, non-zero if a failure occurred
@*/
-#define MPID_Thread_tls_create MPIU_Thread_tls_create
+#define MPIDU_Thread_tls_create MPIU_Thread_tls_create
/*@
- MPID_Thread_tls_destroy - destroy a thread local storage space
+ MPIDU_Thread_tls_destroy - destroy a thread local storage space
Input Parameter:
. tls - thread local storage space to be destroyed
@@ -281,20 +282,20 @@ M*/
The destroy function associated with the thread local storage will not
called after the space has been destroyed.
@*/
-#define MPID_Thread_tls_destroy MPIU_Thread_tls_destroy
+#define MPIDU_Thread_tls_destroy MPIU_Thread_tls_destroy
/*@
- MPID_Thread_tls_set - associate a value with the current thread in the
+ MPIDU_Thread_tls_set - associate a value with the current thread in the
thread local storage space
Input Parameters:
+ tls - thread local storage space
- value - value to associate with current thread
@*/
-#define MPID_Thread_tls_set MPIU_Thread_tls_set
+#define MPIDU_Thread_tls_set MPIU_Thread_tls_set
/*@
- MPID_Thread_tls_get - obtain the value associated with the current thread
+ MPIDU_Thread_tls_get - obtain the value associated with the current thread
from the thread local storage space
Input Parameter:
@@ -303,15 +304,15 @@ M*/
Output Parameter:
. value - value associated with current thread
@*/
-#define MPID_Thread_tls_get MPIU_Thread_tls_get
+#define MPIDU_Thread_tls_get MPIU_Thread_tls_get
-#define MPID_cc_t MPIU_cc_t
-#define MPID_cc_get MPIU_cc_get
-#define MPID_cc_set MPIU_cc_set
-#define MPID_cc_is_complete MPIU_cc_is_complete
-#define MPID_cc_incr MPIU_cc_incr
-#define MPID_cc_decr MPIU_cc_decr
+#define MPIDU_cc_t MPIU_cc_t
+#define MPIDU_cc_get MPIU_cc_get
+#define MPIDU_cc_set MPIU_cc_set
+#define MPIDU_cc_is_complete MPIU_cc_is_complete
+#define MPIDU_cc_incr MPIU_cc_incr
+#define MPIDU_cc_decr MPIU_cc_decr
-#endif /* !defined(MPID_THREAD_H_INCLUDED) */
+#endif /* !defined(MPIDU_THREAD_H_INCLUDED) */
http://git.mpich.org/mpich.git/commitdiff/51b0295efd74dc4316791b60700e9aed3…
commit 51b0295efd74dc4316791b60700e9aed32fe914d
Author: Charles J Archer <charles.j.archer(a)intel.com>
Date: Mon Aug 17 16:03:18 2015 -0700
MPIR_THREAD_GLOBAL_MUTEX --> MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX
Signed-off-by: Pavan Balaji <balaji(a)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 67981cd..7368276 100644
--- a/src/binding/fortran/use_mpi/create_f90_complex.c
+++ b/src/binding/fortran/use_mpi/create_f90_complex.c
@@ -80,7 +80,7 @@ int MPI_Type_create_f90_complex( int precision, int range, MPI_Datatype *newtype
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_F90_COMPLEX);
/* ... body of routine ... */
@@ -126,7 +126,7 @@ int MPI_Type_create_f90_complex( int precision, int range, MPI_Datatype *newtype
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CREATE_F90_COMPLEX);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/binding/fortran/use_mpi/create_f90_int.c b/src/binding/fortran/use_mpi/create_f90_int.c
index 4bff608..db705a2 100644
--- a/src/binding/fortran/use_mpi/create_f90_int.c
+++ b/src/binding/fortran/use_mpi/create_f90_int.c
@@ -74,7 +74,7 @@ int MPI_Type_create_f90_integer( int range, MPI_Datatype *newtype )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_F90_INTEGER);
/* ... body of routine ... */
@@ -109,7 +109,7 @@ int MPI_Type_create_f90_integer( int range, MPI_Datatype *newtype )
/* ... end of body of routine ... */
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CREATE_F90_INTEGER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/binding/fortran/use_mpi/create_f90_real.c b/src/binding/fortran/use_mpi/create_f90_real.c
index 11b5ebd..77f6d42 100644
--- a/src/binding/fortran/use_mpi/create_f90_real.c
+++ b/src/binding/fortran/use_mpi/create_f90_real.c
@@ -79,7 +79,7 @@ int MPI_Type_create_f90_real( int precision, int range, MPI_Datatype *newtype )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_F90_REAL);
/* ... body of routine ... */
@@ -123,7 +123,7 @@ int MPI_Type_create_f90_real( int precision, int range, MPI_Datatype *newtype )
/* ... end of body of routine ... */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CREATE_F90_REAL);
return mpi_errno;
fn_fail:
diff --git a/src/glue/romio/glue_romio.c b/src/glue/romio/glue_romio.c
index 87a3125..9d0971f 100644
--- a/src/glue/romio/glue_romio.c
+++ b/src/glue/romio/glue_romio.c
@@ -41,12 +41,12 @@ int MPIR_Ext_assert_fail(const char *cond, const char *file_name, int line_num)
* threading strategies. */
void MPIR_Ext_cs_enter_global(void)
{
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
}
void MPIR_Ext_cs_exit_global(void)
{
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
}
/* This routine is for a thread to yield control when the thread is waiting for
@@ -55,7 +55,7 @@ void MPIR_Ext_cs_exit_global(void)
void MPIR_Ext_cs_yield_global_if_progress_blocked(void)
{
/* TODO: check whether the progress engine is blocked */
- MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
}
/* will consider MPI_DATATYPE_NULL to be an error */
diff --git a/src/mpi/attr/attr_delete.c b/src/mpi/attr/attr_delete.c
index 42bd6ea..07d6777 100644
--- a/src/mpi/attr/attr_delete.c
+++ b/src/mpi/attr/attr_delete.c
@@ -62,7 +62,7 @@ int MPI_Attr_delete(MPI_Comm comm, int keyval)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ATTR_DELETE);
/* Validate parameters, especially handles needing to be converted */
@@ -105,7 +105,7 @@ int MPI_Attr_delete(MPI_Comm comm, int keyval)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ATTR_DELETE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/attr_get.c b/src/mpi/attr/attr_get.c
index e75baa8..77f8abc 100644
--- a/src/mpi/attr/attr_get.c
+++ b/src/mpi/attr/attr_get.c
@@ -80,7 +80,7 @@ int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ATTR_GET);
/* Validate parameters, especially handles needing to be converted */
@@ -130,7 +130,7 @@ int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ATTR_GET);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/attr_put.c b/src/mpi/attr/attr_put.c
index 83b084b..4a1c53a 100644
--- a/src/mpi/attr/attr_put.c
+++ b/src/mpi/attr/attr_put.c
@@ -79,7 +79,7 @@ int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ATTR_PUT);
/* Validate parameters, especially handles needing to be converted */
@@ -121,7 +121,7 @@ int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ATTR_PUT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/attrutil.c b/src/mpi/attr/attrutil.c
index ca6b166..b9abbe6 100644
--- a/src/mpi/attr/attrutil.c
+++ b/src/mpi/attr/attrutil.c
@@ -327,9 +327,9 @@ MPIR_Attr_copy_c_proxy(
/* user functions might call other MPI functions, so we need to
* release the lock here. This is safe to do as GLOBAL is not at
* all recursive in our implementation. */
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
ret = user_function(handle, keyval, extra_state, attrib_val, attrib_copy, flag);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return ret;
}
@@ -357,9 +357,9 @@ MPIR_Attr_delete_c_proxy(
/* user functions might call other MPI functions, so we need to
* release the lock here. This is safe to do as GLOBAL is not at
* all recursive in our implementation. */
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
ret = user_function(handle, keyval, attrib_val, extra_state);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return ret;
}
diff --git a/src/mpi/attr/comm_create_keyval.c b/src/mpi/attr/comm_create_keyval.c
index 72a2762..7b888f7 100644
--- a/src/mpi/attr/comm_create_keyval.c
+++ b/src/mpi/attr/comm_create_keyval.c
@@ -130,7 +130,7 @@ int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function *comm_copy_attr_fn,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_CREATE_KEYVAL);
/* Validate parameters and objects (post conversion) */
@@ -153,7 +153,7 @@ int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function *comm_copy_attr_fn,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_CREATE_KEYVAL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/comm_delete_attr.c b/src/mpi/attr/comm_delete_attr.c
index 27232e9..575fe14 100644
--- a/src/mpi/attr/comm_delete_attr.c
+++ b/src/mpi/attr/comm_delete_attr.c
@@ -114,7 +114,7 @@ int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_DELETE_ATTR);
/* Validate parameters, especially handles needing to be converted */
@@ -159,7 +159,7 @@ int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_DELETE_ATTR);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/comm_free_keyval.c b/src/mpi/attr/comm_free_keyval.c
index 1701603..ef4f6b8 100644
--- a/src/mpi/attr/comm_free_keyval.c
+++ b/src/mpi/attr/comm_free_keyval.c
@@ -78,7 +78,7 @@ int MPI_Comm_free_keyval(int *comm_keyval)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_FREE_KEYVAL);
/* Validate parameters, especially handles needing to be converted */
@@ -122,7 +122,7 @@ int MPI_Comm_free_keyval(int *comm_keyval)
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_FREE_KEYVAL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/attr/comm_get_attr.c b/src/mpi/attr/comm_get_attr.c
index 2ea495d..74cebc1 100644
--- a/src/mpi/attr/comm_get_attr.c
+++ b/src/mpi/attr/comm_get_attr.c
@@ -300,9 +300,9 @@ int MPIR_CommGetAttr_fort(MPI_Comm comm, int comm_keyval, void *attribute_val,
{
int mpi_errno;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
mpi_errno = MPIR_CommGetAttr(comm, comm_keyval, attribute_val, flag, outAttrType);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
}
@@ -355,7 +355,7 @@ int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_GET_ATTR);
/* Instead, ask for a desired type. */
@@ -366,7 +366,7 @@ int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_GET_ATTR);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/comm_set_attr.c b/src/mpi/attr/comm_set_attr.c
index 0a46a08..bca3a6e 100644
--- a/src/mpi/attr/comm_set_attr.c
+++ b/src/mpi/attr/comm_set_attr.c
@@ -115,7 +115,7 @@ int MPIR_CommSetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_COMM_SET_ATTR);
/* Validate parameters, especially handles needing to be converted */
@@ -161,7 +161,7 @@ int MPIR_CommSetAttr( MPI_Comm comm, int comm_keyval, void *attribute_val,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_COMM_SET_ATTR);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
@@ -222,7 +222,7 @@ int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val)
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_COMM_SET_ATTR);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_SET_ATTR);
/* Validate parameters, especially handles needing to be converted */
@@ -267,7 +267,7 @@ int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_SET_ATTR);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/keyval_create.c b/src/mpi/attr/keyval_create.c
index bb99160..0b90d3f 100644
--- a/src/mpi/attr/keyval_create.c
+++ b/src/mpi/attr/keyval_create.c
@@ -76,7 +76,7 @@ int MPI_Keyval_create(MPI_Copy_function *copy_fn,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_KEYVAL_CREATE);
/* Validate parameters and objects (post conversion) */
@@ -99,7 +99,7 @@ int MPI_Keyval_create(MPI_Copy_function *copy_fn,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_KEYVAL_CREATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/keyval_free.c b/src/mpi/attr/keyval_free.c
index af36597..2ec22d0 100644
--- a/src/mpi/attr/keyval_free.c
+++ b/src/mpi/attr/keyval_free.c
@@ -63,7 +63,7 @@ int MPI_Keyval_free(int *keyval)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_KEYVAL_FREE);
# ifdef HAVE_ERROR_CHECKING
{
@@ -101,7 +101,7 @@ int MPI_Keyval_free(int *keyval)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_KEYVAL_FREE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/type_create_keyval.c b/src/mpi/attr/type_create_keyval.c
index b680e77..251fa22 100644
--- a/src/mpi/attr/type_create_keyval.c
+++ b/src/mpi/attr/type_create_keyval.c
@@ -81,7 +81,7 @@ int MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_KEYVAL);
/* Validate parameters and objects (post conversion) */
@@ -128,7 +128,7 @@ int MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CREATE_KEYVAL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/type_delete_attr.c b/src/mpi/attr/type_delete_attr.c
index cfd26b6..42ba73c 100644
--- a/src/mpi/attr/type_delete_attr.c
+++ b/src/mpi/attr/type_delete_attr.c
@@ -61,7 +61,7 @@ int MPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval)
/* The thread lock prevents a valid attr delete on the same datatype
but in a different thread from causing problems */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_DELETE_ATTR);
/* Validate parameters, especially handles needing to be converted */
@@ -145,7 +145,7 @@ int MPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_DELETE_ATTR);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/type_free_keyval.c b/src/mpi/attr/type_free_keyval.c
index a7b070a..af60949 100644
--- a/src/mpi/attr/type_free_keyval.c
+++ b/src/mpi/attr/type_free_keyval.c
@@ -58,7 +58,7 @@ int MPI_Type_free_keyval(int *type_keyval)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_FREE_KEYVAL);
/* Validate parameters, especially handles needing to be converted */
@@ -106,7 +106,7 @@ int MPI_Type_free_keyval(int *type_keyval)
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_FREE_KEYVAL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/attr/type_get_attr.c b/src/mpi/attr/type_get_attr.c
index 851226e..a7d736a 100644
--- a/src/mpi/attr/type_get_attr.c
+++ b/src/mpi/attr/type_get_attr.c
@@ -42,7 +42,7 @@ int MPIR_TypeGetAttr( MPI_Datatype datatype, int type_keyval, void *attribute_va
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_TYPE_GET_ATTR);
/* Validate parameters, especially handles needing to be converted */
@@ -130,7 +130,7 @@ int MPIR_TypeGetAttr( MPI_Datatype datatype, int type_keyval, void *attribute_va
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_TYPE_GET_ATTR);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/attr/type_set_attr.c b/src/mpi/attr/type_set_attr.c
index 1027311..e36badd 100644
--- a/src/mpi/attr/type_set_attr.c
+++ b/src/mpi/attr/type_set_attr.c
@@ -42,7 +42,7 @@ int MPIR_TypeSetAttr(MPI_Datatype datatype, int type_keyval, void *attribute_val
/* The thread lock prevents a valid attr delete on the same datatype
but in a different thread from causing problems */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_TYPE_SET_ATTR);
/* Validate parameters, especially handles needing to be converted */
@@ -141,7 +141,7 @@ int MPIR_TypeSetAttr(MPI_Datatype datatype, int type_keyval, void *attribute_val
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_TYPE_SET_ATTR);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/win_create_keyval.c b/src/mpi/attr/win_create_keyval.c
index 02f4868..96cb8ec 100644
--- a/src/mpi/attr/win_create_keyval.c
+++ b/src/mpi/attr/win_create_keyval.c
@@ -81,7 +81,7 @@ int MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_CREATE_KEYVAL);
/* Validate parameters and objects (post conversion) */
@@ -124,7 +124,7 @@ int MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_CREATE_KEYVAL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/win_delete_attr.c b/src/mpi/attr/win_delete_attr.c
index b035f94..bfea642 100644
--- a/src/mpi/attr/win_delete_attr.c
+++ b/src/mpi/attr/win_delete_attr.c
@@ -62,7 +62,7 @@ int MPI_Win_delete_attr(MPI_Win win, int win_keyval)
/* The thread lock prevents a valid attr delete on the same window
but in a different thread from causing problems */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_DELETE_ATTR);
/* Validate parameters, especially handles needing to be converted */
@@ -144,7 +144,7 @@ int MPI_Win_delete_attr(MPI_Win win, int win_keyval)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_DELETE_ATTR);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/attr/win_free_keyval.c b/src/mpi/attr/win_free_keyval.c
index 573cf7d..67d516c 100644
--- a/src/mpi/attr/win_free_keyval.c
+++ b/src/mpi/attr/win_free_keyval.c
@@ -59,7 +59,7 @@ int MPI_Win_free_keyval(int *win_keyval)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_FREE_KEYVAL);
/* Validate parameters, especially handles needing to be converted */
@@ -107,7 +107,7 @@ int MPI_Win_free_keyval(int *win_keyval)
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_FREE_KEYVAL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/attr/win_get_attr.c b/src/mpi/attr/win_get_attr.c
index d40ee7f..bf0e94c 100644
--- a/src/mpi/attr/win_get_attr.c
+++ b/src/mpi/attr/win_get_attr.c
@@ -38,7 +38,7 @@ int MPIR_WinGetAttr( MPI_Win win, int win_keyval, void *attribute_val,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_WIN_GET_ATTR);
/* Validate parameters, especially handles needing to be converted */
@@ -198,7 +198,7 @@ int MPIR_WinGetAttr( MPI_Win win, int win_keyval, void *attribute_val,
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_WIN_GET_ATTR);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/attr/win_set_attr.c b/src/mpi/attr/win_set_attr.c
index f36c9c1..94d7dc0 100644
--- a/src/mpi/attr/win_set_attr.c
+++ b/src/mpi/attr/win_set_attr.c
@@ -42,7 +42,7 @@ int MPIR_WinSetAttr( MPI_Win win, int win_keyval, void *attribute_val,
/* The thread lock prevents a valid attr delete on the same window
but in a different thread from causing problems */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_WIN_SET_ATTR);
/* Validate parameters, especially handles needing to be converted */
@@ -147,7 +147,7 @@ int MPIR_WinSetAttr( MPI_Win win, int win_keyval, void *attribute_val,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_WIN_SET_ATTR);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/allgather.c b/src/mpi/coll/allgather.c
index 9d138fc..fc9483e 100644
--- a/src/mpi/coll/allgather.c
+++ b/src/mpi/coll/allgather.c
@@ -907,7 +907,7 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_ALLGATHER);
/* Validate parameters, especially handles needing to be converted */
@@ -989,7 +989,7 @@ int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_ALLGATHER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/allgatherv.c b/src/mpi/coll/allgatherv.c
index 0bbf12d..fc642df 100644
--- a/src/mpi/coll/allgatherv.c
+++ b/src/mpi/coll/allgatherv.c
@@ -1018,7 +1018,7 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_ALLGATHERV);
/* Validate parameters, especially handles needing to be converted */
@@ -1111,7 +1111,7 @@ int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_ALLGATHERV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/allreduce.c b/src/mpi/coll/allreduce.c
index e6b11bf..be26c3d 100644
--- a/src/mpi/coll/allreduce.c
+++ b/src/mpi/coll/allreduce.c
@@ -821,7 +821,7 @@ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_ALLREDUCE);
/* Validate parameters, especially handles needing to be converted */
@@ -896,7 +896,7 @@ int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count,
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_ALLREDUCE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index 4cda343..19332f4 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -650,7 +650,7 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_ALLTOALL);
/* Validate parameters, especially handles needing to be converted */
@@ -726,7 +726,7 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_ALLTOALL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/alltoallv.c b/src/mpi/coll/alltoallv.c
index 23b6a57..7e0135b 100644
--- a/src/mpi/coll/alltoallv.c
+++ b/src/mpi/coll/alltoallv.c
@@ -441,7 +441,7 @@ int MPI_Alltoallv(const void *sendbuf, const int *sendcounts,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_ALLTOALLV);
/* Validate parameters, especially handles needing to be converted */
@@ -533,7 +533,7 @@ int MPI_Alltoallv(const void *sendbuf, const int *sendcounts,
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_ALLTOALLV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/alltoallw.c b/src/mpi/coll/alltoallw.c
index 89e426e..4a8f315 100644
--- a/src/mpi/coll/alltoallw.c
+++ b/src/mpi/coll/alltoallw.c
@@ -436,7 +436,7 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[],
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_ALLTOALLW);
/* Validate parameters, especially handles needing to be converted */
@@ -539,7 +539,7 @@ int MPI_Alltoallw(const void *sendbuf, const int sendcounts[],
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_ALLTOALLW);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/barrier.c b/src/mpi/coll/barrier.c
index 2a0bbce..5db5a5a 100644
--- a/src/mpi/coll/barrier.c
+++ b/src/mpi/coll/barrier.c
@@ -375,7 +375,7 @@ int MPI_Barrier( MPI_Comm comm )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_BARRIER);
/* Validate parameters, especially handles needing to be converted */
@@ -414,7 +414,7 @@ int MPI_Barrier( MPI_Comm comm )
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_BARRIER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/bcast.c b/src/mpi/coll/bcast.c
index da6bb05..64536a3 100644
--- a/src/mpi/coll/bcast.c
+++ b/src/mpi/coll/bcast.c
@@ -1530,7 +1530,7 @@ int MPI_Bcast( void *buffer, int count, MPI_Datatype datatype, int root,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_BCAST);
/* Validate parameters, especially handles needing to be converted */
@@ -1589,7 +1589,7 @@ int MPI_Bcast( void *buffer, int count, MPI_Datatype datatype, int root,
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_BCAST);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/exscan.c b/src/mpi/coll/exscan.c
index f387b21..a57bd42 100644
--- a/src/mpi/coll/exscan.c
+++ b/src/mpi/coll/exscan.c
@@ -310,7 +310,7 @@ int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_EXSCAN);
/* Validate parameters, especially handles needing to be converted */
@@ -389,7 +389,7 @@ int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_EXSCAN);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/gather.c b/src/mpi/coll/gather.c
index 5d87714..e6387d3 100644
--- a/src/mpi/coll/gather.c
+++ b/src/mpi/coll/gather.c
@@ -779,7 +779,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_GATHER);
/* Validate parameters, especially handles needing to be converted */
@@ -893,7 +893,7 @@ int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_GATHER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/gatherv.c b/src/mpi/coll/gatherv.c
index a2da9a1..ae6cd29 100644
--- a/src/mpi/coll/gatherv.c
+++ b/src/mpi/coll/gatherv.c
@@ -292,7 +292,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_GATHERV);
/* Validate parameters, especially handles needing to be converted */
@@ -424,7 +424,7 @@ int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_GATHERV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/iallgather.c b/src/mpi/coll/iallgather.c
index 7a4257c..abebbe6 100644
--- a/src/mpi/coll/iallgather.c
+++ b/src/mpi/coll/iallgather.c
@@ -667,7 +667,7 @@ int MPI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IALLGATHER);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IALLGATHER);
/* Validate parameters, especially handles needing to be converted */
@@ -739,7 +739,7 @@ int MPI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IALLGATHER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/iallgatherv.c b/src/mpi/coll/iallgatherv.c
index 896dba4..e737956 100644
--- a/src/mpi/coll/iallgatherv.c
+++ b/src/mpi/coll/iallgatherv.c
@@ -771,7 +771,7 @@ int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, v
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IALLGATHERV);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IALLGATHERV);
/* Validate parameters, especially handles needing to be converted */
@@ -851,7 +851,7 @@ int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, v
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IALLGATHERV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/iallreduce.c b/src/mpi/coll/iallreduce.c
index b91f148..1eb80e5 100644
--- a/src/mpi/coll/iallreduce.c
+++ b/src/mpi/coll/iallreduce.c
@@ -723,7 +723,7 @@ int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count,
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IALLREDUCE);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IALLREDUCE);
/* Validate parameters, especially handles needing to be converted */
@@ -796,7 +796,7 @@ int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IALLREDUCE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/ialltoall.c b/src/mpi/coll/ialltoall.c
index 0cbfa11..f2b47e8 100644
--- a/src/mpi/coll/ialltoall.c
+++ b/src/mpi/coll/ialltoall.c
@@ -596,7 +596,7 @@ int MPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IALLTOALL);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IALLTOALL);
/* Validate parameters, especially handles needing to be converted */
@@ -670,7 +670,7 @@ int MPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IALLTOALL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/ialltoallv.c b/src/mpi/coll/ialltoallv.c
index 3a26f0f..977c725 100644
--- a/src/mpi/coll/ialltoallv.c
+++ b/src/mpi/coll/ialltoallv.c
@@ -329,7 +329,7 @@ int MPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispl
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IALLTOALLV);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IALLTOALLV);
/* Validate parameters, especially handles needing to be converted */
@@ -405,7 +405,7 @@ int MPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispl
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IALLTOALLV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/ialltoallw.c b/src/mpi/coll/ialltoallw.c
index 398a440..0060ad2 100644
--- a/src/mpi/coll/ialltoallw.c
+++ b/src/mpi/coll/ialltoallw.c
@@ -334,7 +334,7 @@ int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispl
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IALLTOALLW);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IALLTOALLW);
/* Validate parameters, especially handles needing to be converted */
@@ -393,7 +393,7 @@ int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispl
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IALLTOALLW);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/ibarrier.c b/src/mpi/coll/ibarrier.c
index 9319416..1d9826d 100644
--- a/src/mpi/coll/ibarrier.c
+++ b/src/mpi/coll/ibarrier.c
@@ -250,7 +250,7 @@ int MPI_Ibarrier(MPI_Comm comm, MPI_Request *request)
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IBARRIER);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IBARRIER);
/* Validate parameters, especially handles needing to be converted */
@@ -292,7 +292,7 @@ int MPI_Ibarrier(MPI_Comm comm, MPI_Request *request)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IBARRIER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/ibcast.c b/src/mpi/coll/ibcast.c
index 529aa1b..819bb93 100644
--- a/src/mpi/coll/ibcast.c
+++ b/src/mpi/coll/ibcast.c
@@ -932,7 +932,7 @@ int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Com
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IBCAST);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IBCAST);
/* Validate parameters, especially handles needing to be converted */
@@ -986,7 +986,7 @@ int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Com
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IBCAST);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/iexscan.c b/src/mpi/coll/iexscan.c
index 4d489c0..d828e48 100644
--- a/src/mpi/coll/iexscan.c
+++ b/src/mpi/coll/iexscan.c
@@ -261,7 +261,7 @@ int MPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IEXSCAN);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IEXSCAN);
/* Validate parameters, especially handles needing to be converted */
@@ -327,7 +327,7 @@ int MPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IEXSCAN);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/igather.c b/src/mpi/coll/igather.c
index eb8c63f..961e73d 100644
--- a/src/mpi/coll/igather.c
+++ b/src/mpi/coll/igather.c
@@ -593,7 +593,7 @@ int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IGATHER);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IGATHER);
/* Validate parameters, especially handles needing to be converted */
@@ -715,7 +715,7 @@ int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IGATHER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/igatherv.c b/src/mpi/coll/igatherv.c
index fa4f367..547fcc3 100644
--- a/src/mpi/coll/igatherv.c
+++ b/src/mpi/coll/igatherv.c
@@ -193,7 +193,7 @@ int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IGATHERV);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IGATHERV);
/* Validate parameters, especially handles needing to be converted */
@@ -325,7 +325,7 @@ int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IGATHERV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/ired_scat.c b/src/mpi/coll/ired_scat.c
index 70617e5..0245e05 100644
--- a/src/mpi/coll/ired_scat.c
+++ b/src/mpi/coll/ired_scat.c
@@ -1089,7 +1089,7 @@ int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IREDUCE_SCATTER);
i = 0;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IREDUCE_SCATTER);
/* Validate parameters, especially handles needing to be converted */
@@ -1159,7 +1159,7 @@ int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IREDUCE_SCATTER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/ired_scat_block.c b/src/mpi/coll/ired_scat_block.c
index 067d397..22233c9 100644
--- a/src/mpi/coll/ired_scat_block.c
+++ b/src/mpi/coll/ired_scat_block.c
@@ -992,7 +992,7 @@ int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf,
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IREDUCE_SCATTER_BLOCK);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IREDUCE_SCATTER_BLOCK);
/* Validate parameters, especially handles needing to be converted */
@@ -1057,7 +1057,7 @@ int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IREDUCE_SCATTER_BLOCK);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/ireduce.c b/src/mpi/coll/ireduce.c
index e208727..805f4e5 100644
--- a/src/mpi/coll/ireduce.c
+++ b/src/mpi/coll/ireduce.c
@@ -840,7 +840,7 @@ int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IREDUCE);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IREDUCE);
/* Validate parameters, especially handles needing to be converted */
@@ -922,7 +922,7 @@ int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IREDUCE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/iscan.c b/src/mpi/coll/iscan.c
index 4acd698..fb98f52 100644
--- a/src/mpi/coll/iscan.c
+++ b/src/mpi/coll/iscan.c
@@ -395,7 +395,7 @@ int MPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype dataty
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_ISCAN);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ISCAN);
/* Validate parameters, especially handles needing to be converted */
@@ -464,7 +464,7 @@ int MPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype dataty
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ISCAN);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/iscatter.c b/src/mpi/coll/iscatter.c
index d118e62..42be2d7 100644
--- a/src/mpi/coll/iscatter.c
+++ b/src/mpi/coll/iscatter.c
@@ -627,7 +627,7 @@ int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_ISCATTER);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ISCATTER);
/* Validate parameters, especially handles needing to be converted */
@@ -737,7 +737,7 @@ int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ISCATTER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/iscatterv.c b/src/mpi/coll/iscatterv.c
index aa3c3b8..549e2f5 100644
--- a/src/mpi/coll/iscatterv.c
+++ b/src/mpi/coll/iscatterv.c
@@ -199,7 +199,7 @@ int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_ISCATTERV);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ISCATTERV);
/* Validate parameters, especially handles needing to be converted */
@@ -339,7 +339,7 @@ int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ISCATTERV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/op_commutative.c b/src/mpi/coll/op_commutative.c
index f6542de..34d7a9e 100644
--- a/src/mpi/coll/op_commutative.c
+++ b/src/mpi/coll/op_commutative.c
@@ -60,7 +60,7 @@ int MPI_Op_commutative(MPI_Op op, int *commute)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_OP_COMMUTATIVE);
MPID_Op_get_ptr( op, op_ptr );
@@ -92,7 +92,7 @@ int MPI_Op_commutative(MPI_Op op, int *commute)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_OP_COMMUTATIVE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/coll/op_create.c b/src/mpi/coll/op_create.c
index adcbaee..49d22e0 100644
--- a/src/mpi/coll/op_create.c
+++ b/src/mpi/coll/op_create.c
@@ -108,7 +108,7 @@ int MPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_OP_CREATE);
/* ... body of routine ... */
@@ -134,7 +134,7 @@ int MPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_OP_CREATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/op_free.c b/src/mpi/coll/op_free.c
index 9dff0e8..ccff7cc 100644
--- a/src/mpi/coll/op_free.c
+++ b/src/mpi/coll/op_free.c
@@ -64,7 +64,7 @@ int MPI_Op_free(MPI_Op *op)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_OP_FREE);
MPID_Op_get_ptr( *op, op_ptr );
@@ -100,7 +100,7 @@ int MPI_Op_free(MPI_Op *op)
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_OP_FREE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/coll/red_scat.c b/src/mpi/coll/red_scat.c
index 9406325..2d92ff6 100644
--- a/src/mpi/coll/red_scat.c
+++ b/src/mpi/coll/red_scat.c
@@ -1125,7 +1125,7 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_REDUCE_SCATTER);
/* Validate parameters, especially handles needing to be converted */
@@ -1206,7 +1206,7 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_REDUCE_SCATTER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/red_scat_block.c b/src/mpi/coll/red_scat_block.c
index f342e98..8436582 100644
--- a/src/mpi/coll/red_scat_block.c
+++ b/src/mpi/coll/red_scat_block.c
@@ -1097,7 +1097,7 @@ int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_REDUCE_SCATTER_BLOCK);
/* Validate parameters, especially handles needing to be converted */
@@ -1172,7 +1172,7 @@ int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_REDUCE_SCATTER_BLOCK);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/reduce.c b/src/mpi/coll/reduce.c
index f68e317..0c9b6f7 100644
--- a/src/mpi/coll/reduce.c
+++ b/src/mpi/coll/reduce.c
@@ -1132,7 +1132,7 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_REDUCE);
/* Validate parameters, especially handles needing to be converted */
@@ -1247,7 +1247,7 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_REDUCE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/reduce_local.c b/src/mpi/coll/reduce_local.c
index f232dd7..eb77d0b 100644
--- a/src/mpi/coll/reduce_local.c
+++ b/src/mpi/coll/reduce_local.c
@@ -151,7 +151,7 @@ int MPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_REDUCE_LOCAL);
/* Validate parameters */
@@ -190,7 +190,7 @@ int MPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_REDUCE_LOCAL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/scan.c b/src/mpi/coll/scan.c
index 2e50c75..9a1fad4 100644
--- a/src/mpi/coll/scan.c
+++ b/src/mpi/coll/scan.c
@@ -494,7 +494,7 @@ int MPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_SCAN);
/* Validate parameters, especially handles needing to be converted */
@@ -566,7 +566,7 @@ int MPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_SCAN);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/scatter.c b/src/mpi/coll/scatter.c
index 992dfa2..56022f4 100644
--- a/src/mpi/coll/scatter.c
+++ b/src/mpi/coll/scatter.c
@@ -678,7 +678,7 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_SCATTER);
/* Validate parameters, especially handles needing to be converted */
@@ -793,7 +793,7 @@ int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_SCATTER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/coll/scatterv.c b/src/mpi/coll/scatterv.c
index 4adc33c..67bf285 100644
--- a/src/mpi/coll/scatterv.c
+++ b/src/mpi/coll/scatterv.c
@@ -239,7 +239,7 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_COLL_FUNC_ENTER(MPID_STATE_MPI_SCATTERV);
/* Validate parameters, especially handles needing to be converted */
@@ -375,7 +375,7 @@ int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs,
fn_exit:
MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_SCATTERV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_agree.c b/src/mpi/comm/comm_agree.c
index 61eeeb8..29a0935 100644
--- a/src/mpi/comm/comm_agree.c
+++ b/src/mpi/comm/comm_agree.c
@@ -136,7 +136,7 @@ int MPIX_Comm_agree(MPI_Comm comm, int *flag)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIX_COMM_AGREE);
/* Validate parameters, and convert MPI object handles to object pointers */
@@ -172,7 +172,7 @@ int MPIX_Comm_agree(MPI_Comm comm, int *flag)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPIX_COMM_AGREE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_compare.c b/src/mpi/comm/comm_compare.c
index 11bf2fb..0cc5788 100644
--- a/src/mpi/comm/comm_compare.c
+++ b/src/mpi/comm/comm_compare.c
@@ -77,7 +77,7 @@ int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_COMPARE);
# ifdef HAVE_ERROR_CHECKING
@@ -180,7 +180,7 @@ int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_COMPARE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/comm/comm_create.c b/src/mpi/comm/comm_create.c
index a5c31ac..182b509 100644
--- a/src/mpi/comm/comm_create.c
+++ b/src/mpi/comm/comm_create.c
@@ -491,7 +491,7 @@ int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_CREATE);
/* Validate parameters, and convert MPI object handles to object pointers */
@@ -553,7 +553,7 @@ int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_CREATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_create_group.c b/src/mpi/comm/comm_create_group.c
index a2923ff..a07c5b7 100644
--- a/src/mpi/comm/comm_create_group.c
+++ b/src/mpi/comm/comm_create_group.c
@@ -158,7 +158,7 @@ int MPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int tag, MPI_Comm * ne
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_CREATE_GROUP);
/* Validate parameters, and convert MPI object handles to object pointers */
@@ -216,7 +216,7 @@ int MPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int tag, MPI_Comm * ne
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_CREATE_GROUP);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_dup.c b/src/mpi/comm/comm_dup.c
index 3d5285f..bd1f522 100644
--- a/src/mpi/comm/comm_dup.c
+++ b/src/mpi/comm/comm_dup.c
@@ -124,7 +124,7 @@ int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_DUP);
/* Validate parameters, especially handles needing to be converted */
@@ -166,7 +166,7 @@ int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_DUP);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_dup_with_info.c b/src/mpi/comm/comm_dup_with_info.c
index acd1ac1..a13a032 100644
--- a/src/mpi/comm/comm_dup_with_info.c
+++ b/src/mpi/comm/comm_dup_with_info.c
@@ -94,7 +94,7 @@ int MPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm * newcomm)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_DUP_WITH_INFO);
/* Validate parameters, especially handles needing to be converted */
@@ -137,7 +137,7 @@ int MPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm * newcomm)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_DUP_WITH_INFO);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_failure_ack.c b/src/mpi/comm/comm_failure_ack.c
index 3f03313..94f3bc5 100644
--- a/src/mpi/comm/comm_failure_ack.c
+++ b/src/mpi/comm/comm_failure_ack.c
@@ -58,7 +58,7 @@ int MPIX_Comm_failure_ack( MPI_Comm comm )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIX_COMM_FAILURE_ACK);
/* Validate parameters, especially handles needing to be converted */
@@ -98,7 +98,7 @@ int MPIX_Comm_failure_ack( MPI_Comm comm )
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPIX_COMM_FAILURE_ACK);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_failure_get_acked.c b/src/mpi/comm/comm_failure_get_acked.c
index 74a6bb8..f16b3bc 100644
--- a/src/mpi/comm/comm_failure_get_acked.c
+++ b/src/mpi/comm/comm_failure_get_acked.c
@@ -62,7 +62,7 @@ int MPIX_Comm_failure_get_acked( MPI_Comm comm, MPI_Group *failedgrp )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIX_COMM_FAILURE_GET_ACKED);
/* Validate parameters, especially handles needing to be converted */
@@ -102,7 +102,7 @@ int MPIX_Comm_failure_get_acked( MPI_Comm comm, MPI_Group *failedgrp )
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPIX_COMM_FAILURE_GET_ACKED);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_free.c b/src/mpi/comm/comm_free.c
index 3c2f8bb..ba2cedc 100644
--- a/src/mpi/comm/comm_free.c
+++ b/src/mpi/comm/comm_free.c
@@ -82,7 +82,7 @@ int MPI_Comm_free(MPI_Comm *comm)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_FREE);
/* Validate parameters, especially handles needing to be converted */
@@ -132,7 +132,7 @@ int MPI_Comm_free(MPI_Comm *comm)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_FREE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_get_info.c b/src/mpi/comm/comm_get_info.c
index 4408112..0c33785 100644
--- a/src/mpi/comm/comm_get_info.c
+++ b/src/mpi/comm/comm_get_info.c
@@ -84,7 +84,7 @@ int MPI_Comm_get_info(MPI_Comm comm, MPI_Info * info_used)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_GET_INFO);
/* Validate parameters, especially handles needing to be converted */
@@ -126,7 +126,7 @@ int MPI_Comm_get_info(MPI_Comm comm, MPI_Info * info_used)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_GET_INFO);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_group.c b/src/mpi/comm/comm_group.c
index 16b0748..9976164 100644
--- a/src/mpi/comm/comm_group.c
+++ b/src/mpi/comm/comm_group.c
@@ -115,7 +115,7 @@ int MPI_Comm_group(MPI_Comm comm, MPI_Group *group)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_GROUP);
/* Validate parameters, especially handles needing to be converted */
@@ -156,7 +156,7 @@ int MPI_Comm_group(MPI_Comm comm, MPI_Group *group)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_GROUP);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_idup.c b/src/mpi/comm/comm_idup.c
index c59893c..6f3b96c 100644
--- a/src/mpi/comm/comm_idup.c
+++ b/src/mpi/comm/comm_idup.c
@@ -100,7 +100,7 @@ int MPI_Comm_idup(MPI_Comm comm, MPI_Comm *newcomm, MPI_Request *request)
MPID_Request *dreq = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_COMM_IDUP);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_IDUP);
/* Validate parameters, especially handles needing to be converted */
@@ -150,7 +150,7 @@ int MPI_Comm_idup(MPI_Comm comm, MPI_Comm *newcomm, MPI_Request *request)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_IDUP);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_rank.c b/src/mpi/comm/comm_rank.c
index 9960e87..97d07aa 100644
--- a/src/mpi/comm/comm_rank.c
+++ b/src/mpi/comm/comm_rank.c
@@ -57,7 +57,7 @@ int MPI_Comm_rank( MPI_Comm comm, int *rank )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_RANK);
/* Validate parameters, especially handles needing to be converted */
@@ -99,7 +99,7 @@ int MPI_Comm_rank( MPI_Comm comm, int *rank )
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_RANK);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/comm/comm_remote_group.c b/src/mpi/comm/comm_remote_group.c
index a655662..0e45d7a 100644
--- a/src/mpi/comm/comm_remote_group.c
+++ b/src/mpi/comm/comm_remote_group.c
@@ -105,7 +105,7 @@ int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_REMOTE_GROUP);
/* Validate parameters, especially handles needing to be converted */
@@ -152,7 +152,7 @@ int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_REMOTE_GROUP);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_revoke.c b/src/mpi/comm/comm_revoke.c
index d29414d..5526742 100644
--- a/src/mpi/comm/comm_revoke.c
+++ b/src/mpi/comm/comm_revoke.c
@@ -58,7 +58,7 @@ int MPIX_Comm_revoke(MPI_Comm comm)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIX_COMM_REVOKE);
/* Validate parameters, especially handles needing to be converted */
@@ -97,7 +97,7 @@ int MPIX_Comm_revoke(MPI_Comm comm)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPIX_COMM_REVOKE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/comm/comm_set_info.c b/src/mpi/comm/comm_set_info.c
index fed8349..9cc1f67 100644
--- a/src/mpi/comm/comm_set_info.c
+++ b/src/mpi/comm/comm_set_info.c
@@ -104,7 +104,7 @@ int MPI_Comm_set_info(MPI_Comm comm, MPI_Info info)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_SET_INFO);
/* Validate parameters, especially handles needing to be converted */
@@ -143,7 +143,7 @@ int MPI_Comm_set_info(MPI_Comm comm, MPI_Info info)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_SET_INFO);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_shrink.c b/src/mpi/comm/comm_shrink.c
index 21f11aa..b21bff1 100644
--- a/src/mpi/comm/comm_shrink.c
+++ b/src/mpi/comm/comm_shrink.c
@@ -140,7 +140,7 @@ int MPIX_Comm_shrink(MPI_Comm comm, MPI_Comm *newcomm)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIX_COMM_SHRINK);
/* Validate parameters, and convert MPI object handles to object pointers */
@@ -180,7 +180,7 @@ int MPIX_Comm_shrink(MPI_Comm comm, MPI_Comm *newcomm)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPIX_COMM_SHRINK);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_split.c b/src/mpi/comm/comm_split.c
index 3d03ef4..a20dabc 100644
--- a/src/mpi/comm/comm_split.c
+++ b/src/mpi/comm/comm_split.c
@@ -441,7 +441,7 @@ int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_SPLIT);
/* Validate parameters, especially handles needing to be converted */
@@ -486,7 +486,7 @@ int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_SPLIT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/comm_split_type.c b/src/mpi/comm/comm_split_type.c
index 3d6f2a5..2372634 100644
--- a/src/mpi/comm/comm_split_type.c
+++ b/src/mpi/comm/comm_split_type.c
@@ -102,7 +102,7 @@ int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_SPLIT_TYPE);
/* Validate parameters, especially handles needing to be converted */
@@ -150,7 +150,7 @@ int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_SPLIT_TYPE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/contextid.c b/src/mpi/comm/contextid.c
index c9a6cf8..6cace52 100644
--- a/src/mpi/comm/contextid.c
+++ b/src/mpi/comm/contextid.c
@@ -475,7 +475,7 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
/* FIXME: Do we need to do an GLOBAL yield here?
* When we do a collective operation, we anyway yield
* for other others */
- MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_THREAD_CS_YIELD(POBJ, MPIR_THREAD_CTX_MUTEX);
}
}
@@ -504,7 +504,7 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
/* FIXME: Do we need to do an GLOBAL yield here?
* When we do a collective operation, we anyway yield
* for other others */
- MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_THREAD_CS_YIELD(POBJ, MPIR_THREAD_CTX_MUTEX);
}
}
@@ -513,7 +513,7 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
/* FIXME: Do we need to do an GLOBAL yield here? When we
* do a collective operation, we anyway yield for other
* others */
- MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_THREAD_CS_YIELD(POBJ, MPIR_THREAD_CTX_MUTEX);
}
MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_CTX_MUTEX);
diff --git a/src/mpi/comm/intercomm_create.c b/src/mpi/comm/intercomm_create.c
index d5c2769..10c689c 100644
--- a/src/mpi/comm/intercomm_create.c
+++ b/src/mpi/comm/intercomm_create.c
@@ -427,7 +427,7 @@ int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INTERCOMM_CREATE);
/* Validate parameters, especially handles needing to be converted */
@@ -525,7 +525,7 @@ int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INTERCOMM_CREATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/comm/intercomm_merge.c b/src/mpi/comm/intercomm_merge.c
index 55efe38..1affdad 100644
--- a/src/mpi/comm/intercomm_merge.c
+++ b/src/mpi/comm/intercomm_merge.c
@@ -260,7 +260,7 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INTERCOMM_MERGE);
MPIU_THREADPRIV_GET;
@@ -343,7 +343,7 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INTERCOMM_MERGE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/get_elements_x.c b/src/mpi/datatype/get_elements_x.c
index c779da6..128a2e5 100644
--- a/src/mpi/datatype/get_elements_x.c
+++ b/src/mpi/datatype/get_elements_x.c
@@ -386,7 +386,7 @@ int MPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, MPI_Coun
int mpi_errno = MPI_SUCCESS;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_GET_ELEMENTS_X);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GET_ELEMENTS_X);
/* Validate parameters, especially handles needing to be converted */
@@ -433,7 +433,7 @@ int MPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, MPI_Coun
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GET_ELEMENTS_X);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/register_datarep.c b/src/mpi/datatype/register_datarep.c
index c5124a1..e12dfe5 100644
--- a/src/mpi/datatype/register_datarep.c
+++ b/src/mpi/datatype/register_datarep.c
@@ -60,7 +60,7 @@ int MPI_Register_datarep(char *datarep,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_REGISTER_DATAREP);
/* Validate parameters and objects (post conversion) */
@@ -85,7 +85,7 @@ int MPI_Register_datarep(char *datarep,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_REGISTER_DATAREP);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/status_set_elements_x.c b/src/mpi/datatype/status_set_elements_x.c
index dc81bdd..a0229a5 100644
--- a/src/mpi/datatype/status_set_elements_x.c
+++ b/src/mpi/datatype/status_set_elements_x.c
@@ -78,7 +78,7 @@ int MPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype, MPI_Cou
int mpi_errno = MPI_SUCCESS;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_STATUS_SET_ELEMENTS_X);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_STATUS_SET_ELEMENTS_X);
/* Validate parameters, especially handles needing to be converted */
@@ -125,7 +125,7 @@ int MPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype, MPI_Cou
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_STATUS_SET_ELEMENTS_X);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_commit.c b/src/mpi/datatype/type_commit.c
index 10b4c5a..0ad46ea 100644
--- a/src/mpi/datatype/type_commit.c
+++ b/src/mpi/datatype/type_commit.c
@@ -78,7 +78,7 @@ int MPI_Type_commit(MPI_Datatype *datatype)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_COMMIT);
/* Validate parameters, especially handles needing to be converted */
@@ -120,7 +120,7 @@ int MPI_Type_commit(MPI_Datatype *datatype)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_COMMIT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_contiguous.c b/src/mpi/datatype/type_contiguous.c
index 81fc72b..20c6393 100644
--- a/src/mpi/datatype/type_contiguous.c
+++ b/src/mpi/datatype/type_contiguous.c
@@ -146,7 +146,7 @@ int MPI_Type_contiguous(int count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CONTIGUOUS);
# ifdef HAVE_ERROR_CHECKING
@@ -177,7 +177,7 @@ int MPI_Type_contiguous(int count,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CONTIGUOUS);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_create_darray.c b/src/mpi/datatype/type_create_darray.c
index 87b1ef4..8ca9074 100644
--- a/src/mpi/datatype/type_create_darray.c
+++ b/src/mpi/datatype/type_create_darray.c
@@ -392,7 +392,7 @@ int MPI_Type_create_darray(int size,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_DARRAY);
/* Validate parameters, especially handles needing to be converted */
@@ -745,7 +745,7 @@ int MPI_Type_create_darray(int size,
fn_exit:
MPIU_CHKLMEM_FREEALL();
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CREATE_DARRAY);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_create_hindexed.c b/src/mpi/datatype/type_create_hindexed.c
index c0c9ed1..b417a80 100644
--- a/src/mpi/datatype/type_create_hindexed.c
+++ b/src/mpi/datatype/type_create_hindexed.c
@@ -71,7 +71,7 @@ int MPI_Type_create_hindexed(int count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_HINDEXED);
# ifdef HAVE_ERROR_CHECKING
@@ -139,7 +139,7 @@ int MPI_Type_create_hindexed(int count,
fn_exit:
MPIU_CHKLMEM_FREEALL();
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CREATE_HINDEXED);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_create_hindexed_block.c b/src/mpi/datatype/type_create_hindexed_block.c
index ad4ac1e..5df8878 100644
--- a/src/mpi/datatype/type_create_hindexed_block.c
+++ b/src/mpi/datatype/type_create_hindexed_block.c
@@ -106,7 +106,7 @@ int MPI_Type_create_hindexed_block(int count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_HINDEXED_BLOCK);
/* Validate parameters and objects */
@@ -147,7 +147,7 @@ int MPI_Type_create_hindexed_block(int count,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CREATE_HINDEXED_BLOCK);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_create_hvector.c b/src/mpi/datatype/type_create_hvector.c
index 21f33e2..eb6c13d 100644
--- a/src/mpi/datatype/type_create_hvector.c
+++ b/src/mpi/datatype/type_create_hvector.c
@@ -68,7 +68,7 @@ int MPI_Type_create_hvector(int count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_HVECTOR);
# ifdef HAVE_ERROR_CHECKING
@@ -121,7 +121,7 @@ int MPI_Type_create_hvector(int count,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CREATE_HVECTOR);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_create_indexed_block.c b/src/mpi/datatype/type_create_indexed_block.c
index 6946344..856a4ad 100644
--- a/src/mpi/datatype/type_create_indexed_block.c
+++ b/src/mpi/datatype/type_create_indexed_block.c
@@ -140,7 +140,7 @@ int MPI_Type_create_indexed_block(int count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_INDEXED_BLOCK);
/* Validate parameters and objects */
@@ -180,7 +180,7 @@ int MPI_Type_create_indexed_block(int count,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CREATE_INDEXED_BLOCK);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_create_resized.c b/src/mpi/datatype/type_create_resized.c
index e4786f5..3c0714a 100644
--- a/src/mpi/datatype/type_create_resized.c
+++ b/src/mpi/datatype/type_create_resized.c
@@ -65,7 +65,7 @@ int MPI_Type_create_resized(MPI_Datatype oldtype,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_RESIZED);
/* Get handles to MPI objects. */
@@ -115,7 +115,7 @@ int MPI_Type_create_resized(MPI_Datatype oldtype,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CREATE_RESIZED);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_create_struct.c b/src/mpi/datatype/type_create_struct.c
index acbcd11..6d0de18 100644
--- a/src/mpi/datatype/type_create_struct.c
+++ b/src/mpi/datatype/type_create_struct.c
@@ -119,7 +119,7 @@ int MPI_Type_create_struct(int count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_STRUCT);
# ifdef HAVE_ERROR_CHECKING
@@ -162,7 +162,7 @@ int MPI_Type_create_struct(int count,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CREATE_STRUCT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_create_subarray.c b/src/mpi/datatype/type_create_subarray.c
index c8648e8..509979e 100644
--- a/src/mpi/datatype/type_create_subarray.c
+++ b/src/mpi/datatype/type_create_subarray.c
@@ -88,7 +88,7 @@ int MPI_Type_create_subarray(int ndims,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_CREATE_SUBARRAY);
# ifdef HAVE_ERROR_CHECKING
@@ -333,7 +333,7 @@ int MPI_Type_create_subarray(int ndims,
fn_exit:
MPIU_CHKLMEM_FREEALL();
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_CREATE_SUBARRAY);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_dup.c b/src/mpi/datatype/type_dup.c
index 5b53f7b..ef87c52 100644
--- a/src/mpi/datatype/type_dup.c
+++ b/src/mpi/datatype/type_dup.c
@@ -58,7 +58,7 @@ int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_DUP);
/* Validate parameters, especially handles needing to be converted */
@@ -134,7 +134,7 @@ int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_DUP);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_free.c b/src/mpi/datatype/type_free.c
index 0f6e086..dc68238 100644
--- a/src/mpi/datatype/type_free.c
+++ b/src/mpi/datatype/type_free.c
@@ -77,7 +77,7 @@ int MPI_Type_free(MPI_Datatype *datatype)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_FREE);
/* Validate parameters, especially handles needing to be converted */
@@ -146,7 +146,7 @@ int MPI_Type_free(MPI_Datatype *datatype)
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_FREE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/datatype/type_get_contents.c b/src/mpi/datatype/type_get_contents.c
index bc4a2c7..e3a37e7 100644
--- a/src/mpi/datatype/type_get_contents.c
+++ b/src/mpi/datatype/type_get_contents.c
@@ -67,7 +67,7 @@ int MPI_Type_get_contents(MPI_Datatype datatype,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_GET_CONTENTS);
/* Validate parameters, especially handles needing to be converted */
@@ -142,7 +142,7 @@ int MPI_Type_get_contents(MPI_Datatype datatype,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_GET_CONTENTS);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_get_extent_x.c b/src/mpi/datatype/type_get_extent_x.c
index 62381b3..0221f06 100644
--- a/src/mpi/datatype/type_get_extent_x.c
+++ b/src/mpi/datatype/type_get_extent_x.c
@@ -73,7 +73,7 @@ int MPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *exten
int mpi_errno = MPI_SUCCESS;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_GET_EXTENT_X);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_GET_EXTENT_X);
/* Validate parameters, especially handles needing to be converted */
@@ -118,7 +118,7 @@ int MPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *exten
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_GET_EXTENT_X);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_get_name.c b/src/mpi/datatype/type_get_name.c
index 123329c..2d78d3a 100644
--- a/src/mpi/datatype/type_get_name.c
+++ b/src/mpi/datatype/type_get_name.c
@@ -146,7 +146,7 @@ int MPIR_Datatype_init_names(void)
MPID_Datatype *datatype_ptr = NULL;
static volatile int needsInit = 1;
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (needsInit) {
/* Make sure that the basics have datatype structures allocated
* and filled in for them. They are just integers prior to this
@@ -204,7 +204,7 @@ int MPIR_Datatype_init_names(void)
fn_fail:
/* empty statement */ ;
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
}
#endif
diff --git a/src/mpi/datatype/type_get_true_extent_x.c b/src/mpi/datatype/type_get_true_extent_x.c
index 6f4453d..b16ab01 100644
--- a/src/mpi/datatype/type_get_true_extent_x.c
+++ b/src/mpi/datatype/type_get_true_extent_x.c
@@ -73,7 +73,7 @@ int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *true_lb, MPI_Co
int mpi_errno = MPI_SUCCESS;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_GET_TRUE_EXTENT_X);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_GET_TRUE_EXTENT_X);
/* Validate parameters, especially handles needing to be converted */
@@ -118,7 +118,7 @@ int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *true_lb, MPI_Co
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_GET_TRUE_EXTENT_X);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_hindexed.c b/src/mpi/datatype/type_hindexed.c
index 1486504..e6ea6f0 100644
--- a/src/mpi/datatype/type_hindexed.c
+++ b/src/mpi/datatype/type_hindexed.c
@@ -96,7 +96,7 @@ int MPI_Type_hindexed(int count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_HINDEXED);
# ifdef HAVE_ERROR_CHECKING
@@ -165,7 +165,7 @@ int MPI_Type_hindexed(int count,
fn_exit:
MPIU_CHKLMEM_FREEALL();
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_HINDEXED);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_hvector.c b/src/mpi/datatype/type_hvector.c
index 50a5ed5..c04f71f 100644
--- a/src/mpi/datatype/type_hvector.c
+++ b/src/mpi/datatype/type_hvector.c
@@ -104,7 +104,7 @@ int MPI_Type_hvector(int count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_HVECTOR);
# ifdef HAVE_ERROR_CHECKING
@@ -138,7 +138,7 @@ int MPI_Type_hvector(int count,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_HVECTOR);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_indexed.c b/src/mpi/datatype/type_indexed.c
index 0cbd90e..6a3b8c3 100644
--- a/src/mpi/datatype/type_indexed.c
+++ b/src/mpi/datatype/type_indexed.c
@@ -145,7 +145,7 @@ int MPI_Type_indexed(int count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_INDEXED);
/* Validate parameters and objects (post conversion) */
@@ -187,7 +187,7 @@ int MPI_Type_indexed(int count,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_INDEXED);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_match_size.c b/src/mpi/datatype/type_match_size.c
index bc5f71d..1689c99 100644
--- a/src/mpi/datatype/type_match_size.c
+++ b/src/mpi/datatype/type_match_size.c
@@ -89,7 +89,7 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype)
MPIR_ERRTEST_INITIALIZED_ORDIE();
/* FIXME: This routine does not require the global critical section */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_MATCH_SIZE);
MPIU_THREADPRIV_GET;
@@ -187,7 +187,7 @@ int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_MATCH_SIZE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_size_x.c b/src/mpi/datatype/type_size_x.c
index 626b44f..1a5a555 100644
--- a/src/mpi/datatype/type_size_x.c
+++ b/src/mpi/datatype/type_size_x.c
@@ -69,7 +69,7 @@ int MPI_Type_size_x(MPI_Datatype datatype, MPI_Count *size)
int mpi_errno = MPI_SUCCESS;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_TYPE_SIZE_X);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_SIZE_X);
/* Validate parameters, especially handles needing to be converted */
@@ -115,7 +115,7 @@ int MPI_Type_size_x(MPI_Datatype datatype, MPI_Count *size)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_SIZE_X);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_struct.c b/src/mpi/datatype/type_struct.c
index c1d8e4f..6471e92 100644
--- a/src/mpi/datatype/type_struct.c
+++ b/src/mpi/datatype/type_struct.c
@@ -159,7 +159,7 @@ int MPI_Type_struct(int count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_STRUCT);
/* Validate parameters, especially handles needing to be converted */
@@ -202,7 +202,7 @@ int MPI_Type_struct(int count,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_STRUCT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/datatype/type_vector.c b/src/mpi/datatype/type_vector.c
index 4beb5ae..033a84b 100644
--- a/src/mpi/datatype/type_vector.c
+++ b/src/mpi/datatype/type_vector.c
@@ -107,7 +107,7 @@ int MPI_Type_vector(int count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_TYPE_VECTOR);
/* Validate parameters, especially handles needing to be converted */
@@ -140,7 +140,7 @@ int MPI_Type_vector(int count,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_TYPE_VECTOR);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/errhan/add_error_class.c b/src/mpi/errhan/add_error_class.c
index b4382c2..9b3c232 100644
--- a/src/mpi/errhan/add_error_class.c
+++ b/src/mpi/errhan/add_error_class.c
@@ -54,7 +54,7 @@ int MPI_Add_error_class(int *errorclass)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ADD_ERROR_CLASS);
/* Validate parameters, especially handles needing to be converted */
@@ -84,7 +84,7 @@ int MPI_Add_error_class(int *errorclass)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ADD_ERROR_CLASS);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/errhan/add_error_code.c b/src/mpi/errhan/add_error_code.c
index 08f114e..f560a05 100644
--- a/src/mpi/errhan/add_error_code.c
+++ b/src/mpi/errhan/add_error_code.c
@@ -57,7 +57,7 @@ int MPI_Add_error_code(int errorclass, int *errorcode)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ADD_ERROR_CODE);
/* Validate parameters, especially handles needing to be converted */
@@ -83,7 +83,7 @@ int MPI_Add_error_code(int errorclass, int *errorcode)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ADD_ERROR_CODE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/errhan/add_error_string.c b/src/mpi/errhan/add_error_string.c
index d814bad..d226f59 100644
--- a/src/mpi/errhan/add_error_string.c
+++ b/src/mpi/errhan/add_error_string.c
@@ -66,7 +66,7 @@ int MPI_Add_error_string(int errorcode, const char *string)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ADD_ERROR_STRING);
/* Validate parameters, especially handles needing to be converted */
@@ -89,7 +89,7 @@ int MPI_Add_error_string(int errorcode, const char *string)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ADD_ERROR_STRING);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/errhan/comm_create_errhandler.c b/src/mpi/errhan/comm_create_errhandler.c
index e736a55..5e30b74 100644
--- a/src/mpi/errhan/comm_create_errhandler.c
+++ b/src/mpi/errhan/comm_create_errhandler.c
@@ -89,7 +89,7 @@ int MPI_Comm_create_errhandler(MPI_Comm_errhandler_function *comm_errhandler_fn,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_CREATE_ERRHANDLER);
/* Validate parameters, especially handles needing to be converted */
@@ -113,7 +113,7 @@ int MPI_Comm_create_errhandler(MPI_Comm_errhandler_function *comm_errhandler_fn,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_CREATE_ERRHANDLER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/errhan/comm_get_errhandler.c b/src/mpi/errhan/comm_get_errhandler.c
index 2784712..f5e8bf3 100644
--- a/src/mpi/errhan/comm_get_errhandler.c
+++ b/src/mpi/errhan/comm_get_errhandler.c
@@ -74,7 +74,7 @@ int MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler *errhandler)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_GET_ERRHANDLER);
/* Validate parameters, especially handles needing to be converted */
@@ -119,7 +119,7 @@ int MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler *errhandler)
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_GET_ERRHANDLER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/errhan/comm_set_errhandler.c b/src/mpi/errhan/comm_set_errhandler.c
index 2b955aa..ec1d1de 100644
--- a/src/mpi/errhan/comm_set_errhandler.c
+++ b/src/mpi/errhan/comm_set_errhandler.c
@@ -86,7 +86,7 @@ int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_SET_ERRHANDLER);
/* Validate parameters, especially handles needing to be converted */
@@ -131,7 +131,7 @@ int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler)
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_SET_ERRHANDLER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/errhan/errhandler_create.c b/src/mpi/errhan/errhandler_create.c
index ce055a7..cfde34d 100644
--- a/src/mpi/errhan/errhandler_create.c
+++ b/src/mpi/errhan/errhandler_create.c
@@ -69,7 +69,7 @@ int MPI_Errhandler_create(MPI_Handler_function *function,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ERRHANDLER_CREATE);
/* Validate parameters, especially handles needing to be converted */
@@ -92,7 +92,7 @@ int MPI_Errhandler_create(MPI_Handler_function *function,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ERRHANDLER_CREATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/errhan/errhandler_free.c b/src/mpi/errhan/errhandler_free.c
index ec3c6b3..78af5a2 100644
--- a/src/mpi/errhan/errhandler_free.c
+++ b/src/mpi/errhan/errhandler_free.c
@@ -57,7 +57,7 @@ int MPI_Errhandler_free(MPI_Errhandler *errhandler)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ERRHANDLER_FREE);
/* Validate parameters, especially handles needing to be converted */
@@ -101,7 +101,7 @@ int MPI_Errhandler_free(MPI_Errhandler *errhandler)
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ERRHANDLER_FREE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/errhan/errhandler_get.c b/src/mpi/errhan/errhandler_get.c
index 7e9f586..f9c8a76 100644
--- a/src/mpi/errhan/errhandler_get.c
+++ b/src/mpi/errhan/errhandler_get.c
@@ -70,7 +70,7 @@ int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ERRHANDLER_GET);
/* Validate parameters, especially handles needing to be converted */
@@ -115,7 +115,7 @@ int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler)
fn_exit:
# endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ERRHANDLER_GET);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
# ifdef HAVE_ERROR_CHECKING
diff --git a/src/mpi/errhan/errhandler_set.c b/src/mpi/errhan/errhandler_set.c
index 797afb5..33f6b3c 100644
--- a/src/mpi/errhan/errhandler_set.c
+++ b/src/mpi/errhan/errhandler_set.c
@@ -61,7 +61,7 @@ int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ERRHANDLER_SET);
/* Validate parameters, especially handles needing to be converted */
@@ -108,7 +108,7 @@ int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler)
fn_exit:
# endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ERRHANDLER_SET);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
# ifdef HAVE_ERROR_CHECKING
diff --git a/src/mpi/errhan/file_create_errhandler.c b/src/mpi/errhan/file_create_errhandler.c
index 31dd6c1..c34175c 100644
--- a/src/mpi/errhan/file_create_errhandler.c
+++ b/src/mpi/errhan/file_create_errhandler.c
@@ -57,7 +57,7 @@ int MPI_File_create_errhandler(MPI_File_errhandler_function *file_errhandler_fn,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_FILE_CREATE_ERRHANDLER);
/* Validate parameters, especially handles needing to be converted */
@@ -86,7 +86,7 @@ int MPI_File_create_errhandler(MPI_File_errhandler_function *file_errhandler_fn,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_FILE_CREATE_ERRHANDLER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/errhan/file_get_errhandler.c b/src/mpi/errhan/file_get_errhandler.c
index b13f97d..22ac73c 100644
--- a/src/mpi/errhan/file_get_errhandler.c
+++ b/src/mpi/errhan/file_get_errhandler.c
@@ -64,7 +64,7 @@ int MPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_FILE_GET_ERRHANDLER);
#ifdef MPI_MODE_RDONLY
@@ -107,7 +107,7 @@ int MPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler)
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_FILE_GET_ERRHANDLER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/errhan/win_create_errhandler.c b/src/mpi/errhan/win_create_errhandler.c
index d4a1d91..b26ecef 100644
--- a/src/mpi/errhan/win_create_errhandler.c
+++ b/src/mpi/errhan/win_create_errhandler.c
@@ -59,7 +59,7 @@ int MPI_Win_create_errhandler(MPI_Win_errhandler_function *win_errhandler_fn,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_CREATE_ERRHANDLER);
/* Validate parameters, especially handles needing to be converted */
@@ -89,7 +89,7 @@ int MPI_Win_create_errhandler(MPI_Win_errhandler_function *win_errhandler_fn,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_CREATE_ERRHANDLER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/errhan/win_get_errhandler.c b/src/mpi/errhan/win_get_errhandler.c
index 97b561f..9b686fd 100644
--- a/src/mpi/errhan/win_get_errhandler.c
+++ b/src/mpi/errhan/win_get_errhandler.c
@@ -59,7 +59,7 @@ int MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_GET_ERRHANDLER);
/* Validate parameters, especially handles needing to be converted */
@@ -112,7 +112,7 @@ int MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler)
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_GET_ERRHANDLER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/group/group_compare.c b/src/mpi/group/group_compare.c
index ae7b733..832c5ea 100644
--- a/src/mpi/group/group_compare.c
+++ b/src/mpi/group/group_compare.c
@@ -119,7 +119,7 @@ int MPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result)
/* The routines that setup the group data structures must be executed
within a mutex. As most of the group routines are not performance
critical, we simple run these routines within the SINGLE_CS */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_COMPARE);
/* Validate parameters, especially handles needing to be converted */
@@ -163,7 +163,7 @@ int MPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_COMPARE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/group/group_difference.c b/src/mpi/group/group_difference.c
index 4c18fd0..85dd0a0 100644
--- a/src/mpi/group/group_difference.c
+++ b/src/mpi/group/group_difference.c
@@ -146,7 +146,7 @@ int MPI_Group_difference(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_DIFFERENCE);
/* Validate parameters, especially handles needing to be converted */
@@ -191,7 +191,7 @@ int MPI_Group_difference(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_DIFFERENCE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/group/group_excl.c b/src/mpi/group/group_excl.c
index 701f45a..a8258f8 100644
--- a/src/mpi/group/group_excl.c
+++ b/src/mpi/group/group_excl.c
@@ -123,7 +123,7 @@ int MPI_Group_excl(MPI_Group group, int n, const int ranks[], MPI_Group *newgrou
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_EXCL);
/* Validate parameters, especially handles needing to be converted */
# ifdef HAVE_ERROR_CHECKING
@@ -172,7 +172,7 @@ int MPI_Group_excl(MPI_Group group, int n, const int ranks[], MPI_Group *newgrou
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_EXCL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/group/group_free.c b/src/mpi/group/group_free.c
index 2084bfd..a036cae 100644
--- a/src/mpi/group/group_free.c
+++ b/src/mpi/group/group_free.c
@@ -78,7 +78,7 @@ int MPI_Group_free(MPI_Group *group)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_FREE);
/* Validate parameters, especially handles needing to be converted */
@@ -128,7 +128,7 @@ int MPI_Group_free(MPI_Group *group)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_FREE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/group/group_incl.c b/src/mpi/group/group_incl.c
index 9e85e75..174ef34 100644
--- a/src/mpi/group/group_incl.c
+++ b/src/mpi/group/group_incl.c
@@ -109,7 +109,7 @@ int MPI_Group_incl(MPI_Group group, int n, const int ranks[], MPI_Group *newgrou
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_INCL);
/* Validate parameters, especially handles needing to be converted */
@@ -161,7 +161,7 @@ int MPI_Group_incl(MPI_Group group, int n, const int ranks[], MPI_Group *newgrou
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_INCL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/group/group_intersection.c b/src/mpi/group/group_intersection.c
index a6a3d81..01c7ed1 100644
--- a/src/mpi/group/group_intersection.c
+++ b/src/mpi/group/group_intersection.c
@@ -146,7 +146,7 @@ int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgro
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_INTERSECTION);
/* Validate parameters, especially handles needing to be converted */
@@ -191,7 +191,7 @@ int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgro
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_INTERSECTION);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/group/group_range_excl.c b/src/mpi/group/group_range_excl.c
index 3ca5d23..4f72b10 100644
--- a/src/mpi/group/group_range_excl.c
+++ b/src/mpi/group/group_range_excl.c
@@ -159,7 +159,7 @@ int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3],
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_RANGE_EXCL);
/* Validate parameters, especially handles needing to be converted */
@@ -208,7 +208,7 @@ int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3],
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_RANGE_EXCL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/group/group_range_incl.c b/src/mpi/group/group_range_incl.c
index d458739..61b71fd 100644
--- a/src/mpi/group/group_range_incl.c
+++ b/src/mpi/group/group_range_incl.c
@@ -138,7 +138,7 @@ int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3],
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_RANGE_INCL);
/* Validate parameters, especially handles needing to be converted */
@@ -184,7 +184,7 @@ int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3],
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_RANGE_INCL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/group/group_translate_ranks.c b/src/mpi/group/group_translate_ranks.c
index 07693d8..1145f48 100644
--- a/src/mpi/group/group_translate_ranks.c
+++ b/src/mpi/group/group_translate_ranks.c
@@ -150,7 +150,7 @@ int MPI_Group_translate_ranks(MPI_Group group1, int n, const int ranks1[],
/* The routines that setup the group data structures must be executed
within a mutex. As most of the group routines are not performance
critical, we simple run these routines within the SINGLE_CS */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_TRANSLATE_RANKS);
/* Validate parameters, especially handles needing to be converted */
@@ -210,7 +210,7 @@ int MPI_Group_translate_ranks(MPI_Group group1, int n, const int ranks1[],
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_TRANSLATE_RANKS);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/group/group_union.c b/src/mpi/group/group_union.c
index 65fd375..c026bb6 100644
--- a/src/mpi/group/group_union.c
+++ b/src/mpi/group/group_union.c
@@ -179,7 +179,7 @@ int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GROUP_UNION);
/* Validate parameters, especially handles needing to be converted */
@@ -224,7 +224,7 @@ int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GROUP_UNION);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/info/info_create.c b/src/mpi/info/info_create.c
index 7e14ee6..8a9d9cd 100644
--- a/src/mpi/info/info_create.c
+++ b/src/mpi/info/info_create.c
@@ -52,7 +52,7 @@ int MPI_Info_create( MPI_Info *info )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INFO_CREATE);
/* Validate parameters and objects (post conversion) */
@@ -80,7 +80,7 @@ int MPI_Info_create( MPI_Info *info )
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INFO_CREATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/info/info_delete.c b/src/mpi/info/info_delete.c
index 1ab1c17..a7a8ed1 100644
--- a/src/mpi/info/info_delete.c
+++ b/src/mpi/info/info_delete.c
@@ -52,7 +52,7 @@ int MPI_Info_delete( MPI_Info info, const char *key )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INFO_DELETE);
@@ -115,7 +115,7 @@ int MPI_Info_delete( MPI_Info info, const char *key )
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INFO_DELETE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/info/info_dup.c b/src/mpi/info/info_dup.c
index 165f0b2..6ff8479 100644
--- a/src/mpi/info/info_dup.c
+++ b/src/mpi/info/info_dup.c
@@ -99,7 +99,7 @@ int MPI_Info_dup( MPI_Info info, MPI_Info *newinfo )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INFO_DUP);
/* Validate parameters, especially handles needing to be converted */
@@ -140,7 +140,7 @@ int MPI_Info_dup( MPI_Info info, MPI_Info *newinfo )
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INFO_DUP);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/info/info_free.c b/src/mpi/info/info_free.c
index ed684a3..fad762b 100644
--- a/src/mpi/info/info_free.c
+++ b/src/mpi/info/info_free.c
@@ -55,7 +55,7 @@ int MPI_Info_free( MPI_Info *info )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INFO_FREE);
/* Validate parameters, especially handles needing to be converted */
@@ -96,7 +96,7 @@ int MPI_Info_free( MPI_Info *info )
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INFO_FREE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/info/info_get.c b/src/mpi/info/info_get.c
index 8046715..a4f4898 100644
--- a/src/mpi/info/info_get.c
+++ b/src/mpi/info/info_get.c
@@ -99,7 +99,7 @@ int MPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INFO_GET);
/* Validate parameters, especially handles needing to be converted */
@@ -152,7 +152,7 @@ int MPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INFO_GET);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/info/info_getn.c b/src/mpi/info/info_getn.c
index 9251264..ed07b6d 100644
--- a/src/mpi/info/info_getn.c
+++ b/src/mpi/info/info_getn.c
@@ -77,7 +77,7 @@ int MPI_Info_get_nkeys( MPI_Info info, int *nkeys )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INFO_GET_NKEYS);
/* Validate parameters, especially handles needing to be converted */
@@ -119,7 +119,7 @@ int MPI_Info_get_nkeys( MPI_Info info, int *nkeys )
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INFO_GET_NKEYS);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/info/info_getnth.c b/src/mpi/info/info_getnth.c
index 4a2bd3d..86a8bd8 100644
--- a/src/mpi/info/info_getnth.c
+++ b/src/mpi/info/info_getnth.c
@@ -88,7 +88,7 @@ int MPI_Info_get_nthkey( MPI_Info info, int n, char *key )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INFO_GET_NTHKEY);
/* Validate parameters, especially handles needing to be converted */
@@ -127,7 +127,7 @@ int MPI_Info_get_nthkey( MPI_Info info, int n, char *key )
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INFO_GET_NTHKEY);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/info/info_getvallen.c b/src/mpi/info/info_getvallen.c
index 696b411..be42cbd 100644
--- a/src/mpi/info/info_getvallen.c
+++ b/src/mpi/info/info_getvallen.c
@@ -83,7 +83,7 @@ int MPI_Info_get_valuelen( MPI_Info info, const char *key, int *valuelen, int *f
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INFO_GET_VALUELEN);
/* Validate parameters, especially handles needing to be converted */
@@ -136,7 +136,7 @@ int MPI_Info_get_valuelen( MPI_Info info, const char *key, int *valuelen, int *f
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INFO_GET_VALUELEN);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/info/info_set.c b/src/mpi/info/info_set.c
index f3260cd..0e839de 100644
--- a/src/mpi/info/info_set.c
+++ b/src/mpi/info/info_set.c
@@ -58,7 +58,7 @@ int MPI_Info_set( MPI_Info info, const char *key, const char *value )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INFO_SET);
/* Validate parameters, especially handles needing to be converted */
@@ -106,7 +106,7 @@ int MPI_Info_set( MPI_Info info, const char *key, const char *value )
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INFO_SET);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/init/abort.c b/src/mpi/init/abort.c
index acf5b59..c6ff359 100644
--- a/src/mpi/init/abort.c
+++ b/src/mpi/init/abort.c
@@ -86,7 +86,7 @@ int MPI_Abort(MPI_Comm comm, int errorcode)
since that could result in the Abort hanging if another routine is
hung holding the critical section. Also note the "not thread-safe"
comment in the description of MPI_Abort above. */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ABORT);
/* Validate parameters, especially handles needing to be converted */
@@ -144,7 +144,7 @@ int MPI_Abort(MPI_Comm comm, int errorcode)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ABORT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/init/async.c b/src/mpi/init/async.c
index 0294c6b..f9fc9cd 100644
--- a/src/mpi/init/async.c
+++ b/src/mpi/init/async.c
@@ -35,7 +35,7 @@ static void progress_fn(void * data)
/* Explicitly add CS_ENTER/EXIT since this thread is created from
* within an internal function and will call NMPI functions
* directly. */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* FIXME: We assume that waiting on some request forces progress
* on all requests. With fine-grained threads, will this still
@@ -65,7 +65,7 @@ static void progress_fn(void * data)
MPIU_Thread_cond_signal(&progress_cond, &mpi_errno);
MPIU_Assert(!mpi_errno);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return;
}
@@ -135,7 +135,7 @@ int MPIR_Finalize_async_thread(void)
MPIU_Assert(!mpi_errno);
/* XXX DJG why is this unlock/lock necessary? Should we just YIELD here or later? */
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIU_Thread_mutex_lock(&progress_mutex, &mpi_errno);
MPIU_Assert(!mpi_errno);
@@ -151,7 +151,7 @@ int MPIR_Finalize_async_thread(void)
mpi_errno = MPIR_Comm_free_impl(progress_comm_ptr);
MPIU_Assert(!mpi_errno);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIU_Thread_cond_destroy(&progress_cond, &mpi_errno);
MPIU_Assert(!mpi_errno);
diff --git a/src/mpi/init/finalize.c b/src/mpi/init/finalize.c
index 534090e..1b7eefa 100644
--- a/src/mpi/init/finalize.c
+++ b/src/mpi/init/finalize.c
@@ -151,7 +151,7 @@ int MPI_Finalize( void )
/* Note: Only one thread may ever call MPI_Finalize (MPI_Finalize may
be called at most once in any program) */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FINALIZE_FUNC_ENTER(MPID_STATE_MPI_FINALIZE);
/* ... body of routine ... */
@@ -257,7 +257,7 @@ int MPI_Finalize( void )
/* If memory debugging is enabled, check the memory here, after all
finalize callbacks */
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
OPA_store_int(&MPIR_Process.mpich_state, MPICH_POST_FINALIZED);
#if defined(MPICH_IS_THREADED)
@@ -319,7 +319,7 @@ int MPI_Finalize( void )
# endif
mpi_errno = MPIR_Err_return_comm( 0, FCNAME, mpi_errno );
if (OPA_load_int(&MPIR_Process.mpich_state) < MPICH_POST_FINALIZED) {
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
}
goto fn_exit;
/* --END ERROR HANDLING-- */
diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index bc8eb3e..3c5da8c 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -180,14 +180,14 @@ static int thread_cs_init( void )
#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_MUTEX, &err);
+ 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 */
- MPID_Thread_mutex_create(&MPIR_THREAD_GLOBAL_MUTEX, &err);
+ 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);
@@ -226,7 +226,7 @@ int MPIR_Thread_CS_Finalize( void )
MPIU_DBG_MSG(THREAD,TYPICAL,"Freeing global mutex and private storage");
#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_destroy(&MPIR_THREAD_GLOBAL_MUTEX, &err);
+ 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);
@@ -234,7 +234,7 @@ int MPIR_Thread_CS_Finalize( void )
#elif MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_PER_OBJECT
/* MPIR_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_MUTEX, &err);
+ 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);
@@ -462,7 +462,7 @@ int MPIR_Init_thread(int * argc, char ***argv, int required, int * provided)
/* We can't acquire any critical sections until this point. Any
* earlier the basic data structures haven't been initialized */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
exit_init_cs_on_failure = 1;
/* create MPI_INFO_NULL object */
@@ -541,7 +541,7 @@ int MPIR_Init_thread(int * argc, char ***argv, int required, int * provided)
mpi_errno = MPID_InitCompleted();
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* Make fields of MPIR_Process global visible and set mpich_state
atomically so that MPI_Initialized() etc. are thread safe */
OPA_write_barrier();
@@ -554,7 +554,7 @@ fn_fail:
OPA_store_int(&MPIR_Process.mpich_state, MPICH_PRE_INIT);
if (exit_init_cs_on_failure) {
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
}
#if defined(MPICH_IS_THREADED)
MPIR_Thread_CS_Finalize();
@@ -683,7 +683,7 @@ int MPI_Init_thread( int *argc, char ***argv, int required, int *provided )
mpi_errno = MPIR_Err_return_comm( 0, FCNAME, mpi_errno );
MPID_MPI_INIT_FUNC_EXIT(MPID_STATE_MPI_INIT_THREAD);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --END ERROR HANDLING-- */
diff --git a/src/mpi/pt2pt/bsend.c b/src/mpi/pt2pt/bsend.c
index e2a61f1..caed31e 100644
--- a/src/mpi/pt2pt/bsend.c
+++ b/src/mpi/pt2pt/bsend.c
@@ -97,7 +97,7 @@ int MPI_Bsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER_FRONT(MPID_STATE_MPI_BSEND);
/* Validate handle parameters needing to be converted */
@@ -173,7 +173,7 @@ int MPI_Bsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_BSEND);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/bsend_init.c b/src/mpi/pt2pt/bsend_init.c
index 4ba10f9..e444c45 100644
--- a/src/mpi/pt2pt/bsend_init.c
+++ b/src/mpi/pt2pt/bsend_init.c
@@ -70,7 +70,7 @@ int MPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_BSEND_INIT);
/* Validate handle parameters needing to be converted */
@@ -131,7 +131,7 @@ int MPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_BSEND_INIT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/bufattach.c b/src/mpi/pt2pt/bufattach.c
index 17b58b2..37529c0 100644
--- a/src/mpi/pt2pt/bufattach.c
+++ b/src/mpi/pt2pt/bufattach.c
@@ -82,7 +82,7 @@ int MPI_Buffer_attach(void *buffer, int size)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_BUFFER_ATTACH);
# ifdef HAVE_ERROR_CHECKING
@@ -104,7 +104,7 @@ int MPI_Buffer_attach(void *buffer, int size)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_BUFFER_ATTACH);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/buffree.c b/src/mpi/pt2pt/buffree.c
index db90f89..7332b25 100644
--- a/src/mpi/pt2pt/buffree.c
+++ b/src/mpi/pt2pt/buffree.c
@@ -99,7 +99,7 @@ int MPI_Buffer_detach(void *buffer_addr, int *size)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_BUFFER_DETACH);
# ifdef HAVE_ERROR_CHECKING
@@ -121,7 +121,7 @@ int MPI_Buffer_detach(void *buffer_addr, int *size)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_BUFFER_DETACH);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/cancel.c b/src/mpi/pt2pt/cancel.c
index 13a50d9..15c51cf 100644
--- a/src/mpi/pt2pt/cancel.c
+++ b/src/mpi/pt2pt/cancel.c
@@ -164,7 +164,7 @@ int MPI_Cancel(MPI_Request *request)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_CANCEL);
/* Convert MPI object handles to object pointers */
@@ -192,7 +192,7 @@ int MPI_Cancel(MPI_Request *request)
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_CANCEL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/greq_complete.c b/src/mpi/pt2pt/greq_complete.c
index 1f296a7..78382f8 100644
--- a/src/mpi/pt2pt/greq_complete.c
+++ b/src/mpi/pt2pt/greq_complete.c
@@ -72,7 +72,7 @@ int MPI_Grequest_complete( MPI_Request request )
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GREQUEST_COMPLETE);
/* Validate handle parameters needing to be converted */
@@ -115,7 +115,7 @@ int MPI_Grequest_complete( MPI_Request request )
fn_exit:
#endif
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GREQUEST_COMPLETE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/pt2pt/greq_start.c b/src/mpi/pt2pt/greq_start.c
index 52e28a9..1b6deda 100644
--- a/src/mpi/pt2pt/greq_start.c
+++ b/src/mpi/pt2pt/greq_start.c
@@ -184,7 +184,7 @@ int MPI_Grequest_start( MPI_Grequest_query_function *query_fn,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GREQUEST_START);
/* Validate parameters if error checking is enabled */
@@ -209,7 +209,7 @@ int MPI_Grequest_start( MPI_Grequest_query_function *query_fn,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GREQUEST_START);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/ibsend.c b/src/mpi/pt2pt/ibsend.c
index 52e624b..979f87f 100644
--- a/src/mpi/pt2pt/ibsend.c
+++ b/src/mpi/pt2pt/ibsend.c
@@ -169,7 +169,7 @@ int MPI_Ibsend(const void *buf, int count, MPI_Datatype datatype, int dest, int
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER_FRONT(MPID_STATE_MPI_IBSEND);
/* Validate handle parameters needing to be converted */
@@ -232,7 +232,7 @@ int MPI_Ibsend(const void *buf, int count, MPI_Datatype datatype, int dest, int
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_IBSEND);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/improbe.c b/src/mpi/pt2pt/improbe.c
index 808db85..253ad01 100644
--- a/src/mpi/pt2pt/improbe.c
+++ b/src/mpi/pt2pt/improbe.c
@@ -59,7 +59,7 @@ int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message *mess
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IMPROBE);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IMPROBE);
/* Validate parameters, especially handles needing to be converted */
@@ -113,7 +113,7 @@ int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message *mess
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IMPROBE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/imrecv.c b/src/mpi/pt2pt/imrecv.c
index 6cff657..693aa1d 100644
--- a/src/mpi/pt2pt/imrecv.c
+++ b/src/mpi/pt2pt/imrecv.c
@@ -60,7 +60,7 @@ int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message
MPID_Request *msgp = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_IMRECV);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IMRECV);
/* Validate parameters, especially handles needing to be converted */
@@ -121,7 +121,7 @@ int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_IMRECV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/iprobe.c b/src/mpi/pt2pt/iprobe.c
index 74cda6e..82df3fa 100644
--- a/src/mpi/pt2pt/iprobe.c
+++ b/src/mpi/pt2pt/iprobe.c
@@ -64,7 +64,7 @@ int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_IPROBE);
/* Validate handle parameters needing to be converted */
@@ -111,7 +111,7 @@ int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_IPROBE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/irecv.c b/src/mpi/pt2pt/irecv.c
index ec599e2..2d532ca 100644
--- a/src/mpi/pt2pt/irecv.c
+++ b/src/mpi/pt2pt/irecv.c
@@ -69,7 +69,7 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER_BACK(MPID_STATE_MPI_IRECV);
/* Validate handle parameters needing to be converted */
@@ -142,7 +142,7 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT_BACK(MPID_STATE_MPI_IRECV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/irsend.c b/src/mpi/pt2pt/irsend.c
index a98c3e9..985f6f1 100644
--- a/src/mpi/pt2pt/irsend.c
+++ b/src/mpi/pt2pt/irsend.c
@@ -70,7 +70,7 @@ int MPI_Irsend(const void *buf, int count, MPI_Datatype datatype, int dest, int
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER_FRONT(MPID_STATE_MPI_IRSEND);
/* Validate handle parameters needing to be converted */
@@ -139,7 +139,7 @@ int MPI_Irsend(const void *buf, int count, MPI_Datatype datatype, int dest, int
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_IRSEND);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/isend.c b/src/mpi/pt2pt/isend.c
index aec119b..5cfbcff 100644
--- a/src/mpi/pt2pt/isend.c
+++ b/src/mpi/pt2pt/isend.c
@@ -68,7 +68,7 @@ int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER_FRONT(MPID_STATE_MPI_ISEND);
/* Validate handle parameters needing to be converted */
@@ -138,7 +138,7 @@ int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_ISEND);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/issend.c b/src/mpi/pt2pt/issend.c
index b2e4265..a3a234d 100644
--- a/src/mpi/pt2pt/issend.c
+++ b/src/mpi/pt2pt/issend.c
@@ -69,7 +69,7 @@ int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER_FRONT(MPID_STATE_MPI_ISSEND);
/* Validate handle parameters needing to be converted */
@@ -138,7 +138,7 @@ int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_ISSEND);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/mprobe.c b/src/mpi/pt2pt/mprobe.c
index f51f564..b3c962a 100644
--- a/src/mpi/pt2pt/mprobe.c
+++ b/src/mpi/pt2pt/mprobe.c
@@ -57,7 +57,7 @@ int MPI_Mprobe(int source, int tag, MPI_Comm comm, MPI_Message *message, MPI_Sta
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_MPROBE);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_MPROBE);
/* Validate parameters, especially handles needing to be converted */
@@ -107,7 +107,7 @@ int MPI_Mprobe(int source, int tag, MPI_Comm comm, MPI_Message *message, MPI_Sta
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_MPROBE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/mrecv.c b/src/mpi/pt2pt/mrecv.c
index 3463cd7..f1c1fa0 100644
--- a/src/mpi/pt2pt/mrecv.c
+++ b/src/mpi/pt2pt/mrecv.c
@@ -59,7 +59,7 @@ int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message,
MPID_Request *msgp = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_MRECV);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_MRECV);
/* Validate parameters, especially handles needing to be converted */
@@ -117,7 +117,7 @@ int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_MRECV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/probe.c b/src/mpi/pt2pt/probe.c
index adc7ea3..68c9398 100644
--- a/src/mpi/pt2pt/probe.c
+++ b/src/mpi/pt2pt/probe.c
@@ -60,7 +60,7 @@ int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_PROBE);
/* Validate handle parameters needing to be converted */
@@ -104,7 +104,7 @@ int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status)
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_PROBE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/recv.c b/src/mpi/pt2pt/recv.c
index f4a6352..e0a9185 100644
--- a/src/mpi/pt2pt/recv.c
+++ b/src/mpi/pt2pt/recv.c
@@ -75,7 +75,7 @@ int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER_BACK(MPID_STATE_MPI_RECV);
/* Validate handle parameters needing to be converted */
@@ -189,7 +189,7 @@ int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT_BACK(MPID_STATE_MPI_RECV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/recv_init.c b/src/mpi/pt2pt/recv_init.c
index 4d2c5f5..c65c7ba 100644
--- a/src/mpi/pt2pt/recv_init.c
+++ b/src/mpi/pt2pt/recv_init.c
@@ -71,7 +71,7 @@ int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_RECV_INIT);
/* Validate handle parameters needing to be converted */
@@ -136,7 +136,7 @@ int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_RECV_INIT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/request_free.c b/src/mpi/pt2pt/request_free.c
index 43f8b17..0f5a4ea 100644
--- a/src/mpi/pt2pt/request_free.c
+++ b/src/mpi/pt2pt/request_free.c
@@ -72,7 +72,7 @@ int MPI_Request_free(MPI_Request *request)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_REQUEST_FREE);
/* Validate handle parameters needing to be converted */
@@ -174,7 +174,7 @@ int MPI_Request_free(MPI_Request *request)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_REQUEST_FREE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/request_get_status.c b/src/mpi/pt2pt/request_get_status.c
index 522b953..529b02a 100644
--- a/src/mpi/pt2pt/request_get_status.c
+++ b/src/mpi/pt2pt/request_get_status.c
@@ -62,7 +62,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_REQUEST_GET_STATUS);
/* Check the arguments */
@@ -246,7 +246,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_REQUEST_GET_STATUS);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/rsend.c b/src/mpi/pt2pt/rsend.c
index f8959db..3146b72 100644
--- a/src/mpi/pt2pt/rsend.c
+++ b/src/mpi/pt2pt/rsend.c
@@ -66,7 +66,7 @@ int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER_FRONT(MPID_STATE_MPI_RSEND);
/* Validate handle parameters needing to be converted */
@@ -158,7 +158,7 @@ int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_RSEND);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/rsend_init.c b/src/mpi/pt2pt/rsend_init.c
index dfc2383..63af433 100644
--- a/src/mpi/pt2pt/rsend_init.c
+++ b/src/mpi/pt2pt/rsend_init.c
@@ -71,7 +71,7 @@ int MPI_Rsend_init(const void *buf, int count, MPI_Datatype datatype, int dest,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_RSEND_INIT);
/* Validate handle parameters needing to be converted */
@@ -136,7 +136,7 @@ int MPI_Rsend_init(const void *buf, int count, MPI_Datatype datatype, int dest,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_RSEND_INIT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/send.c b/src/mpi/pt2pt/send.c
index 862d49d..67752fb 100644
--- a/src/mpi/pt2pt/send.c
+++ b/src/mpi/pt2pt/send.c
@@ -71,7 +71,7 @@ int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int ta
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER_FRONT(MPID_STATE_MPI_SEND);
/* Validate handle parameters needing to be converted */
@@ -163,7 +163,7 @@ int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int ta
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_SEND);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/send_init.c b/src/mpi/pt2pt/send_init.c
index 8aceca5..67346da 100644
--- a/src/mpi/pt2pt/send_init.c
+++ b/src/mpi/pt2pt/send_init.c
@@ -71,7 +71,7 @@ int MPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_SEND_INIT);
/* Validate handle parameters needing to be converted */
@@ -137,7 +137,7 @@ int MPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_SEND_INIT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/sendrecv.c b/src/mpi/pt2pt/sendrecv.c
index 51abfe4..7787547 100644
--- a/src/mpi/pt2pt/sendrecv.c
+++ b/src/mpi/pt2pt/sendrecv.c
@@ -82,7 +82,7 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER_BOTH(MPID_STATE_MPI_SENDRECV);
/* Validate handle parameters needing to be converted */
@@ -226,7 +226,7 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT_BOTH(MPID_STATE_MPI_SENDRECV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/sendrecv_rep.c b/src/mpi/pt2pt/sendrecv_rep.c
index bcb945d..140303f 100644
--- a/src/mpi/pt2pt/sendrecv_rep.c
+++ b/src/mpi/pt2pt/sendrecv_rep.c
@@ -81,7 +81,7 @@ int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER_BOTH(MPID_STATE_MPI_SENDRECV_REPLACE);
/* Convert handles to MPI objects. */
@@ -220,7 +220,7 @@ int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
fn_exit:
MPIU_CHKLMEM_FREEALL();
MPID_MPI_PT2PT_FUNC_EXIT_BOTH(MPID_STATE_MPI_SENDRECV_REPLACE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/ssend.c b/src/mpi/pt2pt/ssend.c
index ac25461..74df40f 100644
--- a/src/mpi/pt2pt/ssend.c
+++ b/src/mpi/pt2pt/ssend.c
@@ -65,7 +65,7 @@ int MPI_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER_FRONT(MPID_STATE_MPI_SSEND);
/* Validate handle parameters needing to be converted */
@@ -141,7 +141,7 @@ int MPI_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int t
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_SSEND);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/ssend_init.c b/src/mpi/pt2pt/ssend_init.c
index 9ebf263..6e64b1a 100644
--- a/src/mpi/pt2pt/ssend_init.c
+++ b/src/mpi/pt2pt/ssend_init.c
@@ -68,7 +68,7 @@ int MPI_Ssend_init(const void *buf, int count, MPI_Datatype datatype, int dest,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_SSEND_INIT);
/* Validate handle parameters needing to be converted */
@@ -133,7 +133,7 @@ int MPI_Ssend_init(const void *buf, int count, MPI_Datatype datatype, int dest,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_SSEND_INIT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/start.c b/src/mpi/pt2pt/start.c
index 5f517cf..975fff2 100644
--- a/src/mpi/pt2pt/start.c
+++ b/src/mpi/pt2pt/start.c
@@ -54,7 +54,7 @@ int MPI_Start(MPI_Request *request)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_START);
/* Validate handle parameters needing to be converted */
@@ -95,7 +95,7 @@ int MPI_Start(MPI_Request *request)
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_START);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/startall.c b/src/mpi/pt2pt/startall.c
index 5c18507..75034e7 100644
--- a/src/mpi/pt2pt/startall.c
+++ b/src/mpi/pt2pt/startall.c
@@ -70,7 +70,7 @@ int MPI_Startall(int count, MPI_Request array_of_requests[])
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_STARTALL);
/* Validate handle parameters needing to be converted */
@@ -132,7 +132,7 @@ int MPI_Startall(int count, MPI_Request array_of_requests[])
}
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_STARTALL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/test.c b/src/mpi/pt2pt/test.c
index 94ef842..9a3a9ed 100644
--- a/src/mpi/pt2pt/test.c
+++ b/src/mpi/pt2pt/test.c
@@ -117,7 +117,7 @@ int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_TEST);
/* Validate parameters, especially handles needing to be converted */
@@ -163,7 +163,7 @@ int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status)
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_TEST);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/testall.c b/src/mpi/pt2pt/testall.c
index a32dc99..67a2c30 100644
--- a/src/mpi/pt2pt/testall.c
+++ b/src/mpi/pt2pt/testall.c
@@ -238,7 +238,7 @@ int MPI_Testall(int count, MPI_Request array_of_requests[], int *flag,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_TESTALL);
/* Check the arguments */
@@ -273,7 +273,7 @@ int MPI_Testall(int count, MPI_Request array_of_requests[], int *flag,
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_TESTALL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/testany.c b/src/mpi/pt2pt/testany.c
index 4096014..cee17db 100644
--- a/src/mpi/pt2pt/testany.c
+++ b/src/mpi/pt2pt/testany.c
@@ -80,7 +80,7 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_TESTANY);
/* Check the arguments */
@@ -221,7 +221,7 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx,
}
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_TESTANY);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/testsome.c b/src/mpi/pt2pt/testsome.c
index 16a17ea..9ec15eb 100644
--- a/src/mpi/pt2pt/testsome.c
+++ b/src/mpi/pt2pt/testsome.c
@@ -84,7 +84,7 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_TESTSOME);
/* Check the arguments */
@@ -244,7 +244,7 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount,
}
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_TESTSOME);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/wait.c b/src/mpi/pt2pt/wait.c
index c068e22..c6d8930 100644
--- a/src/mpi/pt2pt/wait.c
+++ b/src/mpi/pt2pt/wait.c
@@ -142,7 +142,7 @@ int MPI_Wait(MPI_Request *request, MPI_Status *status)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_WAIT);
/* Check the arguments */
@@ -193,7 +193,7 @@ int MPI_Wait(MPI_Request *request, MPI_Status *status)
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_WAIT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/waitall.c b/src/mpi/pt2pt/waitall.c
index a331b48..f8d78d9 100644
--- a/src/mpi/pt2pt/waitall.c
+++ b/src/mpi/pt2pt/waitall.c
@@ -347,7 +347,7 @@ int MPI_Waitall(int count, MPI_Request array_of_requests[],
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_WAITALL);
/* Check the arguments */
@@ -382,7 +382,7 @@ int MPI_Waitall(int count, MPI_Request array_of_requests[],
fn_exit:
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_WAITALL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/pt2pt/waitany.c b/src/mpi/pt2pt/waitany.c
index 75f97ec..6a713e4 100644
--- a/src/mpi/pt2pt/waitany.c
+++ b/src/mpi/pt2pt/waitany.c
@@ -84,7 +84,7 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_WAITANY);
/* Check the arguments */
@@ -226,7 +226,7 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx,
}
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_WAITANY);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_progress_end_fail:
diff --git a/src/mpi/pt2pt/waitsome.c b/src/mpi/pt2pt/waitsome.c
index 359c8aa..95dc784 100644
--- a/src/mpi/pt2pt/waitsome.c
+++ b/src/mpi/pt2pt/waitsome.c
@@ -103,7 +103,7 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[],
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_PT2PT_FUNC_ENTER(MPID_STATE_MPI_WAITSOME);
/* Check the arguments */
@@ -297,7 +297,7 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[],
}
MPID_MPI_PT2PT_FUNC_EXIT(MPID_STATE_MPI_WAITSOME);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/accumulate.c b/src/mpi/rma/accumulate.c
index 1bb10df..b5aaf4f 100644
--- a/src/mpi/rma/accumulate.c
+++ b/src/mpi/rma/accumulate.c
@@ -77,7 +77,7 @@ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_ACCUMULATE);
/* Validate parameters, especially handles needing to be converted */
@@ -155,7 +155,7 @@ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_ACCUMULATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/alloc_mem.c b/src/mpi/rma/alloc_mem.c
index c8fc338..3660e25 100644
--- a/src/mpi/rma/alloc_mem.c
+++ b/src/mpi/rma/alloc_mem.c
@@ -70,7 +70,7 @@ int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_ALLOC_MEM);
# ifdef HAVE_ERROR_CHECKING
@@ -106,7 +106,7 @@ int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_ALLOC_MEM);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/compare_and_swap.c b/src/mpi/rma/compare_and_swap.c
index ddc947e..a50f7df 100644
--- a/src/mpi/rma/compare_and_swap.c
+++ b/src/mpi/rma/compare_and_swap.c
@@ -83,7 +83,7 @@ int MPI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_COMPARE_AND_SWAP);
/* Validate parameters, especially handles needing to be converted */
@@ -143,7 +143,7 @@ int MPI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_COMPARE_AND_SWAP);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/fetch_and_op.c b/src/mpi/rma/fetch_and_op.c
index 8138142..0f14079 100644
--- a/src/mpi/rma/fetch_and_op.c
+++ b/src/mpi/rma/fetch_and_op.c
@@ -88,7 +88,7 @@ int MPI_Fetch_and_op(const void *origin_addr, void *result_addr,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_FETCH_AND_OP);
/* Validate parameters, especially handles needing to be converted */
@@ -159,7 +159,7 @@ int MPI_Fetch_and_op(const void *origin_addr, void *result_addr,
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_FETCH_AND_OP);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/free_mem.c b/src/mpi/rma/free_mem.c
index b701adc..db0b6b2 100644
--- a/src/mpi/rma/free_mem.c
+++ b/src/mpi/rma/free_mem.c
@@ -52,7 +52,7 @@ int MPI_Free_mem(void *base)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_FREE_MEM);
/* ... body of routine ... */
@@ -66,7 +66,7 @@ int MPI_Free_mem(void *base)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_FREE_MEM);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/get.c b/src/mpi/rma/get.c
index 1ba8e8e..23c7bed 100644
--- a/src/mpi/rma/get.c
+++ b/src/mpi/rma/get.c
@@ -72,7 +72,7 @@ int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_GET);
/* Validate parameters, especially handles needing to be converted */
@@ -148,7 +148,7 @@ int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_GET);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/get_accumulate.c b/src/mpi/rma/get_accumulate.c
index fd788b2..0797a29 100644
--- a/src/mpi/rma/get_accumulate.c
+++ b/src/mpi/rma/get_accumulate.c
@@ -108,7 +108,7 @@ int MPI_Get_accumulate(const void *origin_addr, int origin_count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_GET_ACCUMULATE);
/* Validate parameters, especially handles needing to be converted */
@@ -209,7 +209,7 @@ int MPI_Get_accumulate(const void *origin_addr, int origin_count,
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_GET_ACCUMULATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/put.c b/src/mpi/rma/put.c
index b2c593a..5b46007 100644
--- a/src/mpi/rma/put.c
+++ b/src/mpi/rma/put.c
@@ -72,7 +72,7 @@ int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_PUT);
/* Validate parameters, especially handles needing to be converted */
@@ -148,7 +148,7 @@ int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_PUT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/raccumulate.c b/src/mpi/rma/raccumulate.c
index 4118978..9fb0edd 100644
--- a/src/mpi/rma/raccumulate.c
+++ b/src/mpi/rma/raccumulate.c
@@ -91,7 +91,7 @@ int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_RACCUMULATE);
/* Validate parameters, especially handles needing to be converted */
@@ -172,7 +172,7 @@ int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_RACCUMULATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/rget.c b/src/mpi/rma/rget.c
index 2c1efcd..cac765d 100644
--- a/src/mpi/rma/rget.c
+++ b/src/mpi/rma/rget.c
@@ -86,7 +86,7 @@ int MPI_Rget(void *origin_addr, int origin_count, MPI_Datatype
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_RGET);
/* Validate parameters, especially handles needing to be converted */
@@ -165,7 +165,7 @@ int MPI_Rget(void *origin_addr, int origin_count, MPI_Datatype
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_RGET);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/rget_accumulate.c b/src/mpi/rma/rget_accumulate.c
index 6fe8ad3..f46bd05 100644
--- a/src/mpi/rma/rget_accumulate.c
+++ b/src/mpi/rma/rget_accumulate.c
@@ -101,7 +101,7 @@ int MPI_Rget_accumulate(const void *origin_addr, int origin_count,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_RGET_ACCUMULATE);
/* Validate parameters, especially handles needing to be converted */
@@ -201,7 +201,7 @@ int MPI_Rget_accumulate(const void *origin_addr, int origin_count,
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_RGET_ACCUMULATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/rput.c b/src/mpi/rma/rput.c
index 664e19d..d149d44 100644
--- a/src/mpi/rma/rput.c
+++ b/src/mpi/rma/rput.c
@@ -88,7 +88,7 @@ int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_RPUT);
/* Validate parameters, especially handles needing to be converted */
@@ -167,7 +167,7 @@ int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_RPUT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_allocate.c b/src/mpi/rma/win_allocate.c
index 1a0e277..ab2969e 100644
--- a/src/mpi/rma/win_allocate.c
+++ b/src/mpi/rma/win_allocate.c
@@ -80,7 +80,7 @@ int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_ALLOCATE);
/* Validate parameters, especially handles needing to be converted */
@@ -153,7 +153,7 @@ int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info,
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_ALLOCATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_allocate_shared.c b/src/mpi/rma/win_allocate_shared.c
index 0623e68..7965d7d 100644
--- a/src/mpi/rma/win_allocate_shared.c
+++ b/src/mpi/rma/win_allocate_shared.c
@@ -90,7 +90,7 @@ int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Com
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_ALLOCATE_SHARED);
/* Validate parameters, especially handles needing to be converted */
@@ -151,7 +151,7 @@ int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Com
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_ALLOCATE_SHARED);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_attach.c b/src/mpi/rma/win_attach.c
index a4fa201..1335d4b 100644
--- a/src/mpi/rma/win_attach.c
+++ b/src/mpi/rma/win_attach.c
@@ -69,7 +69,7 @@ int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_ATTACH);
/* Validate parameters, especially handles needing to be converted */
@@ -127,7 +127,7 @@ int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size)
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_ATTACH);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_complete.c b/src/mpi/rma/win_complete.c
index c625366..445de58 100644
--- a/src/mpi/rma/win_complete.c
+++ b/src/mpi/rma/win_complete.c
@@ -54,7 +54,7 @@ int MPI_Win_complete(MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_COMPLETE);
/* Validate parameters, especially handles needing to be converted */
@@ -94,7 +94,7 @@ int MPI_Win_complete(MPI_Win win)
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_COMPLETE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_create.c b/src/mpi/rma/win_create.c
index a4a8ebd..947a95e 100644
--- a/src/mpi/rma/win_create.c
+++ b/src/mpi/rma/win_create.c
@@ -108,7 +108,7 @@ int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, MPI_Info info,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_CREATE);
/* Validate parameters, especially handles needing to be converted */
@@ -181,7 +181,7 @@ int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, MPI_Info info,
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_CREATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_create_dynamic.c b/src/mpi/rma/win_create_dynamic.c
index 84e13b3..b9d6c28 100644
--- a/src/mpi/rma/win_create_dynamic.c
+++ b/src/mpi/rma/win_create_dynamic.c
@@ -96,7 +96,7 @@ int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_CREATE_DYNAMIC);
/* Validate parameters, especially handles needing to be converted */
@@ -145,7 +145,7 @@ int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win)
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_CREATE_DYNAMIC);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_detach.c b/src/mpi/rma/win_detach.c
index 098bd2d..ed9d22e 100644
--- a/src/mpi/rma/win_detach.c
+++ b/src/mpi/rma/win_detach.c
@@ -68,7 +68,7 @@ int MPI_Win_detach(MPI_Win win, const void *base)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_DETACH);
/* Validate parameters, especially handles needing to be converted */
@@ -109,7 +109,7 @@ int MPI_Win_detach(MPI_Win win, const void *base)
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_DETACH);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_fence.c b/src/mpi/rma/win_fence.c
index c5f32cf..8b7dc96 100644
--- a/src/mpi/rma/win_fence.c
+++ b/src/mpi/rma/win_fence.c
@@ -72,7 +72,7 @@ int MPI_Win_fence(int assert, MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_FENCE);
/* Validate parameters, especially handles needing to be converted */
@@ -115,7 +115,7 @@ int MPI_Win_fence(int assert, MPI_Win win)
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_FENCE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_flush.c b/src/mpi/rma/win_flush.c
index cafac61..e751e47 100644
--- a/src/mpi/rma/win_flush.c
+++ b/src/mpi/rma/win_flush.c
@@ -63,7 +63,7 @@ int MPI_Win_flush(int rank, MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_FLUSH);
/* Validate parameters, especially handles needing to be converted */
@@ -110,7 +110,7 @@ int MPI_Win_flush(int rank, MPI_Win win)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_FLUSH);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_flush_all.c b/src/mpi/rma/win_flush_all.c
index 1733422..7855e25 100644
--- a/src/mpi/rma/win_flush_all.c
+++ b/src/mpi/rma/win_flush_all.c
@@ -62,7 +62,7 @@ int MPI_Win_flush_all(MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_FLUSH_ALL);
/* Validate parameters, especially handles needing to be converted */
@@ -104,7 +104,7 @@ int MPI_Win_flush_all(MPI_Win win)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_FLUSH_ALL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_flush_local.c b/src/mpi/rma/win_flush_local.c
index 224705b..fd64eee 100644
--- a/src/mpi/rma/win_flush_local.c
+++ b/src/mpi/rma/win_flush_local.c
@@ -65,7 +65,7 @@ int MPI_Win_flush_local(int rank, MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_FLUSH_LOCAL);
/* Validate parameters, especially handles needing to be converted */
@@ -112,7 +112,7 @@ int MPI_Win_flush_local(int rank, MPI_Win win)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_FLUSH_LOCAL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_flush_local_all.c b/src/mpi/rma/win_flush_local_all.c
index 7306480..c5c629e 100644
--- a/src/mpi/rma/win_flush_local_all.c
+++ b/src/mpi/rma/win_flush_local_all.c
@@ -61,7 +61,7 @@ int MPI_Win_flush_local_all(MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_FLUSH_LOCAL_ALL);
/* Validate parameters, especially handles needing to be converted */
@@ -102,7 +102,7 @@ int MPI_Win_flush_local_all(MPI_Win win)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_FLUSH_LOCAL_ALL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_free.c b/src/mpi/rma/win_free.c
index 1df3951..5c7788f 100644
--- a/src/mpi/rma/win_free.c
+++ b/src/mpi/rma/win_free.c
@@ -57,7 +57,7 @@ int MPI_Win_free(MPI_Win *win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_FREE);
/* Validate parameters, especially handles needing to be converted */
@@ -124,7 +124,7 @@ int MPI_Win_free(MPI_Win *win)
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_FREE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_get_group.c b/src/mpi/rma/win_get_group.c
index fea73f7..6a5cb1f 100644
--- a/src/mpi/rma/win_get_group.c
+++ b/src/mpi/rma/win_get_group.c
@@ -66,7 +66,7 @@ int MPI_Win_get_group(MPI_Win win, MPI_Group *group)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_GET_GROUP);
/* Validate parameters, especially handles needing to be converted */
@@ -110,7 +110,7 @@ int MPI_Win_get_group(MPI_Win win, MPI_Group *group)
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_GET_GROUP);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_get_info.c b/src/mpi/rma/win_get_info.c
index 90ef494..4f13dc0 100644
--- a/src/mpi/rma/win_get_info.c
+++ b/src/mpi/rma/win_get_info.c
@@ -76,7 +76,7 @@ int MPI_Win_get_info(MPI_Win win, MPI_Info *info_used)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_GET_INFO);
/* Validate parameters, especially handles needing to be converted */
@@ -118,7 +118,7 @@ int MPI_Win_get_info(MPI_Win win, MPI_Info *info_used)
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_GET_INFO);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_lock.c b/src/mpi/rma/win_lock.c
index e094c59..7972ef3 100644
--- a/src/mpi/rma/win_lock.c
+++ b/src/mpi/rma/win_lock.c
@@ -82,7 +82,7 @@ int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_LOCK);
/* Validate parameters, especially handles needing to be converted */
@@ -143,7 +143,7 @@ int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_LOCK);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_lock_all.c b/src/mpi/rma/win_lock_all.c
index 1fa806e..ebf8cdd 100644
--- a/src/mpi/rma/win_lock_all.c
+++ b/src/mpi/rma/win_lock_all.c
@@ -86,7 +86,7 @@ int MPI_Win_lock_all(int assert, MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_LOCK_ALL);
/* Validate parameters, especially handles needing to be converted */
@@ -137,7 +137,7 @@ int MPI_Win_lock_all(int assert, MPI_Win win)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_LOCK_ALL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_post.c b/src/mpi/rma/win_post.c
index d63bb5d..53d606d 100644
--- a/src/mpi/rma/win_post.c
+++ b/src/mpi/rma/win_post.c
@@ -71,7 +71,7 @@ int MPI_Win_post(MPI_Group group, int assert, MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_POST);
/* Validate parameters, especially handles needing to be converted */
@@ -118,7 +118,7 @@ int MPI_Win_post(MPI_Group group, int assert, MPI_Win win)
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_POST);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_set_info.c b/src/mpi/rma/win_set_info.c
index 095da0c..34f535e 100644
--- a/src/mpi/rma/win_set_info.c
+++ b/src/mpi/rma/win_set_info.c
@@ -73,7 +73,7 @@ int MPI_Win_set_info(MPI_Win win, MPI_Info info)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_SET_INFO);
/* Validate parameters, especially handles needing to be converted */
@@ -117,7 +117,7 @@ int MPI_Win_set_info(MPI_Win win, MPI_Info info)
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_SET_INFO);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_shared_query.c b/src/mpi/rma/win_shared_query.c
index 0361502..9931dda 100644
--- a/src/mpi/rma/win_shared_query.c
+++ b/src/mpi/rma/win_shared_query.c
@@ -80,7 +80,7 @@ int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_SHARED_QUERY);
/* Validate parameters, especially handles needing to be converted */
@@ -129,7 +129,7 @@ int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit,
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_SHARED_QUERY);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_start.c b/src/mpi/rma/win_start.c
index 3617b6a..2bc8e6b 100644
--- a/src/mpi/rma/win_start.c
+++ b/src/mpi/rma/win_start.c
@@ -72,7 +72,7 @@ int MPI_Win_start(MPI_Group group, int assert, MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_START);
/* Validate parameters, especially handles needing to be converted */
@@ -119,7 +119,7 @@ int MPI_Win_start(MPI_Group group, int assert, MPI_Win win)
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_START);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_sync.c b/src/mpi/rma/win_sync.c
index a84b567..28156b7 100644
--- a/src/mpi/rma/win_sync.c
+++ b/src/mpi/rma/win_sync.c
@@ -64,7 +64,7 @@ int MPI_Win_sync(MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_SYNC);
/* Validate parameters, especially handles needing to be converted */
@@ -104,7 +104,7 @@ int MPI_Win_sync(MPI_Win win)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_SYNC);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_test.c b/src/mpi/rma/win_test.c
index 17139c6..d422a8a 100644
--- a/src/mpi/rma/win_test.c
+++ b/src/mpi/rma/win_test.c
@@ -63,7 +63,7 @@ int MPI_Win_test(MPI_Win win, int *flag)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_TEST);
/* Validate parameters, especially handles needing to be converted */
@@ -105,7 +105,7 @@ int MPI_Win_test(MPI_Win win, int *flag)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_TEST);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_unlock.c b/src/mpi/rma/win_unlock.c
index 6a7ee8a..0211e15 100644
--- a/src/mpi/rma/win_unlock.c
+++ b/src/mpi/rma/win_unlock.c
@@ -58,7 +58,7 @@ int MPI_Win_unlock(int rank, MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_UNLOCK);
/* Validate parameters, especially handles needing to be converted */
@@ -105,7 +105,7 @@ int MPI_Win_unlock(int rank, MPI_Win win)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_UNLOCK);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_unlock_all.c b/src/mpi/rma/win_unlock_all.c
index 5fc6c3b..e3ac876 100644
--- a/src/mpi/rma/win_unlock_all.c
+++ b/src/mpi/rma/win_unlock_all.c
@@ -65,7 +65,7 @@ int MPI_Win_unlock_all(MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_WIN_UNLOCK_ALL);
/* Validate parameters, especially handles needing to be converted */
@@ -107,7 +107,7 @@ int MPI_Win_unlock_all(MPI_Win win)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_UNLOCK_ALL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/rma/win_wait.c b/src/mpi/rma/win_wait.c
index c2ba1b2..c9b004a 100644
--- a/src/mpi/rma/win_wait.c
+++ b/src/mpi/rma/win_wait.c
@@ -54,7 +54,7 @@ int MPI_Win_wait(MPI_Win win)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_RMA_FUNC_ENTER(MPID_STATE_MPI_WIN_WAIT);
/* Validate parameters, especially handles needing to be converted */
@@ -95,7 +95,7 @@ int MPI_Win_wait(MPI_Win win)
fn_exit:
MPID_MPI_RMA_FUNC_EXIT(MPID_STATE_MPI_WIN_WAIT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/romio/mpi-io/close.c b/src/mpi/romio/mpi-io/close.c
index 797c851..8bfa8fa 100644
--- a/src/mpi/romio/mpi-io/close.c
+++ b/src/mpi/romio/mpi-io/close.c
@@ -44,7 +44,7 @@ int MPI_File_close(MPI_File *fh)
HPMP_IO_WSTART(fl_xmpi, BLKMPIFILECLOSE, TRDTBLOCK, *adio_fh);
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(*fh);
@@ -90,7 +90,7 @@ int MPI_File_close(MPI_File *fh)
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/romio/mpi-io/delete.c b/src/mpi/romio/mpi-io/delete.c
index 19a2335..598bfe8 100644
--- a/src/mpi/romio/mpi-io/delete.c
+++ b/src/mpi/romio/mpi-io/delete.c
@@ -48,7 +48,7 @@ int MPI_File_delete(ROMIO_CONST char *filename, MPI_Info info)
MPIU_UNREFERENCED_ARG(info);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIR_MPIOInit(&error_code);
if (error_code != MPI_SUCCESS) goto fn_exit;
@@ -90,6 +90,6 @@ int MPI_File_delete(ROMIO_CONST char *filename, MPI_Info info)
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/fsync.c b/src/mpi/romio/mpi-io/fsync.c
index 6bca025..a9ba94d 100644
--- a/src/mpi/romio/mpi-io/fsync.c
+++ b/src/mpi/romio/mpi-io/fsync.c
@@ -45,7 +45,7 @@ int MPI_File_sync(MPI_File fh)
HPMP_IO_START(fl_xmpi, BLKMPIFILESYNC, TRDTBLOCK, adio_fh,
MPI_DATATYPE_NULL, -1);
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -71,6 +71,6 @@ int MPI_File_sync(MPI_File fh)
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/get_errh.c b/src/mpi/romio/mpi-io/get_errh.c
index 67d65d2..4072949 100644
--- a/src/mpi/romio/mpi-io/get_errh.c
+++ b/src/mpi/romio/mpi-io/get_errh.c
@@ -44,7 +44,7 @@ int MPI_File_get_errhandler(MPI_File mpi_fh, MPI_Errhandler *errhandler)
static char myname[] = "MPI_FILE_GET_ERRHANDLER";
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (mpi_fh == MPI_FILE_NULL) {
*errhandler = ADIOI_DFLT_ERR_HANDLER;
@@ -66,6 +66,6 @@ int MPI_File_get_errhandler(MPI_File mpi_fh, MPI_Errhandler *errhandler)
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return MPI_SUCCESS;
}
diff --git a/src/mpi/romio/mpi-io/get_group.c b/src/mpi/romio/mpi-io/get_group.c
index da6c910..4139a4e 100644
--- a/src/mpi/romio/mpi-io/get_group.c
+++ b/src/mpi/romio/mpi-io/get_group.c
@@ -43,7 +43,7 @@ int MPI_File_get_group(MPI_File fh, MPI_Group *group)
ADIO_File adio_fh;
static char myname[] = "MPI_FILE_GET_GROUP";
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -59,6 +59,6 @@ int MPI_File_get_group(MPI_File fh, MPI_Group *group)
error_code = MPI_Comm_group(adio_fh->comm, group);
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/get_info.c b/src/mpi/romio/mpi-io/get_info.c
index 6962793..c4a8508 100644
--- a/src/mpi/romio/mpi-io/get_info.c
+++ b/src/mpi/romio/mpi-io/get_info.c
@@ -42,7 +42,7 @@ int MPI_File_get_info(MPI_File fh, MPI_Info *info_used)
ADIO_File adio_fh;
static char myname[] = "MPI_FILE_GET_INFO";
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -57,6 +57,6 @@ int MPI_File_get_info(MPI_File fh, MPI_Info *info_used)
/* --END ERROR HANDLING-- */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/get_view.c b/src/mpi/romio/mpi-io/get_view.c
index 1c7f9b1..972b74a 100644
--- a/src/mpi/romio/mpi-io/get_view.c
+++ b/src/mpi/romio/mpi-io/get_view.c
@@ -52,7 +52,7 @@ int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype,
int i, j, k, combiner;
MPI_Datatype copy_etype, copy_filetype;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -96,7 +96,7 @@ int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype,
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return MPI_SUCCESS;
}
diff --git a/src/mpi/romio/mpi-io/ioreq_c2f.c b/src/mpi/romio/mpi-io/ioreq_c2f.c
index 64b615d..6e71c23 100644
--- a/src/mpi/romio/mpi-io/ioreq_c2f.c
+++ b/src/mpi/romio/mpi-io/ioreq_c2f.c
@@ -56,7 +56,7 @@ MPI_Fint MPIO_Request_c2f(MPIO_Request request)
return (MPI_Fint) 0;
}
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (!ADIOI_Reqtable) {
ADIOI_Reqtable_max = 1024;
ADIOI_Reqtable = (MPIO_Request *)
@@ -75,7 +75,7 @@ MPI_Fint MPIO_Request_c2f(MPIO_Request request)
ADIOI_Reqtable_ptr++;
ADIOI_Reqtable[ADIOI_Reqtable_ptr] = request;
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return (MPI_Fint) ADIOI_Reqtable_ptr;
#endif
}
diff --git a/src/mpi/romio/mpi-io/ioreq_f2c.c b/src/mpi/romio/mpi-io/ioreq_f2c.c
index 69bed05..c9fa85a 100644
--- a/src/mpi/romio/mpi-io/ioreq_f2c.c
+++ b/src/mpi/romio/mpi-io/ioreq_f2c.c
@@ -49,7 +49,7 @@ MPIO_Request MPIO_Request_f2c(MPI_Fint request)
return (MPIO_Request) request;
#else
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (!request) {
return MPIO_REQUEST_NULL;
@@ -65,7 +65,7 @@ MPIO_Request MPIO_Request_f2c(MPI_Fint request)
/* --END ERROR HANDLING-- */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return ADIOI_Reqtable[request];
#endif
}
diff --git a/src/mpi/romio/mpi-io/iotest.c b/src/mpi/romio/mpi-io/iotest.c
index 2aa7302..1a2ba0c 100644
--- a/src/mpi/romio/mpi-io/iotest.c
+++ b/src/mpi/romio/mpi-io/iotest.c
@@ -56,7 +56,7 @@ int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status)
}
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (*request == MPIO_REQUEST_NULL) {
error_code = MPI_SUCCESS;
@@ -89,7 +89,7 @@ int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status)
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iotestall.c b/src/mpi/romio/mpi-io/iotestall.c
index 2583294..22016a8 100644
--- a/src/mpi/romio/mpi-io/iotestall.c
+++ b/src/mpi/romio/mpi-io/iotestall.c
@@ -34,7 +34,7 @@ int MPIO_Testall(int count, MPIO_Request requests[], int *flag,
int done, i, err;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (count == 1) {
err = MPIO_Test( requests, flag, statuses );
goto fn_exit;
@@ -71,7 +71,7 @@ int MPIO_Testall(int count, MPIO_Request requests[], int *flag,
err = MPI_SUCCESS;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return err;
}
diff --git a/src/mpi/romio/mpi-io/iotestany.c b/src/mpi/romio/mpi-io/iotestany.c
index dfa4581..b8a49da 100644
--- a/src/mpi/romio/mpi-io/iotestany.c
+++ b/src/mpi/romio/mpi-io/iotestany.c
@@ -34,7 +34,7 @@ int MPIO_Testany(int count, MPIO_Request requests[], int *index,
int i, err;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (count == 1) {
err = MPIO_Test( requests, flag, status );
@@ -76,6 +76,6 @@ int MPIO_Testany(int count, MPIO_Request requests[], int *index,
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return err;
}
diff --git a/src/mpi/romio/mpi-io/iotestsome.c b/src/mpi/romio/mpi-io/iotestsome.c
index 5526d6b..08f4afb 100644
--- a/src/mpi/romio/mpi-io/iotestsome.c
+++ b/src/mpi/romio/mpi-io/iotestsome.c
@@ -35,7 +35,7 @@ int MPIO_Testsome(int count, MPIO_Request requests[], int *outcount,
int flag;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (count == 1) {
err = MPIO_Test( requests, &flag, statuses );
@@ -81,6 +81,6 @@ int MPIO_Testsome(int count, MPIO_Request requests[], int *outcount,
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return err;
}
diff --git a/src/mpi/romio/mpi-io/iowait.c b/src/mpi/romio/mpi-io/iowait.c
index 28392ee..0166992 100644
--- a/src/mpi/romio/mpi-io/iowait.c
+++ b/src/mpi/romio/mpi-io/iowait.c
@@ -56,7 +56,7 @@ int MPIO_Wait(MPIO_Request *request, MPI_Status *status)
}
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (*request == MPIO_REQUEST_NULL) {
error_code = MPI_SUCCESS;
@@ -90,7 +90,7 @@ int MPIO_Wait(MPIO_Request *request, MPI_Status *status)
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iowaitall.c b/src/mpi/romio/mpi-io/iowaitall.c
index a45700f..b2a1643 100644
--- a/src/mpi/romio/mpi-io/iowaitall.c
+++ b/src/mpi/romio/mpi-io/iowaitall.c
@@ -33,7 +33,7 @@ int MPIO_Waitall( int count, MPIO_Request requests[], MPI_Status statuses[] )
int notdone, i, flag, err;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (count == 1) {
err = MPIO_Wait(requests, statuses);
@@ -68,7 +68,7 @@ int MPIO_Waitall( int count, MPIO_Request requests[], MPI_Status statuses[] )
err = MPI_SUCCESS;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return err;
}
diff --git a/src/mpi/romio/mpi-io/iowaitany.c b/src/mpi/romio/mpi-io/iowaitany.c
index 853ff6f..4928617 100644
--- a/src/mpi/romio/mpi-io/iowaitany.c
+++ b/src/mpi/romio/mpi-io/iowaitany.c
@@ -34,7 +34,7 @@ int MPIO_Waitany(int count, MPIO_Request requests[], int *index,
int i, flag, err;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (count == 1) {
err = MPIO_Wait( requests, status );
@@ -78,7 +78,7 @@ int MPIO_Waitany(int count, MPIO_Request requests[], int *index,
} while (flag == 0);
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return err;
}
diff --git a/src/mpi/romio/mpi-io/iowaitsome.c b/src/mpi/romio/mpi-io/iowaitsome.c
index c1dc4b3..53a410b 100644
--- a/src/mpi/romio/mpi-io/iowaitsome.c
+++ b/src/mpi/romio/mpi-io/iowaitsome.c
@@ -34,7 +34,7 @@ int MPIO_Waitsome(int count, MPIO_Request requests[], int *outcount,
int i, flag, err;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (count == 1) {
err = MPIO_Wait( requests, statuses );
@@ -76,6 +76,6 @@ int MPIO_Waitsome(int count, MPIO_Request requests[], int *outcount,
} while (*outcount == 0);
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return err;
}
diff --git a/src/mpi/romio/mpi-io/iread.c b/src/mpi/romio/mpi-io/iread.c
index 8225ccf..7fabb90 100644
--- a/src/mpi/romio/mpi-io/iread.c
+++ b/src/mpi/romio/mpi-io/iread.c
@@ -83,7 +83,7 @@ int MPIOI_File_iread(MPI_File fh, MPI_Offset offset, int file_ptr_type, void *bu
ADIO_Offset off, bufsize;
MPI_Offset nbytes=0;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -154,7 +154,7 @@ int MPIOI_File_iread(MPI_File fh, MPI_Offset offset, int file_ptr_type, void *bu
offset, request, &error_code);
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/iread_all.c b/src/mpi/romio/mpi-io/iread_all.c
index 6679f19..d0dec08 100644
--- a/src/mpi/romio/mpi-io/iread_all.c
+++ b/src/mpi/romio/mpi-io/iread_all.c
@@ -89,7 +89,7 @@ int MPIOI_File_iread_all(MPI_File fh,
ADIO_File adio_fh;
void *xbuf=NULL, *e32_buf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -142,7 +142,7 @@ int MPIOI_File_iread_all(MPI_File fh,
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/iread_sh.c b/src/mpi/romio/mpi-io/iread_sh.c
index 040e10b..f325aa9 100644
--- a/src/mpi/romio/mpi-io/iread_sh.c
+++ b/src/mpi/romio/mpi-io/iread_sh.c
@@ -55,7 +55,7 @@ int MPI_File_iread_shared(MPI_File fh, void *buf, int count,
ADIO_Offset off, shared_fp;
MPI_Offset nbytes=0;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -134,7 +134,7 @@ int MPI_File_iread_shared(MPI_File fh, void *buf, int count,
/* --END ERROR HANDLING-- */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iwrite.c b/src/mpi/romio/mpi-io/iwrite.c
index ffa5713..7f0e4ba 100644
--- a/src/mpi/romio/mpi-io/iwrite.c
+++ b/src/mpi/romio/mpi-io/iwrite.c
@@ -90,7 +90,7 @@ int MPIOI_File_iwrite(MPI_File fh,
ADIO_File adio_fh;
MPI_Offset nbytes=0;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
/* --BEGIN ERROR HANDLING-- */
@@ -162,7 +162,7 @@ int MPIOI_File_iwrite(MPI_File fh,
offset, request, &error_code);
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
#endif
diff --git a/src/mpi/romio/mpi-io/iwrite_all.c b/src/mpi/romio/mpi-io/iwrite_all.c
index bc7dda5..32b32d0 100644
--- a/src/mpi/romio/mpi-io/iwrite_all.c
+++ b/src/mpi/romio/mpi-io/iwrite_all.c
@@ -84,7 +84,7 @@ int MPIOI_File_iwrite_all(MPI_File fh,
void *e32buf=NULL;
const void *xbuf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -131,7 +131,7 @@ int MPIOI_File_iwrite_all(MPI_File fh,
fn_exit:
if (e32buf != NULL) ADIOI_Free(e32buf);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/iwrite_sh.c b/src/mpi/romio/mpi-io/iwrite_sh.c
index 9c9cc8b..3774911 100644
--- a/src/mpi/romio/mpi-io/iwrite_sh.c
+++ b/src/mpi/romio/mpi-io/iwrite_sh.c
@@ -55,7 +55,7 @@ int MPI_File_iwrite_shared(MPI_File fh, ROMIO_CONST void *buf, int count,
ADIO_Offset off, shared_fp;
static char myname[] = "MPI_FILE_IWRITE_SHARED";
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -114,7 +114,7 @@ int MPI_File_iwrite_shared(MPI_File fh, ROMIO_CONST void *buf, int count,
shared_fp, request, &error_code);
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/open.c b/src/mpi/romio/mpi-io/open.c
index 940cd3d..5fe9f82 100644
--- a/src/mpi/romio/mpi-io/open.c
+++ b/src/mpi/romio/mpi-io/open.c
@@ -59,7 +59,7 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode,
HPMP_IO_OPEN_START(fl_xmpi, comm);
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* --BEGIN ERROR HANDLING-- */
MPIO_CHECK_COMM(comm, myname, error_code);
@@ -198,7 +198,7 @@ int MPI_File_open(MPI_Comm comm, ROMIO_CONST char *filename, int amode,
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
fn_fail:
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/romio/mpi-io/prealloc.c b/src/mpi/romio/mpi-io/prealloc.c
index a8e3acc..b29c1fd 100644
--- a/src/mpi/romio/mpi-io/prealloc.c
+++ b/src/mpi/romio/mpi-io/prealloc.c
@@ -48,7 +48,7 @@ int MPI_File_preallocate(MPI_File fh, MPI_Offset size)
adio_fh, MPI_DATATYPE_NULL, -1);
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -99,7 +99,7 @@ int MPI_File_preallocate(MPI_File fh, MPI_Offset size)
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* TODO: bcast result? */
if (!mynod) return error_code;
diff --git a/src/mpi/romio/mpi-io/read.c b/src/mpi/romio/mpi-io/read.c
index 08828c3..c737ea7 100644
--- a/src/mpi/romio/mpi-io/read.c
+++ b/src/mpi/romio/mpi-io/read.c
@@ -79,7 +79,7 @@ int MPIOI_File_read(MPI_File fh,
ADIO_Offset off, bufsize;
void *xbuf=NULL, *e32_buf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -180,7 +180,7 @@ int MPIOI_File_read(MPI_File fh,
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_all.c b/src/mpi/romio/mpi-io/read_all.c
index 2579047..1e0e242 100644
--- a/src/mpi/romio/mpi-io/read_all.c
+++ b/src/mpi/romio/mpi-io/read_all.c
@@ -80,7 +80,7 @@ int MPIOI_File_read_all(MPI_File fh,
ADIO_File adio_fh;
void *xbuf=NULL, *e32_buf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -135,7 +135,7 @@ int MPIOI_File_read_all(MPI_File fh,
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_allb.c b/src/mpi/romio/mpi-io/read_allb.c
index 59e206a..4155091 100644
--- a/src/mpi/romio/mpi-io/read_allb.c
+++ b/src/mpi/romio/mpi-io/read_allb.c
@@ -67,7 +67,7 @@ int MPIOI_File_read_all_begin(MPI_File fh,
ADIO_File adio_fh;
void *xbuf=NULL, *e32_buf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -132,7 +132,7 @@ int MPIOI_File_read_all_begin(MPI_File fh,
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_alle.c b/src/mpi/romio/mpi-io/read_alle.c
index a77b54c..9ff85f6 100644
--- a/src/mpi/romio/mpi-io/read_alle.c
+++ b/src/mpi/romio/mpi-io/read_alle.c
@@ -60,7 +60,7 @@ int MPIOI_File_read_all_end(MPI_File fh,
MPIU_UNREFERENCED_ARG(buf);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -83,7 +83,7 @@ int MPIOI_File_read_all_end(MPI_File fh,
adio_fh->split_coll_count = 0;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_ord.c b/src/mpi/romio/mpi-io/read_ord.c
index 6badd0a..6494c49 100644
--- a/src/mpi/romio/mpi-io/read_ord.c
+++ b/src/mpi/romio/mpi-io/read_ord.c
@@ -53,7 +53,7 @@ int MPI_File_read_ordered(MPI_File fh, void *buf, int count,
ADIO_Offset shared_fp=0;
ADIO_File adio_fh;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -104,7 +104,7 @@ int MPI_File_read_ordered(MPI_File fh, void *buf, int count,
/* --END ERROR HANDLING-- */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* FIXME: Check for error code from ReadStridedColl? */
return error_code;
diff --git a/src/mpi/romio/mpi-io/read_ordb.c b/src/mpi/romio/mpi-io/read_ordb.c
index 1f1c9d0..13b96bf 100644
--- a/src/mpi/romio/mpi-io/read_ordb.c
+++ b/src/mpi/romio/mpi-io/read_ordb.c
@@ -50,7 +50,7 @@ int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count,
static char myname[] = "MPI_FILE_READ_ORDERED_BEGIN";
void *xbuf=NULL, *e32_buf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -131,7 +131,7 @@ int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count,
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_orde.c b/src/mpi/romio/mpi-io/read_orde.c
index 7c22247..d07e80a 100644
--- a/src/mpi/romio/mpi-io/read_orde.c
+++ b/src/mpi/romio/mpi-io/read_orde.c
@@ -45,7 +45,7 @@ int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status)
MPIU_UNREFERENCED_ARG(buf);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -69,7 +69,7 @@ int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status)
adio_fh->split_coll_count = 0;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/read_sh.c b/src/mpi/romio/mpi-io/read_sh.c
index e3a3e5b..56f39d2 100644
--- a/src/mpi/romio/mpi-io/read_sh.c
+++ b/src/mpi/romio/mpi-io/read_sh.c
@@ -52,7 +52,7 @@ int MPI_File_read_shared(MPI_File fh, void *buf, int count,
ADIO_File adio_fh;
void *xbuf=NULL, *e32_buf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -149,7 +149,7 @@ int MPI_File_read_shared(MPI_File fh, void *buf, int count,
ADIOI_Free(e32_buf);
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/register_datarep.c b/src/mpi/romio/mpi-io/register_datarep.c
index 2c20102..6186e74 100644
--- a/src/mpi/romio/mpi-io/register_datarep.c
+++ b/src/mpi/romio/mpi-io/register_datarep.c
@@ -62,7 +62,7 @@ int MPI_Register_datarep(ROMIO_CONST char *datarep,
ADIOI_Datarep *adio_datarep;
static char myname[] = "MPI_REGISTER_DATAREP";
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* --BEGIN ERROR HANDLING-- */
/* check datarep name (use strlen instead of strnlen because
@@ -139,7 +139,7 @@ int MPI_Register_datarep(ROMIO_CONST char *datarep,
error_code = MPI_SUCCESS;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/seek.c b/src/mpi/romio/mpi-io/seek.c
index be4f746..ad5b4f2 100644
--- a/src/mpi/romio/mpi-io/seek.c
+++ b/src/mpi/romio/mpi-io/seek.c
@@ -49,7 +49,7 @@ int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence)
HPMP_IO_START(fl_xmpi, BLKMPIFILESEEK, TRDTBLOCK, adio_fh, MPI_DATATYPE_NULL, -1);
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -134,6 +134,6 @@ int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence)
error_code = MPI_SUCCESS;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/seek_sh.c b/src/mpi/romio/mpi-io/seek_sh.c
index 141bcf2..1c84f15 100644
--- a/src/mpi/romio/mpi-io/seek_sh.c
+++ b/src/mpi/romio/mpi-io/seek_sh.c
@@ -41,7 +41,7 @@ int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence)
MPI_Offset curr_offset, eof_offset, tmp_offset;
ADIO_File adio_fh;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -178,7 +178,7 @@ int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence)
error_code = MPI_SUCCESS;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/set_atom.c b/src/mpi/romio/mpi-io/set_atom.c
index d338eb5..eaeb575 100644
--- a/src/mpi/romio/mpi-io/set_atom.c
+++ b/src/mpi/romio/mpi-io/set_atom.c
@@ -41,7 +41,7 @@ int MPI_File_set_atomicity(MPI_File fh, int flag)
ADIO_Fcntl_t *fcntl_struct;
ADIO_File adio_fh;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -86,6 +86,6 @@ int MPI_File_set_atomicity(MPI_File fh, int flag)
ADIOI_Free(fcntl_struct);
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/set_errh.c b/src/mpi/romio/mpi-io/set_errh.c
index eec14da..5ac6653 100644
--- a/src/mpi/romio/mpi-io/set_errh.c
+++ b/src/mpi/romio/mpi-io/set_errh.c
@@ -42,7 +42,7 @@ int MPI_File_set_errhandler(MPI_File mpi_fh, MPI_Errhandler errhandler)
ADIO_File fh;
MPIU_THREADPRIV_DECL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (mpi_fh == MPI_FILE_NULL) {
ADIOI_DFLT_ERR_HANDLER = errhandler;
@@ -71,6 +71,6 @@ int MPI_File_set_errhandler(MPI_File mpi_fh, MPI_Errhandler errhandler)
}
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/set_info.c b/src/mpi/romio/mpi-io/set_info.c
index 64e5227..67726f6 100644
--- a/src/mpi/romio/mpi-io/set_info.c
+++ b/src/mpi/romio/mpi-io/set_info.c
@@ -40,7 +40,7 @@ int MPI_File_set_info(MPI_File fh, MPI_Info info)
static char myname[] = "MPI_FILE_SET_INFO";
ADIO_File adio_fh;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -58,7 +58,7 @@ fn_exit:
error_code = MPIO_Err_return_file(adio_fh, error_code);
/* --END ERROR HANDLING-- */
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
fn_fail:
diff --git a/src/mpi/romio/mpi-io/set_size.c b/src/mpi/romio/mpi-io/set_size.c
index b1f4af3..18d061f 100644
--- a/src/mpi/romio/mpi-io/set_size.c
+++ b/src/mpi/romio/mpi-io/set_size.c
@@ -48,7 +48,7 @@ int MPI_File_set_size(MPI_File fh, MPI_Offset size)
MPI_DATATYPE_NULL, -1);
#endif /* MPI_hpux */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -99,7 +99,7 @@ int MPI_File_set_size(MPI_File fh, MPI_Offset size)
#endif /* MPI_hpux */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/set_view.c b/src/mpi/romio/mpi-io/set_view.c
index 325ec56..522caff 100644
--- a/src/mpi/romio/mpi-io/set_view.c
+++ b/src/mpi/romio/mpi-io/set_view.c
@@ -48,7 +48,7 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype,
ADIO_Offset shared_fp, byte_off;
ADIO_File adio_fh;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -193,7 +193,7 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype,
adio_fh->is_external32 = 1;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
fn_fail:
diff --git a/src/mpi/romio/mpi-io/write.c b/src/mpi/romio/mpi-io/write.c
index 51541bf..43401ae 100644
--- a/src/mpi/romio/mpi-io/write.c
+++ b/src/mpi/romio/mpi-io/write.c
@@ -80,7 +80,7 @@ int MPIOI_File_write(MPI_File fh,
void *e32buf=NULL;
const void *xbuf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -179,7 +179,7 @@ int MPIOI_File_write(MPI_File fh,
fn_exit:
if (e32buf!= NULL) ADIOI_Free(e32buf);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/write_all.c b/src/mpi/romio/mpi-io/write_all.c
index eea9ae8..27b6ede 100644
--- a/src/mpi/romio/mpi-io/write_all.c
+++ b/src/mpi/romio/mpi-io/write_all.c
@@ -81,7 +81,7 @@ int MPIOI_File_write_all(MPI_File fh,
void *e32buf=NULL;
const void *xbuf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -127,7 +127,7 @@ int MPIOI_File_write_all(MPI_File fh,
fn_exit:
if (e32buf != NULL) ADIOI_Free(e32buf);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/write_allb.c b/src/mpi/romio/mpi-io/write_allb.c
index 6f66772..bb1cd13 100644
--- a/src/mpi/romio/mpi-io/write_allb.c
+++ b/src/mpi/romio/mpi-io/write_allb.c
@@ -67,7 +67,7 @@ int MPIOI_File_write_all_begin(MPI_File fh,
void *e32buf=NULL;
const void *xbuf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -125,7 +125,7 @@ int MPIOI_File_write_all_begin(MPI_File fh,
fn_exit:
if ( e32buf != NULL) ADIOI_Free(e32buf);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/write_alle.c b/src/mpi/romio/mpi-io/write_alle.c
index 79488cc..112afd6 100644
--- a/src/mpi/romio/mpi-io/write_alle.c
+++ b/src/mpi/romio/mpi-io/write_alle.c
@@ -59,7 +59,7 @@ int MPIOI_File_write_all_end(MPI_File fh,
MPIU_UNREFERENCED_ARG(buf);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -88,7 +88,7 @@ int MPIOI_File_write_all_end(MPI_File fh,
error_code = MPI_SUCCESS;
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/romio/mpi-io/write_ord.c b/src/mpi/romio/mpi-io/write_ord.c
index d8aa198..2f407f1 100644
--- a/src/mpi/romio/mpi-io/write_ord.c
+++ b/src/mpi/romio/mpi-io/write_ord.c
@@ -56,7 +56,7 @@ int MPI_File_write_ordered(MPI_File fh, ROMIO_CONST void *buf, int count,
void *e32buf=NULL;
const void *xbuf;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -120,7 +120,7 @@ int MPI_File_write_ordered(MPI_File fh, ROMIO_CONST void *buf, int count,
fn_exit:
if (e32buf != NULL) ADIOI_Free(e32buf);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* FIXME: Check for error code from WriteStridedColl? */
return error_code;
diff --git a/src/mpi/romio/mpi-io/write_ordb.c b/src/mpi/romio/mpi-io/write_ordb.c
index b741c49..349448c 100644
--- a/src/mpi/romio/mpi-io/write_ordb.c
+++ b/src/mpi/romio/mpi-io/write_ordb.c
@@ -52,7 +52,7 @@ int MPI_File_write_ordered_begin(MPI_File fh, ROMIO_CONST void *buf, int count,
void *e32buf = NULL;
const void *xbuf=NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -125,7 +125,7 @@ int MPI_File_write_ordered_begin(MPI_File fh, ROMIO_CONST void *buf, int count,
/* --END ERROR HANDLING-- */
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* FIXME: Check for error code from WriteStridedColl? */
return error_code;
diff --git a/src/mpi/romio/mpi-io/write_orde.c b/src/mpi/romio/mpi-io/write_orde.c
index de28a08..67590d0 100644
--- a/src/mpi/romio/mpi-io/write_orde.c
+++ b/src/mpi/romio/mpi-io/write_orde.c
@@ -45,7 +45,7 @@ int MPI_File_write_ordered_end(MPI_File fh, ROMIO_CONST void *buf, MPI_Status *s
MPIU_UNREFERENCED_ARG(buf);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -70,6 +70,6 @@ int MPI_File_write_ordered_end(MPI_File fh, ROMIO_CONST void *buf, MPI_Status *s
fn_exit:
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return MPI_SUCCESS;
}
diff --git a/src/mpi/romio/mpi-io/write_sh.c b/src/mpi/romio/mpi-io/write_sh.c
index 3e9cc6b..3a8b127 100644
--- a/src/mpi/romio/mpi-io/write_sh.c
+++ b/src/mpi/romio/mpi-io/write_sh.c
@@ -54,7 +54,7 @@ int MPI_File_write_shared(MPI_File fh, ROMIO_CONST void *buf, int count,
void *e32buf = NULL;
const void *xbuf = NULL;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
adio_fh = MPIO_File_resolve(fh);
@@ -144,6 +144,6 @@ int MPI_File_write_shared(MPI_File fh, ROMIO_CONST void *buf, int count,
fn_exit:
if (e32buf != NULL) ADIOI_Free(e32buf);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return error_code;
}
diff --git a/src/mpi/spawn/close_port.c b/src/mpi/spawn/close_port.c
index 8c3b2f1..f7f27fe 100644
--- a/src/mpi/spawn/close_port.c
+++ b/src/mpi/spawn/close_port.c
@@ -57,7 +57,7 @@ int MPI_Close_port(const char *port_name)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_CLOSE_PORT);
/* ... body of routine ... */
@@ -69,7 +69,7 @@ int MPI_Close_port(const char *port_name)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_CLOSE_PORT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/spawn/comm_accept.c b/src/mpi/spawn/comm_accept.c
index 4fc7bdc..3af5c54 100644
--- a/src/mpi/spawn/comm_accept.c
+++ b/src/mpi/spawn/comm_accept.c
@@ -75,7 +75,7 @@ int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, MPI_Comm com
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_ACCEPT);
/* Validate parameters, especially handles needing to be converted */
@@ -118,7 +118,7 @@ int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, MPI_Comm com
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_ACCEPT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/spawn/comm_connect.c b/src/mpi/spawn/comm_connect.c
index 88bdfd6..dec1f5c 100644
--- a/src/mpi/spawn/comm_connect.c
+++ b/src/mpi/spawn/comm_connect.c
@@ -74,7 +74,7 @@ int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, MPI_Comm co
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_CONNECT);
/* Validate parameters, especially handles needing to be converted */
@@ -118,7 +118,7 @@ int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, MPI_Comm co
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_CONNECT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/spawn/comm_disconnect.c b/src/mpi/spawn/comm_disconnect.c
index 2957345..3c6b7f4 100644
--- a/src/mpi/spawn/comm_disconnect.c
+++ b/src/mpi/spawn/comm_disconnect.c
@@ -59,7 +59,7 @@ int MPI_Comm_disconnect(MPI_Comm * comm)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_DISCONNECT);
/* Validate parameters, especially handles needing to be converted */
@@ -132,7 +132,7 @@ int MPI_Comm_disconnect(MPI_Comm * comm)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_DISCONNECT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/spawn/comm_join.c b/src/mpi/spawn/comm_join.c
index 334a6c8..1956257 100644
--- a/src/mpi/spawn/comm_join.c
+++ b/src/mpi/spawn/comm_join.c
@@ -144,7 +144,7 @@ int MPI_Comm_join(int fd, MPI_Comm *intercomm)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_JOIN);
/* ... body of routine ... */
@@ -186,7 +186,7 @@ int MPI_Comm_join(int fd, MPI_Comm *intercomm)
fn_exit:
MPIU_CHKLMEM_FREEALL();
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_JOIN);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/spawn/comm_spawn.c b/src/mpi/spawn/comm_spawn.c
index 77e4386..ddc28df 100644
--- a/src/mpi/spawn/comm_spawn.c
+++ b/src/mpi/spawn/comm_spawn.c
@@ -72,7 +72,7 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_SPAWN);
/* Validate parameters, especially handles needing to be converted */
@@ -133,7 +133,7 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_SPAWN);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/spawn/comm_spawn_multiple.c b/src/mpi/spawn/comm_spawn_multiple.c
index b45fa87..f9eade6 100644
--- a/src/mpi/spawn/comm_spawn_multiple.c
+++ b/src/mpi/spawn/comm_spawn_multiple.c
@@ -78,7 +78,7 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[],
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_COMM_SPAWN_MULTIPLE);
/* Validate parameters, especially handles needing to be converted */
@@ -151,7 +151,7 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[],
fn_exit:
MPIU_CHKLMEM_FREEALL();
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_SPAWN_MULTIPLE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/spawn/open_port.c b/src/mpi/spawn/open_port.c
index b64c1ed..3897624 100644
--- a/src/mpi/spawn/open_port.c
+++ b/src/mpi/spawn/open_port.c
@@ -73,7 +73,7 @@ int MPI_Open_port(MPI_Info info, char *port_name)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_OPEN_PORT);
/* Validate parameters, especially handles needing to be converted */
@@ -112,7 +112,7 @@ int MPI_Open_port(MPI_Info info, char *port_name)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_OPEN_PORT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/spawn/publish_name.c b/src/mpi/spawn/publish_name.c
index de66c00..5009137 100644
--- a/src/mpi/spawn/publish_name.c
+++ b/src/mpi/spawn/publish_name.c
@@ -62,7 +62,7 @@ int MPI_Publish_name(const char *service_name, MPI_Info info, const char *port_n
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_PUBLISH_NAME);
/* Validate parameters, especially handles needing to be converted */
@@ -122,7 +122,7 @@ int MPI_Publish_name(const char *service_name, MPI_Info info, const char *port_n
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_PUBLISH_NAME);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/spawn/unpublish_name.c b/src/mpi/spawn/unpublish_name.c
index 47bd5a2..9da24a1 100644
--- a/src/mpi/spawn/unpublish_name.c
+++ b/src/mpi/spawn/unpublish_name.c
@@ -59,7 +59,7 @@ int MPI_Unpublish_name(const char *service_name, MPI_Info info, const char *port
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_UNPUBLISH_NAME);
/* Validate parameters, especially handles needing to be converted */
@@ -122,7 +122,7 @@ int MPI_Unpublish_name(const char *service_name, MPI_Info info, const char *port
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_UNPUBLISH_NAME);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/cart_create.c b/src/mpi/topo/cart_create.c
index 564d09b..722cc26 100644
--- a/src/mpi/topo/cart_create.c
+++ b/src/mpi/topo/cart_create.c
@@ -245,7 +245,7 @@ int MPI_Cart_create(MPI_Comm comm_old, int ndims, const int dims[],
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_CART_CREATE);
/* Validate parameters, especially handles needing to be converted */
@@ -307,7 +307,7 @@ int MPI_Cart_create(MPI_Comm comm_old, int ndims, const int dims[],
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_CART_CREATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/cart_sub.c b/src/mpi/topo/cart_sub.c
index 84398f0..e6a4040 100644
--- a/src/mpi/topo/cart_sub.c
+++ b/src/mpi/topo/cart_sub.c
@@ -68,7 +68,7 @@ int MPI_Cart_sub(MPI_Comm comm, const int remain_dims[], MPI_Comm *newcomm)
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_CART_SUB);
/* Validate parameters, especially handles needing to be converted */
@@ -199,7 +199,7 @@ int MPI_Cart_sub(MPI_Comm comm, const int remain_dims[], MPI_Comm *newcomm)
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_CART_SUB);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/dist_gr_create.c b/src/mpi/topo/dist_gr_create.c
index c27f70e..3be158d 100644
--- a/src/mpi/topo/dist_gr_create.c
+++ b/src/mpi/topo/dist_gr_create.c
@@ -99,7 +99,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_DIST_GRAPH_CREATE);
/* Validate parameters, especially handles needing to be converted */
@@ -408,7 +408,7 @@ int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[],
MPIU_CHKLMEM_FREEALL();
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_DIST_GRAPH_CREATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/topo/dist_gr_create_adj.c b/src/mpi/topo/dist_gr_create_adj.c
index e90fc08..6d7dea1 100644
--- a/src/mpi/topo/dist_gr_create_adj.c
+++ b/src/mpi/topo/dist_gr_create_adj.c
@@ -84,7 +84,7 @@ int MPI_Dist_graph_create_adjacent(MPI_Comm comm_old,
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_DIST_GRAPH_CREATE_ADJACENT);
/* Validate parameters, especially handles needing to be converted */
@@ -182,7 +182,7 @@ int MPI_Dist_graph_create_adjacent(MPI_Comm comm_old,
/* ... end of body of routine ... */
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_DIST_GRAPH_CREATE_ADJACENT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
diff --git a/src/mpi/topo/dist_gr_neighb.c b/src/mpi/topo/dist_gr_neighb.c
index 4246bcc..01304ec 100644
--- a/src/mpi/topo/dist_gr_neighb.c
+++ b/src/mpi/topo/dist_gr_neighb.c
@@ -97,7 +97,7 @@ int MPI_Dist_graph_neighbors(MPI_Comm comm,
MPIR_ERRTEST_INITIALIZED_ORDIE();
/* FIXME: Why does this routine need a CS */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_DIST_GRAPH_NEIGHBORS);
/* Validate parameters, especially handles needing to be converted */
@@ -144,7 +144,7 @@ int MPI_Dist_graph_neighbors(MPI_Comm comm,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_DIST_GRAPH_NEIGHBORS);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/dist_gr_neighb_count.c b/src/mpi/topo/dist_gr_neighb_count.c
index caddf10..239d59f 100644
--- a/src/mpi/topo/dist_gr_neighb_count.c
+++ b/src/mpi/topo/dist_gr_neighb_count.c
@@ -82,7 +82,7 @@ int MPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree, int *outdegree,
MPIR_ERRTEST_INITIALIZED_ORDIE();
/* FIXME: Why does this routine require a CS? */
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_DIST_GRAPH_NEIGHBORS_COUNT);
/* Validate parameters, especially handles needing to be converted */
@@ -124,7 +124,7 @@ int MPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree, int *outdegree,
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_DIST_GRAPH_NEIGHBORS_COUNT);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/graphcreate.c b/src/mpi/topo/graphcreate.c
index 0da6e25..94c3296 100644
--- a/src/mpi/topo/graphcreate.c
+++ b/src/mpi/topo/graphcreate.c
@@ -177,7 +177,7 @@ int MPI_Graph_create(MPI_Comm comm_old, int nnodes, const int indx[],
MPIR_ERRTEST_INITIALIZED_ORDIE();
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_GRAPH_CREATE);
/* Validate parameters, especially handles needing to be converted */
@@ -310,7 +310,7 @@ int MPI_Graph_create(MPI_Comm comm_old, int nnodes, const int indx[],
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_GRAPH_CREATE);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/inhb_allgather.c b/src/mpi/topo/inhb_allgather.c
index 24da679..fa4e83d 100644
--- a/src/mpi/topo/inhb_allgather.c
+++ b/src/mpi/topo/inhb_allgather.c
@@ -146,7 +146,7 @@ int MPI_Ineighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sen
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_INEIGHBOR_ALLGATHER);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INEIGHBOR_ALLGATHER);
/* Validate parameters, especially handles needing to be converted */
@@ -208,7 +208,7 @@ int MPI_Ineighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sen
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INEIGHBOR_ALLGATHER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/inhb_allgatherv.c b/src/mpi/topo/inhb_allgatherv.c
index 85f6be3..ba73a37 100644
--- a/src/mpi/topo/inhb_allgatherv.c
+++ b/src/mpi/topo/inhb_allgatherv.c
@@ -151,7 +151,7 @@ int MPI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype se
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_INEIGHBOR_ALLGATHERV);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INEIGHBOR_ALLGATHERV);
/* Validate parameters, especially handles needing to be converted */
@@ -214,7 +214,7 @@ int MPI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype se
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INEIGHBOR_ALLGATHERV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/inhb_alltoall.c b/src/mpi/topo/inhb_alltoall.c
index a0eb573..3a0590e 100644
--- a/src/mpi/topo/inhb_alltoall.c
+++ b/src/mpi/topo/inhb_alltoall.c
@@ -152,7 +152,7 @@ int MPI_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype send
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_INEIGHBOR_ALLTOALL);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INEIGHBOR_ALLTOALL);
/* Validate parameters, especially handles needing to be converted */
@@ -214,7 +214,7 @@ int MPI_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype send
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INEIGHBOR_ALLTOALL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/inhb_alltoallv.c b/src/mpi/topo/inhb_alltoallv.c
index 70ce0e7..8e0f91a 100644
--- a/src/mpi/topo/inhb_alltoallv.c
+++ b/src/mpi/topo/inhb_alltoallv.c
@@ -157,7 +157,7 @@ int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const i
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_INEIGHBOR_ALLTOALLV);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INEIGHBOR_ALLTOALLV);
/* Validate parameters, especially handles needing to be converted */
@@ -218,7 +218,7 @@ int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const i
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INEIGHBOR_ALLTOALLV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/inhb_alltoallw.c b/src/mpi/topo/inhb_alltoallw.c
index a489c93..8ad41c5 100644
--- a/src/mpi/topo/inhb_alltoallw.c
+++ b/src/mpi/topo/inhb_alltoallw.c
@@ -148,7 +148,7 @@ int MPI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const M
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_INEIGHBOR_ALLTOALLW);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_INEIGHBOR_ALLTOALLW);
/* Validate parameters, especially handles needing to be converted */
@@ -191,7 +191,7 @@ int MPI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const M
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_INEIGHBOR_ALLTOALLW);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/nhb_allgather.c b/src/mpi/topo/nhb_allgather.c
index e0837ca..d5d76e8 100644
--- a/src/mpi/topo/nhb_allgather.c
+++ b/src/mpi/topo/nhb_allgather.c
@@ -106,7 +106,7 @@ int MPI_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype send
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_NEIGHBOR_ALLGATHER);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_NEIGHBOR_ALLGATHER);
/* Validate parameters, especially handles needing to be converted */
@@ -163,7 +163,7 @@ int MPI_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype send
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_NEIGHBOR_ALLGATHER);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/nhb_allgatherv.c b/src/mpi/topo/nhb_allgatherv.c
index 6320c74..5b6d803 100644
--- a/src/mpi/topo/nhb_allgatherv.c
+++ b/src/mpi/topo/nhb_allgatherv.c
@@ -107,7 +107,7 @@ int MPI_Neighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sen
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_NEIGHBOR_ALLGATHERV);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_NEIGHBOR_ALLGATHERV);
/* Validate parameters, especially handles needing to be converted */
@@ -164,7 +164,7 @@ int MPI_Neighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sen
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_NEIGHBOR_ALLGATHERV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/nhb_alltoall.c b/src/mpi/topo/nhb_alltoall.c
index 1dff5c7..38507da 100644
--- a/src/mpi/topo/nhb_alltoall.c
+++ b/src/mpi/topo/nhb_alltoall.c
@@ -110,7 +110,7 @@ int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendt
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_NEIGHBOR_ALLTOALL);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_NEIGHBOR_ALLTOALL);
/* Validate parameters, especially handles needing to be converted */
@@ -167,7 +167,7 @@ int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendt
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_NEIGHBOR_ALLTOALL);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/nhb_alltoallv.c b/src/mpi/topo/nhb_alltoallv.c
index 99e8c80..797abe8 100644
--- a/src/mpi/topo/nhb_alltoallv.c
+++ b/src/mpi/topo/nhb_alltoallv.c
@@ -105,7 +105,7 @@ int MPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const in
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_NEIGHBOR_ALLTOALLV);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_NEIGHBOR_ALLTOALLV);
/* Validate parameters, especially handles needing to be converted */
@@ -162,7 +162,7 @@ int MPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const in
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_NEIGHBOR_ALLTOALLV);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpi/topo/nhb_alltoallw.c b/src/mpi/topo/nhb_alltoallw.c
index 686c26c..53a8987 100644
--- a/src/mpi/topo/nhb_alltoallw.c
+++ b/src/mpi/topo/nhb_alltoallw.c
@@ -105,7 +105,7 @@ int MPI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MP
MPID_Comm *comm_ptr = NULL;
MPID_MPI_STATE_DECL(MPID_STATE_MPI_NEIGHBOR_ALLTOALLW);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_NEIGHBOR_ALLTOALLW);
/* Validate parameters, especially handles needing to be converted */
@@ -147,7 +147,7 @@ int MPI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MP
fn_exit:
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_NEIGHBOR_ALLTOALLW);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
return mpi_errno;
fn_fail:
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_isend.c b/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
index 862efa7..168f96f 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_isend.c
@@ -46,7 +46,7 @@ int MPIDI_CH3_iSend (MPIDI_VC_t *vc, MPID_Request *sreq, void * hdr, MPIDI_msg_s
hdr_sz = sizeof(MPIDI_CH3_Pkt_t);
MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t*)hdr);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
in_cs = TRUE;
if (MPIDI_CH3I_Sendq_empty(MPIDI_CH3I_shm_sendq))
@@ -88,7 +88,7 @@ int MPIDI_CH3_iSend (MPIDI_VC_t *vc, MPID_Request *sreq, void * hdr, MPIDI_msg_s
fn_exit:
if (in_cs) {
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
}
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_ISEND);
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c b/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
index e89dcc7..71bf343 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
@@ -63,7 +63,7 @@ int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPL_IOV *iov, int n_io
iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *)iov[0].MPL_IOV_BUF);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
in_cs = TRUE;
if (MPIDI_CH3I_Sendq_empty(MPIDI_CH3I_shm_sendq))
@@ -185,7 +185,7 @@ int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPL_IOV *iov, int n_io
fn_exit:
if (in_cs) {
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
}
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_ISENDV);
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
index 3ff067f..65d94af 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c
@@ -49,7 +49,7 @@ int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, MPID_
hdr_sz = sizeof(MPIDI_CH3_Pkt_t);
MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t*)hdr);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
in_cs = 1;
if (MPIDI_CH3I_Sendq_empty(MPIDI_CH3I_shm_sendq))
@@ -75,7 +75,7 @@ int MPIDI_CH3_iStartMsg (MPIDI_VC_t *vc, void *hdr, MPIDI_msg_sz_t hdr_sz, MPID_
fn_exit:
if (in_cs) {
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
}
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_ISTARTMSG);
return mpi_errno;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
index d4792f0..71168ae 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c
@@ -71,7 +71,7 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPL_IOV *iov, int n_iov, MPID_Request
iov[0].MPL_IOV_LEN = sizeof(MPIDI_CH3_Pkt_t);
MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t*)iov[0].MPL_IOV_BUF);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
in_cs = TRUE;
if (MPIDI_CH3I_Sendq_empty(MPIDI_CH3I_shm_sendq))
@@ -184,7 +184,7 @@ int MPIDI_CH3_iStartMsgv (MPIDI_VC_t *vc, MPL_IOV *iov, int n_iov, MPID_Request
fn_exit:
if (in_cs) {
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
}
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_ISTARTMSGV);
return mpi_errno;
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
index e3c80aa..ed75801 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
@@ -303,7 +303,7 @@ int MPIDI_CH3I_Progress_register_hook(int (*progress_fn)(int*), int *id)
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_PROGRESS_REGISTER_HOOK);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS_REGISTER_HOOK);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
for (i = 0; i < MAX_PROGRESS_HOOKS; i++) {
if (progress_hooks[i].func_ptr == NULL) {
@@ -322,7 +322,7 @@ int MPIDI_CH3I_Progress_register_hook(int (*progress_fn)(int*), int *id)
(*id) = i;
fn_exit:
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS_REGISTER_HOOK);
return mpi_errno;
@@ -340,7 +340,7 @@ int MPIDI_CH3I_Progress_deregister_hook(int id)
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_PROGRESS_DEREGISTER_HOOK);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS_DEREGISTER_HOOK);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIU_Assert(id >= 0 && id < MAX_PROGRESS_HOOKS && progress_hooks[id].func_ptr != NULL);
@@ -348,7 +348,7 @@ int MPIDI_CH3I_Progress_deregister_hook(int id)
progress_hooks[id].active = FALSE;
fn_exit:
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS_DEREGISTER_HOOK);
return mpi_errno;
@@ -367,14 +367,14 @@ int MPIDI_CH3I_Progress_activate_hook(int id)
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_PROGRESS_ACTIVATE_HOOK);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS_ACTIVATE_HOOK);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIU_Assert(id >= 0 && id < MAX_PROGRESS_HOOKS &&
progress_hooks[id].active == FALSE && progress_hooks[id].func_ptr != NULL);
progress_hooks[id].active = TRUE;
fn_exit:
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS_ACTIVATE_HOOK);
return mpi_errno;
@@ -393,14 +393,14 @@ int MPIDI_CH3I_Progress_deactivate_hook(int id)
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_PROGRESS_DEACTIVATE_HOOK);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS_DEACTIVATE_HOOK);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIU_Assert(id >= 0 && id < MAX_PROGRESS_HOOKS &&
progress_hooks[id].active == TRUE && progress_hooks[id].func_ptr != NULL);
progress_hooks[id].active = FALSE;
fn_exit:
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS_DEACTIVATE_HOOK);
return mpi_errno;
@@ -423,7 +423,7 @@ int MPIDI_CH3I_Progress (MPID_Progress_state *progress_state, int is_blocking)
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* sanity: if this doesn't hold, we can't track our local view of completion safely */
if (is_blocking) {
@@ -619,7 +619,7 @@ int MPIDI_CH3I_Progress (MPID_Progress_state *progress_state, int is_blocking)
{
if (is_blocking) {
MPIDI_CH3I_progress_blocked = TRUE;
- MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* MPIDCOMM yield is needed because at least the send
* functions acquire MPIDCOMM to put things into the send
* queues. Failure to yield could result in a deadlock.
@@ -630,7 +630,7 @@ int MPIDI_CH3I_Progress (MPID_Progress_state *progress_state, int is_blocking)
* sections besides the MPIDCOMM CS at this point.
* Violating this will probably lead to lock-ordering
* deadlocks. */
- MPID_THREAD_CS_YIELD(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_YIELD(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIDI_CH3I_progress_blocked = FALSE;
MPIDI_CH3I_progress_wakeup_signalled = FALSE;
}
@@ -655,7 +655,7 @@ int MPIDI_CH3I_Progress (MPID_Progress_state *progress_state, int is_blocking)
#endif
fn_exit:
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS);
return mpi_errno;
fn_fail:
@@ -678,7 +678,7 @@ static int MPIDI_CH3I_Progress_delay(unsigned int completion_count)
/* FIXME should be appropriately abstracted somehow */
# if defined(MPICH_IS_THREADED) && (MPICH_THREAD_GRANULARITY == MPIR_THREAD_GRANULARITY_GLOBAL)
{
- MPID_Thread_cond_wait(&MPIDI_CH3I_progress_completion_cond, &MPIR_THREAD_GLOBAL_MUTEX/*MPIDCOMM*/, &err);
+ MPID_Thread_cond_wait(&MPIDI_CH3I_progress_completion_cond, &MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX/*MPIDCOMM*/, &err);
}
# endif
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c b/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
index 53014b0..e1de8a0 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
@@ -29,7 +29,7 @@ int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header,
MPIDI_DBG_Print_packet((MPIDI_CH3_Pkt_t *)header);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (!MPIDI_CH3I_Sendq_empty(MPIDI_CH3I_shm_sendq)) /* MT */
{
@@ -96,7 +96,7 @@ int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header,
}
fn_exit:
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_SENDNONCONTIG);
return mpi_errno;
fn_fail:
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
index 19bb8da..08100fc 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
@@ -478,7 +478,7 @@ MPID_nem_vc_init (MPIDI_VC_t *vc)
/* MT we acquire the LMT CS here, b/c there is at least a theoretical race
* on some fields, such as lmt_copy_buf. In practice it's not an issue, but
* this will keep DRD happy. */
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* override rendezvous functions */
vc->rndvSend_fn = MPID_nem_lmt_RndvSend;
@@ -599,7 +599,7 @@ MPID_nem_vc_init (MPIDI_VC_t *vc)
}
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* FIXME: ch3 assumes there is a field called sendq_head in the ch
portion of the vc. This is unused in nemesis and should be set
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
index 6fd751e..424c61e 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
@@ -122,13 +122,13 @@ int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, MPI_Aint coun
MPIDI_Request_set_seqnum(sreq, seqnum);
sreq->ch.vc = vc;
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
mpi_errno = vc->ch.lmt_initiate_lmt(vc, &upkt.p, sreq);
if (MPIR_CVAR_ENABLE_FT) {
if (MPI_SUCCESS == mpi_errno)
MPID_nem_lmt_rtsq_enqueue(&vc->ch.lmt_rts_queue, sreq);
}
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
fn_exit:
@@ -321,12 +321,12 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
MPID_Request_get_ptr(cts_pkt->sender_req_id, sreq);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (MPIR_CVAR_ENABLE_FT) {
/* Remove the request from the VC RTS queue. */
MPID_nem_lmt_rtsq_search_remove(&vc->ch.lmt_rts_queue, cts_pkt->sender_req_id, &rts_sreq);
}
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
sreq->ch.lmt_req_id = cts_pkt->receiver_req_id;
sreq->ch.lmt_data_sz = cts_pkt->data_sz;
@@ -348,9 +348,9 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
/* if whole cookie has been received, start the send */
sreq->ch.lmt_tmp_cookie.MPL_IOV_BUF = data_buf;
sreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = cts_pkt->cookie_len;
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
mpi_errno = vc->ch.lmt_start_send(vc, sreq, sreq->ch.lmt_tmp_cookie);
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (mpi_errno) MPIR_ERR_POP (mpi_errno);
sreq->ch.lmt_tmp_cookie.MPL_IOV_LEN = 0;
*buflen = sizeof(MPIDI_CH3_Pkt_t) + cts_pkt->cookie_len;
@@ -378,9 +378,9 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
else
{
MPL_IOV cookie = {0,0};
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
mpi_errno = vc->ch.lmt_start_send(vc, sreq, cookie);
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (mpi_errno) MPIR_ERR_POP (mpi_errno);
*buflen = sizeof(MPIDI_CH3_Pkt_t);
*rreqp = NULL;
@@ -411,7 +411,7 @@ static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
*buflen = sizeof(MPIDI_CH3_Pkt_t);
MPID_Request_get_ptr(done_pkt->req_id, req);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
switch (MPIDI_Request_get_type(req))
{
@@ -434,7 +434,7 @@ static int pkt_DONE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
*rreqp = NULL;
fn_exit:
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIDI_FUNC_EXIT(MPID_STATE_PKT_DONE_HANDLER);
return mpi_errno;
fn_fail:
@@ -480,9 +480,9 @@ static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz
cookie.MPL_IOV_BUF = data_buf;
cookie.MPL_IOV_LEN = cookie_pkt->cookie_len;
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
mpi_errno = vc->ch.lmt_handle_cookie(vc, req, cookie);
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
*rreqp = NULL;
@@ -510,9 +510,9 @@ static int pkt_COOKIE_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz
{
MPL_IOV cookie = {0,0};
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
mpi_errno = vc->ch.lmt_handle_cookie(vc, req, cookie);
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
*buflen = sizeof(MPIDI_CH3_Pkt_t);
*rreqp = NULL;
@@ -556,9 +556,9 @@ static int do_cts(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
s_cookie = rreq->ch.lmt_tmp_cookie;
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
mpi_errno = vc->ch.lmt_start_recv(vc, rreq, s_cookie);
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
/* free cookie buffer allocated in RTS handler */
@@ -592,9 +592,9 @@ static int do_send(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
r_cookie = sreq->ch.lmt_tmp_cookie;
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
mpi_errno = vc->ch.lmt_start_send(vc, sreq, r_cookie);
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
/* free cookie buffer allocated in CTS handler */
@@ -625,9 +625,9 @@ static int do_cookie(MPIDI_VC_t *vc, MPID_Request *rreq, int *complete)
cookie = req->ch.lmt_tmp_cookie;
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
mpi_errno = vc->ch.lmt_handle_cookie(vc, req, cookie);
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (mpi_errno) MPIR_ERR_POP (mpi_errno);
/* free cookie buffer allocated in COOKIE handler */
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
index 57fe247..aa11809 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_shm.c
@@ -825,13 +825,13 @@ int MPID_nem_lmt_shm_vc_terminated(MPIDI_VC_t *vc)
/* If there is anything in the RTS queue, it needs to be cleared out. */
if (MPIR_CVAR_ENABLE_FT) {
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
while (!MPID_nem_lmt_rtsq_empty(vc_ch->lmt_rts_queue)) {
MPID_nem_lmt_rtsq_dequeue(&vc_ch->lmt_rts_queue, &req);
req->status.MPI_ERROR = req_errno;
MPID_Request_complete(req);
}
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
}
/* We empty the vc queue, but don't remove the vc from the global
diff --git a/src/mpid/ch3/channels/sock/include/mpidi_ch3_post.h b/src/mpid/ch3/channels/sock/include/mpidi_ch3_post.h
index 2d45e94..d6ea20e 100644
--- a/src/mpid/ch3/channels/sock/include/mpidi_ch3_post.h
+++ b/src/mpid/ch3/channels/sock/include/mpidi_ch3_post.h
@@ -23,10 +23,10 @@
*/
#define MPIDI_CH3_Progress_start(progress_state_) \
{ \
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);\
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);\
(progress_state_)->ch.completion_count = MPIDI_CH3I_progress_completion_count;\
}
-#define MPIDI_CH3_Progress_end(progress_state_) MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX)
+#define MPIDI_CH3_Progress_end(progress_state_) MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX)
#define MPIDI_CH3_Progress_poke() (MPIDI_CH3_Progress_test())
int MPIDI_CH3I_Progress(int blocking, MPID_Progress_state *state);
diff --git a/src/mpid/ch3/channels/sock/src/ch3_progress.c b/src/mpid/ch3/channels/sock/src/ch3_progress.c
index 460c81f..d87981c 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_progress.c
@@ -742,7 +742,7 @@ static int MPIDI_CH3I_Progress_delay(unsigned int completion_count)
while (completion_count == MPIDI_CH3I_progress_completion_count)
{
MPID_Thread_cond_wait(&MPIDI_CH3I_progress_completion_cond,
- &MPIR_THREAD_GLOBAL_MUTEX, &err);
+ &MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err);
}
}
# endif
@@ -976,7 +976,7 @@ int MPIDI_CH3I_Progress_register_hook(int (*progress_fn)(int*), int *id)
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_PROGRESS_REGISTER_HOOK);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS_REGISTER_HOOK);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
for (i = 0; i < MAX_PROGRESS_HOOKS; i++) {
if (progress_hooks[i].func_ptr == NULL) {
@@ -995,7 +995,7 @@ int MPIDI_CH3I_Progress_register_hook(int (*progress_fn)(int*), int *id)
(*id) = i;
fn_exit:
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS_REGISTER_HOOK);
return mpi_errno;
@@ -1013,7 +1013,7 @@ int MPIDI_CH3I_Progress_deregister_hook(int id)
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_PROGRESS_DEREGISTER_HOOK);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS_DEREGISTER_HOOK);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIU_Assert(id >= 0 && id < MAX_PROGRESS_HOOKS && progress_hooks[id].func_ptr != NULL);
@@ -1021,7 +1021,7 @@ int MPIDI_CH3I_Progress_deregister_hook(int id)
progress_hooks[id].active = FALSE;
fn_exit:
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS_DEREGISTER_HOOK);
return mpi_errno;
@@ -1039,14 +1039,14 @@ int MPIDI_CH3I_Progress_activate_hook(int id)
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_PROGRESS_ACTIVATE_HOOK);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS_ACTIVATE_HOOK);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIU_Assert(id >= 0 && id < MAX_PROGRESS_HOOKS &&
progress_hooks[id].active == FALSE && progress_hooks[id].func_ptr != NULL);
progress_hooks[id].active = TRUE;
fn_exit:
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS_ACTIVATE_HOOK);
return mpi_errno;
@@ -1065,14 +1065,14 @@ int MPIDI_CH3I_Progress_deactivate_hook(int id)
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_PROGRESS_DEACTIVATE_HOOK);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_PROGRESS_DEACTIVATE_HOOK);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIU_Assert(id >= 0 && id < MAX_PROGRESS_HOOKS &&
progress_hooks[id].active == TRUE && progress_hooks[id].func_ptr != NULL);
progress_hooks[id].active = FALSE;
fn_exit:
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_PROGRESS_DEACTIVATE_HOOK);
return mpi_errno;
diff --git a/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c b/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c
index 915b964..7caf3a2 100644
--- a/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c
+++ b/src/mpid/ch3/src/ch3u_comm_spawn_multiple.c
@@ -175,7 +175,7 @@ int MPIDI_Comm_spawn_multiple(int count, char **commands,
/* XXX DJG don't need this, PMI API is thread-safe? */
/*MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_PMI_MUTEX);*/
/* release the global CS for spawn PMI calls */
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
pmi_errno = PMI2_Job_Spawn(count, (const char **)commands,
argcs, (const char ***)argvs,
maxprocs,
@@ -184,7 +184,7 @@ int MPIDI_Comm_spawn_multiple(int count, char **commands,
NULL, 0,
/*jobId, jobIdSize,*/ /* XXX DJG job stuff? */
pmi_errcodes);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/*MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_PMI_MUTEX);*/
MPIU_Free(argcs);
if (pmi_errno != PMI2_SUCCESS) {
diff --git a/src/mpid/ch3/src/mpid_mprobe.c b/src/mpid/ch3/src/mpid_mprobe.c
index 3ef7a20..4e00173 100644
--- a/src/mpid/ch3/src/mpid_mprobe.c
+++ b/src/mpid/ch3/src/mpid_mprobe.c
@@ -49,7 +49,7 @@ int MPID_Mprobe(int source, int tag, MPID_Comm *comm, int context_offset,
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
if (found) goto fn_exit;
- MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* FIXME could this be replaced with a progress_wait? */
mpi_errno = MPIDI_CH3_Progress_test();
@@ -69,7 +69,7 @@ int MPID_Mprobe(int source, int tag, MPID_Comm *comm, int context_offset,
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
if (found) goto fn_exit;
- MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
/* FIXME could this be replaced with a progress_wait? */
mpi_errno = MPIDI_CH3_Progress_test();
diff --git a/src/mpid/ch3/src/mpid_probe.c b/src/mpid/ch3/src/mpid_probe.c
index b21c1e7..9d8a043 100644
--- a/src/mpid/ch3/src/mpid_probe.c
+++ b/src/mpid/ch3/src/mpid_probe.c
@@ -51,7 +51,7 @@ int MPID_Probe(int source, int tag, MPID_Comm * comm, int context_offset,
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
if (found) goto fn_exit;
- MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
mpi_errno = MPIDI_CH3_Progress_test();
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
@@ -71,7 +71,7 @@ int MPID_Probe(int source, int tag, MPID_Comm * comm, int context_offset,
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
if (found) goto fn_exit;
- MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_YIELD(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
mpi_errno = MPIDI_CH3_Progress_test();
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
diff --git a/src/mpid/ch3/src/mpid_rma.c b/src/mpid/ch3/src/mpid_rma.c
index 9242f61..24e451f 100644
--- a/src/mpid/ch3/src/mpid_rma.c
+++ b/src/mpid/ch3/src/mpid_rma.c
@@ -257,7 +257,7 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
MPIDI_FUNC_ENTER(MPID_STATE_WIN_INIT);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if (initRMAoptions) {
MPIDI_CH3_RMA_Init_sync_pvars();
@@ -265,7 +265,7 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
initRMAoptions = 0;
}
- MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
*win_ptr = (MPID_Win *) MPIU_Handle_obj_alloc(&MPID_Win_mem);
MPIR_ERR_CHKANDJUMP1(!(*win_ptr), mpi_errno, MPI_ERR_OTHER, "**nomem",
diff --git a/src/mpid/common/sock/iocp/sock.c b/src/mpid/common/sock/iocp/sock.c
index c232b1d..0813837 100644
--- a/src/mpid/common/sock/iocp/sock.c
+++ b/src/mpid/common/sock/iocp/sock.c
@@ -1786,7 +1786,7 @@ int MPIDU_Sock_wait(MPIDU_Sock_set_t set, int timeout, MPIDU_Sock_event_t * out)
/* Release the lock so that other threads may make progress while this thread waits for something to do */
MPIU_DBG_MSG(THREAD,TYPICAL,"Exit global critical section");
MPIU_THREAD_CHECK_BEGIN;
- MPID_Thread_mutex_unlock(&MPIR_THREAD_GLOBAL_MUTEX, &err);
+ MPID_Thread_mutex_unlock(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err);
MPIU_THREAD_CHECK_END;
}
# else
@@ -1811,7 +1811,7 @@ int MPIDU_Sock_wait(MPIDU_Sock_set_t set, int timeout, MPIDU_Sock_event_t * out)
/* Reaquire the lock before processing any of the information returned from GetQueuedCompletionStatus */
MPIU_DBG_MSG(THREAD,TYPICAL,"Enter global critical section");
MPIU_THREAD_CHECK_BEGIN;
- MPID_Thread_mutex_lock(&MPIR_THREAD_GLOBAL_MUTEX, &err);
+ MPID_Thread_mutex_lock(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err);
MPIU_THREAD_CHECK_END;
}
# else
@@ -2404,7 +2404,7 @@ int MPIDU_Sock_wait(MPIDU_Sock_set_t set, int timeout, MPIDU_Sock_event_t * out)
/* Reaquire the lock before processing any of the information returned from GetQueuedCompletionStatus */
MPIU_DBG_MSG(THREAD,TYPICAL,"Enter global critical section");
MPIU_THREAD_CHECK_BEGIN;
- MPID_Thread_mutex_lock(&MPIR_THREAD_GLOBAL_MUTEX, &err);
+ MPID_Thread_mutex_lock(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err);
MPIU_THREAD_CHECK_END;
}
# else
diff --git a/src/mpid/common/sock/poll/sock_wait.i b/src/mpid/common/sock/poll/sock_wait.i
index adccb3b..4e29681 100644
--- a/src/mpid/common/sock/poll/sock_wait.i
+++ b/src/mpid/common/sock/poll/sock_wait.i
@@ -156,9 +156,9 @@ int MPIDU_Sock_wait(struct MPIDU_Sock_set * sock_set, int millisecond_timeout,
progress while this thread waits for something to
do */
MPIU_DBG_MSG(THREAD,TYPICAL,"Exit global critical section (sock_wait)");
- /* MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_MUTEX);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX); */
- MPID_Thread_mutex_unlock(&MPIR_THREAD_GLOBAL_MUTEX, &err);
+ /* MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); */
+ MPID_Thread_mutex_unlock(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err);
MPIDI_FUNC_ENTER(MPID_STATE_POLL);
n_fds = poll(sock_set->pollfds_active,
@@ -168,9 +168,9 @@ int MPIDU_Sock_wait(struct MPIDU_Sock_set * sock_set, int millisecond_timeout,
/* Reaquire the lock before processing any of the
information returned from poll */
MPIU_DBG_MSG(THREAD,TYPICAL,"Enter global critical section (sock_wait)");
- /* MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
- MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_MUTEX); */
- MPID_Thread_mutex_lock(&MPIR_THREAD_GLOBAL_MUTEX, &err);
+ /* MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); */
+ MPID_Thread_mutex_lock(&MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX, &err);
/*
* Update pollfds array if changes were posted while we
diff --git a/src/nameserv/pmi/pmi_nameserv.c b/src/nameserv/pmi/pmi_nameserv.c
index b9ef744..eb71da6 100644
--- a/src/nameserv/pmi/pmi_nameserv.c
+++ b/src/nameserv/pmi/pmi_nameserv.c
@@ -51,9 +51,9 @@ int MPID_NS_Publish( MPID_NS_Handle handle, const MPID_Info *info_ptr,
#ifdef USE_PMI2_API
/* release the global CS for PMI calls */
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
rc = PMI2_Nameserv_publish(service_name, info_ptr, port);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
#else
rc = PMI_Publish_name( service_name, port );
#endif
@@ -78,9 +78,9 @@ int MPID_NS_Lookup( MPID_NS_Handle handle, const MPID_Info *info_ptr,
#ifdef USE_PMI2_API
/* release the global CS for PMI calls */
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
rc = PMI2_Nameserv_lookup(service_name, info_ptr, port, MPI_MAX_PORT_NAME);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
#else
rc = PMI_Lookup_name( service_name, port );
#endif
@@ -105,9 +105,9 @@ int MPID_NS_Unpublish( MPID_NS_Handle handle, const MPID_Info *info_ptr,
#ifdef USE_PMI2_API
/* release the global CS for PMI calls */
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
rc = PMI2_Nameserv_unpublish(service_name, info_ptr);
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
#else
rc = PMI_Unpublish_name( service_name );
#endif
diff --git a/src/pmi/pmi2/poe/poe2pmi.c b/src/pmi/pmi2/poe/poe2pmi.c
index 6dd2bb0..7b01091 100644
--- a/src/pmi/pmi2/poe/poe2pmi.c
+++ b/src/pmi/pmi2/poe/poe2pmi.c
@@ -298,7 +298,7 @@ int _mpi_world_exiting_handler(int world_id)
/* struct worldExitReq *req = (struct worldExitReq *)cookie; */
MPID_Comm *comm = MPIR_Process.comm_world;
- MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
ref_count = MPIDI_get_refcnt_of_world(world_id);
TRACE_ERR("_mpi_world_exiting_handler: invoked for world %d exiting ref_count=%d my comm_word_size=%d\n", world_id, ref_count, world_size);
if(ref_count == 0) {
@@ -322,7 +322,7 @@ int _mpi_world_exiting_handler(int world_id)
TRACE_ERR("_mpi_world_exiting_handler: Out of _mpi_reduce_for_dyntask for exiting world %d reduce_state=%d\n",world_id, reduce_state);
- MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_MUTEX);
+ MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX);
if(comm->rank == 0) {
MPL_snprintf(world_id_str, sizeof(world_id_str), "%d", world_id);
PMI2_Abort(0, world_id_str);
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index 060f7ff..ed6bef6 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -144,7 +144,7 @@ typedef struct MPICH_ThreadInfo_t {
} MPICH_ThreadInfo_t;
extern MPICH_ThreadInfo_t MPIR_ThreadInfo;
-#define MPIR_THREAD_GLOBAL_MUTEX MPIR_ThreadInfo.global_mutex
+#define MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX MPIR_ThreadInfo.global_mutex
#define MPIR_THREAD_HANDLE_MUTEX MPIR_ThreadInfo.handle_mutex
#define MPIR_THREAD_MSGQ_MUTEX MPIR_ThreadInfo.msgq_mutex
#define MPIR_THREAD_COMPLETION_MUTEX MPIR_ThreadInfo.completion_mutex
http://git.mpich.org/mpich.git/commitdiff/49bda7fc5c6ee51d90a077a461243b8ef…
commit 49bda7fc5c6ee51d90a077a461243b8efc639fe9
Author: Charles J Archer <charles.j.archer(a)intel.com>
Date: Mon Aug 17 10:35:02 2015 -0700
Per-object build fix.
* Added per-object window and communicator macros
* todo: naming convention for MPIR_ perobj locks and the allfunc lock
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 8423eeb..48163b5 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1181,6 +1181,7 @@ int MPIR_Comm_map_free(struct MPID_Comm *comm);
S*/
typedef struct MPID_Comm {
MPIU_OBJECT_HEADER; /* adds handle and ref_count fields */
+ MPID_Thread_mutex_t mutex;
MPIU_Context_id_t context_id; /* Send context id. See notes */
MPIU_Context_id_t recvcontext_id; /* Send context id. See notes */
int remote_size; /* Value of MPI_Comm_(remote)_size */
@@ -1638,6 +1639,7 @@ MPID_Progress_state;
S*/
typedef struct MPID_Win {
MPIU_OBJECT_HEADER; /* adds handle and ref_count fields */
+ MPID_Thread_mutex_t mutex;
MPID_Errhandler *errhandler; /* Pointer to the error handler structure */
void *base;
MPI_Aint size;
diff --git a/src/mpi/comm/comm_set_name.c b/src/mpi/comm/comm_set_name.c
index daa9bf3..37b7538 100644
--- a/src/mpi/comm/comm_set_name.c
+++ b/src/mpi/comm/comm_set_name.c
@@ -88,9 +88,9 @@ int MPI_Comm_set_name(MPI_Comm comm, const char *comm_name)
/* ... body of routine ... */
- MPID_THREAD_CS_ENTER(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
MPIU_Strncpy( comm_ptr->name, comm_name, MPI_MAX_OBJECT_NAME );
- MPID_THREAD_CS_EXIT(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
/* ... end of body of routine ... */
diff --git a/src/mpi/comm/comm_split.c b/src/mpi/comm/comm_split.c
index 20f8294..3d03ef4 100644
--- a/src/mpi/comm/comm_split.c
+++ b/src/mpi/comm/comm_split.c
@@ -370,12 +370,12 @@ int MPIR_Comm_split_impl(MPID_Comm *comm_ptr, int color, int key, MPID_Comm **ne
}
/* Inherit the error handler (if any) */
- MPID_THREAD_CS_ENTER(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
(*newcomm_ptr)->errhandler = comm_ptr->errhandler;
if (comm_ptr->errhandler) {
MPIR_Errhandler_add_ref( comm_ptr->errhandler );
}
- MPID_THREAD_CS_EXIT(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
mpi_errno = MPIR_Comm_commit(*newcomm_ptr);
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index 84decc1..151d283 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -811,12 +811,12 @@ int MPIR_Comm_copy(MPID_Comm * comm_ptr, int size, MPID_Comm ** outcomm_ptr)
}
/* Inherit the error handler (if any) */
- MPID_THREAD_CS_ENTER(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
newcomm_ptr->errhandler = comm_ptr->errhandler;
if (comm_ptr->errhandler) {
MPIR_Errhandler_add_ref(comm_ptr->errhandler);
}
- MPID_THREAD_CS_EXIT(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
/* FIXME do we want to copy coll_fns here? */
@@ -892,12 +892,12 @@ int MPIR_Comm_copy_data(MPID_Comm * comm_ptr, MPID_Comm ** outcomm_ptr)
newcomm_ptr->is_low_group = comm_ptr->is_low_group; /* only relevant for intercomms */
/* Inherit the error handler (if any) */
- MPID_THREAD_CS_ENTER(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
newcomm_ptr->errhandler = comm_ptr->errhandler;
if (comm_ptr->errhandler) {
MPIR_Errhandler_add_ref(comm_ptr->errhandler);
}
- MPID_THREAD_CS_EXIT(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
/* FIXME do we want to copy coll_fns here? */
diff --git a/src/mpi/comm/intercomm_create.c b/src/mpi/comm/intercomm_create.c
index 362d421..d5c2769 100644
--- a/src/mpi/comm/intercomm_create.c
+++ b/src/mpi/comm/intercomm_create.c
@@ -340,12 +340,12 @@ int MPIR_Intercomm_create_impl(MPID_Comm *local_comm_ptr, int local_leader,
MPIR_Comm_map_dup(*new_intercomm_ptr, local_comm_ptr, MPIR_COMM_MAP_DIR_L2L);
/* Inherit the error handler (if any) */
- MPID_THREAD_CS_ENTER(POBJ, local_comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(local_comm_ptr));
(*new_intercomm_ptr)->errhandler = local_comm_ptr->errhandler;
if (local_comm_ptr->errhandler) {
MPIR_Errhandler_add_ref( local_comm_ptr->errhandler );
}
- MPID_THREAD_CS_EXIT(POBJ, local_comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(local_comm_ptr));
mpi_errno = MPIR_Comm_commit(*new_intercomm_ptr);
if (mpi_errno) MPIR_ERR_POP(mpi_errno);
diff --git a/src/mpi/debugger/dbginit.c b/src/mpi/debugger/dbginit.c
index 54f608f..ed3e4a5 100644
--- a/src/mpi/debugger/dbginit.c
+++ b/src/mpi/debugger/dbginit.c
@@ -456,7 +456,7 @@ void MPIR_CommL_remember( MPID_Comm *comm_ptr )
"Adding communicator %p to remember list",comm_ptr);
MPIU_DBG_MSG_P(COMM,VERBOSE,
"Remember list structure address is %p",&MPIR_All_communicators);
- MPID_THREAD_CS_ENTER(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
if (comm_ptr == MPIR_All_communicators.head) {
MPL_internal_error_printf( "Internal error: communicator is already on free list\n" );
return;
@@ -467,7 +467,7 @@ void MPIR_CommL_remember( MPID_Comm *comm_ptr )
MPIU_DBG_MSG_P(COMM,VERBOSE,
"master head is %p", MPIR_All_communicators.head );
- MPID_THREAD_CS_EXIT(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
}
void MPIR_CommL_forget( MPID_Comm *comm_ptr )
@@ -476,7 +476,7 @@ void MPIR_CommL_forget( MPID_Comm *comm_ptr )
MPIU_DBG_MSG_P(COMM,VERBOSE,
"Forgetting communicator %p from remember list",comm_ptr);
- MPID_THREAD_CS_ENTER(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
p = MPIR_All_communicators.head;
prev = 0;
while (p) {
@@ -494,7 +494,7 @@ void MPIR_CommL_forget( MPID_Comm *comm_ptr )
}
/* Record a change to the list */
MPIR_All_communicators.sequence_number++;
- MPID_THREAD_CS_EXIT(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
}
#ifdef MPIU_PROCTABLE_NEEDED
diff --git a/src/mpi/errhan/comm_call_errhandler.c b/src/mpi/errhan/comm_call_errhandler.c
index 39884cd..4ce38f9 100644
--- a/src/mpi/errhan/comm_call_errhandler.c
+++ b/src/mpi/errhan/comm_call_errhandler.c
@@ -77,7 +77,7 @@ int MPI_Comm_call_errhandler(MPI_Comm comm, int errorcode)
/* Convert MPI object handles to object pointers */
MPID_Comm_get_ptr( comm, comm_ptr );
- MPID_THREAD_CS_ENTER(POBJ, comm_ptr->pobj_mutex); /* protect access to comm_ptr->errhandler */
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr)); /* protect access to comm_ptr->errhandler */
in_cs = TRUE;
/* Validate parameters and objects (post conversion) */
@@ -156,7 +156,7 @@ int MPI_Comm_call_errhandler(MPI_Comm comm, int errorcode)
fn_exit:
if (in_cs)
- MPID_THREAD_CS_EXIT(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_COMM_CALL_ERRHANDLER);
return mpi_errno;
diff --git a/src/mpi/errhan/comm_get_errhandler.c b/src/mpi/errhan/comm_get_errhandler.c
index 6cdad86..2784712 100644
--- a/src/mpi/errhan/comm_get_errhandler.c
+++ b/src/mpi/errhan/comm_get_errhandler.c
@@ -33,11 +33,11 @@ int MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler *errhandler) __attribu
#define FCNAME MPL_QUOTE(FUNCNAME)
void MPIR_Comm_get_errhandler_impl(MPID_Comm *comm_ptr, MPID_Errhandler **errhandler_ptr)
{
- MPID_THREAD_CS_ENTER(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
*errhandler_ptr = comm_ptr->errhandler;
if (comm_ptr->errhandler)
MPIR_Errhandler_add_ref(comm_ptr->errhandler);
- MPID_THREAD_CS_EXIT(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
return;
}
diff --git a/src/mpi/errhan/comm_set_errhandler.c b/src/mpi/errhan/comm_set_errhandler.c
index e2f74f2..2b955aa 100644
--- a/src/mpi/errhan/comm_set_errhandler.c
+++ b/src/mpi/errhan/comm_set_errhandler.c
@@ -33,7 +33,7 @@ void MPIR_Comm_set_errhandler_impl(MPID_Comm *comm_ptr, MPID_Errhandler *errhand
{
int in_use;
- MPID_THREAD_CS_ENTER(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
/* We don't bother with the case where the errhandler is NULL;
in this case, the error handler was the original, MPI_ERRORS_ARE_FATAL,
@@ -48,7 +48,7 @@ void MPIR_Comm_set_errhandler_impl(MPID_Comm *comm_ptr, MPID_Errhandler *errhand
MPIR_Errhandler_add_ref(errhandler_ptr);
comm_ptr->errhandler = errhandler_ptr;
- MPID_THREAD_CS_EXIT(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
return;
}
diff --git a/src/mpi/errhan/errutil.c b/src/mpi/errhan/errutil.c
index 299ce9a..83f107c 100644
--- a/src/mpi/errhan/errutil.c
+++ b/src/mpi/errhan/errutil.c
@@ -256,9 +256,9 @@ int MPIR_Err_return_comm( MPID_Comm *comm_ptr, const char fcname[],
MPIU_DBG_MSG_FMT(ERRHAND, TERSE, (MPIU_DBG_FDEST, "MPIR_Err_return_comm(comm_ptr=%p, fcname=%s, errcode=%d)", comm_ptr, fcname, errcode));
if (comm_ptr) {
- MPID_THREAD_CS_ENTER(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
errhandler = comm_ptr->errhandler;
- MPID_THREAD_CS_EXIT(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
}
if (errhandler == NULL) {
@@ -284,12 +284,12 @@ int MPIR_Err_return_comm( MPID_Comm *comm_ptr, const char fcname[],
/* comm_ptr may have changed to comm_world. Keep this locked as long as we
* are using the errhandler to prevent it from disappearing out from under
* us. */
- MPID_THREAD_CS_ENTER(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
errhandler = comm_ptr->errhandler;
/* --BEGIN ERROR HANDLING-- */
if (errhandler == NULL || errhandler->handle == MPI_ERRORS_ARE_FATAL) {
- MPID_THREAD_CS_EXIT(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
/* Calls MPID_Abort */
MPIR_Handle_fatal_error( comm_ptr, fcname, errcode );
/* never get here */
@@ -338,7 +338,7 @@ int MPIR_Err_return_comm( MPID_Comm *comm_ptr, const char fcname[],
}
- MPID_THREAD_CS_EXIT(POBJ, comm_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr));
return errcode;
}
diff --git a/src/mpi/errhan/win_call_errhandler.c b/src/mpi/errhan/win_call_errhandler.c
index 9d3ae40..5d4b92f 100644
--- a/src/mpi/errhan/win_call_errhandler.c
+++ b/src/mpi/errhan/win_call_errhandler.c
@@ -96,7 +96,7 @@ int MPI_Win_call_errhandler(MPI_Win win, int errorcode)
/* ... body of routine ... */
- MPID_THREAD_CS_ENTER(POBJ, win_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_WIN_MUTEX(win_ptr));
in_cs = TRUE;
if (!win_ptr->errhandler ||
@@ -151,7 +151,7 @@ int MPI_Win_call_errhandler(MPI_Win win, int errorcode)
fn_exit:
if (in_cs)
- MPID_THREAD_CS_EXIT(POBJ, win_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_WIN_MUTEX(win_ptr));
MPID_MPI_FUNC_EXIT(MPID_STATE_MPI_WIN_CALL_ERRHANDLER);
return mpi_errno;
diff --git a/src/mpi/errhan/win_get_errhandler.c b/src/mpi/errhan/win_get_errhandler.c
index 6fd4887..97b561f 100644
--- a/src/mpi/errhan/win_get_errhandler.c
+++ b/src/mpi/errhan/win_get_errhandler.c
@@ -93,7 +93,7 @@ int MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler)
/* ... body of routine ... */
- MPID_THREAD_CS_ENTER(POBJ, win_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_WIN_MUTEX(win_ptr));
if (win_ptr->errhandler) {
*errhandler = win_ptr->errhandler->handle;
@@ -104,7 +104,7 @@ int MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler)
*errhandler = MPI_ERRORS_ARE_FATAL;
}
- MPID_THREAD_CS_EXIT(POBJ, win_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_WIN_MUTEX(win_ptr));
/* ... end of body of routine ... */
diff --git a/src/mpi/errhan/win_set_errhandler.c b/src/mpi/errhan/win_set_errhandler.c
index 3c638d3..44548b4 100644
--- a/src/mpi/errhan/win_set_errhandler.c
+++ b/src/mpi/errhan/win_set_errhandler.c
@@ -104,7 +104,7 @@ int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler)
/* ... body of routine ... */
- MPID_THREAD_CS_ENTER(POBJ, win_ptr->pobj_mutex);
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_WIN_MUTEX(win_ptr));
if (win_ptr->errhandler != NULL) {
MPIR_Errhandler_release_ref(win_ptr->errhandler,&in_use);
@@ -116,7 +116,7 @@ int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler)
MPIR_Errhandler_add_ref(errhan_ptr);
win_ptr->errhandler = errhan_ptr;
- MPID_THREAD_CS_EXIT(POBJ, win_ptr->pobj_mutex);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_WIN_MUTEX(win_ptr));
/* ... end of body of routine ... */
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index 0c9d3f1..060f7ff 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -151,6 +151,8 @@ extern MPICH_ThreadInfo_t MPIR_ThreadInfo;
#define MPIR_THREAD_CTX_MUTEX MPIR_ThreadInfo.ctx_mutex
#define MPIR_THREAD_PMI_MUTEX MPIR_ThreadInfo.pmi_mutex
#define MPIR_THREAD_MEMALLOC_MUTEX MPIR_ThreadInfo.memalloc_mutex
+#define MPIR_THREAD_POBJ_COMM_MUTEX(_comm_ptr) _comm_ptr->mutex
+#define MPIR_THREAD_POBJ_WIN_MUTEX(_win_ptr) _win_ptr->mutex
/* ------------------------------------------------------------------------- */
/* thread-local storage macros */
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 23 +---
src/binding/fortran/use_mpi/create_f90_complex.c | 4 +-
src/binding/fortran/use_mpi/create_f90_int.c | 4 +-
src/binding/fortran/use_mpi/create_f90_real.c | 4 +-
src/glue/romio/glue_romio.c | 12 +-
src/include/glue_romio.h.in | 6 +-
src/include/mpiimpl.h | 2 +
src/mpi/attr/attr_delete.c | 4 +-
src/mpi/attr/attr_get.c | 4 +-
src/mpi/attr/attr_put.c | 4 +-
src/mpi/attr/attrutil.c | 8 +-
src/mpi/attr/comm_create_keyval.c | 4 +-
src/mpi/attr/comm_delete_attr.c | 4 +-
src/mpi/attr/comm_free_keyval.c | 4 +-
src/mpi/attr/comm_get_attr.c | 8 +-
src/mpi/attr/comm_set_attr.c | 8 +-
src/mpi/attr/keyval_create.c | 4 +-
src/mpi/attr/keyval_free.c | 4 +-
src/mpi/attr/type_create_keyval.c | 4 +-
src/mpi/attr/type_delete_attr.c | 4 +-
src/mpi/attr/type_free_keyval.c | 4 +-
src/mpi/attr/type_get_attr.c | 4 +-
src/mpi/attr/type_set_attr.c | 4 +-
src/mpi/attr/win_create_keyval.c | 4 +-
src/mpi/attr/win_delete_attr.c | 4 +-
src/mpi/attr/win_free_keyval.c | 4 +-
src/mpi/attr/win_get_attr.c | 4 +-
src/mpi/attr/win_set_attr.c | 4 +-
src/mpi/coll/allgather.c | 4 +-
src/mpi/coll/allgatherv.c | 4 +-
src/mpi/coll/allreduce.c | 4 +-
src/mpi/coll/alltoall.c | 4 +-
src/mpi/coll/alltoallv.c | 4 +-
src/mpi/coll/alltoallw.c | 4 +-
src/mpi/coll/barrier.c | 4 +-
src/mpi/coll/bcast.c | 4 +-
src/mpi/coll/exscan.c | 4 +-
src/mpi/coll/gather.c | 4 +-
src/mpi/coll/gatherv.c | 4 +-
src/mpi/coll/iallgather.c | 4 +-
src/mpi/coll/iallgatherv.c | 4 +-
src/mpi/coll/iallreduce.c | 4 +-
src/mpi/coll/ialltoall.c | 4 +-
src/mpi/coll/ialltoallv.c | 4 +-
src/mpi/coll/ialltoallw.c | 4 +-
src/mpi/coll/ibarrier.c | 4 +-
src/mpi/coll/ibcast.c | 4 +-
src/mpi/coll/iexscan.c | 4 +-
src/mpi/coll/igather.c | 4 +-
src/mpi/coll/igatherv.c | 4 +-
src/mpi/coll/ired_scat.c | 4 +-
src/mpi/coll/ired_scat_block.c | 4 +-
src/mpi/coll/ireduce.c | 4 +-
src/mpi/coll/iscan.c | 4 +-
src/mpi/coll/iscatter.c | 4 +-
src/mpi/coll/iscatterv.c | 4 +-
src/mpi/coll/op_commutative.c | 4 +-
src/mpi/coll/op_create.c | 4 +-
src/mpi/coll/op_free.c | 4 +-
src/mpi/coll/red_scat.c | 4 +-
src/mpi/coll/red_scat_block.c | 4 +-
src/mpi/coll/reduce.c | 4 +-
src/mpi/coll/reduce_local.c | 4 +-
src/mpi/coll/scan.c | 4 +-
src/mpi/coll/scatter.c | 4 +-
src/mpi/coll/scatterv.c | 4 +-
src/mpi/comm/comm_agree.c | 4 +-
src/mpi/comm/comm_compare.c | 4 +-
src/mpi/comm/comm_create.c | 4 +-
src/mpi/comm/comm_create_group.c | 4 +-
src/mpi/comm/comm_dup.c | 4 +-
src/mpi/comm/comm_dup_with_info.c | 4 +-
src/mpi/comm/comm_failure_ack.c | 4 +-
src/mpi/comm/comm_failure_get_acked.c | 4 +-
src/mpi/comm/comm_free.c | 4 +-
src/mpi/comm/comm_get_info.c | 4 +-
src/mpi/comm/comm_group.c | 4 +-
src/mpi/comm/comm_idup.c | 4 +-
src/mpi/comm/comm_rank.c | 4 +-
src/mpi/comm/comm_remote_group.c | 4 +-
src/mpi/comm/comm_revoke.c | 4 +-
src/mpi/comm/comm_set_info.c | 4 +-
src/mpi/comm/comm_set_name.c | 4 +-
src/mpi/comm/comm_shrink.c | 4 +-
src/mpi/comm/comm_split.c | 8 +-
src/mpi/comm/comm_split_type.c | 4 +-
src/mpi/comm/commutil.c | 8 +-
src/mpi/comm/contextid.c | 6 +-
src/mpi/comm/intercomm_create.c | 8 +-
src/mpi/comm/intercomm_merge.c | 4 +-
src/mpi/datatype/get_elements_x.c | 4 +-
src/mpi/datatype/register_datarep.c | 4 +-
src/mpi/datatype/status_set_elements_x.c | 4 +-
src/mpi/datatype/type_commit.c | 4 +-
src/mpi/datatype/type_contiguous.c | 4 +-
src/mpi/datatype/type_create_darray.c | 4 +-
src/mpi/datatype/type_create_hindexed.c | 4 +-
src/mpi/datatype/type_create_hindexed_block.c | 4 +-
src/mpi/datatype/type_create_hvector.c | 4 +-
src/mpi/datatype/type_create_indexed_block.c | 4 +-
src/mpi/datatype/type_create_resized.c | 4 +-
src/mpi/datatype/type_create_struct.c | 4 +-
src/mpi/datatype/type_create_subarray.c | 4 +-
src/mpi/datatype/type_dup.c | 4 +-
src/mpi/datatype/type_free.c | 4 +-
src/mpi/datatype/type_get_contents.c | 4 +-
src/mpi/datatype/type_get_extent_x.c | 4 +-
src/mpi/datatype/type_get_name.c | 4 +-
src/mpi/datatype/type_get_true_extent_x.c | 4 +-
src/mpi/datatype/type_hindexed.c | 4 +-
src/mpi/datatype/type_hvector.c | 4 +-
src/mpi/datatype/type_indexed.c | 4 +-
src/mpi/datatype/type_match_size.c | 4 +-
src/mpi/datatype/type_size_x.c | 4 +-
src/mpi/datatype/type_struct.c | 4 +-
src/mpi/datatype/type_vector.c | 4 +-
src/mpi/debugger/dbginit.c | 8 +-
src/mpi/errhan/add_error_class.c | 4 +-
src/mpi/errhan/add_error_code.c | 4 +-
src/mpi/errhan/add_error_string.c | 4 +-
src/mpi/errhan/comm_call_errhandler.c | 4 +-
src/mpi/errhan/comm_create_errhandler.c | 4 +-
src/mpi/errhan/comm_get_errhandler.c | 8 +-
src/mpi/errhan/comm_set_errhandler.c | 8 +-
src/mpi/errhan/errhandler_create.c | 4 +-
src/mpi/errhan/errhandler_free.c | 4 +-
src/mpi/errhan/errhandler_get.c | 4 +-
src/mpi/errhan/errhandler_set.c | 4 +-
src/mpi/errhan/errutil.c | 10 +-
src/mpi/errhan/file_create_errhandler.c | 4 +-
src/mpi/errhan/file_get_errhandler.c | 4 +-
src/mpi/errhan/win_call_errhandler.c | 4 +-
src/mpi/errhan/win_create_errhandler.c | 4 +-
src/mpi/errhan/win_get_errhandler.c | 8 +-
src/mpi/errhan/win_set_errhandler.c | 4 +-
src/mpi/group/group_compare.c | 4 +-
src/mpi/group/group_difference.c | 4 +-
src/mpi/group/group_excl.c | 4 +-
src/mpi/group/group_free.c | 4 +-
src/mpi/group/group_incl.c | 4 +-
src/mpi/group/group_intersection.c | 4 +-
src/mpi/group/group_range_excl.c | 4 +-
src/mpi/group/group_range_incl.c | 4 +-
src/mpi/group/group_translate_ranks.c | 4 +-
src/mpi/group/group_union.c | 4 +-
src/mpi/info/info_create.c | 4 +-
src/mpi/info/info_delete.c | 4 +-
src/mpi/info/info_dup.c | 4 +-
src/mpi/info/info_free.c | 4 +-
src/mpi/info/info_get.c | 4 +-
src/mpi/info/info_getn.c | 4 +-
src/mpi/info/info_getnth.c | 4 +-
src/mpi/info/info_getvallen.c | 4 +-
src/mpi/info/info_set.c | 4 +-
src/mpi/init/abort.c | 4 +-
src/mpi/init/async.c | 8 +-
src/mpi/init/finalize.c | 6 +-
src/mpi/init/initthread.c | 16 +-
src/mpi/pt2pt/bsend.c | 4 +-
src/mpi/pt2pt/bsend_init.c | 4 +-
src/mpi/pt2pt/bufattach.c | 4 +-
src/mpi/pt2pt/buffree.c | 4 +-
src/mpi/pt2pt/cancel.c | 4 +-
src/mpi/pt2pt/greq_complete.c | 4 +-
src/mpi/pt2pt/greq_start.c | 4 +-
src/mpi/pt2pt/ibsend.c | 4 +-
src/mpi/pt2pt/improbe.c | 4 +-
src/mpi/pt2pt/imrecv.c | 4 +-
src/mpi/pt2pt/iprobe.c | 4 +-
src/mpi/pt2pt/irecv.c | 4 +-
src/mpi/pt2pt/irsend.c | 4 +-
src/mpi/pt2pt/isend.c | 4 +-
src/mpi/pt2pt/issend.c | 4 +-
src/mpi/pt2pt/mprobe.c | 4 +-
src/mpi/pt2pt/mrecv.c | 4 +-
src/mpi/pt2pt/probe.c | 4 +-
src/mpi/pt2pt/recv.c | 4 +-
src/mpi/pt2pt/recv_init.c | 4 +-
src/mpi/pt2pt/request_free.c | 4 +-
src/mpi/pt2pt/request_get_status.c | 4 +-
src/mpi/pt2pt/rsend.c | 4 +-
src/mpi/pt2pt/rsend_init.c | 4 +-
src/mpi/pt2pt/send.c | 4 +-
src/mpi/pt2pt/send_init.c | 4 +-
src/mpi/pt2pt/sendrecv.c | 4 +-
src/mpi/pt2pt/sendrecv_rep.c | 4 +-
src/mpi/pt2pt/ssend.c | 4 +-
src/mpi/pt2pt/ssend_init.c | 4 +-
src/mpi/pt2pt/start.c | 4 +-
src/mpi/pt2pt/startall.c | 4 +-
src/mpi/pt2pt/test.c | 4 +-
src/mpi/pt2pt/testall.c | 4 +-
src/mpi/pt2pt/testany.c | 4 +-
src/mpi/pt2pt/testsome.c | 4 +-
src/mpi/pt2pt/wait.c | 4 +-
src/mpi/pt2pt/waitall.c | 4 +-
src/mpi/pt2pt/waitany.c | 4 +-
src/mpi/pt2pt/waitsome.c | 4 +-
src/mpi/rma/accumulate.c | 4 +-
src/mpi/rma/alloc_mem.c | 4 +-
src/mpi/rma/compare_and_swap.c | 4 +-
src/mpi/rma/fetch_and_op.c | 4 +-
src/mpi/rma/free_mem.c | 4 +-
src/mpi/rma/get.c | 4 +-
src/mpi/rma/get_accumulate.c | 4 +-
src/mpi/rma/put.c | 4 +-
src/mpi/rma/raccumulate.c | 4 +-
src/mpi/rma/rget.c | 4 +-
src/mpi/rma/rget_accumulate.c | 4 +-
src/mpi/rma/rput.c | 4 +-
src/mpi/rma/win_allocate.c | 4 +-
src/mpi/rma/win_allocate_shared.c | 4 +-
src/mpi/rma/win_attach.c | 4 +-
src/mpi/rma/win_complete.c | 4 +-
src/mpi/rma/win_create.c | 4 +-
src/mpi/rma/win_create_dynamic.c | 4 +-
src/mpi/rma/win_detach.c | 4 +-
src/mpi/rma/win_fence.c | 4 +-
src/mpi/rma/win_flush.c | 4 +-
src/mpi/rma/win_flush_all.c | 4 +-
src/mpi/rma/win_flush_local.c | 4 +-
src/mpi/rma/win_flush_local_all.c | 4 +-
src/mpi/rma/win_free.c | 4 +-
src/mpi/rma/win_get_group.c | 4 +-
src/mpi/rma/win_get_info.c | 4 +-
src/mpi/rma/win_lock.c | 4 +-
src/mpi/rma/win_lock_all.c | 4 +-
src/mpi/rma/win_post.c | 4 +-
src/mpi/rma/win_set_info.c | 4 +-
src/mpi/rma/win_shared_query.c | 4 +-
src/mpi/rma/win_start.c | 4 +-
src/mpi/rma/win_sync.c | 4 +-
src/mpi/rma/win_test.c | 4 +-
src/mpi/rma/win_unlock.c | 4 +-
src/mpi/rma/win_unlock_all.c | 4 +-
src/mpi/rma/win_wait.c | 4 +-
src/mpi/romio/adio/common/ad_iread_coll.c | 2 +-
src/mpi/romio/adio/common/ad_iwrite_coll.c | 2 +-
src/mpi/romio/mpi-io/close.c | 4 +-
src/mpi/romio/mpi-io/delete.c | 4 +-
src/mpi/romio/mpi-io/fsync.c | 4 +-
src/mpi/romio/mpi-io/get_errh.c | 4 +-
src/mpi/romio/mpi-io/get_group.c | 4 +-
src/mpi/romio/mpi-io/get_info.c | 4 +-
src/mpi/romio/mpi-io/get_view.c | 4 +-
src/mpi/romio/mpi-io/ioreq_c2f.c | 4 +-
src/mpi/romio/mpi-io/ioreq_f2c.c | 4 +-
src/mpi/romio/mpi-io/iotest.c | 4 +-
src/mpi/romio/mpi-io/iotestall.c | 4 +-
src/mpi/romio/mpi-io/iotestany.c | 4 +-
src/mpi/romio/mpi-io/iotestsome.c | 4 +-
src/mpi/romio/mpi-io/iowait.c | 4 +-
src/mpi/romio/mpi-io/iowaitall.c | 4 +-
src/mpi/romio/mpi-io/iowaitany.c | 4 +-
src/mpi/romio/mpi-io/iowaitsome.c | 4 +-
src/mpi/romio/mpi-io/iread.c | 4 +-
src/mpi/romio/mpi-io/iread_all.c | 4 +-
src/mpi/romio/mpi-io/iread_sh.c | 4 +-
src/mpi/romio/mpi-io/iwrite.c | 4 +-
src/mpi/romio/mpi-io/iwrite_all.c | 4 +-
src/mpi/romio/mpi-io/iwrite_sh.c | 4 +-
src/mpi/romio/mpi-io/mpioimpl.h | 15 +--
src/mpi/romio/mpi-io/open.c | 4 +-
src/mpi/romio/mpi-io/prealloc.c | 4 +-
src/mpi/romio/mpi-io/read.c | 4 +-
src/mpi/romio/mpi-io/read_all.c | 4 +-
src/mpi/romio/mpi-io/read_allb.c | 4 +-
src/mpi/romio/mpi-io/read_alle.c | 4 +-
src/mpi/romio/mpi-io/read_ord.c | 4 +-
src/mpi/romio/mpi-io/read_ordb.c | 4 +-
src/mpi/romio/mpi-io/read_orde.c | 4 +-
src/mpi/romio/mpi-io/read_sh.c | 4 +-
src/mpi/romio/mpi-io/register_datarep.c | 4 +-
src/mpi/romio/mpi-io/seek.c | 4 +-
src/mpi/romio/mpi-io/seek_sh.c | 4 +-
src/mpi/romio/mpi-io/set_atom.c | 4 +-
src/mpi/romio/mpi-io/set_errh.c | 4 +-
src/mpi/romio/mpi-io/set_info.c | 4 +-
src/mpi/romio/mpi-io/set_size.c | 4 +-
src/mpi/romio/mpi-io/set_view.c | 4 +-
src/mpi/romio/mpi-io/write.c | 4 +-
src/mpi/romio/mpi-io/write_all.c | 4 +-
src/mpi/romio/mpi-io/write_allb.c | 4 +-
src/mpi/romio/mpi-io/write_alle.c | 4 +-
src/mpi/romio/mpi-io/write_ord.c | 4 +-
src/mpi/romio/mpi-io/write_ordb.c | 4 +-
src/mpi/romio/mpi-io/write_orde.c | 4 +-
src/mpi/romio/mpi-io/write_sh.c | 4 +-
src/mpi/spawn/close_port.c | 4 +-
src/mpi/spawn/comm_accept.c | 4 +-
src/mpi/spawn/comm_connect.c | 4 +-
src/mpi/spawn/comm_disconnect.c | 4 +-
src/mpi/spawn/comm_join.c | 4 +-
src/mpi/spawn/comm_spawn.c | 4 +-
src/mpi/spawn/comm_spawn_multiple.c | 4 +-
src/mpi/spawn/open_port.c | 4 +-
src/mpi/spawn/publish_name.c | 4 +-
src/mpi/spawn/unpublish_name.c | 4 +-
src/mpi/topo/cart_create.c | 4 +-
src/mpi/topo/cart_sub.c | 4 +-
src/mpi/topo/dist_gr_create.c | 4 +-
src/mpi/topo/dist_gr_create_adj.c | 4 +-
src/mpi/topo/dist_gr_neighb.c | 4 +-
src/mpi/topo/dist_gr_neighb_count.c | 4 +-
src/mpi/topo/graphcreate.c | 4 +-
src/mpi/topo/inhb_allgather.c | 4 +-
src/mpi/topo/inhb_allgatherv.c | 4 +-
src/mpi/topo/inhb_alltoall.c | 4 +-
src/mpi/topo/inhb_alltoallv.c | 4 +-
src/mpi/topo/inhb_alltoallw.c | 4 +-
src/mpi/topo/nhb_allgather.c | 4 +-
src/mpi/topo/nhb_allgatherv.c | 4 +-
src/mpi/topo/nhb_alltoall.c | 4 +-
src/mpi/topo/nhb_alltoallv.c | 4 +-
src/mpi/topo/nhb_alltoallw.c | 4 +-
src/mpid/ch3/Makefile.mk | 1 +
src/mpid/ch3/channels/nemesis/src/ch3_isend.c | 4 +-
src/mpid/ch3/channels/nemesis/src/ch3_isendv.c | 4 +-
src/mpid/ch3/channels/nemesis/src/ch3_istartmsg.c | 4 +-
src/mpid/ch3/channels/nemesis/src/ch3_istartmsgv.c | 4 +-
src/mpid/ch3/channels/nemesis/src/ch3_progress.c | 26 ++--
.../ch3/channels/nemesis/src/ch3i_eagernoncontig.c | 4 +-
src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c | 4 +-
src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c | 40 +++---
.../ch3/channels/nemesis/src/mpid_nem_lmt_shm.c | 4 +-
.../ch3/channels/sock/include/mpidi_ch3_post.h | 4 +-
src/mpid/ch3/channels/sock/src/ch3_progress.c | 18 ++--
src/mpid/ch3/include/mpid_thread.h | 59 ++++++++
src/mpid/ch3/include/mpidpre.h | 5 +-
src/mpid/ch3/src/ch3u_comm_spawn_multiple.c | 4 +-
src/mpid/ch3/src/mpid_mprobe.c | 4 +-
src/mpid/ch3/src/mpid_probe.c | 4 +-
src/mpid/ch3/src/mpid_rma.c | 4 +-
src/mpid/common/sock/iocp/sock.c | 6 +-
src/mpid/common/sock/poll/sock_wait.i | 12 +-
src/mpid/common/thread/Makefile.mk | 2 +-
...d_thread_fallback.h => mpidu_thread_fallback.h} | 121 ++++++++---------
src/nameserv/pmi/pmi_nameserv.c | 12 +-
src/pmi/pmi2/poe/poe2pmi.c | 4 +-
src/util/thread/mpiu_thread.h | 5 +-
src/util/thread/mpiu_thread_posix_funcs.h | 139 +++-----------------
src/util/thread/mpiu_thread_solaris_funcs.h | 12 --
src/util/thread/mpiu_thread_win.c | 28 ----
343 files changed, 896 insertions(+), 1002 deletions(-)
create mode 100644 src/mpid/ch3/include/mpid_thread.h
rename src/mpid/common/thread/{mpid_thread_fallback.h => mpidu_thread_fallback.h} (67%)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b4-139-g7e35691
by noreply@mpich.org 18 Aug '15
by noreply@mpich.org 18 Aug '15
18 Aug '15
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 7e35691bcbf560acb7cc3f1e466775d7751f260d (commit)
via 67987097fbad7aad134b2e16ca8598a77b8de2e8 (commit)
via db387dd642fc0b647398005c7d9bca663ac0a4dc (commit)
via f0f15579f8eaa92ebbcf2d78fe1d7986026f4d7c (commit)
from 487ec8e3d2bed615f979f39db81832e83ec682c0 (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/7e35691bcbf560acb7cc3f1e466775d77…
commit 7e35691bcbf560acb7cc3f1e466775d7751f260d
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Mon Aug 17 18:14:54 2015 -0500
Bug-fix: Handle icc failures on Darwin with thread local storage.
The intel compiler seems to break on Darwin when the thread local
storage is specified with the extern keyword. With older intel
compilers, which used to break more easily for tls specifiers, we
added a configure check to disable tls in such cases. The newer
compilers seem to work fine with no extern is provided, but break when
extern is provided for shared library builds. This patch improves the
configure check to try both with and without extern.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/confdb/ax_tls.m4 b/confdb/ax_tls.m4
index 2704438..4447a36 100644
--- a/confdb/ax_tls.m4
+++ b/confdb/ax_tls.m4
@@ -58,8 +58,24 @@ AC_DEFUN([AX_TLS], [
# link line.
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([$ax_tls_keyword int bar = 5;],[++bar;])],
- [ac_cv_tls=$ax_tls_keyword ; break],
+ [ac_cv_tls=$ax_tls_keyword],
[ac_cv_tls=none])
+
+ # MPICH modification: Also test with the extern keyword.
+ # The intel compiler on Darwin (at least as of 15.0.1)
+ # seems to break with the above error when the extern
+ # keyword is specified in shared library builds.
+ PAC_PUSH_FLAG([LIBS])
+ PAC_APPEND_FLAG([-shared],[LIBS])
+ if test "$ac_cv_tls" != "none" ; then
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([extern $ax_tls_keyword int bar;],[++bar;])],
+ [ac_cv_tls=$ax_tls_keyword],
+ [ac_cv_tls=none])
+ fi
+ PAC_POP_FLAG([LIBS])
+
+ if test "$ac_cv_tls" != "none" ; then break ; fi
esac
done
])
http://git.mpich.org/mpich.git/commitdiff/67987097fbad7aad134b2e16ca8598a77…
commit 67987097fbad7aad134b2e16ca8598a77b8de2e8
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Mon Aug 17 12:35:47 2015 -0500
Use MPIU_Thread_ptr instead of MPIU_Thread.
In other cases, MPIU_Thread is used as the direct structure. To not
confuse the reader, use a different variable name, MPIU_Thread_ptr,
when we are referring to the pointer and not the structure directly.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/util/thread/mpiu_thread_priv.h b/src/util/thread/mpiu_thread_priv.h
index e10f3d2..f6fa3ff 100644
--- a/src/util/thread/mpiu_thread_priv.h
+++ b/src/util/thread/mpiu_thread_priv.h
@@ -57,41 +57,41 @@ extern MPICH_PerThread_t MPIU_ThreadSingle;
do { \
if (MPIR_ThreadInfo.isThreaded) { \
int init_err_; \
- MPIU_Thread = (MPICH_PerThread_t *) MPIU_Calloc(1, sizeof(MPICH_PerThread_t)); \
- MPIU_Assert(MPIU_Thread); \
- MPIU_Thread_tls_set(&MPIR_ThreadInfo.thread_storage, (void *)MPIU_Thread, &init_err_); \
+ MPIU_Thread_ptr = (MPICH_PerThread_t *) MPIU_Calloc(1, sizeof(MPICH_PerThread_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); \
} \
} while (0)
#define MPIU_THREADPRIV_GET \
do { \
- if (!MPIU_Thread) { \
+ if (!MPIU_Thread_ptr) { \
if (MPIR_ThreadInfo.isThreaded) { \
int get_err_; \
- MPIU_Thread_tls_get(&MPIR_ThreadInfo.thread_storage, (void **) &MPIU_Thread, &get_err_); \
+ MPIU_Thread_tls_get(&MPIR_ThreadInfo.thread_storage, (void **) &MPIU_Thread_ptr, &get_err_); \
MPIU_Assert(get_err_ == 0); \
- if (!MPIU_Thread) { \
- MPIU_THREADPRIV_INIT; /* subtle, sets MPIU_Thread */ \
+ if (!MPIU_Thread_ptr) { \
+ MPIU_THREADPRIV_INIT; /* subtle, sets MPIU_Thread_ptr */ \
} \
} \
else { \
- MPIU_Thread = &MPIU_ThreadSingle; \
+ MPIU_Thread_ptr = &MPIU_ThreadSingle; \
} \
- MPIU_Assert(MPIU_Thread); \
+ MPIU_Assert(MPIU_Thread_ptr); \
} \
} while (0)
/* common definitions when using MPIU_Thread-based TLS */
-#define MPIU_THREADPRIV_DECL MPICH_PerThread_t *MPIU_Thread=NULL
-#define MPIU_THREADPRIV_FIELD(a_) (MPIU_Thread->a_)
+#define MPIU_THREADPRIV_DECL MPICH_PerThread_t *MPIU_Thread_ptr = NULL
+#define MPIU_THREADPRIV_FIELD(a_) (MPIU_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); \
+ MPIU_Free(MPIU_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_); \
http://git.mpich.org/mpich.git/commitdiff/db387dd642fc0b647398005c7d9bca663…
commit db387dd642fc0b647398005c7d9bca663ac0a4dc
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Mon Aug 17 12:35:16 2015 -0500
Added missing inclusion of mpimem.h, which is needed for MPIU_Calloc.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index 32ee3b2..0c9d3f1 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -18,6 +18,12 @@
#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
+ * are all mixed up. Till that's resolved, adding mpimem.h here as a
+ * workaround for using MPIU_Calloc functionality. */
+#include "mpimem.h"
+
/* _INVALID exists to avoid accidental macro evaluations to 0 */
#define MPIU_THREAD_PACKAGE_INVALID 0
#define MPIU_THREAD_PACKAGE_NONE 1
http://git.mpich.org/mpich.git/commitdiff/f0f15579f8eaa92ebbcf2d78fe1d79860…
commit f0f15579f8eaa92ebbcf2d78fe1d7986026f4d7c
Author: Pavan Balaji <balaji(a)anl.gov>
Date: Mon Aug 17 13:42:49 2015 -0500
Bug-fix: PGI compiler failure.
There were several errors in the current code:
1. We were defining prototypes for the thread private functions, but
were using them as macros.
2. We were missing an error parameter at the end of the macro.
3. There were extra unused prototypes.
4. The cleanup function was defined as static, which was causing the
global definition to be ignored.
5. Different macros should use different error variable names to avoid
warnings related to the inner macro shadowing the variable in the
outer macro.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/mpid/common/thread/mpid_thread_fallback.h b/src/mpid/common/thread/mpid_thread_fallback.h
index 62fe172..09af49f 100644
--- a/src/mpid/common/thread/mpid_thread_fallback.h
+++ b/src/mpid/common/thread/mpid_thread_fallback.h
@@ -63,7 +63,6 @@ typedef MPIU_Thread_cond_t MPID_Thread_cond_t;
typedef MPIU_Thread_id_t MPID_Thread_id_t;
typedef MPIU_Thread_tls_t MPID_Thread_tls_t;
typedef MPIU_Thread_func_t MPID_Thread_func_t;
-typedef MPIU_Thread_tls_exit_func_t MPID_Thread_tls_exit_func_t;
/*M MPIU_THREAD_CS_ENTER - Enter a named critical section
diff --git a/src/util/thread/mpiu_thread.h b/src/util/thread/mpiu_thread.h
index e005619..32ee3b2 100644
--- a/src/util/thread/mpiu_thread.h
+++ b/src/util/thread/mpiu_thread.h
@@ -68,17 +68,6 @@ 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
- */
-typedef void (*MPIU_Thread_tls_exit_func_t) (void *value);
-
-void MPIU_Thread_tls_create(MPIU_Thread_tls_exit_func_t exit_func, MPIU_Thread_tls_t * tls,
- int *err);
-void MPIU_Thread_tls_destroy(MPIU_Thread_tls_t * tls, int *err);
-void MPIU_Thread_tls_set(MPIU_Thread_tls_t * tls, void *value, int *err);
-void MPIU_Thread_tls_get(MPIU_Thread_tls_t * tls, void **value, 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_priv.h b/src/util/thread/mpiu_thread_priv.h
index 609e8cb..e10f3d2 100644
--- a/src/util/thread/mpiu_thread_priv.h
+++ b/src/util/thread/mpiu_thread_priv.h
@@ -26,7 +26,7 @@
#if !defined(MPIU_TLS_SPECIFIER)
/* We need to provide a function that will cleanup the storage attached
* to the key. */
-static void MPIUI_Cleanup_tls(void *a);
+void MPIUI_Cleanup_tls(void *a);
/* In the case where the thread level is set in MPI_Init_thread, we
need a blended version of the non-threaded and the thread-multiple
@@ -47,18 +47,20 @@ extern MPICH_PerThread_t MPIU_ThreadSingle;
#define MPIU_THREADPRIV_INITKEY \
do { \
if (MPIR_ThreadInfo.isThreaded) { \
- int err_; \
- MPIU_Thread_tls_create(MPIUI_Cleanup_tls,&MPIR_ThreadInfo.thread_storage,&err_); \
- MPIU_Assert(err_ == 0); \
+ int initkey_err_; \
+ MPIU_Thread_tls_create(MPIUI_Cleanup_tls,&MPIR_ThreadInfo.thread_storage,&initkey_err_); \
+ MPIU_Assert(initkey_err_ == 0); \
} \
} while (0)
#define MPIU_THREADPRIV_INIT \
do { \
if (MPIR_ThreadInfo.isThreaded) { \
+ int init_err_; \
MPIU_Thread = (MPICH_PerThread_t *) MPIU_Calloc(1, sizeof(MPICH_PerThread_t)); \
MPIU_Assert(MPIU_Thread); \
- MPIU_Thread_tls_set(&MPIR_ThreadInfo.thread_storage, (void *)MPIU_Thread); \
+ MPIU_Thread_tls_set(&MPIR_ThreadInfo.thread_storage, (void *)MPIU_Thread, &init_err_); \
+ MPIU_Assert(init_err_ == 0); \
} \
} while (0)
@@ -66,7 +68,9 @@ extern MPICH_PerThread_t MPIU_ThreadSingle;
do { \
if (!MPIU_Thread) { \
if (MPIR_ThreadInfo.isThreaded) { \
- MPIU_Thread_tls_get(&MPIR_ThreadInfo.thread_storage, &MPIU_Thread); \
+ int get_err_; \
+ MPIU_Thread_tls_get(&MPIR_ThreadInfo.thread_storage, (void **) &MPIU_Thread, &get_err_); \
+ MPIU_Assert(get_err_ == 0); \
if (!MPIU_Thread) { \
MPIU_THREADPRIV_INIT; /* subtle, sets MPIU_Thread */ \
} \
@@ -88,7 +92,8 @@ extern MPICH_PerThread_t MPIU_ThreadSingle;
int tpf_err_; /* unique name to not conflict with vars in called macros */ \
MPIU_THREADPRIV_GET; \
MPIU_Free(MPIU_Thread); \
- MPIU_Thread_tls_set(&MPIR_ThreadInfo.thread_storage,NULL); \
+ 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_); \
MPIU_Assert(tpf_err_ == 0); \
} \
diff --git a/src/util/thread/mpiu_thread_solaris_funcs.h b/src/util/thread/mpiu_thread_solaris_funcs.h
index d3cdff4..34c0735 100644
--- a/src/util/thread/mpiu_thread_solaris_funcs.h
+++ b/src/util/thread/mpiu_thread_solaris_funcs.h
@@ -155,9 +155,6 @@
/*
* Thread Local Storage
*/
-typedef void (*MPIU_Thread_tls_exit_func_t) (void *value);
-
-
#define MPIU_Thread_tls_create(exit_func_ptr_, tls_ptr_, err_ptr_) \
do { \
if ((err_ptr_) == NULL) { \
-----------------------------------------------------------------------
Summary of changes:
confdb/ax_tls.m4 | 18 +++++++++++-
src/mpid/common/thread/mpid_thread_fallback.h | 1 -
src/util/thread/mpiu_thread.h | 17 ++++-------
src/util/thread/mpiu_thread_priv.h | 39 ++++++++++++++-----------
src/util/thread/mpiu_thread_solaris_funcs.h | 3 --
5 files changed, 45 insertions(+), 33 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.2b4-135-g487ec8e
by noreply@mpich.org 18 Aug '15
by noreply@mpich.org 18 Aug '15
18 Aug '15
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 487ec8e3d2bed615f979f39db81832e83ec682c0 (commit)
from d23e33d49fd9af8eecff8f7bb582cd2e09a807ed (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/487ec8e3d2bed615f979f39db81832e83…
commit 487ec8e3d2bed615f979f39db81832e83ec682c0
Author: Lena Oden <loden(a)anl.gov>
Date: Mon Aug 17 13:10:52 2015 -0500
Fix overlapping comm_idup and comm_group_create
This patch adds a tag for correctly ordering comm_idup and other
blocking context id allocation functions such as comm_dup and
comm_create_group. The tag of comm_idup is always higher than the tag of
all blocking operations on the same communicator. Therefore, on the same
communicator, all blocking context id allocation functions will have
higher priorities than idup if they are called at the same time.
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/src/mpi/comm/contextid.c b/src/mpi/comm/contextid.c
index 87d10fd..c9a6cf8 100644
--- a/src/mpi/comm/contextid.c
+++ b/src/mpi/comm/contextid.c
@@ -331,7 +331,7 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
int own_eager_mask = 0;
MPIR_Errflag_t errflag = MPIR_ERR_NONE;
int first_iter = 1;
- int seqnum = 0;
+
MPID_MPI_STATE_DECL(MPID_STATE_MPIR_GET_CONTEXTID);
MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_GET_CONTEXTID);
@@ -379,10 +379,6 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
else if (first_iter) {
memset(local_mask, 0, MPIR_MAX_CONTEXT_MASK * sizeof(int));
own_eager_mask = 0;
- if (comm_ptr->idup_count)
- seqnum = comm_ptr->idup_curr_seqnum++;
-
-
/* Attempt to reserve the eager mask segment */
if (!eager_in_use && eager_nelem > 0) {
int i;
@@ -403,8 +399,7 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
lowest_tag = tag;
}
- if (mask_in_use || !(comm_ptr->context_id == lowest_context_id && tag == lowest_tag) ||
- (comm_ptr->idup_count && seqnum != comm_ptr->idup_next_seqnum)) {
+ if (mask_in_use || !(comm_ptr->context_id == lowest_context_id && tag == lowest_tag)){
memset(local_mask, 0, MPIR_MAX_CONTEXT_MASK * sizeof(int));
own_mask = 0;
MPIU_DBG_MSG_D(COMM, VERBOSE, "In in-use, set lowest_context_id to %d",
@@ -412,7 +407,6 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
}
else {
int i;
-
/* Copy safe mask segment to local_mask */
for (i = 0; i < eager_nelem; i++)
local_mask[i] = 0;
@@ -501,7 +495,6 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
lowest_tag = -1;
/* Else leave it alone; there is another thread waiting */
}
- comm_ptr->idup_curr_seqnum++;
}
else {
/* else we did not find a context id. Give up the mask in case
@@ -577,9 +570,6 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm * comm_ptr, MPID_Group * group_ptr
first_iter = 0;
}
- if (seqnum > 0)
- comm_ptr->idup_next_seqnum++;
-
fn_exit:
if (ignore_id)
@@ -606,6 +596,7 @@ struct gcn_state {
int own_eager_mask;
int first_iter;
int seqnum;
+ int tag;
MPID_Comm *comm_ptr;
MPID_Comm *comm_ptr_inter;
MPID_Sched_t s;
@@ -779,8 +770,9 @@ static int sched_cb_gcn_copy_mask(MPID_Comm * comm, int tag, void *state)
}
else {
- if (st->comm_ptr->context_id < lowest_context_id) {
+ if (st->comm_ptr->context_id < lowest_context_id ) {
lowest_context_id = st->comm_ptr->context_id;
+ lowest_tag = st->tag;
}
/* If one of the following conditions happens, set local_mask to zero
@@ -790,7 +782,7 @@ static int sched_cb_gcn_copy_mask(MPID_Comm * comm, int tag, void *state)
* 3. for the case that multiple communicators duplicating from the
* same communicator at the same time, the sequence number of the
* current MPI_COMM_IDUP operation is not the smallest. */
- if (mask_in_use || (st->comm_ptr->context_id != lowest_context_id)
+ if (mask_in_use || (st->comm_ptr->context_id != lowest_context_id) || ( st->comm_ptr->context_id == lowest_context_id && lowest_tag < st->tag)
|| (st->comm_ptr->idup_count > 1 && st->seqnum != st->comm_ptr->idup_next_seqnum)) {
memset(st->local_mask, 0, MPIR_MAX_CONTEXT_MASK * sizeof(int));
st->own_mask = 0;
@@ -882,6 +874,8 @@ static int sched_get_cid_nonblock(MPID_Comm * comm_ptr, MPID_Comm * newcomm,
MPIU_CHKPMEM_MALLOC(st, struct gcn_state *, sizeof(struct gcn_state), mpi_errno, "gcn_state");
st->ctx0 = ctx0;
st->ctx1 = ctx1;
+ /* since the tag is only used for odering, it can be higher than tag_ub*/
+ st->tag = MPIR_Process.attrs.tag_ub+1;
if (gcn_cid_kind == MPID_INTRACOMM) {
st->comm_ptr = comm_ptr;
st->comm_ptr_inter = NULL;
-----------------------------------------------------------------------
Summary of changes:
src/mpi/comm/contextid.c | 22 ++++++++--------------
1 files changed, 8 insertions(+), 14 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0