Hello All, I am having issues with running the predict script of the clustering algorithm. I am unable to figure out what exactly is the problem and how to go about fixing it. Could someone please guide.
Steps I followed. Ran data-gen scrips for clustering Ran training scripts for clustering Ran predict scripts for clustering (This failed with error : Runtime error in program block generated from statement block between lines 140 and 162) Error Trace in the file below. Thanks, Krishna
krishna@Krishna:~/Educational/systemml/scripts/perftest/python$ /Users/krishna/Educational/systemml/bin/systemml-spark-submit.py -f Kmeans-predict.dml -nvargs X=/Users/krishna/Educational/systemml/scripts/perftest/temp/data-gen/clustering.dense.10k_100/X_test.data C=/Users/krishna/Educational/systemml/scripts/perftest/temp/data-gen/clustering.dense.10k_100/C.data prY=/Users/krishna/Educational/systemml/scripts/perftest/temp/predict/Kmeans.clustering.dense.10k_100/prY.data ================================================================================ DML Script:/Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml 17/07/26 22:47:50 INFO api.DMLScript: BEGIN DML run 07/26/2017 22:47:50 17/07/26 22:47:51 WARN parser.StatementBlock: WARNING: /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -- line 143, column 4 -- Initialization of P depends on if-else execution 17/07/26 22:47:51 WARN parser.StatementBlock: WARNING: /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -- line 145, column 4 -- Initialization of cluster_sizes depends on if-else execution 17/07/26 22:47:51 WARN parser.StatementBlock: WARNING: /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -- line 122, column 4 -- Initialization of C depends on if-else execution 17/07/26 22:47:51 WARN parser.StatementBlock: WARNING: /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -- line 111, column 4 -- Initialization of total_mean depends on if-else execution 17/07/26 22:47:51 WARN parser.StatementBlock: WARNING: /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -- line 110, column 4 -- Initialization of X depends on if-else execution 17/07/26 22:47:51 WARN parser.StatementBlock: WARNING: /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -- line 112, column 4 -- Initialization of total_ss depends on if-else execution 17/07/26 22:47:51 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 17/07/26 22:47:52 WARN parser.StatementBlock: WARNING: /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -- line 135, column 4 -- Variable num_clusters defined with different value type in if and else clause. 17/07/26 22:47:52 WARN parser.Expression: WARNING: /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -- line 185, column 23 -- Read input file does not exist on FS (local mode): 17/07/26 22:47:52 WARN parser.Expression: Metadata file: .mtd not provided 17/07/26 22:47:52 WARN parser.Expression: WARNING: /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -- line 185, column 23 -- Missing or incomplete dimension information in read statement: .mtd 17/07/26 22:47:52 WARN parser.StatementBlock: WARNING: /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -- line 135, column 4 -- Variable num_clusters defined with different value type in if and else clause. 17/07/26 22:47:52 WARN parser.Expression: WARNING: /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -- line 185, column 23 -- Read input file does not exist on FS (local mode): 17/07/26 22:47:52 WARN parser.Expression: Metadata file: .mtd not provided 17/07/26 22:47:52 WARN parser.Expression: WARNING: /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -- line 185, column 23 -- Missing or incomplete dimension information in read statement: .mtd 17/07/26 22:47:52 WARN parser.StatementBlock: WARNING: /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -- line 314, column 4 -- Invalid parameters in write statement: WRITE(id=str, iofilename=" ", sparse=false, format="TEXT", header=false, sep=","); BEGIN K-MEANS SCORING SCRIPT Reading X... 17/07/26 22:47:53 INFO mapred.FileInputFormat: Total input paths to process : 1 Reading C... Computing the predicted Y... 17/07/26 22:47:54 INFO mapred.FileInputFormat: Total input paths to process : 1 Writing the predicted Y... Computing the WCSS... Total Sum of Squares (TSS) = 6.116357654866475E8 SystemML Statistics: Total execution time: 1.545 sec. Number of executed Spark inst: 2. 17/07/26 22:47:54 INFO api.DMLScript: END DML run 07/26/2017 22:47:54 17/07/26 22:47:54 ERROR api.DMLScript: Failed to execute DML script. org.apache.sysml.runtime.DMLRuntimeException: org.apache.sysml.runtime.DMLRuntimeException: ERROR: Runtime error in program block generated from statement block between lines 140 and 162 -- Error evaluating instruction: CP°wsloss°X·MATRIX·DOUBLE°_mVar38·MATRIX·DOUBLE°_mVar47·MATRIX·DOUBLE°1·SCALAR·INT·true°_Var49·SCALAR·DOUBLE°NONE°4 at org.apache.sysml.runtime.controlprogram.Program.execute(Program.java:130) at org.apache.sysml.api.ScriptExecutorUtils.executeRuntimeProgram(ScriptExecutorUtils.java:94) at org.apache.sysml.api.DMLScript.execute(DMLScript.java:741) at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:505) at org.apache.sysml.api.DMLScript.main(DMLScript.java:232) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:738) at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:187) at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:212) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:126) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) Caused by: org.apache.sysml.runtime.DMLRuntimeException: ERROR: Runtime error in program block generated from statement block between lines 140 and 162 -- Error evaluating instruction: CP°wsloss°X·MATRIX·DOUBLE°_mVar38·MATRIX·DOUBLE°_mVar47·MATRIX·DOUBLE°1·SCALAR·INT·true°_Var49·SCALAR·DOUBLE°NONE°4 at org.apache.sysml.runtime.controlprogram.ProgramBlock.executeSingleInstruction(ProgramBlock.java:316) at org.apache.sysml.runtime.controlprogram.ProgramBlock.executeInstructions(ProgramBlock.java:217) at org.apache.sysml.runtime.controlprogram.ProgramBlock.execute(ProgramBlock.java:163) at org.apache.sysml.runtime.controlprogram.Program.execute(Program.java:123) ... 13 more Caused by: org.apache.sysml.runtime.DMLRuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException at org.apache.sysml.runtime.matrix.data.LibMatrixMult.matrixMultWSLoss(LibMatrixMult.java:574) at org.apache.sysml.runtime.matrix.data.MatrixBlock.quaternaryOperations(MatrixBlock.java:5529) at org.apache.sysml.runtime.instructions.cp.QuaternaryCPInstruction.processInstruction(QuaternaryCPInstruction.java:128) at org.apache.sysml.runtime.controlprogram.ProgramBlock.executeSingleInstruction(ProgramBlock.java:286) ... 16 more Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.apache.sysml.runtime.matrix.data.LibMatrixMult.sumScalarResults(LibMatrixMult.java:3603) at org.apache.sysml.runtime.matrix.data.LibMatrixMult.matrixMultWSLoss(LibMatrixMult.java:571) ... 19 more Caused by: java.lang.NullPointerException at org.apache.sysml.runtime.matrix.data.LibMatrixMult.matrixMultWSLossGeneric(LibMatrixMult.java:2306) at org.apache.sysml.runtime.matrix.data.LibMatrixMult.access$1400(LibMatrixMult.java:53) at org.apache.sysml.runtime.matrix.data.LibMatrixMult$MatrixMultWSLossTask.call(LibMatrixMult.java:3848) at org.apache.sysml.runtime.matrix.data.LibMatrixMult$MatrixMultWSLossTask.call(LibMatrixMult.java:3809) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Exception in thread "main" org.apache.sysml.api.DMLException: org.apache.sysml.runtime.DMLRuntimeException: org.apache.sysml.runtime.DMLRuntimeException: ERROR: Runtime error in program block generated from statement block between lines 140 and 162 -- Error evaluating instruction: CP°wsloss°X·MATRIX·DOUBLE°_mVar38·MATRIX·DOUBLE°_mVar47·MATRIX·DOUBLE°1·SCALAR·INT·true°_Var49·SCALAR·DOUBLE°NONE°4 at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:532) at org.apache.sysml.api.DMLScript.main(DMLScript.java:232) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:738) at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:187) at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:212) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:126) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) Caused by: org.apache.sysml.runtime.DMLRuntimeException: org.apache.sysml.runtime.DMLRuntimeException: ERROR: Runtime error in program block generated from statement block between lines 140 and 162 -- Error evaluating instruction: CP°wsloss°X·MATRIX·DOUBLE°_mVar38·MATRIX·DOUBLE°_mVar47·MATRIX·DOUBLE°1·SCALAR·INT·true°_Var49·SCALAR·DOUBLE°NONE°4 at org.apache.sysml.runtime.controlprogram.Program.execute(Program.java:130) at org.apache.sysml.api.ScriptExecutorUtils.executeRuntimeProgram(ScriptExecutorUtils.java:94) at org.apache.sysml.api.DMLScript.execute(DMLScript.java:741) at org.apache.sysml.api.DMLScript.executeScript(DMLScript.java:505) ... 10 more Caused by: org.apache.sysml.runtime.DMLRuntimeException: ERROR: Runtime error in program block generated from statement block between lines 140 and 162 -- Error evaluating instruction: CP°wsloss°X·MATRIX·DOUBLE°_mVar38·MATRIX·DOUBLE°_mVar47·MATRIX·DOUBLE°1·SCALAR·INT·true°_Var49·SCALAR·DOUBLE°NONE°4 at org.apache.sysml.runtime.controlprogram.ProgramBlock.executeSingleInstruction(ProgramBlock.java:316) at org.apache.sysml.runtime.controlprogram.ProgramBlock.executeInstructions(ProgramBlock.java:217) at org.apache.sysml.runtime.controlprogram.ProgramBlock.execute(ProgramBlock.java:163) at org.apache.sysml.runtime.controlprogram.Program.execute(Program.java:123) ... 13 more Caused by: org.apache.sysml.runtime.DMLRuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException at org.apache.sysml.runtime.matrix.data.LibMatrixMult.matrixMultWSLoss(LibMatrixMult.java:574) at org.apache.sysml.runtime.matrix.data.MatrixBlock.quaternaryOperations(MatrixBlock.java:5529) at org.apache.sysml.runtime.instructions.cp.QuaternaryCPInstruction.processInstruction(QuaternaryCPInstruction.java:128) at org.apache.sysml.runtime.controlprogram.ProgramBlock.executeSingleInstruction(ProgramBlock.java:286) ... 16 more Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.apache.sysml.runtime.matrix.data.LibMatrixMult.sumScalarResults(LibMatrixMult.java:3603) at org.apache.sysml.runtime.matrix.data.LibMatrixMult.matrixMultWSLoss(LibMatrixMult.java:571) ... 19 more Caused by: java.lang.NullPointerException at org.apache.sysml.runtime.matrix.data.LibMatrixMult.matrixMultWSLossGeneric(LibMatrixMult.java:2306) at org.apache.sysml.runtime.matrix.data.LibMatrixMult.access$1400(LibMatrixMult.java:53) at org.apache.sysml.runtime.matrix.data.LibMatrixMult$MatrixMultWSLossTask.call(LibMatrixMult.java:3848) at org.apache.sysml.runtime.matrix.data.LibMatrixMult$MatrixMultWSLossTask.call(LibMatrixMult.java:3809) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Failed to run SystemML. Exit code :256 /Users/krishna/spark/bin/spark-submit --class org.apache.sysml.api.DMLScript --master local[*] --driver-memory 5G --num-executors 2 --executor-memory 2G --executor-cores 1 --conf spark.driver.extraJavaOptions=-Dlog4j.configuration=file:/Users/krishna/Educational/systemml/conf/log4j.properties.template --jars /Users/krishna/Educational/systemml/target/lib/jcublas-0.8.0.jar,/Users/krishna/Educational/systemml/target/lib/jcublas-natives-0.8.0-apple-x86_64.jar,/Users/krishna/Educational/systemml/target/lib/jcuda-0.8.0.jar,/Users/krishna/Educational/systemml/target/lib/jcuda-natives-0.8.0-apple-x86_64.jar,/Users/krishna/Educational/systemml/target/lib/jcudnn-0.8.0.jar,/Users/krishna/Educational/systemml/target/lib/jcudnn-natives-0.8.0-apple-x86_64.jar,/Users/krishna/Educational/systemml/target/lib/jcufft-0.8.0.jar,/Users/krishna/Educational/systemml/target/lib/jcufft-natives-0.8.0-apple-x86_64.jar,/Users/krishna/Educational/systemml/target/lib/jcurand-0.8.0.jar,/Users/krishna/Educational/systemml/target/lib/jcurand-natives-0.8.0-apple-x86_64.jar,/Users/krishna/Educational/systemml/target/lib/jcusolver-0.8.0.jar,/Users/krishna/Educational/systemml/target/lib/jcusolver-natives-0.8.0-apple-x86_64.jar,/Users/krishna/Educational/systemml/target/lib/jcusparse-0.8.0.jar,/Users/krishna/Educational/systemml/target/lib/jcusparse-natives-0.8.0-apple-x86_64.jar /Users/krishna/Educational/systemml/target/SystemML.jar -config /Users/krishna/Educational/systemml/conf/SystemML-config.xml -exec hybrid_spark -f /Users/krishna/Educational/systemml/scripts/algorithms/Kmeans-predict.dml -nvargs X=/Users/krishna/Educational/systemml/scripts/perftest/temp/data-gen/clustering.dense.10k_100/X_test.data C=/Users/krishna/Educational/systemml/scripts/perftest/temp/data-gen/clustering.dense.10k_100/C.data prY=/Users/krishna/Educational/systemml/scripts/perftest/temp/predict/Kmeans.clustering.dense.10k_100/prY.data