Skip to content

Commit 913edde

Browse files
committed
[MINOR] Fix federated tests and codegen components for fixed IDSequence
1 parent 1c70242 commit 913edde

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/org/apache/sysds/hops/codegen/template/TemplateUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ public static int getMaxLiveVectorIntermediates(CNode node, CNode main, Map<Long
539539

540540
public static boolean isValidNumVectorIntermediates(CNode node, CNode main, Map<Long, Set<Long>> parents, Map<Long, Pair<Long, MutableInt>> inUse, Set<Long> inUse2, int count) {
541541
if( count <= 1 ) return false;
542-
IDSequence buff = new IDSequence(true, count-1); //zero based
542+
IDSequence buff = new IDSequence(true, count-2); //-1 based
543543
inUse.clear(); inUse2.clear();
544544
node.resetVisitStatus();
545545
return rIsValidNumVectorIntermediates(node, main, parents, inUse, inUse2, buff);

src/test/java/org/apache/sysds/test/functions/federated/primitives/part2/FederatedNegativeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void NegativeTest1() {
6464
try {
6565
FederatedResponse fres = res[0].get();
6666
assertFalse(fres.isSuccessful());
67-
assertTrue(fres.getErrorMessage().contains("Variable 1 does not exist at federated worker"));
67+
assertTrue(fres.getErrorMessage().contains("Variable 0 does not exist at federated worker"));
6868
}
6969
catch (Exception e) {
7070
e.printStackTrace();

0 commit comments

Comments
 (0)