Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
As far as I understand, the for and parfor-loops should execute the same iterations given the same sequence. However, when counting backwards, the parfor-loop is not executed if to == from - 1. So for example:
for(i in 1:0) {
print(i);
}
prints 1 and 0. However,
parfor(i in 1:0) { print(i); }
does not print anything. The analogous holds, e.g., for "i in 123:122" etc.
The problem seems to be in org.apache.sysds.runtime.controlprogram.ParForProgramBlock.computeNumIterations(), which does not work correctly when counting backwards.