Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MPI_Abort can theorically fail. Add a call to exit() to ensure that the program...
[simgrid.git] / teshsuite / smpi / mpich3-test / coll / allred.c
index d33f876..e9becde 100644 (file)
@@ -368,6 +368,7 @@ int main( int argc, char **argv )
     if (size < 2) {
        fprintf( stderr, "At least 2 processes required\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     /* Set errors return so that we can provide better information 
@@ -383,6 +384,7 @@ int main( int argc, char **argv )
        if  (count <= 0) {
            fprintf( stderr, "Invalid count argument %s\n", argv[1] );
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
     }