You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Matthias Boehm (JIRA)" <ji...@apache.org> on 2016/03/29 07:22:25 UTC

[jira] [Created] (SYSTEMML-603) Transform-append rewrite issues w/ multiple consumers

Matthias Boehm created SYSTEMML-603:
---------------------------------------

             Summary: Transform-append rewrite issues w/ multiple consumers
                 Key: SYSTEMML-603
                 URL: https://issues.apache.org/jira/browse/SYSTEMML-603
             Project: SystemML
          Issue Type: Bug
          Components: Compiler
            Reporter: Matthias Boehm


Recently, an issue has been reported regarding our "transform-append" rewrite (e.g., t(append(t(A),t(B))) -> rbind(A,B)). This affects script snippets like the following, where TE_F_O is consumed by multiple operations 
{code}
strataStartInd = nrow(TE_F_O)+1;
TE_F_O = t(append (t(TE_F_O), t(ST)));
strataEndInd = nrow(TE_F_O);
{code}

This results in the following or similar errors:

{code}

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at org.apache.sysml.hops.rewrite.RewriteAlgebraicSimplificationStatic.si                             mplifyTransposedAppend(RewriteAlgebraicSimplificationStatic.java:955)
        at org.apache.sysml.hops.rewrite.RewriteAlgebraicSimplificationStatic.ru                             le_AlgebraicSimplification(RewriteAlgebraicSimplificationStatic.java:148)
        at org.apache.sysml.hops.rewrite.RewriteAlgebraicSimplificationStatic.ru                             le_AlgebraicSimplification(RewriteAlgebraicSimplificationStatic.java:167)
        at org.apache.sysml.hops.rewrite.RewriteAlgebraicSimplificationStatic.re                             writeHopDAGs(RewriteAlgebraicSimplificationStatic.java:81)
        at org.apache.sysml.hops.rewrite.ProgramRewriter.rewriteHopDAGs(ProgramR                             ewriter.java:279)
        at org.apache.sysml.hops.rewrite.ProgramRewriter.rewriteStatementBlockHo                             pDAGs(ProgramRewriter.java:263)
        at org.apache.sysml.hops.rewrite.ProgramRewriter.rewriteStatementBlockHo                             pDAGs(ProgramRewriter.java:247)
        at org.apache.sysml.hops.rewrite.ProgramRewriter.rewriteProgramHopDAGs(P                             rogramRewriter.java:206)
        at org.apache.sysml.parser.DMLTranslator.rewriteHopsDAG(DMLTranslator.ja                             va:258)
        at org.apache.sysml.api.DMLScript.execute(DMLScript.java:603)
        at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:338)
        at org.apache.sysml.api.DMLScript.main(DMLScript.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.                             java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces                             sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSub                             mit$$runMain(SparkSubmit.scala:665)
        at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:17                             0)
        at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:193)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:112)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Exception in thread "main" org.apache.sysml.api.DMLException: java.lang.IndexOut                             OfBoundsException: Index: 0, Size: 0
        at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:350)
        at org.apache.sysml.api.DMLScript.main(DMLScript.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.                             java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces                             sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSub                             mit$$runMain(SparkSubmit.scala:665)
        at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:17                             0)
        at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:193)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:112)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at org.apache.sysml.hops.rewrite.RewriteAlgebraicSimplificationStatic.si                             mplifyTransposedAppend(RewriteAlgebraicSimplificationStatic.java:955)
        at org.apache.sysml.hops.rewrite.RewriteAlgebraicSimplificationStatic.ru                             le_AlgebraicSimplification(RewriteAlgebraicSimplificationStatic.java:148)
        at org.apache.sysml.hops.rewrite.RewriteAlgebraicSimplificationStatic.ru                             le_AlgebraicSimplification(RewriteAlgebraicSimplificationStatic.java:167)
        at org.apache.sysml.hops.rewrite.RewriteAlgebraicSimplificationStatic.re                             writeHopDAGs(RewriteAlgebraicSimplificationStatic.java:81)
        at org.apache.sysml.hops.rewrite.ProgramRewriter.rewriteHopDAGs(ProgramR                             ewriter.java:279)
        at org.apache.sysml.hops.rewrite.ProgramRewriter.rewriteStatementBlockHo                             pDAGs(ProgramRewriter.java:263)
        at org.apache.sysml.hops.rewrite.ProgramRewriter.rewriteStatementBlockHo                             pDAGs(ProgramRewriter.java:247)
        at org.apache.sysml.hops.rewrite.ProgramRewriter.rewriteProgramHopDAGs(P                             rogramRewriter.java:206)
        at org.apache.sysml.parser.DMLTranslator.rewriteHopsDAG(DMLTranslator.ja                             va:258)
        at org.apache.sysml.api.DMLScript.execute(DMLScript.java:603)
        at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:338)
{code}

The workaround in affected versions is to disable rewrites by setting 'optlevel' in SystemML-config.xml from 2 to 1.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)