[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.2-54-g882c80f
mysql vizuser
noreply at mpich.org
Fri Feb 22 14:57:15 CST 2013
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 882c80f2639e3da840d9feac1f7fd779a54411c2 (commit)
via 1d64a433d6bfe73a195123030c4bb0de6a1ecbfa (commit)
via 8cbf64149eef321b6900671f4f060afffd1f9a77 (commit)
via 80285037077d0ca3b13025b098f7c6755cf368be (commit)
via 06411a39d9c737f8b8440eb766eb0c571225a2c7 (commit)
from bf6355f4fafc14088c69fd0761e075adeef7b591 (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/882c80f2639e3da840d9feac1f7fd779a54411c2
commit 882c80f2639e3da840d9feac1f7fd779a54411c2
Merge: bf6355f 1d64a43
Author: James Dinan <dinan at mcs.anl.gov>
Date: Fri Feb 22 14:55:55 2013 -0600
Merge branch 'shr-mem-win-ch3'
This merge rounds out shared memory window support in CH3. Note that CH3
currently supports shared memory windows on MPI_COMM_SELF (and dups).
http://git.mpich.org/mpich.git/commitdiff/1d64a433d6bfe73a195123030c4bb0de6a1ecbfa
commit 1d64a433d6bfe73a195123030c4bb0de6a1ecbfa
Author: James Dinan <dinan at mcs.anl.gov>
Date: Fri Feb 22 12:55:40 2013 -0600
Moved window flavor error checking to public API
Hoisted the window flavor error check in Win_shared_query from Nemesis
up to the public API where it belongs.
Reviewer: apenya
diff --git a/src/include/mpierrs.h b/src/include/mpierrs.h
index 14998ea..330c296 100644
--- a/src/include/mpierrs.h
+++ b/src/include/mpierrs.h
@@ -245,6 +245,15 @@
} \
} while (0)
+#define MPIR_ERRTEST_WIN_FLAVOR(win_, flavor_, err_) \
+ do { \
+ if ((win_)->create_flavor != (flavor_)) { \
+ MPIU_ERR_SETANDSTMT1((err_), MPI_ERR_RMA_FLAVOR, \
+ goto fn_fail, "**winflavor", \
+ "**winflavor %s", #flavor_); \
+ } \
+ } while (0)
+
#define MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf,count,err) \
if (count > 0 && sendbuf == MPI_IN_PLACE) { \
err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \
diff --git a/src/mpi/errhan/errnames.txt b/src/mpi/errhan/errnames.txt
index 4a482c5..cda2f7b 100644
--- a/src/mpi/errhan/errnames.txt
+++ b/src/mpi/errhan/errnames.txt
@@ -187,6 +187,7 @@ MPI_TYPECLASS_INTEGER, or MPI_TYPECLASS_COMPLEX
**rmatypenotatomic: Datatype not permitted for atomic operations
**rmatypenotatomic %D: Datatype (%D) not permitted for atomic operations
**winflavor: Window flavor is not compatible with the given operation
+**winflavor %s: Window flavor is not compatible with the given operation (expected %s)
**typenotpredefined: Datatype must be predefined
diff --git a/src/mpi/rma/win_shared_query.c b/src/mpi/rma/win_shared_query.c
index 4f4c00b..dc2fc88 100644
--- a/src/mpi/rma/win_shared_query.c
+++ b/src/mpi/rma/win_shared_query.c
@@ -112,6 +112,7 @@ int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit,
comm_ptr = win_ptr->comm_ptr;
MPIR_ERRTEST_SEND_RANK(comm_ptr, rank, mpi_errno);
+ MPIR_ERRTEST_WIN_FLAVOR(win_ptr, MPI_WIN_FLAVOR_SHARED, mpi_errno);
}
MPID_END_ERROR_CHECKS;
}
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c b/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
index b3e5278..6aa1729 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
@@ -22,10 +22,6 @@ int MPIDI_CH3_SHM_Win_shared_query(MPID_Win *win_ptr, int target_rank, MPI_Aint
comm_size = win_ptr->comm_ptr->local_size;
- if (win_ptr->create_flavor != MPI_WIN_FLAVOR_SHARED) {
- MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_RMA_FLAVOR, "**winflavor");
- }
-
/* Scan the sizes to locate the first process that allocated a nonzero
* amount of space */
if (target_rank == MPI_PROC_NULL) {
http://git.mpich.org/mpich.git/commitdiff/8cbf64149eef321b6900671f4f060afffd1f9a77
commit 8cbf64149eef321b6900671f4f060afffd1f9a77
Author: James Dinan <dinan at mcs.anl.gov>
Date: Tue Feb 12 16:25:51 2013 -0600
CH3 default shared memory window implementation
This adds a default shared memory window implementation for CH3 (used
by e.g. sock), which works only for MPI_COMM_SELF (this is what the
default comm_split_type provides). This closes ticket #1666.
Reviewer: apenya
diff --git a/src/mpid/ch3/errnames.txt b/src/mpid/ch3/errnames.txt
index 49fc6b7..a3308bc 100644
--- a/src/mpid/ch3/errnames.txt
+++ b/src/mpid/ch3/errnames.txt
@@ -41,3 +41,4 @@
**ch3|rma_flags:Invalid combination of RMA packet flags
**ch3|nocheck_invalid:MPI_MODE_NOCHECK was specified, but the lock was not available at the target
**ch3|rma_msg:RMA message operation failed
+**ch3|win_shared_comm:Cannot map shared memory using the given communicator
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index 48b8663..4efe3c2 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -1210,6 +1210,7 @@ void *MPIDI_Alloc_mem(size_t size, MPID_Info *info_ptr);
int MPIDI_Free_mem(void *ptr);
/* internal */
+int MPIDI_SHM_Win_free(MPID_Win **);
int MPIDI_CH3I_Release_lock(MPID_Win * win_ptr);
int MPIDI_CH3I_Try_acquire_win_lock(MPID_Win * win_ptr, int requested_lock);
int MPIDI_CH3I_Send_lock_granted_pkt(MPIDI_VC_t * vc, MPID_Win *win_ptr, int source_win_hdl);
diff --git a/src/mpid/ch3/src/Makefile.mk b/src/mpid/ch3/src/Makefile.mk
index 92a5187..567e46b 100644
--- a/src/mpid/ch3/src/Makefile.mk
+++ b/src/mpid/ch3/src/Makefile.mk
@@ -16,7 +16,6 @@ lib_lib at MPILIBNAME@_la_SOURCES += \
src/mpid/ch3/src/ch3u_port.c \
src/mpid/ch3/src/ch3u_recvq.c \
src/mpid/ch3/src/ch3u_request.c \
- src/mpid/ch3/src/ch3u_rma_notimpl.c \
src/mpid/ch3/src/ch3u_rma_acc_ops.c \
src/mpid/ch3/src/ch3u_rma_ops.c \
src/mpid/ch3/src/ch3u_rma_reqops.c \
diff --git a/src/mpid/ch3/src/ch3u_rma_notimpl.c b/src/mpid/ch3/src/ch3u_rma_notimpl.c
deleted file mode 100644
index 0a73c7e..0000000
--- a/src/mpid/ch3/src/ch3u_rma_notimpl.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- * (C) 2001 by Argonne National Laboratory.
- * See COPYRIGHT in top-level directory.
- */
-
-#include "mpidi_ch3_impl.h"
-#include "mpidrma.h"
-
-/* FUNCNAME macros are included for the MPIDI_FUNC_NOTIMPL macro to keep the
- * state checker from emitting warnings */
-#undef FUNCNAME
-#define FUNCNAME MPIDI_FUNC_NOTIMPL
-#define MPIDI_FUNC_NOTIMPL(state_name) \
- int mpi_errno = MPI_SUCCESS; \
- \
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_##state_name); \
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_##state_name); \
- \
- MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**notimpl"); \
- \
- fn_exit: \
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_##state_name); \
- return mpi_errno; \
- /* --BEGIN ERROR HANDLING-- */ \
- fn_fail: \
- goto fn_exit; \
- /* --END ERROR HANDLING-- */
-
-
-#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_shared_query
-#undef FCNAME
-#define FCNAME MPIDI_QUOTE(FUNCNAME)
-int MPIDI_Win_shared_query(MPID_Win *win_ptr, int target_rank, MPI_Aint *size, int *disp_unit, void *baseptr)
-{
- MPIDI_FUNC_NOTIMPL(WIN_FLUSH_LOCAL_ALL)
-}
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index d5480bb..d940a50 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -116,6 +116,63 @@ int MPIDI_Win_free(MPID_Win **win_ptr)
#undef FUNCNAME
+#define FUNCNAME MPIDI_SHM_Win_free
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+int MPIDI_SHM_Win_free(MPID_Win **win_ptr)
+{
+ int mpi_errno = MPI_SUCCESS;
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_SHM_WIN_FREE);
+
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_SHM_WIN_FREE);
+
+ /* Free memory allocated by the default shared memory window
+ implementation. Note that this implementation works only for
+ MPI_COMM_SELF and does not map a shared segment. */
+
+ MPIU_Free((*win_ptr)->base);
+ MPIU_Free((*win_ptr)->shm_base_addrs);
+
+ mpi_errno = MPIDI_Win_free(win_ptr);
+ if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
+
+ fn_exit:
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_SHM_WIN_FREE);
+ return mpi_errno;
+ /* --BEGIN ERROR HANDLING-- */
+ fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+
+#undef FUNCNAME
+#define FUNCNAME MPIDI_Win_shared_query
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+int MPIDI_Win_shared_query(MPID_Win *win_ptr, int target_rank, MPI_Aint *size,
+ int *disp_unit, void *baseptr)
+{
+ int mpi_errno = MPI_SUCCESS;
+
+ MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_SHARED_QUERY);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_SHARED_QUERY);
+
+ *(void**) baseptr = win_ptr->shm_base_addrs[0];
+ *size = win_ptr->size;
+ *disp_unit = win_ptr->disp_unit;
+
+ fn_exit:
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_SHARED_QUERY);
+ return mpi_errno;
+ /* --BEGIN ERROR HANDLING-- */
+ fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+
+#undef FUNCNAME
#define FUNCNAME MPIDI_Put
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
diff --git a/src/mpid/ch3/src/ch3u_win_fns.c b/src/mpid/ch3/src/ch3u_win_fns.c
index 6c0ad44..fba9694 100644
--- a/src/mpid/ch3/src/ch3u_win_fns.c
+++ b/src/mpid/ch3/src/ch3u_win_fns.c
@@ -222,17 +222,54 @@ int MPIDI_CH3U_Win_allocate_shared(MPI_Aint size, int disp_unit, MPID_Info *info
void **base_ptr, MPID_Win **win_ptr)
{
int mpi_errno = MPI_SUCCESS;
+ MPID_Comm *comm_self_ptr = NULL;
+ MPID_Group *group_comm, *group_self;
+ int result;
+ MPIU_CHKPMEM_DECL(1);
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_WIN_ALLOCATE_SHARED);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3U_WIN_ALLOCATE_SHARED);
- MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**notimpl");
+#ifdef HAVE_ERROR_CHECKING
+ /* The baseline CH3 implementation only works with MPI_COMM_SELF */
+ MPID_Comm_get_ptr( MPI_COMM_SELF, comm_self_ptr );
+
+ mpi_errno = MPIR_Comm_group_impl(comm_ptr, &group_comm);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ mpi_errno = MPIR_Comm_group_impl(comm_self_ptr, &group_self);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ mpi_errno = MPIR_Group_compare_impl(group_comm, group_self, &result);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ mpi_errno = MPIR_Group_free_impl(group_comm);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ mpi_errno = MPIR_Group_free_impl(group_self);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ if (result != MPI_IDENT) {
+ MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_RMA_SHARED, "**ch3|win_shared_comm");
+ }
+#endif
+
+ mpi_errno = MPIDI_CH3U_Win_allocate(size, disp_unit, info, comm_ptr,
+ base_ptr, win_ptr);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ MPIU_CHKPMEM_MALLOC((*win_ptr)->shm_base_addrs, void **,
+ 1 /* comm_size */ * sizeof(void *),
+ mpi_errno, "(*win_ptr)->shm_base_addrs");
+
+ (*win_ptr)->shm_base_addrs[0] = *base_ptr;
+
+ /* Register the shared memory window free function, which will free the
+ memory allocated here. */
+ (*win_ptr)->RMAFns.Win_free = MPIDI_SHM_Win_free;
fn_exit:
MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_CH3U_WIN_ALLOCATE_SHARED);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
+ MPIU_CHKPMEM_REAP();
goto fn_exit;
/* --END ERROR HANDLING-- */
}
http://git.mpich.org/mpich.git/commitdiff/80285037077d0ca3b13025b098f7c6755cf368be
commit 80285037077d0ca3b13025b098f7c6755cf368be
Author: James Dinan <dinan at mcs.anl.gov>
Date: Thu Feb 21 13:27:24 2013 -0600
Moved comm_split_type override from CH3 to Nemesis
Moved the MPI_Comm_split_type override from CH3 down to Nemesis. CH3
should now use the default implementation, which returns MPI_COMM_SELF.
Reviewer: apenya
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_init.c b/src/mpid/ch3/channels/nemesis/src/ch3_init.c
index 9bccebd..bec2a40 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_init.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_init.c
@@ -19,6 +19,37 @@ MPIDI_PG_t *MPIDI_CH3I_my_pg = NULL;
static int nemesis_initialized = 0;
+#undef FUNCNAME
+#define FUNCNAME split_type
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+static int split_type(MPID_Comm * comm_ptr, int stype, int key,
+ MPID_Info *info_ptr, MPID_Comm ** newcomm_ptr)
+{
+ MPID_Node_id_t id;
+ MPIR_Rank_t nid;
+ int mpi_errno = MPI_SUCCESS;
+
+ mpi_errno = MPID_Get_node_id(comm_ptr, comm_ptr->rank, &id);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ nid = (stype == MPI_COMM_TYPE_SHARED) ? id : MPI_UNDEFINED;
+ mpi_errno = MPIR_Comm_split_impl(comm_ptr, nid, key, newcomm_ptr);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ fn_exit:
+ return mpi_errno;
+
+ /* --BEGIN ERROR HANDLING-- */
+ fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+static MPID_CommOps comm_fns = {
+ split_type
+};
+
/* MPIDI_CH3_Init(): Initialize the nemesis channel */
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3_Init
@@ -32,6 +63,9 @@ int MPIDI_CH3_Init(int has_parent, MPIDI_PG_t *pg_p, int pg_rank)
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_INIT);
+ /* Override split_type */
+ MPID_Comm_fns = &comm_fns;
+
mpi_errno = MPID_nem_init (pg_rank, pg_p, has_parent);
if (mpi_errno) MPIU_ERR_POP (mpi_errno);
diff --git a/src/mpid/ch3/src/mpid_init.c b/src/mpid/ch3/src/mpid_init.c
index ff393ad..92803b5 100644
--- a/src/mpid/ch3/src/mpid_init.c
+++ b/src/mpid/ch3/src/mpid_init.c
@@ -41,37 +41,6 @@ MPIDI_Process_t MPIDI_Process = { NULL };
MPIDI_CH3U_SRBuf_element_t * MPIDI_CH3U_SRBuf_pool = NULL;
MPIDI_CH3U_Win_fns_t MPIDI_CH3U_Win_fns = { NULL };
-#undef FUNCNAME
-#define FUNCNAME split_type
-#undef FCNAME
-#define FCNAME MPIDI_QUOTE(FUNCNAME)
-static int split_type(MPID_Comm * comm_ptr, int stype, int key,
- MPID_Info *info_ptr, MPID_Comm ** newcomm_ptr)
-{
- MPID_Node_id_t id;
- MPIR_Rank_t nid;
- int mpi_errno = MPI_SUCCESS;
-
- mpi_errno = MPID_Get_node_id(comm_ptr, comm_ptr->rank, &id);
- if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-
- nid = (stype == MPI_COMM_TYPE_SHARED) ? id : MPI_UNDEFINED;
- mpi_errno = MPIR_Comm_split_impl(comm_ptr, nid, key, newcomm_ptr);
- if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-
- fn_exit:
- return mpi_errno;
-
- /* --BEGIN ERROR HANDLING-- */
- fn_fail:
- goto fn_exit;
- /* --END ERROR HANDLING-- */
-}
-
-static MPID_CommOps comm_fns = {
- split_type
-};
-
#undef FUNCNAME
#define FUNCNAME finalize_failed_procs_group
@@ -166,9 +135,6 @@ int MPID_Init(int *argc, char ***argv, int requested, int *provided,
mpi_errno = MPIDU_Ftb_init();
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
- /* Override split_type */
- MPID_Comm_fns = &comm_fns;
-
/* Initialize Window functions table with defaults, then call the channel's
init function. */
MPIDI_Win_fns_init(&MPIDI_CH3U_Win_fns);
http://git.mpich.org/mpich.git/commitdiff/06411a39d9c737f8b8440eb766eb0c571225a2c7
commit 06411a39d9c737f8b8440eb766eb0c571225a2c7
Author: James Dinan <dinan at mcs.anl.gov>
Date: Thu Feb 21 13:24:01 2013 -0600
Added missing function boilerplate decls
Added missing boilerplate declarations before
finalize_failed_procs_group.
Reviewer: apenya
diff --git a/src/mpid/ch3/src/mpid_init.c b/src/mpid/ch3/src/mpid_init.c
index f777a41..ff393ad 100644
--- a/src/mpid/ch3/src/mpid_init.c
+++ b/src/mpid/ch3/src/mpid_init.c
@@ -72,6 +72,11 @@ static MPID_CommOps comm_fns = {
split_type
};
+
+#undef FUNCNAME
+#define FUNCNAME finalize_failed_procs_group
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
static int finalize_failed_procs_group(void *param)
{
int mpi_errno = MPI_SUCCESS;
-----------------------------------------------------------------------
Summary of changes:
src/include/mpierrs.h | 9 ++++
src/mpi/errhan/errnames.txt | 1 +
src/mpi/rma/win_shared_query.c | 1 +
src/mpid/ch3/channels/nemesis/src/ch3_init.c | 34 +++++++++++++
src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c | 4 --
src/mpid/ch3/errnames.txt | 1 +
src/mpid/ch3/include/mpidimpl.h | 1 +
src/mpid/ch3/src/Makefile.mk | 1 -
src/mpid/ch3/src/ch3u_rma_notimpl.c | 38 ---------------
src/mpid/ch3/src/ch3u_rma_ops.c | 57 +++++++++++++++++++++++
src/mpid/ch3/src/ch3u_win_fns.c | 39 +++++++++++++++-
src/mpid/ch3/src/mpid_init.c | 33 +------------
12 files changed, 144 insertions(+), 75 deletions(-)
delete mode 100644 src/mpid/ch3/src/ch3u_rma_notimpl.c
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list