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/09/14 21:43:20 UTC

[jira] [Updated] (SYSTEMML-921) Error handling for non-existing variables on function calls

     [ https://issues.apache.org/jira/browse/SYSTEMML-921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Boehm updated SYSTEMML-921:
------------------------------------
    Description: 
Due to unbounded scoping in conditional control flow, during runtime certain variables might be non-existing. Consider the following example script
{code}
foo = function(Matrix[Double] A, Matrix[Double] B, Double d) 
  return( Matrix[Double] C)
{
   C = A;
   if( d>0 )
      C = C + B;
}


X1 = rand(rows=1000,cols=1000);
if(sum(X1) < 1)
   X2 = rand(rows=1000,cols=1000);

X3 = foo(X1, X2, 7);

print(sum(X3));
{code}

Depending on the data, X2 is not existing. We need to improve the error handling of these cases as the user currently gets the following unhelpful error message:
{code}

Caused by: org.apache.sysml.runtime.DMLRuntimeException: ERROR: Runtime error in program block generated from statement block between lines 14 and 14 -- Error evaluating instruction: CP°extfunct°.defaultNS°foo°3°1°X1·MATRIX·DOUBLE°X2·MATRIX·DOUBLE°7·SCALAR·INT·true°X3
        at org.apache.sysml.runtime.controlprogram.ProgramBlock.executeSingleInstruction(ProgramBlock.java:335)
        at org.apache.sysml.runtime.controlprogram.ProgramBlock.executeInstructions(ProgramBlock.java:224)
        at org.apache.sysml.runtime.controlprogram.ProgramBlock.execute(ProgramBlock.java:168)
        at org.apache.sysml.runtime.controlprogram.Program.execute(Program.java:145)
        ... 8 more
Caused by: org.apache.sysml.runtime.DMLRuntimeException: Unknown variable: null
        at org.apache.sysml.runtime.controlprogram.context.ExecutionContext.getScalarInput(ExecutionContext.java:395)
        at org.apache.sysml.runtime.instructions.cp.FunctionCallCPInstruction.processInstruction(FunctionCallCPInstruction.java:151)
        at org.apache.sysml.runtime.controlprogram.ProgramBlock.executeSingleInstruction(ProgramBlock.java:305)
{code}

> Error handling for non-existing variables on function calls
> -----------------------------------------------------------
>
>                 Key: SYSTEMML-921
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-921
>             Project: SystemML
>          Issue Type: Bug
>          Components: Runtime
>            Reporter: Matthias Boehm
>
> Due to unbounded scoping in conditional control flow, during runtime certain variables might be non-existing. Consider the following example script
> {code}
> foo = function(Matrix[Double] A, Matrix[Double] B, Double d) 
>   return( Matrix[Double] C)
> {
>    C = A;
>    if( d>0 )
>       C = C + B;
> }
> X1 = rand(rows=1000,cols=1000);
> if(sum(X1) < 1)
>    X2 = rand(rows=1000,cols=1000);
> X3 = foo(X1, X2, 7);
> print(sum(X3));
> {code}
> Depending on the data, X2 is not existing. We need to improve the error handling of these cases as the user currently gets the following unhelpful error message:
> {code}
> Caused by: org.apache.sysml.runtime.DMLRuntimeException: ERROR: Runtime error in program block generated from statement block between lines 14 and 14 -- Error evaluating instruction: CP°extfunct°.defaultNS°foo°3°1°X1·MATRIX·DOUBLE°X2·MATRIX·DOUBLE°7·SCALAR·INT·true°X3
>         at org.apache.sysml.runtime.controlprogram.ProgramBlock.executeSingleInstruction(ProgramBlock.java:335)
>         at org.apache.sysml.runtime.controlprogram.ProgramBlock.executeInstructions(ProgramBlock.java:224)
>         at org.apache.sysml.runtime.controlprogram.ProgramBlock.execute(ProgramBlock.java:168)
>         at org.apache.sysml.runtime.controlprogram.Program.execute(Program.java:145)
>         ... 8 more
> Caused by: org.apache.sysml.runtime.DMLRuntimeException: Unknown variable: null
>         at org.apache.sysml.runtime.controlprogram.context.ExecutionContext.getScalarInput(ExecutionContext.java:395)
>         at org.apache.sysml.runtime.instructions.cp.FunctionCallCPInstruction.processInstruction(FunctionCallCPInstruction.java:151)
>         at org.apache.sysml.runtime.controlprogram.ProgramBlock.executeSingleInstruction(ProgramBlock.java:305)
> {code}



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