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
June 2014
- 2 participants
- 35 discussions
[mpich] MPICH primary repository branch, master, updated. v3.1-298-ge852708
by noreply@mpich.org 03 Jun '14
by noreply@mpich.org 03 Jun '14
03 Jun '14
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 e852708fa9fdd532e4dddba4af3e1d8276894fca (commit)
from 18de1dbea921fefcb5d99fffb555e7c8f0a727c4 (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/e852708fa9fdd532e4dddba4af3e1d827…
commit e852708fa9fdd532e4dddba4af3e1d8276894fca
Author: Michael Blocksome <blocksom(a)us.ibm.com>
Date: Tue Jun 3 12:05:24 2014 -0500
Update mpich 3.1.1 RELEASE_NOTES for Blue Gene/Q
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 8ece71f..9bc15e9 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -1,4 +1,17 @@
----------------------------------------------------------------------
+ NEW FEATURES
+----------------------------------------------------------------------
+
+### Blue Gene/Q implementation supports MPI-3
+
+ * This release contains a functional and compliant Blue Gene/Q
+ implementation of the MPI-3 standard. Instructions to build on
+ Blue Gene/Q are on the mpich.org wiki:
+
+ http://wiki.mpich.org/mpich/index.php/BGQ
+
+
+----------------------------------------------------------------------
KNOWN ISSUES
----------------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
RELEASE_NOTES | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1-297-g18de1db
by noreply@mpich.org 03 Jun '14
by noreply@mpich.org 03 Jun '14
03 Jun '14
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 18de1dbea921fefcb5d99fffb555e7c8f0a727c4 (commit)
from 99c231bbacd9305e8060c72c0f7116e94fa2e081 (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/18de1dbea921fefcb5d99fffb555e7c8f…
commit 18de1dbea921fefcb5d99fffb555e7c8f0a727c4
Author: Huiwei Lu <huiweilu(a)mcs.anl.gov>
Date: Tue Jun 3 11:28:29 2014 -0500
Fixes building MPI_Comm_idup for single-thread case
The patch 05eeccb5 causes failure in building with
'--enable-threads=single'. It fixes the MPI_Comm_idup multi-threaded
case but messes up with the single-threaded case. This commit reverts
back to the old code before 05eeccb5 for the single-threaded case and
keeps the fix for multi-threaded case.
Note that the old code is still not correct for multiple communicators.
See #1935.
Signed-off-by: Antonio J. Pena <apenya(a)mcs.anl.gov>
diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index 7d29e03..8f814f3 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -917,6 +917,191 @@ fn_fail:
goto fn_exit;
}
+struct gcn_state {
+ MPIR_Context_id_t *ctx0;
+ MPIR_Context_id_t *ctx1;
+ uint32_t local_mask[MPIR_MAX_CONTEXT_MASK];
+};
+
+#undef FUNCNAME
+#define FUNCNAME gcn_helper
+#undef FCNAME
+#define FCNAME MPIU_QUOTE(FUNCNAME)
+static int gcn_helper(MPID_Comm *comm, int tag, void *state)
+{
+ int mpi_errno = MPI_SUCCESS;
+ struct gcn_state *st = state;
+ MPIR_Context_id_t newctxid;
+
+ newctxid = MPIR_Find_and_allocate_context_id(st->local_mask);
+ if (!newctxid) {
+ int nfree = -1;
+ int ntotal = -1;
+ MPIR_ContextMaskStats(&nfree, &ntotal);
+ MPIU_ERR_SETANDJUMP3(mpi_errno, MPI_ERR_OTHER,
+ "**toomanycomm", "**toomanycomm %d %d %d",
+ nfree, ntotal, /*ignore_id=*/0);
+ }
+
+ if (st->ctx0)
+ *st->ctx0 = newctxid;
+ if (st->ctx1)
+ *st->ctx1 = newctxid;
+
+fn_fail:
+ return mpi_errno;
+}
+
+
+/* Does the meat of the algorithm, adds the relevant entries to the schedule.
+ * Assigns the resulting value to *ctx0 and *ctx1, as long as those respective
+ * pointers are non-NULL. */
+/* FIXME: this version is the single-threaded code. It fails the case when
+ * multiple communicators are created using comm_idup (see ticket-1935).
+ * The multi-threaded version has already fixed the bug, but we also need to
+ * fix the single-threaded case.
+ */
+#undef FUNCNAME
+#define FUNCNAME gcn_sch
+#undef FCNAME
+#define FCNAME MPIU_QUOTE(FUNCNAME)
+static int gcn_sch(MPID_Comm *comm_ptr, MPIR_Context_id_t *ctx0, MPIR_Context_id_t *ctx1, MPID_Sched_t s)
+{
+ int mpi_errno = MPI_SUCCESS;
+ struct gcn_state *st = NULL;
+ MPIU_CHKPMEM_DECL(1);
+
+ MPIU_Assert(comm_ptr->comm_kind == MPID_INTRACOMM);
+
+ /* first do as much local setup as we can */
+ if (initialize_context_mask) {
+ MPIR_Init_contextid();
+ }
+
+ MPIU_CHKPMEM_MALLOC(st, struct gcn_state *, sizeof(struct gcn_state), mpi_errno, "gcn_state");
+ st->ctx0 = ctx0;
+ st->ctx1 = ctx1;
+ MPIU_Memcpy(st->local_mask, context_mask, MPIR_MAX_CONTEXT_MASK * sizeof(uint32_t));
+
+ mpi_errno = comm_ptr->coll_fns->Iallreduce_sched(MPI_IN_PLACE, st->local_mask, MPIR_MAX_CONTEXT_MASK,
+ MPI_UINT32_T, MPI_BAND, comm_ptr, s);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ MPID_SCHED_BARRIER(s);
+
+ mpi_errno = MPID_Sched_cb(&gcn_helper, st, s);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ MPID_SCHED_BARRIER(s);
+
+ mpi_errno = MPID_Sched_cb(&MPIR_Sched_cb_free_buf, st, s);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ MPIU_CHKPMEM_COMMIT();
+fn_exit:
+ return mpi_errno;
+ /* --BEGIN ERROR HANDLING-- */
+fn_fail:
+ MPIU_CHKPMEM_REAP();
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+
+#undef FUNCNAME
+#define FUNCNAME MPIR_Get_contextid_nonblock
+#undef FCNAME
+#define FCNAME MPIU_QUOTE(FUNCNAME)
+int MPIR_Get_contextid_nonblock(MPID_Comm *comm_ptr, MPID_Comm *newcommp, MPID_Request **req)
+{
+ int mpi_errno = MPI_SUCCESS;
+ int tag;
+ MPID_Sched_t s;
+
+ MPID_MPI_STATE_DECL(MPID_STATE_MPIR_GET_CONTEXTID_NONBLOCK);
+
+ MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_GET_CONTEXTID_NONBLOCK);
+
+ /* now create a schedule */
+ mpi_errno = MPID_Sched_next_tag(comm_ptr, &tag);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ mpi_errno = MPID_Sched_create(&s);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ /* add some entries to it */
+ mpi_errno = gcn_sch(comm_ptr, &newcommp->context_id, &newcommp->recvcontext_id, s);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ /* finally, kick off the schedule and give the caller a request */
+ mpi_errno = MPID_Sched_start(&s, comm_ptr, tag, req);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+fn_exit:
+ MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_GET_CONTEXTID_NONBLOCK);
+ return mpi_errno;
+ /* --BEGIN ERROR HANDLING-- */
+fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+#undef FUNCNAME
+#define FUNCNAME MPIR_Get_intercomm_contextid_nonblock
+#undef FCNAME
+#define FCNAME MPIU_QUOTE(FUNCNAME)
+int MPIR_Get_intercomm_contextid_nonblock(MPID_Comm *comm_ptr, MPID_Comm *newcommp, MPID_Request **req)
+{
+ int mpi_errno = MPI_SUCCESS;
+ int tag;
+ MPID_Sched_t s;
+ MPID_Comm *lcomm = NULL;
+ MPID_MPI_STATE_DECL(MPID_STATE_MPIR_GET_INTERCOMM_CONTEXTID_NONBLOCK);
+
+ MPID_MPI_FUNC_ENTER(MPID_STATE_MPIR_GET_INTERCOMM_CONTEXTID_NONBLOCK);
+
+ /* do as much local setup as possible */
+ if (!comm_ptr->local_comm) {
+ mpi_errno = MPIR_Setup_intercomm_localcomm(comm_ptr);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ }
+ lcomm = comm_ptr->local_comm;
+
+ /* now create a schedule */
+ mpi_errno = MPID_Sched_next_tag(comm_ptr, &tag);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ mpi_errno = MPID_Sched_create(&s);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ /* add some entries to it */
+
+ /* first get a context ID over the local comm */
+ mpi_errno = gcn_sch(lcomm, &newcommp->recvcontext_id, NULL, s);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ MPID_SCHED_BARRIER(s);
+
+ if (comm_ptr->rank == 0) {
+ newcommp->recvcontext_id = -1;
+ mpi_errno = MPID_Sched_recv(&newcommp->context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, comm_ptr, s);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ mpi_errno = MPID_Sched_send(&newcommp->recvcontext_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, comm_ptr, s);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+ MPID_SCHED_BARRIER(s);
+ }
+
+ mpi_errno = lcomm->coll_fns->Ibcast_sched(&newcommp->context_id, 1,
+ MPIR_CONTEXT_ID_T_DATATYPE, 0, lcomm, s);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+ /* finally, kick off the schedule and give the caller a request */
+ mpi_errno = MPID_Sched_start(&s, comm_ptr, tag, req);
+ if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+fn_fail:
+ MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_GET_INTERCOMM_CONTEXTID_NONBLOCK);
+ return mpi_errno;
+}
+
#else /* MPICH_IS_THREADED is set and true */
/* EAGER CONTEXT ID ALLOCATION: Attempt to allocate the context ID during the
@@ -1217,8 +1402,6 @@ fn_fail:
/* --END ERROR HANDLING-- */
}
-#endif
-
struct gcn_state {
MPIR_Context_id_t *ctx0;
MPIR_Context_id_t *ctx1;
@@ -1415,7 +1598,6 @@ fn_fail:
/* --END ERROR HANDLING-- */
}
-
#undef FUNCNAME
#define FUNCNAME MPIR_Get_contextid_nonblock
#undef FCNAME
@@ -1493,6 +1675,8 @@ fn_fail:
return mpi_errno;
}
+#endif
+
/* Get a context for a new intercomm. There are two approaches
here (for MPI-1 codes only)
diff --git a/test/mpi/comm/testlist b/test/mpi/comm/testlist
index b3987af..c5ed8d8 100644
--- a/test/mpi/comm/testlist
+++ b/test/mpi/comm/testlist
@@ -27,8 +27,8 @@ comm_group_rand 8 mpiversion=3.0
comm_idup 2 mpiversion=3.0
comm_idup 4 mpiversion=3.0
comm_idup 9 mpiversion=3.0
-comm_idup_mul 2 mpiversion=3.0
-comm_idup_overlap 2 mpiversion=3.0
+comm_idup_mul 2 mpiversion=3.0 xfail=ticket1935
+comm_idup_overlap 2 mpiversion=3.0 xfail=ticket1935
dup_with_info 2 mpiversion=3.0
dup_with_info 4 mpiversion=3.0
dup_with_info 9 mpiversion=3.0
-----------------------------------------------------------------------
Summary of changes:
src/mpi/comm/commutil.c | 190 ++++++++++++++++++++++++++++++++++++++++++++++-
test/mpi/comm/testlist | 4 +-
2 files changed, 189 insertions(+), 5 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1-296-g99c231b
by noreply@mpich.org 03 Jun '14
by noreply@mpich.org 03 Jun '14
03 Jun '14
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 99c231bbacd9305e8060c72c0f7116e94fa2e081 (commit)
from 050116938f832c9bf135d0df93d1f7232d7f4a83 (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/99c231bbacd9305e8060c72c0f7116e94…
commit 99c231bbacd9305e8060c72c0f7116e94fa2e081
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Tue Jun 3 08:19:36 2014 -0500
use --enable-new-dtags in compiler scripts
The use of LD_LIBRARY_PATH is not sufficient to override RPATH tags
encoded in an ELF binary. This hinders users looking to swap ABI
compatible versions of MPI at runtime. To enable this use, the compiler
scripts should use --enable-new-dtags, which sets RUNPATH instead of
RPATH in the binary, and will be checked after LD_LIBRARY_PATH. Thanks
to Intel for suggesting this change.
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/confdb/config.rpath b/confdb/config.rpath
index 82db9a2..039c11e 100755
--- a/confdb/config.rpath
+++ b/confdb/config.rpath
@@ -220,7 +220,16 @@ if test "$with_gnu_ld" = yes; then
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- :
+ # use --enable-new-dtags for RUNPATH support, which is required for
+ # switching between ABI compatible libraries at runtime.
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec="${hardcode_libdir_flag_spec} ${wl}--enable-new-dtags"
+ else
+ case $cc_basename in ifort*)
+ hardcode_libdir_flag_spec="${hardcode_libdir_flag_spec} ${wl}--enable-new-dtags"
+ ;;
+ esac
+ fi
else
ld_shlibs=no
fi
-----------------------------------------------------------------------
Summary of changes:
confdb/config.rpath | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1-295-g0501169
by noreply@mpich.org 02 Jun '14
by noreply@mpich.org 02 Jun '14
02 Jun '14
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 050116938f832c9bf135d0df93d1f7232d7f4a83 (commit)
via 76a079c7c0525b336565e700bf9ab55e240c58fe (commit)
from 735e81b2d5ce04c81349f25af0eeaffe8aa8d431 (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/050116938f832c9bf135d0df93d1f7232…
commit 050116938f832c9bf135d0df93d1f7232d7f4a83
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Mon Jun 2 15:24:48 2014 -0500
fix "used uninitilized" compiler warning
diff --git a/src/mpi/romio/test/types_with_zeros.c b/src/mpi/romio/test/types_with_zeros.c
index a4b0c15..4ec6262 100644
--- a/src/mpi/romio/test/types_with_zeros.c
+++ b/src/mpi/romio/test/types_with_zeros.c
@@ -26,7 +26,7 @@ enum {
int test_indexed_with_zeros(char *filename, int testcase)
{
- int i, rank, np, buflen, num, err, nr_errors;
+ int i, rank, np, buflen, num, err, nr_errors=0;
int nelms[MAXLEN], buf[MAXLEN], indices[MAXLEN], blocklen[MAXLEN];
MPI_File fh;
MPI_Status status;
@@ -127,7 +127,7 @@ int main(int argc, char **argv)
if (rank == 0) fprintf(stderr,"Must run on 2 MPI processes\n");
MPI_Finalize(); return 1;
}
- nr_errors += test_indexed_with_zeros(argv[1], INDEXED);
+ nr_errors = test_indexed_with_zeros(argv[1], INDEXED);
nr_errors += test_indexed_with_zeros(argv[1], HINDEXED);
nr_errors += test_indexed_with_zeros(argv[1], STRUCT);
http://git.mpich.org/mpich.git/commitdiff/76a079c7c0525b336565e700bf9ab55e2…
commit 76a079c7c0525b336565e700bf9ab55e240c58fe
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Thu May 29 10:07:26 2014 -0500
revert old "removezeros" optimization
Recent bug reports now have me much less certain about the behavior of
zero-length blocks in the flattened representation. LB and UB markers
could occur anywhere. The recent commits to ignore block counts of zero
should make this optimization pointless anyway.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/mpi/romio/adio/common/flatten.c b/src/mpi/romio/adio/common/flatten.c
index 83e3c1d..bc5f1e2 100644
--- a/src/mpi/romio/adio/common/flatten.c
+++ b/src/mpi/romio/adio/common/flatten.c
@@ -1067,53 +1067,6 @@ MPI_Count ADIOI_Count_contiguous_blocks(MPI_Datatype datatype, MPI_Count *curr_i
return count;
}
-/* removezeros() make a second pass over the
- * flattented type knocking out zero-length blocks, but leave first and last
- * alone (they mark LB and UB) */
-
-static void removezeros(ADIOI_Flatlist_node *flat_type)
-{
- int i,j,opt_blocks;
- ADIO_Offset *opt_blocklens;
- ADIO_Offset *opt_indices;
-
- /* short-circuit: there is nothing to do if there are
- * - 1 block: what can we remove?
- * - 2 blocks: either both blocks are data (and not zero)
- * or one block is the UB or LB */
- if (flat_type->count <= 2) return;
-
- opt_blocks = 2; /* LB and UB */
- for (i=1; i < flat_type->count -1; i++) {
- if(flat_type->blocklens[i] != 0)
- opt_blocks++;
- }
- /* no optimization possible */
- if (opt_blocks == flat_type->count) return;
- opt_blocklens = (ADIO_Offset *) ADIOI_Malloc(opt_blocks * sizeof(ADIO_Offset));
- opt_indices = (ADIO_Offset *)ADIOI_Malloc(opt_blocks*sizeof(ADIO_Offset));
-
- /* fill in new blocklists, keeping first and last no matter what */
- opt_blocklens[0] = flat_type->blocklens[0];
- opt_indices[0] = flat_type->indices[0];
- j = 1; /* always two entries: one for LB and UB ([0] and [j])*/
- for (i=1; i< flat_type->count -1; i++) {
- if( flat_type->blocklens[i] != 0) {
- opt_indices[j] = flat_type->indices[i];
- opt_blocklens[j] = flat_type->blocklens[i];
- j++;
- }
- }
- opt_indices[j] = flat_type->indices[flat_type->count -1];
- opt_blocklens[j] = flat_type->blocklens[flat_type->count -1];
-
- flat_type->count = opt_blocks;
- ADIOI_Free(flat_type->blocklens);
- ADIOI_Free(flat_type->indices);
- flat_type->blocklens = opt_blocklens;
- flat_type->indices = opt_indices;
- return;
-}
/****************************************************************/
@@ -1125,8 +1078,9 @@ static void removezeros(ADIOI_Flatlist_node *flat_type)
*
* NOTE: a further optimization would be to remove zero length blocks. However,
* the first and last blocks must remain as zero length first or last block
- * indicates UB and LB.
- *
+ * indicates UB and LB. Furthermore, once the "zero length blocklen" fix
+ * went in, the flattened representation should no longer have zero-length
+ * blocks except for UB and LB markers.
*/
void ADIOI_Optimize_flattened(ADIOI_Flatlist_node *flat_type)
{
@@ -1168,7 +1122,6 @@ void ADIOI_Optimize_flattened(ADIOI_Flatlist_node *flat_type)
ADIOI_Free(flat_type->indices);
flat_type->blocklens = opt_blocklens;
flat_type->indices = opt_indices;
- removezeros(flat_type);
return;
}
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/common/flatten.c | 53 ++-------------------------------
src/mpi/romio/test/types_with_zeros.c | 4 +-
2 files changed, 5 insertions(+), 52 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1-293-g735e81b
by noreply@mpich.org 02 Jun '14
by noreply@mpich.org 02 Jun '14
02 Jun '14
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 735e81b2d5ce04c81349f25af0eeaffe8aa8d431 (commit)
via 5c0999c59df3ebc9d6fdd7f74c1e618c80733374 (commit)
via a7d8e188cbde58e9b67a0cd09491c7797fee61f2 (commit)
via e19e75f7d3baa10a76f1720575c5a558de4c9bf3 (commit)
via d2a87792e4a268c80b0be3462de2753771f52ada (commit)
from 7e44a0f14764b56823811ff8235ce802f5bdfae6 (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/735e81b2d5ce04c81349f25af0eeaffe8…
commit 735e81b2d5ce04c81349f25af0eeaffe8aa8d431
Author: Su Huang <suhuang(a)us.ibm.com>
Date: Mon Jun 2 14:10:43 2014 -0400
pamid: fixed various RMA problems with shared window
diff --git a/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c b/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
index fa0fada..52855bd 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
@@ -34,7 +34,7 @@ MPIDI_Fetch_data_op(const void * origin_addr,
MPID_Win *win)
{
static char FCNAME[] = "MPIDI_Fetch_data_op";
- int shm_locked;
+ int shm_locked=0;
MPI_User_function *uop;
void *base, *dest_addr;
int disp_unit;
@@ -46,14 +46,6 @@ MPIDI_Fetch_data_op(const void * origin_addr,
base = win->mpid.info[target_rank].base_addr;
disp_unit = win->mpid.info[target_rank].disp_unit;
}
- else if (win->create_flavor == MPI_WIN_FLAVOR_DYNAMIC) {
- base = NULL;
- disp_unit = win->disp_unit;
- }
- else {
- base = win->mpid.info[target_rank].base_addr;
- disp_unit = win->mpid.info[target_rank].disp_unit;
- }
dest_addr = (char *) base + disp_unit * target_disp;
MPID_Datatype_get_size_macro(origin_datatype, len);
@@ -525,7 +517,7 @@ MPID_Get_accumulate(const void * origin_addr,
MPIDI_Win_datatype_basic(result_count, result_datatype, &req->result.dt);
MPIDI_Win_datatype_map(&req->result.dt);
req->result_num_contig = req->result.dt.num_contig;
- if (target_rank == win->comm_ptr->rank || win->create_flavor == MPI_WIN_FLAVOR_SHARED)
+ if (win->create_flavor == MPI_WIN_FLAVOR_SHARED)
{
win->mpid.sync.total++;
MPIDI_Fetch_data_op(origin_addr, origin_count, origin_datatype,
@@ -541,11 +533,12 @@ MPID_Get_accumulate(const void * origin_addr,
MPIDI_Win_datatype_unmap(&req->target.dt);
MPIDI_Win_datatype_unmap(&req->result.dt);
- if(req->req_handle)
+ if(req->req_handle) {
MPID_cc_set(req->req_handle->cc_ptr, 0);
- else
+ } else {
MPIU_Free(req);
- } else { /* non-shared or target_rank != origin_rank */
+ }
+ } else { /* non-shared */
//We wait for #messages depending on target and result_datatype
win->mpid.sync.total += (1 + req->target.dt.num_contig);
{
diff --git a/src/mpid/pamid/src/onesided/mpid_win_put.c b/src/mpid/pamid/src/onesided/mpid_win_put.c
index 535cbfd..d395792 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_put.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_put.c
@@ -264,33 +264,16 @@ MPID_Put(const void *origin_addr,
}
- /* shared window */
- if ( (win->create_flavor == MPI_WIN_FLAVOR_SHARED))
- {
- ++win->mpid.sync.total;
-
- MPIDI_SHM_MUTEX_LOCK(win);
- shm_locked=1;
-
- if (target_rank == win->comm_ptr->rank)
- target_addr=win->base + req->offset;
- else
- target_addr = win->mpid.info[target_rank].base_addr + req->offset;
-
- /* The operation is not complete until the local copy is performed */
- mpi_errno = MPIR_Localcopy(origin_addr,
- origin_count,
- origin_datatype,
- target_addr,
- target_count,
- target_datatype);
-
- if (shm_locked) {
- MPIDI_SHM_MUTEX_UNLOCK(win);
- shm_locked=0;
- }
+ if (target_rank == win->comm_ptr->rank)
+ {
+ size_t offset = req->offset;
- ++win->mpid.sync.complete;
+ mpi_errno = MPIR_Localcopy(origin_addr,
+ origin_count,
+ origin_datatype,
+ win->base + offset,
+ target_count,
+ target_datatype);
/* The instant this completion counter is set to zero another thread
* may notice the change and begin freeing request resources. The
@@ -300,12 +283,12 @@ MPID_Put(const void *origin_addr,
*
* See MPID_Request_release_inline()
*/
- if(req->req_handle)
- MPID_cc_set(req->req_handle->cc_ptr, 0);
- else
- MPIU_Free(req);
- return mpi_errno;
- }
+ if(req->req_handle)
+ MPID_cc_set(req->req_handle->cc_ptr, 0);
+ else
+ MPIU_Free(req);
+ return mpi_errno;
+ }
req->target.rank = target_rank;
http://git.mpich.org/mpich.git/commitdiff/5c0999c59df3ebc9d6fdd7f74c1e618c8…
commit 5c0999c59df3ebc9d6fdd7f74c1e618c80733374
Author: Michael Blocksome <blocksom(a)us.ibm.com>
Date: Mon Jun 2 11:45:13 2014 -0500
pamid: shared window fixes for mpi_get_accumulate
diff --git a/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c b/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
index 420c9e2..fa0fada 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_get_accumulate.c
@@ -22,6 +22,57 @@
#include "mpidi_onesided.h"
static void
+MPIDI_Fetch_data_op(const void * origin_addr,
+ int origin_count,
+ MPI_Datatype origin_datatype,
+ void * result_addr,
+ int target_rank,
+ MPI_Aint target_disp,
+ int target_count,
+ MPI_Datatype target_datatype,
+ MPI_Op op,
+ MPID_Win *win)
+{
+ static char FCNAME[] = "MPIDI_Fetch_data_op";
+ int shm_locked;
+ MPI_User_function *uop;
+ void *base, *dest_addr;
+ int disp_unit;
+ int len, one;
+
+ if (win->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ MPIDI_SHM_MUTEX_LOCK(win);
+ shm_locked = 1;
+ base = win->mpid.info[target_rank].base_addr;
+ disp_unit = win->mpid.info[target_rank].disp_unit;
+ }
+ else if (win->create_flavor == MPI_WIN_FLAVOR_DYNAMIC) {
+ base = NULL;
+ disp_unit = win->disp_unit;
+ }
+ else {
+ base = win->mpid.info[target_rank].base_addr;
+ disp_unit = win->mpid.info[target_rank].disp_unit;
+ }
+ dest_addr = (char *) base + disp_unit * target_disp;
+
+ MPID_Datatype_get_size_macro(origin_datatype, len);
+ MPIU_Memcpy(result_addr, dest_addr, len);
+ if (op != MPI_NO_OP) {
+ uop = MPIR_OP_HDL_TO_FN(op);
+ one = 1;
+ (*uop)((void *) origin_addr, dest_addr, &one, &origin_datatype);
+ }
+
+ if (shm_locked) {
+ MPIDI_SHM_MUTEX_UNLOCK(win);
+ shm_locked = 0;
+ }
+ fn_fail: return;
+}
+
+
+static void
MPIDI_Win_GetAccSendAckDoneCB(pami_context_t context,
void * _info,
pami_result_t result)
@@ -36,6 +87,7 @@ MPIDI_Win_GetAccumSendAck(pami_context_t context,
void * _info,
pami_result_t result)
{
+ static char FCNAME[] = "MPID_Win_GetAccumSendAck";
MPIDI_Win_GetAccMsgInfo *msginfo = (MPIDI_Win_GetAccMsgInfo *) _info;
pami_result_t rc = PAMI_SUCCESS;
@@ -58,7 +110,6 @@ MPIDI_Win_GetAccumSendAck(pami_context_t context,
MPI_CHAR);
MPID_assert(mpi_errno == MPI_SUCCESS);
}
-
//Schedule sends to source to result buffer and trigger completion
//callback there
pami_send_t params = {
@@ -83,6 +134,7 @@ MPIDI_Win_GetAccumSendAck(pami_context_t context,
rc = PAMI_Send(context, ¶ms);
MPID_assert(rc == PAMI_SUCCESS);
+ fn_fail: return;
}
void
@@ -320,7 +372,14 @@ MPID_Get_accumulate(const void * origin_addr,
int mpi_errno = MPI_SUCCESS;
if (op == MPI_NO_OP) {//we just need to fetch data
- mpi_errno = MPID_Get(result_addr,
+ if (win->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ win->mpid.sync.total++;
+ MPIDI_Fetch_data_op(origin_addr, origin_count, origin_datatype,
+ result_addr, target_rank, target_disp,
+ target_count, target_datatype, op, win);
+ ++win->mpid.sync.complete;
+ } else {
+ mpi_errno = MPID_Get(result_addr,
result_count,
result_datatype,
target_rank,
@@ -328,6 +387,7 @@ MPID_Get_accumulate(const void * origin_addr,
target_count,
target_datatype,
win);
+ }
return mpi_errno;
}
@@ -465,10 +525,29 @@ MPID_Get_accumulate(const void * origin_addr,
MPIDI_Win_datatype_basic(result_count, result_datatype, &req->result.dt);
MPIDI_Win_datatype_map(&req->result.dt);
req->result_num_contig = req->result.dt.num_contig;
-
+ if (target_rank == win->comm_ptr->rank || win->create_flavor == MPI_WIN_FLAVOR_SHARED)
+ {
+ win->mpid.sync.total++;
+ MPIDI_Fetch_data_op(origin_addr, origin_count, origin_datatype,
+ result_addr, target_rank, target_disp,
+ target_count, target_datatype, op, win);
+ ++win->mpid.sync.complete;
+
+ if (req->buffer_free) {
+ MPIU_Free(req->buffer);
+ MPIU_Free(req->user_buffer);
+ req->buffer_free = 0;
+ }
+ MPIDI_Win_datatype_unmap(&req->target.dt);
+ MPIDI_Win_datatype_unmap(&req->result.dt);
+
+ if(req->req_handle)
+ MPID_cc_set(req->req_handle->cc_ptr, 0);
+ else
+ MPIU_Free(req);
+ } else { /* non-shared or target_rank != origin_rank */
//We wait for #messages depending on target and result_datatype
win->mpid.sync.total += (1 + req->target.dt.num_contig);
-
{
MPI_Datatype basic_type = MPI_DATATYPE_NULL;
MPID_Datatype_get_basic_type(origin_datatype, basic_type);
@@ -516,7 +595,7 @@ MPID_Get_accumulate(const void * origin_addr,
* better latency for one-sided operations.
*/
PAMI_Context_post(MPIDI_Context[0], &req->post_request, MPIDI_Get_accumulate, req);
-
+ }
fn_fail:
return mpi_errno;
}
http://git.mpich.org/mpich.git/commitdiff/a7d8e188cbde58e9b67a0cd09491c7797…
commit a7d8e188cbde58e9b67a0cd09491c7797fee61f2
Author: Michael Blocksome <blocksom(a)us.ibm.com>
Date: Mon Jun 2 11:43:35 2014 -0500
pamid: shared window fixes for mpi_get
diff --git a/src/mpid/pamid/src/onesided/mpid_win_get.c b/src/mpid/pamid/src/onesided/mpid_win_get.c
index 019d513..7b83d4a 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_get.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_get.c
@@ -204,6 +204,8 @@ MPID_Get(void *origin_addr,
MPID_Win *win)
{
int mpi_errno = MPI_SUCCESS;
+ int shm_locked=0;
+ void *target_addr;
MPIDI_Win_request *req = MPIU_Calloc0(1, MPIDI_Win_request);
req->win = win;
if(win->mpid.request_based != 1)
@@ -257,16 +259,30 @@ MPID_Get(void *origin_addr,
return MPI_SUCCESS;
}
- /* If the get is a local operation, do it here */
- if (target_rank == win->comm_ptr->rank)
+ /* If the get is a local operation,or shared window do it here */
+ if ((target_rank == win->comm_ptr->rank) || (win->create_flavor == MPI_WIN_FLAVOR_SHARED))
{
+ if (target_rank == win->comm_ptr->rank)
+ target_addr = win->base + req->offset;
+ else
+ target_addr = win->mpid.info[target_rank].base_addr + req->offset;
+
+ if (win->create_flavor == MPI_WIN_FLAVOR_SHARED) {
+ MPIDI_SHM_MUTEX_LOCK(win);
+ shm_locked=1;
+ }
+
/* The operation is not complete until the local copy is performed */
- mpi_errno = MPIR_Localcopy(win->base + req->offset,
+ mpi_errno = MPIR_Localcopy(target_addr,
target_count,
target_datatype,
origin_addr,
origin_count,
origin_datatype);
+ if (shm_locked) {
+ MPIDI_SHM_MUTEX_UNLOCK(win);
+ shm_locked=0;
+ }
/* The instant this completion counter is set to zero another thread
* may notice the change and begin freeing request resources. The
http://git.mpich.org/mpich.git/commitdiff/e19e75f7d3baa10a76f1720575c5a558d…
commit e19e75f7d3baa10a76f1720575c5a558de4c9bf3
Author: Michael Blocksome <blocksom(a)us.ibm.com>
Date: Mon Jun 2 11:36:56 2014 -0500
pamid: calculate correct shared memory base address
diff --git a/src/mpid/pamid/src/onesided/mpid_win_accumulate.c b/src/mpid/pamid/src/onesided/mpid_win_accumulate.c
index 2ab1f14..47fe880 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_accumulate.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_accumulate.c
@@ -161,6 +161,7 @@ MPID_Accumulate(const void *origin_addr,
MPID_Win *win)
{
int mpi_errno = MPI_SUCCESS;
+ int shm_locked = 0;
MPIDI_Win_request *req = MPIU_Calloc0(1, MPIDI_Win_request);
req->win = win;
if(win->mpid.request_based != 1)
@@ -288,10 +289,39 @@ MPID_Accumulate(const void *origin_addr,
MPIDI_Win_datatype_map(&req->target.dt);
- win->mpid.sync.total += req->target.dt.num_contig;
+ if (win->create_flavor == MPI_WIN_FLAVOR_SHARED)
+ {
+ MPI_User_function *uop;
+ void *base, *dest_addr;
+ int disp_unit;
+ int len, one;
+ ++win->mpid.sync.total;
+ MPIDI_SHM_MUTEX_LOCK(win);
+ shm_locked = 1;
+ base = win->mpid.info[target_rank].base_addr;
+ disp_unit = win->mpid.info[target_rank].disp_unit;
+ dest_addr = (char *) base + disp_unit * target_disp;
+
+ MPID_Datatype_get_size_macro(origin_datatype, len);
+
+ uop = MPIR_OP_HDL_TO_FN(op);
+ one = 1;
+
+ (*uop)((void *) origin_addr, dest_addr, &one, &origin_datatype);
+
+ if (shm_locked) {
+ MPIDI_SHM_MUTEX_UNLOCK(win);
+ shm_locked = 0;
+ }
+
+ MPIU_Free(req);
+ ++win->mpid.sync.complete;
+
+ } else { /* non-shared */
{
+ win->mpid.sync.total += req->target.dt.num_contig;
MPI_Datatype basic_type = MPI_DATATYPE_NULL;
MPID_Datatype_get_basic_type(origin_datatype, basic_type);
/* MPID_Datatype_get_basic_type() doesn't handle the struct types */
@@ -334,6 +364,7 @@ MPID_Accumulate(const void *origin_addr,
*/
PAMI_Context_post(MPIDI_Context[0], &req->post_request, MPIDI_Accumulate, req);
+ }
fn_fail:
return mpi_errno;
}
diff --git a/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c b/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c
index 78e27a0..0a63e9f 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c
@@ -512,11 +512,15 @@ MPID_Win_allocate_shared(MPI_Aint size,
char *cur_base = (*win_ptr)->base;
for (i = 0; i < comm_size; ++i) {
if (win->mpid.info[i].base_size) {
+ if (i == 0)
+ win->mpid.info[i].base_addr = (void *) ((MPI_Aint) cur_base);
+ else {
if (noncontig)
/* Round up to next page size */
- win->mpid.info[i].base_addr =(void *) ((MPI_Aint) cur_base + (MPI_Aint) MPIDI_ROUND_UP_PAGESIZE(size,pageSize));
+ win->mpid.info[i].base_addr =(void *) ((MPI_Aint) cur_base + (MPI_Aint) MPIDI_ROUND_UP_PAGESIZE((win->mpid.info[i-1].base_size),pageSize));
else
- win->mpid.info[i].base_addr = (void *) ((MPI_Aint) cur_base + (MPI_Aint) size);
+ win->mpid.info[i].base_addr = (void *) ((MPI_Aint) cur_base + (MPI_Aint) (win->mpid.info[i-1].base_size));
+ }
cur_base = win->mpid.info[i].base_addr;
} else {
win->mpid.info[i].base_addr = NULL;
diff --git a/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c b/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c
index ebbe56e..e75c921 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_compare_and_swap.c
@@ -116,6 +116,7 @@ int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr,
int disp_unit;
int len;
+ ++win->mpid.sync.total;
if (win->create_flavor == MPI_WIN_FLAVOR_SHARED) {
MPIDI_SHM_MUTEX_LOCK(win);
shm_locked = 1;
@@ -128,7 +129,7 @@ int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr,
disp_unit = win->disp_unit;
}
else {
- base = win->base;
+ base = win->mpid.info[target_rank].base_addr;
disp_unit = win->disp_unit;
}
@@ -145,6 +146,7 @@ int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr,
shm_locked = 0;
}
MPIU_Free(req);
+ ++win->mpid.sync.complete;
}
else {
req->buffer = (void *) ((uintptr_t) origin_addr + req->origin.dt.true_lb);
diff --git a/src/mpid/pamid/src/onesided/mpid_win_fetch_and_op.c b/src/mpid/pamid/src/onesided/mpid_win_fetch_and_op.c
index b1a415c..6343484 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_fetch_and_op.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_fetch_and_op.c
@@ -297,11 +297,12 @@ int MPID_Fetch_and_op(const void *origin_addr, void *result_addr,
int disp_unit;
int len, one;
+ ++win->mpid.sync.total;
if (win->create_flavor == MPI_WIN_FLAVOR_SHARED) {
MPIDI_SHM_MUTEX_LOCK(win);
shm_locked = 1;
base = win->mpid.info[target_rank].base_addr;
- disp_unit = win->disp_unit;
+ disp_unit = win->mpid.info[target_rank].disp_unit;
}
else if (win->create_flavor == MPI_WIN_FLAVOR_DYNAMIC) {
@@ -309,8 +310,8 @@ int MPID_Fetch_and_op(const void *origin_addr, void *result_addr,
disp_unit = win->disp_unit;
}
else {
- base = win->base;
- disp_unit = win->disp_unit;
+ base = win->mpid.info[target_rank].base_addr;
+ disp_unit = win->mpid.info[target_rank].disp_unit;
}
dest_addr = (char *) base + disp_unit * target_disp;
@@ -330,6 +331,7 @@ int MPID_Fetch_and_op(const void *origin_addr, void *result_addr,
MPIU_Free(req);
+ ++win->mpid.sync.complete;
}
else {
req->compare_buffer = NULL;
diff --git a/src/mpid/pamid/src/onesided/mpid_win_put.c b/src/mpid/pamid/src/onesided/mpid_win_put.c
index db5f20c..535cbfd 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_put.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_put.c
@@ -206,6 +206,8 @@ MPID_Put(const void *origin_addr,
MPID_Win *win)
{
int mpi_errno = MPI_SUCCESS;
+ int shm_locked=0;
+ void * target_addr;
MPIDI_Win_request *req = MPIU_Calloc0(1, MPIDI_Win_request);
req->win = win;
if(win->mpid.request_based != 1)
@@ -262,17 +264,34 @@ MPID_Put(const void *origin_addr,
}
- /* If the get is a local operation, do it here */
- if (target_rank == win->comm_ptr->rank)
+ /* shared window */
+ if ( (win->create_flavor == MPI_WIN_FLAVOR_SHARED))
{
+ ++win->mpid.sync.total;
+
+ MPIDI_SHM_MUTEX_LOCK(win);
+ shm_locked=1;
+
+ if (target_rank == win->comm_ptr->rank)
+ target_addr=win->base + req->offset;
+ else
+ target_addr = win->mpid.info[target_rank].base_addr + req->offset;
+
/* The operation is not complete until the local copy is performed */
mpi_errno = MPIR_Localcopy(origin_addr,
origin_count,
origin_datatype,
- win->base + req->offset,
+ target_addr,
target_count,
target_datatype);
+ if (shm_locked) {
+ MPIDI_SHM_MUTEX_UNLOCK(win);
+ shm_locked=0;
+ }
+
+ ++win->mpid.sync.complete;
+
/* The instant this completion counter is set to zero another thread
* may notice the change and begin freeing request resources. The
* thread executing the code in this function must not touch any
http://git.mpich.org/mpich.git/commitdiff/d2a87792e4a268c80b0be3462de275377…
commit d2a87792e4a268c80b0be3462de2753771f52ada
Author: Michael Blocksome <blocksom(a)us.ibm.com>
Date: Mon Jun 2 11:28:16 2014 -0500
pamid: use MPIDI_Win_shm_ctrl_t structure consistently
diff --git a/src/mpid/pamid/include/mpidi_datatypes.h b/src/mpid/pamid/include/mpidi_datatypes.h
index de191b1..7c6e566 100644
--- a/src/mpid/pamid/include/mpidi_datatypes.h
+++ b/src/mpid/pamid/include/mpidi_datatypes.h
@@ -448,8 +448,10 @@ typedef pthread_mutex_t MPIDI_SHM_MUTEX;
typedef struct MPIDI_Win_shm_ctrl_t
{
- MPIDI_SHM_MUTEX mutex_lock;
+ MPIDI_SHM_MUTEX mutex_lock; /* shared memory windows -- lock for */
+ /* accumulate/atomic operations */
OPA_int_t active;
+ int shm_count;
} MPIDI_Win_shm_ctrl_t;
typedef struct MPIDI_Win_shm_t
@@ -463,9 +465,7 @@ typedef struct MPIDI_Win_shm_t
uint32_t shm_id; /* shared memory id - sysv */
char shm_key[64]; /* shared memory key - posix */
};
- int *shm_count;
- MPIDI_SHM_MUTEX *mutex_lock; /* shared memory windows -- lock for */
- /* accumulate/atomic operations */
+ MPIDI_Win_shm_ctrl_t *ctrl;
} MPIDI_Win_shm_t;
/**
diff --git a/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c b/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c
index bdb241f..78e27a0 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_allocate_shared.c
@@ -182,7 +182,7 @@ MPID_getSharedSegment_mmap(MPID_Win * win)
close (fd); /* no longer needed */
/* set mutex_lock address and initialize it */
- win->mpid.shm->mutex_lock = (MPIDI_SHM_MUTEX *) win->mpid.shm->base_addr;
+ win->mpid.shm->ctrl = (MPIDI_Win_shm_ctrl_t *) win->mpid.shm->base_addr;
if (1 == first) {
MPIDI_SHM_MUTEX_INIT(win);
}
@@ -271,7 +271,7 @@ MPID_getSharedSegment_sysv(MPID_Win * win)
MPIU_ERR_CHKANDJUMP((win->mpid.shm->base_addr == (void*) -1), mpi_errno,MPI_ERR_BUFFER, "**bufnull");
/* set mutex_lock address and initialize it */
- win->mpid.shm->mutex_lock = (MPIDI_SHM_MUTEX *) win->mpid.shm->base_addr;
+ win->mpid.shm->ctrl = (MPIDI_Win_shm_ctrl_t *) win->mpid.shm->base_addr;
MPIDI_SHM_MUTEX_INIT(win);
/* successfully created shm segment - shared the key with other tasks */
@@ -285,7 +285,7 @@ MPID_getSharedSegment_sysv(MPID_Win * win)
if (win->mpid.shm->shm_id != -1) { /* shm segment is available */
win->mpid.shm->base_addr = (void *) shmat(win->mpid.shm->shm_id,0,0);
}
- win->mpid.shm->mutex_lock = (MPIDI_SHM_MUTEX *) win->mpid.shm->base_addr;
+ win->mpid.shm->ctrl = (MPIDI_Win_shm_ctrl_t *) win->mpid.shm->base_addr;
}
win->mpid.shm->allocated = 1;
@@ -333,7 +333,7 @@ MPID_getSharedSegment(MPI_Aint size,
/* The beginning of the heap allocation contains a control block
* before the data begins.
*/
- new_size = MPIDI_ROUND_UP_PAGESIZE(sizeof(MPIDI_Win_shm_ctrl_t),pageSize);
+ new_size = MPIDI_ROUND_UP_PAGESIZE((sizeof(MPIDI_Win_shm_ctrl_t)+ ((comm_size+1) * sizeof(void *))),pageSize);
if (size > 0) {
if (*noncontig)
@@ -349,7 +349,7 @@ MPID_getSharedSegment(MPI_Aint size,
win->mpid.shm->segment_len = new_size;
win->mpid.shm->base_addr = base_pp;
if (size !=0) {
- win->mpid.info[rank].base_addr = (void *)((MPI_Aint) base_pp + MPIDI_ROUND_UP_PAGESIZE(sizeof(MPIDI_Win_shm_ctrl_t),pageSize));
+ win->mpid.info[rank].base_addr = (void *)((MPI_Aint) base_pp + MPIDI_ROUND_UP_PAGESIZE((sizeof(MPIDI_Win_shm_ctrl_t) + ((comm_size+1) * sizeof(void *))),pageSize));
} else {
win->mpid.info[rank].base_addr = NULL;
}
@@ -357,10 +357,9 @@ MPID_getSharedSegment(MPI_Aint size,
win->mpid.info[rank].base_size = size;
/* set mutex_lock address and initialize it */
- win->mpid.shm->mutex_lock = (pthread_mutex_t *) win->mpid.shm->base_addr;
- win->mpid.shm->shm_count = (int *)((MPI_Aint) win->mpid.shm->mutex_lock + (MPI_Aint) sizeof(pthread_mutex_t));
+ win->mpid.shm->ctrl = (MPIDI_Win_shm_ctrl_t *) win->mpid.shm->base_addr;
MPIDI_SHM_MUTEX_INIT(win);
- OPA_fetch_and_add_int((OPA_int_t *) win->mpid.shm->shm_count,1);
+ OPA_fetch_and_add_int((OPA_int_t *) &win->mpid.shm->ctrl->shm_count,(int) 1);
} else {
/* allocate a temporary buffer to gather the 'size' of each buffer on
@@ -392,7 +391,7 @@ MPID_getSharedSegment(MPI_Aint size,
/* The beginning of the shared memory allocation contains a control
* block before the data begins.
*/
- win->mpid.shm->segment_len += MPIDI_ROUND_UP_PAGESIZE(sizeof(MPIDI_Win_shm_ctrl_t),pageSize);
+ win->mpid.shm->segment_len += MPIDI_ROUND_UP_PAGESIZE((sizeof(MPIDI_Win_shm_ctrl_t) + ((comm_size+1) * sizeof(void *))),pageSize);
/* Get the shared segment which includes the control block header and
* data buffer - possibly padded if non-contiguous.
@@ -407,14 +406,13 @@ MPID_getSharedSegment(MPI_Aint size,
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
/* increment the shared counter */
- win->mpid.shm->shm_count=(int *)((MPI_Aint) win->mpid.shm->mutex_lock + (MPI_Aint) sizeof(MPIDI_SHM_MUTEX));
- OPA_fetch_and_add_int((OPA_int_t *) win->mpid.shm->shm_count,1);
+ OPA_fetch_and_add_int((OPA_int_t *) &win->mpid.shm->ctrl->shm_count,(int) 1);
/* wait for all ranks complete */
- while(*win->mpid.shm->shm_count != comm_size) MPIDI_QUICKSLEEP;
+ while((int) win->mpid.shm->ctrl->shm_count != comm_size) MPIDI_QUICKSLEEP;
/* compute the base addresses of each process within the shared memory segment */
- win->base = (void *) ((long) win->mpid.shm->base_addr + (long ) MPIDI_ROUND_UP_PAGESIZE(sizeof(MPIDI_Win_shm_ctrl_t),pageSize));
+ win->base = (void *) ((long) win->mpid.shm->base_addr + (long ) MPIDI_ROUND_UP_PAGESIZE((sizeof(MPIDI_Win_shm_ctrl_t) + ((comm_size+1) * sizeof(void *))),pageSize));
}
fn_exit:
diff --git a/src/mpid/pamid/src/onesided/mpid_win_free.c b/src/mpid/pamid/src/onesided/mpid_win_free.c
index e926448..00da268 100644
--- a/src/mpid/pamid/src/onesided/mpid_win_free.c
+++ b/src/mpid/pamid/src/onesided/mpid_win_free.c
@@ -34,8 +34,8 @@ int MPIDI_SHM_Win_free(MPID_Win **win_ptr)
/* Free shared memory region */
/* free shm_base_addrs that's only used for shared memory windows */
if ((*win_ptr)->mpid.shm->allocated) {
- OPA_fetch_and_add_int((OPA_int_t *) (*win_ptr)->mpid.shm->shm_count,-1);
- while(*(*win_ptr)->mpid.shm->shm_count) MPIDI_QUICKSLEEP;
+ OPA_fetch_and_add_int((OPA_int_t *) &((*win_ptr)->mpid.shm->ctrl->shm_count),-1);
+ while((*win_ptr)->mpid.shm->ctrl->shm_count !=0) MPIDI_QUICKSLEEP;
if ((*win_ptr)->comm_ptr->rank == 0) {
MPIDI_SHM_MUTEX_DESTROY(*win_ptr);
}
diff --git a/src/mpid/pamid/src/onesided/mpidi_onesided.h b/src/mpid/pamid/src/onesided/mpidi_onesided.h
index 214926a..0a2e201 100644
--- a/src/mpid/pamid/src/onesided/mpidi_onesided.h
+++ b/src/mpid/pamid/src/onesided/mpidi_onesided.h
@@ -37,50 +37,69 @@ pami_rmw_t zero_rmw_parms;
#define MPIDI_QUICKSLEEP usleep(1);
#define MAX_NUM_CTRLSEND 1024 /* no more than 1024 outstanding control sends */
-#define MPIDI_SHM_MUTEX_LOCK(win) \
- do { \
- pthread_mutex_t *shm_mutex = win->mpid.shm->mutex_lock; \
- int rval = pthread_mutex_lock(shm_mutex); \
- MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_lock", \
- "**pthread_lock %s", strerror(rval)); \
+#define MPIDI_SHM_MUTEX_LOCK(win) \
+ int mpi_errno=0; \
+ do { \
+ pthread_mutex_t *shm_mutex = (pthread_mutex_t *) &win->mpid.shm->ctrl->mutex_lock; \
+ int rval = pthread_mutex_lock(shm_mutex); \
+ MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_lock", \
+ "**pthread_lock %s", strerror(rval)); \
} while (0);
-#define MPIDI_SHM_MUTEX_UNLOCK(win) \
- do { \
- pthread_mutex_t *shm_mutex = win->mpid.shm->mutex_lock; \
- int rval = pthread_mutex_unlock(shm_mutex); \
- MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_unlock", \
- "**pthread_unlock %s", strerror(rval)); \
- } while (0);
-#define MPIDI_SHM_MUTEX_INIT(win) \
- do { \
- int rval=0; \
- pthread_mutexattr_t attr; \
- pthread_mutex_t *shm_mutex = win->mpid.shm->mutex_lock; \
- \
- rval = pthread_mutexattr_init(&attr); \
- MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_mutex", \
- "**pthread_mutex %s", strerror(rval)); \
- rval = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED); \
- MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_mutex", \
- "**pthread_mutex %s", strerror(rval)); \
- rval = pthread_mutex_init(shm_mutex, &attr); \
- MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_mutex", \
- "**pthread_mutex %s", strerror(rval)); \
- rval = pthread_mutexattr_destroy(&attr); \
- MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_mutex", \
- "**pthread_mutex %s", strerror(rval)); \
+#define MPIDI_SHM_MUTEX_UNLOCK(win) \
+ int mpi_errno=0; \
+ do { \
+ pthread_mutex_t *shm_mutex = (pthread_mutex_t *) &win->mpid.shm->ctrl->mutex_lock; \
+ int rval = pthread_mutex_unlock(shm_mutex); \
+ MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_unlock", \
+ "**pthread_unlock %s", strerror(rval)); \
+ } while (0);
+
+
+#define MPIDI_SHM_MUTEX_INIT(win) \
+ do { \
+ int rval=0; \
+ int mpi_errno=0; \
+ pthread_mutexattr_t attr; \
+ pthread_mutex_t *shm_mutex = (pthread_mutex_t *) &win->mpid.shm->ctrl->mutex_lock; \
+ \
+ rval = pthread_mutexattr_init(&attr); \
+ MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_mutex", \
+ "**pthread_mutex %s", strerror(rval)); \
+ rval = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED); \
+ MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_mutex", \
+ "**pthread_mutex %s", strerror(rval)); \
+ rval = pthread_mutex_init(shm_mutex, &attr); \
+ MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_mutex", \
+ "**pthread_mutex %s", strerror(rval)); \
+ rval = pthread_mutexattr_destroy(&attr); \
+ MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_mutex", \
+ "**pthread_mutex %s", strerror(rval)); \
} while (0);
-#define MPIDI_SHM_MUTEX_DESTROY(win) \
- do { \
- pthread_mutex_t *shm_mutex = (win)->mpid.shm->mutex_lock; \
- int rval = pthread_mutex_destroy(shm_mutex); \
- MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_mutex", \
- "**pthread_mutex %s", strerror(rval)); \
+#define MPIDI_SHM_MUTEX_DESTROY(win) \
+ int mpi_errno=0; \
+ do { \
+ pthread_mutex_t *shm_mutex = (pthread_mutex_t *) &(win)->mpid.shm->ctrl->mutex_lock;\
+ int rval = pthread_mutex_destroy(shm_mutex); \
+ MPIU_ERR_CHKANDJUMP1(rval, mpi_errno, MPI_ERR_OTHER, "**pthread_mutex", \
+ "**pthread_mutex %s", strerror(rval)); \
} while (0);
+#define MPIDI_ACQUIRE_SHARED_LOCK(win) { \
+ MPIDI_SHM_MUTEX_LOCK(win); \
+ OPA_fetch_and_add_int((OPA_int_t *)&win->mpid.shm->ctrl->active,(int) 1); \
+}
+
+#define MPIDI_RELEASE_SHARED_LOCK(win) { \
+ MPIDI_SHM_MUTEX_UNLOCK(win); \
+ OPA_fetch_and_add_int((OPA_int_t *)&(win->mpid.shm->ctrl->active),(int) -1); \
+}
+
+
+
+
/**
* \brief One-sided Message Types
*/
-----------------------------------------------------------------------
Summary of changes:
src/mpid/pamid/include/mpidi_datatypes.h | 8 +-
src/mpid/pamid/src/onesided/mpid_win_accumulate.c | 33 +++++++-
.../pamid/src/onesided/mpid_win_allocate_shared.c | 32 ++++---
.../pamid/src/onesided/mpid_win_compare_and_swap.c | 4 +-
.../pamid/src/onesided/mpid_win_fetch_and_op.c | 8 +-
src/mpid/pamid/src/onesided/mpid_win_free.c | 4 +-
src/mpid/pamid/src/onesided/mpid_win_get.c | 22 ++++-
.../pamid/src/onesided/mpid_win_get_accumulate.c | 82 ++++++++++++++++-
src/mpid/pamid/src/onesided/mpid_win_put.c | 32 ++++---
src/mpid/pamid/src/onesided/mpidi_onesided.h | 93 ++++++++++++--------
10 files changed, 232 insertions(+), 86 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0