[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1b1-146-g0489e27
mysql vizuser
noreply at mpich.org
Tue Oct 29 20:00:00 CDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 0489e27f0dd49aa48662af99fa7c651cb23a5c87 (commit)
via 6814cb866308a6919b4699a9fdc6ad8e5a18d501 (commit)
via 66865358993027ea794e0aeadc40dbc1bf016cc5 (commit)
via 27d2a8295e2c27a4a7a7bcb55bc28b4d8fe94d9a (commit)
via 4b516e886aa3aa51379e0c3806c911c9333c2cc3 (commit)
via a214d50071c2b53b077f865922f2d9bf6ce6f89e (commit)
via fc20de53bea92d4997439c807acf3ca7f31d09f7 (commit)
via db07b81b46f186ab353482e9208dc4e5c4be05c0 (commit)
via 098844117410cecab7d9a1c2e6295541076c7376 (commit)
via 5f8c172b612112266264c8444a12ceea62393d31 (commit)
via 756f1cd656ebe029e819c9abf67c0b53fe960336 (commit)
via da9e5e5a428535b39dff43fcf9d431f0d2bd4ab1 (commit)
from 88580cc2ca27e3bc43774f4243d5ee43189d49ff (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/0489e27f0dd49aa48662af99fa7c651cb23a5c87
commit 0489e27f0dd49aa48662af99fa7c651cb23a5c87
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date: Sat Oct 26 22:33:31 2013 -0500
Fix to buildiface when Fint != int.
We were downgrading void * content to int and then upgrading it back
to an MPIR_Pint, losing bits in the process. This worked fine when
Fint was just 4 bytes, but not when Fint was 8 bytes.
Signed-off-by: William Gropp <wgropp at illinois.edu>
diff --git a/src/binding/f77/buildiface b/src/binding/f77/buildiface
index a353031..1b48294 100755
--- a/src/binding/f77/buildiface
+++ b/src/binding/f77/buildiface
@@ -2386,7 +2386,7 @@ sub addrint_in_decl {
}
sub addrint_in_arg {
my $count = $_[0];
- print $OUTFD "(void *)(MPIR_Pint)((int)*(int *)v$count)";
+ print $OUTFD "(void *)(*(MPIR_Pint *)v$count)";
}
sub attrint_ctof {
http://git.mpich.org/mpich.git/commitdiff/6814cb866308a6919b4699a9fdc6ad8e5a18d501
commit 6814cb866308a6919b4699a9fdc6ad8e5a18d501
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date: Sat Oct 26 15:19:12 2013 -0500
Bug fix for MPI_WEIGHTS_EMPTY.
When freeing arrays, we were not checking for the case where the array
might be set to MPI_WEIGHTS_EMPTY.
Signed-off-by: William Gropp <wgropp at illinois.edu>
diff --git a/src/binding/f77/buildiface b/src/binding/f77/buildiface
index a3cb65c..a353031 100755
--- a/src/binding/f77/buildiface
+++ b/src/binding/f77/buildiface
@@ -1841,7 +1841,7 @@ sub unweighted_in_ftoc {
for (li=0; li<$Array_size; li++) l$count\[li\] = (int)v$count\[li\];
}
EOT
- $clean_up .= " if (l$count != MPI_UNWEIGHTED) {$free(l$count);}\n";
+ $clean_up .= " if (l$count != MPI_UNWEIGHTED && l$count != MPI_WEIGHTS_EMPTY) {$free(l$count);}\n";
}
else {
print $OUTFD " if (v$count == MPIR_F_MPI_UNWEIGHTED) v$count = MPI_UNWEIGHTED;\n";
http://git.mpich.org/mpich.git/commitdiff/66865358993027ea794e0aeadc40dbc1bf016cc5
commit 66865358993027ea794e0aeadc40dbc1bf016cc5
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date: Thu Oct 24 22:16:53 2013 -0500
Remove bogus checks for MPIF_STATUS size.
When MPI_Count was added to the status field, a bunch of bogus checks
got added into configure and MPI_Init. This patch cleans up these
checks.
Signed-off-by: William Gropp <wgropp at illinois.edu>
diff --git a/configure.ac b/configure.ac
index 1a050da..5d7bf15 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5812,22 +5812,10 @@ AC_SUBST([SIZEOF_MPI_STATUS])
if test "$enable_f77" = yes -a -z "$MPI_STATUS_SIZE" ; then
if test -n "$SIZEOF_MPI_STATUS" ; then
# compute from the C sizeof
- # Note that these *must* use the size of a Fortran INTEGER,
- # not a C int - as those two types might not be the same size.
- if test -z "$pac_cv_f77_sizeof_integer" ; then
- AC_MSG_ERROR([Sizeof Fortran INTEGER (MPI_Fint) is not available])
- fi
- AS_VAR_ARITH([MPI_STATUS_SIZE],[$SIZEOF_MPI_STATUS / $pac_cv_f77_sizeof_integer])
+ AS_VAR_ARITH([MPI_STATUS_SIZE],[$SIZEOF_MPI_STATUS / $ac_cv_sizeof_int])
if test "$MPI_STATUS_SIZE" = "0" ; then
AC_MSG_ERROR([Could not compute the size of MPI_Status])
fi
-
- # sanity: otherwise we have a problem in Fortran where we must implement
- # MPI_STATUS as an array of INTEGERs with MPI_STATUS_SIZE elements
- AS_VAR_ARITH([status_int_rem],[$SIZEOF_MPI_STATUS '%' $ac_cv_sizeof_int])
- AS_IF([test "$status_int_rem" -gt 0],
- [AC_MSG_ERROR([status size does not divide evenly by the integer size])])
- AS_UNSET([status_int_rem])
else
AC_MSG_ERROR([MPI_STATUS_SIZE was not defined!])
fi
diff --git a/src/mpi/init/initthread.c b/src/mpi/init/initthread.c
index cd9f159..74a0033 100644
--- a/src/mpi/init/initthread.c
+++ b/src/mpi/init/initthread.c
@@ -439,11 +439,6 @@ int MPIR_Init_thread(int * argc, char ***argv, int required, int * provided)
/* Assert: tag_ub is at least the minimum asked for in the MPI spec */
MPIU_Assert( MPIR_Process.attrs.tag_ub >= 32767 );
- /* very nasty bugs will occur if this does not hold */
-#if defined(HAVE_FORTRAN_BINDING)
- MPIU_Assert(sizeof(MPI_Status) == MPIF_STATUS_SIZE*sizeof(MPI_Fint));
-#endif
-
/* Capture the level of thread support provided */
MPIR_ThreadInfo.thread_provided = thread_provided;
if (provided) *provided = thread_provided;
http://git.mpich.org/mpich.git/commitdiff/27d2a8295e2c27a4a7a7bcb55bc28b4d8fe94d9a
commit 27d2a8295e2c27a4a7a7bcb55bc28b4d8fe94d9a
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date: Sun Oct 13 14:23:38 2013 -0500
Fortran updates for MPI_Status.
An initial version of this patch was provided by Intel.
Signed-off-by: William Gropp <wgropp at illinois.edu>
diff --git a/src/binding/f77/buildiface b/src/binding/f77/buildiface
index f1e9b50..a3cb65c 100755
--- a/src/binding/f77/buildiface
+++ b/src/binding/f77/buildiface
@@ -2503,7 +2503,7 @@ sub status_out_fnulltoc {
if ($within_fint) {
print $OUTFD "\
if (v$count == MPI_F_STATUS_IGNORE) { l$count = MPI_STATUS_IGNORE; }
- else { l$count->MPI_ERROR = (int)(v$count\[2\]); }\n";
+ else { l$count->MPI_ERROR = (int)(v$count\[4\]); }\n";
}
else {
print $OUTFD "\
@@ -3775,7 +3775,7 @@ if ($write_mpif) {
# FIXME: The offsets for the status elements are hardwired. If they
# change in mpi.h.in, they need to change here as well.
print MPIFFD " INTEGER MPI_SOURCE, MPI_TAG, MPI_ERROR\n";
- print MPIFFD " PARAMETER (MPI_SOURCE=1,MPI_TAG=2,MPI_ERROR=3)\n";
+ print MPIFFD " PARAMETER (MPI_SOURCE=3,MPI_TAG=4,MPI_ERROR=5)\n";
print MPIFFD " INTEGER MPI_STATUS_SIZE\n";
print MPIFFD " PARAMETER (MPI_STATUS_SIZE=\@MPI_STATUS_SIZE\@)\n";
# Temporary until configure handles these. Define as arrays to keep
@@ -4582,11 +4582,11 @@ print $OUTFD "\
#ifdef HAVE_FINT_IS_INT
*c_status = *(MPI_Status *) f_status;
#else
- c_status->MPI_SOURCE = (int)f_status\[0\];
- c_status->MPI_TAG = (int)f_status\[1\];
- c_status->MPI_ERROR = (int)f_status\[2\];
- c_status->count = *(MPI_Count *)(f_status+3);
- c_status->cancelled = (int)f_status\[3+(sizeof(MPI_Count)+sizeof(MPI_Fint)-1)/sizeof(MPI_Fint)\];
+ c_status->count_lo = (int)f_status\[0\];
+ c_status->count_hi_and_cancelled = (int)f_status\[1\];
+ c_status->MPI_SOURCE = (int)f_status\[2\];
+ c_status->MPI_TAG = (int)f_status\[3\];
+ c_status->MPI_ERROR = (int)f_status\[4\];
/* no need to copy abi_slush_fund field */
#endif\n";
}
@@ -4656,11 +4656,11 @@ int MPI_Status_c2f( const MPI_Status *c_status, MPI_Fint *f_status )
#ifdef HAVE_FINT_IS_INT
*(MPI_Status *)f_status = *c_status;
#else
- f_status\[0\] = (MPI_Fint)c_status->MPI_SOURCE;
- f_status\[1\] = (MPI_Fint)c_status->MPI_TAG;
- f_status\[2\] = (MPI_Fint)c_status->MPI_ERROR;
- *(MPI_Count*)(f_status+3) = c_status->count;
- f_status\[3+(sizeof(MPI_Count)+sizeof(MPI_Fint)-1)/sizeof(MPI_Fint)\] = (MPI_Fint)c_status->cancelled;
+ f_status\[0\] = (MPI_Fint)c_status->count_lo;
+ f_status\[1\] = (MPI_Fint)c_status->count_hi_and_cancelled;
+ f_status\[2\] = (MPI_Fint)c_status->MPI_SOURCE;
+ f_status\[3\] = (MPI_Fint)c_status->MPI_TAG;
+ f_status\[4\] = (MPI_Fint)c_status->MPI_ERROR;
#endif\n";
}
else {
diff --git a/src/binding/f90/buildiface b/src/binding/f90/buildiface
index 038c6a4..8965956 100755
--- a/src/binding/f90/buildiface
+++ b/src/binding/f90/buildiface
@@ -650,11 +650,8 @@ print MPIFD <<EOT;
TYPE$BINDACCESS :: MPI_Status
$BINDDEF
INTEGER$PUBLICVAR :: MPI_SOURCE, MPI_TAG, MPI_ERROR
- \@FC_STATUS_PAD1\@
- INTEGER$PRIVATEVAR(KIND=MPI_COUNT_KIND) :: count
- INTEGER$PRIVATEVAR :: cancelled
- INTEGER$PRIVATEVAR(2) :: abi_slush_fund
- \@FC_STATUS_PAD2\@
+ INTEGER$PRIVATEVAR :: count_lo
+ INTEGER$PRIVATEVAR :: count_hi_and_cancelled
END TYPE MPI_Status
EOT
http://git.mpich.org/mpich.git/commitdiff/4b516e886aa3aa51379e0c3806c911c9333c2cc3
commit 4b516e886aa3aa51379e0c3806c911c9333c2cc3
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date: Sun Sep 22 22:55:46 2013 -0500
MPI_Status updates for ABI.
Based on an Intel contributed patch. The idea is to use the bits from
the cancelled field to extend the count, rather than increasing the
count datatype itself.
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
Fixes to the bit manipulation based on feedback from Artem Yalozo @
Intel.
Fixes to the naming convention based on feedback from Bill Gropp.
Signed-off-by: William Gropp <wgropp at illinois.edu>
diff --git a/configure.ac b/configure.ac
index 6d6af8e..1a050da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,8 +46,6 @@ dnl MPID_NO_PM - If yes, the device does not require any
dnl PM implementation.
dnl MPID_NO_PMI - If yes, the device does not require any
dnl PMI implementation.
-dnl EXTRA_STATUS_DECL - Any extra declarations that the device
-dnl needs added to the definition of MPI_Status.
dnl MPID_MAX_PROCESSOR_NAME - The maximum number of character in a processor
dnl name. If not set, 128 will be used.
dnl MPID_MAX_ERROR_STRING - The maximum number of character in an error
@@ -5777,8 +5775,6 @@ AC_SUBST([MPI_F77_COUNT])
#
# The size of MPI_Status is needed for the Fortran interface.
-# This is not quite right unless the device prereq macro, expanded above,
-# sets the EXTRA_STATUS_DECL that will be used in defining a status.
#
# WARNING!!! this is a spot where we duplicate code from mpi.h.in and it *must*
# be kept in sync in order to make a proper computation
@@ -5789,13 +5785,11 @@ dnl the array subscripting below
rm -f pac_mpi_status.h
cat > pac_mpi_status.h <<_EOF
typedef struct {
+ int count_lo;
+ int count_hi_and_cancelled;
int MPI_SOURCE;
int MPI_TAG;
int MPI_ERROR;
- $MPI_COUNT count;
- int cancelled;
- int abi_slush_fund[2];
- $EXTRA_STATUS_DECL
} MPI_Status;
_EOF
]
@@ -5865,10 +5859,6 @@ fi
# ----------------------------------------------------------------------------
-dnl Extra status information, from device subsystem, to be included in the
-dnl declaration of MPI_Status in mpi.h.in
-AC_SUBST(EXTRA_STATUS_DECL)
-
dnl FIXME XXX DJG does this need to actually be conditional on something?
dnl previously it was conditional on the successful execution of
dnl "src/binding/f90/configure" but that would only fail if FC couldn't be
diff --git a/src/binding/f90/buildiface b/src/binding/f90/buildiface
index 7ae05be..038c6a4 100755
--- a/src/binding/f90/buildiface
+++ b/src/binding/f90/buildiface
@@ -612,8 +612,6 @@ print MPIFD "! -*- Mode: Fortran; -*-
INCLUDE 'mpifnoext.h'\n";
# MPI-3 Requires that even the MPI module (not just mpi_f08) include
# the MPI_Status type, as well as handle types
-# WARNING: If there is and "EXTRA_STATUS_DECL", this declaration is
-# erroneous
# WARNING: INTEGER is incorrect; it should be INTEGER(C_INT) if this
# is to be used directly by a C routine. That may also require using
# USE ISO_C_BINDING, ONLY :: C_INT
diff --git a/src/include/mpi.h.in b/src/include/mpi.h.in
index 6ccd9d8..1b9ad19 100644
--- a/src/include/mpi.h.in
+++ b/src/include/mpi.h.in
@@ -559,13 +559,11 @@ static const MPI_Datatype mpich_mpi_offset MPICH_ATTR_TYPE_TAG(MPI_Offset) = MPI
/* The order of these elements must match that in mpif.h */
typedef struct MPI_Status {
+ int count_lo;
+ int count_hi_and_cancelled;
int MPI_SOURCE;
int MPI_TAG;
int MPI_ERROR;
- MPI_Count count;
- int cancelled;
- int abi_slush_fund[2];
- @EXTRA_STATUS_DECL@
} MPI_Status;
/* types for the MPI_T_ interface */
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index d06f492..4eb398d 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -2298,29 +2298,63 @@ void MPIR_Err_print_stack(FILE *, int);
src/mpi/pt2pt? */
/* ------------------------------------------------------------------------- */
+
+/* MPI_Status manipulation macros */
+#define MPIR_BITS_IN_INT (8 * SIZEOF_INT)
+
+/* We use bits from the "count_lo" and "count_hi_and_cancelled" fields
+ * to represent the 'count' and 'cancelled' objects. The LSB of the
+ * "count_hi_and_cancelled" field represents the 'cancelled' object.
+ * The 'count' object is split between the "count_lo" and
+ * "count_hi_and_cancelled" fields, with the lower order bits going
+ * into the "count_lo" field, and the higher order bits goin into the
+ * "count_hi_and_cancelled" field. This gives us 2N-1 bits for the
+ * 'count' object, where N is the size of int. However, the value
+ * returned to the user is bounded by the definition on MPI_Count. */
+/* NOTE: The below code assumes that the count value is never
+ * negative. For negative values, right-shifting can have weird
+ * implementation specific consequences. */
+#define MPIR_STATUS_SET_COUNT(status_, count_) \
+ { \
+ (status_).count_lo = ((int) count_); \
+ (status_).count_hi_and_cancelled &= 1; \
+ (status_).count_hi_and_cancelled |= (int) ((MPI_Count) count_ >> MPIR_BITS_IN_INT << 1); \
+ }
+
+#define MPIR_STATUS_GET_COUNT(status_) \
+ ((MPI_Count) ((((MPI_Count) (status_).count_hi_and_cancelled) >> 1 << MPIR_BITS_IN_INT) + (status_).count_lo))
+
+#define MPIR_STATUS_SET_CANCEL_BIT(status_, cancelled_) \
+ { \
+ (status_).count_hi_and_cancelled &= ~1; \
+ (status_).count_hi_and_cancelled |= cancelled_; \
+ }
+
+#define MPIR_STATUS_GET_CANCEL_BIT(status_) ((status_).count_hi_and_cancelled & 1)
+
/* Do not set MPI_ERROR (only set if ERR_IN_STATUS is returned */
-#define MPIR_Status_set_empty(status_) \
-{ \
- if ((status_) != MPI_STATUS_IGNORE) \
- { \
- (status_)->MPI_SOURCE = MPI_ANY_SOURCE; \
- (status_)->MPI_TAG = MPI_ANY_TAG; \
- (status_)->count = 0; \
- (status_)->cancelled = FALSE; \
- } \
-}
+#define MPIR_Status_set_empty(status_) \
+ { \
+ if ((status_) != MPI_STATUS_IGNORE) \
+ { \
+ (status_)->MPI_SOURCE = MPI_ANY_SOURCE; \
+ (status_)->MPI_TAG = MPI_ANY_TAG; \
+ MPIR_STATUS_SET_COUNT(*(status_), 0); \
+ MPIR_STATUS_SET_CANCEL_BIT(*(status_), FALSE); \
+ } \
+ }
/* See MPI 1.1, section 3.11, Null Processes */
/* Do not set MPI_ERROR (only set if ERR_IN_STATUS is returned */
-#define MPIR_Status_set_procnull(status_) \
-{ \
- if ((status_) != MPI_STATUS_IGNORE) \
- { \
- (status_)->MPI_SOURCE = MPI_PROC_NULL; \
- (status_)->MPI_TAG = MPI_ANY_TAG; \
- (status_)->count = 0; \
- (status_)->cancelled = FALSE; \
- } \
-}
+#define MPIR_Status_set_procnull(status_) \
+ { \
+ if ((status_) != MPI_STATUS_IGNORE) \
+ { \
+ (status_)->MPI_SOURCE = MPI_PROC_NULL; \
+ (status_)->MPI_TAG = MPI_ANY_TAG; \
+ MPIR_STATUS_SET_COUNT(*(status_), 0); \
+ MPIR_STATUS_SET_CANCEL_BIT(*(status_), FALSE); \
+ } \
+ }
#define MPIR_Request_extract_status(request_ptr_, status_) \
{ \
@@ -4241,7 +4275,7 @@ int MPIU_Get_intranode_rank(MPID_Comm *comm_ptr, int r);
#define MPIR_Comm_size(comm_ptr) ((comm_ptr)->local_size)
#define MPIR_Type_extent_impl(datatype, extent_ptr) MPID_Datatype_get_extent_macro(datatype, *(extent_ptr))
#define MPIR_Type_size_impl(datatype, size) MPID_Datatype_get_size_macro(datatype, *(size))
-#define MPIR_Test_cancelled_impl(status, flag) *(flag) = (status)->cancelled
+#define MPIR_Test_cancelled_impl(status, flag) *(flag) = MPIR_STATUS_GET_CANCEL_BIT(*(status))
/* MPIR_ functions. These are versions of MPI_ functions appropriate for calling within MPI */
int MPIR_Cancel_impl(MPID_Request *request_ptr);
diff --git a/src/mpi/datatype/get_count.c b/src/mpi/datatype/get_count.c
index c6c4167..130f7ac 100644
--- a/src/mpi/datatype/get_count.c
+++ b/src/mpi/datatype/get_count.c
@@ -31,15 +31,15 @@ void MPIR_Get_count_impl(const MPI_Status *status, MPI_Datatype datatype, int *c
MPI_Count size;
MPID_Datatype_get_size_macro(datatype, size);
- MPIU_Assert(size >= 0 && status->count >= 0);
+ MPIU_Assert(size >= 0 && MPIR_STATUS_GET_COUNT(*status) >= 0);
if (size != 0) {
/* MPI-3 says return MPI_UNDEFINED if too large for an int */
- if ((status->count % size) != 0 || ((status->count / size) > INT_MAX))
+ if ((MPIR_STATUS_GET_COUNT(*status) % size) != 0 || ((MPIR_STATUS_GET_COUNT(*status) / size) > INT_MAX))
(*count) = MPI_UNDEFINED;
else
- (*count) = (int)(status->count / size);
+ (*count) = (int)(MPIR_STATUS_GET_COUNT(*status) / size);
} else {
- if (status->count > 0) {
+ if (MPIR_STATUS_GET_COUNT(*status) > 0) {
/* --BEGIN ERROR HANDLING-- */
/* case where datatype size is 0 and count is > 0 should
diff --git a/src/mpi/datatype/get_elements_x.c b/src/mpi/datatype/get_elements_x.c
index a511452..df4be1f 100644
--- a/src/mpi/datatype/get_elements_x.c
+++ b/src/mpi/datatype/get_elements_x.c
@@ -297,7 +297,7 @@ int MPIR_Get_elements_x_impl(const MPI_Status *status, MPI_Datatype datatype, MP
if (HANDLE_GET_KIND(datatype) == HANDLE_KIND_BUILTIN ||
(datatype_ptr->element_size != -1 && datatype_ptr->size > 0))
{
- byte_count = status->count;
+ byte_count = MPIR_STATUS_GET_COUNT(*status);
/* QUESTION: WHAT IF SOMEONE GAVE US AN MPI_UB OR MPI_LB???
*/
@@ -324,7 +324,7 @@ int MPIR_Get_elements_x_impl(const MPI_Status *status, MPI_Datatype datatype, MP
MPIU_Assert(byte_count >= 0);
}
else if (datatype_ptr->size == 0) {
- if (status->count > 0) {
+ if (MPIR_STATUS_GET_COUNT(*status) > 0) {
/* --BEGIN ERROR HANDLING-- */
/* datatype size of zero and count > 0 should never happen. */
@@ -343,7 +343,7 @@ int MPIR_Get_elements_x_impl(const MPI_Status *status, MPI_Datatype datatype, MP
else /* derived type with weird element type or weird size */ {
MPIU_Assert(datatype_ptr->element_size == -1);
- byte_count = status->count;
+ byte_count = MPIR_STATUS_GET_COUNT(*status);
*elements = MPIR_Type_get_elements(&byte_count, -1, datatype);
}
diff --git a/src/mpi/datatype/status_set_elements_x.c b/src/mpi/datatype/status_set_elements_x.c
index 5936060..7e9082c 100644
--- a/src/mpi/datatype/status_set_elements_x.c
+++ b/src/mpi/datatype/status_set_elements_x.c
@@ -41,7 +41,7 @@ int MPIR_Status_set_elements_x_impl(MPI_Status *status, MPI_Datatype datatype, M
MPIU_Assert(size_x < MPIR_COUNT_MAX / count);
}
- status->count = size_x * count;
+ MPIR_STATUS_SET_COUNT(*status, size_x * count);
fn_exit:
return mpi_errno;
diff --git a/src/mpi/pt2pt/ibsend.c b/src/mpi/pt2pt/ibsend.c
index 4b35e55..3c92016 100644
--- a/src/mpi/pt2pt/ibsend.c
+++ b/src/mpi/pt2pt/ibsend.c
@@ -36,7 +36,7 @@ PMPI_LOCAL int MPIR_Ibsend_cancel( void *extra, int complete );
PMPI_LOCAL int MPIR_Ibsend_query( void *extra, MPI_Status *status )
{
ibsend_req_info *ibsend_info = (ibsend_req_info *)extra;
- status->cancelled = ibsend_info->cancelled;
+ MPIR_STATUS_SET_CANCEL_BIT(*status, ibsend_info->cancelled);
return MPI_SUCCESS;
}
PMPI_LOCAL int MPIR_Ibsend_free( void *extra )
diff --git a/src/mpi/pt2pt/mpir_request.c b/src/mpi/pt2pt/mpir_request.c
index 1518417..0a195ce 100644
--- a/src/mpi/pt2pt/mpir_request.c
+++ b/src/mpi/pt2pt/mpir_request.c
@@ -70,7 +70,7 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
{
if (status != MPI_STATUS_IGNORE)
{
- status->cancelled = request_ptr->status.cancelled;
+ MPIR_STATUS_SET_CANCEL_BIT(*status, MPIR_STATUS_GET_CANCEL_BIT(request_ptr->status));
}
mpi_errno = request_ptr->status.MPI_ERROR;
/* FIXME: are Ibsend requests added to the send queue? */
@@ -103,7 +103,7 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
{
if (status != MPI_STATUS_IGNORE)
{
- status->cancelled = prequest_ptr->status.cancelled;
+ MPIR_STATUS_SET_CANCEL_BIT(*status, MPIR_STATUS_GET_CANCEL_BIT(prequest_ptr->status));
}
mpi_errno = prequest_ptr->status.MPI_ERROR;
}
@@ -119,7 +119,7 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
}
if (status != MPI_STATUS_IGNORE)
{
- status->cancelled = prequest_ptr->status.cancelled;
+ MPIR_STATUS_SET_CANCEL_BIT(*status, MPIR_STATUS_GET_CANCEL_BIT(prequest_ptr->status));
}
if (mpi_errno == MPI_SUCCESS)
{
@@ -146,7 +146,7 @@ int MPIR_Request_complete(MPI_Request * request, MPID_Request * request_ptr,
error code available */
if (status != MPI_STATUS_IGNORE)
{
- status->cancelled = FALSE;
+ MPIR_STATUS_SET_CANCEL_BIT(*status, FALSE);
}
mpi_errno = request_ptr->status.MPI_ERROR;
}
diff --git a/src/mpi/pt2pt/request_get_status.c b/src/mpi/pt2pt/request_get_status.c
index ffe2808..ef67bb2 100644
--- a/src/mpi/pt2pt/request_get_status.c
+++ b/src/mpi/pt2pt/request_get_status.c
@@ -119,7 +119,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
{
if (status != MPI_STATUS_IGNORE)
{
- status->cancelled = request_ptr->status.cancelled;
+ MPIR_STATUS_SET_CANCEL_BIT(*status, MPIR_STATUS_GET_CANCEL_BIT(request_ptr->status));
}
mpi_errno = request_ptr->status.MPI_ERROR;
break;
@@ -142,7 +142,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
{
if (status != MPI_STATUS_IGNORE)
{
- status->cancelled = request_ptr->status.cancelled;
+ MPIR_STATUS_SET_CANCEL_BIT(*status, MPIR_STATUS_GET_CANCEL_BIT(request_ptr->status));
}
mpi_errno = prequest_ptr->status.MPI_ERROR;
}
@@ -158,7 +158,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
}
if (status != MPI_STATUS_IGNORE)
{
- status->cancelled = prequest_ptr->status.cancelled;
+ MPIR_STATUS_SET_CANCEL_BIT(*status, MPIR_STATUS_GET_CANCEL_BIT(prequest_ptr->status));
}
if (mpi_errno == MPI_SUCCESS)
{
@@ -174,7 +174,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
make the error code available */
if (status != MPI_STATUS_IGNORE)
{
- status->cancelled = request_ptr->status.cancelled;
+ MPIR_STATUS_SET_CANCEL_BIT(*status, MPIR_STATUS_GET_CANCEL_BIT(request_ptr->status));
}
mpi_errno = request_ptr->status.MPI_ERROR;
}
@@ -218,7 +218,7 @@ int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status)
}
if (status != MPI_STATUS_IGNORE)
{
- status->cancelled = request_ptr->status.cancelled;
+ MPIR_STATUS_SET_CANCEL_BIT(*status, MPIR_STATUS_GET_CANCEL_BIT(request_ptr->status));
}
MPIR_Request_extract_status(request_ptr, status);
diff --git a/src/mpi/pt2pt/status_set_cancelled.c b/src/mpi/pt2pt/status_set_cancelled.c
index bfb6879..db1cae0 100644
--- a/src/mpi/pt2pt/status_set_cancelled.c
+++ b/src/mpi/pt2pt/status_set_cancelled.c
@@ -68,7 +68,7 @@ int MPI_Status_set_cancelled(MPI_Status *status, int flag)
/* ... body of routine ... */
- status->cancelled = flag ? TRUE : FALSE;
+ MPIR_STATUS_SET_CANCEL_BIT(*status, flag ? TRUE : FALSE);
/* ... end of body of routine ... */
diff --git a/src/mpi/romio/mpi-io/iotestall.c b/src/mpi/romio/mpi-io/iotestall.c
index 03a7586..d88aeb7 100644
--- a/src/mpi/romio/mpi-io/iotestall.c
+++ b/src/mpi/romio/mpi-io/iotestall.c
@@ -58,8 +58,8 @@ int MPIO_Testall(int count, MPIO_Request requests[], int *flag,
if (statuses != MPI_STATUSES_IGNORE) {
statuses[i].MPI_SOURCE = MPI_ANY_SOURCE;
statuses[i].MPI_TAG = MPI_ANY_TAG;
- statuses[i].count = 0;
- statuses[i].cancelled = 0;
+ MPIR_STATUS_SET_COUNT(statuses[i], 0);
+ MPIR_STATUS_SET_CANCEL_BIT(statuses[i], 0);
}
#else
;
diff --git a/src/mpi/romio/mpi-io/iotestany.c b/src/mpi/romio/mpi-io/iotestany.c
index 7632064..56c1a5e 100644
--- a/src/mpi/romio/mpi-io/iotestany.c
+++ b/src/mpi/romio/mpi-io/iotestany.c
@@ -55,8 +55,8 @@ int MPIO_Testany(int count, MPIO_Request requests[], int *index,
if (status != MPI_STATUS_IGNORE) {
status->MPI_SOURCE = MPI_ANY_SOURCE;
status->MPI_TAG = MPI_ANY_TAG;
- status->count = 0;
- status->cancelled = 0;
+ MPIR_STATUS_SET_COUNT(*status, 0);
+ MPIR_STATUS_SET_CANCEL_BIT(*status, 0);
}
#endif
err = MPI_SUCCESS;
diff --git a/src/mpi/romio/mpi-io/iowaitall.c b/src/mpi/romio/mpi-io/iowaitall.c
index ef22ae8..84c15cd 100644
--- a/src/mpi/romio/mpi-io/iowaitall.c
+++ b/src/mpi/romio/mpi-io/iowaitall.c
@@ -55,8 +55,8 @@ int MPIO_Waitall( int count, MPIO_Request requests[], MPI_Status statuses[] )
if (statuses != MPI_STATUSES_IGNORE) {
statuses[i].MPI_SOURCE = MPI_ANY_SOURCE;
statuses[i].MPI_TAG = MPI_ANY_TAG;
- statuses[i].count = 0;
- statuses[i].cancelled = 0;
+ MPIR_STATUS_SET_COUNT(statuses[i], 0);
+ MPIR_STATUS_SET_CANCEL_BIT(statuses[i], 0);
}
#else
;
diff --git a/src/mpi/romio/mpi-io/iowaitany.c b/src/mpi/romio/mpi-io/iowaitany.c
index 101fc57..1f4779e 100644
--- a/src/mpi/romio/mpi-io/iowaitany.c
+++ b/src/mpi/romio/mpi-io/iowaitany.c
@@ -55,8 +55,8 @@ int MPIO_Waitany(int count, MPIO_Request requests[], int *index,
if (status != MPI_STATUS_IGNORE) {
status->MPI_SOURCE = MPI_ANY_SOURCE;
status->MPI_TAG = MPI_ANY_TAG;
- status->count = 0;
- status->cancelled = 0;
+ MPIR_STATUS_SET_COUNT(*status, 0);
+ MPIR_STATUS_SET_CANCEL_BIT(*status, 0);
}
#endif
err = MPI_SUCCESS;
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mx/mx_cancel.c b/src/mpid/ch3/channels/nemesis/netmod/mx/mx_cancel.c
index 7d58be0..e183cac 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mx/mx_cancel.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mx/mx_cancel.c
@@ -46,14 +46,14 @@ int MPID_nem_mx_cancel_send(MPIDI_VC_t *vc, MPID_Request *sreq)
if (result)
{
- sreq->status.cancelled = TRUE;
+ MPIR_STATUS_SET_CANCEL_BIT(sreq->status, TRUE);
sreq->cc = 0;
MPIU_Object_set_ref(sreq, 1);
(VC_FIELD(vc,pending_sends)) -= 1;
}
else
{
- sreq->status.cancelled = FALSE;
+ MPIR_STATUS_SET_CANCEL_BIT(sreq->status, FALSE);
}
handled = TRUE;
}
@@ -111,16 +111,16 @@ int MPID_nem_mx_cancel_recv(MPIDI_VC_t *vc, MPID_Request *rreq)
if (result)
{
int found;
- rreq->status.cancelled = TRUE;
+ MPIR_STATUS_SET_CANCEL_BIT(rreq->status, TRUE);
found = MPIDI_CH3U_Recvq_DP(rreq);
MPIU_Assert(found);
- rreq->status.count = 0;
+ MPIR_STATUS_SET_COUNT(rreq->status, 0);
MPID_REQUEST_SET_COMPLETED(rreq);
MPID_Request_release(rreq);
}
else
{
- rreq->status.cancelled = FALSE;
+ MPIR_STATUS_SET_CANCEL_BIT(rreq->status, FALSE);
MPIU_DBG_MSG_P(CH3_OTHER,VERBOSE,
"request 0x%08x already matched, unable to cancel", rreq->handle);
}
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mx/mx_poll.c b/src/mpid/ch3/channels/nemesis/netmod/mx/mx_poll.c
index 78bcb22..c4f79e7 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mx/mx_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mx/mx_poll.c
@@ -560,7 +560,7 @@ MPID_nem_mx_handle_rreq(MPID_Request *req, mx_status_t status)
NEM_MX_MATCH_GET_RANK(match_info,req->status.MPI_SOURCE);
NEM_MX_MATCH_GET_TAG(match_info,req->status.MPI_TAG);
- req->status.count = status.xfer_length;
+ MPIR_STATUS_SET_COUNT(req->status, status.xfer_length);
req->dev.recv_data_sz = status.xfer_length;
MPIDI_Datatype_get_info(req->dev.user_count, req->dev.datatype, dt_contig, userbuf_sz, dt_ptr, dt_true_lb);
@@ -596,7 +596,7 @@ MPID_nem_mx_handle_rreq(MPID_Request *req, mx_status_t status)
"**truncate", "**truncate %d %d %d %d",
req->status.MPI_SOURCE, req->status.MPI_TAG,
req->dev.recv_data_sz, userbuf_sz );
- req->status.count = userbuf_sz;
+ MPIR_STATUS_SET_COUNT(req->status, userbuf_sz);
data_sz = userbuf_sz;
}
@@ -607,7 +607,7 @@ MPID_nem_mx_handle_rreq(MPID_Request *req, mx_status_t status)
MPID_Segment_unpack( req->dev.segment_ptr, 0, &last, req->dev.tmpbuf );
MPIU_Free(req->dev.tmpbuf);
if (last != data_sz) {
- req->status.count = (int)last;
+ MPIR_STATUS_SET_COUNT(req->status, (int)last);
if (req->dev.recv_data_sz <= userbuf_sz) {
MPIU_ERR_SETSIMPLE(req->status.MPI_ERROR,MPI_ERR_TYPE,"**dtypemismatch");
}
diff --git a/src/mpid/ch3/channels/nemesis/netmod/mx/mx_probe.c b/src/mpid/ch3/channels/nemesis/netmod/mx/mx_probe.c
index b8022b3..237f7e2 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/mx/mx_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/mx/mx_probe.c
@@ -43,7 +43,7 @@ int MPID_nem_mx_probe(MPIDI_VC_t *vc, int source, int tag, MPID_Comm *comm, int
NEM_MX_MATCH_GET_RANK(mx_status.match_info,status->MPI_SOURCE);
NEM_MX_MATCH_GET_TAG(mx_status.match_info,status->MPI_TAG);
- status->count = mx_status.xfer_length;
+ MPIR_STATUS_SET_COUNT(*status, mx_status.xfer_length);
fn_exit:
return mpi_errno;
@@ -89,7 +89,7 @@ int MPID_nem_mx_iprobe(MPIDI_VC_t *vc, int source, int tag, MPID_Comm *comm, in
{
NEM_MX_MATCH_GET_RANK(mx_status.match_info,status->MPI_SOURCE);
NEM_MX_MATCH_GET_TAG(mx_status.match_info,status->MPI_TAG);
- status->count = mx_status.xfer_length;
+ MPIR_STATUS_SET_COUNT(*status, mx_status.xfer_length);
*flag = TRUE;
}
else
diff --git a/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_cancel.c b/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_cancel.c
index 35d31af..7e479b9 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_cancel.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_cancel.c
@@ -26,12 +26,12 @@ int MPID_nem_newmad_cancel_send(MPIDI_VC_t *vc, MPID_Request *sreq)
if (ret == NM_ESUCCESS)
{
- sreq->status.cancelled = TRUE;
+ MPIR_STATUS_SET_CANCEL_BIT(sreq->status, TRUE);
(VC_FIELD(vc,pending_sends)) -= 1;
}
else
{
- sreq->status.cancelled = FALSE;
+ MPIR_STATUS_SET_CANCEL_BIT(sreq->status, FALSE);
}
fn_exit:
@@ -56,11 +56,11 @@ int MPID_nem_newmad_cancel_recv(MPIDI_VC_t *vc, MPID_Request *rreq)
if (ret == NM_ESUCCESS)
{
- rreq->status.cancelled = TRUE;
+ MPIR_STATUS_SET_CANCEL_BIT(rreq->status, TRUE);
}
else
{
- rreq->status.cancelled = FALSE;
+ MPIR_STATUS_SET_CANCEL_BIT(rreq->status, FALSE);
}
fn_exit:
diff --git a/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_poll.c b/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_poll.c
index b3cba3d..0346378 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_poll.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_poll.c
@@ -342,7 +342,7 @@ MPID_nem_newmad_handle_rreq(MPID_Request *req, nm_tag_t match_info, size_t size)
NEM_NMAD_MATCH_GET_RANK(match_info,req->status.MPI_SOURCE);
NEM_NMAD_MATCH_GET_TAG(match_info,req->status.MPI_TAG);
- req->status.count = size;
+ MPIR_STATUS_SET_COUNT(req->status, size);
req->dev.recv_data_sz = size;
MPIDI_Datatype_get_info(req->dev.user_count, req->dev.datatype, dt_contig, userbuf_sz, dt_ptr, dt_true_lb);
@@ -362,7 +362,7 @@ MPID_nem_newmad_handle_rreq(MPID_Request *req, nm_tag_t match_info, size_t size)
"**truncate", "**truncate %d %d %d %d",
req->status.MPI_SOURCE, req->status.MPI_TAG,
req->dev.recv_data_sz, userbuf_sz );
- req->status.count = userbuf_sz;
+ MPIR_STATUS_SET_COUNT(req->status, userbuf_sz);
data_sz = userbuf_sz;
}
@@ -373,7 +373,7 @@ MPID_nem_newmad_handle_rreq(MPID_Request *req, nm_tag_t match_info, size_t size)
MPID_Segment_unpack( req->dev.segment_ptr, 0, &last, req->dev.tmpbuf);
MPIU_Free(req->dev.tmpbuf);
if (last != data_sz) {
- req->status.count = (int)last;
+ MPIR_STATUS_SET_COUNT(req->status, (int)last);
if (req->dev.recv_data_sz <= userbuf_sz) {
MPIU_ERR_SETSIMPLE(req->status.MPI_ERROR,MPI_ERR_TYPE,"**dtypemismatch");
}
diff --git a/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_probe.c b/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_probe.c
index 0336764..d275264 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/newmad/newmad_probe.c
@@ -74,7 +74,7 @@ int MPID_nem_newmad_probe(MPIDI_VC_t *vc, int source, int tag, MPID_Comm *comm,
else
NEM_NMAD_MATCH_GET_TAG(out_tag,status->MPI_TAG);
- status->count = size;
+ MPIR_STATUS_SET_COUNT(*status, size);
fn_exit:
return mpi_errno;
@@ -144,7 +144,7 @@ int MPID_nem_newmad_iprobe(MPIDI_VC_t *vc, int source, int tag, MPID_Comm *comm
else
NEM_NMAD_MATCH_GET_TAG(out_tag,status->MPI_TAG);
- status->count = size;
+ MPIR_STATUS_SET_COUNT(*status, size);
*flag = TRUE;
}
else
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
index 62f0c64..43c1c1d 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_impl.h
@@ -73,7 +73,7 @@ typedef struct {
MPID_cc_set(&(sreq_)->cc, 1); \
(sreq_)->cc_ptr = &(sreq_)->cc; \
(sreq_)->status.MPI_ERROR = MPI_SUCCESS; \
- (sreq_)->status.cancelled = FALSE; \
+ MPIR_STATUS_SET_CANCEL_BIT((sreq_)->status, FALSE); \
(sreq_)->dev.cancel_pending = FALSE; \
(sreq_)->dev.state = 0; \
(sreq_)->dev.datatype_ptr = NULL; \
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
index 521b6e1..0dbfc7e 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_probe.c
@@ -26,7 +26,7 @@ static int handle_probe(const ptl_event_t *e)
REQ_PTL(req)->found = TRUE;
req->status.MPI_SOURCE = NPTL_MATCH_GET_RANK(e->match_bits);
req->status.MPI_TAG = NPTL_MATCH_GET_TAG(e->match_bits);
- req->status.count = NPTL_HEADER_GET_LENGTH(e->match_bits);
+ MPIR_STATUS_SET_COUNT(req->status, NPTL_HEADER_GET_LENGTH(e->match_bits));
MPIDI_CH3U_Request_complete(req);
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 88f6b9e..0ccb937 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_recv.c
@@ -30,11 +30,11 @@ static void dequeue_req(const ptl_event_t *e)
if (s_len > r_len) {
/* truncated data */
- rreq->status.count = r_len;
+ MPIR_STATUS_SET_COUNT(rreq->status, r_len);
MPIU_ERR_SET2(rreq->status.MPI_ERROR, MPI_ERR_TRUNCATE, "**truncate", "**truncate %d %d", s_len, r_len);
}
- rreq->status.count = s_len;
+ MPIR_STATUS_SET_COUNT(rreq->status, s_len);
}
#undef FUNCNAME
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
index cbabb05..e26658a 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_progress.c
@@ -798,7 +798,7 @@ int MPID_nem_handle_pkt(MPIDI_VC_t *vc, char *buf, MPIDI_msg_sz_t buflen)
{ \
(rreq_)->status.MPI_SOURCE = (pkt_)->match.rank; \
(rreq_)->status.MPI_TAG = (pkt_)->match.tag; \
- (rreq_)->status.count = (pkt_)->data_sz; \
+ MPIR_STATUS_SET_COUNT((rreq_)->status, (pkt_)->data_sz); \
(rreq_)->dev.sender_req_id = (pkt_)->sender_req_id; \
(rreq_)->dev.recv_data_sz = (pkt_)->data_sz; \
MPIDI_Request_set_seqnum((rreq_), (pkt_)->seqnum); \
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 55c6909..3b3aec9 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
@@ -10,7 +10,7 @@
{ \
(rreq_)->status.MPI_SOURCE = (pkt_)->match.parts.rank; \
(rreq_)->status.MPI_TAG = (pkt_)->match.parts.tag; \
- (rreq_)->status.count = (pkt_)->data_sz; \
+ MPIR_STATUS_SET_COUNT((rreq_)->status, (pkt_)->data_sz); \
(rreq_)->dev.sender_req_id = (pkt_)->sender_req_id; \
(rreq_)->dev.recv_data_sz = (pkt_)->data_sz; \
MPIDI_Request_set_seqnum((rreq_), (pkt_)->seqnum); \
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index cb7b954..5b5eadc 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -329,7 +329,7 @@ extern MPIDI_Process_t MPIDI_Process;
(sreq_)->partner_request = NULL; \
MPIR_Comm_add_ref(comm); \
(sreq_)->status.MPI_ERROR = MPI_SUCCESS; \
- (sreq_)->status.cancelled = FALSE; \
+ MPIR_STATUS_SET_CANCEL_BIT((sreq_)->status, FALSE); \
(sreq_)->dev.state = 0; \
(sreq_)->dev.cancel_pending = FALSE; \
(sreq_)->dev.match.parts.rank = rank; \
@@ -366,7 +366,7 @@ extern MPIDI_Process_t MPIDI_Process;
MPID_cc_set(&(rreq_)->cc, 1); \
(rreq_)->cc_ptr = &(rreq_)->cc; \
(rreq_)->status.MPI_ERROR = MPI_SUCCESS; \
- (rreq_)->status.cancelled = FALSE; \
+ MPIR_STATUS_SET_CANCEL_BIT((rreq_)->status, FALSE); \
(rreq_)->partner_request = NULL; \
(rreq_)->dev.state = 0; \
(rreq_)->dev.cancel_pending = FALSE; \
diff --git a/src/mpid/ch3/src/ch3u_buffer.c b/src/mpid/ch3/src/ch3u_buffer.c
index 49f9829..2d271c2 100644
--- a/src/mpid/ch3/src/ch3u_buffer.c
+++ b/src/mpid/ch3/src/ch3u_buffer.c
@@ -239,7 +239,7 @@ int MPIDI_CH3_RecvFromSelf( MPID_Request *rreq, void *buf, int count,
sreq->dev.datatype, &sreq->status.MPI_ERROR,
buf, count, datatype, &data_sz,
&rreq->status.MPI_ERROR);
- rreq->status.count = (int)data_sz;
+ MPIR_STATUS_SET_COUNT(rreq->status, (int)data_sz);
MPID_REQUEST_SET_COMPLETED(sreq);
MPID_Request_release(sreq);
}
diff --git a/src/mpid/ch3/src/ch3u_eager.c b/src/mpid/ch3/src/ch3u_eager.c
index 80f1acb..1890b2c 100644
--- a/src/mpid/ch3/src/ch3u_eager.c
+++ b/src/mpid/ch3/src/ch3u_eager.c
@@ -309,7 +309,7 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
(rreq)->status.MPI_SOURCE = (eagershort_pkt)->match.parts.rank;
(rreq)->status.MPI_TAG = (eagershort_pkt)->match.parts.tag;
- (rreq)->status.count = (eagershort_pkt)->data_sz;
+ MPIR_STATUS_SET_COUNT((rreq)->status, (eagershort_pkt)->data_sz);
(rreq)->dev.recv_data_sz = (eagershort_pkt)->data_sz;
MPIDI_Request_set_seqnum((rreq), (eagershort_pkt)->seqnum);
/* FIXME: Why do we set the message type? */
@@ -351,7 +351,7 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
"**truncate", "**truncate %d %d %d %d",
rreq->status.MPI_SOURCE, rreq->status.MPI_TAG,
rreq->dev.recv_data_sz, userbuf_sz );
- rreq->status.count = userbuf_sz;
+ MPIR_STATUS_SET_COUNT(rreq->status, userbuf_sz);
data_sz = userbuf_sz;
}
@@ -405,7 +405,7 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
/* There are two cases: a datatype mismatch (could
not consume all data) or a too-short buffer. We
need to distinguish between these two types. */
- rreq->status.count = (int)last;
+ MPIR_STATUS_SET_COUNT(rreq->status, (int)last);
if (rreq->dev.recv_data_sz <= userbuf_sz) {
MPIU_ERR_SETSIMPLE(rreq->status.MPI_ERROR,MPI_ERR_TYPE,
"**dtypemismatch");
@@ -575,7 +575,7 @@ int MPIDI_CH3_EagerContigIsend( MPID_Request **sreq_p,
{ \
(rreq_)->status.MPI_SOURCE = (pkt_)->match.parts.rank; \
(rreq_)->status.MPI_TAG = (pkt_)->match.parts.tag; \
- (rreq_)->status.count = (pkt_)->data_sz; \
+ MPIR_STATUS_SET_COUNT((rreq_)->status, (pkt_)->data_sz); \
(rreq_)->dev.sender_req_id = (pkt_)->sender_req_id; \
(rreq_)->dev.recv_data_sz = (pkt_)->data_sz; \
MPIDI_Request_set_seqnum((rreq_), (pkt_)->seqnum); \
@@ -744,7 +744,7 @@ int MPIDI_CH3_PktHandler_ReadySend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
"**rsendnomatch %d %d",
ready_pkt->match.parts.rank,
ready_pkt->match.parts.tag);
- rreq->status.count = 0;
+ MPIR_STATUS_SET_COUNT(rreq->status, 0);
if (rreq->dev.recv_data_sz > 0)
{
/* force read of extra data */
diff --git a/src/mpid/ch3/src/ch3u_eagersync.c b/src/mpid/ch3/src/ch3u_eagersync.c
index 3c59a86..109a3cf 100644
--- a/src/mpid/ch3/src/ch3u_eagersync.c
+++ b/src/mpid/ch3/src/ch3u_eagersync.c
@@ -201,7 +201,7 @@ int MPIDI_CH3_EagerSyncAck( MPIDI_VC_t *vc, MPID_Request *rreq )
{ \
(rreq_)->status.MPI_SOURCE = (pkt_)->match.parts.rank; \
(rreq_)->status.MPI_TAG = (pkt_)->match.parts.tag; \
- (rreq_)->status.count = (pkt_)->data_sz; \
+ MPIR_STATUS_SET_COUNT((rreq_)->status, (pkt_)->data_sz); \
(rreq_)->dev.sender_req_id = (pkt_)->sender_req_id; \
(rreq_)->dev.recv_data_sz = (pkt_)->data_sz; \
MPIDI_Request_set_seqnum((rreq_), (pkt_)->seqnum); \
diff --git a/src/mpid/ch3/src/ch3u_handle_recv_pkt.c b/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
index 30a84fe..426429c 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_pkt.c
@@ -26,7 +26,7 @@
{ \
(rreq_)->status.MPI_SOURCE = (pkt_)->match.parts.rank; \
(rreq_)->status.MPI_TAG = (pkt_)->match.parts.tag; \
- (rreq_)->status.count = (pkt_)->data_sz; \
+ MPIR_STATUS_SET_COUNT((rreq_)->status, (pkt_)->data_sz); \
(rreq_)->dev.sender_req_id = (pkt_)->sender_req_id; \
(rreq_)->dev.recv_data_sz = (pkt_)->data_sz; \
MPIDI_Request_set_seqnum((rreq_), (pkt_)->seqnum); \
@@ -132,7 +132,7 @@ int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, MPIDI_msg_sz_t
"**truncate", "**truncate %d %d %d %d",
rreq->status.MPI_SOURCE, rreq->status.MPI_TAG,
rreq->dev.recv_data_sz, userbuf_sz );
- rreq->status.count = userbuf_sz;
+ MPIR_STATUS_SET_COUNT(rreq->status, userbuf_sz);
data_sz = userbuf_sz;
}
@@ -198,7 +198,7 @@ int MPIDI_CH3U_Receive_data_found(MPID_Request *rreq, char *buf, MPIDI_msg_sz_t
mismatch between the datatype and the amount of
data received. Throw away received data. */
MPIU_ERR_SET(rreq->status.MPI_ERROR, MPI_ERR_TYPE, "**dtypemismatch");
- rreq->status.count = (int)rreq->dev.segment_first;
+ MPIR_STATUS_SET_COUNT(rreq->status, (int)rreq->dev.segment_first);
*buflen = data_sz;
*complete = TRUE;
/* FIXME: Set OnDataAvail to 0? If not, why not? */
@@ -322,7 +322,7 @@ int MPIDI_CH3U_Post_data_receive_found(MPID_Request * rreq)
"**truncate", "**truncate %d %d %d %d",
rreq->status.MPI_SOURCE, rreq->status.MPI_TAG,
rreq->dev.recv_data_sz, userbuf_sz );
- rreq->status.count = userbuf_sz;
+ MPIR_STATUS_SET_COUNT(rreq->status, userbuf_sz);
data_sz = userbuf_sz;
}
diff --git a/src/mpid/ch3/src/ch3u_recvq.c b/src/mpid/ch3/src/ch3u_recvq.c
index c2ab01f..1cbd413 100644
--- a/src/mpid/ch3/src/ch3u_recvq.c
+++ b/src/mpid/ch3/src/ch3u_recvq.c
@@ -266,8 +266,8 @@ int MPIDI_CH3U_Recvq_FU(int source, int tag, int context_id, MPI_Status *s)
/* Avoid setting "extra" fields like MPI_ERROR */
s->MPI_SOURCE = rreq->status.MPI_SOURCE;
s->MPI_TAG = rreq->status.MPI_TAG;
- s->count = rreq->status.count;
- s->cancelled = rreq->status.cancelled;
+ MPIR_STATUS_SET_COUNT(*s, MPIR_STATUS_GET_COUNT(rreq->status));
+ MPIR_STATUS_SET_CANCEL_BIT(*s, MPIR_STATUS_GET_CANCEL_BIT(rreq->status));
}
found = 1;
}
diff --git a/src/mpid/ch3/src/ch3u_request.c b/src/mpid/ch3/src/ch3u_request.c
index 5842b7b..86dff27 100644
--- a/src/mpid/ch3/src/ch3u_request.c
+++ b/src/mpid/ch3/src/ch3u_request.c
@@ -69,8 +69,8 @@ MPID_Request * MPID_Request_create(void)
req->status.MPI_SOURCE = MPI_UNDEFINED;
req->status.MPI_TAG = MPI_UNDEFINED;
req->status.MPI_ERROR = MPI_SUCCESS;
- req->status.count = 0;
- req->status.cancelled = FALSE;
+ MPIR_STATUS_SET_COUNT(req->status, 0);
+ MPIR_STATUS_SET_CANCEL_BIT(req->status, FALSE);
req->comm = NULL;
req->greq_fns = NULL;
req->dev.datatype_ptr = NULL;
@@ -381,7 +381,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS,
MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TYPE,
"**dtypemismatch", 0);
- rreq->status.count = (int)rreq->dev.segment_first;
+ MPIR_STATUS_SET_COUNT(rreq->status, (int)rreq->dev.segment_first);
rreq->dev.segment_size = rreq->dev.segment_first;
mpi_errno = MPIDI_CH3U_Request_load_recv_iov(rreq);
goto fn_exit;
@@ -518,7 +518,7 @@ int MPIDI_CH3U_Request_unpack_srbuf(MPID_Request * rreq)
/* If no data can be unpacked, then we have a datatype processing
problem. Adjust the segment info so that the remaining
data is received and thrown away. */
- rreq->status.count = (int)rreq->dev.segment_first;
+ MPIR_STATUS_SET_COUNT(rreq->status, (int)rreq->dev.segment_first);
rreq->dev.segment_size = rreq->dev.segment_first;
rreq->dev.segment_first += tmpbuf_last;
rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS,
@@ -536,7 +536,7 @@ int MPIDI_CH3U_Request_unpack_srbuf(MPID_Request * rreq)
Note: the segment_first field is set to segment_last so that if
this is a truncated message, extra data will be read
off the pipe. */
- rreq->status.count = (int)last;
+ MPIR_STATUS_SET_COUNT(rreq->status, (int)last);
rreq->dev.segment_size = last;
rreq->dev.segment_first = tmpbuf_last;
rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS,
@@ -600,7 +600,7 @@ int MPIDI_CH3U_Request_unpack_uebuf(MPID_Request * rreq)
", buf_sz=" MPIDI_MSG_SZ_FMT,
rreq->dev.recv_data_sz, userbuf_sz));
unpack_sz = userbuf_sz;
- rreq->status.count = (int)userbuf_sz;
+ MPIR_STATUS_SET_COUNT(rreq->status, (int)userbuf_sz);
rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS,
MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TRUNCATE,
"**truncate", "**truncate %d %d",
@@ -636,7 +636,7 @@ int MPIDI_CH3U_Request_unpack_uebuf(MPID_Request * rreq)
/* received data was not entirely consumed by unpack()
because too few bytes remained to fill the next basic
datatype */
- rreq->status.count = (int)last;
+ MPIR_STATUS_SET_COUNT(rreq->status, (int)last);
rreq->status.MPI_ERROR = MPIR_Err_create_code(MPI_SUCCESS,
MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_TYPE,
"**dtypemismatch", 0);
diff --git a/src/mpid/ch3/src/ch3u_rma_reqops.c b/src/mpid/ch3/src/ch3u_rma_reqops.c
index e0af215..f83f893 100644
--- a/src/mpid/ch3/src/ch3u_rma_reqops.c
+++ b/src/mpid/ch3/src/ch3u_rma_reqops.c
@@ -86,8 +86,8 @@ static int MPIDI_CH3I_Rma_req_query(void *state, MPI_Status *status)
MPIU_UNREFERENCED_ARG(state);
/* All status fields, except the error code, are undefined */
- status->count = 0;
- status->cancelled = FALSE;
+ MPIR_STATUS_SET_COUNT(*status, 0);
+ MPIR_STATUS_SET_CANCEL_BIT(*status, FALSE);
status->MPI_SOURCE = MPI_UNDEFINED;
status->MPI_TAG = MPI_UNDEFINED;
diff --git a/src/mpid/ch3/src/ch3u_rndv.c b/src/mpid/ch3/src/ch3u_rndv.c
index 69f517d..080cc90 100644
--- a/src/mpid/ch3/src/ch3u_rndv.c
+++ b/src/mpid/ch3/src/ch3u_rndv.c
@@ -98,7 +98,7 @@ int MPIDI_CH3_RndvSend( MPID_Request **sreq_p, const void * buf, int count,
{ \
(rreq_)->status.MPI_SOURCE = (pkt_)->match.parts.rank; \
(rreq_)->status.MPI_TAG = (pkt_)->match.parts.tag; \
- (rreq_)->status.count = (pkt_)->data_sz; \
+ MPIR_STATUS_SET_COUNT((rreq_)->status, (pkt_)->data_sz); \
(rreq_)->dev.sender_req_id = (pkt_)->sender_req_id; \
(rreq_)->dev.recv_data_sz = (pkt_)->data_sz; \
MPIDI_Request_set_seqnum((rreq_), (pkt_)->seqnum); \
diff --git a/src/mpid/ch3/src/mpid_cancel_recv.c b/src/mpid/ch3/src/mpid_cancel_recv.c
index 9cbdfce..24a04f6 100644
--- a/src/mpid/ch3/src/mpid_cancel_recv.c
+++ b/src/mpid/ch3/src/mpid_cancel_recv.c
@@ -22,8 +22,8 @@ int MPID_Cancel_recv(MPID_Request * rreq)
{
MPIU_DBG_MSG_P(CH3_OTHER,VERBOSE,
"request 0x%08x cancelled", rreq->handle);
- rreq->status.cancelled = TRUE;
- rreq->status.count = 0;
+ MPIR_STATUS_SET_CANCEL_BIT(rreq->status, TRUE);
+ MPIR_STATUS_SET_COUNT(rreq->status, 0);
MPID_REQUEST_SET_COMPLETED(rreq);
MPID_Request_release(rreq);
}
diff --git a/src/mpid/ch3/src/mpid_cancel_send.c b/src/mpid/ch3/src/mpid_cancel_send.c
index 0f731d1..df0c57b 100644
--- a/src/mpid/ch3/src/mpid_cancel_send.c
+++ b/src/mpid/ch3/src/mpid_cancel_send.c
@@ -70,7 +70,7 @@ int MPID_Cancel_send(MPID_Request * sreq)
MPIU_Object_set_ref(rreq, 0);
MPIDI_CH3_Request_destroy(rreq);
- sreq->status.cancelled = TRUE;
+ MPIR_STATUS_SET_CANCEL_BIT(sreq->status, TRUE);
/* no other thread should be waiting on sreq, so it is safe to
reset ref_count and cc */
MPID_cc_set(&sreq->cc, 0);
@@ -79,7 +79,7 @@ int MPID_Cancel_send(MPID_Request * sreq)
}
else
{
- sreq->status.cancelled = FALSE;
+ MPIR_STATUS_SET_CANCEL_BIT(sreq->status, FALSE);
MPIU_DBG_MSG_FMT(CH3_OTHER,VERBOSE,(MPIU_DBG_FDEST,
"send-to-self cancellation failed, sreq=0x%08x, rreq=0x%08x",
sreq->handle, rreq->handle));
@@ -125,7 +125,7 @@ int MPID_Cancel_send(MPID_Request * sreq)
if (cancelled)
{
- sreq->status.cancelled = TRUE;
+ MPIR_STATUS_SET_CANCEL_BIT(sreq->status, TRUE);
/* no other thread should be waiting on sreq, so it is
safe to reset ref_count and cc */
MPID_cc_set(&sreq->cc, 0);
@@ -140,7 +140,7 @@ int MPID_Cancel_send(MPID_Request * sreq)
cancelled = FALSE;
if (cancelled)
{
- sreq->status.cancelled = TRUE;
+ MPIR_STATUS_SET_CANCEL_BIT(sreq->status, TRUE);
/* no other thread should be waiting on sreq, so it is safe to
reset ref_count and cc */
MPID_cc_set(&sreq->cc, 0);
@@ -288,7 +288,7 @@ int MPIDI_CH3_PktHandler_CancelSendResp( MPIDI_VC_t *vc ATTRIBUTE((unused)),
if (resp_pkt->ack)
{
- sreq->status.cancelled = TRUE;
+ MPIR_STATUS_SET_CANCEL_BIT(sreq->status, TRUE);
if (MPIDI_Request_get_msg_type(sreq) == MPIDI_REQUEST_RNDV_MSG ||
MPIDI_Request_get_type(sreq) == MPIDI_REQUEST_TYPE_SSEND)
@@ -304,7 +304,7 @@ int MPIDI_CH3_PktHandler_CancelSendResp( MPIDI_VC_t *vc ATTRIBUTE((unused)),
}
else
{
- sreq->status.cancelled = FALSE;
+ MPIR_STATUS_SET_CANCEL_BIT(sreq->status, FALSE);
MPIU_DBG_MSG(CH3_OTHER,TYPICAL,"unable to cancel message");
}
diff --git a/src/mpid/ch3/src/mpidi_isend_self.c b/src/mpid/ch3/src/mpidi_isend_self.c
index 8ec7f82..9460c8e 100644
--- a/src/mpid/ch3/src/mpidi_isend_self.c
+++ b/src/mpid/ch3/src/mpidi_isend_self.c
@@ -74,7 +74,7 @@ int MPIDI_Isend_self(const void * buf, int count, MPI_Datatype datatype, int ran
MPIDI_CH3U_Buffer_copy(buf, count, datatype, &sreq->status.MPI_ERROR,
rreq->dev.user_buf, rreq->dev.user_count, rreq->dev.datatype, &data_sz, &rreq->status.MPI_ERROR);
- rreq->status.count = (int)data_sz;
+ MPIR_STATUS_SET_COUNT(rreq->status, (int)data_sz);
MPID_REQUEST_SET_COMPLETED(rreq);
MPID_Request_release(rreq);
/* sreq has never been seen by the user or outside this thread, so it is safe to reset ref_count and cc */
@@ -99,7 +99,7 @@ int MPIDI_Isend_self(const void * buf, int count, MPI_Datatype datatype, int ran
rreq->partner_request = sreq;
rreq->dev.sender_req_id = sreq->handle;
MPID_Datatype_get_size_macro(datatype, dt_sz);
- rreq->status.count = count * dt_sz;
+ MPIR_STATUS_SET_COUNT(rreq->status, count * dt_sz);
}
else
{
@@ -112,7 +112,7 @@ int MPIDI_Isend_self(const void * buf, int count, MPI_Datatype datatype, int ran
rreq->partner_request = NULL;
rreq->dev.sender_req_id = MPI_REQUEST_NULL;
- rreq->status.count = 0;
+ MPIR_STATUS_SET_COUNT(rreq->status, 0);
/* sreq has never been seen by the user or outside this thread, so it is safe to reset ref_count and cc */
MPIU_Object_set_ref(sreq, 1);
diff --git a/src/mpid/pamid/src/mpid_request.h b/src/mpid/pamid/src/mpid_request.h
index ba17b78..1a233f0 100644
--- a/src/mpid/pamid/src/mpid_request.h
+++ b/src/mpid/pamid/src/mpid_request.h
@@ -184,8 +184,8 @@ MPIDI_Request_initialize(MPID_Request * req)
{
req->greq_fns = NULL;
- req->status.count = 0;
- req->status.cancelled = FALSE;
+ MPIR_STATUS_SET_COUNT(req->status, 0);
+ MPIR_STATUS_SET_CANCEL_BIT(req->status, FALSE);
req->status.MPI_SOURCE = MPI_UNDEFINED;
req->status.MPI_TAG = MPI_UNDEFINED;
req->status.MPI_ERROR = MPI_SUCCESS;
diff --git a/src/mpid/pamid/src/pt2pt/mpid_cancel.c b/src/mpid/pamid/src/pt2pt/mpid_cancel.c
index 27cfe86..1ca2f87 100644
--- a/src/mpid/pamid/src/pt2pt/mpid_cancel.c
+++ b/src/mpid/pamid/src/pt2pt/mpid_cancel.c
@@ -28,8 +28,8 @@ MPID_Cancel_recv(MPID_Request * rreq)
MPID_assert(rreq->kind == MPID_REQUEST_RECV);
if (MPIDI_Recvq_FDPR(rreq))
{
- rreq->status.cancelled = TRUE;
- rreq->status.count = 0;
+ MPIR_STATUS_SET_CANCEL_BIT(rreq->status, TRUE);
+ MPIR_STATUS_SET_COUNT(rreq->status, 0);
MPIDI_Request_complete(rreq);
}
/* This is successful, even if the recv isn't cancelled */
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c b/src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c
index 8b8c774..9484e43 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c
@@ -197,7 +197,7 @@ MPIDI_RecvCB(pami_context_t context,
/* ---------------------- */
rreq->status.MPI_SOURCE = rank;
rreq->status.MPI_TAG = tag;
- rreq->status.count = sndlen;
+ MPIR_STATUS_SET_COUNT(rreq->status, sndlen);
MPIDI_Request_setCA (rreq, MPIDI_CA_COMPLETE);
MPIDI_Request_cpyPeerRequestH(rreq, msginfo);
MPIDI_Request_setSync (rreq, msginfo->isSync);
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_callback_rzv.c b/src/mpid/pamid/src/pt2pt/mpidi_callback_rzv.c
index 8b00c48..b0922fe 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_callback_rzv.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_callback_rzv.c
@@ -77,7 +77,7 @@ MPIDI_RecvRzvCB_impl(pami_context_t context,
/* ---------------------- */
rreq->status.MPI_SOURCE = rank;
rreq->status.MPI_TAG = tag;
- rreq->status.count = envelope->length;
+ MPIR_STATUS_SET_COUNT(rreq->status, envelope->length);
MPIDI_Request_setPeerRank_comm(rreq, rank);
MPIDI_Request_setPeerRank_pami(rreq, source);
MPIDI_Request_cpyPeerRequestH (rreq, msginfo);
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_callback_short.c b/src/mpid/pamid/src/pt2pt/mpidi_callback_short.c
index 552c636..705d623 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_callback_short.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_callback_short.c
@@ -157,7 +157,7 @@ MPIDI_RecvShortCB(pami_context_t context,
/* ---------------------- */
rreq->status.MPI_SOURCE = rank;
rreq->status.MPI_TAG = tag;
- rreq->status.count = sndlen;
+ MPIR_STATUS_SET_COUNT(rreq->status, sndlen);
MPIDI_Request_setCA (rreq, MPIDI_CA_COMPLETE);
MPIDI_Request_cpyPeerRequestH(rreq, msginfo);
MPIDI_Request_setSync (rreq, isSync);
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_callback_util.c b/src/mpid/pamid/src/pt2pt/mpidi_callback_util.c
index 931404c..fa3b48b 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_callback_util.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_callback_util.c
@@ -56,7 +56,7 @@ MPIDI_Callback_process_unexp(MPID_Request *newreq,
/* ---------------------- */
rreq->status.MPI_SOURCE = rank;
rreq->status.MPI_TAG = tag;
- rreq->status.count = sndlen;
+ MPIR_STATUS_SET_COUNT(rreq->status, sndlen);
MPIDI_Request_setCA (rreq, MPIDI_CA_COMPLETE);
MPIDI_Request_cpyPeerRequestH(rreq, msginfo);
MPIDI_Request_setSync (rreq, isSync);
@@ -118,8 +118,8 @@ MPIDI_Callback_process_trunc(pami_context_t context,
if (recv)
{
MPIDI_Request_setCA(rreq, MPIDI_CA_UNPACK_UEBUF_AND_COMPLETE);
- rreq->mpid.uebuflen = rreq->status.count;
- rreq->mpid.uebuf = MPIU_Malloc(rreq->status.count);
+ rreq->mpid.uebuflen = MPIR_STATUS_GET_COUNT(rreq->status);
+ rreq->mpid.uebuf = MPIU_Malloc(MPIR_STATUS_GET_COUNT(rreq->status));
MPID_assert(rreq->mpid.uebuf != NULL);
rreq->mpid.uebuf_malloc = mpiuMalloc;
@@ -128,7 +128,7 @@ MPIDI_Callback_process_trunc(pami_context_t context,
else
{
MPIDI_Request_setCA(rreq, MPIDI_CA_UNPACK_UEBUF_AND_COMPLETE);
- rreq->mpid.uebuflen = rreq->status.count;
+ rreq->mpid.uebuflen = MPIR_STATUS_GET_COUNT(rreq->status);
rreq->mpid.uebuf = (void*)sndbuf;
MPIDI_RecvDoneCB(context, rreq, PAMI_SUCCESS);
MPID_Request_release(rreq);
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_control.c b/src/mpid/pamid/src/pt2pt/mpidi_control.c
index 39629fd..9710ca4 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_control.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_control.c
@@ -323,7 +323,7 @@ MPIDI_CancelAck_proc(pami_context_t context,
MPID_assert(info->control == MPIDI_CONTROL_CANCEL_ACKNOWLEDGE);
MPID_assert(req->mpid.cancel_pending == TRUE);
- req->status.cancelled = TRUE;
+ MPIR_STATUS_SET_CANCEL_BIT(req->status, TRUE);
/*
* Rendezvous-Sends wait until a rzv ack is received to complete
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_done.c b/src/mpid/pamid/src/pt2pt/mpidi_done.c
index 9f2e062..5979409 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_done.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_done.c
@@ -55,7 +55,7 @@ MPIDI_RecvDoneCB_copy(MPID_Request * rreq)
rreq->mpid.datatype, /* dest type */
&_count,
&rreq->status.MPI_ERROR);
- rreq->status.count = _count;
+ MPIR_STATUS_SET_COUNT(rreq->status, _count);
}
@@ -95,7 +95,7 @@ MPIDI_RecvDoneCB(pami_context_t context,
#ifdef OUT_OF_ORDER_HANDLING
MPID_Request * oo_peer = rreq->mpid.oo_peer;
if (oo_peer) {
- oo_peer->status.count = rreq->status.count;
+ MPIR_STATUS_SET_COUNT(oo_peer->status, MPIR_STATUS_GET_COUNT(rreq->status));
MPIDI_Request_complete(oo_peer);
}
#endif
@@ -191,7 +191,7 @@ void MPIDI_Recvq_process_out_of_order_msgs(pami_task_t src, pami_context_t conte
dt_true_lb);
if (unlikely(ooreq->mpid.uebuflen > dt_size))
{
- rreq->status.count = dt_size;
+ MPIR_STATUS_SET_COUNT(rreq->status, dt_size);
rreq->status.MPI_ERROR = MPI_ERR_TRUNCATE;
}
@@ -215,7 +215,7 @@ void MPIDI_Recvq_process_out_of_order_msgs(pami_task_t src, pami_context_t conte
MPIDI_RecvMsg_Unexp(ooreq, rreq->mpid.userbuf, rreq->mpid.userbufcount, rreq->mpid.datatype);
} else {
MPIDI_RecvMsg_Unexp(ooreq, rreq->mpid.userbuf, rreq->mpid.userbufcount, rreq->mpid.datatype);
- rreq->status.count = ooreq->status.count;
+ MPIR_STATUS_SET_COUNT(rreq->status, MPIR_STATUS_GET_COUNT(ooreq->status));
rreq->status.MPI_SOURCE = ooreq->status.MPI_SOURCE;
rreq->status.MPI_TAG = ooreq->status.MPI_TAG;
rreq->mpid.envelope.msginfo.MPIseqno = ooreq->mpid.envelope.msginfo.MPIseqno;
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c b/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
index 71191f9..41914fc 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c
@@ -82,7 +82,7 @@ MPIDI_RecvMsg_Unexp(MPID_Request * rreq,
/* -------------------------------- */
if (rreq->mpid.uebuf != NULL)
{
- if (likely(rreq->status.cancelled == FALSE))
+ if (likely(MPIR_STATUS_GET_CANCEL_BIT(rreq->status) == FALSE))
{
MPIDI_msg_sz_t _count=0;
MPIDI_Buffer_copy(rreq->mpid.uebuf,
@@ -94,13 +94,13 @@ MPIDI_RecvMsg_Unexp(MPID_Request * rreq,
datatype,
&_count,
&rreq->status.MPI_ERROR);
- rreq->status.count = _count;
+ MPIR_STATUS_SET_COUNT(rreq->status, _count);
}
}
else
{
MPID_assert(rreq->mpid.uebuflen == 0);
- rreq->status.count = 0;
+ MPIR_STATUS_SET_COUNT(rreq->status, 0);
}
}
else
@@ -121,7 +121,7 @@ MPIDI_RecvMsg_Unexp(MPID_Request * rreq,
MPIDI_Request_uncomplete(rreq);
MPIDI_Send_post(MPIDI_SyncAck_handoff, rreq);
}
- if(rreq->status.cancelled == FALSE)
+ if (MPIR_STATUS_GET_CANCEL_BIT(rreq->status) == FALSE)
{
MPIDI_Request_setCA(rreq, MPIDI_CA_UNPACK_UEBUF_AND_COMPLETE);
}
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_rendezvous.c b/src/mpid/pamid/src/pt2pt/mpidi_rendezvous.c
index 7a89023..e79e6a5 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_rendezvous.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_rendezvous.c
@@ -66,7 +66,7 @@ MPIDI_RendezvousTransfer(pami_context_t context,
{
rcvlen = dt_size;
rreq->status.MPI_ERROR = MPI_ERR_TRUNCATE;
- rreq->status.count = rcvlen;
+ MPIR_STATUS_SET_COUNT(rreq->status, rcvlen);
}
else
{
diff --git a/src/mpid/pamid/src/pt2pt/mpidi_sendmsg.c b/src/mpid/pamid/src/pt2pt/mpidi_sendmsg.c
index 8904ddd..8c7f04b 100644
--- a/src/mpid/pamid/src/pt2pt/mpidi_sendmsg.c
+++ b/src/mpid/pamid/src/pt2pt/mpidi_sendmsg.c
@@ -352,7 +352,7 @@ MPIDI_SendMsg_process_userdefined_dt(MPID_Request * sreq,
if (unlikely(sndbuf == NULL))
{
sreq->status.MPI_ERROR = MPI_ERR_NO_SPACE;
- sreq->status.count = 0;
+ MPIR_STATUS_SET_COUNT(sreq->status, 0);
MPID_Abort(NULL, MPI_ERR_NO_SPACE, -1,
"Unable to allocate non-contiguous buffer");
}
diff --git a/test/mpi/pt2pt/large_message.c b/test/mpi/pt2pt/large_message.c
index db3d275..f895936 100644
--- a/test/mpi/pt2pt/large_message.c
+++ b/test/mpi/pt2pt/large_message.c
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
for (i=0; i<cnt; i++) cols[i] = -1;
ierr = MPI_Recv(cols,cnt,MPI_LONG_LONG_INT,0,0,MPI_COMM_WORLD,&status);
/* ierr = MPI_Get_count(&status,MPI_LONG_LONG_INT,&cnt);
- Get_count still fails because status.count is not 64 bit */
+ Get_count still fails because count is not 64 bit */
for (i=0; i<cnt; i++) {
if (cols[i] != i) {
/*printf("Rank %d, cols[i]=%lld, should be %d\n", rank, cols[i], i);*/
http://git.mpich.org/mpich.git/commitdiff/a214d50071c2b53b077f865922f2d9bf6ce6f89e
commit a214d50071c2b53b077f865922f2d9bf6ce6f89e
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date: Sat Oct 19 10:08:03 2013 -0500
Revert "Fix for #1804 - Alignment issues in Fortran with MPI_Status"
This reverts commit 81ad170b491ba0bdfb7d0028b06835651adfd968.
Signed-off-by: William Gropp <wgropp at illinois.edu>
diff --git a/configure.ac b/configure.ac
index 2820478..6d6af8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5837,99 +5837,6 @@ if test "$enable_f77" = yes -a -z "$MPI_STATUS_SIZE" ; then
else
AC_MSG_ERROR([MPI_STATUS_SIZE was not defined!])
fi
-
- # Because MPI_Status may contain C integers of different sizes
- # and with different alignments, we determine the maximum element
- # size and then tell Fortran to enforce maximal alignment.
- # A more sophisticated test would determine the required alignment,
- # rather than assuming alignment to maximum size
- MPIR_COUNT_ALIGNMENT=0
- if test $MPI_SIZEOF_COUNT -gt $pac_cv_f77_sizeof_integer ; then
- # Alignment test looks at the low address bits, as long
- # as the sizeof(MPI_Count) is 2^j.
- # If we can't tell, pick a value that forces the Fortran
- # wrappers to use a local copy.
- case $MPI_SIZEOF_COUNT in
- 4) MPIR_COUNT_ALIGNMENT="0x3";;
- 8) MPIR_COUNT_ALIGNMENT="0x7";;
- 16) MPIR_COUNT_ALIGNMENT="0xF";;
- *) MPIR_COUNT_ALIGNMENT=-1 ;;
- esac
-
- # Compare the size of MPI_Status to the sizes of the individual
- # elements. If the sizeof(MPI_Status) > sum of the sizes, then
- # determine if simple padding will work.
- # FIXME: DETERMINED TO SEE IF THERE IS PROBLEM BUT NOT YET USED
- AC_MSG_CHECKING([whether MPI_Status contains padding])
- sum_of_status_element_sizes=`expr 6 \* $ac_cv_sizeof_int + $MPI_SIZEOF_COUNT`
- if test $sum_of_status_element_sizes -lt $pac_cv_sizeof_mpi_status ; then
- AC_MSG_RESULT([yes])
- if test "$enable_fc" = "yes" ; then
- # FIXME: We could compute the padding or delete the
- # status definition from mpi_constants
- AC_MSG_CHECKING([padding size before count field in MPI_Status])
- rm -f pac_mpi_status.h
-dnl quote with [] since otherwise m4 strips the array declaration out of this
-dnl structure
-[ cat > pac_mpi_status.h <<_EOF
-typedef struct {
- int MPI_SOURCE;
- int MPI_TAG;
- int MPI_ERROR;
- $MPI_COUNT count;
- int cancelled;
- int abi_slush_fund[2];
- $EXTRA_STATUS_DECL
-} MPI_Status;
-MPI_Status mya;
-_EOF
-]
- AC_COMPUTE_INT(pac_cv_fc_pad1,[((char*)&mya.count-(((char*)&mya)+3*sizeof(int)))],[AC_INCLUDES_DEFAULT()
-#include "pac_mpi_status.h"])
- AC_MSG_RESULT($pac_cv_fc_pad1)
- AC_MSG_CHECKING([padding at end of MPI_Status])
- AC_COMPUTE_INT(pac_cv_fc_pad2,[((char*)(&mya + 1) - ((char *)(mya.abi_slush_fund+1) + sizeof(int)))],[AC_INCLUDES_DEFAULT()
-#include "pac_mpi_status.h"])
- AC_MSG_RESULT($pac_cv_fc_pad2)
- rm -f pac_mpi_status.h
- pac_cv_pad1found=no
- pac_cv_pad2found=no
- FC_STATUS_PAD1=""
- FC_STATUS_PAD2=""
- AC_SUBST(FC_STATUS_PAD1)
- AC_SUBST(FC_STATUS_PAD2)
- if test $pac_cv_fc_pad1 -gt 0 ; then
- if test $pac_cv_fc_pad1 -eq $ac_cv_sizeof_int ; then
- pac_cv_pad1found=yes
- FC_STATUS_PAD1="INTEGER :: PAD1"
- fi
- else
- # No padding needed here, so successfully determined
- # padding
- pac_cv_pad1found=yes
- fi
- if test $pac_cv_fc_pad2 -gt 0 ; then
- if test $pac_cv_fc_pad2 -eq $ac_cv_sizeof_int ; then
- pac_cv_pad2found=yes
- FC_STATUS_PAD2="INTEGER :: PAD2"
- fi
- else
- # No padding needed here, so successfully determined
- # padding
- pac_cv_pad2found=yes
- fi
- if test $pac_cv_pad1found = "no" -o \
- $pac_cv_pad2found = "no" ; then
- AC_MSG_ERROR([INTERNAL ERROR: definition of MPI_Status in C and Fortran 90 is incompatible due to padding in the C definition])
- fi
- fi
- else
- AC_MSG_RESULT([no])
- fi
- fi
- # Define the alignment of count regardless of whether sizeof(MPI_Count)
- # is bigger than a Fortran integer
- AC_DEFINE_UNQUOTED([MPIR_COUNT_ALIGNMENT],[$MPIR_COUNT_ALIGNMENT],[Value that anded with an address will give 0 if the address is properly aligned for MPI_Count])
fi # enable_f77 and mpi_status_size not set
AC_SUBST([MPI_STATUS_SIZE])
MPIF_STATUS_SIZE=$MPI_STATUS_SIZE
diff --git a/src/binding/f77/buildiface b/src/binding/f77/buildiface
index 1d8cf1b..f1e9b50 100755
--- a/src/binding/f77/buildiface
+++ b/src/binding/f77/buildiface
@@ -46,10 +46,6 @@ $do_fint = 0; # Set to 1 to support C and Fortran integers of a
# different size
$within_fint = 0; # This is set to 1 while generating code for the
# do_fint branch
-$fixStatusAlignment = 1; # Set to 1 to generate code that
- # handles different alignment rules between
- # Fortran (INTEGER) and C (likely MPI_Count)
- # Note set by feature value do_fixstatus .
%fintToHandle = ( 'int' => 1, 'MPI_Request' => 1, 'MPI_Group' => 1,
'MPI_Win' => 1, 'MPI_Info' => 1, 'MPI_Errhandler' => 1,
'MPI_File' => 1, 'MPI_Op' => 1, 'MPI_Message' => 1 );
@@ -72,7 +68,6 @@ $do_logical = 1;
$do_weak = 1;
$do_subdecls = 1;
$do_bufptr = 1;
-$do_fixstatus = 1;
$prototype_file = "../../include/mpi.h.in";
# Global hashes used for definitions and to record the locations of the
@@ -112,8 +107,8 @@ $specialInitString = "\
# Process arguments
#
# Args
-# -feature={logical,fint,subdecls,weak,bufptr,fixstatus},
-# separated by :, value given by =on or =off, eg
+# -feature={logical,fint,subdecls,weak,bufptr}, separated by :, value given
+# by =on or =off, eg
# -feature=logical=on:fint=off
# The feature names mean:
# logical - Fortran logicals are converted to/from C
@@ -122,11 +117,6 @@ $specialInitString = "\
# weak - Use weak symbols
# bufptr - Check for MPI_BOTTOM as a special address. This is
# not needed if a POINTER declaration is available.
-# fixstatus - The alignment of a Fortran STATUS array may not always
-# be what is required in C (particularly with MPI_Count in
-# MPI_Status now). If set, generate code to handle this case.
-# Systems without alignment restrictions can set this to off,
-# which will remove some tests.
foreach $_ (@ARGV) {
if (/-noprototypes/) { $build_prototypes = 0; }
elsif (/-infile=(.*)/) {
@@ -171,8 +161,6 @@ foreach $_ (@ARGV) {
print STDERR "Unrecognized argument $_\n";
}
}
-# For now, make these equal.
-$fixStatusAlignment = $do_fixstatus;
# Note that the code that looks up values strips blanks out of the type name
# No blanks should be used in the key.
@@ -659,18 +647,18 @@ $fixStatusAlignment = $do_fixstatus;
'Testsome-2' => 'inout:handle_array:*v1:MPI_Request',
'Testsome-3' => 'out:fint2int',
'Testsome-4' => 'out:index_array:*v1:*v3',
- 'Testsome-5' => 'out:status_array:*v1:*v3:*v3>0',
+ 'Testsome-5' => 'out:status_array:*v1:*v3:l3>0',
'Get_count' => '1', 'Get_count-1' => 'in:status',
'Request_get_status' => '2:3',
'Request_get_status-2' => 'out:logical',
'Request_get_status-3' => 'out:status',
'Status_set_cancelled' => '1:2',
- 'Status_set_cancelled-1' => 'inout:status',
+ 'Status_set_cancelled-1' => 'in:status',
'Status_set_cancelled-2' => 'in:logical',
'Status_set_elements' => '1',
- 'Status_set_elements-1' => 'inout:status',
+ 'Status_set_elements-1' => 'out:status',
'Status_set_elements_x' => '1',
- 'Status_set_elements_x-1' => 'inout:status',
+ 'Status_set_elements_x-1' => 'out:status',
'Type_contiguous' => '2:3',
'Type_contiguous-2' => 'in:handle::MPI_Datatype',
'Type_contiguous-3' => 'out:handle::MPI_Datatype',
@@ -1812,7 +1800,6 @@ sub bufptr_in_arg {
sub bufptr_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
}
# --------------------------------------------------------------------------
# MPI_IN_PLACE buffer pointers
@@ -1832,7 +1819,6 @@ sub inplace_in_arg {
sub inplace_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
}
# --------------------------------------------------------------------------
# MPI_UNWEIGHTED pointers. Note that unweighted is only used to indicate
@@ -1909,7 +1895,6 @@ sub unweighted_out_arg {
sub unweighted_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
# MPI_WEIGHTS_EMPTY should never be an output value from the MPI library
@@ -1948,7 +1933,6 @@ sub logical_in_arg {
sub logical_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($do_logical) {
print $OUTFD " if ($errparmlval == MPI_SUCCESS) *$outvar = MPIR_TO_FLOG($coutvar);\n";
}
@@ -2012,7 +1996,6 @@ sub logical_array_in_arg {
sub logical_array_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
# Special case if MPI_Fint == int: we use the input variable
# for space.
my $ActSize = $Array_size;
@@ -2057,7 +2040,6 @@ sub index_ftoc {
sub index_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
print $OUTFD " *$outvar = (MPI_Fint)$coutvar;\n";
print $OUTFD " if ($coutvar >= 0) *$outvar = *$outvar + 1;\n";
}
@@ -2084,7 +2066,6 @@ sub index_array_out_ftoc {
sub index_array_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
my $ActSize = $Array_size;
# In the case where the input and out sizes are not the same,
# the output size is in the fourth argument.
@@ -2157,7 +2138,6 @@ sub handle_inout_ftoc {
sub handle_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
print $OUTFD " if ($errparmlval==MPI_SUCCESS) *$outvar = (MPI_Fint)$coutvar;\n";
}
@@ -2280,8 +2260,7 @@ sub handle_array_out_ftoc {
sub handle_array_inout_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
- &handle_array_ctof( $coutvar, $outvar, $count );
+ &handle_array_ctof( $coutvar, $outvar );
}
# Make sure that there is no output processing (other than to free the
@@ -2289,14 +2268,12 @@ sub handle_array_inout_ctof {
sub handle_array_in_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
- #&handle_array_ctof( $coutvar, $outvar, $count );
+ #&handle_array_ctof( $coutvar, $outvar );
}
sub handle_array_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
my $basetype = $nativeType;
$basetype =~ s/MPI_//;
@@ -2307,7 +2284,7 @@ sub handle_array_ctof {
$asize = "_csize";
}
print $OUTFD "\
- /* handle_array_ctof( $coutvar, $outvar, $count ) */
+ /* handle_array_ctof( $coutvar, $outvar ) */
{int li;
for (li=0; li<$asize; li++) {
$outvar\[li\] = $convfunc( $coutvar\[li\] );
@@ -2415,7 +2392,6 @@ sub addrint_in_arg {
sub attrint_ctof {
my $fvar = $_[0];
my $cvar = $_[1];
- my $count = $_[2];
my $flagarg = 4; # get from option
# The strange cast is due to the following:
# The MPICH attribute code returns an int in the void *. In
@@ -2472,7 +2448,6 @@ sub addraint_in_arg {
sub attraint_ctof {
my $fvar = $_[0];
my $cvar = $_[1];
- my $count = $_[2];
my $flagarg = 4; # get from option
print $OUTFD "
if ((int)*ierr || !l$flagarg) {
@@ -2510,7 +2485,6 @@ sub bufaddr_out_arg {
sub bufaddr_ctof {
my $fvar = $_[0];
my $cvar = $_[1];
- my $count = $_[2];
}
# --------------------------------------------------------------------------
#
@@ -2531,10 +2505,6 @@ sub status_out_fnulltoc {
if (v$count == MPI_F_STATUS_IGNORE) { l$count = MPI_STATUS_IGNORE; }
else { l$count->MPI_ERROR = (int)(v$count\[2\]); }\n";
}
- elsif ($fixStatusAlignment) {
- print $OUTFD "\
- if (v$count == MPI_F_STATUS_IGNORE) { l$count = MPI_STATUS_IGNORE; }\n";
- }
else {
print $OUTFD "\
if (v$count == MPI_F_STATUS_IGNORE) { v$count = (MPI_Fint*)MPI_STATUS_IGNORE; }\n";
@@ -2546,26 +2516,11 @@ sub status_in_ftoc {
if ($within_fint) {
print $OUTFD " MPI_Status_f2c( v$count, l$count );\n";
}
- elsif ($fixStatusAlignment) {
- print $OUTFD "\
- if ( l$count != MPI_STATUS_IGNORE &&
- (((MPI_Aint)v$count) & MPIR_COUNT_ALIGNMENT) == 0 )
- l$count = (MPI_Status *)(void*)v$count;
- else {
- MPI_Status_f2c( v$count, l$count );
- }
-";
- }
-}
-sub status_inout_ftoc {
- my $count = $_[0];
- status_in_ftoc( $count );
}
sub status_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
my $testFlag = "";
if (defined($condition) && $condition ne "") {
@@ -2574,58 +2529,24 @@ sub status_out_ctof {
print $OUTFD
" if ($testFlag$coutvar != MPI_STATUS_IGNORE && $errparmlval == MPI_SUCCESS) {
MPI_Status_c2f($coutvar,$outvar);
- }\n";
- }
- elsif ($fixStatusAlignment) {
- # only copy if Fortran is not properly aligned
- print $OUTFD "\
- if ($coutvar != MPI_STATUS_IGNORE && $errparmlval == MPI_SUCCESS && $outvar != (MPI_Fint*)$coutvar) {
- MPI_Status_c2f($coutvar,$outvar);
- }\n";
+ }\n"
}
}
sub status_in_decl {
my $count = $_[0];
- if ($within_fint || $fixStatusAlignment) {
+ if ($within_fint) {
print $OUTFD " MPI_Status vtmp$count, *l$count = &vtmp$count;\n";
}
}
sub status_out_decl {
my $count = $_[0];
- if ($within_fint || $fixStatusAlignment) {
- print $OUTFD " MPI_Status vtmp$count, *l$count = &vtmp$count;\n";
- }
-}
-sub status_inout_decl {
- my $count = $_[0];
- if ($within_fint || $fixStatusAlignment) {
+ if ($within_fint) {
print $OUTFD " MPI_Status vtmp$count, *l$count = &vtmp$count;\n";
}
}
-sub status_out_ftoc {
- my $count = $_[0];
- if ($fixStatusAlignment) {
- # The first (void *) cast helps suppress compiler warnings about
- # casting to a pointer with greater alignment (and which the
- # specific runtime check is used to ensure the alignments are
- # ok).
- # Horrible requirement: MPI Standard (see MPI-3, Section 3.2.5,
- # page 30, lines 39-43) implies that the MPI_ERROR field needs
- # to be *preserved*. Thus, if we have a temp status, we need to
- # either copy it to the temp status (as here) or *not* copy over
- # it when storing the result. This is simpler.
- print $OUTFD "\
- if (l$count != MPI_STATUS_IGNORE) {
- if ((((MPI_Aint)v$count) & MPIR_COUNT_ALIGNMENT) == 0)
- l$count = (MPI_Status*)(void *)v$count;
- else
- l$count->MPI_ERROR = ((MPI_Status*)(void*)v$count)->MPI_ERROR;
- }\n";
- }
-}
sub status_out_arg {
my $count = $_[0];
- if ($within_fint|| $fixStatusAlignment) {
+ if ($within_fint) {
print $OUTFD "l$count";
}
else {
@@ -2634,16 +2555,7 @@ sub status_out_arg {
}
sub status_in_arg {
my $count = $_[0];
- if ($within_fint || $fixStatusAlignment) {
- print $OUTFD "l$count";
- }
- else {
- print $OUTFD "(MPI_Status *)(v$count)";
- }
-}
-sub status_inout_arg {
- my $count = $_[0];
- if ($within_fint || $fixStatusAlignment) {
+ if ($within_fint) {
print $OUTFD "l$count";
}
else {
@@ -2693,7 +2605,6 @@ sub errcodesignore_out_ftoc {
sub errcodesignore_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
$asize = $Array_size;
@@ -2737,7 +2648,7 @@ sub status_array_out_fnulltoc {
&specialInitStatement( $OUTFD );
my $varname = "v";
my $varcast = "(MPI_Fint *)";
- if ($within_fint || $fixStatusAlignment) { $varname = "l"; $varcast = ""; }
+ if ($within_fint) { $varname = "l"; $varcast = ""; }
print $OUTFD "\
if (v$count == MPI_F_STATUSES_IGNORE) { $varname$count = ${varcast}MPI_STATUSES_IGNORE; }\n";
}
@@ -2755,26 +2666,11 @@ sub status_array_out_ftoc {
l$count\[li].MPI_ERROR = ((MPI_Status*)(void*)v$count)[li].MPI_ERROR;
}\n";
}
- elsif ($fixStatusAlignment) {
- print $OUTFD "\
- if (l$count != MPI_STATUSES_IGNORE) {
- if( (((MPI_Aint)v$count) & MPIR_COUNT_ALIGNMENT) == 0)
- l$count = (MPI_Status*)(void *)v$count;
- else {
- int li;
- lalloc$count = 1;
- l$count = (MPI_Status*)$malloc($Array_size * sizeof(MPI_Status));
- for (li=0; li<$Array_size; li++)
- l$count\[li].MPI_ERROR = ((MPI_Status*)(void*)v$count)[li].MPI_ERROR;
- }
- }\n";
- }
}
sub status_array_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
my $ActSize = $Array_size;
@@ -2794,38 +2690,17 @@ sub status_array_ctof {
}\n";
$clean_up .= " if ($coutvar != MPI_STATUSES_IGNORE) { $free($coutvar); }\n";
}
- elsif ($fixStatusAlignment) {
- my $ActSize = $Array_size;
- if (defined($nativeType) && $nativeType ne "") {
- $ActSize = $nativeType;
- }
- my $testFlag = "";
- if (defined($condition) && $condition ne "") {
- $testFlag = "$condition && "
- }
- print $OUTFD
-" if (${testFlag}lalloc$count) {
- int li;
- for (li=0; li<$ActSize; li++) {
- MPI_Status_c2f($coutvar+li,$outvar+li*MPIF_STATUS_SIZE);
- }
- }\n";
- $clean_up .= " if (lalloc$count) { $free($coutvar); }\n";
- }
}
sub status_array_out_decl {
my $count = $_[0];
if ($within_fint) {
print $OUTFD " MPI_Status *l$count=0;\n";
- }
- elsif ($fixStatusAlignment) {
- print $OUTFD " MPI_Status *l$count=0;\n int lalloc$count=0;\n";
}
}
sub status_array_out_arg {
my $count = $_[0];
- if ($within_fint || $fixStatusAlignment) {
+ if ($within_fint) {
print $OUTFD "l$count";
}
else {
@@ -2837,7 +2712,6 @@ sub status_array_out_arg {
sub aintToInt_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
print $OUTFD " if ($errparmlval == MPI_SUCCESS) *$outvar = (MPI_Fint)($coutvar);\n";
}
sub aintToInt_out_decl {
@@ -2875,7 +2749,6 @@ sub fint2int_ftoc {
sub fint2int_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
print $OUTFD " if ($errparmlval == MPI_SUCCESS) *$outvar = (MPI_Fint)$coutvar;\n";
}
@@ -2991,7 +2864,6 @@ sub fint2int_array_out_ftoc {
sub fint2int_array_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
my $asize = $Array_size;
if ($Array_size =~ /_commsize/) {
@@ -3225,16 +3097,16 @@ sub print_post_call {
$processing_routine = "${method}_${direction}_ctof";
# Prefer a specific choice matching the direction
if (defined(&$processing_routine)) {
- &$processing_routine( "l$count", "v$count", $count );
+ &$processing_routine( "l$count", "v$count" );
}
elsif ($direction eq "inout" &&
defined(&$processing_out_routine)) {
- &$processing_out_routine( "l$count", "v$count", $count );
+ &$processing_out_routine( "l$count", "v$count" );
}
else {
$processing_routine = "${method}_ctof";
if (defined(&$processing_routine)) {
- &$processing_routine( "l$count", "v$count", $count );
+ &$processing_routine( "l$count", "v$count" );
}
elsif ($direction ne "in") {
print STDERR "Missing $processing_routine for $routine_name\n";
@@ -3282,7 +3154,6 @@ sub blankpad_out_ftoc {
sub blankpad_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
# find the null character. Replace with blanks from there to the
# end of the string. The declared lenght is given by a variable
@@ -3325,7 +3196,6 @@ sub blankpadonflag_out_ftoc {
sub blankpadonflag_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
# find the null character. Replace with blanks from there to the
# end of the string. The declared lenght is given by a variable
@@ -3649,7 +3519,6 @@ sub intToAintArr_in_arg {
sub intToAintArr_in_ctof {
my $lname = $_[0];
my $vname = $_[1];
- my $count = $_[2];
print $OUTFD "
#ifdef HAVE_AINT_LARGER_THAN_FINT
if ($lname) { $free($lname); }
@@ -3695,7 +3564,6 @@ sub FileToFint_out_decl {
sub FileToFint_ctof {
my $lvar = $_[0];
my $gvar = $_[1];
- my $count = $_[2];
print $OUTFD " *$gvar = MPI_File_c2f($lvar);\n";
}
sub FileToFint_out_arg {
@@ -4710,7 +4578,6 @@ print $OUTFD "\
return MPIR_Err_return_comm( 0, \"MPI_Status_f2c\", mpi_errno );
}\n";
if ($do_fint) {
- #FIXME: Invalid alignment assumptions on MPI_Count field.
print $OUTFD "\
#ifdef HAVE_FINT_IS_INT
*c_status = *(MPI_Status *) f_status;
@@ -4749,11 +4616,7 @@ print $OUTFD "\
#include \"mpi_fortimpl.h\"
/* mpierrs.h and mpierror.h for the error code creation */
#include \"mpierrs.h\"
-#include <stdio.h>\n";
- if ($fixStatusAlignment) {
- print $OUTFD "#include <string.h>\n";
- }
- print $OUTFD "\
+#include <stdio.h>
#include \"mpierror.h\"
/* -- Begin Profiling Symbol Block for routine MPI_Status_c2f */
@@ -4789,8 +4652,6 @@ int MPI_Status_c2f( const MPI_Status *c_status, MPI_Fint *f_status )
return MPIR_Err_return_comm( 0, \"MPI_Status_c2f\", mpi_errno );
}\n";
if ($do_fint) {
- #FIXME: Copy to f_status of MPI_Count data makes invalid alignment
- # data.
print $OUTFD "\
#ifdef HAVE_FINT_IS_INT
*(MPI_Status *)f_status = *c_status;
@@ -4803,24 +4664,14 @@ int MPI_Status_c2f( const MPI_Status *c_status, MPI_Fint *f_status )
#endif\n";
}
else {
- if ($fixStatusAlignment) {
- # Within this routine, MPI_STATUS_IGNORE is invalid
- print $OUTFD "\
- if ( (((MPI_Aint)f_status) & MPIR_COUNT_ALIGNMENT) == 0 )
- *(MPI_Status*)(void *)f_status = *c_status;
- else
- memcpy(f_status,c_status,sizeof(MPI_Status));
- \n";
- }
- else {
- print $OUTFD " *(MPI_Status *)f_status = *c_status;\n";
- }
+ print $OUTFD " *(MPI_Status *)f_status = *c_status;\n";
}
print $OUTFD "
return MPI_SUCCESS;
}\n";
close ($OUTFD);
&ReplaceIfDifferent( $filename, $filename . ".new" );
+
}
sub print_mpif_int {
http://git.mpich.org/mpich.git/commitdiff/fc20de53bea92d4997439c807acf3ca7f31d09f7
commit fc20de53bea92d4997439c807acf3ca7f31d09f7
Author: William Gropp <wgropp at illinois.edu>
Date: Wed Oct 23 16:53:33 2013 -0500
Force ordering of functions in C++ binding
This selects the buildiface option that specifies a specific ordering
of the routines in mpicxx.h(.in) in order to provide ABI consistency.
Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>
diff --git a/autogen.sh b/autogen.sh
index fc36562..97b84cb 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -722,7 +722,7 @@ if [ $do_bindings = "yes" ] ; then
if [ $build_cxx = "yes" ] ; then
echo_n "Building C++ interface... "
( cd src/binding/cxx && chmod a+x ./buildiface &&
- ./buildiface -nosep $otherarg )
+ ./buildiface -nosep -initfile=cxx.vlist $otherarg )
echo "done"
fi
fi
http://git.mpich.org/mpich.git/commitdiff/db07b81b46f186ab353482e9208dc4e5c4be05c0
commit db07b81b46f186ab353482e9208dc4e5c4be05c0
Author: William Gropp <wgropp at illinois.edu>
Date: Wed Oct 23 15:00:32 2013 -0500
Eliminate test for C++ Distgraphcomm routines
For MPICH builds, eliminate the C++ distgraphcomm test. In other cases
test for presense of MPI::Distgraphcomm and only include the test if
available.
Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>
diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore
index 0a49c65..30a5864 100644
--- a/test/mpi/.gitignore
+++ b/test/mpi/.gitignore
@@ -122,6 +122,7 @@
/comm/dupic
/comm/ctxalloc
/cxx/testlist
+/cxx/topo/testlist
/cxx/coll/uallreduce
/cxx/coll/ureduce
/cxx/coll/uscan
diff --git a/test/mpi/configure.ac b/test/mpi/configure.ac
index ed5e4e7..b800b14 100644
--- a/test/mpi/configure.ac
+++ b/test/mpi/configure.ac
@@ -1148,11 +1148,18 @@ if test "$enable_cxx" = yes ; then
fi
# Simple tests for which other languages we can handle
cxxdir="#"
+# The C++ interface added support for the Distgraph routines in MPI-2.2,
+# but not all MPI implementations support that. nocxxdistgraph allows
+# us to detect that and to skip the test when it is not supported.
+nocxxdistgraph="#"
AC_SUBST(cxxdir)
if test "$FROM_MPICH" = yes ; then
if test "$enable_cxx" = yes ; then
otherlangs="$otherlangs cxx"
cxxdir=cxx
+ # MPICH ABI removed support for MPI::Distgraphcomm, so
+ # nocxxdistgraph is left as #, which comments out the test
+ # in cxx/topol/testlist.in
fi
elif test "$enable_cxx" = yes ; then
AC_MSG_CHECKING([that we can build MPI programs with C++])
@@ -1171,8 +1178,29 @@ elif test "$enable_cxx" = yes ; then
],[
AC_MSG_RESULT(no)
])
+ # Check for support of the Distgraphcomm, added in MPI 2.2.
+ # Some MPI implementations may support MPI 2.2 or MPI 3.x, but not
+ # support the Distgraphcomm C++ interface
+ AC_MSG_CHECKING([whether MPI C++ includes Distgraphcomm])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([
+#include "mpi.h"
+ ],[
+ MPI::Distgraphcomm dcomm;
+ MPI::Init();
+ MPI::Finalize();
+ ])
+ ],[
+ AC_MSG_RESULT(yes)
+ nocxxdistgraph=""
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+
AC_LANG_POP([C++])
fi
+AC_SUBST(nocxxdistgraph)
+
if test "$enable_cxx" = yes ; then
AC_CACHE_CHECK([whether <iostream> available],pac_cv_cxx_has_iostream,[
AC_LANG_PUSH([C++])
@@ -1520,6 +1548,7 @@ AC_OUTPUT(maint/testmerge \
perf/Makefile \
testlist \
cxx/testlist \
+ cxx/topo/testlist \
f77/testlist \
f90/testlist \
threads/testlist \
diff --git a/test/mpi/cxx/topo/testlist b/test/mpi/cxx/topo/testlist
deleted file mode 100644
index 5f2f4cb..0000000
--- a/test/mpi/cxx/topo/testlist
+++ /dev/null
@@ -1 +0,0 @@
-distgraphcxx 8
diff --git a/test/mpi/cxx/topo/testlist.in b/test/mpi/cxx/topo/testlist.in
new file mode 100644
index 0000000..330e3d9
--- /dev/null
+++ b/test/mpi/cxx/topo/testlist.in
@@ -0,0 +1 @@
+ at nocxxdistgraph@distgraphcxx 8
http://git.mpich.org/mpich.git/commitdiff/098844117410cecab7d9a1c2e6295541076c7376
commit 098844117410cecab7d9a1c2e6295541076c7376
Author: William Gropp <wgropp at illinois.edu>
Date: Wed Oct 23 14:58:28 2013 -0500
Remove support for MPI::Distgraphcomm
Enhanced cxx/buildiface to output support for Distgraphcomm only if
requested through the feature interface. Distgraphcomm was added
only in MPI 2.2 and for historical reasons is not part of the
MPICH ABI.
Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>
diff --git a/src/binding/cxx/buildiface b/src/binding/cxx/buildiface
index 2c4b24d..3be7c08 100755
--- a/src/binding/cxx/buildiface
+++ b/src/binding/cxx/buildiface
@@ -1178,12 +1178,10 @@ class Intracomm;
class Cartcomm;
class Graphcomm;\n";
if ($do_DistGraphComm) {
- print $OUTFD "class Distgraphcomm;\n"
+ print $OUTFD "class Distgraphcomm;\n";
}
print $OUTFD "class File;\n\n";
-
-
#
# Add the base routines. Since these are not in any class, we
# place only their prototype in the header file. The
@@ -1310,7 +1308,7 @@ typedef int MPI_File;\
# Add a few more external functions (some require the above definitions)
@routines = keys(%class_mpi2base);
- if (defined(@routinesMpi2base)) {
+ if (defined(@routinesMpi2base)) {
@routines = @routinesMpi2base;
}
if ($outputRoutineLists) {
@@ -1965,7 +1963,7 @@ extern Datatype TWOINTEGER;
}
# Predefined integers
- foreach $int (BSEND_OVERHEAD, KEYVAL_INVALID, CART, GRAPH, DIST_GRAPH,
+ foreach $int (BSEND_OVERHEAD, KEYVAL_INVALID, CART, GRAPH,
IDENT, SIMILAR, CONGRUENT, UNEQUAL, PROC_NULL,
ANY_TAG, ANY_SOURCE, ROOT, TAG_UB, IO, HOST, WTIME_IS_GLOBAL,
UNIVERSE_SIZE, LASTUSEDCODE, APPNUM,
@@ -1977,6 +1975,11 @@ extern Datatype TWOINTEGER;
@errclasses, @typeclasses ) {
print $OUTFD "${extern}const int $int";
if ($giveValue) { print $OUTFD "= MPI_$int;\n"; }
+ else { print $OUTFD ";\n"; }
+ }
+ if ($do_DistGraphComm) {
+ print $OUTFD "${extern}const int DIST_GRAPH";
+ if ($giveValue) { print $OUTFD "= MPI_$int;\n"; }
else { print $OUTFD ";\n"; }
}
# Handle seek as a special case
@@ -2380,15 +2383,20 @@ MPIR_Comm_delete_attr_cxx_proxy(
MPI::Graphcomm c = comm;
return f( c, keyval, value, extra_state );
}
-#ifdef HAVE_CXX_DISTGRAPH_COMM
+EOT
+
+if ($do_DistGraphComm) {
+ print $OUTFD <<EOT;
else
{
MPI::Distgraphcomm c = comm;
return f( c, keyval, value, extra_state );
}
-#endif
+EOT
}
+ print $OUTFD <<EOT;
+}
static
int
MPIR_Comm_copy_attr_cxx_proxy(
@@ -2440,15 +2448,19 @@ MPIR_Comm_copy_attr_cxx_proxy(
MPI::Graphcomm c = comm;
return f( c, keyval, extra_state, value, new_value, *(bool*)flag );
}
-#ifdef HAVE_CXX_DISTGRAPH_COMM
- else
+EOT
+
+if ($do_DistGraphComm) {
+ print $OUTFD <<EOT;
+else
{
MPI::Distgraphcomm c = comm;
return f( c, keyval, extra_state, value, new_value, *(bool*)flag );
}
-#endif
+EOT
+}
+ print $OUTFD <<EOT;
}
-
int Comm::Create_keyval( Copy_attr_function *cf, Delete_attr_function *df, void *extra_state )
{
@@ -3875,8 +3887,8 @@ sub PrintRoutineDef {
# Hideous hack. To preserve ABI compatibility, for one particular
# case for Create struct, remove the const values
- if ($routine eq "Create_struct" && $arginfo eq "static:5:4") {
- print "$cArgs\n";
+ if ($routine eq "Create_struct" && $arginfo eq "static:5:4") {
+ #print "$cArgs\n";
$cDefArgs = $cArgs;
$cDefArgs =~ s/const\s+//g;
}
@@ -3884,7 +3896,7 @@ sub PrintRoutineDef {
$cDefArgs = $cArgs;
}
- &PrintMethodDef( $OUTFD, $class, $routine, $arginfo, $cDefArgs );
+ &PrintMethodDef( $OUTFD, $class, $routine, $arginfo, $cDefArgs );
# This inserts a modifier, such as const or =0 (for pure virtual)
if (defined($funcAttributes{$fnchash})) {
http://git.mpich.org/mpich.git/commitdiff/5f8c172b612112266264c8444a12ceea62393d31
commit 5f8c172b612112266264c8444a12ceea62393d31
Author: William Gropp <wgropp at illinois.edu>
Date: Mon Oct 21 14:27:47 2013 -0500
Detect unknown feature request
Improve buildiface for C++ to detect an unknown feature request with
the -feature= option and abort.
Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>
diff --git a/src/binding/cxx/buildiface b/src/binding/cxx/buildiface
index 5e2d20a..2c4b24d 100755
--- a/src/binding/cxx/buildiface
+++ b/src/binding/cxx/buildiface
@@ -127,6 +127,9 @@ foreach $_ (@ARGV) {
elsif ($value eq "off") { $value = 0; }
# Set the variable based on the string
$varname = "do_$name";
+ if (!defined($$varname)) {
+ die "Feature $name is unknown!\n";
+ }
$$varname = $value;
}
}
http://git.mpich.org/mpich.git/commitdiff/756f1cd656ebe029e819c9abf67c0b53fe960336
commit 756f1cd656ebe029e819c9abf67c0b53fe960336
Author: William Gropp <wgropp at illinois.edu>
Date: Mon Oct 21 11:39:59 2013 -0500
Add option to remove distgraph support in C++
In support of the standard ABI, this change allows us to provide the
Distgraphcomm support defined in MPI 2.2, as well as support the ABI,
which only supports MPI 2.1. This change is not complete in itself;
another commit is needed to select the ABI level in configure.
Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>
diff --git a/src/binding/cxx/buildiface b/src/binding/cxx/buildiface
index 2ef0cae..5e2d20a 100755
--- a/src/binding/cxx/buildiface
+++ b/src/binding/cxx/buildiface
@@ -85,10 +85,13 @@ $print_line_len = 0;
$gDebug = 0;
$gDebugRoutine = "NONE";
@mpilevels = ( 'mpi1' , 'mpi2' );
-#feature variables
+# feature variables (for the -feature commandline option)
$do_subdecls = 1;
+
+# Other features
$doCoverage = 0;
$doFuncspec = 1;
+$do_DistGraphComm = 0;
$outputRoutineLists = 0;
# Process environment variables
@@ -100,9 +103,9 @@ if (defined($ENV{"CXX_COVERAGE"}) && $ENV{"CXX_COVERAGE"} eq "yes") {
# Process arguments
#
# Args
-# -feature={logical,fint,subdecls,weak,bufptr}, separated by :, value given
+# -feature={subdecls}, separated by :, value given
# by =on or =off, eg
-# -feature=logical=on:fint=off
+# -feature=subdecls=on:fint=off
# The feature names mean:
# subdecls - Declarations for PC-C++ compilers added
# -routines=name - provide a list of routines or a file that
@@ -338,9 +341,10 @@ $specialReturnType{"cart-Split"} = "Cartcomm";
);
$specialReturnType{"graph-Dup"} = "Graphcomm";
$specialReturnType{"graph-Split"} = "Graphcomm";
-$specialReturnType{"distgraph-Dup"} = "Distgraphcomm";
-$specialReturnType{"distgraph-Split"} = "Distgraphcomm";
-
+if ($do_DistGraphComm) {
+ $specialReturnType{"distgraph-Dup"} = "Distgraphcomm";
+ $specialReturnType{"distgraph-Split"} = "Distgraphcomm";
+}
# Range routines will require special handling
# The Translate_ranks, Union, Intersect, Difference, and Compare routines are
@@ -689,9 +693,13 @@ if ($build_io) {
'win',
'file',
'graph',
- 'distgraph',
+# 'distgraph',
'cart',
);
+if ($do_DistGraphComm) {
+ $classes[$#classes+1] = 'distgraph';
+}
+
#
# Some classes have additional methods. This hash on the classes (by
@@ -705,7 +713,7 @@ if ($build_io) {
'inter' => 'Intercomm_methods',
'intra' => 'Intracomm_methods',
'graph' => 'Graphcomm_methods',
- 'distgraph' => 'Distgraphcomm_methods',
+# 'distgraph' => 'Distgraphcomm_methods',
'cart' => 'Cartcomm_methods',
'dtype' => 'Datatype_methods',
'op' => 'Op_methods',
@@ -713,6 +721,9 @@ if ($build_io) {
'win' => 'Win_methods',
'greq' => 'Grequest_methods',
);
+if ($do_DistGraphComm) {
+ $class_extra_fnc{'distgraph'} = 'Distgraphcomm_methods';
+}
# ----------------------------------------------------------------------------
# If there is a specific list of routines, replace the list with this
@@ -837,7 +848,7 @@ if ( -s "../../mpi/romio/include/mpio.h.in" ) {
'errh' => MPI_Errhandler,
'null' => MPI_Comm,
'graph' => MPI_Comm,
- 'distgraph' => MPI_Comm,
+# 'distgraph' => MPI_Comm,
'group' => MPI_Group,
'inter' => MPI_Comm,
'intra' => MPI_Comm,
@@ -851,6 +862,10 @@ if ( -s "../../mpi/romio/include/mpio.h.in" ) {
'file' => MPI_File,
'except' => 'int',
);
+if ($do_DistGraphComm) {
+ $class_type{'distgraph'} = 'MPI_Comm';
+}
+
#
# fullclassname gives the C++ binding class name for each shorthand version
%fullclassname = ( 'comm' => 'Comm',
@@ -858,7 +873,7 @@ if ( -s "../../mpi/romio/include/mpio.h.in" ) {
'dtype' => 'Datatype',
'errh' => 'Errhandler',
'graph' => 'Graphcomm',
- 'distgraph' => 'Distgraphcomm',
+# 'distgraph' => 'Distgraphcomm',
'group' => 'Group',
'null' => 'Nullcomm',
'inter' => 'Intercomm',
@@ -873,7 +888,9 @@ if ( -s "../../mpi/romio/include/mpio.h.in" ) {
'file' => 'File',
'except' => 'Exception',
);
-
+if ($do_DistGraphComm) {
+ $fullclassname{'distgraph'} = 'Distgraphcomm';
+}
#
# Each class may need to access internal elements of another class.
# This has gives the list of friends for each class (i.e., the
@@ -898,12 +915,16 @@ if ( -s "../../mpi/romio/include/mpio.h.in" ) {
'win' => '',
'file' => '',
);
-
+if (!$do_DistGraphComm) {
+ # Remove Distgraphcomm from the friends list
+ $class_friends{'comm'} = 'Cartcomm,Intercomm,Intracomm,Graphcomm,Nullcomm,Datatype,Win,File';
+ $class_friends{'intra'} = 'Cartcomm,Graphcomm,Datatype';
+}
#
# We also need to know the derived classes. This gives the class that
# a class is derived from. Base classes are not included here.
%derived_class = ( 'graph' => 'Intracomm',
- 'distgraph' => 'Intracomm',
+ # 'distgraph' => 'Intracomm',
'preq' => 'Request',
'greq' => 'Request',
'null' => 'Comm',
@@ -911,6 +932,9 @@ if ( -s "../../mpi/romio/include/mpio.h.in" ) {
'intra' => 'Comm',
'cart' => 'Intracomm',
);
+if ($do_DistGraphComm) {
+ $derived_class{'distgraph'} = 'Intracomm';
+}
#
# Maps all of the derived classes to their ultimate parent. This is
@@ -918,8 +942,8 @@ if ( -s "../../mpi/romio/include/mpio.h.in" ) {
# used to store the C version of the class handle.
%mytopclass = ( 'graph' => 'comm',
'graphcomm' => 'comm',
- 'distgraph' => 'comm',
- 'distgraphcomm' => 'comm',
+# 'distgraph' => 'comm',
+# 'distgraphcomm' => 'comm',
'nullcomm' => 'comm',
'intracomm' => 'comm',
'intercomm' => 'comm',
@@ -931,6 +955,10 @@ if ( -s "../../mpi/romio/include/mpio.h.in" ) {
'prequest' => 'request',
'greq' => 'request',
'preq' => 'request' );
+if ($do_DistGraphComm) {
+ $mytopclass{'distgraph'} = 'comm';
+ $mytopclass{'distgraphcomm'} = 'comm';
+}
#
# Many of the C++ binding names are easily derived from the C name.
@@ -1026,12 +1054,18 @@ if ( -s "../../mpi/romio/include/mpio.h.in" ) {
'graph-Get_neighbors_count' => 'Graph_neighbors_count',
'graph-Get_dims' => 'Graphdims_get',
'graph-Dup' => 'Comm_dup',
- 'distgraph-Dup' => 'Comm_dup',
- 'distgraph-Get_dist_neighbors' => 'Dist_graph_neighbors',
- 'distgraph-Get_dist_neighbors_count' => 'Dist_graph_neighbors_count',
+# 'distgraph-Dup' => 'Comm_dup',
+# 'distgraph-Get_dist_neighbors' => 'Dist_graph_neighbors',
+# 'distgraph-Get_dist_neighbors_count' => 'Dist_graph_neighbors_count',
'op-Is_commutative' => 'Op_commutative',
'op-Reduce_local' => 'Reduce_local',
);
+if ($do_DistGraphComm) {
+ $altname{'distgraph-Dup'} = 'Comm_dup';
+ $altname{'distgraph-Get_dist_neighbors'} = 'Dist_graph_neighbors';
+ $altname{'distgraph-Get_dist_neighbors_count'} =
+ 'Dist_graph_neighbors_count';
+}
# These routines must be defered because their implementations need
# definitions of classes that must be made later than the class that they
@@ -1050,9 +1084,13 @@ if ( -s "../../mpi/romio/include/mpio.h.in" ) {
'Nullcomm' => 1,
'Cartcomm' => 1,
'Graphcomm' => 1,
- 'Distgraphcomm' => 1,
+# 'Distgraphcomm' => 1,
'Prequest' => 1,
);
+if ($do_DistGraphComm) {
+ $class_has_no_compare{'Distgraphcomm'} = 1;
+}
+
# These classes do not have a default intialization
# These use the Full class name
%class_has_no_default = ( 'Status' => 1 );
@@ -1135,10 +1173,12 @@ class Nullcomm;
class Intercomm;
class Intracomm;
class Cartcomm;
-class Graphcomm;
-class Distgraphcomm;
-class File;
-\n";
+class Graphcomm;\n";
+if ($do_DistGraphComm) {
+ print $OUTFD "class Distgraphcomm;\n"
+}
+print $OUTFD "class File;\n\n";
+
#
@@ -2337,11 +2377,13 @@ MPIR_Comm_delete_attr_cxx_proxy(
MPI::Graphcomm c = comm;
return f( c, keyval, value, extra_state );
}
+#ifdef HAVE_CXX_DISTGRAPH_COMM
else
{
MPI::Distgraphcomm c = comm;
return f( c, keyval, value, extra_state );
}
+#endif
}
static
@@ -2395,11 +2437,13 @@ MPIR_Comm_copy_attr_cxx_proxy(
MPI::Graphcomm c = comm;
return f( c, keyval, extra_state, value, new_value, *(bool*)flag );
}
+#ifdef HAVE_CXX_DISTGRAPH_COMM
else
{
MPI::Distgraphcomm c = comm;
return f( c, keyval, extra_state, value, new_value, *(bool*)flag );
}
+#endif
}
@@ -2869,6 +2913,7 @@ void Datatype::Unpack( const void *inbuf, int insize, void *outbuf,
return v6;
}\n";
+ if ($do_DistGraphComm) {
print $OUTFD "\
Distgraphcomm Intracomm::Dist_graph_create( int v2, const int v3[], const int v4[], const int v5[], const int v6[], const MPI::Info &v7, bool v8 ) const
{
@@ -2934,6 +2979,7 @@ void Datatype::Unpack( const void *inbuf, int insize, void *outbuf,
return v10;
}\n";
+ } # check on distgraphcomm implemented
print $OUTFD "\
Intracomm Intercomm::Merge( bool v2 ) const
@@ -3671,6 +3717,7 @@ Intercomm Spawn_multiple(int count, const char* array_of_commands[], const char*
";
+ if ($do_DistGraphComm) {
# Because there are two versions of each of the dist graph
# create routines (fewer arguments for the case that uses
# MPI_UNWEIGHTED in C or Fortran), we must define these explicitly
@@ -3684,7 +3731,7 @@ Intercomm Spawn_multiple(int count, const char* array_of_commands[], const char*
virtual Distgraphcomm Dist_graph_create_adjacent( int v2, const int v3[], int v5, const int v6[], const MPI::Info &v8, bool v9 ) const;
\n";
-
+ }
}
sub Op_methods {
@@ -4165,6 +4212,11 @@ sub PrintRoutineCall {
my $useThis = 0;
my $TYPE = "OBJ", $obj = "COMM_WORLD";
+ if (!$do_DistGraphComm) {
+ if ($class eq "distgraph") {
+ die "PANIC: unexpected distgraph class when distgraph support disabled";
+ }
+ }
if ($class eq "comm" || $class eq "inter" || $class eq "intra" ||
$class eq "cart" || $class eq "graph" || $class eq "distgraph") {
$useThis = 1;
http://git.mpich.org/mpich.git/commitdiff/da9e5e5a428535b39dff43fcf9d431f0d2bd4ab1
commit da9e5e5a428535b39dff43fcf9d431f0d2bd4ab1
Author: William Gropp <wgropp at illinois.edu>
Date: Tue Oct 8 15:51:38 2013 -0500
Change buildiface for C++ to control output order
Add a way to output the order of function output in mpicxx.h.in file
and a way to read in a file specifying the order. This is used to
meet ABI needs. Also fixed some old MPI_xxx vs MPI::xxx cases, and
the almost duplicated Create_struct call. All in a single commit
because the test was against the proposed ABI mpicxx.h.in file
Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>
diff --git a/src/binding/cxx/buildiface b/src/binding/cxx/buildiface
index bd112f0..2ef0cae 100755
--- a/src/binding/cxx/buildiface
+++ b/src/binding/cxx/buildiface
@@ -55,6 +55,13 @@
# will have the correct type and some C++ compilers don't recognize NULL
# unless you include header files that needed it and are otherwise unneeded
# by the C++ interface)
+#
+# To fix the order of virtual methods, the arrays
+# @routinesMpi1base
+# @routinesMpi2base
+# @routines<classname>
+# may be defined. If these are not defined, then the order will be determined
+# by the perl implementation of the "keys" function.
#
# TODO:
# The derived classes (such as Intracomm) must *not* have their own
@@ -82,6 +89,8 @@ $gDebugRoutine = "NONE";
$do_subdecls = 1;
$doCoverage = 0;
$doFuncspec = 1;
+$outputRoutineLists = 0;
+
# Process environment variables
# CXX_COVERAGE - yes : turn on coverage code
if (defined($ENV{"CXX_COVERAGE"}) && $ENV{"CXX_COVERAGE"} eq "yes") {
@@ -99,7 +108,12 @@ if (defined($ENV{"CXX_COVERAGE"}) && $ENV{"CXX_COVERAGE"} eq "yes") {
# -routines=name - provide a list of routines or a file that
# lists the routines to use. The names must be in the same form as the
# the class_xxx variables. E.g., comm-Send, dtype-Commit.
+# -routinelist - output files containing the routines to output in the
+# classes (mostly as virtual functions) and the order in which they are output
+# This can be used to change the output order if it is desired to specify
+# a particular order.
$routine_list = "";
+$initFile = "";
foreach $_ (@ARGV) {
if (/--?feature=(.*)/) {
foreach $feature (split(/:/,$1)) {
@@ -125,7 +139,9 @@ foreach $_ (@ARGV) {
elsif (/--?routines=(.*)/) {
$routine_list = $1;
}
- elsif (/--?coverage/) { &setCoverage( 1 ); }
+ elsif (/--?routinelist/) { $outputRoutineLists = 1; }
+ elsif (/--?initfile=(.*)/) { $initFile = $1; }
+ elsif (/--?coverage/) { &setCoverage( 1 ); }
elsif (/--?nocoverage/) { &setCoverage( 0 ); }
else {
print STDERR "Unrecognized argument $_\n";
@@ -133,6 +149,10 @@ foreach $_ (@ARGV) {
}
if (! -d "../../mpi/romio") { $build_io = 0; }
+
+if ($initFile ne "" && -f $initFile) {
+ do $initFile;
+}
# ----------------------------------------------------------------------------
#
# The following hashes define each of the methods that belongs to each class.
@@ -292,11 +312,14 @@ $specialReturnType{"cart-Dup"} = "Cartcomm";
$specialReturnType{"cart-Sub"} = "Cartcomm";
$specialReturnType{"cart-Split"} = "Cartcomm";
-# Create_struct, Pack, and Unpack are handled through definitions elsewhere
+# Pack, and Unpack are handled through definitions elsewhere
+# Create_struct is also handled through definitions elsewhere, but for
+# compatibility with some previous versions, a slightly different
+# declaration is generated for this class.
%class_mpi1dtype = ( 'Create_contiguous' => 'MPI_Datatype',
'Create_vector' => 'MPI_Datatype',
'Create_indexed' => 'MPI_Datatype',
-# 'Create_struct' => 'static:5:4',
+ 'Create_struct' => 'static:5:4',
'Get_size' => 2,
'Commit' => 0,
'Free' => 0,
@@ -1126,12 +1149,25 @@ class File;
# and we'll want to use a few of them in the implementations of the
# other functions.
print $OUTFD "// base (classless) routines\n";
-foreach $routine (keys(%class_mpi1base)) {
+ at routines = keys(%class_mpi1base);
+if (defined(@routinesMpi1base)) {
+ @routines = @routinesMpi1base;
+}
+if ($outputRoutineLists) {
+ open (FD, ">order.mpi1base.txt" );
+ print FD "\@routinesMpi1base = (\n";
+}
+foreach $routine (@routines) {
+ print FD "\t\"$routine\",\n" if ($outputRoutineLists);
# These aren't really a class, so they don't use Begin/EndClass
$arginfo = $class_mpi1base{$routine};
print $OUTFD "extern ";
&PrintRoutineDef( $OUTFD, "base", $routine, $arginfo, 1 );
}
+if ($outputRoutineLists) {
+ print FD ");\n";
+ close (FD);
+}
# Forward references for externals, used in error handling
print $OUTFD "extern Intracomm COMM_WORLD;\n";
@@ -1178,13 +1214,23 @@ typedef int MPI_File;\
foreach $mpilevel (@mpilevels) {
$mpiclass = "$mpilevel$class";
$class_hash = "class_$mpiclass";
- foreach $routine (keys(%$class_hash)) {
- print "processing $routine\n" if $gDebug;
-
+ @routines = keys(%$class_hash);
+ $arrname = "routines$mpiclass";
+ if (defined(@$arrname)) {
+ @routines = @$arrname;
+ }
+ if ($#routines < 0) { next; }
+ if ($outputRoutineLists) {
+ open (FD, ">order.$arrname.txt" );
+ print FD "\@$arrname = (\n";
+ }
+ foreach $routine (@routines) {
+ print "processing $routine in $mpiclass\n" if $gDebug;
+ print FD "\t\"$routine\",\n" if ($outputRoutineLists);
# info describes the return parameter and any special
# processing for this routine.
$arginfo = $$class_hash{$routine};
-
+ print "Arginfo is $arginfo\n" if $gDebug;
&PrintRoutineDef( $OUTFD, $class, $routine, $arginfo, 0 );
# Check for Status as an arg (handle MPI_STATUS_IGNORE
@@ -1194,6 +1240,10 @@ typedef int MPI_File;\
$routine, $arginfo, 0 );
}
}
+ if ($outputRoutineLists) {
+ print FD ");\n";
+ close (FD);
+ }
}
if (defined($class_extra_fnc{$class})) {
$extrafnc = $class_extra_fnc{$class};
@@ -1216,13 +1266,26 @@ typedef int MPI_File;\
}
# Add a few more external functions (some require the above definitions)
- foreach $routine (keys(%class_mpi2base)) {
- # These aren't really a class, so they don't use Begin/EndClass
+ @routines = keys(%class_mpi2base);
+ if (defined(@routinesMpi2base)) {
+ @routines = @routinesMpi2base;
+ }
+ if ($outputRoutineLists) {
+ open (FD, ">order.$arrname.txt" );
+ print FD "\@routinesMpi2base = (\n";
+ }
+ foreach $routine (@routines) {
+ print FD "\t\"$routine\",\n" if ($outputRoutineLists);
+ # These aren't really a class, so they don't use Begin/EndClass
$arginfo = $class_mpi2base{$routine};
print $OUTFD "extern ";
#print "$routine - $arginfo\n";
&PrintRoutineDef( $OUTFD, "base", $routine, $arginfo, 1 );
}
+ if ($outputRoutineLists) {
+ print FD ");\n";
+ close (FD);
+ }
# Special case: the typedefs for the datarep function
# Only define these typedefs when MPI-IO is available (this is the same
# test as used for the rest of the I/O routines );
@@ -1531,10 +1594,13 @@ sub print_args {
print STDERR "Internal error. Could not find basetype\n";
print STDERR "This may be a bug in perl in the handling of certain expressions\n";
}
+ # Convert C to C++ types
+ $cxxtype = $basetype;
+ $cxxtype =~ s/MPI_//;
if ($extrabracks =~ /(\[[\d\s]*\])/) {
$otherdims = $1;
}
- print $OUTFD "$qualifier$basetype v$count\[\]$otherdims";
+ print $OUTFD "$qualifier$cxxtype v$count\[\]$otherdims";
}
elsif ($parm =~ /\.\.\./) {
# Special case for varargs. Only ints!
@@ -3757,7 +3823,18 @@ sub PrintRoutineDef {
($cArgs, $Croutine) = &GetCArgs( $class, $routine );
- &PrintMethodDef( $OUTFD, $class, $routine, $arginfo, $cArgs );
+ # Hideous hack. To preserve ABI compatibility, for one particular
+ # case for Create struct, remove the const values
+ if ($routine eq "Create_struct" && $arginfo eq "static:5:4") {
+ print "$cArgs\n";
+ $cDefArgs = $cArgs;
+ $cDefArgs =~ s/const\s+//g;
+ }
+ else {
+ $cDefArgs = $cArgs;
+ }
+
+ &PrintMethodDef( $OUTFD, $class, $routine, $arginfo, $cDefArgs );
# This inserts a modifier, such as const or =0 (for pure virtual)
if (defined($funcAttributes{$fnchash})) {
diff --git a/src/binding/cxx/cxx.vlist b/src/binding/cxx/cxx.vlist
new file mode 100644
index 0000000..1d436d3
--- /dev/null
+++ b/src/binding/cxx/cxx.vlist
@@ -0,0 +1,319 @@
+ at routinesMpi1base = (
+ "Detach_buffer",
+ "Is_initialized",
+ "Get_processor_name",
+ "Get_error_string",
+ "Compute_dims",
+ "Get_version",
+ "Finalize",
+ "Pcontrol",
+ "Attach_buffer",
+ "Get_error_class",
+);
+ at routinesmpi1cart = (
+ "Get_coords",
+ "Get_cart_rank",
+ "Get_dim",
+ "Dup",
+ "Get_topo",
+ "Map",
+ "Sub",
+ "Shift",
+);
+ at routinesmpi1comm = (
+ "Get_group",
+ "Get_rank",
+ "Bsend_init",
+ "Ssend_init",
+ "Is_inter",
+ "Rsend_init",
+ "Ibsend",
+ "Abort",
+ "Free",
+ "Send_init",
+ "Recv",
+ "Sendrecv",
+ "Sendrecv_replace",
+ "Get_topology",
+ "Isend",
+ "Probe",
+ "Compare",
+ "Get_size",
+ "Issend",
+ "Set_errhandler",
+ "Send",
+ "Irsend",
+ "Ssend",
+ "Recv_init",
+ "Iprobe",
+ "Bsend",
+ "Irecv",
+ "Get_errhandler",
+ "Rsend",
+);
+ at routinesmpi1distgraph = (
+ "Get_dist_neighbors_count",
+ "Dup",
+);
+ at routinesmpi1dtype = (
+ "Commit",
+ "Free",
+ "Create_indexed",
+ "Create_contiguous",
+ "Create_vector",
+ "Create_struct",
+ "Pack_size",
+ "Pack",
+ "Get_size",
+);
+ at routinesmpi1errh = (
+ "Free",
+);
+ at routinesmpi1graph = (
+ "Get_dims",
+ "Get_topo",
+ "Map",
+ "Get_neighbors",
+ "Get_neighbors_count",
+ "Dup",
+);
+ at routinesmpi1group = (
+ "Excl",
+ "Get_rank",
+ "Free",
+ "Union",
+ "Intersect",
+ "Range_excl",
+ "Range_incl",
+ "Difference",
+ "Translate_ranks",
+ "Incl",
+ "Get_size",
+ "Compare",
+);
+ at routinesmpi1inter = (
+ "Merge",
+ "Get_remote_group",
+ "Get_remote_size",
+ "Dup",
+);
+ at routinesmpi1intra = (
+ "Create_intercomm",
+ "Split",
+ "Create_graph",
+ "Create_cart",
+ "Create",
+ "Dup",
+ "Scan",
+);
+ at routinesmpi1op = (
+ "Free",
+);
+ at routinesmpi1preq = (
+ "Start",
+ "Startall",
+);
+ at routinesmpi1req = (
+ "Testany",
+ "Waitsome",
+ "Free",
+ "Testall",
+ "Wait",
+ "Testsome",
+ "Waitall",
+ "Waitany",
+ "Test",
+ "Cancel",
+);
+ at routinesmpi1st = (
+ "Is_cancelled",
+ "Get_elements",
+ "Get_count",
+);
+ at routinesMpi2base = (
+ "Add_error_class",
+ "Alloc_mem",
+ "Lookup_name",
+ "Publish_name",
+ "Unpublish_name",
+ "Get_address",
+ "Add_error_string",
+ "Query_thread",
+ "Close_port",
+ "Add_error_code",
+ "Free_mem",
+ "Open_port",
+ "Is_finalized",
+ "Is_thread_main",
+);
+ at routinesmpi2comm = (
+ "Reduce_scatter_block",
+ "Gatherv",
+ "Disconnect",
+ "Allreduce",
+ "Alltoallw",
+ "Join",
+ "Alltoall",
+ "Get_attr",
+ "Barrier",
+ "Bcast",
+ "Set_attr",
+ "Set_name",
+ "Get_parent",
+ "Alltoallv",
+ "Reduce_scatter",
+ "Scatter",
+ "Call_errhandler",
+ "Gather",
+ "Free_keyval",
+ "Reduce",
+ "Allgather",
+ "Delete_attr",
+ "Scatterv",
+ "Get_name",
+ "Allgatherv",
+);
+ at routinesmpi2distgraph = (
+ "Get_dist_neighbors",
+);
+ at routinesmpi2dtype = (
+ "Get_envelope",
+ "Create_hvector",
+ "Match_size",
+ "Create_resized",
+ "Create_indexed_block",
+ "Pack_external_size",
+ "Dup",
+ "Create_hindexed",
+ "Get_attr",
+ "Get_true_extent",
+ "Create_darray",
+ "Create_f90_real",
+ "Get_contents",
+ "Set_attr",
+ "Set_name",
+ "Create_f90_complex",
+ "Create_subarray",
+ "Unpack_external",
+ "Free_keyval",
+ "Create_struct",
+ "Create_f90_integer",
+ "Pack_external",
+ "Get_extent",
+ "Delete_attr",
+ "Get_name",
+);
+ at routinesmpi2file = (
+ "Get_type_extent",
+ "Read_ordered_end",
+ "Seek_shared",
+ "Read_ordered",
+ "Iread_shared",
+ "Get_info",
+ "Write_ordered_begin",
+ "Set_info",
+ "Write_ordered",
+ "Sync",
+ "Read",
+ "Write_all",
+ "Get_size",
+ "Write_all_end",
+ "Delete",
+ "Read_ordered_begin",
+ "Iread_at",
+ "Write_at_all_end",
+ "Get_position_shared",
+ "Write_shared",
+ "Iwrite_at",
+ "Get_view",
+ "Call_errhandler",
+ "Write_all_begin",
+ "Read_all_end",
+ "Get_byte_offset",
+ "Iread",
+ "Read_at_all_end",
+ "Write_at",
+ "Write_at_all_begin",
+ "Get_errhandler",
+ "Get_amode",
+ "Set_atomicity",
+ "Get_group",
+ "Get_position",
+ "Open",
+ "Seek",
+ "Read_all_begin",
+ "Read_at_all_begin",
+ "Read_all",
+ "Preallocate",
+ "Read_at_all",
+ "Read_shared",
+ "Iwrite",
+ "Iwrite_shared",
+ "Set_errhandler",
+ "Write_at_all",
+ "Set_size",
+ "Set_view",
+ "Read_at",
+ "Close",
+ "Write_ordered_end",
+ "Write",
+ "Get_atomicity",
+);
+ at routinesmpi2greq = (
+ "Complete",
+);
+ at routinesmpi2info = (
+ "Delete",
+ "Get_nthkey",
+ "Free",
+ "Create",
+ "Set",
+ "Dup",
+ "Get_valuelen",
+ "Get",
+ "Get_nkeys",
+);
+ at routinesmpi2inter = (
+ "Split",
+);
+ at routinesmpi2intra = (
+ "Exscan",
+ "Accept",
+ "Connect",
+);
+ at routinesmpi2op = (
+ "Is_commutative",
+ "Reduce_local",
+);
+ at routinesmpi2req = (
+ "Get_status",
+);
+ at routinesmpi2st = (
+ "Set_cancelled",
+ "Set_elements",
+);
+ at routinesmpi2win = (
+ "Get_group",
+ "Fence",
+ "Start",
+ "Free",
+ "Put",
+ "Wait",
+ "Test",
+ "Get",
+ "Get_attr",
+ "Set_attr",
+ "Complete",
+ "Set_errhandler",
+ "Set_name",
+ "Accumulate",
+ "Create",
+ "Call_errhandler",
+ "Free_keyval",
+ "Post",
+ "Unlock",
+ "Delete_attr",
+ "Lock",
+ "Get_errhandler",
+ "Get_name",
+);
-----------------------------------------------------------------------
Summary of changes:
autogen.sh | 2 +-
configure.ac | 121 +-------
src/binding/cxx/buildiface | 224 +++++++++++---
src/binding/cxx/cxx.vlist | 319 ++++++++++++++++++++
src/binding/f77/buildiface | 221 +++-----------
src/binding/f90/buildiface | 9 +-
src/include/mpi.h.in | 6 +-
src/include/mpiimpl.h | 76 ++++--
src/mpi/datatype/get_count.c | 8 +-
src/mpi/datatype/get_elements_x.c | 6 +-
src/mpi/datatype/status_set_elements_x.c | 2 +-
src/mpi/init/initthread.c | 5 -
src/mpi/pt2pt/ibsend.c | 2 +-
src/mpi/pt2pt/mpir_request.c | 8 +-
src/mpi/pt2pt/request_get_status.c | 10 +-
src/mpi/pt2pt/status_set_cancelled.c | 2 +-
src/mpi/romio/mpi-io/iotestall.c | 4 +-
src/mpi/romio/mpi-io/iotestany.c | 4 +-
src/mpi/romio/mpi-io/iowaitall.c | 4 +-
src/mpi/romio/mpi-io/iowaitany.c | 4 +-
.../ch3/channels/nemesis/netmod/mx/mx_cancel.c | 10 +-
src/mpid/ch3/channels/nemesis/netmod/mx/mx_poll.c | 6 +-
src/mpid/ch3/channels/nemesis/netmod/mx/mx_probe.c | 4 +-
.../channels/nemesis/netmod/newmad/newmad_cancel.c | 8 +-
.../channels/nemesis/netmod/newmad/newmad_poll.c | 6 +-
.../channels/nemesis/netmod/newmad/newmad_probe.c | 4 +-
.../channels/nemesis/netmod/portals4/ptl_impl.h | 2 +-
.../channels/nemesis/netmod/portals4/ptl_probe.c | 2 +-
.../channels/nemesis/netmod/portals4/ptl_recv.c | 4 +-
src/mpid/ch3/channels/nemesis/src/ch3_progress.c | 2 +-
src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c | 2 +-
src/mpid/ch3/include/mpidimpl.h | 4 +-
src/mpid/ch3/src/ch3u_buffer.c | 2 +-
src/mpid/ch3/src/ch3u_eager.c | 10 +-
src/mpid/ch3/src/ch3u_eagersync.c | 2 +-
src/mpid/ch3/src/ch3u_handle_recv_pkt.c | 8 +-
src/mpid/ch3/src/ch3u_recvq.c | 4 +-
src/mpid/ch3/src/ch3u_request.c | 14 +-
src/mpid/ch3/src/ch3u_rma_reqops.c | 4 +-
src/mpid/ch3/src/ch3u_rndv.c | 2 +-
src/mpid/ch3/src/mpid_cancel_recv.c | 4 +-
src/mpid/ch3/src/mpid_cancel_send.c | 12 +-
src/mpid/ch3/src/mpidi_isend_self.c | 6 +-
src/mpid/pamid/src/mpid_request.h | 4 +-
src/mpid/pamid/src/pt2pt/mpid_cancel.c | 4 +-
src/mpid/pamid/src/pt2pt/mpidi_callback_eager.c | 2 +-
src/mpid/pamid/src/pt2pt/mpidi_callback_rzv.c | 2 +-
src/mpid/pamid/src/pt2pt/mpidi_callback_short.c | 2 +-
src/mpid/pamid/src/pt2pt/mpidi_callback_util.c | 8 +-
src/mpid/pamid/src/pt2pt/mpidi_control.c | 2 +-
src/mpid/pamid/src/pt2pt/mpidi_done.c | 8 +-
src/mpid/pamid/src/pt2pt/mpidi_recvmsg.c | 8 +-
src/mpid/pamid/src/pt2pt/mpidi_rendezvous.c | 2 +-
src/mpid/pamid/src/pt2pt/mpidi_sendmsg.c | 2 +-
test/mpi/.gitignore | 1 +
test/mpi/configure.ac | 29 ++
test/mpi/cxx/topo/testlist | 1 -
test/mpi/cxx/topo/testlist.in | 1 +
test/mpi/pt2pt/large_message.c | 2 +-
59 files changed, 744 insertions(+), 493 deletions(-)
create mode 100644 src/binding/cxx/cxx.vlist
delete mode 100644 test/mpi/cxx/topo/testlist
create mode 100644 test/mpi/cxx/topo/testlist.in
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list