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...
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 5 Nov 2013 15:54:24 +0000 (16:54 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 5 Nov 2013 16:54:52 +0000 (17:54 +0100)
69 files changed:
examples/smpi/NAS/FT/ft.f
teshsuite/smpi/alltoall_basic.c
teshsuite/smpi/mpich3-test/attr/attrerr.c
teshsuite/smpi/mpich3-test/attr/attrerrcomm.c
teshsuite/smpi/mpich3-test/attr/attrerrtype.c
teshsuite/smpi/mpich3-test/attr/attric.c
teshsuite/smpi/mpich3-test/attr/attrt.c
teshsuite/smpi/mpich3-test/coll/allgatherv4.c
teshsuite/smpi/mpich3-test/coll/allred.c
teshsuite/smpi/mpich3-test/coll/allred3.c
teshsuite/smpi/mpich3-test/coll/allred4.c
teshsuite/smpi/mpich3-test/coll/allred5.c
teshsuite/smpi/mpich3-test/coll/alltoall1.c
teshsuite/smpi/mpich3-test/coll/alltoallv.c
teshsuite/smpi/mpich3-test/coll/alltoallv0.c
teshsuite/smpi/mpich3-test/coll/alltoallw2.c
teshsuite/smpi/mpich3-test/coll/coll13.c
teshsuite/smpi/mpich3-test/coll/coll2.c
teshsuite/smpi/mpich3-test/coll/coll3.c
teshsuite/smpi/mpich3-test/coll/coll6.c
teshsuite/smpi/mpich3-test/coll/coll7.c
teshsuite/smpi/mpich3-test/coll/icalltoallv.c
teshsuite/smpi/mpich3-test/coll/icalltoallw.c
teshsuite/smpi/mpich3-test/coll/nonblocking.c
teshsuite/smpi/mpich3-test/coll/nonblocking2.c
teshsuite/smpi/mpich3-test/coll/nonblocking3.c
teshsuite/smpi/mpich3-test/coll/red3.c
teshsuite/smpi/mpich3-test/coll/red4.c
teshsuite/smpi/mpich3-test/coll/red_scat_block.c
teshsuite/smpi/mpich3-test/coll/redscat3.c
teshsuite/smpi/mpich3-test/coll/redscatbkinter.c
teshsuite/smpi/mpich3-test/coll/redscatblk3.c
teshsuite/smpi/mpich3-test/coll/redscatinter.c
teshsuite/smpi/mpich3-test/coll/scatterv.c
teshsuite/smpi/mpich3-test/coll/uoplong.c
teshsuite/smpi/mpich3-test/comm/cmfree.c
teshsuite/smpi/mpich3-test/comm/cmsplit.c
teshsuite/smpi/mpich3-test/comm/comm_create_group.c
teshsuite/smpi/mpich3-test/comm/comm_idup.c
teshsuite/smpi/mpich3-test/comm/commcreate1.c
teshsuite/smpi/mpich3-test/comm/ic1.c
teshsuite/smpi/mpich3-test/comm/ic2.c
teshsuite/smpi/mpich3-test/comm/iccreate.c
teshsuite/smpi/mpich3-test/comm/icsplit.c
teshsuite/smpi/mpich3-test/comm/probe-intercomm.c
teshsuite/smpi/mpich3-test/datatype/darray-cyclic.c
teshsuite/smpi/mpich3-test/datatype/getpartelm.c
teshsuite/smpi/mpich3-test/datatype/struct-ezhov.c
teshsuite/smpi/mpich3-test/datatype/tfree.c
teshsuite/smpi/mpich3-test/datatype/tresized.c
teshsuite/smpi/mpich3-test/datatype/tresized2.c
teshsuite/smpi/mpich3-test/f90/datatype/indtype.f90
teshsuite/smpi/mpich3-test/f90/datatype/structf.f90
teshsuite/smpi/mpich3-test/group/gtranks.c
teshsuite/smpi/mpich3-test/group/gtranksperf.c
teshsuite/smpi/mpich3-test/pt2pt/bottom.c
teshsuite/smpi/mpich3-test/pt2pt/bsendfrag.c
teshsuite/smpi/mpich3-test/pt2pt/bsendpending.c
teshsuite/smpi/mpich3-test/pt2pt/cancelrecv.c
teshsuite/smpi/mpich3-test/pt2pt/eagerdt.c
teshsuite/smpi/mpich3-test/pt2pt/large_message.c
teshsuite/smpi/mpich3-test/pt2pt/mprobe.c
teshsuite/smpi/mpich3-test/pt2pt/pscancel.c
teshsuite/smpi/mpich3-test/pt2pt/rqfreeb.c
teshsuite/smpi/mpich3-test/pt2pt/scancel.c
teshsuite/smpi/mpich3-test/pt2pt/scancel2.c
teshsuite/smpi/mpich3-test/pt2pt/sendall.c
teshsuite/smpi/mpich3-test/pt2pt/sendrecv3.c
teshsuite/smpi/mpich3-test/util/mtest.c

index 8ab25b9..5e3a3b0 100644 (file)
@@ -389,6 +389,7 @@ c---------------------------------------------------------------------
                write(*, 239) np1*np2, np
  239           format(' Product is ', i5, ' and should be ', i5)
                call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
                write(*, 239) np1*np2, np
  239           format(' Product is ', i5, ' and should be ', i5)
                call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
+               stop
             endif
 
 c---------------------------------------------------------------------
             endif
 
 c---------------------------------------------------------------------
@@ -402,6 +403,7 @@ c---------------------------------------------------------------------
  240           format(' Layout type specified in inputft.data is 
      >                  invalid ')
                call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
  240           format(' Layout type specified in inputft.data is 
      >                  invalid ')
                call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
+               stop
             endif
 
 c---------------------------------------------------------------------
             endif
 
 c---------------------------------------------------------------------
@@ -413,6 +415,7 @@ c---------------------------------------------------------------------
                write(*, 241)
  241           format(' For 0D layout, both np1 and np2 must be 1 ')
                call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
                write(*, 241)
  241           format(' For 0D layout, both np1 and np2 must be 1 ')
                call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
+               stop
             endif
 c---------------------------------------------------------------------
 c 4. 1D layout must be 1xN grid
             endif
 c---------------------------------------------------------------------
 c 4. 1D layout must be 1xN grid
@@ -422,6 +425,7 @@ c---------------------------------------------------------------------
                write(*, 242)
  242           format(' For 1D layout, np1 must be 1 ')
                call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
                write(*, 242)
  242           format(' For 1D layout, np1 must be 1 ')
                call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
+               stop
             endif
 
          else
             endif
 
          else
@@ -448,6 +452,7 @@ c---------------------------------------------------------------------
             write(*, 11) np
  11         format(' Only ',  i5, ' processors found ')
             call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
             write(*, 11) np
  11         format(' Only ',  i5, ' processors found ')
             call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
+            stop
          endif
 
  234     format(' No input file inputft.data. Using compiled defaults')
          endif
 
  234     format(' No input file inputft.data. Using compiled defaults')
index 90cc4aa..c3af311 100644 (file)
@@ -32,6 +32,7 @@ int main(int argc, char *argv[])
     perror("can't allocate send buffer");
     fflush(stderr);
     MPI_Abort(MPI_COMM_WORLD, EXIT_FAILURE);
     perror("can't allocate send buffer");
     fflush(stderr);
     MPI_Abort(MPI_COMM_WORLD, EXIT_FAILURE);
+    exit(EXIT_FAILURE);
   }
   rb = (int *) malloc(size * sizeof(int));
   if (!rb) {
   }
   rb = (int *) malloc(size * sizeof(int));
   if (!rb) {
@@ -39,6 +40,7 @@ int main(int argc, char *argv[])
     fflush(stderr);
     free(sb);
     MPI_Abort(MPI_COMM_WORLD, EXIT_FAILURE);
     fflush(stderr);
     free(sb);
     MPI_Abort(MPI_COMM_WORLD, EXIT_FAILURE);
+    exit(EXIT_FAILURE);
   }
   for (i = 0; i < size; ++i) {
     sb[i] = rank + 1;
   }
   for (i = 0; i < size; ++i) {
     sb[i] = rank + 1;
index 39e3611..907e4a5 100644 (file)
@@ -63,6 +63,7 @@ void abort_msg( const char *str, int code )
 {
     fprintf( stderr, "%s, err = %d\n", str, code );
     MPI_Abort( MPI_COMM_WORLD, code );
 {
     fprintf( stderr, "%s, err = %d\n", str, code );
     MPI_Abort( MPI_COMM_WORLD, code );
+    exit(code);
 }
 
 int test_communicators( void )
 }
 
 int test_communicators( void )
index df42e48..9384dd4 100644 (file)
@@ -63,6 +63,7 @@ void abort_msg( const char *str, int code )
 {
     fprintf( stderr, "%s, err = %d\n", str, code );
     MPI_Abort( MPI_COMM_WORLD, code );
 {
     fprintf( stderr, "%s, err = %d\n", str, code );
     MPI_Abort( MPI_COMM_WORLD, code );
+    exit(code);
 }
 
 int test_communicators( void )
 }
 
 int test_communicators( void )
index d3d9a39..19a27cb 100644 (file)
@@ -65,6 +65,7 @@ void abort_msg( const char *str, int code )
 {
     fprintf( stderr, "%s, err = %d\n", str, code );
     MPI_Abort( MPI_COMM_WORLD, code );
 {
     fprintf( stderr, "%s, err = %d\n", str, code );
     MPI_Abort( MPI_COMM_WORLD, code );
+    exit(code);
 }
 
 int test_attrs( void )
 }
 
 int test_attrs( void )
index c71e96c..9b3b04c 100644 (file)
@@ -57,6 +57,7 @@ int delete_fn( MPI_Comm comm, int keyval, void *attribute_val,
     if ((MPI_Aint)attribute_val != (MPI_Aint)world_rank) {
        printf( "incorrect attribute value %d\n", *(int*)attribute_val );
        MPI_Abort(MPI_COMM_WORLD, 1005 );
     if ((MPI_Aint)attribute_val != (MPI_Aint)world_rank) {
        printf( "incorrect attribute value %d\n", *(int*)attribute_val );
        MPI_Abort(MPI_COMM_WORLD, 1005 );
+        exit(1005);
     }
     return MPI_SUCCESS;
 }
     }
     return MPI_SUCCESS;
 }
@@ -120,6 +121,7 @@ int test_communicators( void )
            printf( "dup_comm key_1 not found on %d\n", world_rank );
            fflush( stdout );
            MPI_Abort(MPI_COMM_WORLD, 3004 );
            printf( "dup_comm key_1 not found on %d\n", world_rank );
            fflush( stdout );
            MPI_Abort(MPI_COMM_WORLD, 3004 );
+            exit(3004);
        }
        
        if (value != world_rank) {
        }
        
        if (value != world_rank) {
@@ -127,6 +129,7 @@ int test_communicators( void )
            printf( "dup_comm key_1 value incorrect: %ld\n", (long)value );
            fflush( stdout );
            MPI_Abort(MPI_COMM_WORLD, 3005 );
            printf( "dup_comm key_1 value incorrect: %ld\n", (long)value );
            fflush( stdout );
            MPI_Abort(MPI_COMM_WORLD, 3005 );
+            exit(3005);
        }
 
        MPI_Attr_get(dup_comm, key_3, (void **)&vvalue, &flag );
        }
 
        MPI_Attr_get(dup_comm, key_3, (void **)&vvalue, &flag );
