Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge master into mc-process
[simgrid.git] / teshsuite / smpi / mpich3-test / coll / red4.c
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) );
-       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 );