[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b3-4-gc105d42

Service Account noreply at mpich.org
Thu Jun 4 09:16:11 CDT 2015

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  c105d422edaf19af14d492d784c432cf819ee92c (commit)
      from  27a5232a498ea4d853fb4a778fa7f3b0291fc774 (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 -----------------------------------------------------------------

commit c105d422edaf19af14d492d784c432cf819ee92c
Author: Lena Oden <loden at anl.gov>
Date:   Tue Jun 2 10:46:01 2015 -0500

    Check if type_tag is agnostic to modifiers.
    Add a test to configure.ac that tests, if type_tag_for_datatype is
    agnostic for modifiers as const or volatile.  If the test fails, the
    type_tag_for_datatype test is disabled in mpi.h by setting a flag to
    avoid compiler warning.  In this case, there are no type tests for MPI
    data types when compiling.
    Fixes #2223.
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/configure.ac b/configure.ac
index 141307b..44e7c97 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4433,6 +4433,29 @@ AC_SUBST([MPI_F77_CXX_FLOAT_COMPLEX])
+# ------------------------------------------------------------------------
+# Test if  type_tag_for_datatype is agnostic to modifiers such as const, volatile, and restrict
+# if not, the type tags are disabled to avoid compiler warings. A new type_tag for const etc. does
+# does not help, since only the latest type_tag definition is used. Type tags are defined in mpi.h,
+# therefore, they must be also be activated/deavtivated there
+typedef int TEST_Datatype;
+#define TEST_INT ((TEST_Datatype)0x44)
+static const TEST_Datatype test_int  __attribute__((type_tag_for_datatype(TEST,int)))  = TEST_INT;
+void test(const void* buffer, TEST_Datatype datatype)__attribute__((pointer_with_type_tag(TEST,1,2)));],[
+const int buf[10];
+test(buf, TEST_INT);],ac_attr_support=yes, ac_attr_support=no)
+if test "$ac_attr_support" = yes
 # ----------------------------------------------------------------------------
 # Check for the alignment rules moves with types int64_t etc.  These
 # are used in the datatype code to perform pack and unpack operations.  
diff --git a/src/include/mpi.h.in b/src/include/mpi.h.in
index 6d22fd9..41387a7 100644
--- a/src/include/mpi.h.in
+++ b/src/include/mpi.h.in
@@ -14,10 +14,12 @@
 extern "C" {
 #if defined(__has_attribute)
 #  if __has_attribute(pointer_with_type_tag) && \
       __has_attribute(type_tag_for_datatype) && \
+      !defined(NO_TAGS_WITH_MODIFIERS) &&\
 #    define MPICH_ATTR_POINTER_WITH_TYPE_TAG(buffer_idx, type_idx)  __attribute__((pointer_with_type_tag(MPI,buffer_idx,type_idx)))


Summary of changes:
 configure.ac         |   23 +++++++++++++++++++++++
 src/include/mpi.h.in |    2 ++
 2 files changed, 25 insertions(+), 0 deletions(-)

MPICH primary repository

More information about the commits mailing list