@@ -136,6 +139,7 @@ int test_communicators( void )
            printf( "dup_comm key_3 found!\n" );
            fflush( stdout );
            MPI_Abort(MPI_COMM_WORLD, 3008 );
            printf( "dup_comm key_3 found!\n" );
            fflush( stdout );
            MPI_Abort(MPI_COMM_WORLD, 3008 );
+            exit(3008);
        }
         MTestPrintfMsg(1, "Keyval_free key=%#x\n", key_1);
        MPI_Keyval_free(&key_1 );
        }
         MTestPrintfMsg(1, "Keyval_free key=%#x\n", key_1);
        MPI_Keyval_free(&key_1 );
index 4a94201..c52491d 100644 (file)
@@ -55,6 +55,7 @@ int delete_fn( MPI_Comm comm, int keyval, void *attribute_val,
     if ((MPI_Aint)attribute_val != (MPI_Aint)world_rank) {
        printf( "incorrect attribute value %d\n", *(int*)attribute_val );
        MPI_Abort(MPI_COMM_WORLD, 1005 );
     if ((MPI_Aint)attribute_val != (MPI_Aint)world_rank) {
        printf( "incorrect attribute value %d\n", *(int*)attribute_val );
        MPI_Abort(MPI_COMM_WORLD, 1005 );
+        exit(1005);
     }
     return MPI_SUCCESS;
 }
     }
     return MPI_SUCCESS;
 }
@@ -99,6 +100,7 @@ int test_communicators( void )
        errs++;
        printf( "incorrect rank in world comm: %d\n", rank );
        MPI_Abort(MPI_COMM_WORLD, 3001 );
        errs++;
        printf( "incorrect rank in world comm: %d\n", rank );
        MPI_Abort(MPI_COMM_WORLD, 3001 );
+        exit(3001);
     }
 
     n = world_size / 2;
     }
 
     n = world_size / 2;
@@ -130,6 +132,7 @@ int test_communicators( void )
            errs++;
            printf( "incorrect lo group rank: %d\n", rank ); fflush(stdout);
            MPI_Abort(MPI_COMM_WORLD, 3002 );
            errs++;
            printf( "incorrect lo group rank: %d\n", rank ); fflush(stdout);
            MPI_Abort(MPI_COMM_WORLD, 3002 );
+            exit(3002);
        }
        else {
            /* printf( "lo in\n" );FFLUSH; */
        }
        else {
            /* printf( "lo in\n" );FFLUSH; */
@@ -142,6 +145,7 @@ int test_communicators( void )
            errs++;
            printf( "rank : %d incorrect lo comm:\n", rank ); fflush(stdout);
            MPI_Abort(MPI_COMM_WORLD, 3003 );
            errs++;
            printf( "rank : %d incorrect lo comm:\n", rank ); fflush(stdout);
            MPI_Abort(MPI_COMM_WORLD, 3003 );
+            exit(3003);
        }
     }
 
        }
     }
 
@@ -192,6 +196,7 @@ int test_communicators( void )
            printf( "dup_comm key_1 not found on %d\n", world_rank );
            fflush( stdout );
            MPI_Abort(MPI_COMM_WORLD, 3004 );
            printf( "dup_comm key_1 not found on %d\n", world_rank );
            fflush( stdout );
            MPI_Abort(MPI_COMM_WORLD, 3004 );
+            exit(3004);
        }
        
        if (value != world_rank) {
        }
        
        if (value != world_rank) {
@@ -200,6 +205,7 @@ int test_communicators( void )
                    (long)value, world_rank );
            fflush( stdout );
            MPI_Abort(MPI_COMM_WORLD, 3005 );
                    (long)value, world_rank );
            fflush( stdout );
            MPI_Abort(MPI_COMM_WORLD, 3005 );
+            exit(3005);
        }
 
        MPI_Attr_get(dup_comm, key_3, (void **)&vvalue, &flag );
        }
 
        MPI_Attr_get(dup_comm, key_3, (void **)&vvalue, &flag );
@@ -209,6 +215,7 @@ int test_communicators( void )
            printf( "dup_comm key_3 found!\n" );
            fflush( stdout );
            MPI_Abort(MPI_COMM_WORLD, 3008 );
            printf( "dup_comm key_3 found!\n" );
            fflush( stdout );
            MPI_Abort(MPI_COMM_WORLD, 3008 );
+            exit(3008);
        }
        MPI_Keyval_free(&key_1 );
        MPI_Keyval_free(&key_3 );
        }
        MPI_Keyval_free(&key_1 );
        MPI_Keyval_free(&key_3 );
@@ -233,6 +240,7 @@ int test_communicators( void )
        errs++;
        printf( "incorrect split rank: %d\n", rank ); fflush(stdout);
        MPI_Abort(MPI_COMM_WORLD, 3009 );
        errs++;
        printf( "incorrect split rank: %d\n", rank ); fflush(stdout);
        MPI_Abort(MPI_COMM_WORLD, 3009 );
+        exit(3009);
     }
     
     MPI_Barrier(split_comm );
     }
     
     MPI_Barrier(split_comm );
@@ -251,6 +259,7 @@ int test_communicators( void )
        errs++;
        printf( "incorrect ident result: %d\n", result );
        MPI_Abort(MPI_COMM_WORLD, 3010 );
        errs++;
        printf( "incorrect ident result: %d\n", result );
        MPI_Abort(MPI_COMM_WORLD, 3010 );
+        exit(3010);
     }
     
     if (lo_comm != MPI_COMM_NULL) {
     }
     
     if (lo_comm != MPI_COMM_NULL) {
@@ -259,6 +268,7 @@ int test_communicators( void )
            errs++;
             printf( "incorrect congruent result: %d\n", result );
             MPI_Abort(MPI_COMM_WORLD, 3011 );
            errs++;
             printf( "incorrect congruent result: %d\n", result );
             MPI_Abort(MPI_COMM_WORLD, 3011 );
+            exit(3011);
        }
     }
     
        }
     }
     
@@ -274,6 +284,7 @@ int test_communicators( void )
        errs++;
        printf( "incorrect similar result: %d\n", result );
        MPI_Abort(MPI_COMM_WORLD, 3012 );
        errs++;
        printf( "incorrect similar result: %d\n", result );
        MPI_Abort(MPI_COMM_WORLD, 3012 );
