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

mysql vizuser noreply at mpich.org
Tue Aug 13 10:21:18 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  c4f38ea6d2575cf53c1e6ce9f01e87dda006e495 (commit)
       via  ec8ca99206f7224e1368ba19a638f068b5f06625 (commit)
      from  83c3dde54260eea6a16cf1c39e0b115e33b64241 (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/c4f38ea6d2575cf53c1e6ce9f01e87dda006e495

commit c4f38ea6d2575cf53c1e6ce9f01e87dda006e495
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Tue Aug 13 10:19:43 2013 -0500

    add error checking to aio test
    
    Yet more error handling routines added to another I/O test that does not check errors.

diff --git a/test/mpi/io/async.c b/test/mpi/io/async.c
index 199fbd9..c38a485 100644
--- a/test/mpi/io/async.c
+++ b/test/mpi/io/async.c
@@ -20,9 +20,18 @@ static char MTEST_Descrip[] = "Test contig asynchronous I/O";
    reads them back. The file name is taken as a command-line argument,
    and the process rank is appended to it.*/ 
 
+static void handle_error(int errcode, char *str)
+{
+        char msg[MPI_MAX_ERROR_STRING];
+        int resultlen;
+        MPI_Error_string(errcode, msg, &resultlen);
+        fprintf(stderr, "%s: %s\n", str, msg);
+        MPI_Abort(MPI_COMM_WORLD, 1);
+}
+
 int main(int argc, char **argv)
 {
-    int *buf, i, rank, nints, len;
+    int *buf, i, rank, nints, len, err;
     char *filename=0, *tmp;
     int errs=0;
     int SIZE = DEFAULT_SIZE;
@@ -37,6 +46,7 @@ int main(int argc, char **argv)
     MTest_Init(&argc,&argv);
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
 
+
 /* process 0 takes the file name as a command-line argument and 
    broadcasts it to other processes */
     if (!rank) {
@@ -99,10 +109,14 @@ int main(int argc, char **argv)
     sprintf(filename, "%s.%d", tmp, rank);
     free(tmp);
 
-    MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, 
+    err = MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, 
                   MPI_INFO_NULL, &fh);
-    MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, (char*)"native", MPI_INFO_NULL);
-    MPI_File_iwrite(fh, buf, nints, MPI_INT, &request);
+    if (err != MPI_SUCCESS) handle_error(err, "MPI_File_open");
+
+    err = MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, (char*)"native", MPI_INFO_NULL);
+    if (err != MPI_SUCCESS) handle_error(err, "MPI_File_set_view");
+    err = MPI_File_iwrite(fh, buf, nints, MPI_INT, &request);
+    if (err != MPI_SUCCESS) handle_error(err, "MPI_File_iwrtie");
 #ifdef MPIO_USES_MPI_REQUEST
     MPI_Wait( &request, &status );
 #else    
@@ -113,10 +127,13 @@ int main(int argc, char **argv)
     /* reopen the file and read the data back */
 
     for (i=0; i<nints; i++) buf[i] = 0;
-    MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, 
+    err = MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, 
                   MPI_INFO_NULL, &fh);
-    MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, (char*)"native", MPI_INFO_NULL);
-    MPI_File_iread(fh, buf, nints, MPI_INT, &request);
+    if (err != MPI_SUCCESS) handle_error(err, "MPI_File_open (read)");
+    err = MPI_File_set_view(fh, 0, MPI_INT, MPI_INT, (char*)"native", MPI_INFO_NULL);
+    if (err != MPI_SUCCESS) handle_error(err, "MPI_File_set_view (read)");
+    err = MPI_File_iread(fh, buf, nints, MPI_INT, &request);
+    if (err != MPI_SUCCESS) handle_error(err, "MPI_File_iread");
 #ifdef MPIO_USES_MPI_REQUEST
     MPI_Wait( &request, &status );
 #else    

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

commit ec8ca99206f7224e1368ba19a638f068b5f06625
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Mon Aug 12 16:21:10 2013 -0500

    use AS_VAR_ARITH
    
    freebsd did not like this expr syntax for some reason. Since we require
    autoconf-2.67 or newer, let's use AS_VAR_ARITH and make portable shell scripts
    autoconf's problem

diff --git a/confdb/aclocal_runlog.m4 b/confdb/aclocal_runlog.m4
index dd9928f..f22e6dd 100644
--- a/confdb/aclocal_runlog.m4
+++ b/confdb/aclocal_runlog.m4
@@ -64,8 +64,7 @@ AC_DEFUN([PAC_VAR_PUSHVAL],[
 dnl define local m4-name pac_stk_level.
 AS_VAR_PUSHDEF([pac_stk_level], [pac_stk_$1_level])
 AS_VAR_SET_IF([pac_stk_level],[
-    dnl autoconf < 2.64 does not have AS_VAR_ARITH, so use expr instead.
-    AS_VAR_SET([pac_stk_level], [`expr $pac_stk_level + 1`])
+    AS_VAR_ARITH([pac_stk_level], [$pac_stk_level + 1])
 ],[
     AS_VAR_SET([pac_stk_level], [0])
 ])
@@ -109,8 +108,7 @@ AS_VAR_SET_IF([pac_stk_level],[
         dnl AS_ECHO_N(["POPVAL: pac_stk_level = $pac_stk_level, "])
         AS_VAR_COPY([$1],[pac_stk_$1_$pac_stk_level])
         dnl AS_ECHO(["popped_val = $$1"])
-        dnl autoconf < 2.64 does not have AS_VAR_ARITH, so use expr instead.
-        AS_VAR_SET([pac_stk_level], [`expr $pac_stk_level - 1`])
+        AS_VAR_ARITH([pac_stk_level], [ $pac_stk_level - 1 ])
     ])
 ],[
     AC_MSG_WARN(["Uninitialized PUSHVAL/POPVAL of $1"])

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

Summary of changes:
 confdb/aclocal_runlog.m4 |    6 ++----
 test/mpi/io/async.c      |   31 ++++++++++++++++++++++++-------
 2 files changed, 26 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list