[mpich2-commits] r6670 - mpich2/trunk/test/mpi/pt2pt
thakur at mcs.anl.gov
thakur at mcs.anl.gov
Tue May 18 10:31:34 CDT 2010
Author: thakur
Date: 2010-05-18 10:31:34 -0500 (Tue, 18 May 2010)
New Revision: 6670
Modified:
mpich2/trunk/test/mpi/pt2pt/large_message.c
Log:
add malloc error check
Modified: mpich2/trunk/test/mpi/pt2pt/large_message.c
===================================================================
--- mpich2/trunk/test/mpi/pt2pt/large_message.c 2010-05-17 22:47:59 UTC (rev 6669)
+++ mpich2/trunk/test/mpi/pt2pt/large_message.c 2010-05-18 15:31:34 UTC (rev 6670)
@@ -29,6 +29,14 @@
}
cols = malloc(cnt*sizeof(long long));
+ if (cols == NULL) {
+ printf("malloc of >2GB array failed\n");
+ errs++;
+ MTest_Finalize(errs);
+ MPI_Finalize();
+ return 0;
+ }
+
if (rank == 0) {
for (i=0; i<cnt; i++) cols[i] = i;
/* printf("[%d] sending...\n",rank);*/
More information about the mpich2-commits
mailing list