ソースを参照

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

Nathalie Furmento 14 年 前
コミット
66a747dfbb
共有1 個のファイルを変更した1 個の追加0 個の削除を含む
  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__