From 50130868c2f0c10d86bf368ede7154f6845b0d51 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 5 Nov 2013 16:54:24 +0100 Subject: [PATCH] MPI_Abort can theorically fail. Add a call to exit() to ensure that the program really stops. --- examples/smpi/NAS/FT/ft.f | 5 +++++ teshsuite/smpi/alltoall_basic.c | 2 ++ teshsuite/smpi/mpich3-test/attr/attrerr.c | 1 + teshsuite/smpi/mpich3-test/attr/attrerrcomm.c | 1 + teshsuite/smpi/mpich3-test/attr/attrerrtype.c | 1 + teshsuite/smpi/mpich3-test/attr/attric.c | 4 ++++ teshsuite/smpi/mpich3-test/attr/attrt.c | 12 ++++++++++++ teshsuite/smpi/mpich3-test/coll/allgatherv4.c | 2 ++ teshsuite/smpi/mpich3-test/coll/allred.c | 2 ++ teshsuite/smpi/mpich3-test/coll/allred3.c | 2 ++ teshsuite/smpi/mpich3-test/coll/allred4.c | 2 ++ teshsuite/smpi/mpich3-test/coll/allred5.c | 1 + teshsuite/smpi/mpich3-test/coll/alltoall1.c | 1 + teshsuite/smpi/mpich3-test/coll/alltoallv.c | 3 +++ teshsuite/smpi/mpich3-test/coll/alltoallv0.c | 2 ++ teshsuite/smpi/mpich3-test/coll/alltoallw2.c | 3 +++ teshsuite/smpi/mpich3-test/coll/coll13.c | 3 +++ teshsuite/smpi/mpich3-test/coll/coll2.c | 1 + teshsuite/smpi/mpich3-test/coll/coll3.c | 1 + teshsuite/smpi/mpich3-test/coll/coll6.c | 1 + teshsuite/smpi/mpich3-test/coll/coll7.c | 1 + teshsuite/smpi/mpich3-test/coll/icalltoallv.c | 2 ++ teshsuite/smpi/mpich3-test/coll/icalltoallw.c | 2 ++ teshsuite/smpi/mpich3-test/coll/nonblocking.c | 1 + teshsuite/smpi/mpich3-test/coll/nonblocking2.c | 1 + teshsuite/smpi/mpich3-test/coll/nonblocking3.c | 1 + teshsuite/smpi/mpich3-test/coll/red3.c | 10 ++++++++-- teshsuite/smpi/mpich3-test/coll/red4.c | 10 ++++++++-- teshsuite/smpi/mpich3-test/coll/red_scat_block.c | 1 + teshsuite/smpi/mpich3-test/coll/redscat3.c | 3 +++ teshsuite/smpi/mpich3-test/coll/redscatbkinter.c | 2 ++ teshsuite/smpi/mpich3-test/coll/redscatblk3.c | 2 ++ teshsuite/smpi/mpich3-test/coll/redscatinter.c | 3 +++ teshsuite/smpi/mpich3-test/coll/scatterv.c | 2 ++ teshsuite/smpi/mpich3-test/coll/uoplong.c | 1 + teshsuite/smpi/mpich3-test/comm/cmfree.c | 1 + teshsuite/smpi/mpich3-test/comm/cmsplit.c | 1 + teshsuite/smpi/mpich3-test/comm/comm_create_group.c | 1 + teshsuite/smpi/mpich3-test/comm/comm_idup.c | 1 + teshsuite/smpi/mpich3-test/comm/commcreate1.c | 1 + teshsuite/smpi/mpich3-test/comm/ic1.c | 1 + teshsuite/smpi/mpich3-test/comm/ic2.c | 2 +- teshsuite/smpi/mpich3-test/comm/iccreate.c | 1 + teshsuite/smpi/mpich3-test/comm/icsplit.c | 1 + teshsuite/smpi/mpich3-test/comm/probe-intercomm.c | 1 + teshsuite/smpi/mpich3-test/datatype/darray-cyclic.c | 10 ++++++++++ teshsuite/smpi/mpich3-test/datatype/getpartelm.c | 1 + teshsuite/smpi/mpich3-test/datatype/struct-ezhov.c | 1 + teshsuite/smpi/mpich3-test/datatype/tfree.c | 1 + teshsuite/smpi/mpich3-test/datatype/tresized.c | 1 + teshsuite/smpi/mpich3-test/datatype/tresized2.c | 1 + teshsuite/smpi/mpich3-test/f90/datatype/indtype.f90 | 1 + teshsuite/smpi/mpich3-test/f90/datatype/structf.f90 | 1 + teshsuite/smpi/mpich3-test/group/gtranks.c | 2 ++ teshsuite/smpi/mpich3-test/group/gtranksperf.c | 1 + teshsuite/smpi/mpich3-test/pt2pt/bottom.c | 1 + teshsuite/smpi/mpich3-test/pt2pt/bsendfrag.c | 2 ++ teshsuite/smpi/mpich3-test/pt2pt/bsendpending.c | 1 + teshsuite/smpi/mpich3-test/pt2pt/cancelrecv.c | 2 ++ teshsuite/smpi/mpich3-test/pt2pt/eagerdt.c | 1 + teshsuite/smpi/mpich3-test/pt2pt/large_message.c | 1 + teshsuite/smpi/mpich3-test/pt2pt/mprobe.c | 1 + teshsuite/smpi/mpich3-test/pt2pt/pscancel.c | 9 +++++++++ teshsuite/smpi/mpich3-test/pt2pt/rqfreeb.c | 1 + teshsuite/smpi/mpich3-test/pt2pt/scancel.c | 9 +++++++++ teshsuite/smpi/mpich3-test/pt2pt/scancel2.c | 1 + teshsuite/smpi/mpich3-test/pt2pt/sendall.c | 1 + teshsuite/smpi/mpich3-test/pt2pt/sendrecv3.c | 2 ++ teshsuite/smpi/mpich3-test/util/mtest.c | 1 + 69 files changed, 151 insertions(+), 5 deletions(-) diff --git a/examples/smpi/NAS/FT/ft.f b/examples/smpi/NAS/FT/ft.f index 8ab25b9780..5e3a3b0b40 100644 --- a/examples/smpi/NAS/FT/ft.f +++ b/examples/smpi/NAS/FT/ft.f @@ -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) + stop 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) + stop 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) + stop 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) + stop endif else @@ -448,6 +452,7 @@ c--------------------------------------------------------------------- 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') diff --git a/teshsuite/smpi/alltoall_basic.c b/teshsuite/smpi/alltoall_basic.c index 90cc4aad61..c3af311b85 100644 --- a/teshsuite/smpi/alltoall_basic.c +++ b/teshsuite/smpi/alltoall_basic.c @@ -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); + exit(EXIT_FAILURE); } 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); + exit(EXIT_FAILURE); } for (i = 0; i < size; ++i) { sb[i] = rank + 1; diff --git a/teshsuite/smpi/mpich3-test/attr/attrerr.c b/teshsuite/smpi/mpich3-test/attr/attrerr.c index 39e361173f..907e4a53f3 100644 --- a/teshsuite/smpi/mpich3-test/attr/attrerr.c +++ b/teshsuite/smpi/mpich3-test/attr/attrerr.c @@ -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 ); + exit(code); } int test_communicators( void ) diff --git a/teshsuite/smpi/mpich3-test/attr/attrerrcomm.c b/teshsuite/smpi/mpich3-test/attr/attrerrcomm.c index df42e48c65..9384dd4a94 100644 --- a/teshsuite/smpi/mpich3-test/attr/attrerrcomm.c +++ b/teshsuite/smpi/mpich3-test/attr/attrerrcomm.c @@ -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 ); + exit(code); } int test_communicators( void ) diff --git a/teshsuite/smpi/mpich3-test/attr/attrerrtype.c b/teshsuite/smpi/mpich3-test/attr/attrerrtype.c index d3d9a39de6..19a27cbbed 100644 --- a/teshsuite/smpi/mpich3-test/attr/attrerrtype.c +++ b/teshsuite/smpi/mpich3-test/attr/attrerrtype.c @@ -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 ); + exit(code); } int test_attrs( void ) diff --git a/teshsuite/smpi/mpich3-test/attr/attric.c b/teshsuite/smpi/mpich3-test/attr/attric.c index c71e96c6c7..9b3b04c723 100644 --- a/teshsuite/smpi/mpich3-test/attr/attric.c +++ b/teshsuite/smpi/mpich3-test/attr/attric.c @@ -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 ); + exit(1005); } 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 ); + exit(3004); } 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 ); + exit(3005); } 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 ); + exit(3008); } MTestPrintfMsg(1, "Keyval_free key=%#x\n", key_1); MPI_Keyval_free(&key_1 ); diff --git a/teshsuite/smpi/mpich3-test/attr/attrt.c b/teshsuite/smpi/mpich3-test/attr/attrt.c index 4a94201cb1..c52491dd67 100644 --- a/teshsuite/smpi/mpich3-test/attr/attrt.c +++ b/teshsuite/smpi/mpich3-test/attr/attrt.c @@ -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 ); + exit(1005); } 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 ); + exit(3001); } 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 ); + exit(3002); } 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 ); + 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 ); + exit(3004); } if (value != world_rank) { @@ -200,6 +205,7 @@ int test_communicators( void ) (long)value, world_rank ); fflush( stdout ); MPI_Abort(MPI_COMM_WORLD, 3005 ); + exit(3005); } 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 ); + exit(3008); } 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 ); + exit(3009); } 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 ); + exit(3010); } 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 ); + exit(3011); } } @@ -274,6 +284,7 @@ int test_communicators( void ) errs++; printf( "incorrect similar result: %d\n", result ); MPI_Abort(MPI_COMM_WORLD, 3012 ); + exit(3012); } 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 ); + exit(3013); } } /* diff --git a/teshsuite/smpi/mpich3-test/coll/allgatherv4.c b/teshsuite/smpi/mpich3-test/coll/allgatherv4.c index 963fd36f31..2ce422a871 100644 --- a/teshsuite/smpi/mpich3-test/coll/allgatherv4.c +++ b/teshsuite/smpi/mpich3-test/coll/allgatherv4.c @@ -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); + exit(-1); } 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 ); + exit(1); } recvcounts[i] = (int) tmp; diff --git a/teshsuite/smpi/mpich3-test/coll/allred.c b/teshsuite/smpi/mpich3-test/coll/allred.c index d33f876849..e9becde7a1 100644 --- a/teshsuite/smpi/mpich3-test/coll/allred.c +++ b/teshsuite/smpi/mpich3-test/coll/allred.c @@ -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); } } diff --git a/teshsuite/smpi/mpich3-test/coll/allred3.c b/teshsuite/smpi/mpich3-test/coll/allred3.c index aaf8a23354..cf16324e56 100644 --- a/teshsuite/smpi/mpich3-test/coll/allred3.c +++ b/teshsuite/smpi/mpich3-test/coll/allred3.c @@ -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 ); + exit(1); } bufout = (int *)malloc( max_offset * sizeof(int) ); if (!bufout) { MPI_Abort( MPI_COMM_WORLD, 1 ); + exit(1); } initMat( comm, buf ); diff --git a/teshsuite/smpi/mpich3-test/coll/allred4.c b/teshsuite/smpi/mpich3-test/coll/allred4.c index 32e0c00ae1..1638657ddf 100644 --- a/teshsuite/smpi/mpich3-test/coll/allred4.c +++ b/teshsuite/smpi/mpich3-test/coll/allred4.c @@ -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 ); + exit(1); } bufout = (int *)malloc( count * 9 * sizeof(int) ); if (!bufout) { MPI_Abort( MPI_COMM_WORLD, 1 ); + exit(1); } for (i=0; i < count; i++) { diff --git a/teshsuite/smpi/mpich3-test/coll/allred5.c b/teshsuite/smpi/mpich3-test/coll/allred5.c index a442550849..7bba665d0e 100644 --- a/teshsuite/smpi/mpich3-test/coll/allred5.c +++ b/teshsuite/smpi/mpich3-test/coll/allred5.c @@ -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 ); + exit(1); } for (i=0; icase_num=%d)\n", (l->case_num)); MPI_Abort(comm, 1); + exit(1); break; } } diff --git a/teshsuite/smpi/mpich3-test/coll/red3.c b/teshsuite/smpi/mpich3-test/coll/red3.c index 32358d992d..a13561cc56 100644 --- a/teshsuite/smpi/mpich3-test/coll/red3.c +++ b/teshsuite/smpi/mpich3-test/coll/red3.c @@ -160,9 +160,15 @@ int main( int argc, char *argv[] ) 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) ); - 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 ); diff --git a/teshsuite/smpi/mpich3-test/coll/red4.c b/teshsuite/smpi/mpich3-test/coll/red4.c index a3e91831b2..abef5a8643 100644 --- a/teshsuite/smpi/mpich3-test/coll/red4.c +++ b/teshsuite/smpi/mpich3-test/coll/red4.c @@ -220,9 +220,15 @@ int main( int argc, char *argv[] ) 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) ); - 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 ); diff --git a/teshsuite/smpi/mpich3-test/coll/red_scat_block.c b/teshsuite/smpi/mpich3-test/coll/red_scat_block.c index 7891cb6efc..71886e4f8b 100644 --- a/teshsuite/smpi/mpich3-test/coll/red_scat_block.c +++ b/teshsuite/smpi/mpich3-test/coll/red_scat_block.c @@ -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); + exit(1); } for (i=0; i r) r = dest; fprintf( stderr, "This program requires %d processes\n", r-1 ); MPI_Abort( MPI_COMM_WORLD, 1 ); + exit(1); } if (rank == src) { diff --git a/teshsuite/smpi/mpich3-test/pt2pt/scancel.c b/teshsuite/smpi/mpich3-test/pt2pt/scancel.c index 7c8cf65318..7623be60e1 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/scancel.c +++ b/teshsuite/smpi/mpich3-test/pt2pt/scancel.c @@ -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 ); + 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 ); @@ -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 ); + exit(1); } 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 ); + 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 ); + exit(1); } 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 ); + exit(1); } 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 ); + exit(1); } 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 ); + exit(1); } 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 ); + exit(1); } 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 ); + exit(1); } MPI_Recv( btemp, nn, MPI_CHAR, 0, tag, comm, &status ); free(btemp); diff --git a/teshsuite/smpi/mpich3-test/pt2pt/scancel2.c b/teshsuite/smpi/mpich3-test/pt2pt/scancel2.c index b027f0b6d8..8da02570da 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/scancel2.c +++ b/teshsuite/smpi/mpich3-test/pt2pt/scancel2.c @@ -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 ); + exit(1); } if (rank == source) { diff --git a/teshsuite/smpi/mpich3-test/pt2pt/sendall.c b/teshsuite/smpi/mpich3-test/pt2pt/sendall.c index eba48e60a8..2f87e47eb0 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/sendall.c +++ b/teshsuite/smpi/mpich3-test/pt2pt/sendall.c @@ -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 ); + exit(1); } for (size = 1; size <= MYBUFSIZE ; size += size) { diff --git a/teshsuite/smpi/mpich3-test/pt2pt/sendrecv3.c b/teshsuite/smpi/mpich3-test/pt2pt/sendrecv3.c index e0c21a7ad9..19ced11b46 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/sendrecv3.c +++ b/teshsuite/smpi/mpich3-test/pt2pt/sendrecv3.c @@ -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 ); + exit(1); } 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 ); + exit(1); } } partner = (rank + 1) % size; diff --git a/teshsuite/smpi/mpich3-test/util/mtest.c b/teshsuite/smpi/mpich3-test/util/mtest.c index 6f40201421..0fd3032f98 100644 --- a/teshsuite/smpi/mpich3-test/util/mtest.c +++ b/teshsuite/smpi/mpich3-test/util/mtest.c @@ -1534,6 +1534,7 @@ void MTestError( const char *msg ) fprintf( stderr, "%s\n", msg ); fflush( stderr ); MPI_Abort( MPI_COMM_WORLD, 1 ); + exit(1); } /* ------------------------------------------------------------------------ */ static void MTestResourceSummary( FILE *fp ) -- 2.20.1