Skip to content

Commit 9789243

Browse files
committed
input stream not yet reaching the threads
1 parent 43f997a commit 9789243

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/main/java/org/apache/sysds/runtime/instructions/ooc/UnaryOOCInstruction.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,14 @@ public void processInstruction( ExecutionContext ec ) {
5959
tmp.getValue().unaryOperations(uop, new MatrixBlock()));
6060
qOut.enqueueTask(tmpOut);
6161
}
62-
qOut.dequeueTask();
6362
}
6463
catch(Exception ex) {
6564
throw new DMLRuntimeException(ex);
6665
}
66+
finally {
67+
qOut.closeInput();
68+
}
69+
6770
});
6871
}
6972
finally {

src/test/java/org/apache/sysds/test/functions/ooc/UnaryTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void testUnaryOperation(boolean rewrite)
7777
programArgs = new String[] {"-explain", "-stats", "-ooc",
7878
"-args", input(INPUT_NAME), output(OUTPUT_NAME)};
7979

80-
int rows = 3500, cols = 1000;
80+
int rows = 1000, cols = 1000;
8181
MatrixBlock mb = MatrixBlock.randOperations(rows, cols, 1.0, -1, 1, "uniform", 7);
8282
MatrixWriter writer = MatrixWriterFactory.createMatrixWriter(FileFormat.BINARY);
8383
writer.writeMatrixToHDFS(mb, input(INPUT_NAME), rows, cols, 1000, rows*cols);
@@ -86,7 +86,7 @@ public void testUnaryOperation(boolean rewrite)
8686

8787
runTest(true, false, null, -1);
8888

89-
// HashMap<MatrixValue.CellIndex, Double> dmlfile = readDMLMatrixFromOutputDir(OUTPUT_NAME);
89+
HashMap<MatrixValue.CellIndex, Double> dmlfile = readDMLMatrixFromOutputDir(OUTPUT_NAME);
9090
// Double result = dmlfile.get(new MatrixValue.CellIndex(1, 1));
9191
// double expected = 0.0;
9292
// for(int i = 0; i < rows; i++) {

src/test/scripts/functions/ooc/Unary.dml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ print(toString(X))
2525
Y = ceil(X);
2626
print(toString(Y))
2727
# Write the final matrix result
28-
write(Y, $2);
28+
write(Y, $2, format="binary");

0 commit comments

Comments
 (0)