Browse Source

mpi/examples/cholesky: check number of blocks is smaller or equal to matrix size

Nathalie Furmento 14 years ago
parent
commit
66a747dfbb
1 changed files with 1 additions and 0 deletions
  1. 1 0
      mpi/examples/cholesky/mpi_cholesky.h

+ 1 - 0
mpi/examples/cholesky/mpi_cholesky.h

@@ -121,6 +121,7 @@ static void __attribute__((unused)) parse_args(int argc, char **argv)
 			printf("usage : %s [-pin] [-size size] [-nblocks nblocks]\n", argv[0]);
 		}
 	}
+	if (nblocks > size) nblocks = size;
 }
 
 #endif // __DW_CHOLESKY_H__