Repository: incubator-systemml Updated Branches: refs/heads/master e868fc60e -> 65d019576
[HOTFIX][SYSTEMML-382] Fix matrix block copy 'dense to sparse' This change fixes test failures of org.apache.sysml.test.integration. functions.aggregate.FullColAggregateTest.testColMinSparseMatrixCP during daily builds. Interestingly, this issue did not show up in a local test environment because the code path of uacmin (multi-threaded) final aggregation was different (8 vs 24 threads). The first result determines the intermediate representation (dense/sparse) and the remaining partial results are merged accordingly. On the test server, the test failed on copyDenseToSparse while locally we always executed copyDenseToDense. However, this failed test identified indeed a severe bug. Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/65d01957 Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/65d01957 Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/65d01957 Branch: refs/heads/master Commit: 65d019576a9a394f60821c61d266a5125ada1720 Parents: e868fc6 Author: Matthias Boehm <[email protected]> Authored: Thu Jan 21 20:16:42 2016 -0800 Committer: Matthias Boehm <[email protected]> Committed: Thu Jan 21 20:16:42 2016 -0800 ---------------------------------------------------------------------- .../java/org/apache/sysml/runtime/matrix/data/MatrixBlock.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/65d01957/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixBlock.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixBlock.java b/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixBlock.java index ee1d3a5..6e22d37 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixBlock.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixBlock.java @@ -1435,7 +1435,7 @@ public class MatrixBlock extends MatrixValue implements Externalizable double val = that.denseBlock[ix++]; if( val != 0 ) { //create sparse row only if required - sparseBlock.allocate(1, estimatedNNzsPerRow, clen); + sparseBlock.allocate(i, estimatedNNzsPerRow, clen); sparseBlock.append(i, j, val); } }