+        exit(3012);
     }
     
     if (lo_comm != MPI_COMM_NULL) {
     }
     
     if (lo_comm != MPI_COMM_NULL) {
@@ -282,6 +293,7 @@ int test_communicators( void )
            errs++;
            printf( "incorrect unequal result: %d\n", result );
            MPI_Abort(MPI_COMM_WORLD, 3013 );
            errs++;
            printf( "incorrect unequal result: %d\n", result );
            MPI_Abort(MPI_COMM_WORLD, 3013 );
+            exit(3013);
        }
     }
     /*
        }
     }
     /*
index 963fd36..2ce422a 100644 (file)
@@ -71,6 +71,7 @@ int main(int argc, char ** argv)
        if (!displs) fprintf(stderr,"\tdispls of %zd bytes\n", comm_size * sizeof(int) );
         fflush(stderr);
         MPI_Abort(MPI_COMM_WORLD, -1);
        if (!displs) fprintf(stderr,"\tdispls of %zd bytes\n", comm_size * sizeof(int) );
         fflush(stderr);
         MPI_Abort(MPI_COMM_WORLD, -1);
+        exit(-1);
     }
 
     if (!comm_rank) {
     }
 
     if (!comm_rank) {
@@ -200,6 +201,7 @@ double run_test(long long msg_size, MPI_Comm comm, test_t test_type,
            if (tmp != (int)tmp) {
                fprintf( stderr, "Integer overflow in variable tmp\n" );
                MPI_Abort( MPI_COMM_WORLD, 1 );
            if (tmp != (int)tmp) {
                fprintf( stderr, "Integer overflow in variable tmp\n" );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
             recvcounts[i] = (int) tmp;
 
            }
             recvcounts[i] = (int) tmp;
 
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 );
     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 
     }
 
     /* 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 );
        if  (count <= 0) {
            fprintf( stderr, "Invalid count argument %s\n", argv[1] );
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
     }
 
        }
     }
 
index aaf8a23..cf16324 100644 (file)
@@ -182,10 +182,12 @@ int main( int argc, char *argv[] )
        buf = (int *)malloc( max_offset * sizeof(int) );
        if (!buf) {
            MPI_Abort( MPI_COMM_WORLD, 1 );
        buf = (int *)malloc( max_offset * sizeof(int) );
        if (!buf) {
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
        bufout = (int *)malloc( max_offset * sizeof(int) );
        if (!bufout) {
            MPI_Abort( MPI_COMM_WORLD, 1 );
        }
        bufout = (int *)malloc( max_offset * sizeof(int) );
        if (!bufout) {
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
 
        initMat( comm, buf );
        }
 
        initMat( comm, buf );
index 32e0c00..1638657 100644 (file)
@@ -198,11 +198,13 @@ int main( int argc, char *argv[] )
            buf = (int *)malloc( count * 9 * sizeof(int) );
            if (!buf) {
                MPI_Abort( MPI_COMM_WORLD, 1 );
            buf = (int *)malloc( count * 9 * sizeof(int) );
            if (!buf) {
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
 
            bufout = (int *)malloc( count * 9 * sizeof(int) );
            if (!bufout) {
                MPI_Abort( MPI_COMM_WORLD, 1 );
            }
 
            bufout = (int *)malloc( count * 9 * sizeof(int) );
            if (!bufout) {
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
 
            for (i=0; i < count; i++) {
            }
 
            for (i=0; i < count; i++) {
index a442550..7bba665 100644 (file)
@@ -38,6 +38,7 @@ int main( int argc, char *argv[] )
            fprintf( stderr, "Unable to allocated space for buffers (%d)\n",
                     count );
            MPI_Abort( MPI_COMM_WORLD, 1 );
            fprintf( stderr, "Unable to allocated space for buffers (%d)\n",
                     count );
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
        for (i=0; i<count; i++) {
            bufin[i] = i;
        }
        for (i=0; i<count; i++) {
            bufin[i] = i;
index cd6d3d8..3e2a069 100644 (file)
@@ -53,6 +53,7 @@ int main( int argc, char *argv[] )
                errs++;
                fprintf( stderr, "Failed to allocate sendbuf and/or recvbuf\n" );
                MPI_Abort( MPI_COMM_WORLD, 1 );
                errs++;
                fprintf( stderr, "Failed to allocate sendbuf and/or recvbuf\n" );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
            for (i=0; i<count*size; i++) 
                recvbuf[i] = -1;
            }
            for (i=0; i<count*size; i++) 
                recvbuf[i] = -1;
index bcae133..484ebf7 100644 (file)
@@ -45,6 +45,7 @@ int main( int argc, char **argv )
       if (!sbuf || !rbuf) {
        fprintf( stderr, "Could not allocated buffers!\n" );
        MPI_Abort( comm, 1 );
       if (!sbuf || !rbuf) {
        fprintf( stderr, "Could not allocated buffers!\n" );
        MPI_Abort( comm, 1 );
+        exit(1);
       }
       
       /* Load up the buffers */
       }
       
       /* Load up the buffers */
@@ -61,6 +62,7 @@ int main( int argc, char **argv )
       if (!sendcounts || !recvcounts || !rdispls || !sdispls) {
        fprintf( stderr, "Could not allocate arg items!\n" );
        MPI_Abort( comm, 1 );
       if (!sendcounts || !recvcounts || !rdispls || !sdispls) {
        fprintf( stderr, "Could not allocate arg items!\n" );
        MPI_Abort( comm, 1 );
+        exit(1);
       }
       for (i=0; i<size; i++) {
        sendcounts[i] = i;
       }
       for (i=0; i<size; i++) {
        sendcounts[i] = i;
@@ -94,6 +96,7 @@ int main( int argc, char **argv )
       if (!rbuf) {
         fprintf( stderr, "Could not reallocate rbuf!\n" );
         MPI_Abort( comm, 1 );
       if (!rbuf) {
         fprintf( stderr, "Could not reallocate rbuf!\n" );
         MPI_Abort( comm, 1 );
+        exit(1);
       }
 
       /* Load up the buffers */
       }
 
       /* Load up the buffers */
index e1c8785..5890043 100644 (file)
@@ -49,6 +49,7 @@ int main( int argc, char **argv )
       if (!sendcounts || !recvcounts || !rdispls || !sdispls) {
        fprintf( stderr, "Could not allocate arg items!\n" );
        MPI_Abort( comm, 1 );
       if (!sendcounts || !recvcounts || !rdispls || !sdispls) {
        fprintf( stderr, "Could not allocate arg items!\n" );
        MPI_Abort( comm, 1 );
+        exit(1);
       }
 
       /* Get the neighbors */
       }
 
       /* Get the neighbors */
@@ -70,6 +71,7 @@ int main( int argc, char **argv )
          if (!sbuf || !rbuf) {
              fprintf( stderr, "Could not allocate buffers!\n" );
              MPI_Abort( comm, 1 );
          if (!sbuf || !rbuf) {
              fprintf( stderr, "Could not allocate buffers!\n" );
              MPI_Abort( comm, 1 );
+              exit(1);
          }
          
          /* Load up the buffers */
          }
          
          /* Load up the buffers */
index 7d40236..b3a000f 100644 (file)
@@ -47,6 +47,7 @@ int main( int argc, char **argv )
       if (!sbuf || !rbuf) {
        fprintf( stderr, "Could not allocated buffers!\n" );
        MPI_Abort( comm, 1 );
       if (!sbuf || !rbuf) {
        fprintf( stderr, "Could not allocated buffers!\n" );
        MPI_Abort( comm, 1 );
+        exit(1);
       }
       
       /* Load up the buffers */
       }
       
       /* Load up the buffers */
@@ -65,6 +66,7 @@ int main( int argc, char **argv )
       if (!sendcounts || !recvcounts || !rdispls || !sdispls || !sendtypes || !recvtypes) {
        fprintf( stderr, "Could not allocate arg items!\n" );
        MPI_Abort( comm, 1 );
       if (!sendcounts || !recvcounts || !rdispls || !sdispls || !sendtypes || !recvtypes) {
        fprintf( stderr, "Could not allocate arg items!\n" );
        MPI_Abort( comm, 1 );
+        exit(1);
       }
       /* Note that process 0 sends no data (sendcounts[0] = 0) */
       for (i=0; i<size; i++) {
       }
       /* Note that process 0 sends no data (sendcounts[0] = 0) */
       for (i=0; i<size; i++) {
@@ -101,6 +103,7 @@ int main( int argc, char **argv )
       if (!rbuf) {
         fprintf( stderr, "Could not reallocate rbuf!\n" );
         MPI_Abort( comm, 1 );
       if (!rbuf) {
         fprintf( stderr, "Could not reallocate rbuf!\n" );
         MPI_Abort( comm, 1 );
+        exit(1);
       }
 
       /* Load up the buffers */
       }
 
       /* Load up the buffers */
index 7e5b3c7..6c07269 100644 (file)
@@ -45,6 +45,7 @@ int main( int argc, char *argv[] )
            fprintf(stderr,"Unrecognized argument %s\n",
                    argv[i]);
            MPI_Abort(MPI_COMM_WORLD,EXIT_FAILURE);
            fprintf(stderr,"Unrecognized argument %s\n",
                    argv[i]);
            MPI_Abort(MPI_COMM_WORLD,EXIT_FAILURE);
+            exit(EXIT_FAILURE);
        }
     }
 
        }
     }
 
