[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.3-196-gf0f2c00

Service Account noreply at mpich.org
Thu Nov 13 10:33:50 CST 2014


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  f0f2c00ae54e97450d34db4a66e4707892a9c674 (commit)
      from  06a9f9e6ace98b3c7cd479a88c5bbb310090307e (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/f0f2c00ae54e97450d34db4a66e4707892a9c674

commit f0f2c00ae54e97450d34db4a66e4707892a9c674
Author: Wesley Bland <wbland at anl.gov>
Date:   Thu Nov 13 10:21:51 2014 -0600

    Cleanup FT tests
    
    Some of the FT tests were not correctly setting their error handlers to
    MPI_ERRORS_RETURN. While this doesn't seem to have caused problems, it's
    safer to do so.
    
    This commit also cleans up some unused variables, reorders communicator
    creation, and correctly frees some variables to avoid some debugging
    output.
    
    Signed-off-by: Huiwei Lu <huiweilu at mcs.anl.gov>

diff --git a/test/mpi/ft/isendalive.c b/test/mpi/ft/isendalive.c
index e705e2b..8da1a48 100644
--- a/test/mpi/ft/isendalive.c
+++ b/test/mpi/ft/isendalive.c
@@ -22,6 +22,7 @@ int main(int argc, char **argv)
     MPI_Init(&argc, &argv);
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
     MPI_Comm_size(MPI_COMM_WORLD, &size);
+    MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
     if (size < 3) {
         fprintf( stderr, "Must run with at least 3 processes\n" );
         MPI_Abort(MPI_COMM_WORLD, 1);
diff --git a/test/mpi/ft/multi_isendalive.c b/test/mpi/ft/multi_isendalive.c
index d049a77..24a08c8 100644
--- a/test/mpi/ft/multi_isendalive.c
+++ b/test/mpi/ft/multi_isendalive.c
@@ -22,6 +22,8 @@ int main(int argc, char **argv)
     MPI_Init(&argc, &argv);
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
     MPI_Comm_size(MPI_COMM_WORLD, &size);
+    MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+
     if (size < 4) {
         fprintf( stderr, "Must run with at least 4 processes\n" );
         MPI_Abort(MPI_COMM_WORLD, 1);
diff --git a/test/mpi/ft/scatter.c b/test/mpi/ft/scatter.c
index d47dfc7..390abe2 100644
--- a/test/mpi/ft/scatter.c
+++ b/test/mpi/ft/scatter.c
@@ -32,6 +32,10 @@ int main(int argc, char **argv)
         MPI_Abort( MPI_COMM_WORLD, 1 );
     }
 
+    MPI_Comm_group(MPI_COMM_WORLD, &world);
+    MPI_Group_excl(world, 1, deadprocs, &newgroup);
+    MPI_Comm_create_group(MPI_COMM_WORLD, newgroup, 0, &newcomm);
+
     if (rank == 1) {
         exit(EXIT_FAILURE);
     }
@@ -76,10 +80,6 @@ int main(int argc, char **argv)
     }
 #endif
 
-    MPI_Comm_group(MPI_COMM_WORLD, &world);
-    MPI_Group_excl(world, 1, deadprocs, &newgroup);
-    MPI_Comm_create_group(MPI_COMM_WORLD, newgroup, 0, &newcomm);
-
     rc = MPI_Reduce(&errs, &toterrs, 1, MPI_INT, MPI_SUM, 0, newcomm);
     if(rc)
         fprintf(stderr, "Failed to get errors from other processes\n");
@@ -96,6 +96,10 @@ int main(int argc, char **argv)
 
     free(sendbuf);
 
+    MPI_Comm_free(&newcomm);
+    MPI_Group_free(&newgroup);
+    MPI_Group_free(&world);
+
     MPI_Finalize();
 
     return 0;
diff --git a/test/mpi/ft/sendalive.c b/test/mpi/ft/sendalive.c
index 4be21ff..8c87179 100644
--- a/test/mpi/ft/sendalive.c
+++ b/test/mpi/ft/sendalive.c
@@ -14,11 +14,12 @@
  */
 int main(int argc, char **argv)
 {
-    int rank, size, err;
+    int rank, err;
     char buf[10];
 
     MPI_Init(&argc, &argv);
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+    MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
 
     if (rank == 1) {
         exit(EXIT_FAILURE);
diff --git a/test/mpi/ft/shrink.c b/test/mpi/ft/shrink.c
index 6c5742c..d5494d7 100644
--- a/test/mpi/ft/shrink.c
+++ b/test/mpi/ft/shrink.c
@@ -17,8 +17,6 @@ int main(int argc, char **argv)
 {
     int rank, size, newsize, rc, errclass, errs = 0;
     MPI_Comm newcomm;
-    int sendbuf = 0;
-    int recvbuf = 0;
 
     MPI_Init(&argc, &argv);
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);

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

Summary of changes:
 test/mpi/ft/isendalive.c       |    1 +
 test/mpi/ft/multi_isendalive.c |    2 ++
 test/mpi/ft/scatter.c          |   12 ++++++++----
 test/mpi/ft/sendalive.c        |    3 ++-
 test/mpi/ft/shrink.c           |    2 --
 5 files changed, 13 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list