[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-347-g8f196d6
Service Account
noreply at mpich.org
Tue Jul 12 21:30:37 CDT 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 8f196d6f1209a8a652adf495f3cd5a138b05f4e3 (commit)
via 433cc4a53ab3b3858b7a0ad40f45574ec4cddd0c (commit)
via 47f36a20357a7612b4a186a8d96a6d3819e558ed (commit)
via 0caa766bf38fcd8f037d1d59d8dba4489072280d (commit)
via 2b9276df85fabd0c21883dcb8cd81f3e7c7bdd02 (commit)
from ff7e3f37effa1132126dfe9616b8a563c61cc91b (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/8f196d6f1209a8a652adf495f3cd5a138b05f4e3
commit 8f196d6f1209a8a652adf495f3cd5a138b05f4e3
Author: Gengbin Zheng <gengbin.zheng at intel.com>
Date: Fri Feb 26 00:36:24 2016 -0600
CH4PREREQ: POBJ Threads: fix race condition
In thread multiple with per-obj locks, function MPIR_Get_contextid_sparse()
may be called from multiple threads. And accessing global/static variables
like next_gcn and mask_in_use need to protected to prevent race condition.
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/src/mpi/comm/contextid.c b/src/mpi/comm/contextid.c
index 5951b60..bffb158 100644
--- a/src/mpi/comm/contextid.c
+++ b/src/mpi/comm/contextid.c
@@ -618,8 +618,11 @@ int MPIR_Get_contextid_sparse_group(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr
if (st.first_iter == 1) {
st.first_iter = 0;
/* to avoid deadlocks, the element is not added to the list bevore the first iteration */
- if (!ignore_id && *context_id == 0)
+ if (!ignore_id && *context_id == 0) {
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_CTX_MUTEX);
add_gcn_to_list(&st);
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_CTX_MUTEX);
+ }
}
}
@@ -633,8 +636,8 @@ int MPIR_Get_contextid_sparse_group(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr
/* --BEGIN ERROR HANDLING-- */
fn_fail:
/* Release the masks */
+ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_CTX_MUTEX);
if (st.own_mask) {
- /* is it safe to access this without holding the CS? */
mask_in_use = 0;
}
/*If in list, remove it */
@@ -647,6 +650,7 @@ int MPIR_Get_contextid_sparse_group(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr
tmp->next = st.next;
}
}
+ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_CTX_MUTEX);
goto fn_exit;
http://git.mpich.org/mpich.git/commitdiff/433cc4a53ab3b3858b7a0ad40f45574ec4cddd0c
commit 433cc4a53ab3b3858b7a0ad40f45574ec4cddd0c
Author: Hajime Fujita <hajime.fujita at intel.com>
Date: Tue May 24 11:08:31 2016 -0500
CH4PREREQ: Remove obsolete debug macro
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
index 3974407..e3be01b 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
@@ -251,7 +251,6 @@ static inline int MPID_nem_ofi_create_req(MPIR_Request ** request, int refcnt)
MPIR_Request *req;
req = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED);
MPIR_Assert(req);
- MPIDI_Request_clear_dbg(req);
MPIR_Object_set_ref(req, refcnt);
MPID_nem_ofi_init_req(req);
*request = req;
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index b8fb113..e7d2456 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -266,12 +266,6 @@ extern MPIDI_Process_t MPIDI_Process;
#define MPIDI_CH3_REQUEST_INIT(a_)
#endif
-#ifdef HAVE_DEBUGGER_SUPPORT
-#define MPIDI_Request_clear_dbg(sreq_) ((sreq_)->u.send.dbg_next = NULL)
-#else
-#define MPIDI_Request_clear_dbg(sreq_)
-#endif
-
/* FIXME: Why does a send request need the match information?
Is that for debugging information? In case the initial envelope
cannot be sent? Ditto for the dev.user_buf, count, and datatype
@@ -299,7 +293,6 @@ extern MPIDI_Process_t MPIDI_Process;
(sreq_)->dev.user_count = count; \
(sreq_)->dev.datatype = datatype; \
(sreq_)->dev.iov_count = 0; \
- MPIDI_Request_clear_dbg(sreq_); \
}
/* This is the receive request version of MPIDI_Request_create_sreq */
http://git.mpich.org/mpich.git/commitdiff/47f36a20357a7612b4a186a8d96a6d3819e558ed
commit 47f36a20357a7612b4a186a8d96a6d3819e558ed
Author: Hajime Fujita <hajime.fujita at intel.com>
Date: Tue May 24 11:10:19 2016 -0500
CH4PREREQ: Clear send.dbg_next on request creation
Clear the dbg_next, else it could cause a crash.
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/src/include/mpir_debugger.h b/src/include/mpir_debugger.h
index 67dc5f8..1287c7c 100644
--- a/src/include/mpir_debugger.h
+++ b/src/include/mpir_debugger.h
@@ -26,11 +26,13 @@ void MPII_CommL_forget( MPIR_Comm * );
#define MPII_SENDQ_FORGET(_a) MPII_Sendq_forget(_a)
#define MPII_COMML_REMEMBER(_a) MPII_CommL_remember( _a )
#define MPII_COMML_FORGET(_a) MPII_CommL_forget( _a )
+#define MPII_REQUEST_CLEAR_DBG(_r) ((_r)->u.send.dbg_next = NULL)
#else
#define MPII_SENDQ_REMEMBER(a,b,c,d)
#define MPII_SENDQ_FORGET(a)
#define MPII_COMML_REMEMBER(_a)
#define MPII_COMML_FORGET(_a)
+#define MPII_REQUEST_CLEAR_DBG(_r)
#endif
#endif /* MPIR_DEBUGGER_H_INCLUDED */
diff --git a/src/include/mpir_request.h b/src/include/mpir_request.h
index 475616f..af212ed 100644
--- a/src/include/mpir_request.h
+++ b/src/include/mpir_request.h
@@ -214,6 +214,9 @@ static inline MPIR_Request *MPIR_Request_create(MPIR_Request_kind_t kind)
req->request_completed_cb = NULL;
switch(kind) {
+ case MPIR_REQUEST_KIND__SEND:
+ MPII_REQUEST_CLEAR_DBG(req);
+ break;
case MPIR_REQUEST_KIND__COLL:
req->u.nbc.errflag = MPIR_ERR_NONE;
break;
http://git.mpich.org/mpich.git/commitdiff/0caa766bf38fcd8f037d1d59d8dba4489072280d
commit 0caa766bf38fcd8f037d1d59d8dba4489072280d
Author: Hajime Fujita <hajime.fujita at intel.com>
Date: Tue May 24 11:09:11 2016 -0500
CH4PREREQ: Create sreq with REQUEST_KIND__SEND
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index 506e9d6..b8fb113 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -287,9 +287,8 @@ extern MPIDI_Process_t MPIDI_Process;
*/
#define MPIDI_Request_create_sreq(sreq_, mpi_errno_, FAIL_) \
{ \
- (sreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); \
+ (sreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); \
MPIR_Object_set_ref((sreq_), 2); \
- (sreq_)->kind = MPIR_REQUEST_KIND__SEND; \
(sreq_)->comm = comm; \
(sreq_)->dev.partner_request = NULL; \
MPIR_Comm_add_ref(comm); \
http://git.mpich.org/mpich.git/commitdiff/2b9276df85fabd0c21883dcb8cd81f3e7c7bdd02
commit 2b9276df85fabd0c21883dcb8cd81f3e7c7bdd02
Author: Charles J Archer <charles.j.archer at intel.com>
Date: Tue Dec 15 06:41:03 2015 -0800
CH4PREREQ: Properly initialize mutexes for per-object builds
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index 305fb9c..53190ec 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -70,7 +70,7 @@ static struct MPIR_Comm_hint_fn_elt *MPID_hint_fns = NULL;
* !!! The resulting struct is _not_ ready for communication !!! */
int MPII_Comm_init(MPIR_Comm * comm_p)
{
- int mpi_errno = MPI_SUCCESS;
+ int thr_err, mpi_errno = MPI_SUCCESS;
MPIR_Object_set_ref(comm_p, 1);
@@ -104,6 +104,10 @@ int MPII_Comm_init(MPIR_Comm * comm_p)
comm_p->mapper_head = NULL;
comm_p->mapper_tail = NULL;
+#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ
+ MPID_Thread_mutex_create(&MPIR_THREAD_POBJ_COMM_MUTEX(comm_p), &thr_err);
+ MPIR_Assert(thr_err == 0);
+#endif
/* Fields not set include context_id, remote and local size, and
* kind, since different communicator construction routines need
* different values */
@@ -921,7 +925,7 @@ int MPII_Comm_copy_data(MPIR_Comm * comm_ptr, MPIR_Comm ** outcomm_ptr)
#define FCNAME MPL_QUOTE(FUNCNAME)
int MPIR_Comm_delete_internal(MPIR_Comm * comm_ptr)
{
- int in_use;
+ int in_use,thr_err;
int mpi_errno = MPI_SUCCESS;
MPIR_FUNC_TERSE_STATE_DECL(MPID_STATE_COMM_DELETE_INTERNAL);
@@ -999,6 +1003,10 @@ int MPIR_Comm_delete_internal(MPIR_Comm * comm_ptr)
* allocated out of the remote group's bit vector, not ours. */
MPIR_Free_contextid(comm_ptr->recvcontext_id);
+#if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ
+ MPID_Thread_mutex_destroy(&MPIR_THREAD_POBJ_COMM_MUTEX(comm_ptr), &thr_err);
+ MPIR_Assert(thr_err == 0);
+#endif
/* We need to release the error handler */
if (comm_ptr->errhandler &&
!(HANDLE_GET_KIND(comm_ptr->errhandler->handle) == HANDLE_KIND_BUILTIN)) {
-----------------------------------------------------------------------
Summary of changes:
src/include/mpir_debugger.h | 2 ++
src/include/mpir_request.h | 3 +++
src/mpi/comm/commutil.c | 12 ++++++++++--
src/mpi/comm/contextid.c | 8 ++++++--
.../ch3/channels/nemesis/netmod/ofi/ofi_impl.h | 1 -
src/mpid/ch3/include/mpidimpl.h | 10 +---------
6 files changed, 22 insertions(+), 14 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list