@@ -52,12 +53,14 @@ int main( int argc, char *argv[] )
     if ( !sb ) {
        perror( "can't allocate send buffer" );
        MPI_Abort(MPI_COMM_WORLD,EXIT_FAILURE);
     if ( !sb ) {
        perror( "can't allocate send buffer" );
        MPI_Abort(MPI_COMM_WORLD,EXIT_FAILURE);
+        exit(EXIT_FAILURE);
     }
     rb = (int *)malloc(size*chunk*sizeof(int));
     if ( !rb ) {
        perror( "can't allocate recv buffer");
        free(sb);
        MPI_Abort(MPI_COMM_WORLD,EXIT_FAILURE);
     }
     rb = (int *)malloc(size*chunk*sizeof(int));
     if ( !rb ) {
        perror( "can't allocate recv buffer");
        free(sb);
        MPI_Abort(MPI_COMM_WORLD,EXIT_FAILURE);
+        exit(EXIT_FAILURE);
     }
     for ( i=0 ; i < size*chunk ; ++i ) {
        sb[i] = rank + 1;
     }
     for ( i=0 ; i < size*chunk ; ++i ) {
        sb[i] = rank + 1;
index ae08c96..008aa71 100644 (file)
@@ -28,6 +28,7 @@ int main( int argc, char **argv )
        fprintf( stderr, "Number of processors must divide %d\n",
                MAX_PROCESSES );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        fprintf( stderr, "Number of processors must divide %d\n",
                MAX_PROCESSES );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
        }
     if ( (rank < participants) ) {
 
        }
     if ( (rank < participants) ) {
 
index 84260d1..8fa5cdf 100644 (file)
@@ -30,6 +30,7 @@ int main( int argc, char **argv )
        fprintf( stderr, "Number of processors must divide %d\n",
                MAX_PROCESSES );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        fprintf( stderr, "Number of processors must divide %d\n",
                MAX_PROCESSES );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
        }
     if ( (rank < participants) ) {
 
        }
     if ( (rank < participants) ) {
 
index 6e8ea36..0ab19de 100644 (file)
@@ -30,6 +30,7 @@ int main( int argc, char **argv )
        fprintf( stderr, "Number of processors must divide %d\n",
                MAX_PROCESSES );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        fprintf( stderr, "Number of processors must divide %d\n",
                MAX_PROCESSES );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
        }
     MPI_Comm_split(MPI_COMM_WORLD, rank<participants, rank, &test_comm);
 
        }
     MPI_Comm_split(MPI_COMM_WORLD, rank<participants, rank, &test_comm);
 
