Matthias Boehm created SYSTEMML-2472:
----------------------------------------

             Summary: Failed parsing of named function arguments in special 
cases
                 Key: SYSTEMML-2472
                 URL: https://issues.apache.org/jira/browse/SYSTEMML-2472
             Project: SystemML
          Issue Type: Task
            Reporter: Matthias Boehm


{code}
debug = function (String msg){
  verbosePrint("INFO: " + msg)
}

verbosePrint = function (String msg){
  verbose = ifdef($verbose, FALSE)
  if (verbose)
    print(msg)
}

p = ifdef($p, 2)
debug ("p= " + p)
{code}

{code}
PROGRAM ( size CP/MR = 1/0 )
--FUNCTIONS
----FUNCTION CALL GRAPH
------MAIN PROGRAM
--------.defaultNS::debug
----FUNCTION .defaultNS::debug [recompile=false]
--MAIN PROGRAM
----GENERIC (lines 36-37) [recompile=false]
------CP extfunct .defaultNS debug 1 0 msg=p= 2.SCALAR.STRING.true
{code}

{code}
Caused by: java.lang.NumberFormatException: For input string: "p"
        at 
sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
        at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
        at java.lang.Double.parseDouble(Double.java:538)
        at 
org.apache.sysml.runtime.instructions.cp.ScalarObjectFactory.createScalarObject(ScalarObjectFactory.java:33)
        at 
org.apache.sysml.runtime.controlprogram.context.ExecutionContext.getScalarInput(ExecutionContext.java:443)
        at 
org.apache.sysml.runtime.controlprogram.context.ExecutionContext.getScalarInput(ExecutionContext.java:438)
        at 
org.apache.sysml.runtime.controlprogram.context.ExecutionContext.getVariable(ExecutionContext.java:165)
        at 
org.apache.sysml.runtime.instructions.cp.FunctionCallCPInstruction.processInstruction(FunctionCallCPInstruction.java:133)
        at 
org.apache.sysml.runtime.controlprogram.ProgramBlock.executeSingleInstruction(ProgramBlock.java:252)
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to