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
November 2014
- 1 participants
- 74 discussions
[mpich] MPICH primary repository branch, master, updated. v3.1.3-160-g457e379
by noreply@mpich.org 10 Nov '14
by noreply@mpich.org 10 Nov '14
10 Nov '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 457e3795e5b70187cda06a2807486b36fc851988 (commit)
via 75aa4e32bfb145fd1bec71844ccc4bba1047a444 (commit)
from 4743a3bab1157f51dee30ff6111d6c0f9ec4c28b (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/457e3795e5b70187cda06a2807486b36f…
commit 457e3795e5b70187cda06a2807486b36fc851988
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Fri Nov 7 10:15:00 2014 -0600
Fix: be able to skip MPIX tests for Aint_add/diff
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore
index 3a62aca..6a193c7 100644
--- a/test/mpi/.gitignore
+++ b/test/mpi/.gitignore
@@ -264,6 +264,7 @@
/f77/io/ioaint.h
/f77/pt2pt/attr1aints.h
/f77/rma/addsize.h
+/f77/rma/testlist
/f77/spawn/type1aint.h
/f77/spawn/connaccf
/f77/spawn/namepubf
@@ -361,6 +362,7 @@
/f90/pt2pt/statusesf90
/f90/rma/Makefile.sm
/f90/rma/testlist
+/f90/rma/testlist.in
/f90/rma/winaccf90.f90
/f90/rma/winerrf90.f90
/f90/rma/winfencef90.f90
@@ -377,6 +379,7 @@
/f90/rma/winnamef90
/f90/rma/winscale1f90
/f90/rma/winscale2f90
+/f90/rma/aintf90.f90
/f90/rma/c2f2cwinf90.f90
/f90/rma/c2f902cwin.c
/f90/spawn/Makefile.sm
@@ -438,6 +441,7 @@
/f08/datatype/trf08
/f08/datatype/get_elem_d
/f08/datatype/get_elem_u
+/f08/rma/testlist
/group/errstring
/group/grouptest
/group/groupcreate
diff --git a/test/mpi/configure.ac b/test/mpi/configure.ac
index 70c05f5..d8f0ef8 100644
--- a/test/mpi/configure.ac
+++ b/test/mpi/configure.ac
@@ -1648,6 +1648,9 @@ AC_OUTPUT(maint/testmerge \
errors/f77/testlist \
errors/f90/testlist \
impls/testlist \
+ f77/rma/testlist \
+ f90/rma/testlist \
+ f08/rma/testlist \
impls/Makefile \
impls/hydra/Makefile \
impls/hydra/proc_binding.sh \
diff --git a/test/mpi/f08/rma/Makefile.am b/test/mpi/f08/rma/Makefile.am
index d12e47a..4c7a3eb 100644
--- a/test/mpi/f08/rma/Makefile.am
+++ b/test/mpi/f08/rma/Makefile.am
@@ -27,8 +27,12 @@ noinst_PROGRAMS = \
c2f2cwinf08 \
baseattrwinf08 \
winattrf08 \
- winattr2f08 \
- aintf08
+ winattr2f08
+
+if BUILD_MPIX_TESTS
+noinst_PROGRAMS += aintf08
+endif
+
## this test was commented out in the simplemake version...
## allocmem
diff --git a/test/mpi/f08/rma/testlist b/test/mpi/f08/rma/testlist.in
similarity index 84%
rename from test/mpi/f08/rma/testlist
rename to test/mpi/f08/rma/testlist.in
index a1f3d01..3ae2013 100644
--- a/test/mpi/f08/rma/testlist
+++ b/test/mpi/f08/rma/testlist.in
@@ -10,4 +10,4 @@ c2f2cwinf08 1
baseattrwinf08 1
winattrf08 1
winattr2f08 1
-aintf08 2 strict=false
+@mpix@ aintf08 2 strict=false
diff --git a/test/mpi/f77/rma/Makefile.am b/test/mpi/f77/rma/Makefile.am
index 6c82c44..06acf65 100644
--- a/test/mpi/f77/rma/Makefile.am
+++ b/test/mpi/f77/rma/Makefile.am
@@ -25,8 +25,12 @@ noinst_PROGRAMS = \
c2f2cwinf \
baseattrwinf \
winattrf \
- winattr2f \
- aintf
+ winattr2f
+
+if BUILD_MPIX_TESTS
+noinst_PROGRAMS += aintf
+endif
+
## this test was commented out in the simplemake version...
## allocmem
diff --git a/test/mpi/f77/rma/testlist b/test/mpi/f77/rma/testlist.in
similarity index 76%
rename from test/mpi/f77/rma/testlist
rename to test/mpi/f77/rma/testlist.in
index 20112b8..4884257 100644
--- a/test/mpi/f77/rma/testlist
+++ b/test/mpi/f77/rma/testlist.in
@@ -10,4 +10,4 @@ c2f2cwinf 1
baseattrwinf 1
winattrf 1
winattr2f 1
-aintf 2 strict=false xfail=ticket1877
+@mpix@ aintf 2 strict=false xfail=ticket1877
diff --git a/test/mpi/rma/Makefile.am b/test/mpi/rma/Makefile.am
index 10ab17c..2a02b67 100644
--- a/test/mpi/rma/Makefile.am
+++ b/test/mpi/rma/Makefile.am
@@ -138,8 +138,11 @@ noinst_PROGRAMS = \
get-struct \
rput_local_comp \
racc_local_comp \
- at_complete \
- aint
+ at_complete
+
+if BUILD_MPIX_TESTS
+noinst_PROGRAMS += aint
+endif
strided_acc_indexed_LDADD = $(LDADD) -lm
strided_acc_onelock_LDADD = $(LDADD) -lm
diff --git a/test/mpi/rma/testlist.in b/test/mpi/rma/testlist.in
index d5d35dc..9a6a7d5 100644
--- a/test/mpi/rma/testlist.in
+++ b/test/mpi/rma/testlist.in
@@ -124,7 +124,7 @@ win_shared_zerobyte 4 mpiversion=3.0
win_shared_put_flush_get 4 mpiversion=3.0
get-struct 2
at_complete 2
-aint 2 strict=false
+@mpix@ aint 2 strict=false
## This test is not strictly correct. This was meant to test out the
## case when MPI_Test is not nonblocking. However, we ended up
http://git.mpich.org/mpich.git/commitdiff/75aa4e32bfb145fd1bec71844ccc4bba1…
commit 75aa4e32bfb145fd1bec71844ccc4bba1047a444
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Fri Nov 7 09:58:12 2014 -0600
Add support for skipping individual MPIX tests
If --enable_strictmpi is passed to configure, we need to skip non-MPI-standard tests.
Here is how you can do that. Suppose you have an MPIX test foobar, you need
1) In Makefile.am, to skip building foobar, add
if BUILD_MPIX_TESTS
noinst_PROGRAMS += foobar
endif
Note: There is no tab indentions before noinst_PROGRAMS
2) In testlist.in (please convert testlist to testlist.in if necessary), to skip
running foobar, add
@mpix@ foobar 2
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/test/mpi/configure.ac b/test/mpi/configure.ac
index 1bf4a62..70c05f5 100644
--- a/test/mpi/configure.ac
+++ b/test/mpi/configure.ac
@@ -464,6 +464,18 @@ if test "$FROM_MPICH" = "yes" -a "$enable_strictmpi" = "no" ; then
fi
AC_SUBST(MPI_HAS_MPIX)
+# Prepend @mpix@ to lines of tests in testlist.in which are MPIX tests so that
+# we can skip running these tests when we do strict MPI test.
+mpix="#"
+if test "$enable_strictmpi" = "no"; then
+ mpix=""
+fi
+AC_SUBST(mpix)
+
+# Use the conditional variable BUILD_MPIX_TESTS to conditionally add MPIX tests
+# to noninst_PROGRAMS to skip building the tests when we do strict MPI test
+AM_CONDITIONAL([BUILD_MPIX_TESTS], [test "$enable_strictmpi" = "no"])
+
# preserve these values across a reconfigure
AC_ARG_VAR([WRAPPER_CFLAGS],[])
AC_ARG_VAR([WRAPPER_CPPFLAGS],[])
-----------------------------------------------------------------------
Summary of changes:
test/mpi/.gitignore | 4 ++++
test/mpi/configure.ac | 15 +++++++++++++++
test/mpi/f08/rma/Makefile.am | 8 ++++++--
test/mpi/f08/rma/{testlist => testlist.in} | 2 +-
test/mpi/f77/rma/Makefile.am | 8 ++++++--
test/mpi/f77/rma/{testlist => testlist.in} | 2 +-
test/mpi/rma/Makefile.am | 7 +++++--
test/mpi/rma/testlist.in | 2 +-
8 files changed, 39 insertions(+), 9 deletions(-)
rename test/mpi/f08/rma/{testlist => testlist.in} (84%)
rename test/mpi/f77/rma/{testlist => testlist.in} (76%)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-158-g4743a3b
by noreply@mpich.org 07 Nov '14
by noreply@mpich.org 07 Nov '14
07 Nov '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 4743a3bab1157f51dee30ff6111d6c0f9ec4c28b (commit)
from d69855feff25ccc0a7b2cd9292454425613e03a8 (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/4743a3bab1157f51dee30ff6111d6c0f9…
commit 4743a3bab1157f51dee30ff6111d6c0f9ec4c28b
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Fri Nov 7 12:58:46 2014 -0600
Remove unused AM_CONDITIONAL vars in testsuite configure.ac
The expressions are wrong, e.g., [test "X$f77dir" = "f77"] should be [test "$f77dir" = "f77"].
Also, these vars are not used. So we just remove them.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/test/mpi/configure.ac b/test/mpi/configure.ac
index 81cbd95..1bf4a62 100644
--- a/test/mpi/configure.ac
+++ b/test/mpi/configure.ac
@@ -804,7 +804,6 @@ if test "$f77dir" = "f77" ; then
AC_DEFINE(HAVE_FORTRAN_BINDING,1,[Define if Fortran is supported])
fi
-AM_CONDITIONAL([BUILD_F77_TESTS],[test "X$f77dir" = "f77"])
AC_ARG_VAR([MPI_SIZEOF_AINT],[if set, force MPI_Aint to a width of this many bytes])
AC_ARG_VAR([MPI_SIZEOF_OFFSET],[if set, force MPI_Offset to a width of this many bytes])
@@ -1189,7 +1188,6 @@ elif test "$enable_fc" = yes ; then
])
AC_LANG_POP([Fortran])
fi
-AM_CONDITIONAL([BUILD_F90_TESTS],[test "X$f90dir" = "f90"])
f08dir="#"
AC_SUBST(f08dir)
@@ -1294,7 +1292,6 @@ if test "$enable_cxx" = yes ; then
fi
AC_LANG_POP([C++])
fi
-AM_CONDITIONAL([BUILD_CXX_TESTS],[test "X$cxxdir" = "cxx"])
AC_LANG_C
# IO
-----------------------------------------------------------------------
Summary of changes:
test/mpi/configure.ac | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-157-gd69855f
by noreply@mpich.org 07 Nov '14
by noreply@mpich.org 07 Nov '14
07 Nov '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 d69855feff25ccc0a7b2cd9292454425613e03a8 (commit)
via a4223bc3688d8b9fb6b4d39d223096e6a14c8085 (commit)
from 848a0f312ef9418aa2bca4d63464b71441c59beb (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/d69855feff25ccc0a7b2cd92924544256…
commit d69855feff25ccc0a7b2cd9292454425613e03a8
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Thu Nov 6 17:19:06 2014 -0600
Bug-fix: unset progress flag in branch that does not make progress.
Signed-off-by: Min Si <msi(a)il.is.s.u-tokyo.ac.jp>
diff --git a/src/mpid/ch3/src/ch3u_rma_oplist.c b/src/mpid/ch3/src/ch3u_rma_oplist.c
index 10bc147..5c06650 100644
--- a/src/mpid/ch3/src/ch3u_rma_oplist.c
+++ b/src/mpid/ch3/src/ch3u_rma_oplist.c
@@ -237,6 +237,8 @@ static inline int issue_ops_target(MPID_Win * win_ptr, MPIDI_RMA_Target_t *targe
mpi_errno = send_flush_msg(target->target_rank, win_ptr);
if (mpi_errno != MPI_SUCCESS) MPIU_ERR_POP(mpi_errno);
}
+ (*made_progress) = 1;
+ goto finish_issue;
}
else if (target->sync.sync_flag == MPIDI_RMA_SYNC_UNLOCK) {
if (target->target_rank == rank) {
@@ -249,9 +251,9 @@ static inline int issue_ops_target(MPID_Win * win_ptr, MPIDI_RMA_Target_t *targe
mpi_errno = send_unlock_msg(target->target_rank, win_ptr);
if (mpi_errno != MPI_SUCCESS) MPIU_ERR_POP(mpi_errno);
}
+ (*made_progress) = 1;
+ goto finish_issue;
}
- (*made_progress) = 1;
- goto finish_issue;
}
/* Issue out operations in the list. */
http://git.mpich.org/mpich.git/commitdiff/a4223bc3688d8b9fb6b4d39d223096e6a…
commit a4223bc3688d8b9fb6b4d39d223096e6a14c8085
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Thu Nov 6 16:29:57 2014 -0600
Move definition of global window counters to nemesis / sock.
num_active_issued_win and num_passive_win are counters of
windows in active ISSUED mode and in passive mode.
It is modified in CH3 and is used in progress engine of
nemesis / sock to skip windows that do not need to make
progress on. Here we define them in mpidi_ch3_pre.h in
nemesis / sock so that they can be exposed to upper layers.
Signed-off-by: Min Si <msi(a)il.is.s.u-tokyo.ac.jp>
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
index f858ac3..4d2dadd 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h
@@ -16,8 +16,6 @@
extern int MPID_nem_lmt_shm_pending;
extern MPID_nem_cell_ptr_t MPID_nem_prefetched_cell;
-extern int num_active_issued_win;
-extern int num_passive_win;
static inline int MPID_nem_mpich_send_header (void* buf, int size, MPIDI_VC_t *vc, int *again);
static inline int MPID_nem_mpich_sendv (MPID_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again);
diff --git a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
index 96c43f9..8ab69cb 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
@@ -228,6 +228,8 @@ MPIDI_CH3I_Progress_state;
#define MPIDI_CH3_PROGRESS_STATE_DECL MPIDI_CH3I_Progress_state ch;
extern OPA_int_t MPIDI_CH3I_progress_completion_count;
+extern int num_active_issued_win, num_passive_win;
+
#define MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT do { \
OPA_write_barrier(); \
OPA_incr_int(&MPIDI_CH3I_progress_completion_count); \
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
index 569cfa1..21fb2d2 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
@@ -46,6 +46,7 @@ extern MPID_Request ** const MPID_Recvq_unexpected_tail_ptr;
#endif
OPA_int_t MPIDI_CH3I_progress_completion_count = OPA_INT_T_INITIALIZER(0);
+int num_active_issued_win = 0, num_passive_win = 0;
/* NEMESIS MULTITHREADING: Extra Data Structures Added */
#ifdef MPICH_IS_THREADED
diff --git a/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h b/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h
index e1689c9..71475dc 100644
--- a/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h
+++ b/src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h
@@ -10,9 +10,6 @@
#include "mpidimpl.h"
#include "ch3usock.h"
-extern int num_active_issued_win;
-extern int num_passive_win;
-
/* This is all socket connection definitions */
/* MT - not thread safe! */
diff --git a/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h b/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h
index c0d43ad..ad8b39b 100644
--- a/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h
+++ b/src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h
@@ -79,6 +79,7 @@ MPIDI_CH3I_Progress_state;
and must be available to the routines in src/mpi */
extern volatile unsigned int MPIDI_CH3I_progress_completion_count;
+extern int num_active_issued_win, num_passive_win;
/* MPICH_IS_THREADED isn't defined yet (handled by mpiimplthread.h) */
#if (MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE)
diff --git a/src/mpid/ch3/channels/sock/src/ch3_progress.c b/src/mpid/ch3/channels/sock/src/ch3_progress.c
index ead5e47..6c649db 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_progress.c
@@ -22,6 +22,8 @@ static int MPIDI_CH3i_Progress_test(void);
/* FIXME: Move thread stuff into some set of abstractions in order to remove
ifdefs */
volatile unsigned int MPIDI_CH3I_progress_completion_count = 0;
+int num_active_issued_win = 0, num_passive_win = 0;
+
#ifdef MPICH_IS_THREADED
volatile int MPIDI_CH3I_progress_blocked = FALSE;
volatile int MPIDI_CH3I_progress_wakeup_signalled = FALSE;
diff --git a/src/mpid/ch3/include/mpid_rma_oplist.h b/src/mpid/ch3/include/mpid_rma_oplist.h
index 45dec03..7d5b58c 100644
--- a/src/mpid/ch3/include/mpid_rma_oplist.h
+++ b/src/mpid/ch3/include/mpid_rma_oplist.h
@@ -18,8 +18,6 @@ int MPIDI_CH3I_RMA_Make_progress_win(MPID_Win * win_ptr, int *made_progress);
extern struct MPIDI_RMA_Op *global_rma_op_pool, *global_rma_op_pool_tail, *global_rma_op_pool_start;
extern struct MPIDI_RMA_Target *global_rma_target_pool, *global_rma_target_pool_tail, *global_rma_target_pool_start;
-extern int num_active_issued_win;
-extern int num_passive_win;
MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_rmaqueue_alloc);
diff --git a/src/mpid/ch3/src/mpid_rma.c b/src/mpid/ch3/src/mpid_rma.c
index 210be92..83a5b35 100644
--- a/src/mpid/ch3/src/mpid_rma.c
+++ b/src/mpid/ch3/src/mpid_rma.c
@@ -30,8 +30,6 @@ cvars:
MPIU_THREADSAFE_INIT_DECL(initRMAoptions);
MPIDI_RMA_Win_list_t *MPIDI_RMA_Win_list = NULL, *MPIDI_RMA_Win_list_tail = NULL;
-int num_active_issued_win = 0;
-int num_passive_win = 0;
static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
MPID_Comm * comm_ptr, MPID_Win ** win_ptr);
-----------------------------------------------------------------------
Summary of changes:
.../ch3/channels/nemesis/include/mpid_nem_inline.h | 2 --
.../ch3/channels/nemesis/include/mpidi_ch3_pre.h | 2 ++
src/mpid/ch3/channels/nemesis/src/ch3_progress.c | 1 +
.../ch3/channels/sock/include/mpidi_ch3_impl.h | 3 ---
src/mpid/ch3/channels/sock/include/mpidi_ch3_pre.h | 1 +
src/mpid/ch3/channels/sock/src/ch3_progress.c | 2 ++
src/mpid/ch3/include/mpid_rma_oplist.h | 2 --
src/mpid/ch3/src/ch3u_rma_oplist.c | 6 ++++--
src/mpid/ch3/src/mpid_rma.c | 2 --
9 files changed, 10 insertions(+), 11 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-155-g848a0f3
by noreply@mpich.org 07 Nov '14
by noreply@mpich.org 07 Nov '14
07 Nov '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 848a0f312ef9418aa2bca4d63464b71441c59beb (commit)
via 0f9a4417e46cae4c8aec4f741b92cf3de2f54b9c (commit)
via 25f3c2de82a25adde125c1f63ae067887996f593 (commit)
from 35de3d16d75207b1a7270a469c954e1226f25a8c (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/848a0f312ef9418aa2bca4d63464b7144…
commit 848a0f312ef9418aa2bca4d63464b71441c59beb
Author: Wesley Bland <wbland(a)anl.gov>
Date: Thu Nov 6 14:46:36 2014 -0600
Enable revoke_nofail in test
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/test/mpi/ft/testlist b/test/mpi/ft/testlist
index d2706ce..503dfaf 100644
--- a/test/mpi/ft/testlist
+++ b/test/mpi/ft/testlist
@@ -12,7 +12,7 @@ gather 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=T
reduce 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
bcast 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
scatter 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
-anysource 3 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
-revoke_nofail 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+anysource 3 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
+revoke_nofail 2 env=MPIR_CVAR_ENABLE_FT=1 strict=false timeLimit=10
shrink 8 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
agree 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
http://git.mpich.org/mpich.git/commitdiff/0f9a4417e46cae4c8aec4f741b92cf3de…
commit 0f9a4417e46cae4c8aec4f741b92cf3de2f54b9c
Author: Wesley Bland <wbland(a)anl.gov>
Date: Thu Nov 6 13:17:42 2014 -0600
Correctly match requests when revoking
Some of the code to do the matching for requests in the posted queue was
missing. This caused local collectives to hang if the communicator had
been revoked.
See #1945
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index 9290470..bf59978 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -1082,6 +1082,7 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr)
}
offset = (comm_ptr->comm_kind == MPID_INTRACOMM) ? MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
+ match.parts.context_id = comm_ptr->recvcontext_id + MPID_CONTEXT_INTRANODE_OFFSET + offset;
if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
if (MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
@@ -1109,6 +1110,7 @@ int MPIDI_CH3U_Clean_recvq(MPID_Comm *comm_ptr)
}
offset = (comm_ptr->comm_kind == MPID_INTRACOMM) ? MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
+ match.parts.context_id = comm_ptr->recvcontext_id + MPID_CONTEXT_INTERNODE_OFFSET + offset;
if (MATCH_WITH_LEFT_RIGHT_MASK(rreq->dev.match, match, mask)) {
if (MPIR_TAG_MASK_ERROR_BIT(rreq->dev.match.parts.tag) != MPIR_AGREE_TAG &&
http://git.mpich.org/mpich.git/commitdiff/25f3c2de82a25adde125c1f63ae067887…
commit 25f3c2de82a25adde125c1f63ae067887996f593
Author: Wesley Bland <wbland(a)anl.gov>
Date: Thu Nov 6 12:49:24 2014 -0600
Clean up revoke function
Set the counter for processes to be revoked before calling sending out
the revoke notifications.
Clean up some unused code.
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/mpid_comm_revoke.c b/src/mpid/ch3/src/mpid_comm_revoke.c
index ab26cf2..1fae5da 100644
--- a/src/mpid/ch3/src/mpid_comm_revoke.c
+++ b/src/mpid/ch3/src/mpid_comm_revoke.c
@@ -24,7 +24,7 @@ int MPID_Comm_revoke(MPID_Comm *comm_ptr, int is_remote)
MPIDI_VC_t *vc;
MPID_IOV iov[MPID_IOV_LIMIT];
int mpi_errno = MPI_SUCCESS;
- int i, size, my_rank, failed=0;
+ int i, size, my_rank;
MPID_Request *request;
MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_revoke_t *revoke_pkt = &upkt.revoke;
@@ -38,6 +38,11 @@ int MPID_Comm_revoke(MPID_Comm *comm_ptr, int is_remote)
if (comm_ptr->node_comm) comm_ptr->node_comm->revoked = 1;
if (comm_ptr->node_roots_comm) comm_ptr->node_roots_comm->revoked = 1;
+ /* Start a counter to track how many revoke messages we've received from
+ * other ranks */
+ comm_ptr->dev.waiting_for_revoke = comm_ptr->local_size - 1 - is_remote; /* Subtract the processes who already know about the revoke */
+ MPIU_DBG_MSG_FMT(CH3_OTHER, VERBOSE, (MPIU_DBG_FDEST, "Comm %08x waiting_for_revoke: %d", comm_ptr->handle, comm_ptr->dev.waiting_for_revoke));
+
/* Keep a reference to this comm so it doesn't get destroyed while
* it's being revoked */
MPIR_Comm_add_ref(comm_ptr);
@@ -60,7 +65,7 @@ int MPID_Comm_revoke(MPID_Comm *comm_ptr, int is_remote)
MPIU_THREAD_CS_ENTER(CH3COMM, vc);
mpi_errno = MPIDI_CH3_iStartMsgv(vc, iov, 1, &request);
MPIU_THREAD_CS_EXIT(CH3COMM, vc);
- if (mpi_errno) failed++;
+ if (mpi_errno) comm_ptr->dev.waiting_for_revoke--;
if (NULL != request)
/* We don't need to keep a reference to this request. The
* progress engine will keep a reference until it completes
@@ -68,11 +73,6 @@ int MPID_Comm_revoke(MPID_Comm *comm_ptr, int is_remote)
MPID_Request_release(request);
}
- /* Start a counter to track how many revoke messages we've received from
- * other ranks */
- comm_ptr->dev.waiting_for_revoke = comm_ptr->local_size - 1 - is_remote - failed; /* Subtract the processes who already know about the revoke */
- MPIU_DBG_MSG_FMT(CH3_OTHER, VERBOSE, (MPIU_DBG_FDEST, "Comm %08x waiting_for_revoke: %d", comm_ptr->handle, comm_ptr->dev.waiting_for_revoke));
-
/* Check to see if we are done revoking */
if (comm_ptr->dev.waiting_for_revoke == 0) {
MPIR_Comm_release(comm_ptr, 0);
@@ -98,13 +98,6 @@ int MPID_Comm_revoke(MPID_Comm *comm_ptr, int is_remote)
}
}
-fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_COMM_REVOKE);
return MPI_SUCCESS;
-fn_fail:
- if (request) {
- MPIU_Object_set_ref(request, 0);
- MPIDI_CH3_Request_destroy(request);
- }
- goto fn_exit;
}
-----------------------------------------------------------------------
Summary of changes:
src/mpid/ch3/src/ch3u_recvq.c | 2 ++
src/mpid/ch3/src/mpid_comm_revoke.c | 21 +++++++--------------
test/mpi/ft/testlist | 4 ++--
3 files changed, 11 insertions(+), 16 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-152-g35de3d1
by noreply@mpich.org 06 Nov '14
by noreply@mpich.org 06 Nov '14
06 Nov '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 35de3d16d75207b1a7270a469c954e1226f25a8c (commit)
via cf13c7850dd482380a475f132885428ecf918051 (commit)
via af39138730abda2829e98f28eaa3106f4e8b3820 (commit)
from ed2813ae133657ac84669f29cfc12c0ce8267c2f (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/35de3d16d75207b1a7270a469c954e122…
commit 35de3d16d75207b1a7270a469c954e1226f25a8c
Author: Huiwei Lu <huiweilu(a)mcs.anl.gov>
Date: Thu Nov 6 15:58:40 2014 -0600
Fixes env in runtest
When the parameter of 'env' is parsed the first time, it adds an extra
space in the front. When the script kicks off each test, this extra
space is not a correct form the script want to interpret and it
complains in the output: "not in a=b form".
Signed-off-by: Wesley Bland <wbland(a)anl.gov>
diff --git a/test/mpi/runtests.in b/test/mpi/runtests.in
index 1659c8f..ba8dd6a 100644
--- a/test/mpi/runtests.in
+++ b/test/mpi/runtests.in
@@ -439,7 +439,12 @@ sub RunList {
$mpiexecArgs = "$mpiexecArgs $value";
}
elsif ($key eq "env") {
- $progEnv = "$progEnv $value";
+ if ($progEnv eq "") {
+ $progEnv = "$value";
+ }
+ else {
+ $progEnv = "$progEnv $value";
+ }
}
elsif ($key eq "mpiversion") {
$mpiVersion = $value;
http://git.mpich.org/mpich.git/commitdiff/cf13c7850dd482380a475f132885428ec…
commit cf13c7850dd482380a475f132885428ecf918051
Author: Huiwei Lu <huiweilu(a)mcs.anl.gov>
Date: Wed Nov 5 14:55:55 2014 -0600
Adds a CVAR to enable/disable fault tolerance
MPIR_CVAR_ENABLE_FT is added to enable/disable fault tolerance related
code. For performance consideration, FT is disabled by default.
Changes FT related LMT RTS code to use this CVAR.
Signed-off-by: Wesley Bland <wbland(a)anl.gov>
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 28662af..5df9a57 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
@@ -9,17 +9,20 @@
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
+categories:
+ - name : FT
+ description : cvars that control behavior of fault tolerance
+
cvars:
- - name : MPIR_CVAR_NEM_LMT_RTS_QUEUE_SIZE
- category : CH3
- type : int
- default : 1024
+ - name : MPIR_CVAR_ENABLE_FT
+ category : FT
+ type : boolean
+ default : false
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
- The initial size of the NEM_LMT_RTS_QUEUE used to track RTS
- messages before the LMT setup.
+ Enable fault tolerance functions
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
@@ -123,8 +126,10 @@ int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, int count,
MPIU_THREAD_CS_ENTER(LMT,);
mpi_errno = vc->ch.lmt_initiate_lmt(vc, &upkt.p, sreq);
- if (MPI_SUCCESS == mpi_errno)
- MPID_nem_lmt_rtsq_enqueue(&vc->ch.lmt_rts_queue, sreq);
+ if (MPIR_CVAR_ENABLE_FT) {
+ if (MPI_SUCCESS == mpi_errno)
+ MPID_nem_lmt_rtsq_enqueue(&vc->ch.lmt_rts_queue, sreq);
+ }
MPIU_THREAD_CS_EXIT(LMT,);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
@@ -319,8 +324,10 @@ 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);
MPIU_THREAD_CS_ENTER(LMT,);
- /* 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);
+ 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);
+ }
MPIU_THREAD_CS_EXIT(LMT,);
sreq->ch.lmt_req_id = cts_pkt->receiver_req_id;
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 525ffd4..b491936 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
@@ -813,13 +813,15 @@ 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. */
- MPIU_THREAD_CS_ENTER(LMT,);
- 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;
- MPIDI_CH3U_Request_complete(req);
+ if (MPIR_CVAR_ENABLE_FT) {
+ MPIU_THREAD_CS_ENTER(LMT,);
+ 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;
+ MPIDI_CH3U_Request_complete(req);
+ }
+ MPIU_THREAD_CS_EXIT(LMT,);
}
- MPIU_THREAD_CS_EXIT(LMT,);
/* We empty the vc queue, but don't remove the vc from the global
list. That will eventually happen when lmt_shm_progress()
diff --git a/test/mpi/ft/testlist b/test/mpi/ft/testlist
index 41fa987..d2706ce 100644
--- a/test/mpi/ft/testlist
+++ b/test/mpi/ft/testlist
@@ -1,18 +1,18 @@
-die 4 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false resultTest=TestStatusNoErrors
-abort 2 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false xfail=ticket1537
-sendalive 4 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false resultTest=TestStatusNoErrors
-isendalive 3 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false
-multi_isendalive 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false
-senddead 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
-recvdead 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
-isenddead 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
-irecvdead 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
-barrier 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
-gather 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
-reduce 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
-bcast 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
-scatter 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
-anysource 3 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
-revoke_nofail 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
-shrink 8 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
-agree 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+die 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false resultTest=TestStatusNoErrors
+abort 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false xfail=ticket1537
+sendalive 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false resultTest=TestStatusNoErrors
+isendalive 3 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false
+multi_isendalive 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false
+senddead 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+recvdead 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
+isenddead 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+irecvdead 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
+barrier 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
+gather 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
+reduce 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
+bcast 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+scatter 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+anysource 3 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+revoke_nofail 2 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+shrink 8 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+agree 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
http://git.mpich.org/mpich.git/commitdiff/af39138730abda2829e98f28eaa3106f4…
commit af39138730abda2829e98f28eaa3106f4e8b3820
Author: Huiwei Lu <huiweilu(a)mcs.anl.gov>
Date: Mon Nov 3 11:47:07 2014 -0600
Improves RTS queue to be dynamic and VC specific
For fault tolerance use, a RTS queue is added in [81b3911a] to track shm
LMT RTS messages. However, the queue is global and static, which may not
be scalable.
This patch moves the RTS queue to struct MPIDI_CH3I_VC, to be VC
specific as the lmt_queue is. Also it improves the queue to use
GENERIC_Q and the 'dev.next' field so it does not need to malloc
additional space.
Signed-off-by: Wesley Bland <wbland(a)anl.gov>
diff --git a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
index c5b9111..a726b7d 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpid_nem_impl.h
@@ -55,10 +55,6 @@ typedef struct MPID_nem_pkt_lmt_rts
}
MPID_nem_pkt_lmt_rts_t;
-extern int *MPID_nem_lmt_rts_queue;
-extern int MPID_nem_lmt_rts_queue_last_inserted;
-extern int MPID_nem_lmt_rts_queue_size;
-
typedef struct MPID_nem_pkt_lmt_cts
{
MPIDI_CH3_Pkt_type_t type;
diff --git a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
index 8289043..96c43f9 100644
--- a/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
+++ b/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h
@@ -7,6 +7,7 @@
#if !defined(MPICH_MPIDI_CH3_PRE_H_INCLUDED)
#define MPICH_MPIDI_CH3_PRE_H_INCLUDED
#include "mpid_nem_pre.h"
+#include "mpid_nem_generic_queue.h"
#if defined(HAVE_NETINET_IN_H)
#include <netinet/in.h>
@@ -47,6 +48,30 @@ MPIDI_CH3I_VC_state_t;
#define MPID_NEM_VC_NETMOD_AREA_LEN 128
#define MPID_NEM_REQ_NETMOD_AREA_LEN 192
+/* define functions for access MPID_nem_lmt_rts_queue_t */
+typedef GENERIC_Q_DECL(struct MPID_Request) MPID_nem_lmt_rts_queue_t;
+#define MPID_nem_lmt_rtsq_empty(q) GENERIC_Q_EMPTY (q)
+#define MPID_nem_lmt_rtsq_head(q) GENERIC_Q_HEAD (q)
+#define MPID_nem_lmt_rtsq_enqueue(qp, ep) do { \
+ MPIU_DBG_MSG_FMT(CH3_CHANNEL, VERBOSE, (MPIU_DBG_FDEST, \
+ "MPID_nem_lmt_rtsq_enqueue req=%p (handle=%#x), queue=%p", \
+ ep, (ep)->handle, qp)); \
+ GENERIC_Q_ENQUEUE (qp, ep, dev.next); \
+ } while (0)
+#define MPID_nem_lmt_rtsq_dequeue(qp, epp) do { \
+ GENERIC_Q_DEQUEUE (qp, epp, dev.next); \
+ MPIU_DBG_MSG_FMT(CH3_CHANNEL, VERBOSE, (MPIU_DBG_FDEST, \
+ "MPID_nem_lmt_rtsq_dequeue req=%p (handle=%#x), queue=%p", \
+ *(epp), *(epp) ? (*(epp))->handle : -1, qp)); \
+ } while (0)
+#define MPID_nem_lmt_rtsq_search_remove(qp, req_id, epp) do { \
+ GENERIC_Q_SEARCH_REMOVE(qp, _e->handle == (req_id), epp, \
+ struct MPID_Request, dev.next); \
+ MPIU_DBG_MSG_FMT(CH3_CHANNEL, VERBOSE, (MPIU_DBG_FDEST, \
+ "MPID_nem_lmt_rtsq_search_remove req=%p (handle=%#x), queue=%p", \
+ *(epp), req_id, qp)); \
+} while (0)
+
typedef struct MPIDI_CH3I_VC
{
int pg_rank;
@@ -110,6 +135,7 @@ typedef struct MPIDI_CH3I_VC
struct {struct MPID_nem_lmt_shm_wait_element *head, *tail;} lmt_queue;
struct MPID_nem_lmt_shm_wait_element *lmt_active_lmt;
int lmt_enqueued; /* FIXME: used for debugging */
+ MPID_nem_lmt_rts_queue_t lmt_rts_queue;
/* Pointer to per-vc packet handlers */
MPIDI_CH3_PktHandler_Fcn **pkt_handler;
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c
index 1ee3f46..272ac50 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_finalize.c
@@ -29,7 +29,6 @@ int MPID_nem_finalize(void)
/* these are allocated in MPID_nem_mpich_init, not MPID_nem_init */
MPIU_Free(MPID_nem_recv_seqno);
MPIU_Free(MPID_nem_fboxq_elem_list);
- MPIU_Free(MPID_nem_lmt_rts_queue);
/* from MPID_nem_init */
MPIU_Free(MPID_nem_mem_region.FreeQ);
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 6a23ed1..a92c763 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c
@@ -544,6 +544,8 @@ MPID_nem_vc_init (MPIDI_VC_t *vc)
vc_ch->lmt_queue.tail = NULL;
vc_ch->lmt_active_lmt = NULL;
vc_ch->lmt_enqueued = FALSE;
+ vc_ch->lmt_rts_queue.head = NULL;
+ vc_ch->lmt_rts_queue.tail = NULL;
if (MPIR_CVAR_NEMESIS_SHM_EAGER_MAX_SZ == -1)
vc->eager_max_msg_sz = MPID_NEM_MPICH_DATA_LEN - sizeof(MPIDI_CH3_Pkt_t);
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 5ef65de..28662af 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
@@ -90,7 +90,6 @@ int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, int count,
MPID_PKT_DECL_CAST(upkt, MPID_nem_pkt_lmt_rts_t, rts_pkt);
MPIDI_VC_t *vc;
MPID_Request *sreq =*sreq_p;
- int i;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_RNDVSEND);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LMT_RNDVSEND);
@@ -124,30 +123,8 @@ int MPID_nem_lmt_RndvSend(MPID_Request **sreq_p, const void * buf, int count,
MPIU_THREAD_CS_ENTER(LMT,);
mpi_errno = vc->ch.lmt_initiate_lmt(vc, &upkt.p, sreq);
- if (MPI_SUCCESS == mpi_errno) {
- /* If this loops all the way around and can't find a place to put the
- * RTS request, it will just drop the request and leave it out of the
- * queue. It will print a message to warn the user. This should only
- * affect FT and not matching so we'll consider this ok for now. */
- for (i = MPID_nem_lmt_rts_queue_last_inserted + 1; ; i++) {
- if (i == MPID_nem_lmt_rts_queue_size) {
- i = -1;
- continue;
- }
-
- if (MPID_nem_lmt_rts_queue[i] == MPI_REQUEST_NULL) {
- MPID_nem_lmt_rts_queue[i] = sreq->handle;
- MPID_nem_lmt_rts_queue_last_inserted = i;
- break;
- }
-
- if (i == MPID_nem_lmt_rts_queue_last_inserted && !warning_printed) {
- MPIU_Internal_error_printf("LMT RTS queue exceeded. FT not provided for overflowed messages.\n");
- warning_printed = 1;
- break;
- }
- }
- }
+ if (MPI_SUCCESS == mpi_errno)
+ MPID_nem_lmt_rtsq_enqueue(&vc->ch.lmt_rts_queue, sreq);
MPIU_THREAD_CS_EXIT(LMT,);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
@@ -329,7 +306,6 @@ static int pkt_CTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
char *data_buf;
MPIDI_msg_sz_t data_len;
int mpi_errno = MPI_SUCCESS;
- int i;
MPIU_CHKPMEM_DECL(1);
MPIDI_STATE_DECL(MPID_STATE_PKT_CTS_HANDLER);
@@ -343,20 +319,8 @@ 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);
MPIU_THREAD_CS_ENTER(LMT,);
- /* Remove the request from the RTS queue. */
- for (i = MPID_nem_lmt_rts_queue_last_inserted + 1;
- i != MPID_nem_lmt_rts_queue_last_inserted;
- i++) {
- if (i == MPID_nem_lmt_rts_queue_size) {
- i = -1;
- continue;
- }
-
- if (MPID_nem_lmt_rts_queue[i] == cts_pkt->sender_req_id) {
- MPID_nem_lmt_rts_queue[i] = MPI_REQUEST_NULL;
- break;
- }
- }
+ /* 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);
MPIU_THREAD_CS_EXIT(LMT,);
sreq->ch.lmt_req_id = cts_pkt->receiver_req_id;
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 d312f4c..525ffd4 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
@@ -804,31 +804,22 @@ int MPID_nem_lmt_shm_vc_terminated(MPIDI_VC_t *vc)
MPID_nem_lmt_shm_wait_element_t *we;
int req_errno = MPI_SUCCESS;
MPID_Request *req = NULL;
- int i;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LMT_SHM_VC_TERMINATED);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LMT_SHM_VC_TERMINATED);
if (vc->state != MPIDI_VC_STATE_CLOSED) {
MPIU_ERR_SET1(req_errno, MPIX_ERR_PROC_FAILED, "**comm_fail", "**comm_fail %d", vc->pg_rank);
+ }
- /* If there is anything in the RTS queue, it needs to be cleared out. */
- MPIU_THREAD_CS_ENTER(LMT,);
- for (i = 0; i < MPID_nem_lmt_rts_queue_size; i++) {
- if (MPI_REQUEST_NULL != MPID_nem_lmt_rts_queue[i]) {
- MPID_Request_get_ptr(MPID_nem_lmt_rts_queue[i], req);
- MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "Checking RTS message");
-
- if (req->ch.vc != NULL && req->ch.vc->pg_rank == vc->pg_rank) {
- MPIU_DBG_MSG(CH3_CHANNEL, VERBOSE, "Removing RTS message");
- req->status.MPI_ERROR = req_errno;
- MPIDI_CH3U_Request_complete(req);
- MPID_nem_lmt_rts_queue[i] = MPI_REQUEST_NULL;
- }
- }
- }
- MPIU_THREAD_CS_EXIT(LMT,);
+ /* If there is anything in the RTS queue, it needs to be cleared out. */
+ MPIU_THREAD_CS_ENTER(LMT,);
+ 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;
+ MPIDI_CH3U_Request_complete(req);
}
+ MPIU_THREAD_CS_EXIT(LMT,);
/* We empty the vc queue, but don't remove the vc from the global
list. That will eventually happen when lmt_shm_progress()
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
index ee267bd..4bdaefb 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c
@@ -23,10 +23,6 @@ MPID_nem_cell_ptr_t MPID_nem_prefetched_cell = 0;
unsigned short *MPID_nem_recv_seqno = 0;
-int *MPID_nem_lmt_rts_queue;
-int MPID_nem_lmt_rts_queue_size;
-int MPID_nem_lmt_rts_queue_last_inserted = 0;
-
#undef FUNCNAME
#define FUNCNAME MPID_nem_mpich_init
#undef FCNAME
@@ -36,7 +32,7 @@ MPID_nem_mpich_init(void)
{
int mpi_errno = MPI_SUCCESS;
int i;
- MPIU_CHKPMEM_DECL (3);
+ MPIU_CHKPMEM_DECL (2);
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_MPICH_INIT);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_MPICH_INIT);
@@ -68,15 +64,6 @@ MPID_nem_mpich_init(void)
MPID_nem_curr_fbox_all_poll = &MPID_nem_fboxq_elem_list[0];
MPID_nem_fboxq_elem_list_last = &MPID_nem_fboxq_elem_list[MPID_nem_mem_region.num_local - 1];
- /* Create a queue of MPID_NEM_LMT_RTS_QUEUE_SIZE ints to hold outstanding
- * RTS requests. If we run out of space, we'll just drop the extra
- * requests. This won't cause a matching problem, it will just prevent FT
- * from working for those requests that get dropped. */
- MPID_nem_lmt_rts_queue_size = MPIR_CVAR_NEM_LMT_RTS_QUEUE_SIZE;
- MPIU_CHKPMEM_MALLOC(MPID_nem_lmt_rts_queue, int *, sizeof(int) * MPID_nem_lmt_rts_queue_size, mpi_errno, "lmt rts queue");
- for (i = 0; i < MPID_nem_lmt_rts_queue_size; i++)
- MPID_nem_lmt_rts_queue[i] = MPI_REQUEST_NULL;
-
MPIU_CHKPMEM_COMMIT();
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_MPICH_INIT);
-----------------------------------------------------------------------
Summary of changes:
.../ch3/channels/nemesis/include/mpid_nem_impl.h | 4 -
.../ch3/channels/nemesis/include/mpidi_ch3_pre.h | 26 +++++++++
.../ch3/channels/nemesis/src/mpid_nem_finalize.c | 1 -
src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c | 2 +
src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c | 59 +++++---------------
.../ch3/channels/nemesis/src/mpid_nem_lmt_shm.c | 21 ++-----
src/mpid/ch3/channels/nemesis/src/mpid_nem_mpich.c | 15 +-----
test/mpi/ft/testlist | 36 ++++++------
test/mpi/runtests.in | 7 ++-
9 files changed, 75 insertions(+), 96 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-149-ged2813a
by noreply@mpich.org 06 Nov '14
by noreply@mpich.org 06 Nov '14
06 Nov '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 ed2813ae133657ac84669f29cfc12c0ce8267c2f (commit)
from 2b6133164dee31a58feaefdd4db1e47daf15eedf (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/ed2813ae133657ac84669f29cfc12c0ce…
commit ed2813ae133657ac84669f29cfc12c0ce8267c2f
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Thu Nov 6 13:07:48 2014 -0600
portals4: fixup for noncontig recvs
A recent testsuite update unveiled an issue when unpacking a large
noncontiguous message. We need to ignore any previous segment
manipulation when unpacking the beginning of the message.
Signed-off-by: Antonio J. Pena <apenya(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
index 2152da7..0ef1335 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
@@ -287,7 +287,7 @@ static int handler_recv_dequeue_large(const ptl_event_t *e)
MPIU_Memcpy((char *)rreq->dev.user_buf + dt_true_lb, e->start, e->mlength);
} else {
last = e->mlength;
- MPID_Segment_unpack(rreq->dev.segment_ptr, rreq->dev.segment_first, &last, e->start);
+ MPID_Segment_unpack(rreq->dev.segment_ptr, 0, &last, e->start);
MPIU_Assert(last == e->mlength);
rreq->dev.segment_first = e->mlength;
}
-----------------------------------------------------------------------
Summary of changes:
.../channels/nemesis/netmod/portals4/ptl_recv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-148-g2b61331
by noreply@mpich.org 06 Nov '14
by noreply@mpich.org 06 Nov '14
06 Nov '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 2b6133164dee31a58feaefdd4db1e47daf15eedf (commit)
via 634a7c857e5a1200778dbfba259ee2f68a0d89c2 (commit)
from dcd7ee6cd5fd0933651f1dc5a26637a33aff1112 (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/2b6133164dee31a58feaefdd4db1e47da…
commit 2b6133164dee31a58feaefdd4db1e47daf15eedf
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Thu Nov 6 13:57:35 2014 -0600
Remove unused variable in examples/ircpi.c.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/examples/ircpi.c b/examples/ircpi.c
index 30c1ed2..6e42c5b 100644
--- a/examples/ircpi.c
+++ b/examples/ircpi.c
@@ -11,7 +11,7 @@
int main(int argc, char *argv[])
{
- int n, myid, numprocs, i, ierr;
+ int n, myid, numprocs, i;
double PI25DT = 3.141592653589793238462643;
double mypi, pi, h, sum, x;
MPI_Win nwin, piwin;
@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
if (myid == 0) {
fprintf(stdout, "Enter the number of intervals: (0 quits) ");
fflush(stdout);
- ierr=scanf("%d",&n);
+ scanf("%d",&n);
pi = 0.0;
}
MPI_Win_fence(0, nwin);
http://git.mpich.org/mpich.git/commitdiff/634a7c857e5a1200778dbfba259ee2f68…
commit 634a7c857e5a1200778dbfba259ee2f68a0d89c2
Author: Xin Zhao <xinzhao3(a)illinois.edu>
Date: Thu Nov 6 13:31:12 2014 -0600
Move ircpi.c from test/mpi/rma to examples.
ircpi.c is an interactive test, which is never triggered
in RMA test suite. It is better to put it under examples.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 72d593a..40d4cff 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -57,7 +57,7 @@ noinst_PROGRAMS = cpi
# pmandel requires a separate set of socket calls (its a long story)
# and may not build on most platforms
EXTRA_PROGRAMS = pmandel pmandel_spawn pmandel_service pmandel_spaserv \
- pmandel_fence hellow icpi parent child srtest \
+ pmandel_fence hellow icpi ircpi parent child srtest \
spawn_merge_parent spawn_merge_child1 spawn_merge_child2
# LIBS includes -lmpich and other libraries (e.g., -lpmpich if
@@ -82,6 +82,8 @@ cpi_LDFLAGS = $(AM_LDFLAGS) $(mpich_libtool_static_flag)
icpi_SOURCES = icpi.c
icpi_LDADD = -lm
+ircpi_SOURCES = ircpi.c
+ircpi_LDADD = -lm
pmandel_SOURCES = pmandel.c
pmandel_LDADD = -lm
pmandel_spawn_SOURCES = pmandel_spawn.c
diff --git a/examples/ircpi.c b/examples/ircpi.c
new file mode 100644
index 0000000..30c1ed2
--- /dev/null
+++ b/examples/ircpi.c
@@ -0,0 +1,71 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2001 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include "stdio.h"
+#include <math.h>
+
+/* From Using MPI-2 */
+
+int main(int argc, char *argv[])
+{
+ int n, myid, numprocs, i, ierr;
+ double PI25DT = 3.141592653589793238462643;
+ double mypi, pi, h, sum, x;
+ MPI_Win nwin, piwin;
+
+ MPI_Init(&argc,&argv);
+ MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
+ MPI_Comm_rank(MPI_COMM_WORLD,&myid);
+
+ if (myid == 0) {
+ MPI_Win_create(&n, sizeof(int), 1, MPI_INFO_NULL,
+ MPI_COMM_WORLD, &nwin);
+ MPI_Win_create(&pi, sizeof(double), 1, MPI_INFO_NULL,
+ MPI_COMM_WORLD, &piwin);
+ }
+ else {
+ MPI_Win_create(MPI_BOTTOM, 0, 1, MPI_INFO_NULL,
+ MPI_COMM_WORLD, &nwin);
+ MPI_Win_create(MPI_BOTTOM, 0, 1, MPI_INFO_NULL,
+ MPI_COMM_WORLD, &piwin);
+ }
+ while (1) {
+ if (myid == 0) {
+ fprintf(stdout, "Enter the number of intervals: (0 quits) ");
+ fflush(stdout);
+ ierr=scanf("%d",&n);
+ pi = 0.0;
+ }
+ MPI_Win_fence(0, nwin);
+ if (myid != 0)
+ MPI_Get(&n, 1, MPI_INT, 0, 0, 1, MPI_INT, nwin);
+ MPI_Win_fence(0, nwin);
+ if (n == 0)
+ break;
+ else {
+ h = 1.0 / (double) n;
+ sum = 0.0;
+ for (i = myid + 1; i <= n; i += numprocs) {
+ x = h * ((double)i - 0.5);
+ sum += (4.0 / (1.0 + x*x));
+ }
+ mypi = h * sum;
+ MPI_Win_fence( 0, piwin);
+ MPI_Accumulate(&mypi, 1, MPI_DOUBLE, 0, 0, 1, MPI_DOUBLE,
+ MPI_SUM, piwin);
+ MPI_Win_fence(0, piwin);
+ if (myid == 0) {
+ fprintf(stdout, "pi is approximately %.16f, Error is %.16f\n",
+ pi, fabs(pi - PI25DT));
+ fflush(stdout);
+ }
+ }
+ }
+ MPI_Win_free(&nwin);
+ MPI_Win_free(&piwin);
+ MPI_Finalize();
+ return 0;
+}
diff --git a/test/mpi/rma/Makefile.am b/test/mpi/rma/Makefile.am
index c1c4d36..10ab17c 100644
--- a/test/mpi/rma/Makefile.am
+++ b/test/mpi/rma/Makefile.am
@@ -14,7 +14,6 @@ EXTRA_DIST = testlist
## correctly
noinst_PROGRAMS = \
allocmem \
- ircpi \
test1 \
test2 \
test2_shm \
@@ -216,5 +215,3 @@ mutex_bench_shm_ordered_SOURCES = mutex_bench.c mcs-mutex.c mcs-mutex.h
linked_list_bench_lock_shr_nocheck_SOURCES = linked_list_bench_lock_shr.c
linked_list_bench_lock_shr_nocheck_CPPFLAGS = -DUSE_MODE_NOCHECK $(AM_CPPFLAGS)
-
-ircpi_LDADD = $(LDADD) -lm
diff --git a/test/mpi/rma/ircpi.c b/test/mpi/rma/ircpi.c
deleted file mode 100644
index 99a83ed..0000000
--- a/test/mpi/rma/ircpi.c
+++ /dev/null
@@ -1,71 +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 "mpi.h"
-#include "stdio.h"
-#include <math.h>
-
-/* From Using MPI-2 */
-
-int main(int argc, char *argv[])
-{
- int n, myid, numprocs, i, ierr;
- double PI25DT = 3.141592653589793238462643;
- double mypi, pi, h, sum, x;
- MPI_Win nwin, piwin;
-
- MPI_Init(&argc,&argv);
- MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
- MPI_Comm_rank(MPI_COMM_WORLD,&myid);
-
- if (myid == 0) {
- MPI_Win_create(&n, sizeof(int), 1, MPI_INFO_NULL,
- MPI_COMM_WORLD, &nwin);
- MPI_Win_create(&pi, sizeof(double), 1, MPI_INFO_NULL,
- MPI_COMM_WORLD, &piwin);
- }
- else {
- MPI_Win_create(MPI_BOTTOM, 0, 1, MPI_INFO_NULL,
- MPI_COMM_WORLD, &nwin);
- MPI_Win_create(MPI_BOTTOM, 0, 1, MPI_INFO_NULL,
- MPI_COMM_WORLD, &piwin);
- }
- while (1) {
- if (myid == 0) {
- fprintf(stdout, "Enter the number of intervals: (0 quits) ");
- fflush(stdout);
- ierr=scanf("%d",&n);
- pi = 0.0;
- }
- MPI_Win_fence(0, nwin);
- if (myid != 0)
- MPI_Get(&n, 1, MPI_INT, 0, 0, 1, MPI_INT, nwin);
- MPI_Win_fence(0, nwin);
- if (n == 0)
- break;
- else {
- h = 1.0 / (double) n;
- sum = 0.0;
- for (i = myid + 1; i <= n; i += numprocs) {
- x = h * ((double)i - 0.5);
- sum += (4.0 / (1.0 + x*x));
- }
- mypi = h * sum;
- MPI_Win_fence( 0, piwin);
- MPI_Accumulate(&mypi, 1, MPI_DOUBLE, 0, 0, 1, MPI_DOUBLE,
- MPI_SUM, piwin);
- MPI_Win_fence(0, piwin);
- if (myid == 0) {
- fprintf(stdout, "pi is approximately %.16f, Error is %.16f\n",
- pi, fabs(pi - PI25DT));
- fflush(stdout);
- }
- }
- }
- MPI_Win_free(&nwin);
- MPI_Win_free(&piwin);
- MPI_Finalize();
- return 0;
-}
-----------------------------------------------------------------------
Summary of changes:
examples/Makefile.am | 4 ++-
examples/ircpi.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++
test/mpi/rma/Makefile.am | 3 --
test/mpi/rma/ircpi.c | 71 ----------------------------------------------
4 files changed, 74 insertions(+), 75 deletions(-)
create mode 100644 examples/ircpi.c
delete mode 100644 test/mpi/rma/ircpi.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-146-gdcd7ee6
by noreply@mpich.org 06 Nov '14
by noreply@mpich.org 06 Nov '14
06 Nov '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 dcd7ee6cd5fd0933651f1dc5a26637a33aff1112 (commit)
via 9b6eea16e1302800f418451c6095f8eab4f5e36f (commit)
via 5b0cfb3be4aa050709ec633c5cfa2860174cf51f (commit)
via c2be640e9d787337bf5260d1081b898668541183 (commit)
via e89e6c66ceeb93725f1024927347c2d2787d3934 (commit)
via d71154aa3a886f44c51e33ac045a2cf09301ff41 (commit)
from 42ebe24073b4c68573327a646b3bea0a8b161d08 (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/dcd7ee6cd5fd0933651f1dc5a26637a33…
commit dcd7ee6cd5fd0933651f1dc5a26637a33aff1112
Author: Wesley Bland <wbland(a)anl.gov>
Date: Wed Nov 5 14:32:38 2014 -0600
Mark anysource as not failing anymore
This test should be fixed by the latest commits.
See #1945
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/test/mpi/ft/testlist b/test/mpi/ft/testlist
index ed4ee5d..41fa987 100644
--- a/test/mpi/ft/testlist
+++ b/test/mpi/ft/testlist
@@ -12,7 +12,7 @@ gather 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=f
reduce 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
bcast 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
scatter 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
-anysource 3 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+anysource 3 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
revoke_nofail 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
shrink 8 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
agree 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
http://git.mpich.org/mpich.git/commitdiff/9b6eea16e1302800f418451c6095f8eab…
commit 9b6eea16e1302800f418451c6095f8eab4f5e36f
Author: Wesley Bland <wbland(a)anl.gov>
Date: Wed Nov 5 14:32:07 2014 -0600
Improve the anysource test
Improves the anysource test by doing more error checking to provide
better output.
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/test/mpi/ft/anysource.c b/test/mpi/ft/anysource.c
index 31459f6..650057a 100644
--- a/test/mpi/ft/anysource.c
+++ b/test/mpi/ft/anysource.c
@@ -15,8 +15,7 @@
int main(int argc, char **argv)
{
int rank, size, err, ec;
- char buf[10] = " No errors";
- char error[MPI_MAX_ERROR_STRING];
+ char buf[10];
MPI_Request request;
MPI_Status status;
@@ -36,6 +35,7 @@ int main(int argc, char **argv)
/* Make sure ANY_SOURCE returns correctly after a failure */
if (rank == 0) {
+ char buf[10];
err = MPI_Recv(buf, 10, MPI_CHAR, MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
if (MPI_SUCCESS == err) {
fprintf(stderr, "Expected a failure for receive from ANY_SOURCE\n");
@@ -43,10 +43,29 @@ int main(int argc, char **argv)
}
/* Make sure that new ANY_SOURCE operations don't work yet */
- MPI_Irecv(buf, 10, MPI_CHAR, MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &request);
+ err = MPI_Irecv(buf, 10, MPI_CHAR, MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &request);
+ if (request == MPI_REQUEST_NULL) {
+ fprintf(stderr, "Request for ANY_SOURCE receive is NULL\n");
+ MPI_Abort(MPI_COMM_WORLD, 1);
+ }
+ MPI_Error_class(err, &ec);
+ if (ec != MPI_SUCCESS && ec != MPIX_ERR_PROC_FAILED_PENDING) {
+ fprintf(stderr, "Expected SUCCESS or MPIX_ERR_PROC_FAILED_PENDING: %d\n", ec);
+ MPI_Abort(MPI_COMM_WORLD, 1);
+ }
+
err = MPI_Wait(&request, &status);
- if (MPI_SUCCESS == err) {
- fprintf(stderr, "Expected a failure for receive from ANY_SOURCE\n");
+ MPI_Error_class(err, &ec);
+ if (MPIX_ERR_PROC_FAILED_PENDING != ec) {
+ fprintf(stderr, "Expected a MPIX_ERR_PROC_FAILED_PENDING (%d) for receive from ANY_SOURCE: %d\n", MPIX_ERR_PROC_FAILED_PENDING, ec);
+ fprintf(stderr, "BUF: %s\n", buf);
+ MPI_Abort(MPI_COMM_WORLD, 1);
+ }
+
+ err = MPI_Send(NULL, 0, MPI_INT, 2, 0, MPI_COMM_WORLD);
+ if (MPI_SUCCESS != err) {
+ MPI_Error_class(err, &ec);
+ fprintf(stderr, "MPI_SEND failed: %d", ec);
MPI_Abort(MPI_COMM_WORLD, 1);
}
@@ -55,21 +74,24 @@ int main(int argc, char **argv)
err = MPI_Wait(&request, &status);
if (MPI_SUCCESS != err) {
MPI_Error_class(err, &ec);
- MPI_Error_string(err, error, &size);
- fprintf(stderr, "Unexpected failure after acknowledged failure (%d)\n%s", ec, error);
+ fprintf(stderr, "Unexpected failure after acknowledged failure (%d)\n", ec);
MPI_Abort(MPI_COMM_WORLD, 1);
}
- fprintf(stdout, "%s\n", buf);
+ fprintf(stdout, " %s\n", buf);
} else if (rank == 2) {
- /* Make sure we don't send our first message too early */
- sleep(2);
+ char buf[10] = "No errors";
+ err = MPI_Recv(NULL, 0, MPI_INT, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
+ if (MPI_SUCCESS != err) {
+ MPI_Error_class(err, &ec);
+ fprintf(stderr, "MPI_RECV failed: %d\n", ec);
+ MPI_Abort(MPI_COMM_WORLD, 1);
+ }
err = MPI_Send(buf, 10, MPI_CHAR, 0, 0, MPI_COMM_WORLD);
if (MPI_SUCCESS != err) {
MPI_Error_class(err, &ec);
- MPI_Error_string(err, error, &size);
- fprintf(stderr, "Unexpected failure from MPI_Send (%d)\n%s", ec, error);
+ fprintf(stderr, "Unexpected failure from MPI_Send (%d)\n", ec);
MPI_Abort(MPI_COMM_WORLD, 1);
}
}
http://git.mpich.org/mpich.git/commitdiff/5b0cfb3be4aa050709ec633c5cfa28601…
commit 5b0cfb3be4aa050709ec633c5cfa2860174cf51f
Author: Wesley Bland <wbland(a)anl.gov>
Date: Wed Nov 5 14:28:03 2014 -0600
Return request from IRECV even if failure
We will now return a request handle from MPI_IRECV even if there is a
failure. The reason for this is because the ULFM spec says that even if
the function returns MPIX_ERR_PROC_FAILED_PENDING, it still should
provide a valid request that can be completed later.
This doesn't cause a problem for other situations because the value of
the request is undefined in that scenario so it's fine for it to be
garbage.
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/src/mpi/pt2pt/irecv.c b/src/mpi/pt2pt/irecv.c
index ee9aa85..ab75840 100644
--- a/src/mpi/pt2pt/irecv.c
+++ b/src/mpi/pt2pt/irecv.c
@@ -125,14 +125,19 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source,
mpi_errno = MPID_Irecv(buf, count, datatype, source, tag, comm_ptr,
MPID_CONTEXT_INTRA_PT2PT, &request_ptr);
- if (mpi_errno != MPI_SUCCESS) goto fn_fail;
-
/* return the handle of the request to the user */
/* MPIU_OBJ_HANDLE_PUBLISH is unnecessary for irecv, lower-level access is
* responsible for its own consistency, while upper-level field access is
* controlled by the completion counter */
*request = request_ptr->handle;
+ /* Put this part after setting the request so that if the request is
+ * pending (which is still considered an error), it will still be set
+ * correctly here. For real error cases, the user might get garbage as
+ * their request value, but that's fine since the definition is
+ * undefined anyway. */
+ if (mpi_errno != MPI_SUCCESS) goto fn_fail;
+
/* ... end of body of routine ... */
fn_exit:
http://git.mpich.org/mpich.git/commitdiff/c2be640e9d787337bf5260d1081b89866…
commit c2be640e9d787337bf5260d1081b898668541183
Author: Wesley Bland <wbland(a)anl.gov>
Date: Tue Nov 4 17:41:46 2014 -0600
Check for pending any source ops
Before calling the progress engine, make sure none of the operations
should return an error for MPIX_ERR_PROC_FAILED_PENDING. They would
cause the progress engine to hang (potentially) so we can't enter it.
Instead, mark the appropriate error codes and return immediately.
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/src/mpi/pt2pt/test.c b/src/mpi/pt2pt/test.c
index 5b5d325..38775bf 100644
--- a/src/mpi/pt2pt/test.c
+++ b/src/mpi/pt2pt/test.c
@@ -66,6 +66,10 @@ int MPIR_Test_impl(MPI_Request *request, int *flag, MPI_Status *status)
*flag = TRUE;
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
/* Fall through to the exit */
+ } else if (MPID_Request_is_pending_failure(request_ptr)) {
+ *flag = TRUE;
+ mpi_errno = request_ptr->status.MPI_ERROR;
+ goto fn_fail;
}
fn_exit:
diff --git a/src/mpi/pt2pt/testall.c b/src/mpi/pt2pt/testall.c
index fd6a41e..8acc813 100644
--- a/src/mpi/pt2pt/testall.c
+++ b/src/mpi/pt2pt/testall.c
@@ -166,13 +166,14 @@ int MPI_Testall(int count, MPI_Request array_of_requests[], int *flag,
&(array_of_statuses[i]));
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
}
- if (request_ptrs[i] != NULL && MPID_Request_is_complete(request_ptrs[i]))
+ if (request_ptrs[i] != NULL && (MPID_Request_is_complete(request_ptrs[i]) || MPID_Request_is_pending_failure(request_ptrs[i])))
{
n_completed++;
rc = MPIR_Request_get_error(request_ptrs[i]);
if (rc != MPI_SUCCESS)
{
- if (MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(rc))
+ if (MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(rc) ||
+ MPIX_ERR_PROC_FAILED_PENDING == MPIR_ERR_GET_CLASS(rc))
proc_failure = 1;
mpi_errno = MPI_ERR_IN_STATUS;
}
diff --git a/src/mpi/pt2pt/testany.c b/src/mpi/pt2pt/testany.c
index a3f0595..72112fa 100644
--- a/src/mpi/pt2pt/testany.c
+++ b/src/mpi/pt2pt/testany.c
@@ -183,7 +183,12 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx,
{
n_inactive += 1;
}
- }
+ } else if (request_ptrs[i] != NULL && MPID_Request_is_pending_failure(request_ptrs[i])) {
+ mpi_errno = request_ptrs[i]->status.MPI_ERROR;
+ *flag = TRUE;
+ *indx = i;
+ goto fn_fail;
+ }
}
if (n_inactive == count)
diff --git a/src/mpi/pt2pt/testsome.c b/src/mpi/pt2pt/testsome.c
index 58c1275..4f528b3 100644
--- a/src/mpi/pt2pt/testsome.c
+++ b/src/mpi/pt2pt/testsome.c
@@ -197,7 +197,13 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount,
request_ptrs[i] = NULL;
n_inactive += 1;
}
- }
+ } else if (request_ptrs[i] != NULL && MPID_Request_is_pending_failure(request_ptrs[i])) {
+ mpi_errno = MPI_ERR_IN_STATUS;
+ array_of_indices[n_active] = i;
+ n_active += 1;
+ rc = request_ptrs[i]->status.MPI_ERROR;
+ status_ptr->MPI_ERROR = rc;
+ }
}
if (mpi_errno == MPI_ERR_IN_STATUS)
diff --git a/src/mpi/pt2pt/wait.c b/src/mpi/pt2pt/wait.c
index 2d609ac..219dfd4 100644
--- a/src/mpi/pt2pt/wait.c
+++ b/src/mpi/pt2pt/wait.c
@@ -43,6 +43,11 @@ int MPIR_Wait_impl(MPI_Request *request, MPI_Status *status)
MPID_Request_get_ptr(*request, request_ptr);
+ if (MPID_Request_is_pending_failure(request_ptr)) {
+ mpi_errno = request_ptr->status.MPI_ERROR;
+ goto fn_fail;
+ }
+
if (!MPID_Request_is_complete(request_ptr))
{
MPID_Progress_state progress_state;
diff --git a/src/mpi/pt2pt/waitall.c b/src/mpi/pt2pt/waitall.c
index b3a87fc..fe7c581 100644
--- a/src/mpi/pt2pt/waitall.c
+++ b/src/mpi/pt2pt/waitall.c
@@ -154,7 +154,7 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
}
/* wait for ith request to complete */
- while (!MPID_Request_is_complete(request_ptrs[i]))
+ while (!MPID_Request_is_complete(request_ptrs[i]) && !MPID_Request_is_pending_failure(request_ptrs[i]))
{
/* generalized requests should already be finished */
MPIU_Assert(request_ptrs[i]->kind != MPID_UREQUEST);
@@ -168,9 +168,16 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
}
}
- /* complete the request and check the status */
- status_ptr = (ignoring_statuses) ? MPI_STATUS_IGNORE : &array_of_statuses[i];
- rc = MPIR_Request_complete(&array_of_requests[i], request_ptrs[i], status_ptr, &active_flag);
+ if (MPID_Request_is_complete(request_ptrs[i])) {
+ /* complete the request and check the status */
+ status_ptr = (ignoring_statuses) ? MPI_STATUS_IGNORE : &array_of_statuses[i];
+ rc = MPIR_Request_complete(&array_of_requests[i], request_ptrs[i], status_ptr, &active_flag);
+ } else {
+ /* If the request isn't complete, it's because it's pending due
+ * to a failure so set the rc accordingly. */
+ rc = request_ptrs[i]->status.MPI_ERROR;
+ proc_failure = 1;
+ }
if (rc == MPI_SUCCESS)
{
request_ptrs[i] = NULL;
diff --git a/src/mpi/pt2pt/waitany.c b/src/mpi/pt2pt/waitany.c
index 7bb37d7..cd48d38 100644
--- a/src/mpi/pt2pt/waitany.c
+++ b/src/mpi/pt2pt/waitany.c
@@ -155,7 +155,12 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx,
continue;
/* we found at least one non-null request */
found_nonnull_req = TRUE;
-
+
+ if (MPID_Request_is_pending_failure(request_ptrs[i])) {
+ mpi_errno = request_ptrs[i]->status.MPI_ERROR;
+ goto fn_progress_end_fail;
+ }
+
if (request_ptrs[i]->kind == MPID_UREQUEST && request_ptrs[i]->greq_fns->poll_fn != NULL)
{
/* this is a generalized request; make progress on it */
diff --git a/src/mpi/pt2pt/waitsome.c b/src/mpi/pt2pt/waitsome.c
index 00b9449..ee8cca3 100644
--- a/src/mpi/pt2pt/waitsome.c
+++ b/src/mpi/pt2pt/waitsome.c
@@ -221,7 +221,13 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[],
request_ptrs[i] = NULL;
n_inactive += 1;
}
- }
+ } else if ( request_ptrs[i] != NULL && MPID_Request_is_pending_failure(request_ptrs[i])) {
+ n_active += 1;
+ mpi_errno = MPI_ERR_IN_STATUS;
+ if (status_ptr != MPI_STATUS_IGNORE) {
+ status_ptr->MPI_ERROR = request_ptrs[i]->status.MPI_ERROR;
+ }
+ }
}
if (mpi_errno == MPI_ERR_IN_STATUS)
http://git.mpich.org/mpich.git/commitdiff/e89e6c66ceeb93725f1024927347c2d27…
commit e89e6c66ceeb93725f1024927347c2d2787d3934
Author: Wesley Bland <wbland(a)anl.gov>
Date: Tue Nov 4 17:39:13 2014 -0600
Check for any source reqs that should be pending
Anysource requests involving a communicator that isn't collectively
active should be appended to the posted queue the error class should be
marked as MPIX_ERR_PROC_FAILED_PENDING. The operation can still be
completed later.
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index e4b7a38..9290470 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -555,46 +555,47 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag,
} while (rreq);
}
else {
- if (tag == MPI_ANY_TAG)
- match.parts.tag = mask.parts.tag = 0;
+ do { /* This loop is just to make it easy to break out if necessary */
+ if (tag == MPI_ANY_TAG)
+ match.parts.tag = mask.parts.tag = 0;
if (source == MPI_ANY_SOURCE) {
if (!MPIDI_CH3I_Comm_AS_enabled(comm)) {
- MPIU_ERR_SET(mpi_errno, MPIX_ERR_PROC_FAILED, "**comm_fail");
- rreq->status.MPI_ERROR = mpi_errno;
- MPIDI_CH3U_Request_complete(rreq);
- goto lock_exit;
+ /* If MPI_ANY_SOURCE is disabled right now, we should
+ * just add this request to the posted queue instead and
+ * return the appropriate error. */
+ continue;
}
match.parts.rank = mask.parts.rank = 0;
}
+ do {
+ MPIR_T_PVAR_COUNTER_INC(RECVQ, unexpected_recvq_match_attempts, 1);
+ if (MATCH_WITH_LEFT_MASK(rreq->dev.match, match, mask)) {
+ if (prev_rreq != NULL) {
+ prev_rreq->dev.next = rreq->dev.next;
+ }
+ else {
+ recvq_unexpected_head = rreq->dev.next;
+ }
+ if (rreq->dev.next == NULL) {
+ recvq_unexpected_tail = prev_rreq;
+ }
+ MPIR_T_PVAR_LEVEL_DEC(RECVQ, unexpected_recvq_length, 1);
- do {
- MPIR_T_PVAR_COUNTER_INC(RECVQ, unexpected_recvq_match_attempts, 1);
- if (MATCH_WITH_LEFT_MASK(rreq->dev.match, match, mask)) {
- if (prev_rreq != NULL) {
- prev_rreq->dev.next = rreq->dev.next;
- }
- else {
- recvq_unexpected_head = rreq->dev.next;
- }
- if (rreq->dev.next == NULL) {
- recvq_unexpected_tail = prev_rreq;
- }
- MPIR_T_PVAR_LEVEL_DEC(RECVQ, unexpected_recvq_length, 1);
-
- if (MPIDI_Request_get_msg_type(rreq) == MPIDI_REQUEST_EAGER_MSG)
- MPIR_T_PVAR_LEVEL_DEC(RECVQ, unexpected_recvq_buffer_size, rreq->dev.tmpbuf_sz);
+ if (MPIDI_Request_get_msg_type(rreq) == MPIDI_REQUEST_EAGER_MSG)
+ MPIR_T_PVAR_LEVEL_DEC(RECVQ, unexpected_recvq_buffer_size, rreq->dev.tmpbuf_sz);
- rreq->comm = comm;
- MPIR_Comm_add_ref(comm);
- rreq->dev.user_buf = user_buf;
- rreq->dev.user_count = user_count;
- rreq->dev.datatype = datatype;
- found = TRUE;
- goto lock_exit;
- }
- prev_rreq = rreq;
- rreq = rreq->dev.next;
- } while (rreq);
+ rreq->comm = comm;
+ MPIR_Comm_add_ref(comm);
+ rreq->dev.user_buf = user_buf;
+ rreq->dev.user_count = user_count;
+ rreq->dev.datatype = datatype;
+ found = TRUE;
+ goto lock_exit;
+ }
+ prev_rreq = rreq;
+ rreq = rreq->dev.next;
+ } while (rreq);
+ } while (false);
}
}
MPIR_T_PVAR_TIMER_END(RECVQ, time_matching_unexpectedq);
@@ -639,10 +640,14 @@ MPID_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag,
goto lock_exit;
}
} else if (!MPIDI_CH3I_Comm_AS_enabled(comm)) {
- MPIU_ERR_SET(mpi_errno, MPIX_ERR_PROC_FAILED, "**comm_fail");
+ /* If this receive is for MPI_ANY_SOURCE, we will still add the
+ * request to the queue for now, but we will also set the error
+ * class to MPIX_ERR_PROC_FAILED_PENDING since the request shouldn't
+ * be matched as long as there is a failure pending. This will get
+ * checked again later during the completion function to see if the
+ * request can be completed at that time. */
+ MPIU_ERR_SET(mpi_errno, MPIX_ERR_PROC_FAILED_PENDING, "**failure_pending");
rreq->status.MPI_ERROR = mpi_errno;
- MPIDI_CH3U_Request_complete(rreq);
- goto lock_exit;
}
rreq->dev.next = NULL;
diff --git a/src/mpid/ch3/src/mpid_irecv.c b/src/mpid/ch3/src/mpid_irecv.c
index 7a30ad4..c0401e9 100644
--- a/src/mpid/ch3/src/mpid_irecv.c
+++ b/src/mpid/ch3/src/mpid_irecv.c
@@ -49,6 +49,10 @@ int MPID_Irecv(void * buf, int count, MPI_Datatype datatype, int rank, int tag,
MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomemreq");
}
+ if (MPIR_ERR_GET_CLASS(rreq->status.MPI_ERROR) == MPIX_ERR_PROC_FAILED_PENDING) {
+ mpi_errno = rreq->status.MPI_ERROR;
+ }
+
if (found)
{
MPIDI_VC_t * vc;
http://git.mpich.org/mpich.git/commitdiff/d71154aa3a886f44c51e33ac045a2cf09…
commit d71154aa3a886f44c51e33ac045a2cf09301ff41
Author: Wesley Bland <wbland(a)anl.gov>
Date: Tue Nov 4 17:36:38 2014 -0600
Add MPID_Request_is_pending_failure
This function will check to see if a request can be completed if it
involves MPI_ANY_SOURCE. An any source request cannot be completed if
the communicator is not collectively active.
Signed-off-by: Huiwei Lu <huiweilu(a)mcs.anl.gov>
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 40389f5..a6c0ad0 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3621,6 +3621,23 @@ void MPID_Request_set_completed(MPID_Request *);
@*/
void MPID_Request_release(MPID_Request *);
+/*@
+ MPID_Request_is_pending_failure - Check if a request is pending because of a process failures
+
+ Input Parameter:
+ request - request to check
+
+ Return value:
+ 0 - The request is not pending because of a failure
+ Non-zero - The request is pending because of a failure
+
+ Notes:
+ This routine checks to see if the communicator used in the request can
+ participate in MPI_ANY_SOURCE operations and if this request is already
+ pending due to a process failure.
+@*/
+int MPID_Request_is_pending_failure(MPID_Request *);
+
typedef struct MPID_Grequest_class {
MPIU_OBJECT_HEADER; /* adds handle and ref_count fields */
MPI_Grequest_query_function *query_fn;
diff --git a/src/mpid/ch3/src/mpid_comm_failure_ack.c b/src/mpid/ch3/src/mpid_comm_failure_ack.c
index e5034a1..700c57e 100644
--- a/src/mpid/ch3/src/mpid_comm_failure_ack.c
+++ b/src/mpid/ch3/src/mpid_comm_failure_ack.c
@@ -28,6 +28,9 @@ int MPID_Comm_failure_ack(MPID_Comm *comm_ptr)
* communciator. */
comm_ptr->dev.last_ack_rank = MPIDI_last_known_failed;
+ /* Mark the communicator as any source active */
+ comm_ptr->dev.anysource_enabled = 1;
+
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_COMM_FAILURE_ACK);
return mpi_errno;
@@ -144,3 +147,34 @@ int MPID_Comm_failed_bitarray(MPID_Comm *comm_ptr, uint32_t **bitarray, int acke
fn_fail:
goto fn_exit;
}
+
+#undef FUNCNAME
+#define FUNCNAME MPID_Request_is_pending_failure
+#undef FCNAME
+#define FCNAME MPIU_QUOTE(FUNCNAME)
+int MPID_Request_is_pending_failure(MPID_Request *request_ptr)
+{
+ int ret = 0;
+ MPIDI_STATE_DECL(MPID_STATE_REQUEST_IS_PENDING_FAILURE);
+ MPIDI_FUNC_ENTER(MPID_STATE_REQUEST_IS_PENDING_FAILURE);
+
+ if (request_ptr->dev.match.parts.rank != MPI_ANY_SOURCE) {
+ goto fn_exit;
+ }
+
+ /* If the request is pending and the communicator has MPI_ANY_SOURCE
+ * enabled, then we can mark the request as not pending and let the
+ * request continue. */
+ if (MPIDI_CH3I_Comm_AS_enabled(request_ptr->comm)) {
+ request_ptr->status.MPI_ERROR = MPI_SUCCESS;
+ goto fn_exit;
+ }
+
+ /* Otherwise, the request shouldn't go into the progress engine. */
+ ret = 1;
+
+fn_exit:
+ MPIU_DBG_MSG_S(CH3_OTHER, VERBOSE, "Request is%spending failure", ret ? " " : " not ");
+ MPIDI_FUNC_EXIT(MPID_STATE_REQUEST_IS_PENDING_FAILURE);
+ return ret;
+}
diff --git a/src/mpid/pamid/src/misc/mpid_unimpl.c b/src/mpid/pamid/src/misc/mpid_unimpl.c
index 4472c1e..c43e10e 100644
--- a/src/mpid/pamid/src/misc/mpid_unimpl.c
+++ b/src/mpid/pamid/src/misc/mpid_unimpl.c
@@ -101,3 +101,9 @@ int MPID_Comm_revoke(MPID_Comm *comm_ptr, int is_remote)
MPID_abort();
return 0;
}
+
+int MPID_Request_is_pending_failure(MPID_Request *request_ptr)
+{
+ MPID_abort();
+ return 0;
+}
-----------------------------------------------------------------------
Summary of changes:
src/include/mpiimpl.h | 17 +++++++
src/mpi/pt2pt/irecv.c | 9 +++-
src/mpi/pt2pt/test.c | 4 ++
src/mpi/pt2pt/testall.c | 5 +-
src/mpi/pt2pt/testany.c | 7 ++-
src/mpi/pt2pt/testsome.c | 8 +++-
src/mpi/pt2pt/wait.c | 5 ++
src/mpi/pt2pt/waitall.c | 15 ++++--
src/mpi/pt2pt/waitany.c | 7 ++-
src/mpi/pt2pt/waitsome.c | 8 +++-
src/mpid/ch3/src/ch3u_recvq.c | 77 ++++++++++++++++--------------
src/mpid/ch3/src/mpid_comm_failure_ack.c | 34 +++++++++++++
src/mpid/ch3/src/mpid_irecv.c | 4 ++
src/mpid/pamid/src/misc/mpid_unimpl.c | 6 ++
test/mpi/ft/anysource.c | 46 +++++++++++++-----
test/mpi/ft/testlist | 2 +-
16 files changed, 193 insertions(+), 61 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-140-g42ebe24
by noreply@mpich.org 06 Nov '14
by noreply@mpich.org 06 Nov '14
06 Nov '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 42ebe24073b4c68573327a646b3bea0a8b161d08 (commit)
from 16fbce5e976bd9f6345036bb86abfd01446400c2 (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/42ebe24073b4c68573327a646b3bea0a8…
commit 42ebe24073b4c68573327a646b3bea0a8b161d08
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Thu Nov 6 09:46:12 2014 -0600
portals4: temporarily buf counts in ptl_nm.c
There is a complete overhaul of this file on the way, but in the meantime
we raise these limits to prevent deadlock in MPI_Finalize with process
count >= 12.
No reviewer.
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
index e461bbc..f0d447d 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_nm.c
@@ -8,8 +8,8 @@
#include <mpl_utlist.h>
#include "rptl.h"
-#define NUM_SEND_BUFS 20
-#define NUM_RECV_BUFS 20
+#define NUM_SEND_BUFS 100
+#define NUM_RECV_BUFS 100
#define BUFLEN (sizeof(MPIDI_CH3_Pkt_t) + PTL_MAX_EAGER)
typedef struct MPID_nem_ptl_sendbuf {
-----------------------------------------------------------------------
Summary of changes:
.../ch3/channels/nemesis/netmod/portals4/ptl_nm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1.3-139-g16fbce5
by noreply@mpich.org 05 Nov '14
by noreply@mpich.org 05 Nov '14
05 Nov '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 16fbce5e976bd9f6345036bb86abfd01446400c2 (commit)
via 01add58a5e63b5fd0dd42b39d645b4edd2d06f9e (commit)
via 5c6023830533660877d58ef57d0a9cfbfb7a4722 (commit)
via 6e9fcbf1d9196c4d3c36ced5e6e857b7fcac5082 (commit)
from e3c310e88ba4d08717609b6256c59ab335fbaf36 (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/16fbce5e976bd9f6345036bb86abfd014…
commit 16fbce5e976bd9f6345036bb86abfd01446400c2
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Tue Oct 28 20:19:08 2014 -0500
Add C/Fortran tests for MPI_Aint_add/diff
The F77/90 test is marked as xfail for a bug at
https://trac.mpich.org/projects/mpich/ticket/1877
Signed-off-by: Wesley Bland <wbland(a)anl.gov>
diff --git a/test/mpi/f08/rma/Makefile.am b/test/mpi/f08/rma/Makefile.am
index 4588779..d12e47a 100644
--- a/test/mpi/f08/rma/Makefile.am
+++ b/test/mpi/f08/rma/Makefile.am
@@ -27,7 +27,8 @@ noinst_PROGRAMS = \
c2f2cwinf08 \
baseattrwinf08 \
winattrf08 \
- winattr2f08
+ winattr2f08 \
+ aintf08
## this test was commented out in the simplemake version...
## allocmem
diff --git a/test/mpi/f08/rma/aintf08.f90 b/test/mpi/f08/rma/aintf08.f90
new file mode 100644
index 0000000..96ddedd
--- /dev/null
+++ b/test/mpi/f08/rma/aintf08.f90
@@ -0,0 +1,76 @@
+! -*- Mode: Fortran; -*-
+!
+!
+! (C) 2014 by Argonne National Laboratory.
+! See COPYRIGHT in top-level directory.
+!
+
+! This program tests MPI_Aint_add/diff in MPI-3.1.
+! The two functions are often used in RMA code.
+! See https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/349
+
+program main
+ use mpi_f08
+ integer :: rank, nproc
+ integer :: ierr, errs
+ integer :: array(0:1023)
+ integer :: val, target_rank;
+ integer(kind=MPI_ADDRESS_KIND) :: bases(0:1), disp, offset
+ integer(kind=MPI_ADDRESS_KIND) :: winsize
+ type(MPI_WIN) :: win
+ integer :: intsize
+
+ errs = 0
+ call mtest_init(ierr);
+ call MPI_Comm_rank(MPI_COMM_WORLD, rank, ierr)
+ call MPI_Comm_size(MPI_COMM_WORLD, nproc, ierr)
+
+ if (rank == 0 .and. nproc /= 2) then
+ print *, 'Must run with 2 ranks'
+ call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
+ endif
+
+! Get the base address in the middle of the array
+ if (rank == 0) then
+ target_rank = 1
+ array(0) = 1234
+ call MPI_Get_address(array(512), bases(0), ierr)
+ else if (rank == 1) then
+ target_rank = 0
+ array(1023) = 1234
+ call MPI_Get_address(array(512), bases(1), ierr)
+ endif
+
+! Exchange bases
+ call MPI_Type_size(MPI_INT, intsize, ierr);
+ call MPI_Allgather(MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, bases, 1, MPI_AINT, MPI_COMM_WORLD, ierr)
+ call MPI_Win_create_dynamic(MPI_INFO_NULL, MPI_COMM_WORLD, win, ierr)
+
+ winsize = intsize*1024
+ call MPI_Win_attach(win, array, winsize, ierr)
+
+! Do MPI_Aint addressing arithmetic
+ if (rank == 0) then
+ disp = intsize*511
+ offset = MPIX_Aint_add(bases(1), disp) ! offset points to array(1023)
+ else if (rank == 1) then
+ disp = intsize*512
+ offset = MPIX_Aint_diff(bases(0), disp) ! offset points to array(0)
+ endif
+
+! Get value and verify it
+ call MPI_Win_fence(MPI_MODE_NOPRECEDE, win, ierr)
+ call MPI_Get(val, 1, MPI_INT, target_rank, offset, 1, MPI_INT, win, ierr)
+ call MPI_Win_fence(MPI_MODE_NOSUCCEED, win, ierr)
+
+ if (val /= 1234) then
+ errs = errs + 1
+ print *, rank, ' -- Got', val, 'expected 1234'
+ endif
+
+ call MPI_Win_detach(win, array, ierr)
+ call MPI_Win_free(win, ierr)
+
+ call MTest_Finalize(errs)
+ call MPI_Finalize(ierr);
+end
diff --git a/test/mpi/f08/rma/testlist b/test/mpi/f08/rma/testlist
index fee7fb4..a1f3d01 100644
--- a/test/mpi/f08/rma/testlist
+++ b/test/mpi/f08/rma/testlist
@@ -10,3 +10,4 @@ c2f2cwinf08 1
baseattrwinf08 1
winattrf08 1
winattr2f08 1
+aintf08 2 strict=false
diff --git a/test/mpi/f77/rma/Makefile.am b/test/mpi/f77/rma/Makefile.am
index b0c820b..6c82c44 100644
--- a/test/mpi/f77/rma/Makefile.am
+++ b/test/mpi/f77/rma/Makefile.am
@@ -25,7 +25,8 @@ noinst_PROGRAMS = \
c2f2cwinf \
baseattrwinf \
winattrf \
- winattr2f
+ winattr2f \
+ aintf
## this test was commented out in the simplemake version...
## allocmem
diff --git a/test/mpi/f77/rma/aintf.f b/test/mpi/f77/rma/aintf.f
new file mode 100644
index 0000000..f7d67df
--- /dev/null
+++ b/test/mpi/f77/rma/aintf.f
@@ -0,0 +1,85 @@
+! -*- Mode: Fortran; -*-
+!
+!
+! (C) 2014 by Argonne National Laboratory.
+! See COPYRIGHT in top-level directory.
+!
+
+! This program tests MPI_Aint_add/diff in MPI-3.1.
+! The two functions are often used in RMA code.
+! See https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/349
+
+ program main
+ implicit none
+ include 'mpif.h'
+ integer :: rank, nproc
+ integer :: ierr, errs
+ integer :: array(0:1023)
+ integer :: val, target_rank;
+ integer(kind=MPI_ADDRESS_KIND) :: bases(0:1), disp, offset
+ integer(kind=MPI_ADDRESS_KIND) :: winsize
+ integer :: win
+ integer :: intsize
+
+ integer(kind=MPI_ADDRESS_KIND), external :: MPIX_Aint_add
+ integer(kind=MPI_ADDRESS_KIND), external :: MPIX_Aint_diff
+
+ errs = 0
+ call mtest_init(ierr);
+ call MPI_Comm_rank(MPI_COMM_WORLD, rank, ierr)
+ call MPI_Comm_size(MPI_COMM_WORLD, nproc, ierr)
+
+ if (rank == 0 .and. nproc /= 2) then
+ print *, 'Must run with 2 ranks'
+ call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
+ endif
+
+! Get the base address in the middle of the array
+ if (rank == 0) then
+ target_rank = 1
+ array(0) = 1234
+ call MPI_Get_address(array(512), bases(0), ierr)
+ else if (rank == 1) then
+ target_rank = 0
+ array(1023) = 1234
+ call MPI_Get_address(array(512), bases(1), ierr)
+ endif
+
+! Exchange bases
+ call MPI_Type_size(MPI_INT, intsize, ierr);
+
+ call MPI_Allgather(MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, bases,
+ & 1, MPI_AINT, MPI_COMM_WORLD, ierr)
+
+ call MPI_Win_create_dynamic(MPI_INFO_NULL,
+ & MPI_COMM_WORLD, win, ierr)
+
+ winsize = intsize*1024
+ call MPI_Win_attach(win, array, winsize, ierr)
+
+! Do MPI_Aint addressing arithmetic
+ if (rank == 0) then
+ disp = intsize*511
+ offset = MPIX_Aint_add(bases(1), disp)
+ else if (rank == 1) then
+ disp = intsize*512
+ offset = MPIX_Aint_diff(bases(0), disp)
+ endif
+
+! Get value and verify it
+ call MPI_Win_fence(MPI_MODE_NOPRECEDE, win, ierr)
+ call MPI_Get(val, 1, MPI_INT, target_rank,
+ & offset, 1, MPI_INT, win, ierr)
+ call MPI_Win_fence(MPI_MODE_NOSUCCEED, win, ierr)
+
+ if (val /= 1234) then
+ errs = errs + 1
+ print *, rank, ' -- Got', val, 'expected 1234'
+ endif
+
+ call MPI_Win_detach(win, array, ierr)
+ call MPI_Win_free(win, ierr)
+
+ call MTest_Finalize(errs)
+ call MPI_Finalize(ierr);
+ end
diff --git a/test/mpi/f77/rma/testlist b/test/mpi/f77/rma/testlist
index 047c812..20112b8 100644
--- a/test/mpi/f77/rma/testlist
+++ b/test/mpi/f77/rma/testlist
@@ -10,3 +10,4 @@ c2f2cwinf 1
baseattrwinf 1
winattrf 1
winattr2f 1
+aintf 2 strict=false xfail=ticket1877
diff --git a/test/mpi/rma/Makefile.am b/test/mpi/rma/Makefile.am
index e370fbf..c1c4d36 100644
--- a/test/mpi/rma/Makefile.am
+++ b/test/mpi/rma/Makefile.am
@@ -139,7 +139,8 @@ noinst_PROGRAMS = \
get-struct \
rput_local_comp \
racc_local_comp \
- at_complete
+ at_complete \
+ aint
strided_acc_indexed_LDADD = $(LDADD) -lm
strided_acc_onelock_LDADD = $(LDADD) -lm
diff --git a/test/mpi/rma/aint.c b/test/mpi/rma/aint.c
new file mode 100644
index 0000000..9eba621
--- /dev/null
+++ b/test/mpi/rma/aint.c
@@ -0,0 +1,80 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2014 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+/*
+ * This program tests MPI_Aint_add/diff in MPI-3.1.
+ * The two functions are often used in RMA code.
+ * See https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/349
+ */
+
+#include <stdio.h>
+#include <mpi.h>
+#include "mpitest.h"
+
+int main(int argc, char **argv)
+{
+ int rank, nproc;
+ int errs = 0;
+ int array[1024];
+ int val = 0;
+ int target_rank;
+ MPI_Aint bases[2];
+ MPI_Aint disp, offset;
+ MPI_Win win;
+
+ MTest_Init(&argc, &argv);
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &nproc);
+
+ if (rank == 0 && nproc != 2) {
+ MTestError("Must run with 2 ranks\n");
+ }
+
+ /* Get the base address in the middle of the array */
+ if (rank == 0) {
+ target_rank = 1;
+ array[0] = 1234;
+ MPI_Get_address(&array[512], &bases[0]);
+ } else if (rank == 1) {
+ target_rank = 0;
+ array[1023] = 1234;
+ MPI_Get_address(&array[512], &bases[1]);
+ }
+
+ /* Exchange bases */
+ MPI_Allgather(MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, bases, 1, MPI_AINT, MPI_COMM_WORLD);
+
+ MPI_Win_create_dynamic(MPI_INFO_NULL, MPI_COMM_WORLD, &win);
+ MPI_Win_attach(win, array, sizeof(int)*1024);
+
+ /* Do MPI_Aint addressing arithmetic */
+ if (rank == 0) {
+ disp = sizeof(int)*511;
+ offset = MPIX_Aint_add(bases[1], disp); /* offset points to array[1023]*/
+ } else if (rank == 1) {
+ disp = sizeof(int)*512;
+ offset = MPIX_Aint_diff(bases[0], disp); /* offset points to array[0] */
+ }
+
+ /* Get val and verify it */
+ MPI_Win_fence(MPI_MODE_NOPRECEDE, win);
+ MPI_Get(&val, 1, MPI_INT, target_rank, offset, 1, MPI_INT, win);
+ MPI_Win_fence(MPI_MODE_NOSUCCEED, win);
+
+ if (val != 1234) {
+ errs++;
+ printf("%d -- Got %d, expected 1234\n", rank, val);
+ }
+
+ MPI_Win_detach(win, array);
+ MPI_Win_free(&win);
+
+ MTest_Finalize(errs);
+ MPI_Finalize();
+ return 0;
+}
diff --git a/test/mpi/rma/testlist.in b/test/mpi/rma/testlist.in
index cb60752..d5d35dc 100644
--- a/test/mpi/rma/testlist.in
+++ b/test/mpi/rma/testlist.in
@@ -124,6 +124,7 @@ win_shared_zerobyte 4 mpiversion=3.0
win_shared_put_flush_get 4 mpiversion=3.0
get-struct 2
at_complete 2
+aint 2 strict=false
## This test is not strictly correct. This was meant to test out the
## case when MPI_Test is not nonblocking. However, we ended up
http://git.mpich.org/mpich.git/commitdiff/01add58a5e63b5fd0dd42b39d645b4edd…
commit 01add58a5e63b5fd0dd42b39d645b4edd2d06f9e
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Mon Oct 27 15:22:38 2014 -0500
Add F08 bindings for MPI_Aint_add/diff
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.F90 b/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.F90
index d1676b8..38bfaf5 100644
--- a/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.F90
+++ b/src/binding/fortran/use_mpi_f08/mpi_c_interface_nobuf.F90
@@ -2523,5 +2523,21 @@ function MPIR_Comm_spawn_multiple_c(count, array_of_commands, array_of_argv, arr
integer(c_int) :: ierror
end function MPIR_Comm_spawn_multiple_c
+function MPIR_Aint_add_c(base, disp) &
+ bind(C, name="PMPIX_Aint_add") result(res)
+ use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND
+ implicit none
+ integer(MPI_ADDRESS_KIND), value, intent(in) :: base, disp
+ integer(MPI_ADDRESS_KIND) :: res
+end function MPIR_Aint_add_c
+
+function MPIR_Aint_diff_c(addr1, addr2) &
+ bind(C, name="PMPIX_Aint_diff") result(res)
+ use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND
+ implicit none
+ integer(MPI_ADDRESS_KIND), value, intent(in) :: addr1, addr2
+ integer(MPI_ADDRESS_KIND) :: res
+end function MPIR_Aint_diff_c
+
end interface
end module mpi_c_interface_nobuf
diff --git a/src/binding/fortran/use_mpi_f08/mpi_f08.F90 b/src/binding/fortran/use_mpi_f08/mpi_f08.F90
index bd4c52d..7a36ff3 100644
--- a/src/binding/fortran/use_mpi_f08/mpi_f08.F90
+++ b/src/binding/fortran/use_mpi_f08/mpi_f08.F90
@@ -4103,4 +4103,22 @@ interface MPI_Wtime
end function MPI_Wtime_f08
end interface MPI_Wtime
+interface MPIX_Aint_add
+ function MPIX_Aint_add_f08(base, disp) result(res)
+ use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND
+ implicit none
+ integer(MPI_ADDRESS_KIND), intent(in) :: base, disp
+ integer(MPI_ADDRESS_KIND) :: res
+ end function MPIX_Aint_add_f08
+end interface MPIX_Aint_add
+
+interface MPIX_Aint_diff
+ function MPIX_Aint_diff_f08(addr1, addr2) result(res)
+ use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND
+ implicit none
+ integer(MPI_ADDRESS_KIND), intent(in) :: addr1, addr2
+ integer(MPI_ADDRESS_KIND) :: res
+ end function MPIX_Aint_diff_f08
+end interface MPIX_Aint_diff
+
end module mpi_f08
diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/aint_add_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/aint_add_f08ts.F90
new file mode 100644
index 0000000..cf6ef8f
--- /dev/null
+++ b/src/binding/fortran/use_mpi_f08/wrappers_f/aint_add_f08ts.F90
@@ -0,0 +1,14 @@
+! -*- Mode: Fortran; -*-
+!
+! (C) 2014 by Argonne National Laboratory.
+! See COPYRIGHT in top-level directory.
+!
+function MPIX_Aint_add_f08(base, disp) result(res)
+ use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND
+ use :: mpi_c_interface_nobuf, only : MPIR_Aint_add_c
+ implicit none
+ integer(MPI_ADDRESS_KIND), intent(in) :: base, disp
+ integer(MPI_ADDRESS_KIND) :: res
+
+ res = MPIR_Aint_add_c(base, disp)
+end function MPIX_Aint_add_f08
\ No newline at end of file
diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/aint_diff_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/aint_diff_f08ts.F90
new file mode 100644
index 0000000..7c20dec
--- /dev/null
+++ b/src/binding/fortran/use_mpi_f08/wrappers_f/aint_diff_f08ts.F90
@@ -0,0 +1,14 @@
+! -*- Mode: Fortran; -*-
+!
+! (C) 2014 by Argonne National Laboratory.
+! See COPYRIGHT in top-level directory.
+!
+function MPIX_Aint_diff_f08(addr1, addr2) result(res)
+ use :: mpi_f08_compile_constants, only : MPI_ADDRESS_KIND
+ use :: mpi_c_interface_nobuf, only : MPIR_Aint_diff_c
+ implicit none
+ integer(MPI_ADDRESS_KIND), intent(in) :: addr1, addr2
+ integer(MPI_ADDRESS_KIND) :: res
+
+ res = MPIR_Aint_diff_c(addr1, addr2)
+end function MPIX_Aint_diff_f08
http://git.mpich.org/mpich.git/commitdiff/5c6023830533660877d58ef57d0a9cfbf…
commit 5c6023830533660877d58ef57d0a9cfbfb7a4722
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Mon Oct 27 14:11:27 2014 -0500
Add F77/90 bindings for MPI_Aint_add/diff
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/binding/fortran/mpif_h/buildiface b/src/binding/fortran/mpif_h/buildiface
index 5498459..f6803fe 100755
--- a/src/binding/fortran/mpif_h/buildiface
+++ b/src/binding/fortran/mpif_h/buildiface
@@ -364,6 +364,7 @@ foreach $_ (@ARGV) {
#
# The Type_create_f90_xxx routines are only available as part of the
# extended Fortran support, and are excluded from the f77 routines.
+# Aint_add/diff do not have the ierror argument
%special_routines = ( 'Init' => 1, 'Init_thread' => 1, 'Pcontrol' => '1',
'Address' => 1, 'Get_address' => 1,
'Keyval_create' => 1, 'Status_f2c' => 1,
@@ -371,6 +372,8 @@ foreach $_ (@ARGV) {
'Type_create_f90_integer' => 1,
'Type_create_f90_real' => 1,
'Type_create_f90_complex' => 1,
+ 'Aint_add' => 1,
+ 'Aint_diff' => 1,
);
# Some routines have special needs and must call a different routine. For
@@ -4340,6 +4343,55 @@ sub build_specials {
}
$returnType = "void";
+ # MPIX_Aint_add/diff do not have the ierror argument.
+ $OUTFD = "AINTADD";
+ $filename = "aint_addf.c";
+ open( $OUTFD, ">$filename.new" ) || die "Cannot open $filename.new\n";
+ $files[$#files+1] = $filename;
+ $returnType = "MPI_Aint";
+ &set_weak_decl( "MPIX_Aint_add", "MPI_Aint *, MPI_Aint *", "MPI_Aint" );
+ &set_weak_decl( "PMPIX_Aint_add", "MPI_Aint *, MPI_Aint *", "MPI_Aint" );
+ &print_header( "mpix_", "MPIX_Aint_add", "aint_add", "MPI_Aint *, MPI_Aint *");
+ &print_routine_type_decl( $OUTFD, "mpix_", "aint_add" );
+ print $OUTFD "(MPI_Aint *base, MPI_Aint *disp)\n";
+ print $OUTFD "{\n";
+ print $OUTFD " return MPIX_Aint_add(*base, *disp);\n";
+ print $OUTFD "}\n";
+ close ($OUTFD);
+ &ReplaceIfDifferent( $filename, $filename . ".new" );
+ if ($build_prototypes) {
+ print PROTOFD "extern ";
+ &print_routine_type_decl( PROTOFD, "mpix_", "aint_add" );
+ print PROTOFD "( MPI_Aint *, MPI_Aint * )";
+ &print_attr( PROTOFD, "mpix_"."aint_add_" );
+ print PROTOFD ";\n";
+ }
+ $returnType = "void";
+
+ $OUTFD = "AINTDIFF";
+ $filename = "aint_difff.c";
+ open( $OUTFD, ">$filename.new" ) || die "Cannot open $filename.new\n";
+ $files[$#files+1] = $filename;
+ $returnType = "MPI_Aint";
+ &set_weak_decl( "MPIX_Aint_diff", "MPI_Aint *, MPI_Aint *", "MPI_Aint" );
+ &set_weak_decl( "PMPIX_Aint_diff", "MPI_Aint *, MPI_Aint *", "MPI_Aint" );
+ &print_header( "mpix_", "MPIX_Aint_diff", "aint_diff", "MPI_Aint *, MPI_Aint *");
+ &print_routine_type_decl( $OUTFD, "mpix_", "aint_diff" );
+ print $OUTFD "(MPI_Aint *addr1, MPI_Aint *addr2)\n";
+ print $OUTFD "{\n";
+ print $OUTFD " return MPIX_Aint_diff(*addr1, *addr2);\n";
+ print $OUTFD "}\n";
+ close ($OUTFD);
+ &ReplaceIfDifferent( $filename, $filename . ".new" );
+ if ($build_prototypes) {
+ print PROTOFD "extern ";
+ &print_routine_type_decl( PROTOFD, "mpix_", "aint_diff" );
+ print PROTOFD "( MPI_Aint *, MPI_Aint * )";
+ &print_attr( PROTOFD, "mpix_"."aint_diff_" );
+ print PROTOFD ";\n";
+ }
+ $returnType = "void";
+
$OUTFD = "KEYVALCREATEF";
$filename = "keyval_createf.c";
open ($OUTFD, ">$filename.new" ) || die "Cannot open $filename.new\n";
http://git.mpich.org/mpich.git/commitdiff/6e9fcbf1d9196c4d3c36ced5e6e857b7f…
commit 6e9fcbf1d9196c4d3c36ced5e6e857b7fcac5082
Author: Junchao Zhang <jczhang(a)mcs.anl.gov>
Date: Mon Oct 27 11:00:38 2014 -0500
Add MPI_Aint arithmetic MPI_Aint_add/diff
These two functions will be included in MPI-3.1 and hence are implemented as MPIX.
See more about this MPI-Forum ticket at https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/349
Fixes #2134, #2136
Signed-off-by: Pavan Balaji <balaji(a)anl.gov>
diff --git a/src/include/mpi.h.in b/src/include/mpi.h.in
index 33e1181..b2963d1 100644
--- a/src/include/mpi.h.in
+++ b/src/include/mpi.h.in
@@ -1541,6 +1541,9 @@ int MPIX_Comm_revoke(MPI_Comm comm);
int MPIX_Comm_shrink(MPI_Comm comm, MPI_Comm *newcomm);
int MPIX_Comm_agree(MPI_Comm comm, int *flag);
+/* MPI_Aint addressing arithmetic */
+MPI_Aint MPIX_Aint_add(MPI_Aint base, MPI_Aint disp);
+MPI_Aint MPIX_Aint_diff(MPI_Aint addr1, MPI_Aint addr2);
/* End Prototypes */
#endif /* MPICH_SUPPRESS_PROTOTYPES */
@@ -2181,6 +2184,9 @@ int PMPIX_Comm_revoke(MPI_Comm comm);
int PMPIX_Comm_shrink(MPI_Comm comm, MPI_Comm *newcomm);
int PMPIX_Comm_agree(MPI_Comm comm, int *flag);
+/* MPI_Aint addressing arithmetic */
+MPI_Aint PMPIX_Aint_add(MPI_Aint base, MPI_Aint disp);
+MPI_Aint PMPIX_Aint_diff(MPI_Aint addr1, MPI_Aint addr2);
#endif /* MPI_BUILD_PROFILING */
/* End of MPI bindings */
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 99918ad..40389f5 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3393,6 +3393,30 @@ int MPID_Cancel_send(MPID_Request *);
@*/
int MPID_Cancel_recv(MPID_Request *);
+/*@
+ MPID_Aint_add - Returns the sum of base and disp
+
+ Input Parameters:
++ base - base address (integer)
+- disp - displacement (integer)
+
+ Return value:
+ Sum of the base and disp argument
+ @*/
+MPI_Aint MPID_Aint_add(MPI_Aint base, MPI_Aint disp);
+
+/*@
+ MPID_Aint_diff - Returns the difference between addr1 and addr2
+
+ Input Parameters:
++ addr1 - minuend address (integer)
+- addr2 - subtrahend address (integer)
+
+ Return value:
+ Difference between addr1 and addr2
+ @*/
+MPI_Aint MPID_Aint_diff(MPI_Aint addr1, MPI_Aint addr2);
+
/* MPI-2 RMA Routines */
int MPID_Win_create(void *, MPI_Aint, int, MPID_Info *, MPID_Comm *,
diff --git a/src/mpi/misc/Makefile.mk b/src/mpi/misc/Makefile.mk
index b5528a8..7ce8e9d 100644
--- a/src/mpi/misc/Makefile.mk
+++ b/src/mpi/misc/Makefile.mk
@@ -9,4 +9,6 @@ mpi_sources += \
src/mpi/misc/getpname.c \
src/mpi/misc/pcontrol.c \
src/mpi/misc/version.c \
- src/mpi/misc/library_version.c
+ src/mpi/misc/library_version.c \
+ src/mpi/misc/aint_add.c \
+ src/mpi/misc/aint_diff.c
diff --git a/src/mpi/misc/aint_add.c b/src/mpi/misc/aint_add.c
new file mode 100644
index 0000000..bcc8c82
--- /dev/null
+++ b/src/mpi/misc/aint_add.c
@@ -0,0 +1,68 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2014 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#include "mpiimpl.h"
+
+/* -- Begin Profiling Symbol Block for routine MPIX_Aint_add */
+#if defined(HAVE_PRAGMA_WEAK)
+#pragma weak MPIX_Aint_add = PMPIX_Aint_add
+#elif defined(HAVE_PRAGMA_HP_SEC_DEF)
+#pragma _HP_SECONDARY_DEF PMPIX_Aint_add MPIX_Aint_add
+#elif defined(HAVE_PRAGMA_CRI_DUP)
+#pragma _CRI duplicate MPIX_Aint_add as PMPIX_Aint_add
+#elif defined(HAVE_WEAK_ATTRIBUTE)
+MPI_Aint MPIX_Aint_add(MPI_Aint base, MPI_Aint disp) __attribute__((weak,alias("PMPIX_Aint_add")));
+#endif
+/* -- End Profiling Symbol Block */
+
+/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build
+ the MPI routines */
+#ifndef MPICH_MPI_FROM_PMPI
+#undef MPIX_Aint_add
+#define MPIX_Aint_add PMPIX_Aint_add
+
+#endif
+
+#undef FUNCNAME
+#define FUNCNAME MPIX_Aint_add
+
+/*@
+MPIX_Aint_add - Returns the sum of base and disp
+
+Input Parameters:
++ base - base address (integer)
+- disp - displacement (integer)
+
+Return value:
+Sum of the base and disp argument
+
+Notes:
+MPIX_Aint_Add produces a new MPI_Aint value that is equivalent to the sum of the
+base and disp arguments, where base represents a base address returned by a call
+to MPI_GET_ADDRESS and disp represents a signed integer displacement. The resulting
+address is valid only at the process that generated base, and it must correspond
+to a location in the same object referenced by base. The addition is performed in
+a manner that results in the correct MPI_Aint representation of the output address,
+as if the process that originally produced base had called:
+ MPI_Get_address((char *) base + disp, &result)
+
+.seealso: MPIX_Aint_diff
+@*/
+
+MPI_Aint MPIX_Aint_add(MPI_Aint base, MPI_Aint disp)
+{
+ MPI_Aint result;
+ MPID_MPI_STATE_DECL(MPID_STATE_MPIX_AINT_ADD);
+
+ MPIR_ERRTEST_INITIALIZED_ORDIE();
+
+ MPID_MPI_FUNC_ENTER(MPID_STATE_MPIX_AINT_ADD);
+ result = MPID_Aint_add(base, disp);
+ MPID_MPI_FUNC_EXIT(MPID_STATE_MPIX_AINT_ADD);
+
+ return result;
+}
diff --git a/src/mpi/misc/aint_diff.c b/src/mpi/misc/aint_diff.c
new file mode 100644
index 0000000..5c2e5cd
--- /dev/null
+++ b/src/mpi/misc/aint_diff.c
@@ -0,0 +1,69 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2014 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#include "mpiimpl.h"
+
+/* -- Begin Profiling Symbol Block for routine MPIX_Aint_diff */
+#if defined(HAVE_PRAGMA_WEAK)
+#pragma weak MPIX_Aint_diff = PMPIX_Aint_diff
+#elif defined(HAVE_PRAGMA_HP_SEC_DEF)
+#pragma _HP_SECONDARY_DEF PMPIX_Aint_diff MPIX_Aint_diff
+#elif defined(HAVE_PRAGMA_CRI_DUP)
+#pragma _CRI duplicate MPIX_Aint_diff as PMPIX_Aint_diff
+#elif defined(HAVE_WEAK_ATTRIBUTE)
+MPI_Aint MPIX_Aint_diff(MPI_Aint addr1, MPI_Aint addr2) __attribute__((weak,alias("PMPIX_Aint_diff")));
+#endif
+/* -- End Profiling Symbol Block */
+
+/* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build
+ the MPI routines */
+#ifndef MPICH_MPI_FROM_PMPI
+#undef MPIX_Aint_diff
+#define MPIX_Aint_diff PMPIX_Aint_diff
+
+#endif
+
+#undef FUNCNAME
+#define FUNCNAME MPIX_Aint_diff
+
+/*@
+MPIX_Aint_diff - Returns the difference between addr1 and addr2
+
+Input Parameters:
++ addr1 - minuend address (integer)
+- addr2 - subtrahend address (integer)
+
+Return value:
+Difference between addr1 and addr2
+
+Notes:
+MPIX_Aint_diff produces a new MPI_Aint value that is equivalent to the difference
+between addr1 and addr2 arguments, where addr1 and addr2 represent addresses
+returned by calls to MPI_GET_ADDRESS. The resulting address is valid only at the
+process that generated addr1 and addr2, and addr1 and addr2 must correspond to
+locations in the same object in the same process. The difference is calculated
+in a manner that results the signed difference from addr1 to addr2, as if the
+process that originally produced the addresses had called
+ (char *) addr1 - (char *) addr2
+on the addresses initially passed to MPI_GET_ADDRESS.
+
+.seealso: MPIX_Aint_add
+@*/
+
+MPI_Aint MPIX_Aint_diff(MPI_Aint addr1, MPI_Aint addr2)
+{
+ MPI_Aint result;
+ MPID_MPI_STATE_DECL(MPID_STATE_MPIX_AINT_DIFF);
+
+ MPIR_ERRTEST_INITIALIZED_ORDIE();
+
+ MPID_MPI_FUNC_ENTER(MPID_STATE_MPIX_AINT_DIFF);
+ result = MPID_Aint_diff(addr1, addr2);
+ MPID_MPI_FUNC_EXIT(MPID_STATE_MPIX_AINT_DIFF);
+
+ return result;
+}
diff --git a/src/mpid/ch3/src/Makefile.mk b/src/mpid/ch3/src/Makefile.mk
index c121985..970535b 100644
--- a/src/mpid/ch3/src/Makefile.mk
+++ b/src/mpid/ch3/src/Makefile.mk
@@ -59,6 +59,7 @@ mpi_core_sources += \
src/mpid/ch3/src/mpid_vc.c \
src/mpid/ch3/src/mpid_rma.c \
src/mpid/ch3/src/mpidi_rma.c \
+ src/mpid/ch3/src/mpid_aint.c \
src/mpid/ch3/src/mpidi_isend_self.c \
src/mpid/ch3/src/mpidi_pg.c \
src/mpid/ch3/src/mpidi_printf.c
diff --git a/src/mpid/ch3/src/mpid_aint.c b/src/mpid/ch3/src/mpid_aint.c
new file mode 100644
index 0000000..ca4c00b
--- /dev/null
+++ b/src/mpid/ch3/src/mpid_aint.c
@@ -0,0 +1,61 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2014 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#include "mpidimpl.h"
+
+/*
+ Input Parameters:
++ base - base address (integer)
+- disp - displacement (integer)
+
+ Return value:
+ A new MPI_Aint value that is equivalent to the sum of the base and disp
+ arguments, where base represents a base address returned by a call
+ to MPI_GET_ADDRESS and disp represents a signed integer displacement.
+*/
+#undef FUNCNAME
+#define FUNCNAME MPID_Aint_add
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+MPI_Aint MPID_Aint_add(MPI_Aint base, MPI_Aint disp)
+{
+ MPI_Aint result;
+
+ MPIDI_STATE_DECL(MPID_STATE_MPID_AINT_ADD);
+ MPIDI_FUNC_ENTER(MPID_STATE_MPID_AINT_ADD);
+
+ result = MPI_VOID_PTR_CAST_TO_MPI_AINT ((char*)MPI_AINT_CAST_TO_VOID_PTR(base) + disp);
+
+ MPIDI_FUNC_EXIT(MPID_STATE_MPID_AINT_ADD);
+ return result;
+}
+
+/*
+ Input Parameters:
++ addr1 - minuend address (integer)
+- addr2 - subtrahend address (integer)
+
+ Return value:
+ A new MPI_Aint value that is equivalent to the difference between addr1 and
+ addr2 arguments, where addr1 and addr2 represent addresses returned by calls
+ to MPI_GET_ADDRESS.
+*/
+#undef FUNCNAME
+#define FUNCNAME MPID_Aint_diff
+#undef FCNAME
+#define FCNAME MPIDI_QUOTE(FUNCNAME)
+MPI_Aint MPID_Aint_diff(MPI_Aint addr1, MPI_Aint addr2)
+{
+ MPI_Aint result;
+
+ MPIDI_STATE_DECL(MPID_STATE_MPID_AINT_DIFF);
+ MPIDI_FUNC_ENTER(MPID_STATE_MPID_AINT_DIFF);
+
+ result = MPI_PTR_DISP_CAST_TO_MPI_AINT ((char*)MPI_AINT_CAST_TO_VOID_PTR(addr1) - (char*)MPI_AINT_CAST_TO_VOID_PTR(addr2));
+
+ MPIDI_FUNC_EXIT(MPID_STATE_MPID_AINT_DIFF);
+ return result;
+}
diff --git a/src/mpid/pamid/include/mpidimpl.h b/src/mpid/pamid/include/mpidimpl.h
index 7f9e9ad..ffd1cf7 100644
--- a/src/mpid/pamid/include/mpidimpl.h
+++ b/src/mpid/pamid/include/mpidimpl.h
@@ -181,4 +181,14 @@ static inline pami_endpoint_t MPIDI_Task_to_endpoint(pami_task_t task, size_t of
int
MPIDI_Win_set_info(MPID_Win *win,
MPID_Info *info);
+
+static inline MPI_Aint MPID_Aint_add(MPI_Aint base, MPI_Aint disp)
+{
+ return MPI_VOID_PTR_CAST_TO_MPI_AINT ((char*)MPI_AINT_CAST_TO_VOID_PTR(base) + disp);
+}
+
+static inline MPI_Aint MPID_Aint_diff(MPI_Aint addr1, MPI_Aint addr2)
+{
+ return MPI_PTR_DISP_CAST_TO_MPI_AINT ((char*)MPI_AINT_CAST_TO_VOID_PTR(addr1) - (char*)MPI_AINT_CAST_TO_VOID_PTR(addr2));
+}
#endif
-----------------------------------------------------------------------
Summary of changes:
src/binding/fortran/mpif_h/buildiface | 52 ++++++++++++
.../fortran/use_mpi_f08/mpi_c_interface_nobuf.F90 | 16 ++++
src/binding/fortran/use_mpi_f08/mpi_f08.F90 | 18 ++++
.../use_mpi_f08/wrappers_f/aint_add_f08ts.F90 | 14 +++
.../use_mpi_f08/wrappers_f/aint_diff_f08ts.F90 | 14 +++
src/include/mpi.h.in | 6 ++
src/include/mpiimpl.h | 24 ++++++
src/mpi/misc/Makefile.mk | 4 +-
src/mpi/misc/aint_add.c | 68 ++++++++++++++++
src/mpi/misc/aint_diff.c | 69 ++++++++++++++++
src/mpid/ch3/src/Makefile.mk | 1 +
src/mpid/ch3/src/mpid_aint.c | 61 ++++++++++++++
src/mpid/pamid/include/mpidimpl.h | 10 +++
test/mpi/f08/rma/Makefile.am | 3 +-
test/mpi/f08/rma/aintf08.f90 | 76 +++++++++++++++++
test/mpi/f08/rma/testlist | 1 +
test/mpi/f77/rma/Makefile.am | 3 +-
test/mpi/f77/rma/aintf.f | 85 ++++++++++++++++++++
test/mpi/f77/rma/testlist | 1 +
test/mpi/rma/Makefile.am | 3 +-
test/mpi/rma/aint.c | 80 ++++++++++++++++++
test/mpi/rma/testlist.in | 1 +
22 files changed, 606 insertions(+), 4 deletions(-)
create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/aint_add_f08ts.F90
create mode 100644 src/binding/fortran/use_mpi_f08/wrappers_f/aint_diff_f08ts.F90
create mode 100644 src/mpi/misc/aint_add.c
create mode 100644 src/mpi/misc/aint_diff.c
create mode 100644 src/mpid/ch3/src/mpid_aint.c
create mode 100644 test/mpi/f08/rma/aintf08.f90
create mode 100644 test/mpi/f77/rma/aintf.f
create mode 100644 test/mpi/rma/aint.c
hooks/post-receive
--
MPICH primary repository
1
0