index 3d352ef..7cadace 100644 (file)
@@ -27,6 +27,7 @@ int main( int argc, char **argv )
        fprintf( stderr, "Number of processors must divide %d\n",
                MAX_PROCESSES );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        fprintf( stderr, "Number of processors must divide %d\n",
                MAX_PROCESSES );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
        }
     /* while (MAX_PROCESSES % participants) participants--; */
     if ( (rank < participants) ) {
        }
     /* while (MAX_PROCESSES % participants) participants--; */
     if ( (rank < participants) ) {
index 41123c3..2233923 100644 (file)
@@ -46,6 +46,7 @@ int main( int argc, char **argv )
       if (!sbuf || !rbuf) {
        fprintf( stderr, "Could not allocated buffers!\n" );
        MPI_Abort( comm, 1 );
       if (!sbuf || !rbuf) {
        fprintf( stderr, "Could not allocated buffers!\n" );
        MPI_Abort( comm, 1 );
+        exit(1);
       }
 
       /* Load up the buffers */
       }
 
       /* Load up the buffers */
@@ -62,6 +63,7 @@ int main( int argc, char **argv )
       if (!sendcounts || !recvcounts || !rdispls || !sdispls) {
        fprintf( stderr, "Could not allocate arg items!\n" );
        MPI_Abort( comm, 1 );
       if (!sendcounts || !recvcounts || !rdispls || !sdispls) {
        fprintf( stderr, "Could not allocate arg items!\n" );
        MPI_Abort( comm, 1 );
+        exit(1);
       }
       for (i=0; i<size; i++) {
        sendcounts[i] = i;
       }
       for (i=0; i<size; i++) {
        sendcounts[i] = i;
index 2b8252e..745bbb1 100644 (file)
@@ -49,6 +49,7 @@ int main( int argc, char **argv )
       if (!sbuf || !rbuf) {
        fprintf( stderr, "Could not allocated buffers!\n" );
        MPI_Abort( comm, 1 );
       if (!sbuf || !rbuf) {
        fprintf( stderr, "Could not allocated buffers!\n" );
        MPI_Abort( comm, 1 );
+        exit(1);
       }
       
       /* Load up the buffers */
       }
       
       /* Load up the buffers */
@@ -67,6 +68,7 @@ int main( int argc, char **argv )
       if (!sendcounts || !recvcounts || !rdispls || !sdispls || !sendtypes || !recvtypes) {
        fprintf( stderr, "Could not allocate arg items!\n" );
        MPI_Abort( comm, 1 );
       if (!sendcounts || !recvcounts || !rdispls || !sdispls || !sendtypes || !recvtypes) {
        fprintf( stderr, "Could not allocate arg items!\n" );
        MPI_Abort( comm, 1 );
+        exit(1);
       }
       /* Note that process 0 sends no data (sendcounts[0] = 0) */
       for (i=0; i<size; i++) {
       }
       /* Note that process 0 sends no data (sendcounts[0] = 0) */
       for (i=0; i<size; i++) {
index 8f49a99..97cfa58 100644 (file)
@@ -27,6 +27,7 @@
         if (!(cond_)) {                                                   \
             fprintf(stderr, "assertion (%s) failed, aborting\n", #cond_); \
             MPI_Abort(MPI_COMM_WORLD, 1);                                 \
         if (!(cond_)) {                                                   \
             fprintf(stderr, "assertion (%s) failed, aborting\n", #cond_); \
             MPI_Abort(MPI_COMM_WORLD, 1);                                 \
+            exit(1);                                                      \
         }                                                                 \
     } while (0)
 
         }                                                                 \
     } while (0)
 
index bc8a2c2..e607fad 100644 (file)
@@ -25,6 +25,7 @@
         if (!(cond_)) {                                                   \
             fprintf(stderr, "assertion (%s) failed, aborting\n", #cond_); \
             MPI_Abort(MPI_COMM_WORLD, 1);                                 \
         if (!(cond_)) {                                                   \
             fprintf(stderr, "assertion (%s) failed, aborting\n", #cond_); \
             MPI_Abort(MPI_COMM_WORLD, 1);                                 \
+            exit(1);                                                      \
         }                                                                 \
     } while (0)
 
         }                                                                 \
     } while (0)
 
index 2c0ab32..2afbc57 100644 (file)
@@ -405,6 +405,7 @@ static void start_random_nonblocking(MPI_Comm comm, unsigned int rndnum, MPI_Req
         default:
             fprintf(stderr, "unexpected value for l->case_num=%d)\n", (l->case_num));
             MPI_Abort(comm, 1);
         default:
             fprintf(stderr, "unexpected value for l->case_num=%d)\n", (l->case_num));
             MPI_Abort(comm, 1);
+            exit(1);
             break;
     }
 }
             break;
     }
 }
index 32358d9..a13561c 100644 (file)
@@ -160,9 +160,15 @@ int main( int argc, char *argv[] )
        MPI_Type_commit( &mattype );
        
        buf = (int *)malloc( count * size * size * sizeof(int) );
        MPI_Type_commit( &mattype );
        
        buf = (int *)malloc( count * size * size * sizeof(int) );
-       if (!buf) MPI_Abort( MPI_COMM_WORLD, 1 );
+       if (!buf) {
+          MPI_Abort( MPI_COMM_WORLD, 1 );
+          exit(1);
+        }
        bufout = (int *)malloc( count * size * size * sizeof(int) );
        bufout = (int *)malloc( count * size * size * sizeof(int) );
-       if (!bufout) MPI_Abort( MPI_COMM_WORLD, 1 );
+       if (!bufout) {
+          MPI_Abort( MPI_COMM_WORLD, 1 );
+          exit(1);
+        }
 
        for (root = 0; root < size; root ++) {
            initMat( comm, buf );
 
        for (root = 0; root < size; root ++) {
            initMat( comm, buf );
index a3e9183..abef5a8 100644 (file)
@@ -220,9 +220,15 @@ int main( int argc, char *argv[] )
        MPI_Type_commit( &mattype );
        
        buf = (int *)malloc( count * size * size * sizeof(int) );
        MPI_Type_commit( &mattype );
        
        buf = (int *)malloc( count * size * size * sizeof(int) );
-       if (!buf) MPI_Abort( MPI_COMM_WORLD, 1 );
+       if (!buf) {
+          MPI_Abort( MPI_COMM_WORLD, 1 );
+          exit(1);
+        }
        bufout = (int *)malloc( count * size * size * sizeof(int) );
        bufout = (int *)malloc( count * size * size * sizeof(int) );
-       if (!bufout) MPI_Abort( MPI_COMM_WORLD, 1 );
+       if (!bufout) {
+          MPI_Abort( MPI_COMM_WORLD, 1 );
+          exit(1);
+        }
 
        for (root = 0; root < size; root ++) {
            initMat( comm, buf );
 
        for (root = 0; root < size; root ++) {
            initMat( comm, buf );
index 7891cb6..71886e4 100644 (file)
@@ -42,6 +42,7 @@ int main(int argc, char **argv)
         err++;
         fprintf(stderr, "unable to allocate send/recv buffers, aborting");
         MPI_Abort(MPI_COMM_WORLD, 1);
         err++;
         fprintf(stderr, "unable to allocate send/recv buffers, aborting");
         MPI_Abort(MPI_COMM_WORLD, 1);
+        exit(1);
     }
     for (i=0; i<size; i++)
         sendbuf[i] = rank + i;
     }
     for (i=0; i<size; i++)
         sendbuf[i] = rank + i;
index d2ed7ec..9d3b7ad 100644 (file)
@@ -39,6 +39,7 @@ int main( int argc, char **argv )
        fprintf( stderr, "Could not allocate %d ints for recvcounts\n", 
                 size );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        fprintf( stderr, "Could not allocate %d ints for recvcounts\n", 
                 size );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     mycount = (1024 * 1024) / size;
     for (i=0; i<size; i++) 
     }
     mycount = (1024 * 1024) / size;
     for (i=0; i<size; i++) 
@@ -48,6 +49,7 @@ int main( int argc, char **argv )
        fprintf( stderr, "Could not allocate %d ints for sendbuf\n", 
                 mycount * size );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        fprintf( stderr, "Could not allocate %d ints for sendbuf\n", 
                 mycount * size );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     idx = 0;
     for (i=0; i<size; i++) {
     }
     idx = 0;
     for (i=0; i<size; i++) {
@@ -60,6 +62,7 @@ int main( int argc, char **argv )
        fprintf( stderr, "Could not allocate %d ints for recvbuf\n", 
                 mycount );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        fprintf( stderr, "Could not allocate %d ints for recvbuf\n", 
                 mycount );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     for (i=0; i<mycount; i++) {
        recvbuf[i] = -1;
     }
     for (i=0; i<mycount; i++) {
        recvbuf[i] = -1;
index bf5f65f..5810b5b 100644 (file)
@@ -58,6 +58,7 @@ int main( int argc, char **argv )
            fprintf( stderr, "Could not allocate %d ints for sendbuf\n", 
                     sendcount );
            MPI_Abort( MPI_COMM_WORLD, 1 );
            fprintf( stderr, "Could not allocate %d ints for sendbuf\n", 
                     sendcount );
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
 
        for (i=0; i<sendcount; i++) {
        }
 
        for (i=0; i<sendcount; i++) {
@@ -68,6 +69,7 @@ int main( int argc, char **argv )
            fprintf( stderr, "Could not allocate %d ints for recvbuf\n", 
                     recvcount );
            MPI_Abort( MPI_COMM_WORLD, 1 );
            fprintf( stderr, "Could not allocate %d ints for recvbuf\n", 
                     recvcount );
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
        for (i=0; i<recvcount; i++) {
            recvbuf[i] = (long long)(-i);
        }
        for (i=0; i<recvcount; i++) {
            recvbuf[i] = (long long)(-i);
index 5fb81e5..8341082 100644 (file)
@@ -38,6 +38,7 @@ int main( int argc, char **argv )
        fprintf( stderr, "Could not allocate %d ints for sendbuf\n", 
                 mycount * size );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        fprintf( stderr, "Could not allocate %d ints for sendbuf\n", 
                 mycount * size );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     idx = 0;
     for (i=0; i<size; i++) {
     }
     idx = 0;
     for (i=0; i<size; i++) {
@@ -50,6 +51,7 @@ int main( int argc, char **argv )
        fprintf( stderr, "Could not allocate %d ints for recvbuf\n", 
                 mycount );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        fprintf( stderr, "Could not allocate %d ints for recvbuf\n", 
                 mycount );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     MPI_Reduce_scatter_block( sendbuf, recvbuf, mycount, MPI_INT, MPI_SUM, 
     }
 
     MPI_Reduce_scatter_block( sendbuf, recvbuf, mycount, MPI_INT, MPI_SUM, 
index bebfd8a..f54da3c 100644 (file)
@@ -59,6 +59,7 @@ int main( int argc, char **argv )
            fprintf( stderr, "Could not allocate %d int for recvcounts\n", 
                     size );
            MPI_Abort( MPI_COMM_WORLD, 1 );
            fprintf( stderr, "Could not allocate %d int for recvcounts\n", 
                     size );
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
        for (i=0; i<size; i++) 
            recvcounts[i] = recvcount;
        }
        for (i=0; i<size; i++) 
            recvcounts[i] = recvcount;
@@ -68,6 +69,7 @@ int main( int argc, char **argv )
            fprintf( stderr, "Could not allocate %d ints for sendbuf\n", 
                     sendcount );
            MPI_Abort( MPI_COMM_WORLD, 1 );
            fprintf( stderr, "Could not allocate %d ints for sendbuf\n", 
                     sendcount );
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
 
        for (i=0; i<sendcount; i++) {
        }
 
        for (i=0; i<sendcount; i++) {
@@ -78,6 +80,7 @@ int main( int argc, char **argv )
            fprintf( stderr, "Could not allocate %d ints for recvbuf\n", 
                     recvcount );
            MPI_Abort( MPI_COMM_WORLD, 1 );
            fprintf( stderr, "Could not allocate %d ints for recvbuf\n", 
                     recvcount );
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
        for (i=0; i<recvcount; i++) {
            recvbuf[i] = (long long)(-i);
        }
        for (i=0; i<recvcount; i++) {
            recvbuf[i] = (long long)(-i);
index 6d8aa94..ea80da0 100644 (file)
@@ -119,12 +119,14 @@ int main( int argc, char **argv )
     recvbuf = (double *)malloc( nx * ny * sizeof(double) );
     if (!recvbuf) {
         MPI_Abort( MPI_COMM_WORLD, 1 );
     recvbuf = (double *)malloc( nx * ny * sizeof(double) );
     if (!recvbuf) {
         MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     sendbuf = 0;
     if (myrow == 0 && mycol == 0) {
         sendbuf = (double *)malloc( nx * ny * size * sizeof(double) );
         if (!sendbuf) {
             MPI_Abort( MPI_COMM_WORLD, 1 );
     }
     sendbuf = 0;
     if (myrow == 0 && mycol == 0) {
         sendbuf = (double *)malloc( nx * ny * size * sizeof(double) );
         if (!sendbuf) {
             MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
         }
     }
     sendcounts = (int *) malloc( size * sizeof(int) );
         }
     }
     sendcounts = (int *) malloc( size * sizeof(int) );
index 39f857d..3d6ca7e 100644 (file)
@@ -65,6 +65,7 @@ int main( int argc, char *argv[] )
            fprintf( stderr, "Unable to allocated %d words for data\n", 
                     3 * count );
            MPI_Abort( MPI_COMM_WORLD, 1 );
            fprintf( stderr, "Unable to allocated %d words for data\n", 
                     3 * count );
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
        for (i=0; i<count*3; i++) {
            outVal[i] = -1;
        }
        for (i=0; i<count*3; i++) {
            outVal[i] = -1;
index df37772..99e99c1 100644 (file)
@@ -44,6 +44,7 @@ int main( int argc, char *argv[] )
     if (size < 2) {
        fprintf( stderr, "This test requires at least two processes." );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     if (size < 2) {
        fprintf( stderr, "This test requires at least two processes." );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     source  = 0;
     }
 
     source  = 0;
index c5f103e..cd14521 100644 (file)
@@ -29,6 +29,7 @@ int main( int argc, char *argv[] )
     if (size < 4) {
        fprintf( stderr, "This test requires at least four processes." );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     if (size < 4) {
        fprintf( stderr, "This test requires at least four processes." );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     color = MPI_UNDEFINED;
     }
 
     color = MPI_UNDEFINED;
index edce6bb..8dc1df3 100644 (file)
@@ -25,6 +25,7 @@ int main(int argc, char *argv[])
     if (size % 2) {
         fprintf(stderr, "this program requires a multiple of 2 number of processes\n");
         MPI_Abort(MPI_COMM_WORLD, 1);
     if (size % 2) {
         fprintf(stderr, "this program requires a multiple of 2 number of processes\n");
         MPI_Abort(MPI_COMM_WORLD, 1);
+        exit(1);
     }
 
     excl = malloc((size / 2) * sizeof(int));
     }
 
     excl = malloc((size / 2) * sizeof(int));
index 0823943..1a56bd6 100644 (file)
@@ -45,6 +45,7 @@ int main(int argc, char **argv)
     if (size < 2) {
         printf("this test requires at least 2 processes\n");
         MPI_Abort(MPI_COMM_WORLD, 1);
     if (size < 2) {
         printf("this test requires at least 2 processes\n");
         MPI_Abort(MPI_COMM_WORLD, 1);
+        exit(1);
     }
 
 #ifdef TEST_IDUP
     }
 
 #ifdef TEST_IDUP
index edb60fd..e93f914 100644 (file)
@@ -25,6 +25,7 @@ void abortMsg( const char *str, int code )
     fprintf( stderr, "%s: errcode = %d, class = %d, msg = %s\n", 
             str, code, class, msg );
     MPI_Abort( MPI_COMM_WORLD, code );
     fprintf( stderr, "%s: errcode = %d, class = %d, msg = %s\n", 
             str, code, class, msg );
     MPI_Abort( MPI_COMM_WORLD, code );
+    exit(code);
 }
 
 int main( int argc, char *argv[] )
 }
 
 int main( int argc, char *argv[] )
index 7ab4e6e..9bb4a43 100644 (file)
@@ -24,6 +24,7 @@ int main( int argc, char *argv[] )
     if (size < 2) {
        printf( "Size must be at least 2\n" );
        MPI_Abort( MPI_COMM_WORLD, 0 );
     if (size < 2) {
        printf( "Size must be at least 2\n" );
        MPI_Abort( MPI_COMM_WORLD, 0 );
+        exit(0);
     }
 
     MPI_Comm_rank( MPI_COMM_WORLD, &rank );
     }
 
     MPI_Comm_rank( MPI_COMM_WORLD, &rank );
index 8385648..adf5449 100644 (file)
@@ -34,7 +34,7 @@ int main(int argc, char **argv)
     if (size < 33) {
         printf("ERROR: this test requires at least 33 processes\n");
         MPI_Abort(MPI_COMM_WORLD, 1);
     if (size < 33) {
         printf("ERROR: this test requires at least 33 processes\n");
         MPI_Abort(MPI_COMM_WORLD, 1);
-        return 1;
+        exit(1);
     }
 
     /* group of c0
     }
 
     /* group of c0
index 4b3cedd..ef3d363 100644 (file)
@@ -29,6 +29,7 @@ int main( int argc, char *argv[] )
     if (size < 4) {
        printf( "This test requires at least 4 processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     if (size < 4) {
        printf( "This test requires at least 4 processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     MPI_Comm_rank( MPI_COMM_WORLD, &wrank );
 
     }
     MPI_Comm_rank( MPI_COMM_WORLD, &wrank );
 
index 9ad2d51..ab5aeec 100644 (file)
@@ -28,6 +28,7 @@ int main( int argc, char *argv[] )
     if (size < 4) {
        printf( "This test requires at least 4 processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     if (size < 4) {
        printf( "This test requires at least 4 processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     while (MTestGetIntercomm( &intercomm, &isLeft, 2 )) {
     }
 
     while (MTestGetIntercomm( &intercomm, &isLeft, 2 )) {
index edd56e2..03c9e10 100644 (file)
@@ -32,6 +32,7 @@ int main( int argc, char *argv[] )
     if (size < 2) {
        fprintf( stderr, "This test requires at least two processes." );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     if (size < 2) {
        fprintf( stderr, "This test requires at least two processes." );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     while (MTestGetIntercomm( &intercomm, &isLeft, 2 )) {
     }
 
     while (MTestGetIntercomm( &intercomm, &isLeft, 2 )) {
index 90eea4a..9de2c59 100644 (file)
@@ -28,6 +28,7 @@ int main( int argc, char *argv[] )
     /* Test 1: Simple, 1-D cyclic decomposition */
     if (AllocateGrid( 1, 3*wsize, &srcArray, &destArray ) ) {
        MPI_Abort( MPI_COMM_WORLD, 1 );
     /* Test 1: Simple, 1-D cyclic decomposition */
     if (AllocateGrid( 1, 3*wsize, &srcArray, &destArray ) ) {
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     /* Simple cyclic with 1-dim global array */
     }
 
     /* Simple cyclic with 1-dim global array */
@@ -44,6 +45,7 @@ int main( int argc, char *argv[] )
     if (PackUnpack( darraytype, srcArray, destArray, 3 )) {
        fprintf( stderr, "Error in pack/unpack check\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     if (PackUnpack( darraytype, srcArray, destArray, 3 )) {
        fprintf( stderr, "Error in pack/unpack check\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     /* Now, check for correct data */
     for (i=0; i<3; i++) {
     }
     /* Now, check for correct data */
     for (i=0; i<3; i++) {
@@ -61,6 +63,7 @@ int main( int argc, char *argv[] )
     /* Test 2: Simple, 1-D cyclic decomposition, with block size=2 */
     if (AllocateGrid( 1, 4*wsize, &srcArray, &destArray ) ) {
        MPI_Abort( MPI_COMM_WORLD, 1 );
     /* Test 2: Simple, 1-D cyclic decomposition, with block size=2 */
     if (AllocateGrid( 1, 4*wsize, &srcArray, &destArray ) ) {
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     /* Simple cyclic with 1-dim global array */
     }
 
     /* Simple cyclic with 1-dim global array */
@@ -77,6 +80,7 @@ int main( int argc, char *argv[] )
     if (PackUnpack( darraytype, srcArray, destArray, 4 )) {
        fprintf( stderr, "Error in pack/unpack check\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     if (PackUnpack( darraytype, srcArray, destArray, 4 )) {
        fprintf( stderr, "Error in pack/unpack check\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     loc = 0;
     /* for each cyclic element */
     }
     loc = 0;
     /* for each cyclic element */
@@ -105,11 +109,13 @@ int main( int argc, char *argv[] )
     if (px * py != wsize) {
        fprintf( stderr, "An even number of processes is required\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     if (px * py != wsize) {
        fprintf( stderr, "An even number of processes is required\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     /* Cyclic/Cyclic */
     if (AllocateGrid( 5*px, 7*py, &srcArray, &destArray )) {
        MPI_Abort( MPI_COMM_WORLD, 1 );
     }
 
     /* Cyclic/Cyclic */
     if (AllocateGrid( 5*px, 7*py, &srcArray, &destArray )) {
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     /* Simple cyclic/cyclic. Note in C order, the [1] index varies most 
     }
 
     /* Simple cyclic/cyclic. Note in C order, the [1] index varies most 
@@ -131,6 +137,7 @@ int main( int argc, char *argv[] )
     if (PackUnpack( darraytype, srcArray, destArray, 5*7 )) {
        fprintf( stderr, "Error in pack/unpack check\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     if (PackUnpack( darraytype, srcArray, destArray, 5*7 )) {
        fprintf( stderr, "Error in pack/unpack check\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     loc = 0;
     }
 
     loc = 0;
@@ -153,6 +160,7 @@ int main( int argc, char *argv[] )
     /* Cyclic(2)/Cyclic(3) */
     if (AllocateGrid( 6*px, 4*py, &srcArray, &destArray )) {
        MPI_Abort( MPI_COMM_WORLD, 1 );
     /* Cyclic(2)/Cyclic(3) */
     if (AllocateGrid( 6*px, 4*py, &srcArray, &destArray )) {
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     /* Block cyclic/cyclic. Note in C order, the [1] index varies most 
     }
 
     /* Block cyclic/cyclic. Note in C order, the [1] index varies most 
@@ -174,6 +182,7 @@ int main( int argc, char *argv[] )
     if (PackUnpack( darraytype, srcArray, destArray, 4*6 )) {
        fprintf( stderr, "Error in pack/unpack check\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     if (PackUnpack( darraytype, srcArray, destArray, 4*6 )) {
        fprintf( stderr, "Error in pack/unpack check\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     loc = 0;
     }
 
     loc = 0;
@@ -239,6 +248,7 @@ int PackUnpack( MPI_Datatype darraytype, const int srcArray[], int destArray[],
        fprintf( stderr, "Unable to allocate pack array of size %d\n", 
                 packsize );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        fprintf( stderr, "Unable to allocate pack array of size %d\n", 
                 packsize );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     position = 0;
     MPI_Pack( (int*)srcArray, 1, darraytype, packArray, packsize, &position, 
     }
     position = 0;
     MPI_Pack( (int*)srcArray, 1, darraytype, packArray, packsize, &position, 
index 49ba725..9fe778f 100644 (file)
@@ -33,6 +33,7 @@ int main( int argc, char *argv[] )
        errs++;
        printf( "This test requires at least 2 processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        errs++;
        printf( "This test requires at least 2 processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     
     src  = 0;
     }
     
     src  = 0;
index 036eaf6..3c44de2 100644 (file)
@@ -40,6 +40,7 @@ int main( int argc, char **argv )
     {
         fprintf(stderr, "Could not make struct type."), fflush(stderr); 
         MPI_Abort( MPI_COMM_WORLD, 1 );
     {
         fprintf(stderr, "Could not make struct type."), fflush(stderr); 
         MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     
     memset(s_buf, 0, EL_COUNT*SIZE);
     }
     
     memset(s_buf, 0, EL_COUNT*SIZE);
index d38fb7f..9f909f2 100644 (file)
@@ -37,6 +37,7 @@ int main( int argc, char *argv[] )
     if (size < 2) {
        fprintf( stderr, "This test requires at least two processes." );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     if (size < 2) {
        fprintf( stderr, "This test requires at least two processes." );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     source  = 0;
     }
 
     source  = 0;
index 069fddc..ffaccad 100644 (file)
@@ -39,6 +39,7 @@ int main( int argc, char *argv[] )
        buf = (int *)malloc( count * 3 * sizeof(int) );
        if (!buf) {
            MPI_Abort( comm, 1 );
        buf = (int *)malloc( count * 3 * sizeof(int) );
        if (!buf) {
            MPI_Abort( comm, 1 );
+            exit(1);
        }
        for (i=0; i<3*count; i++) buf[i] = -1;
        if (rank == source) {
        }
        for (i=0; i<3*count; i++) buf[i] = -1;
        if (rank == source) {
index 064084b..2f5ec3e 100644 (file)
@@ -43,6 +43,7 @@ int main( int argc, char *argv[] )
        buf = (int *)malloc( count * 3 * sizeof(int) );
        if (!buf) {
            MPI_Abort( comm, 1 );
        buf = (int *)malloc( count * 3 * sizeof(int) );
        if (!buf) {
            MPI_Abort( comm, 1 );
+            exit(1);
        }
        for (i=0; i<3*count; i++) buf[i] = -1;
        if (rank == source) {
        }
        for (i=0; i<3*count; i++) buf[i] = -1;
        if (rank == source) {
index 79829e7..5367f99 100644 (file)
@@ -24,6 +24,7 @@
       if (size .lt. 2) then
          print *, "Must have at least 2 processes"
          call MPI_Abort( 1, MPI_COMM_WORLD, ierr )
       if (size .lt. 2) then
          print *, "Must have at least 2 processes"
          call MPI_Abort( 1, MPI_COMM_WORLD, ierr )
+         stop
       endif
 
       errs = 0
       endif
 
       errs = 0
index abc17da..71e9735 100644 (file)
@@ -45,6 +45,7 @@
       if (size .lt. 2) then
          print *, "Must have at least 2 processes"
          call MPI_Abort( 1, MPI_COMM_WORLD, ierr )
       if (size .lt. 2) then
          print *, "Must have at least 2 processes"
          call MPI_Abort( 1, MPI_COMM_WORLD, ierr )
+         stop
       endif
 
       comm = MPI_COMM_WORLD
       endif
 
       comm = MPI_COMM_WORLD
index e5f032f..3e753a4 100644 (file)
@@ -33,10 +33,12 @@ int main( int argc, char *argv[] )
         "This test requires a comm world with no more than %d processes\n", 
                 MAX_WORLD_SIZE );
        MPI_Abort( MPI_COMM_WORLD, 1 );
         "This test requires a comm world with no more than %d processes\n", 
                 MAX_WORLD_SIZE );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     if (size < 4) {
        fprintf( stderr, "This test requiers at least 4 processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     }
     if (size < 4) {
        fprintf( stderr, "This test requiers at least 4 processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     MPI_Comm_group( comm, &gworld );
     }
 
     MPI_Comm_group( comm, &gworld );
index 98b79d2..9900aa3 100644 (file)
@@ -45,6 +45,7 @@ int main( int argc, char *argv[] )
     if (!ranks || !ranksout) {
         fprintf(stderr, "out of memory\n");
         MPI_Abort(MPI_COMM_WORLD, 1);
     if (!ranks || !ranksout) {
         fprintf(stderr, "out of memory\n");
         MPI_Abort(MPI_COMM_WORLD, 1);
+        exit(1);
     }
 
     /* generate a comm with the rank order reversed */
     }
 
     /* generate a comm with the rank order reversed */
index 3c085fd..797716b 100644 (file)
@@ -39,6 +39,7 @@ int main( int argc, char *argv[] )
        errs++;
        fprintf( stderr, "This test requires at least two processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        errs++;
        fprintf( stderr, "This test requires at least two processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     source = 0;
     dest = 1;
     }
     source = 0;
     dest = 1;
index 8f22959..0326369 100644 (file)
@@ -43,6 +43,7 @@ int main( int argc, char *argv[] )
        errs++;
        fprintf( stderr, "At least 2 processes required\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        errs++;
        fprintf( stderr, "At least 2 processes required\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     src  = 0;
     }
 
     src  = 0;
@@ -57,6 +58,7 @@ int main( int argc, char *argv[] )
            fprintf( stderr, "Could not allocate buffer of %d bytes\n", 
                     bufsize );
            MPI_Abort( MPI_COMM_WORLD, 1 );
            fprintf( stderr, "Could not allocate buffer of %d bytes\n", 
                     bufsize );
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
        MPI_Buffer_attach( buf, bufsize );
 
        }
        MPI_Buffer_attach( buf, bufsize );
 
index cc7cc5a..70aa336 100644 (file)
@@ -53,6 +53,7 @@ int main( int argc, char *argv[] )
                fprintf( stderr, "Unable to allocate a buffer of %d bytes\n",
                         bufsize );
                MPI_Abort( MPI_COMM_WORLD, 1 );
                fprintf( stderr, "Unable to allocate a buffer of %d bytes\n",
                         bufsize );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
            
            MPI_Buffer_attach( buf, bufsize );
            }
            
            MPI_Buffer_attach( buf, bufsize );
index 2744748..850364a 100644 (file)
@@ -24,6 +24,7 @@ int main( int argc, char *argv[] )
     if (size < 2) {
        fprintf( stderr, "Must run with at least 2 processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     if (size < 2) {
        fprintf( stderr, "Must run with at least 2 processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     MPI_Comm_rank( MPI_COMM_WORLD, &rank );
 
     }
     MPI_Comm_rank( MPI_COMM_WORLD, &rank );
 
@@ -39,6 +40,7 @@ int main( int argc, char *argv[] )
        fprintf( stderr, "Unable to allocate buffers of size %d\n", 
                 n0 * (int)sizeof(int) );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        fprintf( stderr, "Unable to allocate buffers of size %d\n", 
                 n0 * (int)sizeof(int) );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
     memset( buf0, -1, n0 * sizeof(int) );
     memset( buf1, -1, n0 * sizeof(int) );
     }
     memset( buf0, -1, n0 * sizeof(int) );
     memset( buf1, -1, n0 * sizeof(int) );
index 4adc26c..7855b75 100644 (file)
@@ -51,6 +51,7 @@ int main( int argc, char *argv[] )
            fprintf( stderr, "Unable to allocate buffer %d of size %ld\n", 
                        i, (long)extent );
            MPI_Abort( MPI_COMM_WORLD, 1 );
            fprintf( stderr, "Unable to allocate buffer %d of size %ld\n", 
                        i, (long)extent );
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
     }
     buf = (int *)malloc( 10 * 30 * sizeof(int) );
        }
     }
     buf = (int *)malloc( 10 * 30 * sizeof(int) );
index b8a6d09..42d60b7 100644 (file)
@@ -34,6 +34,7 @@ int main(int argc, char *argv[])
   if (size != 3) {
     fprintf(stderr,"[%d] usage: mpiexec -n 3 %s\n",rank,argv[0]);
     MPI_Abort(MPI_COMM_WORLD,1);
   if (size != 3) {
     fprintf(stderr,"[%d] usage: mpiexec -n 3 %s\n",rank,argv[0]);
     MPI_Abort(MPI_COMM_WORLD,1);
+    exit(1);
   }
 
   cols = malloc(cnt*sizeof(long long));
   }
 
   cols = malloc(cnt*sizeof(long long));
index c48d871..2e97536 100644 (file)
@@ -49,6 +49,7 @@ int main(int argc, char **argv)
     if (size < 2) {
         printf("this test requires at least 2 processes\n");
         MPI_Abort(MPI_COMM_WORLD, 1);
     if (size < 2) {
         printf("this test requires at least 2 processes\n");
         MPI_Abort(MPI_COMM_WORLD, 1);
+        exit(1);
     }
 
     /* all processes besides ranks 0 & 1 aren't used by this test */
     }
 
     /* all processes besides ranks 0 & 1 aren't used by this test */
index e32e5f1..08b6b2c 100644 (file)
@@ -43,6 +43,7 @@ int main( int argc, char *argv[] )
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
            MPI_Send_init( buf, n, MPI_CHAR, dest, cs+n+1, comm, &req );
            MPI_Start( &req );
            }
            MPI_Send_init( buf, n, MPI_CHAR, dest, cs+n+1, comm, &req );
            MPI_Start( &req );
@@ -80,6 +81,7 @@ int main( int argc, char *argv[] )
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", nn);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", nn);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
+                    exit(1);
                }
                MPI_Recv( btemp, nn, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
                }
                MPI_Recv( btemp, nn, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
@@ -96,12 +98,14 @@ int main( int argc, char *argv[] )
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
            bsendbufsize = n + MPI_BSEND_OVERHEAD;
            bsendbuf = (char *)malloc( bsendbufsize );
            if (!bsendbuf) {
                fprintf( stderr, "Unable to allocate %d bytes for bsend\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
            }
            bsendbufsize = n + MPI_BSEND_OVERHEAD;
            bsendbuf = (char *)malloc( bsendbufsize );
            if (!bsendbuf) {
                fprintf( stderr, "Unable to allocate %d bytes for bsend\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
            MPI_Buffer_attach( bsendbuf, bsendbufsize );
            MPI_Bsend_init( buf, n, MPI_CHAR, dest, cs+n+2, comm, &req );
            }
            MPI_Buffer_attach( bsendbuf, bsendbufsize );
            MPI_Bsend_init( buf, n, MPI_CHAR, dest, cs+n+2, comm, &req );
@@ -142,6 +146,7 @@ int main( int argc, char *argv[] )
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", nn);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", nn);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
+                    exit(1);
                }
                MPI_Recv( btemp, nn, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
                }
                MPI_Recv( btemp, nn, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
@@ -162,6 +167,7 @@ int main( int argc, char *argv[] )
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
            MPI_Rsend_init( buf, n, MPI_CHAR, dest, cs+n+3, comm, &req );
            MPI_Start( &req );
            }
            MPI_Rsend_init( buf, n, MPI_CHAR, dest, cs+n+3, comm, &req );
            MPI_Start( &req );
@@ -208,6 +214,7 @@ int main( int argc, char *argv[] )
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", n);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", n);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
+                    exit(1);
                }
                MPI_Recv( btemp, n, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
                }
                MPI_Recv( btemp, n, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
@@ -222,6 +229,7 @@ int main( int argc, char *argv[] )
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
            MPI_Ssend_init( buf, n, MPI_CHAR, dest, cs+n+4, comm, &req );
            MPI_Start( &req );
            }
            MPI_Ssend_init( buf, n, MPI_CHAR, dest, cs+n+4, comm, &req );
            MPI_Start( &req );
@@ -259,6 +267,7 @@ int main( int argc, char *argv[] )
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", nn);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", nn);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
+                    exit(1);
                }
                MPI_Recv( btemp, nn, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
                }
                MPI_Recv( btemp, nn, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
index 1a6eab1..2d752ca 100644 (file)
@@ -27,6 +27,7 @@ int main( int argc, char *argv[] )
        if (dest > r) r = dest;
        fprintf( stderr, "This program requires %d processes\n", r-1 );
        MPI_Abort( MPI_COMM_WORLD, 1 );
        if (dest > r) r = dest;
        fprintf( stderr, "This program requires %d processes\n", r-1 );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     if (rank == src) {
     }
 
     if (rank == src) {
index 7c8cf65..7623be6 100644 (file)
@@ -44,6 +44,7 @@ int main( int argc, char *argv[] )
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
            MTestPrintfMsg( 1, "(%d) About to create isend and cancel\n",cs );
            MPI_Isend( buf, n, MPI_CHAR, dest, cs+n+1, comm, &req );
            }
            MTestPrintfMsg( 1, "(%d) About to create isend and cancel\n",cs );
            MPI_Isend( buf, n, MPI_CHAR, dest, cs+n+1, comm, &req );
@@ -81,6 +82,7 @@ int main( int argc, char *argv[] )
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", nn );
                    MPI_Abort( MPI_COMM_WORLD, 1 );
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", nn );
                    MPI_Abort( MPI_COMM_WORLD, 1 );
+                    exit(1);
                }
                MPI_Recv( btemp, nn, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
                }
                MPI_Recv( btemp, nn, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
@@ -97,12 +99,14 @@ int main( int argc, char *argv[] )
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
            bsendbufsize = n + MPI_BSEND_OVERHEAD;
            bsendbuf = (char *)malloc( bsendbufsize );
            if (!bsendbuf) {
                fprintf( stderr, "Unable to allocate %d bytes for bsend\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
            }
            bsendbufsize = n + MPI_BSEND_OVERHEAD;
            bsendbuf = (char *)malloc( bsendbufsize );
            if (!bsendbuf) {
                fprintf( stderr, "Unable to allocate %d bytes for bsend\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
            MPI_Buffer_attach( bsendbuf, bsendbufsize );
            MTestPrintfMsg( 1, "About to create and cancel ibsend\n" );
            }
            MPI_Buffer_attach( bsendbuf, bsendbufsize );
            MTestPrintfMsg( 1, "About to create and cancel ibsend\n" );
@@ -142,6 +146,7 @@ int main( int argc, char *argv[] )
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", nn);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", nn);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
+                    exit(1);
                }
                MPI_Recv( btemp, nn, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
                }
                MPI_Recv( btemp, nn, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
@@ -162,6 +167,7 @@ int main( int argc, char *argv[] )
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
            MTestPrintfMsg( 1, "About to create and cancel irsend\n" );
            MPI_Irsend( buf, n, MPI_CHAR, dest, cs+n+3, comm, &req );
            }
            MTestPrintfMsg( 1, "About to create and cancel irsend\n" );
            MPI_Irsend( buf, n, MPI_CHAR, dest, cs+n+3, comm, &req );
@@ -207,6 +213,7 @@ int main( int argc, char *argv[] )
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", n);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", n);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
+                    exit(1);
                }
                MPI_Recv( btemp, n, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
                }
                MPI_Recv( btemp, n, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
@@ -221,6 +228,7 @@ int main( int argc, char *argv[] )
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
            if (!buf) {
                fprintf( stderr, "Unable to allocate %d bytes\n", n );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
            MTestPrintfMsg( 1, "About to create and cancel issend\n" );
            MPI_Issend( buf, n, MPI_CHAR, dest, cs+n+4, comm, &req );
            }
            MTestPrintfMsg( 1, "About to create and cancel issend\n" );
            MPI_Issend( buf, n, MPI_CHAR, dest, cs+n+4, comm, &req );
@@ -257,6 +265,7 @@ int main( int argc, char *argv[] )
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", nn);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
                {
                    fprintf( stderr, "Unable to allocate %d bytes\n", nn);
                    MPI_Abort( MPI_COMM_WORLD, 1 );
+                    exit(1);
                }
                MPI_Recv( btemp, nn, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
                }
                MPI_Recv( btemp, nn, MPI_CHAR, 0, tag, comm, &status );
                free(btemp);
index b027f0b..8da0257 100644 (file)
@@ -40,6 +40,7 @@ int main( int argc, char *argv[] )
        if (!buf) {
            fprintf( stderr, "Unable to allocate %d bytes\n", n );
            MPI_Abort( MPI_COMM_WORLD, 1 );
        if (!buf) {
            fprintf( stderr, "Unable to allocate %d bytes\n", n );
            MPI_Abort( MPI_COMM_WORLD, 1 );
+            exit(1);
        }
 
        if (rank == source) {
        }
 
        if (rank == source) {
index eba48e6..2f87e47 100644 (file)
@@ -40,6 +40,7 @@ int main ( int argc, char *argv[] )
     fprintf( stderr, "This program requires a comm_world no larger than %d",
             MAXPES );
     MPI_Abort( MPI_COMM_WORLD, 1 );
     fprintf( stderr, "This program requires a comm_world no larger than %d",
             MAXPES );
     MPI_Abort( MPI_COMM_WORLD, 1 );
+    exit(1);
   }
 
   for (size = 1; size  <= MYBUFSIZE ; size += size) {
   }
 
   for (size = 1; size  <= MYBUFSIZE ; size += size) {
index e0c21a7..19ced11 100644 (file)
@@ -35,6 +35,7 @@ int main( int argc, char *argv[] )
     if (size < 2) {
        printf( "This test requires at least 2 processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
     if (size < 2) {
        printf( "This test requires at least 2 processes\n" );
        MPI_Abort( MPI_COMM_WORLD, 1 );
+        exit(1);
     }
 
     for (testnum=0; msgsizes[testnum] > 0; testnum++) {
     }
 
     for (testnum=0; msgsizes[testnum] > 0; testnum++) {
@@ -50,6 +51,7 @@ int main( int argc, char *argv[] )
                    fprintf( stderr, "Unable to allocate %d bytes\n", 
                             msgSize );
                    MPI_Abort( MPI_COMM_WORLD, 1 );
                    fprintf( stderr, "Unable to allocate %d bytes\n", 
                             msgSize );
                    MPI_Abort( MPI_COMM_WORLD, 1 );
+                    exit(1);
                }
            }
            partner = (rank + 1) % size;
                }
            }
            partner = (rank + 1) % size;
index 6f40201..0fd3032 100644 (file)
@@ -1534,6 +1534,7 @@ void MTestError( const char *msg )
     fprintf( stderr, "%s\n", msg );
     fflush( stderr );
     MPI_Abort( MPI_COMM_WORLD, 1 );
     fprintf( stderr, "%s\n", msg );
     fflush( stderr );
     MPI_Abort( MPI_COMM_WORLD, 1 );
+    exit(1);
 }
 /* ------------------------------------------------------------------------ */
 static void MTestResourceSummary( FILE *fp )
 }
 /* ------------------------------------------------------------------------ */
 static void MTestResourceSummary( FILE *fp )