[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1b1-45-g66d8726

mysql vizuser noreply at mpich.org
Mon Sep 23 09:04:36 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  66d87263f13b6c388b1702b4deeb84bf1376d28e (commit)
       via  f6c6652f8fa48acabb04d897d6c1aa0c659fe408 (commit)
       via  5e0610ce6e6eeef3888b62c0c220a82349df2f09 (commit)
       via  f8f37925b728c1cb7d11f1c7721aca4ce57efabd (commit)
      from  177120ef3171e09c915182061c7d7ec426d46430 (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/66d87263f13b6c388b1702b4deeb84bf1376d28e

commit 66d87263f13b6c388b1702b4deeb84bf1376d28e
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date:   Fri Aug 16 15:41:58 2013 -0500

    Add a test mpit_vars.c to print all MPI_T stuffs
    
    In verbose mode, mpit_vars.c prints all MPI_T control variables, performance
    variables and categories defined in the MPI implementation.
    
    It is adapted from the code provided Bill Gropp.
    It needs more refinement when printing hierarchical categories.
    
    Also added mpit_vars to .gitignore.

diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore
index e5f8917..8155151 100644
--- a/test/mpi/.gitignore
+++ b/test/mpi/.gitignore
@@ -840,6 +840,7 @@
 /manual/spawntest_master
 /manual/testconnectserial
 /mpi_t/mpi_t_str
+/mpi_t/mpit_vars
 /perf/allredtrace
 /perf/commcreatep
 /perf/dtpack
diff --git a/test/mpi/mpi_t/Makefile.am b/test/mpi/mpi_t/Makefile.am
index 21d86ce..0cd2132 100644
--- a/test/mpi/mpi_t/Makefile.am
+++ b/test/mpi/mpi_t/Makefile.am
@@ -13,5 +13,5 @@ EXTRA_DIST = testlist
 ## file, we don't need per-target _SOURCES rules, automake will infer them
 ## correctly
 noinst_PROGRAMS =     \
-    mpi_t_str
-
+    mpi_t_str   \
+    mpit_vars
diff --git a/test/mpi/mpi_t/mpit_vars.c b/test/mpi/mpi_t/mpit_vars.c
new file mode 100644
index 0000000..3798764
--- /dev/null
+++ b/test/mpi/mpi_t/mpit_vars.c
@@ -0,0 +1,582 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2013 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+/* To print out all MPI_T control variables, performance variables and their
+   categories in the MPI implementation. But whether they function well as
+   expected, is not tested.
+ */
+
+#include <stdio.h>
+#include <strings.h>
+#include <string.h>     /* For strncpy */
+#include <stdlib.h>
+#include "mpi.h"
+
+char *mpit_scopeToStr(int scope);
+char *mpit_bindingToStr(int binding);
+char *mpit_validDtypeStr(MPI_Datatype datatype);
+char *mpit_varclassToStr(int varClass);
+char *mpit_verbosityToStr(int verbosity);
+int perfvarReadInt(int pvarIndex, int isContinuous, int *found);
+unsigned int perfvarReadUint(int pvarIndex, int isContinuous, int *found);
+double perfvarReadDouble(int pvarIndex, int isContinuous, int *found);
+int PrintControlVars(FILE * fp);
+int PrintPerfVars(FILE * fp);
+int PrintCategories(FILE * fp);
+
+static int verbose = 0;
+
+int main(int argc, char *argv[])
+{
+    int required, provided;
+    required = MPI_THREAD_SINGLE;
+
+    MPI_T_init_thread(required, &provided);
+    MPI_Init_thread(&argc, &argv, required, &provided);
+
+    PrintControlVars(stdout);
+    if (verbose)
+        fprintf(stdout, "\n");
+
+    PrintPerfVars(stdout);
+    if (verbose)
+        fprintf(stdout, "\n");
+
+    PrintCategories(stdout);
+
+    MPI_Finalize();
+    MPI_T_finalize();
+
+    fprintf(stdout, " No Errors\n");
+
+    return 0;
+}
+
+int PrintControlVars(FILE * fp)
+{
+    int i, num_cvar, nameLen, verbosity, descLen, binding, scope;
+    int ival, hasValue;
+    char name[128], desc[1024];
+    MPI_T_enum enumtype = MPI_T_ENUM_NULL;
+    MPI_Datatype datatype;
+
+    MPI_T_cvar_get_num(&num_cvar);
+    if (verbose)
+        fprintf(fp, "%d MPI Control Variables\n", num_cvar);
+    for (i = 0; i < num_cvar; i++) {
+        hasValue = 0;
+        nameLen = sizeof(name);
+        descLen = sizeof(desc);
+        MPI_T_cvar_get_info(i, name, &nameLen, &verbosity, &datatype,
+                            &enumtype, desc, &descLen, &binding, &scope);
+        if (datatype == MPI_INT && enumtype != MPI_T_ENUM_NULL) {
+            int enameLen, enumber;
+            char ename[128];
+            enameLen = sizeof(ename);
+            /* TODO: Extract a useful string to show for an enum */
+            MPI_T_enum_get_info(enumtype, &enumber, ename, &enameLen);
+        }
+        if (datatype == MPI_INT && binding == MPI_T_BIND_NO_OBJECT) {
+            int count;
+            MPI_T_cvar_handle chandle;
+            MPI_T_cvar_handle_alloc(i, NULL, &chandle, &count);
+            if (count == 1) {
+                MPI_T_cvar_read(chandle, &ival);
+                hasValue = 1;
+            }
+            MPI_T_cvar_handle_free(&chandle);
+        }
+
+        if (hasValue && verbose) {
+            fprintf(fp, "\t%s=%d\t%s\t%s\t%s\t%s\t%s\n",
+                    name,
+                    ival,
+                    mpit_scopeToStr(scope),
+                    mpit_bindingToStr(binding),
+                    mpit_validDtypeStr(datatype), mpit_verbosityToStr(verbosity), desc);
+        }
+        else if (verbose) {
+            fprintf(fp, "\t%s\t%s\t%s\t%s\t%s\t%s\n",
+                    name,
+                    mpit_scopeToStr(scope),
+                    mpit_bindingToStr(binding),
+                    mpit_validDtypeStr(datatype), mpit_verbosityToStr(verbosity), desc);
+        }
+    }
+
+    return 0;
+}
+
+int PrintPerfVars(FILE * fp)
+{
+    int i, numPvar, nameLen, descLen, verbosity, varClass;
+    int binding, isReadonly, isContinuous, isAtomic;
+    char name[128], desc[1024];
+    MPI_T_enum enumtype;
+    MPI_Datatype datatype;
+
+    MPI_T_pvar_get_num(&numPvar);
+    if (verbose)
+        fprintf(fp, "%d MPI Performance Variables\n", numPvar);
+
+    for (i = 0; i < numPvar; i++) {
+        nameLen = sizeof(name);
+        descLen = sizeof(desc);
+        MPI_T_pvar_get_info(i, name, &nameLen, &verbosity, &varClass,
+                            &datatype, &enumtype, desc, &descLen, &binding,
+                            &isReadonly, &isContinuous, &isAtomic);
+
+        if (verbose)
+            fprintf(fp, "\t%s\t%s\t%s\t%s\t%s\tReadonly=%s\tContinuous=%s\tAtomic=%s\t%s\n",
+                    name,
+                    mpit_varclassToStr(varClass),
+                    mpit_bindingToStr(binding),
+                    mpit_validDtypeStr(datatype),
+                    mpit_verbosityToStr(verbosity),
+                    isReadonly ? "T" : "F", isContinuous ? "T" : "F", isAtomic ? "T" : "F", desc);
+
+        if (datatype == MPI_INT) {
+            int val, isFound;
+            val = perfvarReadInt(i, isContinuous, &isFound);
+            if (isFound && verbose)
+                fprintf(fp, "\tValue = %d\n", val);
+        }
+        else if (datatype == MPI_UNSIGNED) {
+            int isFound;
+            unsigned int val;
+            val = perfvarReadUint(i, isContinuous, &isFound);
+            if (isFound && verbose)
+                fprintf(fp, "\tValue = %u\n", val);
+        }
+        else if (datatype == MPI_DOUBLE) {
+            int isFound;
+            double val;
+            val = perfvarReadDouble(i, isContinuous, &isFound);
+            if (isFound && verbose)
+                fprintf(fp, "\tValue = %e\n", val);
+        }
+    }
+    return 0;
+}
+
+int PrintCategories(FILE * fp)
+{
+    int i, j, numCat, nameLen, descLen, numCvars, numPvars, numSubcat;
+    char name[128], desc[1024];
+
+    MPI_T_category_get_num(&numCat);
+    if (verbose) {
+        if (numCat > 0)
+            fprintf(fp, "%d MPI_T categories\n", numCat);
+        else
+            fprintf(fp, "No categories defined\n");
+    }
+
+    for (i = 0; i < numCat; i++) {
+        MPI_T_category_get_info(i, name, &nameLen, desc, &descLen, &numCvars,
+                                &numPvars, &numSubcat);
+        if (verbose)
+            fprintf(fp, "Category %s has %d control variables, %d performance variables, \
+                %d subcategories\n", name, numCvars, numPvars, numSubcat);
+
+        if (numCvars > 0) {
+            if (verbose)
+                fprintf(fp, "\tControl variables include: ");
+            int *cvarIndex = (int *) malloc(numCvars * sizeof(int));
+            MPI_T_category_get_cvars(i, numCvars, cvarIndex);
+            for (j = 0; j < numCvars; j++) {
+                /* Get just the variable name */
+                int varnameLen, verbose, binding, scope;
+                MPI_Datatype datatype;
+                char varname[128];
+                varnameLen = sizeof(varname);
+                MPI_T_cvar_get_info(cvarIndex[j], varname, &varnameLen,
+                                    &verbose, &datatype, NULL, NULL, NULL, &binding, &scope);
+                if (verbose)
+                    fprintf(fp, "%s, ", varname);
+            }
+            free(cvarIndex);
+            if (verbose)
+                fprintf(fp, "\n");
+        }
+
+        if (numPvars > 0) {
+            if (verbose)
+                fprintf(fp, "\tPerformance variables include: ");
+
+            int *pvarIndex = (int *) malloc(numPvars * sizeof(int));
+            MPI_T_category_get_pvars(i, numPvars, pvarIndex);
+            for (j = 0; j < numPvars; j++) {
+                int varnameLen, verbose, varclass, binding;
+                int isReadonly, isContinuous, isAtomic;
+                MPI_Datatype datatype;
+                char varname[128];
+                varnameLen = sizeof(varname);
+                MPI_T_pvar_get_info(pvarIndex[j], varname, &varnameLen, &verbose,
+                                    &varclass, &datatype, NULL, NULL, NULL, &binding,
+                                    &isReadonly, &isContinuous, &isAtomic);
+                if (verbose)
+                    fprintf(fp, "%s, ", varname);
+
+            }
+            free(pvarIndex);
+            if (verbose)
+                fprintf(fp, "\n");
+        }
+
+        /* TODO: Make it possible to recursively print category information */
+        if (verbose)
+            fprintf(fp, "\tNumber of subcategories: %d\n", numSubcat);
+    }
+
+    return 0;
+}
+
+
+/* --- Support routines --- */
+
+char *mpit_validDtypeStr(MPI_Datatype datatype)
+{
+    char *p = 0;
+    if (datatype == MPI_INT)
+        p = "MPI_INT";
+    else if (datatype == MPI_UNSIGNED)
+        p = "MPI_UNSIGNED";
+    else if (datatype == MPI_UNSIGNED_LONG)
+        p = "MPI_UNSIGNED_LONG";
+    else if (datatype == MPI_UNSIGNED_LONG_LONG)
+        p = "MPI_UNSIGNED_LONG_LONG";
+    else if (datatype == MPI_COUNT)
+        p = "MPI_COUNT";
+    else if (datatype == MPI_CHAR)
+        p = "MPI_CHAR";
+    else if (datatype == MPI_DOUBLE)
+        p = "MPI_DOUBLE";
+    else {
+        if (datatype == MPI_DATATYPE_NULL) {
+            p = "Invalid MPI datatype:NULL";
+        }
+        else {
+            static char typename[MPI_MAX_OBJECT_NAME + 9];
+            int tlen;
+            strncpy(typename, "Invalid:", MPI_MAX_OBJECT_NAME);
+            MPI_Type_get_name(datatype, typename + 8, &tlen);
+            if (typename[0])
+                p = typename;
+        }
+    }
+
+    return p;
+}
+
+char *mpit_scopeToStr(int scope)
+{
+    char *p = 0;
+    switch (scope) {
+    case MPI_T_SCOPE_CONSTANT:
+        p = "SCOPE_CONSTANT";
+        break;
+    case MPI_T_SCOPE_READONLY:
+        p = "SCOPE_READONLY";
+        break;
+    case MPI_T_SCOPE_LOCAL:
+        p = "SCOPE_LOCAL";
+        break;
+    case MPI_T_SCOPE_GROUP:
+        p = "SCOPE_GROUP";
+        break;
+    case MPI_T_SCOPE_GROUP_EQ:
+        p = "SCOPE_GROUP_EQ";
+        break;
+    case MPI_T_SCOPE_ALL:
+        p = "SCOPE_ALL";
+        break;
+    case MPI_T_SCOPE_ALL_EQ:
+        p = "SCOPE_ALL_EQ";
+        break;
+    default:
+        p = "Unrecoginized scope";
+        break;
+    }
+    return p;
+}
+
+char *mpit_bindingToStr(int binding)
+{
+    char *p;
+    switch (binding) {
+    case MPI_T_BIND_NO_OBJECT:
+        p = "NO_OBJECT";
+        break;
+    case MPI_T_BIND_MPI_COMM:
+        p = "MPI_COMM";
+        break;
+    case MPI_T_BIND_MPI_DATATYPE:
+        p = "MPI_DATATYPE";
+        break;
+    case MPI_T_BIND_MPI_ERRHANDLER:
+        p = "MPI_ERRHANDLER";
+        break;
+    case MPI_T_BIND_MPI_FILE:
+        p = "MPI_FILE";
+        break;
+    case MPI_T_BIND_MPI_GROUP:
+        p = "MPI_GROUP";
+        break;
+    case MPI_T_BIND_MPI_OP:
+        p = "MPI_OP";
+        break;
+    case MPI_T_BIND_MPI_REQUEST:
+        p = "MPI_REQUEST";
+        break;
+    case MPI_T_BIND_MPI_WIN:
+        p = "MPI_WIN";
+        break;
+    case MPI_T_BIND_MPI_MESSAGE:
+        p = "MPI_MESSAGE";
+        break;
+    case MPI_T_BIND_MPI_INFO:
+        p = "MPI_INFO";
+        break;
+    default:
+        p = "Unknown object binding";
+    }
+    return p;
+}
+
+char *mpit_varclassToStr(int varClass)
+{
+    char *p = 0;
+    switch (varClass) {
+    case MPI_T_PVAR_CLASS_STATE:
+        p = "CLASS_STATE";
+        break;
+    case MPI_T_PVAR_CLASS_LEVEL:
+        p = "CLASS_LEVEL";
+        break;
+    case MPI_T_PVAR_CLASS_SIZE:
+        p = "CLASS_SIZE";
+        break;
+    case MPI_T_PVAR_CLASS_PERCENTAGE:
+        p = "CLASS_PERCENTAGE";
+        break;
+    case MPI_T_PVAR_CLASS_HIGHWATERMARK:
+        p = "CLASS_HIGHWATERMARK";
+        break;
+    case MPI_T_PVAR_CLASS_LOWWATERMARK:
+        p = "CLASS_LOWWATERMARK";
+        break;
+    case MPI_T_PVAR_CLASS_COUNTER:
+        p = "CLASS_COUNTER";
+        break;
+    case MPI_T_PVAR_CLASS_AGGREGATE:
+        p = "CLASS_AGGREGATE";
+        break;
+    case MPI_T_PVAR_CLASS_TIMER:
+        p = "CLASS_TIMER";
+        break;
+    case MPI_T_PVAR_CLASS_GENERIC:
+        p = "CLASS_GENERIC";
+        break;
+    default:
+        p = "Unrecognized pvar class";
+        break;
+    }
+    return p;
+}
+
+char *mpit_verbosityToStr(int verbosity)
+{
+    char *p = 0;
+    switch (verbosity) {
+    case MPI_T_VERBOSITY_USER_BASIC:
+        p = "VERBOSITY_USER_BASIC";
+        break;
+    case MPI_T_VERBOSITY_USER_DETAIL:
+        p = "VERBOSITY_USER_DETAIL";
+        break;
+    case MPI_T_VERBOSITY_USER_ALL:
+        p = "VERBOSITY_USER_ALL";
+        break;
+    case MPI_T_VERBOSITY_TUNER_BASIC:
+        p = "VERBOSITY_TUNER_BASIC";
+        break;
+    case MPI_T_VERBOSITY_TUNER_DETAIL:
+        p = "VERBOSITY_TUNER_DETAIL";
+        break;
+    case MPI_T_VERBOSITY_TUNER_ALL:
+        p = "VERBOSITY_TUNER_ALL";
+        break;
+    case MPI_T_VERBOSITY_MPIDEV_BASIC:
+        p = "VERBOSITY_MPIDEV_BASIC";
+        break;
+    case MPI_T_VERBOSITY_MPIDEV_DETAIL:
+        p = "VERBOSITY_MPIDEV_DETAIL";
+        break;
+    case MPI_T_VERBOSITY_MPIDEV_ALL:
+        p = "VERBOSITY_MPIDEV_ALL";
+        break;
+    default:
+        p = "Invalid verbosity";
+        break;
+    }
+    return p;
+}
+
+char *mpit_errclassToStr(int err)
+{
+    char *p = 0;
+    switch (err) {
+    case MPI_T_ERR_MEMORY:
+        p = "ERR_MEMORY";
+        break;
+    case MPI_T_ERR_NOT_INITIALIZED:
+        p = "ERR_NOT_INITIALIZED";
+        break;
+    case MPI_T_ERR_CANNOT_INIT:
+        p = "ERR_CANNOT_INIT";
+        break;
+    case MPI_T_ERR_INVALID_INDEX:
+        p = "ERR_INVALID_INDEX";
+        break;
+    case MPI_T_ERR_INVALID_ITEM:
+        p = "ERR_INVALID_ITEM";
+        break;
+    case MPI_T_ERR_INVALID_HANDLE:
+        p = "ERR_INVALID_HANDLE";
+        break;
+    case MPI_T_ERR_OUT_OF_HANDLES:
+        p = "ERR_OUT_OF_HANDLES";
+        break;
+    case MPI_T_ERR_OUT_OF_SESSIONS:
+        p = "ERR_OUT_OF_SESSIONS";
+        break;
+    case MPI_T_ERR_INVALID_SESSION:
+        p = "ERR_INVALID_SESSION";
+        break;
+    case MPI_T_ERR_CVAR_SET_NOT_NOW:
+        p = "ERR_CVAR_SET_NOT_NOW";
+        break;
+    case MPI_T_ERR_CVAR_SET_NEVER:
+        p = "ERR_CVAR_SET_NEVER";
+        break;
+    case MPI_T_ERR_PVAR_NO_STARTSTOP:
+        p = "ERR_PVAR_NO_STARTSTOP";
+        break;
+    case MPI_T_ERR_PVAR_NO_WRITE:
+        p = "ERR_PVAR_NO_WRITE";
+        break;
+    case MPI_T_ERR_PVAR_NO_ATOMIC:
+        p = "ERR_PVAR_NO_ATOMIC";
+        break;
+    default:
+        p = "Unknown MPI_T_ERR class";
+        break;
+    }
+    return p;
+}
+
+/* Return the value of the performance variable as the value */
+int perfvarReadInt(int pvarIndex, int isContinuous, int *found)
+{
+    int count, val = -1;
+    int err1 = MPI_SUCCESS;
+    int err2 = MPI_SUCCESS;
+    MPI_T_pvar_session session;
+    MPI_T_pvar_handle pvarHandle;
+    MPI_T_pvar_session_create(&session);
+    MPI_T_pvar_handle_alloc(session, pvarIndex, NULL, &pvarHandle, &count);
+    if (count == 1) {
+        *found = 1;
+        if (!isContinuous) {
+            /* start and stop the variable (just because we can) */
+            err1 = MPI_T_pvar_start(session, pvarHandle);
+            err2 = MPI_T_pvar_stop(session, pvarHandle);
+        }
+        MPI_T_pvar_read(session, pvarHandle, &val);
+    }
+    MPI_T_pvar_handle_free(session, &pvarHandle);
+    MPI_T_pvar_session_free(&session);
+
+    /* Above codes imply that err1 and err2 should be MPI_SUCCESS.
+     * If not, catch errors here, e.g., when MPI_ERR_INTERN is returned.
+     */
+    if (err1 != MPI_SUCCESS || err2 != MPI_SUCCESS) {
+        fprintf(stderr, "Unexpected MPI_T_pvar_start/stop return code\n");
+        abort();
+    }
+
+    return val;
+}
+
+/* Return the value of the performance variable as the value */
+unsigned int perfvarReadUint(int pvarIndex, int isContinuous, int *found)
+{
+    int count;
+    unsigned int val = 0;
+    int err1 = MPI_SUCCESS;
+    int err2 = MPI_SUCCESS;
+    MPI_T_pvar_session session;
+    MPI_T_pvar_handle pvarHandle;
+
+    *found = 0;
+    MPI_T_pvar_session_create(&session);
+    MPI_T_pvar_handle_alloc(session, pvarIndex, NULL, &pvarHandle, &count);
+    if (count == 1) {
+        *found = 1;
+        if (!isContinuous) {
+            /* start and stop the variable (just because we can) */
+            err1 = MPI_T_pvar_start(session, pvarHandle);
+            err2 = MPI_T_pvar_stop(session, pvarHandle);
+        }
+        MPI_T_pvar_read(session, pvarHandle, &val);
+    }
+    MPI_T_pvar_handle_free(session, &pvarHandle);
+    MPI_T_pvar_session_free(&session);
+
+    /* Above codes imply that err1 and err2 should be MPI_SUCCESS.
+     * If not, catch errors here, e.g., when MPI_ERR_INTERN is returned.
+     */
+    if (err1 != MPI_SUCCESS || err2 != MPI_SUCCESS) {
+        fprintf(stderr, "Unexpected MPI_T_pvar_start/stop return code\n");
+        abort();
+    }
+
+    return val;
+}
+
+double perfvarReadDouble(int pvarIndex, int isContinuous, int *found)
+{
+    int count;
+    double val = 0.0;
+    int err1 = MPI_SUCCESS;
+    int err2 = MPI_SUCCESS;
+    MPI_T_pvar_session session;
+    MPI_T_pvar_handle pvarHandle;
+
+    *found = 0;
+    MPI_T_pvar_session_create(&session);
+    MPI_T_pvar_handle_alloc(session, pvarIndex, NULL, &pvarHandle, &count);
+    if (count == 1) {
+        *found = 1;
+        if (!isContinuous) {
+            /* start and stop the variable (just because we can) */
+            err1 = MPI_T_pvar_start(session, pvarHandle);
+            err2 = MPI_T_pvar_stop(session, pvarHandle);
+        }
+        MPI_T_pvar_read(session, pvarHandle, &val);
+    }
+    MPI_T_pvar_handle_free(session, &pvarHandle);
+    MPI_T_pvar_session_free(&session);
+
+    /* Catch errors if MPI_T_pvar_start/stop are not properly implemented */
+    if (err1 != MPI_SUCCESS || err2 != MPI_SUCCESS) {
+        fprintf(stderr, "Unknown MPI_T return code when starting/stopping double pvar\n");
+        abort();
+    }
+
+    return val;
+}
diff --git a/test/mpi/mpi_t/testlist b/test/mpi/mpi_t/testlist
index 1426ac3..effe91f 100644
--- a/test/mpi/mpi_t/testlist
+++ b/test/mpi/mpi_t/testlist
@@ -1 +1,2 @@
 mpi_t_str 1 mpiversion=3.0 xfail=ticket1898
+mpit_vars 1 mpiversion=3.0

http://git.mpich.org/mpich.git/commitdiff/f6c6652f8fa48acabb04d897d6c1aa0c659fe408

commit f6c6652f8fa48acabb04d897d6c1aa0c659fe408
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date:   Wed Aug 14 17:12:38 2013 -0500

    Add the missing constant MPI_T_SCOPE_CONSTANT
    
    This commit will increase the ABI version. Fix #1904
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpi.h.in b/src/include/mpi.h.in
index 2234b8a..923df8d 100644
--- a/src/include/mpi.h.in
+++ b/src/include/mpi.h.in
@@ -632,7 +632,8 @@ enum MPIR_T_scope_t {
     MPIX_T_SCOPE_INVALID = 0,
 
     /* arbitrarily shift values to aid debugging and reduce accidental errors */
-    MPI_T_SCOPE_READONLY = 60439,
+    MPI_T_SCOPE_CONSTANT = 60438,
+    MPI_T_SCOPE_READONLY,
     MPI_T_SCOPE_LOCAL,
     MPI_T_SCOPE_GROUP,
     MPI_T_SCOPE_GROUP_EQ,

http://git.mpich.org/mpich.git/commitdiff/5e0610ce6e6eeef3888b62c0c220a82349df2f09

commit 5e0610ce6e6eeef3888b62c0c220a82349df2f09
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date:   Fri Aug 16 16:21:58 2013 -0500

    Return MPI_ERR_INTERN for not-impl MPI_T functions
    
    Some MPI_T functions return MPI_SUCCESS even when they are not implemented.
    Now return MPI_ERR_INTERN instead. Of course it is a temp fix.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/mpi_t/cat_changed.c b/src/mpi_t/cat_changed.c
index 3d20e11..989d102 100644
--- a/src/mpi_t/cat_changed.c
+++ b/src/mpi_t/cat_changed.c
@@ -30,7 +30,7 @@
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_T_category_changed_impl(int *stamp)
 {
-    int mpi_errno = MPI_SUCCESS;
+    int mpi_errno = MPI_ERR_INTERN;
 
     /* TODO implement this function */
 
diff --git a/src/mpi_t/cat_get_categories.c b/src/mpi_t/cat_get_categories.c
index 53c6904..5f61d63 100644
--- a/src/mpi_t/cat_get_categories.c
+++ b/src/mpi_t/cat_get_categories.c
@@ -30,7 +30,7 @@
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_T_category_get_categories_impl(int cat_index, int len, int indices[])
 {
-    int mpi_errno = MPI_SUCCESS;
+    int mpi_errno = MPI_ERR_INTERN;
 
     /* TODO implement this function */
 
diff --git a/src/mpi_t/cat_get_cvars.c b/src/mpi_t/cat_get_cvars.c
index 35788ca..cfdf92c 100644
--- a/src/mpi_t/cat_get_cvars.c
+++ b/src/mpi_t/cat_get_cvars.c
@@ -30,7 +30,7 @@
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_T_category_get_cvars_impl(int cat_index, int len, int indices[])
 {
-    int mpi_errno = MPI_SUCCESS;
+    int mpi_errno = MPI_ERR_INTERN;
 
     /* TODO implement this function */
 
diff --git a/src/mpi_t/cat_get_info.c b/src/mpi_t/cat_get_info.c
index cb76eb9..6f95643 100644
--- a/src/mpi_t/cat_get_info.c
+++ b/src/mpi_t/cat_get_info.c
@@ -30,7 +30,7 @@
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_T_category_get_info_impl(int cat_index, char *name, int *name_len, char *desc, int *desc_len, int *num_cvars, int *num_pvars, int *num_categories)
 {
-    int mpi_errno = MPI_SUCCESS;
+    int mpi_errno = MPI_ERR_INTERN;
 
     /* TODO implement this function */
 
diff --git a/src/mpi_t/cat_get_pv.c b/src/mpi_t/cat_get_pv.c
index 7a0e657..aeaf630 100644
--- a/src/mpi_t/cat_get_pv.c
+++ b/src/mpi_t/cat_get_pv.c
@@ -30,7 +30,7 @@
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_T_category_get_pvars_impl(int cat_index, int len, int indices[])
 {
-    int mpi_errno = MPI_SUCCESS;
+    int mpi_errno = MPI_ERR_INTERN;
 
     /* TODO implement this function */
 
diff --git a/src/mpi_t/enum_get_info.c b/src/mpi_t/enum_get_info.c
index ce2e6f6..7289b7f 100644
--- a/src/mpi_t/enum_get_info.c
+++ b/src/mpi_t/enum_get_info.c
@@ -30,7 +30,7 @@
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_T_enum_get_info_impl(MPI_T_enum enumtype, int *num, char *name, int *name_len)
 {
-    int mpi_errno = MPI_SUCCESS;
+    int mpi_errno = MPI_ERR_INTERN;
 
     /* TODO implement this function */
 
diff --git a/src/mpi_t/enum_get_item.c b/src/mpi_t/enum_get_item.c
index 06d3d78..4d8eec4 100644
--- a/src/mpi_t/enum_get_item.c
+++ b/src/mpi_t/enum_get_item.c
@@ -30,7 +30,7 @@
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_T_enum_get_item_impl(MPI_T_enum enumtype, int indx, int *value, char *name, int *name_len)
 {
-    int mpi_errno = MPI_SUCCESS;
+    int mpi_errno = MPI_ERR_INTERN;
 
     /* TODO implement this function */
 
diff --git a/src/mpi_t/pvar_readreset.c b/src/mpi_t/pvar_readreset.c
index a582d57..86fb6f5 100644
--- a/src/mpi_t/pvar_readreset.c
+++ b/src/mpi_t/pvar_readreset.c
@@ -30,7 +30,7 @@
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_T_pvar_readreset_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf)
 {
-    int mpi_errno = MPI_SUCCESS;
+    int mpi_errno = MPI_ERR_INTERN;
 
     /* TODO implement this function */
 
diff --git a/src/mpi_t/pvar_reset.c b/src/mpi_t/pvar_reset.c
index ddddf95..1e2fc72 100644
--- a/src/mpi_t/pvar_reset.c
+++ b/src/mpi_t/pvar_reset.c
@@ -30,7 +30,7 @@
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_T_pvar_reset_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle)
 {
-    int mpi_errno = MPI_SUCCESS;
+    int mpi_errno = MPI_ERR_INTERN;
 
     /* TODO implement this function */
 
diff --git a/src/mpi_t/pvar_start.c b/src/mpi_t/pvar_start.c
index 30383e3..8472b6c 100644
--- a/src/mpi_t/pvar_start.c
+++ b/src/mpi_t/pvar_start.c
@@ -30,7 +30,7 @@
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_T_pvar_start_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle)
 {
-    int mpi_errno = MPI_SUCCESS;
+    int mpi_errno = MPI_ERR_INTERN;
 
     /* TODO implement this function */
 
diff --git a/src/mpi_t/pvar_stop.c b/src/mpi_t/pvar_stop.c
index 5c5ce55..8cf85a3 100644
--- a/src/mpi_t/pvar_stop.c
+++ b/src/mpi_t/pvar_stop.c
@@ -30,7 +30,7 @@
 #define FCNAME MPIU_QUOTE(FUNCNAME)
 int MPIR_T_pvar_stop_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle)
 {
-    int mpi_errno = MPI_SUCCESS;
+    int mpi_errno = MPI_ERR_INTERN;
 
     /* TODO implement this function */
 

http://git.mpich.org/mpich.git/commitdiff/f8f37925b728c1cb7d11f1c7721aca4ce57efabd

commit f8f37925b728c1cb7d11f1c7721aca4ce57efabd
Author: Junchao Zhang <jczhang at bblogin2.mcs.anl.gov>
Date:   Tue Aug 13 16:25:15 2013 -0500

    Add MPI_T return codes. Fix #1905
    
    Add missing MPI_T error codes in mpi.h. Will increase the ABI version.
    
    Signed-off-by: Pavan Balaji <balaji at mcs.anl.gov>

diff --git a/src/include/mpi.h.in b/src/include/mpi.h.in
index ed0981d..2234b8a 100644
--- a/src/include/mpi.h.in
+++ b/src/include/mpi.h.in
@@ -813,10 +813,29 @@ typedef int (MPIX_Grequest_wait_function)(int, void **, double, MPI_Status *);
 #define MPI_ERR_RMA_SHARED 57       /* */
 #define MPI_ERR_RMA_FLAVOR 58       /* */
 
+/* Return codes for functions in the MPI Tool Information Interface */
+#define MPI_T_ERR_MEMORY            59  /* Out of memory */
+#define MPI_T_ERR_NOT_INITIALIZED   60  /* Interface not initialized */
+#define MPI_T_ERR_CANNOT_INIT       61  /* Interface not in the state to
+                                           be initialized */
+#define MPI_T_ERR_INVALID_INDEX     62  /* The index is invalid or
+                                           has been deleted  */
+#define MPI_T_ERR_INVALID_ITEM      63  /* Item index queried is out of range */
+#define MPI_T_ERR_INVALID_HANDLE    64  /* The handle is invalid */
+#define MPI_T_ERR_OUT_OF_HANDLES    65  /* No more handles available */
+#define MPI_T_ERR_OUT_OF_SESSIONS   66  /* No more sessions available */
+#define MPI_T_ERR_INVALID_SESSION   67  /* Session argument is not valid */
+#define MPI_T_ERR_CVAR_SET_NOT_NOW  68  /* Cvar can't be set at this moment */
+#define MPI_T_ERR_CVAR_SET_NEVER    69  /* Cvar can't be set until
+                                           end of execution */
+#define MPI_T_ERR_PVAR_NO_STARTSTOP 70  /* Pvar can't be started or stopped */
+#define MPI_T_ERR_PVAR_NO_WRITE     71  /* Pvar can't be written or reset */
+#define MPI_T_ERR_PVAR_NO_ATOMIC    72  /* Pvar can't be R/W atomically */
+
 #define MPI_ERR_LASTCODE    0x3fffffff  /* Last valid error code for a 
 					   predefined error class */
 /* WARNING: this is also defined in mpishared.h.  Update both locations */
-#define MPICH_ERR_LAST_CLASS 58     /* It is also helpful to know the
+#define MPICH_ERR_LAST_CLASS 72     /* It is also helpful to know the
 				       last valid class */
 /* End of MPI's error classes */
 
diff --git a/src/include/mpishared.h b/src/include/mpishared.h
index 8e04633..46a6bf1 100644
--- a/src/include/mpishared.h
+++ b/src/include/mpishared.h
@@ -62,7 +62,7 @@
 #include "mpierrs.h"
 
 /* FIXME: This is extracted from mpi.h.in, where it may not be appropriate */
-#define MPICH_ERR_LAST_CLASS 58     /* It is also helpful to know the
+#define MPICH_ERR_LAST_CLASS 72     /* It is also helpful to know the
 				       last valid class */
 
 #include "mpifunc.h"

-----------------------------------------------------------------------

Summary of changes:
 src/include/mpi.h.in           |   24 ++-
 src/include/mpishared.h        |    2 +-
 src/mpi_t/cat_changed.c        |    2 +-
 src/mpi_t/cat_get_categories.c |    2 +-
 src/mpi_t/cat_get_cvars.c      |    2 +-
 src/mpi_t/cat_get_info.c       |    2 +-
 src/mpi_t/cat_get_pv.c         |    2 +-
 src/mpi_t/enum_get_info.c      |    2 +-
 src/mpi_t/enum_get_item.c      |    2 +-
 src/mpi_t/pvar_readreset.c     |    2 +-
 src/mpi_t/pvar_reset.c         |    2 +-
 src/mpi_t/pvar_start.c         |    2 +-
 src/mpi_t/pvar_stop.c          |    2 +-
 test/mpi/.gitignore            |    1 +
 test/mpi/mpi_t/Makefile.am     |    4 +-
 test/mpi/mpi_t/mpit_vars.c     |  582 ++++++++++++++++++++++++++++++++++++++++
 test/mpi/mpi_t/testlist        |    1 +
 17 files changed, 620 insertions(+), 16 deletions(-)
 create mode 100644 test/mpi/mpi_t/mpit_vars.c


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list