[mpich-commits] r10611 - mpich2/trunk/test/mpi/pt2pt
gropp at mcs.anl.gov
gropp at mcs.anl.gov
Mon Nov 19 09:36:50 CST 2012
Author: gropp
Date: 2012-11-19 09:36:49 -0600 (Mon, 19 Nov 2012)
New Revision: 10611
Modified:
mpich2/trunk/test/mpi/pt2pt/sendrecv3.c
Log:
Check for success in memory allocation
Modified: mpich2/trunk/test/mpi/pt2pt/sendrecv3.c
===================================================================
--- mpich2/trunk/test/mpi/pt2pt/sendrecv3.c 2012-11-14 17:20:14 UTC (rev 10610)
+++ mpich2/trunk/test/mpi/pt2pt/sendrecv3.c 2012-11-19 15:36:49 UTC (rev 10611)
@@ -46,6 +46,11 @@
for (i=0; i<nmsg; i++) {
buf[i] = (int *)malloc( msgSize );
+ if (!buf[i]) {
+ fprintf( stderr, "Unable to allocate %d bytes\n",
+ msgSize );
+ MPI_Abort( MPI_COMM_WORLD, 1 );
+ }
}
partner = (rank + 1) % size;
More information about the commits
mailing list