You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by mb...@apache.org on 2016/04/05 23:22:48 UTC

[01/11] incubator-systemml git commit: [SYSTEMML-561] New matrix-frame/frame-matrix casting operations, tests

Repository: incubator-systemml
Updated Branches:
  refs/heads/master 5096defa7 -> 328b644cb


[SYSTEMML-561] New matrix-frame/frame-matrix casting operations, tests 

Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/c8c8d81e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/c8c8d81e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/c8c8d81e

Branch: refs/heads/master
Commit: c8c8d81eaaf43d6649f3956434eab36e2b87bae4
Parents: 5096def
Author: Matthias Boehm <mb...@us.ibm.com>
Authored: Mon Apr 4 14:43:43 2016 -0700
Committer: Matthias Boehm <mb...@us.ibm.com>
Committed: Tue Apr 5 00:18:09 2016 -0700

----------------------------------------------------------------------
 src/main/java/org/apache/sysml/hops/Hop.java    |   3 +-
 .../java/org/apache/sysml/hops/UnaryOp.java     |   4 +-
 .../java/org/apache/sysml/lops/UnaryCP.java     |   8 +-
 .../sysml/parser/BuiltinFunctionExpression.java |  34 +++-
 .../org/apache/sysml/parser/DMLTranslator.java  |   5 +
 .../org/apache/sysml/parser/Expression.java     |   1 +
 .../java/org/apache/sysml/parser/dml/Dml.g4     |   2 +-
 .../instructions/CPInstructionParser.java       |   1 +
 .../runtime/instructions/cp/CPOperand.java      |   4 +-
 .../instructions/cp/VariableCPInstruction.java  |  40 +++-
 .../functions/jmlc/FrameCastingTest.java        | 184 +++++++++++++++++++
 .../functions/jmlc/FrameTransformTest.java      |   8 +-
 src/test/scripts/functions/jmlc/transform6.dml  |  29 +++
 13 files changed, 306 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c8c8d81e/src/main/java/org/apache/sysml/hops/Hop.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/Hop.java b/src/main/java/org/apache/sysml/hops/Hop.java
index adf1828..fa45ed3 100644
--- a/src/main/java/org/apache/sysml/hops/Hop.java
+++ b/src/main/java/org/apache/sysml/hops/Hop.java
@@ -1033,7 +1033,7 @@ public abstract class Hop
 
 	public enum OpOp1 {
 		NOT, ABS, SIN, COS, TAN, ASIN, ACOS, ATAN, SIGN, SQRT, LOG, EXP, 
-		CAST_AS_SCALAR, CAST_AS_MATRIX, CAST_AS_DOUBLE, CAST_AS_INT, CAST_AS_BOOLEAN, 
+		CAST_AS_SCALAR, CAST_AS_MATRIX, CAST_AS_FRAME, CAST_AS_DOUBLE, CAST_AS_INT, CAST_AS_BOOLEAN, 
 		PRINT, EIGEN, NROW, NCOL, LENGTH, ROUND, IQM, STOP, CEIL, FLOOR, MEDIAN, INVERSE, CHOLESKY,
 		//cumulative sums, products, extreme values
 		CUMSUM, CUMPROD, CUMMIN, CUMMAX,
@@ -1279,6 +1279,7 @@ public abstract class Hop
 		HopsOpOp1LopsUS.put(OpOp1.LOG, org.apache.sysml.lops.UnaryCP.OperationTypes.LOG);
 		HopsOpOp1LopsUS.put(OpOp1.CAST_AS_SCALAR, org.apache.sysml.lops.UnaryCP.OperationTypes.CAST_AS_SCALAR);
 		HopsOpOp1LopsUS.put(OpOp1.CAST_AS_MATRIX, org.apache.sysml.lops.UnaryCP.OperationTypes.CAST_AS_MATRIX);
+		HopsOpOp1LopsUS.put(OpOp1.CAST_AS_FRAME, org.apache.sysml.lops.UnaryCP.OperationTypes.CAST_AS_FRAME);
 		HopsOpOp1LopsUS.put(OpOp1.CAST_AS_DOUBLE, org.apache.sysml.lops.UnaryCP.OperationTypes.CAST_AS_DOUBLE);
 		HopsOpOp1LopsUS.put(OpOp1.CAST_AS_INT, org.apache.sysml.lops.UnaryCP.OperationTypes.CAST_AS_INT);
 		HopsOpOp1LopsUS.put(OpOp1.CAST_AS_BOOLEAN, org.apache.sysml.lops.UnaryCP.OperationTypes.CAST_AS_BOOLEAN);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c8c8d81e/src/main/java/org/apache/sysml/hops/UnaryOp.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/UnaryOp.java b/src/main/java/org/apache/sysml/hops/UnaryOp.java
index e200691..4ed0225 100644
--- a/src/main/java/org/apache/sysml/hops/UnaryOp.java
+++ b/src/main/java/org/apache/sysml/hops/UnaryOp.java
@@ -121,7 +121,8 @@ public class UnaryOp extends Hop implements MultiThreadedHop
 		{
 			Hop input = getInput().get(0);
 			
-			if (getDataType() == DataType.SCALAR || _op == OpOp1.CAST_AS_MATRIX) 
+			if (getDataType() == DataType.SCALAR 
+				|| _op == OpOp1.CAST_AS_MATRIX || _op == OpOp1.CAST_AS_FRAME ) //TODO generalize frames to distributed ops 
 			{
 				if (_op == Hop.OpOp1.IQM)  //special handling IQM
 				{
@@ -633,6 +634,7 @@ public class UnaryOp extends Hop implements MultiThreadedHop
 	{
 		return (   _op == OpOp1.CAST_AS_MATRIX
 				|| _op == OpOp1.CAST_AS_SCALAR
+				|| _op == OpOp1.CAST_AS_FRAME
 				|| _op == OpOp1.CAST_AS_BOOLEAN
 				|| _op == OpOp1.CAST_AS_DOUBLE
 				|| _op == OpOp1.CAST_AS_INT    );

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c8c8d81e/src/main/java/org/apache/sysml/lops/UnaryCP.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/lops/UnaryCP.java b/src/main/java/org/apache/sysml/lops/UnaryCP.java
index 74b3953..4fa3cc7 100644
--- a/src/main/java/org/apache/sysml/lops/UnaryCP.java
+++ b/src/main/java/org/apache/sysml/lops/UnaryCP.java
@@ -34,11 +34,14 @@ public class UnaryCP extends Lop
 {
 	
 	public enum OperationTypes {
-		NOT, ABS, SIN, COS, TAN, ASIN, ACOS, ATAN, SQRT, LOG, EXP, CAST_AS_SCALAR, CAST_AS_MATRIX, CAST_AS_DOUBLE, CAST_AS_INT, CAST_AS_BOOLEAN, PRINT, NROW, NCOL, LENGTH, ROUND, STOP, CEIL, FLOOR, CUMSUM, NOTSUPPORTED
+		NOT, ABS, SIN, COS, TAN, ASIN, ACOS, ATAN, SQRT, LOG, EXP, 
+		CAST_AS_SCALAR, CAST_AS_MATRIX, CAST_AS_FRAME, CAST_AS_DOUBLE, CAST_AS_INT, CAST_AS_BOOLEAN, 
+		PRINT, NROW, NCOL, LENGTH, ROUND, STOP, CEIL, FLOOR, CUMSUM, NOTSUPPORTED
 	};
 	
 	public static final String CAST_AS_SCALAR_OPCODE = "castdts";
 	public static final String CAST_AS_MATRIX_OPCODE = "castdtm";
+	public static final String CAST_AS_FRAME_OPCODE = "castdtf";
 	public static final String CAST_AS_DOUBLE_OPCODE = "castvtd";
 	public static final String CAST_AS_INT_OPCODE    = "castvti";
 	public static final String CAST_AS_BOOLEAN_OPCODE = "castvtb";
@@ -119,6 +122,9 @@ public class UnaryCP extends Lop
 
 		case CAST_AS_MATRIX:
 			return CAST_AS_MATRIX_OPCODE;
+
+		case CAST_AS_FRAME:
+			return CAST_AS_FRAME_OPCODE;	
 			
 		case STOP:
 			return "stop";

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c8c8d81e/src/main/java/org/apache/sysml/parser/BuiltinFunctionExpression.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/parser/BuiltinFunctionExpression.java b/src/main/java/org/apache/sysml/parser/BuiltinFunctionExpression.java
index 886aa0a..56f5857 100644
--- a/src/main/java/org/apache/sysml/parser/BuiltinFunctionExpression.java
+++ b/src/main/java/org/apache/sysml/parser/BuiltinFunctionExpression.java
@@ -362,9 +362,21 @@ public class BuiltinFunctionExpression extends DataIdentifier
 			break;
 		case CAST_AS_MATRIX:
 			checkNumParameters(1);
-			checkScalarParam(getFirstExpr());
+			checkScalarFrameParam(getFirstExpr());
 			output.setDataType(DataType.MATRIX);
-			output.setDimensions(1, 1);
+			output.setDimensions(id.getDim1(), id.getDim2());
+			if( getFirstExpr().getOutput().getDataType()==DataType.SCALAR )
+				output.setDimensions(1, 1); //correction scalars
+			output.setBlockDimensions(id.getRowsInBlock(), id.getColumnsInBlock());
+			output.setValueType(id.getValueType());
+			break;
+		case CAST_AS_FRAME:
+			checkNumParameters(1);
+			checkMatrixParam(getFirstExpr());
+			output.setDataType(DataType.FRAME);
+			output.setDimensions(id.getDim1(), id.getDim2());
+			if( getFirstExpr().getOutput().getDataType()==DataType.SCALAR )
+				output.setDimensions(1, 1); //correction scalars
 			output.setBlockDimensions(id.getRowsInBlock(), id.getColumnsInBlock());
 			output.setValueType(id.getValueType());
 			break;
@@ -1197,8 +1209,20 @@ public class BuiltinFunctionExpression extends DataIdentifier
 	private void checkScalarParam(Expression e) //always unconditional
 		throws LanguageException 
 	{
-		if (e.getOutput().getDataType() != DataType.SCALAR) 
-		{
+		if (e.getOutput().getDataType() != DataType.SCALAR) {
+			raiseValidateError("Expecting scalar parameter for function " + this.getOpCode(), false, LanguageErrorCodes.UNSUPPORTED_PARAMETERS);
+		}
+	}
+	
+	/**
+	 * 
+	 * @param e
+	 * @throws LanguageException
+	 */
+	private void checkScalarFrameParam(Expression e) //always unconditional
+		throws LanguageException 
+	{
+		if (e.getOutput().getDataType() != DataType.SCALAR && e.getOutput().getDataType() != DataType.FRAME) {
 			raiseValidateError("Expecting scalar parameter for function " + this.getOpCode(), false, LanguageErrorCodes.UNSUPPORTED_PARAMETERS);
 		}
 	}
@@ -1415,6 +1439,8 @@ public class BuiltinFunctionExpression extends DataIdentifier
 			bifop = Expression.BuiltinFunctionOp.CAST_AS_SCALAR;
 		else if (functionName.equals("as.matrix"))
 			bifop = Expression.BuiltinFunctionOp.CAST_AS_MATRIX;
+		else if (functionName.equals("as.frame"))
+			bifop = Expression.BuiltinFunctionOp.CAST_AS_FRAME;
 		else if (functionName.equals("as.double"))
 			bifop = Expression.BuiltinFunctionOp.CAST_AS_DOUBLE;
 		else if (functionName.equals("as.integer"))

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c8c8d81e/src/main/java/org/apache/sysml/parser/DMLTranslator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/parser/DMLTranslator.java b/src/main/java/org/apache/sysml/parser/DMLTranslator.java
index d4bd062..2adcd77 100644
--- a/src/main/java/org/apache/sysml/parser/DMLTranslator.java
+++ b/src/main/java/org/apache/sysml/parser/DMLTranslator.java
@@ -2446,13 +2446,18 @@ public class DMLTranslator
 			}
 			break;
 
+		//data type casts	
 		case CAST_AS_SCALAR:
 			currBuiltinOp = new UnaryOp(target.getName(), DataType.SCALAR, target.getValueType(), Hop.OpOp1.CAST_AS_SCALAR, expr);
 			break;
 		case CAST_AS_MATRIX:
 			currBuiltinOp = new UnaryOp(target.getName(), DataType.MATRIX, target.getValueType(), Hop.OpOp1.CAST_AS_MATRIX, expr);
 			break;	
+		case CAST_AS_FRAME:
+			currBuiltinOp = new UnaryOp(target.getName(), DataType.FRAME, target.getValueType(), Hop.OpOp1.CAST_AS_FRAME, expr);
+			break;	
 
+		//value type casts
 		case CAST_AS_DOUBLE:
 			currBuiltinOp = new UnaryOp(target.getName(), target.getDataType(), ValueType.DOUBLE, Hop.OpOp1.CAST_AS_DOUBLE, expr);
 			break;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c8c8d81e/src/main/java/org/apache/sysml/parser/Expression.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/parser/Expression.java b/src/main/java/org/apache/sysml/parser/Expression.java
index f6acf5a..8695cab 100644
--- a/src/main/java/org/apache/sysml/parser/Expression.java
+++ b/src/main/java/org/apache/sysml/parser/Expression.java
@@ -58,6 +58,7 @@ public abstract class Expression
 		CAST_AS_INT,
 		CAST_AS_MATRIX,
 		CAST_AS_SCALAR,
+		CAST_AS_FRAME,
 		CBIND, //previously APPEND
 		CEIL,
 		CHOLESKY,

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c8c8d81e/src/main/java/org/apache/sysml/parser/dml/Dml.g4
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/parser/dml/Dml.g4 b/src/main/java/org/apache/sysml/parser/dml/Dml.g4
index e37b15c..0ee12c6 100644
--- a/src/main/java/org/apache/sysml/parser/dml/Dml.g4
+++ b/src/main/java/org/apache/sysml/parser/dml/Dml.g4
@@ -181,7 +181,7 @@ strictParameterizedKeyValueString : paramName=ID '=' paramVal=STRING ;
 ID : (ALPHABET (ALPHABET|DIGIT|'_')*  '::')? ALPHABET (ALPHABET|DIGIT|'_')*
     // Special ID cases:
    // | 'matrix' // --> This is a special case which causes lot of headache
-   | 'as.scalar' | 'as.matrix' | 'as.double' | 'as.integer' | 'as.logical' | 'index.return' | 'lower.tail'
+   | 'as.scalar' | 'as.matrix' | 'as.frame' | 'as.double' | 'as.integer' | 'as.logical' | 'index.return' | 'lower.tail'
 ;
 // Unfortunately, we have datatype name clashing with builtin function name: matrix :(
 // Therefore, ugly work around for checking datatype

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c8c8d81e/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java b/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
index 8ffc4e7..8ecb2e1 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
@@ -192,6 +192,7 @@ public class CPInstructionParser extends InstructionParser
 		String2CPInstructionType.put( "rmfilevar"   , CPINSTRUCTION_TYPE.Variable);
 		String2CPInstructionType.put( UnaryCP.CAST_AS_SCALAR_OPCODE, CPINSTRUCTION_TYPE.Variable);
 		String2CPInstructionType.put( UnaryCP.CAST_AS_MATRIX_OPCODE, CPINSTRUCTION_TYPE.Variable);
+		String2CPInstructionType.put( UnaryCP.CAST_AS_FRAME_OPCODE,  CPINSTRUCTION_TYPE.Variable);
 		String2CPInstructionType.put( UnaryCP.CAST_AS_DOUBLE_OPCODE, CPINSTRUCTION_TYPE.Variable);
 		String2CPInstructionType.put( UnaryCP.CAST_AS_INT_OPCODE,    CPINSTRUCTION_TYPE.Variable);
 		String2CPInstructionType.put( UnaryCP.CAST_AS_BOOLEAN_OPCODE, CPINSTRUCTION_TYPE.Variable);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c8c8d81e/src/main/java/org/apache/sysml/runtime/instructions/cp/CPOperand.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/CPOperand.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/CPOperand.java
index 195b9d0..2f7fdb6 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/CPOperand.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/CPOperand.java
@@ -68,7 +68,7 @@ public class CPOperand
 		return _isLiteral;
 	}
 	
-	public void set_name(String name) {
+	public void setName(String name) {
 		_name = name;
 	}
 	
@@ -80,7 +80,7 @@ public class CPOperand
 		_dataType = dt;
 	}
 	
-	public void set_literal(boolean literal) {
+	public void setLiteral(boolean literal) {
 		_isLiteral = literal;
 	}
 	

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c8c8d81e/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java
index dac114b..ac5d456 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java
@@ -42,9 +42,11 @@ import org.apache.sysml.runtime.matrix.MatrixFormatMetaData;
 import org.apache.sysml.runtime.matrix.MetaData;
 import org.apache.sysml.runtime.matrix.data.CSVFileFormatProperties;
 import org.apache.sysml.runtime.matrix.data.FileFormatProperties;
+import org.apache.sysml.runtime.matrix.data.FrameBlock;
 import org.apache.sysml.runtime.matrix.data.InputInfo;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.OutputInfo;
+import org.apache.sysml.runtime.util.DataConverter;
 import org.apache.sysml.runtime.util.MapReduceTool;
 import org.apache.sysml.runtime.util.UtilFunctions;
 import org.apache.sysml.utils.Statistics;
@@ -80,7 +82,8 @@ public class VariableCPInstruction extends CPInstruction
 		RemoveVariable, 
 		RemoveVariableAndFile,		 
 		CastAsScalarVariable, 
-		CastAsMatrixVariable,
+		CastAsMatrixVariable, 
+		CastAsFrameVariable,
 		CastAsDoubleVariable,
 		CastAsIntegerVariable,
 		CastAsBooleanVariable,
@@ -133,6 +136,9 @@ public class VariableCPInstruction extends CPInstruction
 		else if ( str.equalsIgnoreCase(UnaryCP.CAST_AS_MATRIX_OPCODE) ) 
 			return VariableOperationCode.CastAsMatrixVariable;
 		
+		else if ( str.equalsIgnoreCase(UnaryCP.CAST_AS_FRAME_OPCODE) ) 
+			return VariableOperationCode.CastAsFrameVariable;
+		
 		else if ( str.equalsIgnoreCase(UnaryCP.CAST_AS_DOUBLE_OPCODE) ) 
 			return VariableOperationCode.CastAsDoubleVariable;
 		
@@ -379,6 +385,7 @@ public class VariableCPInstruction extends CPInstruction
 			
 		case CastAsScalarVariable:
 		case CastAsMatrixVariable:
+		case CastAsFrameVariable:
 		case CastAsDoubleVariable:
 		case CastAsIntegerVariable:
 		case CastAsBooleanVariable:			
@@ -512,12 +519,35 @@ public class VariableCPInstruction extends CPInstruction
 			ec.setScalarOutput(output.getName(), new DoubleObject(value));
 			break;
 		case CastAsMatrixVariable:{
-			ScalarObject scalarInput = ec.getScalarInput(input1.getName(), input1.getValueType(), input1.isLiteral());
-			MatrixBlock out = new MatrixBlock(1,1,false);
-			out.quickSetValue(0, 0, scalarInput.getDoubleValue());
+			MatrixBlock out = null;
+			if( input1.getDataType()==DataType.SCALAR ) {
+				ScalarObject scalarInput = ec.getScalarInput(input1.getName(), input1.getValueType(), input1.isLiteral());
+				out = new MatrixBlock(1,1,false);
+				out.quickSetValue(0, 0, scalarInput.getDoubleValue());	
+			}
+			else { //DataType.FRAME
+				FrameBlock fin = ec.getFrameInput(input1.getName());
+				out = DataConverter.convertToMatrixBlock(fin);
+				ec.releaseFrameInput(input1.getName());
+			}
 			ec.setMatrixOutput(output.getName(), out);
 			break;
 		}
+		case CastAsFrameVariable:{
+			FrameBlock out = null;
+			if( input1.getDataType()==DataType.SCALAR ) {
+				ScalarObject scalarInput = ec.getScalarInput(input1.getName(), input1.getValueType(), input1.isLiteral());
+				out = new FrameBlock(1, input1.getValueType());
+				out.set(0, 0, scalarInput.getStringValue());	
+			}
+			else { //DataType.FRAME
+				MatrixBlock min = ec.getMatrixInput(input1.getName());
+				out = DataConverter.convertToFrameBlock(min);
+				ec.releaseMatrixInput(input1.getName());
+			}
+			ec.setFrameOutput(output.getName(), out);
+			break;
+		}
 		case CastAsDoubleVariable:{ 
 			ScalarObject scalarInput = ec.getScalarInput(input1.getName(), input1.getValueType(), input1.isLiteral());
 			ec.setScalarOutput(output.getName(), new DoubleObject(scalarInput.getDoubleValue()));
@@ -1000,7 +1030,7 @@ public class VariableCPInstruction extends CPInstruction
 			|| opcode == VariableOperationCode.SetFileName )
 		{
 			//replace in-memory instruction
-			input2.set_name(input2.getName().replaceAll(pattern, replace));
+			input2.setName(input2.getName().replaceAll(pattern, replace));
 
 			// Find a start position of file name string.
 			int iPos = StringUtils.ordinalIndexOf(instString, Lop.OPERAND_DELIMITOR, CREATEVAR_FILE_NAME_VAR_POS); 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c8c8d81e/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameCastingTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameCastingTest.java b/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameCastingTest.java
new file mode 100644
index 0000000..d4f1c33
--- /dev/null
+++ b/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameCastingTest.java
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.sysml.test.integration.functions.jmlc;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.apache.sysml.api.DMLException;
+import org.apache.sysml.api.jmlc.Connection;
+import org.apache.sysml.api.jmlc.PreparedScript;
+import org.apache.sysml.api.jmlc.ResultVariables;
+import org.apache.sysml.runtime.controlprogram.parfor.stat.Timing;
+import org.apache.sysml.test.integration.AutomatedTestBase;
+import org.apache.sysml.test.integration.TestConfiguration;
+import org.apache.sysml.test.utils.TestUtils;
+
+/**
+ * 
+ * 
+ */
+public class FrameCastingTest extends AutomatedTestBase 
+{
+	private final static String TEST_NAME1 = "transform6";
+	private final static String TEST_DIR = "functions/jmlc/";
+	private final static String TEST_CLASS_DIR = TEST_DIR + FrameCastingTest.class.getSimpleName() + "/";
+	
+	private final static int rows = 700;
+	private final static int cols = 3;
+	
+	private final static int nRuns = 2;
+	
+	private final static double sparsity1 = 0.7;
+	private final static double sparsity2 = 0.1;
+	
+	
+	@Override
+	public void setUp() {
+		addTestConfiguration(TEST_NAME1, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1, new String[] { "F2" }) ); 
+	}
+	
+	@Test
+	public void testJMLCTransformDense() throws IOException {
+		runJMLCReuseTest(TEST_NAME1, false, false);
+	}
+	
+	@Test
+	public void testJMLCTransformSparse() throws IOException {
+		runJMLCReuseTest(TEST_NAME1, true, false);
+	}
+	
+	@Test
+	public void testJMLCTransformDenseReuse() throws IOException {
+		runJMLCReuseTest(TEST_NAME1, false, true);
+	}
+	
+	@Test
+	public void testJMLCTransformSparseReuse() throws IOException {
+		runJMLCReuseTest(TEST_NAME1, true, true);
+	}
+
+	/**
+	 * 
+	 * @param sparseM1
+	 * @param sparseM2
+	 * @param instType
+	 * @throws IOException 
+	 */
+	private void runJMLCReuseTest( String testname, boolean sparse, boolean modelReuse ) 
+		throws IOException
+	{	
+		String TEST_NAME = testname;
+		
+		TestConfiguration config = getTestConfiguration(TEST_NAME);
+		loadTestConfiguration(config);
+	
+		//generate inputs
+		double[][] Fd = TestUtils.round(getRandomMatrix(rows, cols, 0.51, 7.49, sparse?sparsity2:sparsity1, 1234));
+		String[][] F1s = FrameTransformTest.createFrameData(Fd, "");
+		
+		//run DML via JMLC
+		ArrayList<String[][]> F2set = execDMLScriptviaJMLC( TEST_NAME, F1s, modelReuse );
+		
+		//check correct result 
+		double[][] cF1 = add(Fd, 7);
+		for( String[][] data : F2set )
+			for( int i=0; i<F1s.length; i++ )
+				for( int j=0; j<F1s[i].length; j++ )
+					Assert.assertEquals("Wrong result: "+data[i][j]+".", new Double(data[i][j]), new Double(cF1[i][j]));
+	}
+
+	/**
+	 * 
+	 * @param X
+	 * @return
+	 * @throws DMLException
+	 * @throws IOException
+	 */
+	private ArrayList<String[][]> execDMLScriptviaJMLC( String testname, String[][] F1, boolean modelReuse) 
+		throws IOException
+	{
+		Timing time = new Timing(true);
+		
+		ArrayList<String[][]> ret = new ArrayList<String[][]>();
+		
+		//establish connection to SystemML
+		Connection conn = new Connection();
+				
+		try
+		{
+			//prepare input arguments
+			HashMap<String,String> args = new HashMap<String,String>();
+			args.put("$TRANSFORM_SPEC", "{ \"ids\": true ,\"recode\": [ 1, 2, 3] }");
+			
+			//read and precompile script
+			String script = conn.readScript(SCRIPT_DIR + TEST_DIR + testname + ".dml");	
+			PreparedScript pstmt = conn.prepareScript(script, args, new String[]{"F1","M"}, new String[]{"F2"}, false);
+			
+			if( modelReuse )
+				pstmt.setFrame("F1", F1, true);
+			
+			//execute script multiple times
+			for( int i=0; i<nRuns; i++ )
+			{
+				//bind input parameters
+				if( !modelReuse )
+					pstmt.setFrame("F1", F1);
+				
+				//execute script
+				ResultVariables rs = pstmt.executeScript();
+				
+				//get output parameter
+				String[][] Y = rs.getFrame("F2");
+				ret.add(Y); //keep result for comparison
+			}
+		}
+		catch(Exception ex)
+		{
+			ex.printStackTrace();
+			throw new IOException(ex);
+		}
+		finally
+		{
+			if( conn != null )
+				conn.close();
+		}
+		
+		System.out.println("JMLC scoring w/ "+nRuns+" runs in "+time.stop()+"ms.");
+		
+		return ret;
+	}
+	
+	/**
+	 * 
+	 * @param data
+	 * @param val
+	 * @return
+	 */
+	private double[][] add(double[][] data, double val) {
+		for( int i=0; i<data.length; i++ )
+			for( int j=0; j<data[i].length; j++ )
+				data[i][j] += val;
+		return data;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c8c8d81e/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameTransformTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameTransformTest.java b/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameTransformTest.java
index 2821664..912f324 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameTransformTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameTransformTest.java
@@ -170,17 +170,21 @@ public class FrameTransformTest extends AutomatedTestBase
 		return ret;
 	}
 	
+	protected static String[][] createFrameData(double[][] data) {
+		return createFrameData(data, "V");
+	}
+	
 	/**
 	 * 
 	 * @param data
 	 * @return
 	 */
-	protected static String[][] createFrameData(double[][] data) {
+	protected static String[][] createFrameData(double[][] data, String prefix) {
 		String[][] ret = new String[data.length][];
 		for( int i=0; i<data.length; i++ ) {
 			String[] row = new String[data[i].length]; 
 			for( int j=0; j<data[i].length; j++ )
-				row[j] = "V"+String.valueOf(data[i][j]);
+				row[j] = prefix+String.valueOf(data[i][j]);
 			ret[i] = row;
 		}
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/c8c8d81e/src/test/scripts/functions/jmlc/transform6.dml
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/jmlc/transform6.dml b/src/test/scripts/functions/jmlc/transform6.dml
new file mode 100644
index 0000000..2082e21
--- /dev/null
+++ b/src/test/scripts/functions/jmlc/transform6.dml
@@ -0,0 +1,29 @@
+#-------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#-------------------------------------------------------------
+
+F1 = read($F1, data_type="frame", format="csv"); #new data
+
+X = as.matrix(F1);
+X = X+7;
+F2 = as.frame(X);
+
+write(F2, $F2);
+


[08/11] incubator-systemml git commit: [SYSTEMML-616] Cleanup exception handling (stage 1, remove unnecessary)

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/MRJobInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/MRJobInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/MRJobInstruction.java
index 8d3bfb6..2811dd8 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/MRJobInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/MRJobInstruction.java
@@ -32,7 +32,6 @@ import org.apache.sysml.lops.compile.JobType;
 import org.apache.sysml.lops.runtime.RunMRJobs;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
@@ -1491,7 +1490,7 @@ public class MRJobInstruction extends Instruction
 
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		if ( DMLScript.rtplatform == RUNTIME_PLATFORM.SINGLE_NODE)
 			throw new DMLRuntimeException("MapReduce jobs cannot be executed when execution mode = singlenode");

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/SPInstructionParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/SPInstructionParser.java b/src/main/java/org/apache/sysml/runtime/instructions/SPInstructionParser.java
index 2694fc9..fa1a630 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/SPInstructionParser.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/SPInstructionParser.java
@@ -34,7 +34,6 @@ import org.apache.sysml.lops.WeightedSquaredLossR;
 import org.apache.sysml.lops.WeightedUnaryMM;
 import org.apache.sysml.lops.WeightedUnaryMMR;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.spark.AggregateTernarySPInstruction;
 import org.apache.sysml.runtime.instructions.spark.AggregateUnarySPInstruction;
 import org.apache.sysml.runtime.instructions.spark.AppendGAlignedSPInstruction;
@@ -260,7 +259,7 @@ public class SPInstructionParser extends InstructionParser
 	}
 
 	public static SPInstruction parseSingleInstruction (String str ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		if ( str == null || str.isEmpty() )
 			return null;
@@ -268,7 +267,7 @@ public class SPInstructionParser extends InstructionParser
 		SPINSTRUCTION_TYPE cptype = InstructionUtils.getSPType(str); 
 		if ( cptype == null )
 			// return null;
-			throw new DMLUnsupportedOperationException("Invalid SP Instruction Type: " + str);
+			throw new DMLRuntimeException("Invalid SP Instruction Type: " + str);
 		SPInstruction spinst = parseSingleInstruction(cptype, str);
 		if ( spinst == null )
 			throw new DMLRuntimeException("Unable to parse instruction: " + str);
@@ -276,7 +275,7 @@ public class SPInstructionParser extends InstructionParser
 	}
 	
 	public static SPInstruction parseSingleInstruction ( SPINSTRUCTION_TYPE sptype, String str ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{	
 		if ( str == null || str.isEmpty() ) 
 			return null;
@@ -410,7 +409,7 @@ public class SPInstructionParser extends InstructionParser
 				
 			case INVALID:
 			default:
-				throw new DMLUnsupportedOperationException("Invalid SP Instruction Type: " + sptype );
+				throw new DMLRuntimeException("Invalid SP Instruction Type: " + sptype );
 		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateBinaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateBinaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateBinaryCPInstruction.java
index 4d7c2ed..05a1bc5 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateBinaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateBinaryCPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.cp;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.functionobjects.Multiply;
 import org.apache.sysml.runtime.functionobjects.Plus;
@@ -73,7 +72,7 @@ public class AggregateBinaryCPInstruction extends BinaryCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		//get inputs
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateTernaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateTernaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateTernaryCPInstruction.java
index 53e3b18..bb704d4 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateTernaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateTernaryCPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.functionobjects.KahanPlus;
 import org.apache.sysml.runtime.functionobjects.Multiply;
@@ -73,7 +72,7 @@ public class AggregateTernaryCPInstruction extends ComputationCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{		
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName());
         MatrixBlock matBlock2 = ec.getMatrixInput(input2.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateUnaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateUnaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateUnaryCPInstruction.java
index 4950df3..24b2438 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateUnaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/AggregateUnaryCPInstruction.java
@@ -23,7 +23,6 @@ import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.functionobjects.Builtin;
@@ -73,7 +72,7 @@ public class AggregateUnaryCPInstruction extends UnaryCPInstruction
 	
 	@Override
 	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		String output_name = output.getName();
 		String opcode = getOpcode();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/ArithmeticBinaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/ArithmeticBinaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/ArithmeticBinaryCPInstruction.java
index c58b1f2..38ba9dd 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/ArithmeticBinaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/ArithmeticBinaryCPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.cp;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.operators.Operator;
 
@@ -42,7 +41,7 @@ public abstract class ArithmeticBinaryCPInstruction extends BinaryCPInstruction
 	}
 	
 	public static ArithmeticBinaryCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		CPOperand in1 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand in2 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
@@ -97,7 +96,7 @@ public abstract class ArithmeticBinaryCPInstruction extends BinaryCPInstruction
 			if(vt1 == ValueType.STRING 
 			   || vt2 == ValueType.STRING 
 			   || vt3 == ValueType.STRING)
-				throw new DMLUnsupportedOperationException("We do not support element-wise string operations on matrices "
+				throw new DMLRuntimeException("We do not support element-wise string operations on matrices "
 												  + in1.getName()
 												  + ", "
 												  + in2.getName()

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinBinaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinBinaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinBinaryCPInstruction.java
index 89464ec..fd75d11 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinBinaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinBinaryCPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.cp;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.runtime.functionobjects.ValueFunction;
 import org.apache.sysml.runtime.matrix.operators.BinaryOperator;
@@ -47,7 +46,7 @@ public abstract class BuiltinBinaryCPInstruction extends BinaryCPInstruction
 	}
 	
 	public static BuiltinBinaryCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException {
+		throws DMLRuntimeException {
 		CPOperand in1 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand in2 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand out = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinUnaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinUnaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinUnaryCPInstruction.java
index 2e5bcdf..27b291b 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinUnaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinUnaryCPInstruction.java
@@ -24,7 +24,6 @@ import java.util.Arrays;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.runtime.functionobjects.ValueFunction;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -50,7 +49,7 @@ public abstract class BuiltinUnaryCPInstruction extends UnaryCPInstruction
 	}
 	
 	public static BuiltinUnaryCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		CPOperand in = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand out = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/CPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/CPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/CPInstruction.java
index 1baff2c..4f3f530 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/CPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/CPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.cp;
 import org.apache.sysml.api.MLContextProxy;
 import org.apache.sysml.lops.runtime.RunMRJobs;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.CPInstructionParser;
 import org.apache.sysml.runtime.instructions.Instruction;
@@ -69,7 +68,7 @@ public abstract class CPInstruction extends Instruction
 
 	@Override
 	public Instruction preprocessInstruction(ExecutionContext ec)
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//default preprocess behavior (e.g., debug state)
 		Instruction tmp = super.preprocessInstruction(ec);
@@ -90,5 +89,5 @@ public abstract class CPInstruction extends Instruction
 
 	@Override 
 	public abstract void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException, DMLUnsupportedOperationException;
+			throws DMLRuntimeException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/CentralMomentCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/CentralMomentCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/CentralMomentCPInstruction.java
index 0b11d31..e8ca315 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/CentralMomentCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/CentralMomentCPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.cp;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.functionobjects.CM;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -92,7 +91,7 @@ public class CentralMomentCPInstruction extends AggregateUnaryCPInstruction
 	
 	@Override
 	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		String output_name = output.getName();
 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/CovarianceCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/CovarianceCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/CovarianceCPInstruction.java
index c4bf559..7ee6706 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/CovarianceCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/CovarianceCPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.cp;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.functionobjects.COV;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -85,7 +84,7 @@ public class CovarianceCPInstruction extends BinaryCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName());
         MatrixBlock matBlock2 = ec.getMatrixInput(input2.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/DataPartitionCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/DataPartitionCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/DataPartitionCPInstruction.java
index 16ee080..e474bcd 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/DataPartitionCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/DataPartitionCPInstruction.java
@@ -24,7 +24,6 @@ import org.apache.hadoop.mapred.JobConf;
 
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
@@ -79,7 +78,7 @@ public class DataPartitionCPInstruction extends UnaryCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		//get input
 		MatrixObject moIn = (MatrixObject) ec.getVariable(input1.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/FileCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/FileCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/FileCPInstruction.java
index 43d5556..404c26e 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/FileCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/FileCPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.cp;
 import java.io.IOException;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.functionobjects.RemoveFile;
 import org.apache.sysml.runtime.functionobjects.RenameFile;
@@ -56,18 +55,18 @@ public class FileCPInstruction extends CPInstruction
 	}
 
 	private static FileOperationCode getFileOperationCode ( String str ) 
-		throws DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		if ( str.equalsIgnoreCase("rm"))
 			return FileOperationCode.RemoveFile;
 		else if ( str.equalsIgnoreCase("mv") ) 
 			return FileOperationCode.MoveFile;
 		else
-			throw new DMLUnsupportedOperationException("Invalid function: " + str);
+			throw new DMLRuntimeException("Invalid function: " + str);
 	}
 	
 	public static FileCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		String opcode = InstructionUtils.getOpCode(str);
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/FrameAppendCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/FrameAppendCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/FrameAppendCPInstruction.java
index de012b5..a3a03a0 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/FrameAppendCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/FrameAppendCPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.FrameBlock;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -33,7 +32,7 @@ public final class FrameAppendCPInstruction extends AppendCPInstruction
 
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		//get inputs
 		FrameBlock fin1 = ec.getFrameInput(input1.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/FrameIndexingCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/FrameIndexingCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/FrameIndexingCPInstruction.java
index 7443503..df37c6e 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/FrameIndexingCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/FrameIndexingCPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.cp;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.FrameBlock;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -40,7 +39,7 @@ public final class FrameIndexingCPInstruction extends IndexingCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{	
 		String opcode = getOpcode();
 		IndexRange ixrange = getIndexRange(ec);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/FunctionCallCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/FunctionCallCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/FunctionCallCPInstruction.java
index 7e8ac12..348eef2 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/FunctionCallCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/FunctionCallCPInstruction.java
@@ -32,7 +32,6 @@ import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.DMLScriptException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.FunctionProgramBlock;
 import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
@@ -82,7 +81,7 @@ public class FunctionCallCPInstruction extends CPInstruction
 	 * 
 	 */
 	public static FunctionCallCPInstruction parseInstruction(String str) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{	
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType ( str );
 		String namespace = parts[1];
@@ -110,7 +109,7 @@ public class FunctionCallCPInstruction extends CPInstruction
 	
 	@Override
 	public Instruction preprocessInstruction(ExecutionContext ec)
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//default pre-process behavior
 		Instruction tmp = super.preprocessInstruction(ec);
@@ -125,7 +124,7 @@ public class FunctionCallCPInstruction extends CPInstruction
 
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{		
 		if( LOG.isTraceEnabled() ){
 			LOG.trace("Executing instruction : " + this.toString());
@@ -209,7 +208,7 @@ public class FunctionCallCPInstruction extends CPInstruction
 			String boundVarName = _boundOutputParamNames.get(i); 
 			Data boundValue = retVars.get(fpb.getOutputParams().get(i).getName());
 			if (boundValue == null)
-				throw new DMLUnsupportedOperationException(boundVarName + " was not assigned a return value");
+				throw new DMLRuntimeException(boundVarName + " was not assigned a return value");
 
 			//cleanup existing data bound to output variable name
 			Data exdata = ec.removeVariable(boundVarName);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/MMChainCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/MMChainCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/MMChainCPInstruction.java
index 8d4600e..f6b1a82 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/MMChainCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/MMChainCPInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.lops.MapMultChain.ChainType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -83,7 +82,7 @@ public class MMChainCPInstruction extends UnaryCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		//get inputs
 		MatrixBlock X = ec.getMatrixInput(input1.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/MMTSJCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/MMTSJCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/MMTSJCPInstruction.java
index cc28230..c67ab1d 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/MMTSJCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/MMTSJCPInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.lops.MMTSJ.MMTSJType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -71,7 +70,7 @@ public class MMTSJCPInstruction extends UnaryCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		//get inputs
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixAppendCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixAppendCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixAppendCPInstruction.java
index db34958..4c48ed7 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixAppendCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixAppendCPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -33,7 +32,7 @@ public final class MatrixAppendCPInstruction extends AppendCPInstruction
 
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		//get inputs
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixBuiltinCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixBuiltinCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixBuiltinCPInstruction.java
index 8e3705e..6116bc1 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixBuiltinCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixBuiltinCPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.LibCommonsMath;
@@ -37,7 +36,7 @@ public class MatrixBuiltinCPInstruction extends BuiltinUnaryCPInstruction
 
 	@Override 
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{	
 		UnaryOperator u_op = (UnaryOperator) _optr;
 		String output_name = output.getName();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixIndexingCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixIndexingCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixIndexingCPInstruction.java
index 91d2c39..efa704c 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixIndexingCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixIndexingCPInstruction.java
@@ -23,7 +23,6 @@ import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -43,7 +42,7 @@ public final class MatrixIndexingCPInstruction extends IndexingCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{	
 		String opcode = getOpcode();
 		IndexRange ixrange = getIndexRange(ec);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixArithmeticCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixArithmeticCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixArithmeticCPInstruction.java
index a55934a..208b688 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixArithmeticCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixArithmeticCPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.operators.BinaryOperator;
@@ -41,7 +40,7 @@ public class MatrixMatrixArithmeticCPInstruction extends ArithmeticBinaryCPInstr
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		// Read input matrices
         MatrixBlock inBlock1 = ec.getMatrixInput(input1.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixBuiltinCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixBuiltinCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixBuiltinCPInstruction.java
index 2681005..1fd0eb9 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixBuiltinCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixBuiltinCPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.LibCommonsMath;
@@ -43,7 +42,7 @@ public class MatrixMatrixBuiltinCPInstruction extends BuiltinBinaryCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		String opcode = getOpcode();
         

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixRelationalCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixRelationalCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixRelationalCPInstruction.java
index c0640fd..f972748 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixRelationalCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixMatrixRelationalCPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.operators.BinaryOperator;
@@ -41,7 +40,7 @@ public class MatrixMatrixRelationalCPInstruction extends RelationalBinaryCPInstr
 
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
         MatrixBlock inBlock1 = ec.getMatrixInput(input1.getName());
         MatrixBlock inBlock2 = ec.getMatrixInput(input2.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixReshapeCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixReshapeCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixReshapeCPInstruction.java
index 8139c62..608d2f6 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixReshapeCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixReshapeCPInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.LibMatrixReorg;
@@ -76,7 +75,7 @@ public class MatrixReshapeCPInstruction extends UnaryCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		//get inputs
 		MatrixBlock in = ec.getMatrixInput(input1.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixScalarBuiltinCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixScalarBuiltinCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixScalarBuiltinCPInstruction.java
index dc7cf73..cd140ef 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixScalarBuiltinCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixScalarBuiltinCPInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -42,7 +41,7 @@ public class MatrixScalarBuiltinCPInstruction extends BuiltinBinaryCPInstruction
 	
 	@Override 
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{	
 		CPOperand mat = ( input1.getDataType() == DataType.MATRIX ) ? input1 : input2;
 		CPOperand scalar = ( input1.getDataType() == DataType.MATRIX ) ? input2 : input1;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/MultiReturnBuiltinCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/MultiReturnBuiltinCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/MultiReturnBuiltinCPInstruction.java
index e785375..5fc61cc 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/MultiReturnBuiltinCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/MultiReturnBuiltinCPInstruction.java
@@ -24,7 +24,6 @@ import java.util.ArrayList;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -56,7 +55,7 @@ public class MultiReturnBuiltinCPInstruction extends ComputationCPInstruction
 	}
 	
 	public static MultiReturnBuiltinCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		ArrayList<CPOperand> outputs = new ArrayList<CPOperand>();
@@ -99,7 +98,7 @@ public class MultiReturnBuiltinCPInstruction extends ComputationCPInstruction
 
 	@Override 
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		String opcode = getOpcode();
 		MatrixObject mo = (MatrixObject) ec.getVariable(input1.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/PMMJCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/PMMJCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/PMMJCPInstruction.java
index 2961d21..8111cdb 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/PMMJCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/PMMJCPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -68,7 +67,7 @@ public class PMMJCPInstruction extends ComputationCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		//get inputs
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/ParameterizedBuiltinCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/ParameterizedBuiltinCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/ParameterizedBuiltinCPInstruction.java
index 4cff90a..04a7613 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/ParameterizedBuiltinCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/ParameterizedBuiltinCPInstruction.java
@@ -25,7 +25,6 @@ import org.apache.sysml.lops.Lop;
 import org.apache.sysml.parser.Statement;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.functionobjects.ParameterizedBuiltin;
@@ -75,7 +74,7 @@ public class ParameterizedBuiltinCPInstruction extends ComputationCPInstruction
 	}
 	
 	public static ParameterizedBuiltinCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		// first part is always the opcode
@@ -136,7 +135,7 @@ public class ParameterizedBuiltinCPInstruction extends ComputationCPInstruction
 
 	@Override 
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		
 		String opcode = getOpcode();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/QuantilePickCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/QuantilePickCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/QuantilePickCPInstruction.java
index ab48dd5..f061b22 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/QuantilePickCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/QuantilePickCPInstruction.java
@@ -24,7 +24,6 @@ import java.io.IOException;
 import org.apache.sysml.lops.PickByCount.OperationTypes;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -105,7 +104,7 @@ public class QuantilePickCPInstruction extends BinaryCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		switch( _type ) 
 		{

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/QuantileSortCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/QuantileSortCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/QuantileSortCPInstruction.java
index 3b748d6..37c4997 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/QuantileSortCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/QuantileSortCPInstruction.java
@@ -23,7 +23,6 @@ import org.apache.sysml.lops.SortKeys;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -84,7 +83,7 @@ public class QuantileSortCPInstruction extends UnaryCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		//acquire inputs matrices
 		MatrixBlock matBlock = ec.getMatrixInput(input1.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/QuaternaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/QuaternaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/QuaternaryCPInstruction.java
index 551d8bb..a223b08 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/QuaternaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/QuaternaryCPInstruction.java
@@ -26,7 +26,6 @@ import org.apache.sysml.lops.WeightedCrossEntropy.WCeMMType;
 import org.apache.sysml.lops.WeightedUnaryMM.WUMMType;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -116,7 +115,7 @@ public class QuaternaryCPInstruction extends ComputationCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		QuaternaryOperator qop = (QuaternaryOperator) _optr;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/ReorgCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/ReorgCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/ReorgCPInstruction.java
index ba79858..7e37c21 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/ReorgCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/ReorgCPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.cp;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.functionobjects.DiagIndex;
 import org.apache.sysml.runtime.functionobjects.RevIndex;
@@ -112,7 +111,7 @@ public class ReorgCPInstruction extends UnaryCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		//acquire inputs
 		MatrixBlock matBlock = ec.getMatrixInput(input1.getName());		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarAppendCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarAppendCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarAppendCPInstruction.java
index 2bfae2d..e777ea4 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarAppendCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarAppendCPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.operators.Operator;
 
@@ -32,7 +31,7 @@ public final class ScalarAppendCPInstruction extends AppendCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		//Append type: STRING
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarMatrixArithmeticCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarMatrixArithmeticCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarMatrixArithmeticCPInstruction.java
index ee4e80a..50ed490 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarMatrixArithmeticCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarMatrixArithmeticCPInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -42,7 +41,7 @@ public class ScalarMatrixArithmeticCPInstruction extends ArithmeticBinaryCPInstr
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		CPOperand mat = ( input1.getDataType() == DataType.MATRIX ) ? input1 : input2;
 		CPOperand scalar = ( input1.getDataType() == DataType.MATRIX ) ? input2 : input1;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarMatrixRelationalCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarMatrixRelationalCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarMatrixRelationalCPInstruction.java
index 09f7c85..7a5b0af 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarMatrixRelationalCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarMatrixRelationalCPInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -42,7 +41,7 @@ public class ScalarMatrixRelationalCPInstruction extends RelationalBinaryCPInstr
 
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		CPOperand mat = ( input1.getDataType() == DataType.MATRIX ) ? input1 : input2;
 		CPOperand scalar = ( input1.getDataType() == DataType.MATRIX ) ? input2 : input1;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/StringObject.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/StringObject.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/StringObject.java
index 53a2d5e..093cf94 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/StringObject.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/StringObject.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 
 public class StringObject extends ScalarObject 
 {	
@@ -78,7 +77,6 @@ public class StringObject extends ScalarObject
 	/**
 	 * 
 	 * @param len
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static void checkMaxStringLength( long len ) 
 		throws DMLRuntimeException

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/TernaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/TernaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/TernaryCPInstruction.java
index dc24dfd..0c48ba1 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/TernaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/TernaryCPInstruction.java
@@ -23,7 +23,6 @@ import org.apache.sysml.lops.Ternary;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.Instruction;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -96,7 +95,7 @@ public class TernaryCPInstruction extends ComputationCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException {
+		throws DMLRuntimeException {
 		
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName());
 		MatrixBlock matBlock2=null, wtBlock=null;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/UaggOuterChainCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/UaggOuterChainCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/UaggOuterChainCPInstruction.java
index d03b817..fcd2d56 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/UaggOuterChainCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/UaggOuterChainCPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.cp;
 import org.apache.sysml.lops.UAggOuterChain;
 import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.functionobjects.ReduceAll;
 import org.apache.sysml.runtime.functionobjects.ReduceCol;
@@ -80,7 +79,7 @@ public class UaggOuterChainCPInstruction extends UnaryCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		boolean rightCached = (_uaggOp.indexFn instanceof ReduceCol || _uaggOp.indexFn instanceof ReduceAll
 				|| !LibMatrixOuterAgg.isSupportedUaggOp(_uaggOp, _bOp));

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java
index ac5d456..0bd3fad 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java
@@ -28,7 +28,6 @@ import org.apache.sysml.lops.UnaryCP;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.parfor.ProgramConverter;
@@ -110,7 +109,7 @@ public class VariableCPInstruction extends CPInstruction
 		_uniqueVarID  = new IDSequence(true); 
 	}
 	
-	private static VariableOperationCode getVariableOperationCode ( String str ) throws DMLUnsupportedOperationException {
+	private static VariableOperationCode getVariableOperationCode ( String str ) throws DMLRuntimeException {
 		
 		if ( str.equalsIgnoreCase("createvar"))
 			return VariableOperationCode.CreateVariable;
@@ -158,7 +157,7 @@ public class VariableCPInstruction extends CPInstruction
 			return VariableOperationCode.SetFileName;
 		
 		else
-			throw new DMLUnsupportedOperationException("Invalid function: " + str);
+			throw new DMLRuntimeException("Invalid function: " + str);
 	}
 	
 	// Checks if this instructon is a remove instruction for varName
@@ -247,7 +246,7 @@ public class VariableCPInstruction extends CPInstruction
 	}
 	
 	public static VariableCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{	
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType ( str );
 		String opcode = parts[0];
@@ -428,7 +427,7 @@ public class VariableCPInstruction extends CPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{	
 		switch ( opcode ) 
 		{ 
@@ -872,7 +871,7 @@ public class VariableCPInstruction extends CPInstruction
 		}
 	}
 	
-	public static Instruction prepareRemoveInstruction(String varName) throws DMLRuntimeException, DMLUnsupportedOperationException {
+	public static Instruction prepareRemoveInstruction(String varName) throws DMLRuntimeException {
 		StringBuilder sb = new StringBuilder();
 		sb.append("CP");
 		sb.append(Lop.OPERAND_DELIMITOR);
@@ -884,7 +883,7 @@ public class VariableCPInstruction extends CPInstruction
 		return parseInstruction(str);
 	}
 	
-	public static Instruction prepareCopyInstruction(String srcVar, String destVar) throws DMLRuntimeException, DMLUnsupportedOperationException {
+	public static Instruction prepareCopyInstruction(String srcVar, String destVar) throws DMLRuntimeException {
 		StringBuilder sb = new StringBuilder();
 		sb.append("CP");
 		sb.append(Lop.OPERAND_DELIMITOR);
@@ -898,7 +897,7 @@ public class VariableCPInstruction extends CPInstruction
 		return parseInstruction(str);
 	}
 	
-	public static Instruction prepareMoveInstruction(String srcVar, String destFileName, String format) throws DMLRuntimeException, DMLUnsupportedOperationException {
+	public static Instruction prepareMoveInstruction(String srcVar, String destFileName, String format) throws DMLRuntimeException {
 		StringBuilder sb = new StringBuilder();
 		sb.append("CP");
 		sb.append(Lop.OPERAND_DELIMITOR);
@@ -914,7 +913,7 @@ public class VariableCPInstruction extends CPInstruction
 		return parseInstruction(str);
 	}
 	
-	public static Instruction prepareMoveInstruction(String srcVar, String destVar) throws DMLRuntimeException, DMLUnsupportedOperationException {
+	public static Instruction prepareMoveInstruction(String srcVar, String destVar) throws DMLRuntimeException {
 		// example: mvvar tempA A 
 		// (instead of two instructions -- cpvar tempA A; rmvar tempA)
 		StringBuilder sb = new StringBuilder();
@@ -947,11 +946,11 @@ public class VariableCPInstruction extends CPInstruction
 		return sb.toString();
 	}
 	
-	public static Instruction prepareCreateVariableInstruction(String varName, String fileName, boolean fNameOverride, String format) throws DMLRuntimeException, DMLUnsupportedOperationException {
+	public static Instruction prepareCreateVariableInstruction(String varName, String fileName, boolean fNameOverride, String format) throws DMLRuntimeException {
 		return parseInstruction(getBasicCreateVarString(varName, fileName, fNameOverride, format));
 	}
 	
-	public static Instruction prepareCreateVariableInstruction(String varName, String fileName, boolean fNameOverride, String format, MatrixCharacteristics mc) throws DMLRuntimeException, DMLUnsupportedOperationException {
+	public static Instruction prepareCreateVariableInstruction(String varName, String fileName, boolean fNameOverride, String format, MatrixCharacteristics mc) throws DMLRuntimeException {
 		StringBuilder sb = new StringBuilder();
 		sb.append(getBasicCreateVarString(varName, fileName, fNameOverride, format));
 		
@@ -971,7 +970,7 @@ public class VariableCPInstruction extends CPInstruction
 		return parseInstruction(str);
 	}	
 	
-	public static Instruction prepareCreateVariableInstruction(String varName, String fileName, boolean fNameOverride, String format, MatrixCharacteristics mc, boolean updateInPlace) throws DMLRuntimeException, DMLUnsupportedOperationException {
+	public static Instruction prepareCreateVariableInstruction(String varName, String fileName, boolean fNameOverride, String format, MatrixCharacteristics mc, boolean updateInPlace) throws DMLRuntimeException {
 		StringBuilder sb = new StringBuilder();
 		sb.append(getBasicCreateVarString(varName, fileName, fNameOverride, format));
 		
@@ -993,7 +992,7 @@ public class VariableCPInstruction extends CPInstruction
 		return parseInstruction(str);
 	}	
 	
-	public static Instruction prepareCreateVariableInstruction(String varName, String fileName, boolean fNameOverride, String format, MatrixCharacteristics mc, boolean updateInPlace, boolean hasHeader, String delim, boolean sparse) throws DMLRuntimeException, DMLUnsupportedOperationException {
+	public static Instruction prepareCreateVariableInstruction(String varName, String fileName, boolean fNameOverride, String format, MatrixCharacteristics mc, boolean updateInPlace, boolean hasHeader, String delim, boolean sparse) throws DMLRuntimeException {
 		StringBuilder sb = new StringBuilder();
 		sb.append(getBasicCreateVarString(varName, fileName, fNameOverride, format));
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cpfile/MatrixIndexingCPFileInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cpfile/MatrixIndexingCPFileInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cpfile/MatrixIndexingCPFileInstruction.java
index f5f2b58..d078560 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cpfile/MatrixIndexingCPFileInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cpfile/MatrixIndexingCPFileInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.cpfile;
 
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -93,7 +92,7 @@ public final class MatrixIndexingCPFileInstruction extends IndexingCPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{	
 		String opcode = getOpcode();
 		IndexRange ixrange = getIndexRange(ec).add(1);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/cpfile/ParameterizedBuiltinCPFileInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cpfile/ParameterizedBuiltinCPFileInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cpfile/ParameterizedBuiltinCPFileInstruction.java
index ba511c7..5302736 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cpfile/ParameterizedBuiltinCPFileInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cpfile/ParameterizedBuiltinCPFileInstruction.java
@@ -45,7 +45,6 @@ import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.CacheException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
@@ -90,10 +89,9 @@ public class ParameterizedBuiltinCPFileInstruction extends ParameterizedBuiltinC
 	 * @param str
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static ParameterizedBuiltinCPFileInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		// first part is always the opcode
@@ -117,7 +115,7 @@ public class ParameterizedBuiltinCPFileInstruction extends ParameterizedBuiltinC
 	
 	@Override 
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		String opcode = getOpcode();
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateBinaryInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateBinaryInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateBinaryInstruction.java
index d6c3d38..cfcae93 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateBinaryInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateBinaryInstruction.java
@@ -25,7 +25,6 @@ import org.apache.sysml.lops.MMCJ.MMCJType;
 import org.apache.sysml.lops.MapMult;
 import org.apache.sysml.lops.MapMult.CacheType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.Multiply;
 import org.apache.sysml.runtime.functionobjects.Plus;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -149,7 +148,7 @@ public class AggregateBinaryInstruction extends BinaryMRInstructionBase implemen
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{	
 		IndexedMatrixValue in1=cachedValues.getFirst(input1);
 		IndexedMatrixValue in2=cachedValues.getFirst(input2);
@@ -199,10 +198,9 @@ public class AggregateBinaryInstruction extends BinaryMRInstructionBase implemen
 	 * @param blockRowFactor
 	 * @param blockColFactor
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private void processMapMultInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, IndexedMatrixValue in1, IndexedMatrixValue in2, int blockRowFactor, int blockColFactor) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		boolean removeOutput = true;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateInstruction.java
index f030904..0eb1926 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -67,7 +66,7 @@ public class AggregateInstruction extends UnaryMRInstructionBase
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		
 		throw new DMLRuntimeException("no processInstruction for AggregateInstruction!");
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateUnaryInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateUnaryInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateUnaryInstruction.java
index 64ee42c..ad9b8b8 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateUnaryInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/AggregateUnaryInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.ReduceDiag;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -74,7 +73,7 @@ public class AggregateUnaryInstruction extends UnaryMRInstructionBase
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, 
 			int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList != null )

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendGInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendGInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendGInstruction.java
index e67291a..fae109e 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendGInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendGInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
@@ -66,7 +65,7 @@ public class AppendGInstruction extends AppendInstruction
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int brlen, int bclen)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		//setup basic meta data
 		int blen = _cbind ? bclen : brlen;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendInstruction.java
index 0efe595..7a97bf7 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -77,8 +76,8 @@ public class AppendInstruction extends BinaryMRInstructionBase
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int brlen, int bclen)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
-		throw new DMLUnsupportedOperationException("Operations on base append instruction not supported.");
+		throw new DMLRuntimeException("Operations on base append instruction not supported.");
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendMInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendMInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendMInstruction.java
index ad13fb6..777640f 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendMInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendMInstruction.java
@@ -23,7 +23,6 @@ import java.util.ArrayList;
 
 import org.apache.sysml.lops.AppendM.CacheType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -77,7 +76,7 @@ public class AppendMInstruction extends AppendInstruction implements IDistribute
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, 
 			int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{	
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input1);
 		if( blkList == null ) 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendRInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendRInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendRInstruction.java
index 41cbb06..35a7813 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendRInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/AppendRInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -53,7 +52,7 @@ public class AppendRInstruction extends AppendInstruction
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int brlen, int bclen)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{		
 		//get both inputs
 		IndexedMatrixValue left = cachedValues.getFirst(input1);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/BinUaggChainInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/BinUaggChainInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/BinUaggChainInstruction.java
index 9f8bafc..b6711cd 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/BinUaggChainInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/BinUaggChainInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
@@ -96,7 +95,7 @@ public class BinUaggChainInstruction extends UnaryInstruction
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			           IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get( input );
 		if( blkList == null )

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/BinaryInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/BinaryInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/BinaryInstruction.java
index d133a90..6d9c075 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/BinaryInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/BinaryInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -65,7 +64,7 @@ public class BinaryInstruction extends BinaryMRInstructionBase
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput,
 			int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		
 		IndexedMatrixValue in1=cachedValues.getFirst(input1);
 		IndexedMatrixValue in2=cachedValues.getFirst(input2);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/BinaryMInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/BinaryMInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/BinaryMInstruction.java
index b24f1c3..c83e4e6 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/BinaryMInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/BinaryMInstruction.java
@@ -24,7 +24,6 @@ import java.util.ArrayList;
 import org.apache.sysml.lops.AppendM.CacheType;
 import org.apache.sysml.lops.BinaryM.VectorType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.data.OperationsOnMatrixValues;
@@ -78,7 +77,7 @@ public class BinaryMInstruction extends BinaryMRInstructionBase implements IDist
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput,
 			int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{	
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input1);
 		if( blkList == null ) 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/CM_N_COVInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/CM_N_COVInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/CM_N_COVInstruction.java
index 6293f2f..1d6cb02 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/CM_N_COVInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/CM_N_COVInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.CM;
 import org.apache.sysml.runtime.functionobjects.COV;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -87,7 +86,7 @@ public class CM_N_COVInstruction extends UnaryMRInstructionBase
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		
 		throw new DMLRuntimeException("no processInstruction for AggregateInstruction!");
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/CSVWriteInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/CSVWriteInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/CSVWriteInstruction.java
index 8baf617..747ef00 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/CSVWriteInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/CSVWriteInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.parser.DataExpression;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.Instruction;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -65,7 +64,7 @@ public class CSVWriteInstruction extends UnaryMRInstructionBase{
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("CSVWriteInstruction.processInstruction should never be called");		
 	}
 }



[07/11] incubator-systemml git commit: [SYSTEMML-616] Cleanup exception handling (stage 1, remove unnecessary)

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineBinaryInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineBinaryInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineBinaryInstruction.java
index d0f1b02..e14768b 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineBinaryInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineBinaryInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -70,7 +69,7 @@ public class CombineBinaryInstruction extends BinaryMRInstructionBase
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("CombineInstruction.processInstruction should never be called!");
 		
 	}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineTernaryInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineTernaryInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineTernaryInstruction.java
index 0593602..783f1ae 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineTernaryInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineTernaryInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.lops.Ternary.OperationTypes;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -61,7 +60,7 @@ public class CombineTernaryInstruction extends TernaryInstruction
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, 
 			int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("CombineTernaryInstruction.processInstruction should never be called!");
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineUnaryInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineUnaryInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineUnaryInstruction.java
index 925805c..8d3affc 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineUnaryInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/CombineUnaryInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -61,7 +60,7 @@ public class CombineUnaryInstruction extends UnaryMRInstructionBase
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("CombineInstruction.processInstruction should never be called!");
 		
 	}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeAggregateInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeAggregateInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeAggregateInstruction.java
index e1569be..d2272ac 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeAggregateInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeAggregateInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -69,7 +68,7 @@ public class CumulativeAggregateInstruction extends AggregateUnaryInstruction
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{	
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList == null ) 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeOffsetInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeOffsetInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeOffsetInstruction.java
index ae11ba0..20ea366 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeOffsetInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeOffsetInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.runtime.functionobjects.Multiply;
 import org.apache.sysml.runtime.functionobjects.Plus;
@@ -79,7 +78,7 @@ public class CumulativeOffsetInstruction extends BinaryInstruction
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{	
 		IndexedMatrixValue in1 = cachedValues.getFirst(input1); //original data 
 		IndexedMatrixValue in2 = cachedValues.getFirst(input2); //offset row vector

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeSplitInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeSplitInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeSplitInstruction.java
index c3d533e..cb74b92 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeSplitInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/CumulativeSplitInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -71,7 +70,7 @@ public class CumulativeSplitInstruction extends UnaryInstruction
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{	
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList == null ) 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/GroupedAggregateInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/GroupedAggregateInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/GroupedAggregateInstruction.java
index 24006e2..bff774b 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/GroupedAggregateInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/GroupedAggregateInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.CM;
 import org.apache.sysml.runtime.functionobjects.KahanPlus;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -70,7 +69,7 @@ public class GroupedAggregateInstruction extends UnaryMRInstructionBase
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput,
 			int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("GroupedAggregateInstruction.processInstruction() should not be called!");
 		
 	}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/GroupedAggregateMInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/GroupedAggregateMInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/GroupedAggregateMInstruction.java
index 34f0945..e054427 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/GroupedAggregateMInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/GroupedAggregateMInstruction.java
@@ -23,7 +23,6 @@ import java.util.ArrayList;
 
 import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.KahanPlus;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
@@ -76,7 +75,7 @@ public class GroupedAggregateMInstruction extends BinaryMRInstructionBase implem
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, 
 			int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{	
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input1);
 		if( blkList == null ) 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/MMTSJMRInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/MMTSJMRInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/MMTSJMRInstruction.java
index de2ee5e..ce7b783 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/MMTSJMRInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/MMTSJMRInstruction.java
@@ -23,7 +23,6 @@ import java.util.ArrayList;
 
 import org.apache.sysml.lops.MMTSJ.MMTSJType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -86,7 +85,7 @@ public class MMTSJMRInstruction extends UnaryInstruction
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{		
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList !=null )
@@ -109,7 +108,7 @@ public class MMTSJMRInstruction extends UnaryInstruction
 				if( in instanceof MatrixBlock && out instanceof MatrixBlock )
 					((MatrixBlock) in).transposeSelfMatrixMultOperations((MatrixBlock)out, _type );
 				else
-					throw new DMLUnsupportedOperationException("Types "+in.getClass()+" and "+out.getClass()+" incompatible with "+MatrixBlock.class);
+					throw new DMLRuntimeException("Types "+in.getClass()+" and "+out.getClass()+" incompatible with "+MatrixBlock.class);
 				
 				//put the output value in the cache
 				if(iout==tempValue)

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/MRInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/MRInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/MRInstruction.java
index 386eebe..ea47e96 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/MRInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/MRInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.Instruction;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -61,7 +60,7 @@ public abstract class MRInstruction extends Instruction
 
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//do nothing (not applicable for MR instructions)
 	}
@@ -74,12 +73,11 @@ public abstract class MRInstruction extends Instruction
 	 * @param zeroInput
 	 * @param blockRowFactor
 	 * @param blockColFactor
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public abstract void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException;
+		throws DMLRuntimeException;
 
 	
 	/**

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/MapMultChainInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/MapMultChainInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/MapMultChainInstruction.java
index 6fff0fb..35029d7 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/MapMultChainInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/MapMultChainInstruction.java
@@ -23,7 +23,6 @@ import java.util.ArrayList;
 
 import org.apache.sysml.lops.MapMultChain.ChainType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
@@ -184,7 +183,7 @@ public class MapMultChainInstruction extends MRInstruction implements IDistribut
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			           IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(_input1);
 		if( blkList !=null )
@@ -227,10 +226,9 @@ public class MapMultChainInstruction extends MRInstruction implements IDistribut
 	 * @param outIx
 	 * @param outVal
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	private void processXtXvOperations(MatrixIndexes inIx, MatrixValue inVal, MatrixIndexes outIx, MatrixValue outVal ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		DistributedCacheInput dcInput2 = MRBaseForCommonInstructions.dcValues.get(_input2); //v
 		MatrixBlock Xi = (MatrixBlock)inVal;
@@ -250,10 +248,9 @@ public class MapMultChainInstruction extends MRInstruction implements IDistribut
 	 * @param outIx
 	 * @param outVal
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	private void processXtwXvOperations(MatrixIndexes inIx, MatrixValue inVal, MatrixIndexes outIx, MatrixValue outVal, ChainType chain )
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		DistributedCacheInput dcInput2 = MRBaseForCommonInstructions.dcValues.get(_input2); //v
 		DistributedCacheInput dcInput3 = MRBaseForCommonInstructions.dcValues.get(_input3); //w

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/MatrixReshapeMRInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/MatrixReshapeMRInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/MatrixReshapeMRInstruction.java
index 997ff7e..6d83cf0 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/MatrixReshapeMRInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/MatrixReshapeMRInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.LibMatrixReorg;
@@ -94,7 +93,7 @@ public class MatrixReshapeMRInstruction extends UnaryInstruction
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int brlen, int bclen )
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{		
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList != null )

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/PMMJMRInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/PMMJMRInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/PMMJMRInstruction.java
index 99e46ba..4e21aa3 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/PMMJMRInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/PMMJMRInstruction.java
@@ -24,7 +24,6 @@ import java.util.ArrayList;
 import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.lops.PMMJ.CacheType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -96,7 +95,7 @@ public class PMMJMRInstruction extends BinaryMRInstructionBase implements IDistr
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{	
 		//get both matrix inputs (left side always permutation)
 		DistributedCacheInput dcInput = MRBaseForCommonInstructions.dcValues.get(input1);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/ParameterizedBuiltinMRInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/ParameterizedBuiltinMRInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/ParameterizedBuiltinMRInstruction.java
index b58cf03..4cc0f6b 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/ParameterizedBuiltinMRInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/ParameterizedBuiltinMRInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.LibMatrixReorg;
@@ -137,7 +136,7 @@ public class ParameterizedBuiltinMRInstruction extends UnaryInstruction
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{		
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList !=null )

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/PickByCountInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/PickByCountInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/PickByCountInstruction.java
index 2aed2cb..c1c0796 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/PickByCountInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/PickByCountInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.lops.PickByCount.OperationTypes;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -97,7 +96,7 @@ public class PickByCountInstruction extends MRInstruction
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("PickByCountInstruction.processInstruction should never be called!");
 		
 	}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/QuaternaryInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/QuaternaryInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/QuaternaryInstruction.java
index 8c2b110..4a70dd1 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/QuaternaryInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/QuaternaryInstruction.java
@@ -33,7 +33,6 @@ import org.apache.sysml.lops.WeightedUnaryMM;
 import org.apache.sysml.lops.WeightedUnaryMM.WUMMType;
 import org.apache.sysml.lops.WeightedUnaryMMR;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.SwapIndex;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
@@ -308,7 +307,7 @@ public class QuaternaryInstruction extends MRInstruction implements IDistributed
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			           IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		QuaternaryOperator qop = (QuaternaryOperator)optr; 
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/RandInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/RandInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/RandInstruction.java
index 136dd13..ed0f883 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/RandInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/RandInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.hops.Hop.DataGenMethod;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -104,7 +103,7 @@ public class RandInstruction extends DataGenMRInstruction
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		//do nothing (only meta carrier, handled in special job type)
 	}	

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/RangeBasedReIndexInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/RangeBasedReIndexInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/RangeBasedReIndexInstruction.java
index 5ca5aa3..80ca147 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/RangeBasedReIndexInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/RangeBasedReIndexInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -99,7 +98,7 @@ public class RangeBasedReIndexInstruction extends UnaryMRInstructionBase
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{		
 		if(input==output)
 			throw new DMLRuntimeException("input cannot be the same for output for "+instString);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/ReblockInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/ReblockInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/ReblockInstruction.java
index 1d65446..2bcca4a 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/ReblockInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/ReblockInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.Instruction;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -67,7 +66,7 @@ public class ReblockInstruction extends UnaryMRInstructionBase
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("ReblockInstruction.processInstruction should never be called");
 		
 	}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/RemoveEmptyMRInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/RemoveEmptyMRInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/RemoveEmptyMRInstruction.java
index eaed828..1ca7973 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/RemoveEmptyMRInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/RemoveEmptyMRInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.LibMatrixReorg;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -93,7 +92,7 @@ public class RemoveEmptyMRInstruction extends BinaryInstruction
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{			
 		//get input and offsets
 		IndexedMatrixValue inData = cachedValues.getFirst(input1);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/ReorgInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/ReorgInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/ReorgInstruction.java
index a1d7cdc..6c6d50c 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/ReorgInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/ReorgInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.DiagIndex;
 import org.apache.sysml.runtime.functionobjects.RevIndex;
 import org.apache.sysml.runtime.functionobjects.SwapIndex;
@@ -91,7 +90,7 @@ public class ReorgInstruction extends UnaryMRInstructionBase
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, 
 			int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/ReplicateInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/ReplicateInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/ReplicateInstruction.java
index 66dcf92..ed6ed8a 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/ReplicateInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/ReplicateInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
@@ -92,7 +91,7 @@ public class ReplicateInstruction extends UnaryMRInstructionBase
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/ScalarInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/ScalarInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/ScalarInstruction.java
index f896a32..b42b227 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/ScalarInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/ScalarInstruction.java
@@ -24,7 +24,6 @@ import java.util.ArrayList;
 import org.apache.sysml.lops.Lop;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.data.OperationsOnMatrixValues;
@@ -70,7 +69,7 @@ public class ScalarInstruction extends UnaryMRInstructionBase
 	
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList != null )

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/SeqInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/SeqInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/SeqInstruction.java
index 3ff97d4..e650128 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/SeqInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/SeqInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 import org.apache.sysml.hops.Hop.DataGenMethod;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -71,7 +70,7 @@ public class SeqInstruction extends DataGenMRInstruction
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		// TODO Auto-generated method stub
 		
 	}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/TernaryInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/TernaryInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/TernaryInstruction.java
index c7b84c8..be16af5 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/TernaryInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/TernaryInstruction.java
@@ -24,7 +24,6 @@ import java.util.HashMap;
 import org.apache.sysml.lops.Ternary;
 import org.apache.sysml.lops.Ternary.OperationTypes;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.CTableMap;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -214,7 +213,7 @@ public class TernaryInstruction extends MRInstruction
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			            IndexedMatrixValue zeroInput, HashMap<Byte, CTableMap> resultMaps, HashMap<Byte, MatrixBlock> resultBlocks, 
 			            int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{	
 		
 		IndexedMatrixValue in1, in2, in3 = null;
@@ -300,7 +299,7 @@ public class TernaryInstruction extends MRInstruction
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, 
 			int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		throw new DMLRuntimeException("This function should not be called!");
 	}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/UaggOuterChainInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/UaggOuterChainInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/UaggOuterChainInstruction.java
index 99123e7..d34d668 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/UaggOuterChainInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/UaggOuterChainInstruction.java
@@ -24,7 +24,6 @@ import java.util.Arrays;
 
 import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.ReduceAll;
 import org.apache.sysml.runtime.functionobjects.ReduceCol;
 import org.apache.sysml.runtime.functionobjects.ReduceRow;
@@ -132,7 +131,7 @@ public class UaggOuterChainInstruction extends BinaryInstruction implements IDis
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			           IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		ArrayList<IndexedMatrixValue> blkList = null; 
 		boolean rightCached = (_uaggOp.indexFn instanceof ReduceCol || _uaggOp.indexFn instanceof ReduceAll

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/UnaryInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/UnaryInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/UnaryInstruction.java
index 4c86751..3626f5f 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/UnaryInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/UnaryInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -67,7 +66,7 @@ public class UnaryInstruction extends UnaryMRInstructionBase
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/mr/ZeroOutInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/ZeroOutInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/ZeroOutInstruction.java
index 145a089..3282ac9 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/ZeroOutInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/ZeroOutInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.data.OperationsOnMatrixValues;
@@ -75,7 +74,7 @@ public class ZeroOutInstruction extends UnaryMRInstructionBase
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/AggregateTernarySPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/AggregateTernarySPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/AggregateTernarySPInstruction.java
index d05585b..14baa6e 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/AggregateTernarySPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/AggregateTernarySPInstruction.java
@@ -25,7 +25,6 @@ import org.apache.spark.api.java.function.Function;
 import scala.Tuple2;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.KahanPlus;
@@ -80,7 +79,7 @@ public class AggregateTernarySPInstruction extends ComputationSPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/AggregateUnarySPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/AggregateUnarySPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/AggregateUnarySPInstruction.java
index 82fa6fd..7aebd0c 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/AggregateUnarySPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/AggregateUnarySPInstruction.java
@@ -28,7 +28,6 @@ import scala.Tuple2;
 import org.apache.sysml.hops.AggBinaryOp.SparkAggType;
 import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.ReduceAll;
@@ -89,7 +88,7 @@ public class AggregateUnarySPInstruction extends UnarySPInstruction
 	
 	@Override
 	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		MatrixCharacteristics mc = sec.getMatrixCharacteristics(input1.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendGAlignedSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendGAlignedSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendGAlignedSPInstruction.java
index f1ddcdf..4a83c6f 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendGAlignedSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendGAlignedSPInstruction.java
@@ -25,7 +25,6 @@ import org.apache.spark.api.java.function.PairFunction;
 import scala.Tuple2;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.OffsetColumnIndex;
@@ -71,7 +70,7 @@ public class AppendGAlignedSPInstruction extends BinarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		// general case append (map-extend, aggregate)
 		SparkExecutionContext sec = (SparkExecutionContext)ec;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendGSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendGSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendGSPInstruction.java
index 30ca4f7..4badf24 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendGSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendGSPInstruction.java
@@ -29,7 +29,6 @@ import org.apache.spark.api.java.function.PairFunction;
 import scala.Tuple2;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.OffsetColumnIndex;
@@ -77,7 +76,7 @@ public class AppendGSPInstruction extends BinarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		// general case append (map-extend, aggregate)
 		SparkExecutionContext sec = (SparkExecutionContext)ec;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendMSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendMSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendMSPInstruction.java
index 245f234..0c1d22c 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendMSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendMSPInstruction.java
@@ -28,7 +28,6 @@ import org.apache.spark.api.java.function.PairFlatMapFunction;
 import scala.Tuple2;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.OffsetColumnIndex;
@@ -81,7 +80,7 @@ public class AppendMSPInstruction extends BinarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		// map-only append (rhs must be vector and fit in mapper mem)
 		SparkExecutionContext sec = (SparkExecutionContext)ec;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendRSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendRSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendRSPInstruction.java
index e9e6e35..93fc7aa 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendRSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/AppendRSPInstruction.java
@@ -25,7 +25,6 @@ import org.apache.spark.api.java.function.Function;
 import scala.Tuple2;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.OffsetColumnIndex;
@@ -69,7 +68,7 @@ public class AppendRSPInstruction extends BinarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		// reduce-only append (output must have at most one column block)
 		SparkExecutionContext sec = (SparkExecutionContext)ec;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/ArithmeticBinarySPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/ArithmeticBinarySPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/ArithmeticBinarySPInstruction.java
index e4a8708..c73d4dc 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/ArithmeticBinarySPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/ArithmeticBinarySPInstruction.java
@@ -24,7 +24,6 @@ import org.apache.sysml.lops.Lop;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -43,10 +42,9 @@ public abstract class ArithmeticBinarySPInstruction extends BinarySPInstruction
 	 * @param str
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static ArithmeticBinarySPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		CPOperand in1 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand in2 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/BinUaggChainSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/BinUaggChainSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/BinUaggChainSPInstruction.java
index 5c7ed71..6b3efdb 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/BinUaggChainSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/BinUaggChainSPInstruction.java
@@ -23,7 +23,6 @@ import org.apache.spark.api.java.JavaPairRDD;
 import org.apache.spark.api.java.function.Function;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -69,7 +68,7 @@ public class BinUaggChainSPInstruction extends UnarySPInstruction
 
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/BinarySPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/BinarySPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/BinarySPInstruction.java
index 20b1548..4d2e78c 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/BinarySPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/BinarySPInstruction.java
@@ -24,7 +24,6 @@ import org.apache.spark.api.java.JavaPairRDD;
 import org.apache.sysml.lops.BinaryM.VectorType;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -97,10 +96,9 @@ public abstract class BinarySPInstruction extends ComputationSPInstruction
 	 * 
 	 * @param ec
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	protected void processMatrixMatrixBinaryInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
@@ -143,10 +141,9 @@ public abstract class BinarySPInstruction extends ComputationSPInstruction
 	 * @param ec
 	 * @param type 
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	protected void processMatrixBVectorBinaryInstruction(ExecutionContext ec, VectorType vtype) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
@@ -189,10 +186,9 @@ public abstract class BinarySPInstruction extends ComputationSPInstruction
 	 * 
 	 * @param ec
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	protected void processMatrixScalarBinaryInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 	

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinBinarySPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinBinarySPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinBinarySPInstruction.java
index 01657ec..acad128 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinBinarySPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinBinarySPInstruction.java
@@ -24,7 +24,6 @@ import org.apache.sysml.lops.BinaryM.VectorType;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.runtime.functionobjects.ValueFunction;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -47,10 +46,9 @@ public abstract class BuiltinBinarySPInstruction extends BinarySPInstruction
 	 * @param str
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static BuiltinBinarySPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		CPOperand in1 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand in2 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinUnarySPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinUnarySPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinUnarySPInstruction.java
index 0bd272c..66e314f 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinUnarySPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinUnarySPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.spark;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.runtime.functionobjects.ValueFunction;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
@@ -44,10 +43,9 @@ public abstract class BuiltinUnarySPInstruction extends UnarySPInstruction
 	 * @param str
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static BuiltinUnarySPInstruction parseInstruction ( String str ) 
-			throws DMLRuntimeException, DMLUnsupportedOperationException 
+			throws DMLRuntimeException 
 	{
 		CPOperand in = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand out = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/CSVReblockSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/CSVReblockSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/CSVReblockSPInstruction.java
index 6003a0d..6aa7597 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/CSVReblockSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/CSVReblockSPInstruction.java
@@ -25,7 +25,6 @@ import org.apache.spark.api.java.JavaPairRDD;
 
 import org.apache.sysml.hops.recompile.Recompiler;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
@@ -89,7 +88,7 @@ public class CSVReblockSPInstruction extends UnarySPInstruction
 	@Override
 	@SuppressWarnings("unchecked")
 	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		SparkExecutionContext sec = (SparkExecutionContext) ec;
 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/CentralMomentSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/CentralMomentSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/CentralMomentSPInstruction.java
index a64f825..4786348 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/CentralMomentSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/CentralMomentSPInstruction.java
@@ -28,7 +28,6 @@ import scala.Tuple2;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.CM;
@@ -112,7 +111,7 @@ public class CentralMomentSPInstruction extends UnarySPInstruction
 	
 	@Override
 	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/CheckpointSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/CheckpointSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/CheckpointSPInstruction.java
index 87b8a0c..31d7665 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/CheckpointSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/CheckpointSPInstruction.java
@@ -23,7 +23,6 @@ import org.apache.spark.api.java.JavaPairRDD;
 import org.apache.spark.storage.StorageLevel;
 import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
@@ -70,7 +69,7 @@ public class CheckpointSPInstruction extends UnarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/CovarianceSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/CovarianceSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/CovarianceSPInstruction.java
index ba75803..10e0d56 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/CovarianceSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/CovarianceSPInstruction.java
@@ -28,7 +28,6 @@ import scala.Tuple2;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.COV;
@@ -97,7 +96,7 @@ public class CovarianceSPInstruction extends BinarySPInstruction
 	
 	@Override
 	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		COVOperator cop = ((COVOperator)_optr); 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/CpmmSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/CpmmSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/CpmmSPInstruction.java
index b7720b9..58c5834 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/CpmmSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/CpmmSPInstruction.java
@@ -26,7 +26,6 @@ import scala.Tuple2;
 
 import org.apache.sysml.hops.AggBinaryOp.SparkAggType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.Multiply;
@@ -92,7 +91,7 @@ public class CpmmSPInstruction extends BinarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/CumulativeAggregateSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/CumulativeAggregateSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/CumulativeAggregateSPInstruction.java
index 3c803b8..91ad3fb 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/CumulativeAggregateSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/CumulativeAggregateSPInstruction.java
@@ -26,7 +26,6 @@ import org.apache.spark.api.java.function.PairFunction;
 import scala.Tuple2;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -73,7 +72,7 @@ public class CumulativeAggregateSPInstruction extends AggregateUnarySPInstructio
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		MatrixCharacteristics mc = sec.getMatrixCharacteristics(input1.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/CumulativeOffsetSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/CumulativeOffsetSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/CumulativeOffsetSPInstruction.java
index 6022126..26b7375 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/CumulativeOffsetSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/CumulativeOffsetSPInstruction.java
@@ -28,7 +28,6 @@ import org.apache.spark.api.java.function.PairFlatMapFunction;
 import scala.Tuple2;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.Builtin;
@@ -99,7 +98,7 @@ public class CumulativeOffsetSPInstruction extends BinarySPInstruction
 
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		MatrixCharacteristics mc = sec.getMatrixCharacteristics(input2.getName());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MapmmChainSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MapmmChainSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MapmmChainSPInstruction.java
index 84e94bc..159eddf 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MapmmChainSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MapmmChainSPInstruction.java
@@ -29,7 +29,6 @@ import scala.Tuple2;
 import org.apache.sysml.lops.MapMultChain;
 import org.apache.sysml.lops.MapMultChain.ChainType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -122,7 +121,7 @@ public class MapmmChainSPInstruction extends SPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
@@ -161,7 +160,7 @@ public class MapmmChainSPInstruction extends SPInstruction
 		private PartitionedBroadcastMatrix _pmV = null;
 		
 		public RDDMapMMChainFunction( PartitionedBroadcastMatrix bV) 
-			throws DMLRuntimeException, DMLUnsupportedOperationException
+			throws DMLRuntimeException
 		{			
 			//get first broadcast vector (always single block)
 			_pmV = bV;
@@ -192,7 +191,7 @@ public class MapmmChainSPInstruction extends SPInstruction
 		private ChainType _chainType = null;
 		
 		public RDDMapMMChainFunction2( PartitionedBroadcastMatrix bV, PartitionedBroadcastMatrix bW, ChainType chain) 
-			throws DMLRuntimeException, DMLUnsupportedOperationException
+			throws DMLRuntimeException
 		{			
 			//get both broadcast vectors (first always single block)
 			_pmV = bV;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MapmmSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MapmmSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MapmmSPInstruction.java
index f539631..400ccf0 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MapmmSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MapmmSPInstruction.java
@@ -33,7 +33,6 @@ import org.apache.sysml.hops.AggBinaryOp.SparkAggType;
 import org.apache.sysml.lops.MapMult;
 import org.apache.sysml.lops.MapMult.CacheType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.Multiply;
@@ -107,7 +106,7 @@ public class MapmmSPInstruction extends BinarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorArithmeticSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorArithmeticSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorArithmeticSPInstruction.java
index 6f3217f..f733402 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorArithmeticSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorArithmeticSPInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.spark;
 
 import org.apache.sysml.lops.BinaryM.VectorType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -49,7 +48,7 @@ public class MatrixBVectorArithmeticSPInstruction extends ArithmeticBinarySPInst
 
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException, DMLUnsupportedOperationException 
+			throws DMLRuntimeException 
 	{
 		//common binary matrix-broadcast vector process instruction
 		super.processMatrixBVectorBinaryInstruction(ec, _vtype);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorBuiltinSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorBuiltinSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorBuiltinSPInstruction.java
index a808c26..404bf39 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorBuiltinSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorBuiltinSPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.spark;
 
 import org.apache.sysml.lops.BinaryM.VectorType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -48,7 +47,7 @@ public class MatrixBVectorBuiltinSPInstruction extends BuiltinBinarySPInstructio
 
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException, DMLUnsupportedOperationException 
+			throws DMLRuntimeException 
 	{
 		//common binary matrix-broadcast vector process instruction
 		super.processMatrixBVectorBinaryInstruction(ec, _vtype);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorRelationalSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorRelationalSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorRelationalSPInstruction.java
index a253321..242b490 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorRelationalSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBVectorRelationalSPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.spark;
 
 import org.apache.sysml.lops.BinaryM.VectorType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -49,7 +48,7 @@ public class MatrixBVectorRelationalSPInstruction extends RelationalBinarySPInst
 
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		//common binary matrix-broadcast vector process instruction
 		super.processMatrixBVectorBinaryInstruction(ec, _vtype);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBuiltinSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBuiltinSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBuiltinSPInstruction.java
index 48e649e..1a18a05 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBuiltinSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixBuiltinSPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.spark;
 import org.apache.spark.api.java.JavaPairRDD;
 import org.apache.spark.api.java.function.Function;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
@@ -43,7 +42,7 @@ public class MatrixBuiltinSPInstruction extends BuiltinUnarySPInstruction
 
 	@Override 
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixIndexingSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixIndexingSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixIndexingSPInstruction.java
index b379d2c..9aa553a 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixIndexingSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixIndexingSPInstruction.java
@@ -30,7 +30,6 @@ import scala.Tuple2;
 
 import org.apache.sysml.hops.AggBinaryOp.SparkAggType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -136,7 +135,7 @@ public class MatrixIndexingSPInstruction  extends UnarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		String opcode = getOpcode();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixArithmeticSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixArithmeticSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixArithmeticSPInstruction.java
index 2aec1c0..e722a43 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixArithmeticSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixArithmeticSPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.spark;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -44,7 +43,7 @@ public class MatrixMatrixArithmeticSPInstruction extends ArithmeticBinarySPInstr
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//common binary matrix-matrix process instruction
 		super.processMatrixMatrixBinaryInstruction(ec);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixBuiltinSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixBuiltinSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixBuiltinSPInstruction.java
index ec93487..1ab995e 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixBuiltinSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixBuiltinSPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.spark;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -35,7 +34,7 @@ public class MatrixMatrixBuiltinSPInstruction extends BuiltinBinarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		//common binary matrix-matrix process instruction
 		super.processMatrixMatrixBinaryInstruction(ec);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixRelationalSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixRelationalSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixRelationalSPInstruction.java
index e4ec117..ede6ad1 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixRelationalSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixMatrixRelationalSPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.spark;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -44,7 +43,7 @@ public class MatrixMatrixRelationalSPInstruction extends RelationalBinarySPInstr
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//common binary matrix-matrix process instruction
 		super.processMatrixMatrixBinaryInstruction(ec);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixReshapeSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixReshapeSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixReshapeSPInstruction.java
index c2d180e..9bcf178 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixReshapeSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixReshapeSPInstruction.java
@@ -28,7 +28,6 @@ import scala.Tuple2;
 
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -90,7 +89,7 @@ public class MatrixReshapeSPInstruction extends UnarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		



[10/11] incubator-systemml git commit: [SYSTEMML-616] Cleanup exception handling (stage 1, remove unnecessary)

Posted by mb...@apache.org.
[SYSTEMML-616] Cleanup exception handling (stage 1, remove unnecessary)

This patch removes the following unused or unnecessary exceptions:
1) AppException
2) CacheIOException (now CacheException)
3) CacheStatusException (now CacheException)
4) DMLUnsupportedOperationException (now DMLRuntimeException)

Furthermore, this patch also includes a fix for the frame read/write
test (cleanup of generated files).

Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/6c89c3a7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/6c89c3a7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/6c89c3a7

Branch: refs/heads/master
Commit: 6c89c3a7a4f836c30c8be64861f051018b7d0c52
Parents: d9e0748
Author: Matthias Boehm <mb...@us.ibm.com>
Authored: Tue Apr 5 00:17:38 2016 -0700
Committer: Matthias Boehm <mb...@us.ibm.com>
Committed: Tue Apr 5 00:36:54 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/sysml/api/DMLScript.java    |  14 +--
 .../sysml/hops/cost/CostEstimationWrapper.java  |  10 +-
 .../apache/sysml/hops/cost/CostEstimator.java   |  22 ++--
 .../sysml/hops/cost/CostEstimatorNumMRJobs.java |   5 +-
 .../hops/cost/CostEstimatorStaticRuntime.java   |  23 ++--
 .../sysml/hops/globalopt/GDFEnumOptimizer.java  |  17 +--
 .../sysml/hops/globalopt/GlobalOptimizer.java   |   3 +-
 .../hops/globalopt/GlobalOptimizerWrapper.java  |   6 +-
 .../apache/sysml/hops/recompile/Recompiler.java |  40 ++----
 .../hops/rewrite/RewriteConstantFolding.java    |   4 +-
 .../java/org/apache/sysml/lops/compile/Dag.java |  43 ++-----
 .../apache/sysml/lops/runtime/RunMRJobs.java    |   6 +-
 .../org/apache/sysml/parser/DMLProgram.java     |  11 +-
 .../DMLUnsupportedOperationException.java       |  32 -----
 .../runtime/controlprogram/ForProgramBlock.java |   3 +-
 .../controlprogram/FunctionProgramBlock.java    |   3 +-
 .../runtime/controlprogram/IfProgramBlock.java  |   6 +-
 .../controlprogram/ParForProgramBlock.java      |  27 ++---
 .../sysml/runtime/controlprogram/Program.java   |   3 +-
 .../runtime/controlprogram/ProgramBlock.java    |  13 +-
 .../controlprogram/WhileProgramBlock.java       |   5 +-
 .../caching/CacheIOException.java               |  49 --------
 .../caching/CacheStatusException.java           |  44 -------
 .../controlprogram/caching/CacheableData.java   |  18 ++-
 .../controlprogram/caching/FrameObject.java     |   4 +-
 .../controlprogram/caching/MatrixObject.java    |  52 ++++----
 .../context/SparkExecutionContext.java          |  27 ++---
 .../parfor/DataPartitionerLocal.java            |   4 +-
 .../DataPartitionerRemoteSparkMapper.java       |   3 +-
 .../DataPartitionerRemoteSparkReducer.java      |   3 +-
 .../controlprogram/parfor/ParWorker.java        |  10 +-
 .../controlprogram/parfor/ProgramConverter.java | 116 +++++++-----------
 .../parfor/RemoteDPParForSpark.java             |   4 +-
 .../parfor/RemoteDPParForSparkWorker.java       |   6 +-
 .../parfor/RemoteParForSpark.java               |   4 +-
 .../parfor/RemoteParForSparkWorker.java         |   6 +-
 .../parfor/opt/OptTreeConverter.java            |  24 ++--
 .../parfor/opt/OptimizationWrapper.java         |  10 +-
 .../controlprogram/parfor/opt/Optimizer.java    |   4 +-
 .../parfor/opt/OptimizerConstrained.java        |   3 +-
 .../parfor/opt/OptimizerRuleBased.java          |  36 ++----
 .../controlprogram/parfor/opt/PerfTestTool.java |  25 ++--
 .../parfor/opt/ProgramRecompiler.java           |  21 ++--
 .../sysml/runtime/functionobjects/Builtin.java  |   5 +-
 .../instructions/CPInstructionParser.java       |   5 +-
 .../sysml/runtime/instructions/Instruction.java |   9 +-
 .../runtime/instructions/InstructionParser.java |   5 +-
 .../runtime/instructions/InstructionUtils.java  |  22 +---
 .../instructions/MRInstructionParser.java       |  25 ++--
 .../runtime/instructions/MRJobInstruction.java  |   3 +-
 .../instructions/SPInstructionParser.java       |   9 +-
 .../cp/AggregateBinaryCPInstruction.java        |   3 +-
 .../cp/AggregateTernaryCPInstruction.java       |   3 +-
 .../cp/AggregateUnaryCPInstruction.java         |   3 +-
 .../cp/ArithmeticBinaryCPInstruction.java       |   5 +-
 .../cp/BuiltinBinaryCPInstruction.java          |   3 +-
 .../cp/BuiltinUnaryCPInstruction.java           |   3 +-
 .../runtime/instructions/cp/CPInstruction.java  |   5 +-
 .../cp/CentralMomentCPInstruction.java          |   3 +-
 .../cp/CovarianceCPInstruction.java             |   3 +-
 .../cp/DataPartitionCPInstruction.java          |   3 +-
 .../instructions/cp/FileCPInstruction.java      |   7 +-
 .../cp/FrameAppendCPInstruction.java            |   3 +-
 .../cp/FrameIndexingCPInstruction.java          |   3 +-
 .../cp/FunctionCallCPInstruction.java           |   9 +-
 .../instructions/cp/MMChainCPInstruction.java   |   3 +-
 .../instructions/cp/MMTSJCPInstruction.java     |   3 +-
 .../cp/MatrixAppendCPInstruction.java           |   3 +-
 .../cp/MatrixBuiltinCPInstruction.java          |   3 +-
 .../cp/MatrixIndexingCPInstruction.java         |   3 +-
 .../cp/MatrixMatrixArithmeticCPInstruction.java |   3 +-
 .../cp/MatrixMatrixBuiltinCPInstruction.java    |   3 +-
 .../cp/MatrixMatrixRelationalCPInstruction.java |   3 +-
 .../cp/MatrixReshapeCPInstruction.java          |   3 +-
 .../cp/MatrixScalarBuiltinCPInstruction.java    |   3 +-
 .../cp/MultiReturnBuiltinCPInstruction.java     |   5 +-
 .../instructions/cp/PMMJCPInstruction.java      |   3 +-
 .../cp/ParameterizedBuiltinCPInstruction.java   |   5 +-
 .../cp/QuantilePickCPInstruction.java           |   3 +-
 .../cp/QuantileSortCPInstruction.java           |   3 +-
 .../cp/QuaternaryCPInstruction.java             |   3 +-
 .../instructions/cp/ReorgCPInstruction.java     |   3 +-
 .../cp/ScalarAppendCPInstruction.java           |   3 +-
 .../cp/ScalarMatrixArithmeticCPInstruction.java |   3 +-
 .../cp/ScalarMatrixRelationalCPInstruction.java |   3 +-
 .../runtime/instructions/cp/StringObject.java   |   2 -
 .../instructions/cp/TernaryCPInstruction.java   |   3 +-
 .../cp/UaggOuterChainCPInstruction.java         |   3 +-
 .../instructions/cp/VariableCPInstruction.java  |  25 ++--
 .../cpfile/MatrixIndexingCPFileInstruction.java |   3 +-
 .../ParameterizedBuiltinCPFileInstruction.java  |   6 +-
 .../mr/AggregateBinaryInstruction.java          |   6 +-
 .../instructions/mr/AggregateInstruction.java   |   3 +-
 .../mr/AggregateUnaryInstruction.java           |   3 +-
 .../instructions/mr/AppendGInstruction.java     |   3 +-
 .../instructions/mr/AppendInstruction.java      |   5 +-
 .../instructions/mr/AppendMInstruction.java     |   3 +-
 .../instructions/mr/AppendRInstruction.java     |   3 +-
 .../mr/BinUaggChainInstruction.java             |   3 +-
 .../instructions/mr/BinaryInstruction.java      |   3 +-
 .../instructions/mr/BinaryMInstruction.java     |   3 +-
 .../instructions/mr/CM_N_COVInstruction.java    |   3 +-
 .../instructions/mr/CSVWriteInstruction.java    |   3 +-
 .../mr/CombineBinaryInstruction.java            |   3 +-
 .../mr/CombineTernaryInstruction.java           |   3 +-
 .../mr/CombineUnaryInstruction.java             |   3 +-
 .../mr/CumulativeAggregateInstruction.java      |   3 +-
 .../mr/CumulativeOffsetInstruction.java         |   3 +-
 .../mr/CumulativeSplitInstruction.java          |   3 +-
 .../mr/GroupedAggregateInstruction.java         |   3 +-
 .../mr/GroupedAggregateMInstruction.java        |   3 +-
 .../instructions/mr/MMTSJMRInstruction.java     |   5 +-
 .../runtime/instructions/mr/MRInstruction.java  |   6 +-
 .../mr/MapMultChainInstruction.java             |   9 +-
 .../mr/MatrixReshapeMRInstruction.java          |   3 +-
 .../instructions/mr/PMMJMRInstruction.java      |   3 +-
 .../mr/ParameterizedBuiltinMRInstruction.java   |   3 +-
 .../instructions/mr/PickByCountInstruction.java |   3 +-
 .../instructions/mr/QuaternaryInstruction.java  |   3 +-
 .../instructions/mr/RandInstruction.java        |   3 +-
 .../mr/RangeBasedReIndexInstruction.java        |   3 +-
 .../instructions/mr/ReblockInstruction.java     |   3 +-
 .../mr/RemoveEmptyMRInstruction.java            |   3 +-
 .../instructions/mr/ReorgInstruction.java       |   3 +-
 .../instructions/mr/ReplicateInstruction.java   |   3 +-
 .../instructions/mr/ScalarInstruction.java      |   3 +-
 .../runtime/instructions/mr/SeqInstruction.java |   3 +-
 .../instructions/mr/TernaryInstruction.java     |   5 +-
 .../mr/UaggOuterChainInstruction.java           |   3 +-
 .../instructions/mr/UnaryInstruction.java       |   3 +-
 .../instructions/mr/ZeroOutInstruction.java     |   3 +-
 .../spark/AggregateTernarySPInstruction.java    |   3 +-
 .../spark/AggregateUnarySPInstruction.java      |   3 +-
 .../spark/AppendGAlignedSPInstruction.java      |   3 +-
 .../spark/AppendGSPInstruction.java             |   3 +-
 .../spark/AppendMSPInstruction.java             |   3 +-
 .../spark/AppendRSPInstruction.java             |   3 +-
 .../spark/ArithmeticBinarySPInstruction.java    |   4 +-
 .../spark/BinUaggChainSPInstruction.java        |   3 +-
 .../instructions/spark/BinarySPInstruction.java |  10 +-
 .../spark/BuiltinBinarySPInstruction.java       |   4 +-
 .../spark/BuiltinUnarySPInstruction.java        |   4 +-
 .../spark/CSVReblockSPInstruction.java          |   3 +-
 .../spark/CentralMomentSPInstruction.java       |   3 +-
 .../spark/CheckpointSPInstruction.java          |   3 +-
 .../spark/CovarianceSPInstruction.java          |   3 +-
 .../instructions/spark/CpmmSPInstruction.java   |   3 +-
 .../spark/CumulativeAggregateSPInstruction.java |   3 +-
 .../spark/CumulativeOffsetSPInstruction.java    |   3 +-
 .../spark/MapmmChainSPInstruction.java          |   7 +-
 .../instructions/spark/MapmmSPInstruction.java  |   3 +-
 .../MatrixBVectorArithmeticSPInstruction.java   |   3 +-
 .../MatrixBVectorBuiltinSPInstruction.java      |   3 +-
 .../MatrixBVectorRelationalSPInstruction.java   |   3 +-
 .../spark/MatrixBuiltinSPInstruction.java       |   3 +-
 .../spark/MatrixIndexingSPInstruction.java      |   3 +-
 .../MatrixMatrixArithmeticSPInstruction.java    |   3 +-
 .../spark/MatrixMatrixBuiltinSPInstruction.java |   3 +-
 .../MatrixMatrixRelationalSPInstruction.java    |   3 +-
 .../spark/MatrixReshapeSPInstruction.java       |   3 +-
 .../MatrixScalarArithmeticSPInstruction.java    |   3 +-
 .../spark/MatrixScalarBuiltinSPInstruction.java |   3 +-
 .../MatrixScalarRelationalSPInstruction.java    |   3 +-
 .../instructions/spark/PMapmmSPInstruction.java |   3 +-
 .../ParameterizedBuiltinSPInstruction.java      |   5 +-
 .../instructions/spark/PmmSPInstruction.java    |   5 +-
 .../spark/QuantilePickSPInstruction.java        |   3 +-
 .../spark/QuantileSortSPInstruction.java        |   3 +-
 .../spark/QuaternarySPInstruction.java          |  11 +-
 .../spark/ReblockSPInstruction.java             |   3 +-
 .../instructions/spark/ReorgSPInstruction.java  |   3 +-
 .../instructions/spark/RmmSPInstruction.java    |   3 +-
 .../instructions/spark/SPInstruction.java       |   5 +-
 .../spark/TernarySPInstruction.java             |   3 +-
 .../instructions/spark/TsmmSPInstruction.java   |   3 +-
 .../spark/UaggOuterChainSPInstruction.java      |   3 +-
 .../instructions/spark/WriteSPInstruction.java  |   3 +-
 .../instructions/spark/ZipmmSPInstruction.java  |   3 +-
 .../spark/data/PartitionedBroadcastMatrix.java  |   3 +-
 .../spark/data/PartitionedMatrixBlock.java      |   4 +-
 .../instructions/spark/utils/RDDSortUtils.java  |  63 +---------
 .../instructions/spark/utils/SparkUtils.java    |   3 -
 .../sysml/runtime/io/FrameReaderFactory.java    |   1 -
 .../apache/sysml/runtime/io/FrameWriter.java    |   6 +-
 .../runtime/io/FrameWriterBinaryBlock.java      |   7 +-
 .../sysml/runtime/io/FrameWriterTextCSV.java    |   6 +-
 .../sysml/runtime/io/FrameWriterTextCell.java   |   4 +-
 .../apache/sysml/runtime/io/MatrixWriter.java   |   5 +-
 .../sysml/runtime/io/WriterBinaryBlock.java     |  12 +-
 .../runtime/io/WriterBinaryBlockParallel.java   |   4 +-
 .../sysml/runtime/io/WriterBinaryCell.java      |   3 +-
 .../sysml/runtime/io/WriterMatrixMarket.java    |   3 +-
 .../apache/sysml/runtime/io/WriterTextCSV.java  |   3 +-
 .../apache/sysml/runtime/io/WriterTextCell.java |   3 +-
 .../org/apache/sysml/runtime/matrix/GMR.java    |   7 +-
 .../runtime/matrix/MatrixCharacteristics.java   |   8 +-
 .../sysml/runtime/matrix/data/CM_N_COVCell.java |  45 ++++---
 .../sysml/runtime/matrix/data/LibMatrixAgg.java |   4 +-
 .../runtime/matrix/data/LibMatrixMult.java      |  24 +---
 .../runtime/matrix/data/LibMatrixOuterAgg.java  |  13 +-
 .../runtime/matrix/data/LibMatrixReorg.java     |  24 ++--
 .../sysml/runtime/matrix/data/MatrixBlock.java  | 121 +++++++------------
 .../sysml/runtime/matrix/data/MatrixCell.java   |  57 +++++----
 .../runtime/matrix/data/MatrixPackedCell.java   |   9 +-
 .../sysml/runtime/matrix/data/MatrixValue.java  |  45 ++++---
 .../matrix/data/OperationsOnMatrixValues.java   |  45 +++----
 .../sysml/runtime/matrix/data/WeightedCell.java |  23 ++--
 .../sysml/runtime/matrix/data/WeightedPair.java |   9 +-
 .../matrix/mapred/CSVAssignRowIDMapper.java     |   5 +-
 .../matrix/mapred/CSVReblockReducer.java        |   3 -
 .../mapred/MMCJMRCombinerReducerBase.java       |   3 -
 .../runtime/matrix/mapred/MMCJMRMapper.java     |   3 -
 .../runtime/matrix/mapred/MMCJMRReducer.java    |   7 +-
 .../runtime/matrix/mapred/MMRJMRMapper.java     |   3 -
 .../runtime/matrix/mapred/MMRJMRReducer.java    |   3 -
 .../mapred/MRBaseForCommonInstructions.java     |   7 +-
 .../matrix/mapred/MRJobConfiguration.java       |  37 +++---
 .../sysml/runtime/matrix/mapred/MapperBase.java |   3 -
 .../matrix/mapred/PartialAggregator.java        |   7 +-
 .../sysml/runtime/matrix/mapred/ReduceBase.java |  53 +-------
 .../ExternalFunctionInvocationInstruction.java  |   3 +-
 .../org/apache/sysml/utils/AppException.java    |  40 ------
 .../apache/sysml/yarn/DMLAppMasterUtils.java    |   4 +-
 .../sysml/yarn/ropt/ResourceOptimizer.java      |  27 ++---
 .../yarn/ropt/ResourceOptimizerCPMigration.java |   2 +-
 .../functions/frame/FrameReadWriteTest.java     |   8 +-
 226 files changed, 669 insertions(+), 1434 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/api/DMLScript.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/DMLScript.java b/src/main/java/org/apache/sysml/api/DMLScript.java
index df6d0e2..3e7b48a 100644
--- a/src/main/java/org/apache/sysml/api/DMLScript.java
+++ b/src/main/java/org/apache/sysml/api/DMLScript.java
@@ -33,8 +33,6 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Scanner;
 
-import javax.xml.parsers.ParserConfigurationException;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -45,7 +43,6 @@ import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.util.GenericOptionsParser;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
-import org.xml.sax.SAXException;
 import org.apache.sysml.conf.CompilerConfig;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.conf.DMLConfig;
@@ -65,7 +62,6 @@ import org.apache.sysml.parser.LanguageException;
 import org.apache.sysml.parser.ParseException;
 import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.DMLScriptException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.Program;
 import org.apache.sysml.runtime.controlprogram.caching.CacheStatistics;
 import org.apache.sysml.runtime.controlprogram.caching.CacheableData;
@@ -182,10 +178,8 @@ public class DMLScript
 	 * Default DML script invocation (e.g., via 'hadoop jar SystemML.jar -f Test.dml')
 	 * 
 	 * @param args
-	 * @throws ParseException
 	 * @throws IOException
-	 * @throws SAXException
-	 * @throws ParserConfigurationException
+	 * @throws DMLException
 	 */
 	public static void main(String[] args) 
 		throws IOException, DMLException 
@@ -560,12 +554,11 @@ public class DMLScript
 	 * @throws DMLRuntimeException 
 	 * @throws HopsException 
 	 * @throws LanguageException 
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws LopsException 
 	 * @throws DMLException 
 	 */
 	private static void execute(String dmlScriptStr, String fnameOptConfig, HashMap<String,String> argVals, String[] allArgs, boolean parsePyDML)
-		throws ParseException, IOException, DMLRuntimeException, LanguageException, HopsException, LopsException, DMLUnsupportedOperationException 
+		throws ParseException, IOException, DMLRuntimeException, LanguageException, HopsException, LopsException 
 	{	
 		//print basic time and environment info
 		printStartExecInfo( dmlScriptStr );
@@ -707,12 +700,11 @@ public class DMLScript
 	 * @throws DMLDebuggerException
 	 * @throws HopsException 
 	 * @throws LanguageException 
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws LopsException 
 	 * @throws DMLException 
 	 */
 	private static void launchDebugger(String dmlScriptStr, String fnameOptConfig, HashMap<String,String> argVals, boolean parsePyDML)
-		throws ParseException, IOException, DMLRuntimeException, DMLDebuggerException, LanguageException, HopsException, LopsException, DMLUnsupportedOperationException 
+		throws ParseException, IOException, DMLRuntimeException, DMLDebuggerException, LanguageException, HopsException, LopsException 
 	{		
 		DMLDebuggerProgramInfo dbprog = new DMLDebuggerProgramInfo();
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/hops/cost/CostEstimationWrapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/cost/CostEstimationWrapper.java b/src/main/java/org/apache/sysml/hops/cost/CostEstimationWrapper.java
index 3e7d983..1a822bf 100644
--- a/src/main/java/org/apache/sysml/hops/cost/CostEstimationWrapper.java
+++ b/src/main/java/org/apache/sysml/hops/cost/CostEstimationWrapper.java
@@ -32,7 +32,6 @@ import org.apache.sysml.hops.Hop;
 import org.apache.sysml.hops.HopsException;
 import org.apache.sysml.lops.LopsException;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
 import org.apache.sysml.runtime.controlprogram.Program;
 import org.apache.sysml.runtime.controlprogram.ProgramBlock;
@@ -80,10 +79,9 @@ public class CostEstimationWrapper
 	 * @param rtprog
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static double getTimeEstimate(Program rtprog, ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		Timing time = new Timing(true);
 		
@@ -101,10 +99,9 @@ public class CostEstimationWrapper
 	 * @param ec
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static double getTimeEstimate(ProgramBlock pb, ExecutionContext ec, boolean recursive) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		Timing time = new Timing(true);
 		
@@ -122,13 +119,12 @@ public class CostEstimationWrapper
 	 * @param ec
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws HopsException
 	 * @throws LopsException
 	 * @throws IOException
 	 */
 	public static double getTimeEstimate( ArrayList<Hop> hops, ExecutionContext ec ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException, HopsException, LopsException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		Timing time = new Timing(true);
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/hops/cost/CostEstimator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/cost/CostEstimator.java b/src/main/java/org/apache/sysml/hops/cost/CostEstimator.java
index 0e2a353..6b9c21f 100644
--- a/src/main/java/org/apache/sysml/hops/cost/CostEstimator.java
+++ b/src/main/java/org/apache/sysml/hops/cost/CostEstimator.java
@@ -36,7 +36,6 @@ import org.apache.sysml.lops.Lop;
 import org.apache.sysml.lops.LopsException;
 import org.apache.sysml.parser.DMLProgram;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ExternalFunctionProgramBlock;
 import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
 import org.apache.sysml.runtime.controlprogram.FunctionProgramBlock;
@@ -85,10 +84,9 @@ public abstract class CostEstimator
 	 * @param rtprog
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public double getTimeEstimate(Program rtprog, LocalVariableMap vars, HashMap<String,VarStats> stats) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		double costs = 0;
 
@@ -109,10 +107,9 @@ public abstract class CostEstimator
 	 * @param stats
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public double getTimeEstimate(ProgramBlock pb, LocalVariableMap vars, HashMap<String,VarStats> stats, boolean recursive) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//obtain stats from symboltable (e.g., during recompile)
 		maintainVariableStatistics(vars, stats);
@@ -127,14 +124,13 @@ public abstract class CostEstimator
 	 * @param hops
 	 * @param vars
 	 * @return
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 * @throws IOException 
 	 * @throws LopsException 
 	 * @throws HopsException 
 	 */
 	public double getTimeEstimate( ArrayList<Hop> hops, LocalVariableMap vars, HashMap<String,VarStats> stats ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException, HopsException, LopsException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		double costs = 0;
 		
@@ -158,10 +154,9 @@ public abstract class CostEstimator
 	 * @param stats
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private double rGetTimeEstimate(ProgramBlock pb, HashMap<String,VarStats> stats, HashSet<String> memoFunc, boolean recursive) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		double ret = 0;
 		
@@ -392,10 +387,9 @@ public abstract class CostEstimator
 	 * @param inst
 	 * @param stats
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	private void maintainMRJobInstVariableStatistics( Instruction inst, HashMap<String, VarStats> stats ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		MRJobInstruction jobinst = (MRJobInstruction)inst;
 		
@@ -769,10 +763,9 @@ public abstract class CostEstimator
 	 * @param args
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	protected abstract double getCPInstTimeEstimate( Instruction inst, VarStats[] vs, String[] args  ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException;
+		throws DMLRuntimeException;
 	
 	/**
 	 * 
@@ -781,8 +774,7 @@ public abstract class CostEstimator
 	 * @param args
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	protected abstract double getMRJobInstTimeEstimate( Instruction inst, VarStats[] vs, String[] args  ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException;
+		throws DMLRuntimeException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/hops/cost/CostEstimatorNumMRJobs.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/cost/CostEstimatorNumMRJobs.java b/src/main/java/org/apache/sysml/hops/cost/CostEstimatorNumMRJobs.java
index 5c6e6d2..8c5ef9c 100644
--- a/src/main/java/org/apache/sysml/hops/cost/CostEstimatorNumMRJobs.java
+++ b/src/main/java/org/apache/sysml/hops/cost/CostEstimatorNumMRJobs.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.hops.cost;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.Instruction;
 
 /**
@@ -32,14 +31,14 @@ public class CostEstimatorNumMRJobs extends CostEstimator
 	
 	@Override
 	protected double getCPInstTimeEstimate( Instruction inst, VarStats[] vs, String[] args  ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		return 0;
 	}
 	
 	@Override
 	protected double getMRJobInstTimeEstimate( Instruction inst, VarStats[] vs, String[] args  ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		return 1;
 	}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/hops/cost/CostEstimatorStaticRuntime.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/cost/CostEstimatorStaticRuntime.java b/src/main/java/org/apache/sysml/hops/cost/CostEstimatorStaticRuntime.java
index a4128ac..1200c1b 100644
--- a/src/main/java/org/apache/sysml/hops/cost/CostEstimatorStaticRuntime.java
+++ b/src/main/java/org/apache/sysml/hops/cost/CostEstimatorStaticRuntime.java
@@ -30,7 +30,6 @@ import org.apache.sysml.lops.LopProperties.ExecType;
 import org.apache.sysml.lops.MMTSJ.MMTSJType;
 import org.apache.sysml.lops.compile.JobType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.CacheableData;
 import org.apache.sysml.runtime.controlprogram.caching.LazyWriteBuffer;
 import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
@@ -101,7 +100,7 @@ public class CostEstimatorStaticRuntime extends CostEstimator
 	@Override
 	@SuppressWarnings("unused")
 	protected double getCPInstTimeEstimate( Instruction inst, VarStats[] vs, String[] args ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		CPInstruction cpinst = (CPInstruction)inst;
 		
@@ -157,7 +156,7 @@ public class CostEstimatorStaticRuntime extends CostEstimator
 	
 	@Override
 	protected double getMRJobInstTimeEstimate( Instruction inst, VarStats[] vs, String[] args ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		MRJobInstruction jinst = (MRJobInstruction) inst;
 		
@@ -320,11 +319,10 @@ public class CostEstimatorStaticRuntime extends CostEstimator
 	 * @param inst
 	 * @param stats
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	private Object[] extractMRInstStatistics( String inst, VarStats[] stats ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		Object[] ret = new Object[2]; //stats, attrs
 		VarStats[] vs = new VarStats[3];
@@ -499,11 +497,10 @@ public class CostEstimatorStaticRuntime extends CostEstimator
 	 * @param aggInst
 	 * @param otherInst
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	private byte[] getMapOutputIndexes( byte[] inIx, byte[] retIx, String rdInst, String mapInst, String shfInst, String aggInst, String otherInst ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//note: this is a simplified version of MRJobConfiguration.setUpOutputIndexesForMapper
 		
@@ -647,10 +644,9 @@ public class CostEstimatorStaticRuntime extends CostEstimator
 	 * @param inst
 	 * @return
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	private int getDistcacheIndex(String inst) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		ArrayList<Byte> indexes = new ArrayList<Byte>();
 		
@@ -806,10 +802,9 @@ public class CostEstimatorStaticRuntime extends CostEstimator
 	 * @param args
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private double getInstTimeEstimate(String opcode, VarStats[] vs, String[] args, ExecType et) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		boolean inMR = (et == ExecType.MR);
 		return getInstTimeEstimate(opcode, inMR,  
@@ -837,9 +832,8 @@ public class CostEstimatorStaticRuntime extends CostEstimator
 	 * @param d3s
 	 * @return
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
-	private double getInstTimeEstimate( String opcode, boolean inMR, long d1m, long d1n, double d1s, long d2m, long d2n, double d2s, long d3m, long d3n, double d3s, String[] args ) throws DMLRuntimeException, DMLUnsupportedOperationException
+	private double getInstTimeEstimate( String opcode, boolean inMR, long d1m, long d1n, double d1s, long d2m, long d2n, double d2s, long d3m, long d3n, double d3s, String[] args ) throws DMLRuntimeException
 	{
 		double nflops = getNFLOP(opcode, inMR, d1m, d1n, d1s, d2m, d2n, d2s, d3m, d3n, d3s, args);
 		double time = nflops / DEFAULT_FLOPS;
@@ -865,10 +859,9 @@ public class CostEstimatorStaticRuntime extends CostEstimator
 	 * @param args
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private double getNFLOP( String optype, boolean inMR, long d1m, long d1n, double d1s, long d2m, long d2n, double d2s, long d3m, long d3n, double d3s, String[] args ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//operation costs in FLOP on matrix block level (for CP and MR instructions)
 		//(excludes IO and parallelism; assumes known dims for all inputs, outputs )

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/hops/globalopt/GDFEnumOptimizer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/globalopt/GDFEnumOptimizer.java b/src/main/java/org/apache/sysml/hops/globalopt/GDFEnumOptimizer.java
index f3a9188..452f710 100644
--- a/src/main/java/org/apache/sysml/hops/globalopt/GDFEnumOptimizer.java
+++ b/src/main/java/org/apache/sysml/hops/globalopt/GDFEnumOptimizer.java
@@ -45,7 +45,6 @@ import org.apache.sysml.hops.recompile.Recompiler;
 import org.apache.sysml.lops.LopsException;
 import org.apache.sysml.lops.LopProperties.ExecType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
 import org.apache.sysml.runtime.controlprogram.Program;
 import org.apache.sysml.runtime.controlprogram.ProgramBlock;
@@ -106,7 +105,7 @@ public class GDFEnumOptimizer extends GlobalOptimizer
 
 	@Override
 	public GDFGraph optimize(GDFGraph gdfgraph, Summary summary) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException, HopsException, LopsException 
+		throws DMLRuntimeException, HopsException, LopsException 
 	{
 		Timing time = new Timing(true);
 		
@@ -167,10 +166,9 @@ public class GDFEnumOptimizer extends GlobalOptimizer
 	 * @param maxCosts
 	 * @return
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static PlanSet enumOpt( GDFNode node, MemoStructure memo, double maxCosts )
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//memoization of already enumerated subgraphs
 		if( memo.constainsEntry(node) )
@@ -209,12 +207,11 @@ public class GDFEnumOptimizer extends GlobalOptimizer
 	 * 
 	 * @param node
 	 * @param memo 
-	 * @return
-	 * @throws DMLUnsupportedOperationException 
+	 * @return 
 	 * @throws DMLRuntimeException 
 	 */
 	private static PlanSet enumNodePlans( GDFNode node, MemoStructure memo, double maxCosts ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ArrayList<Plan> plans = new ArrayList<Plan>();
 		ExecType CLUSTER = OptimizerUtils.isSparkExecutionMode() ? ExecType.SPARK : ExecType.MR;
@@ -394,10 +391,9 @@ public class GDFEnumOptimizer extends GlobalOptimizer
 	 * @param plans
 	 * @param maxCosts 
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	private static void pruneSuboptimalPlans( PlanSet plans, double maxCosts ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//costing of all plans incl containment check
 		for( Plan p : plans.getPlans() ) {
@@ -446,10 +442,9 @@ public class GDFEnumOptimizer extends GlobalOptimizer
 	 * @param p
 	 * @return
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	private static double costRuntimePlan(Plan p) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		Program prog = p.getNode().getProgram();
 		if( prog == null )

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/hops/globalopt/GlobalOptimizer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/globalopt/GlobalOptimizer.java b/src/main/java/org/apache/sysml/hops/globalopt/GlobalOptimizer.java
index d08982b..65754d9 100644
--- a/src/main/java/org/apache/sysml/hops/globalopt/GlobalOptimizer.java
+++ b/src/main/java/org/apache/sysml/hops/globalopt/GlobalOptimizer.java
@@ -23,7 +23,6 @@ import org.apache.sysml.hops.HopsException;
 import org.apache.sysml.hops.globalopt.gdfgraph.GDFGraph;
 import org.apache.sysml.lops.LopsException;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 
 /**
  * Super class for all optimizers (e.g., transformation-based, and enumeration-based)
@@ -45,5 +44,5 @@ public abstract class GlobalOptimizer
 	 * @throws  
 	 */
 	public abstract GDFGraph optimize( GDFGraph gdfgraph, Summary summary )
-		throws DMLRuntimeException, DMLUnsupportedOperationException, HopsException, LopsException;
+		throws DMLRuntimeException, HopsException, LopsException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/hops/globalopt/GlobalOptimizerWrapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/globalopt/GlobalOptimizerWrapper.java b/src/main/java/org/apache/sysml/hops/globalopt/GlobalOptimizerWrapper.java
index 3d67e6b..720f164 100644
--- a/src/main/java/org/apache/sysml/hops/globalopt/GlobalOptimizerWrapper.java
+++ b/src/main/java/org/apache/sysml/hops/globalopt/GlobalOptimizerWrapper.java
@@ -30,7 +30,6 @@ import org.apache.sysml.hops.globalopt.gdfgraph.GraphBuilder;
 import org.apache.sysml.lops.LopsException;
 import org.apache.sysml.parser.DMLProgram;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.Program;
 import org.apache.sysml.runtime.controlprogram.parfor.stat.Timing;
 import org.apache.sysml.utils.Explain;
@@ -72,11 +71,10 @@ public class GlobalOptimizerWrapper
 	 * @return
 	 * @throws DMLRuntimeException 
 	 * @throws HopsException
-	 * @throws LopsException 
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws LopsException  
 	 */
 	public static Program optimizeProgram(DMLProgram prog, Program rtprog) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException, HopsException, LopsException
+		throws DMLRuntimeException, HopsException, LopsException
 	{
 		LOG.debug("Starting global data flow optimization.");
 		Timing time = new Timing(true);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/hops/recompile/Recompiler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/recompile/Recompiler.java b/src/main/java/org/apache/sysml/hops/recompile/Recompiler.java
index 3edf7f7..5ba4086 100644
--- a/src/main/java/org/apache/sysml/hops/recompile/Recompiler.java
+++ b/src/main/java/org/apache/sysml/hops/recompile/Recompiler.java
@@ -70,7 +70,6 @@ import org.apache.sysml.parser.Statement;
 import org.apache.sysml.parser.StatementBlock;
 import org.apache.sysml.parser.WhileStatementBlock;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
 import org.apache.sysml.runtime.controlprogram.FunctionProgramBlock;
 import org.apache.sysml.runtime.controlprogram.IfProgramBlock;
@@ -150,11 +149,10 @@ public class Recompiler
 	 * @throws DMLRuntimeException
 	 * @throws HopsException
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	public static ArrayList<Instruction> recompileHopsDag( StatementBlock sb, ArrayList<Hop> hops, LocalVariableMap vars, RecompileStatus status, boolean inplace, long tid ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		ArrayList<Instruction> newInst = null;
 
@@ -249,11 +247,10 @@ public class Recompiler
 	 * @throws DMLRuntimeException
 	 * @throws HopsException
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	public static ArrayList<Instruction> recompileHopsDag( Hop hops, LocalVariableMap vars, RecompileStatus status, boolean inplace, long tid ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		ArrayList<Instruction> newInst = null;
 
@@ -330,11 +327,10 @@ public class Recompiler
 	 * @throws DMLRuntimeException
 	 * @throws HopsException
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	public static ArrayList<Instruction> recompileHopsDag2Forced( StatementBlock sb, ArrayList<Hop> hops, long tid, ExecType et ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		ArrayList<Instruction> newInst = null;
 		
@@ -387,11 +383,10 @@ public class Recompiler
 	 * @throws DMLRuntimeException
 	 * @throws HopsException
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	public static ArrayList<Instruction> recompileHopsDag2Forced( Hop hops, long tid, ExecType et ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		ArrayList<Instruction> newInst = null;
 
@@ -434,11 +429,10 @@ public class Recompiler
 	 * @throws HopsException
 	 * @throws LopsException
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	public static ArrayList<Instruction> recompileHopsDagInstructions( StatementBlock sb, ArrayList<Hop> hops ) 
-		throws HopsException, LopsException, DMLRuntimeException, DMLUnsupportedOperationException, IOException 
+		throws HopsException, LopsException, DMLRuntimeException, IOException 
 	{
 		ArrayList<Instruction> newInst = null;
 
@@ -485,11 +479,10 @@ public class Recompiler
 	 * @throws DMLRuntimeException
 	 * @throws HopsException
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	public static ArrayList<Instruction> recompileHopsDagInstructions( Hop hops ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		ArrayList<Instruction> newInst = null;
 
@@ -582,13 +575,12 @@ public class Recompiler
 	 * 
 	 * @param pb
 	 * @throws IOException 
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 * @throws LopsException 
 	 * @throws HopsException 
 	 */
 	public static void recompileProgramBlockInstructions(ProgramBlock pb) 
-		throws HopsException, LopsException, DMLRuntimeException, DMLUnsupportedOperationException, IOException
+		throws HopsException, LopsException, DMLRuntimeException, IOException
 	{
 		if( pb instanceof WhileProgramBlock )
 		{
@@ -802,13 +794,12 @@ public class Recompiler
 	 * @param vars
 	 * @param tid
 	 * @throws IOException 
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws LopsException 
 	 * @throws DMLRuntimeException 
 	 * @throws HopsException 
 	 */
 	private static void rRecompileProgramBlock( ProgramBlock pb, LocalVariableMap vars, RecompileStatus status, long tid, boolean resetRecompile ) 
-		throws HopsException, DMLRuntimeException, LopsException, DMLUnsupportedOperationException, IOException
+		throws HopsException, DMLRuntimeException, LopsException, IOException
 	{
 		if (pb instanceof WhileProgramBlock)
 		{
@@ -1185,11 +1176,10 @@ public class Recompiler
 	 * @throws DMLRuntimeException
 	 * @throws HopsException
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	private static void recompileIfPredicate( IfProgramBlock ipb, IfStatementBlock isb, LocalVariableMap vars, RecompileStatus status, long tid, boolean resetRecompile ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		if( isb != null )
 		{
@@ -1220,11 +1210,10 @@ public class Recompiler
 	 * @throws DMLRuntimeException
 	 * @throws HopsException
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	private static void recompileWhilePredicate( WhileProgramBlock wpb, WhileStatementBlock wsb, LocalVariableMap vars, RecompileStatus status, long tid, boolean resetRecompile ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		if( wsb != null )
 		{
@@ -1255,11 +1244,10 @@ public class Recompiler
 	 * @throws DMLRuntimeException
 	 * @throws HopsException
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	private static void recompileForPredicates( ForProgramBlock fpb, ForStatementBlock fsb, LocalVariableMap vars, RecompileStatus status, long tid, boolean resetRecompile ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		if( fsb != null )
 		{
@@ -1322,11 +1310,10 @@ public class Recompiler
 	 * @throws HopsException
 	 * @throws DMLRuntimeException
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	private static void rRecompileProgramBlock2Forced( ProgramBlock pb, long tid, HashSet<String> fnStack, ExecType et ) 
-		throws HopsException, DMLRuntimeException, LopsException, DMLUnsupportedOperationException, IOException
+		throws HopsException, DMLRuntimeException, LopsException, IOException
 	{
 		if (pb instanceof WhileProgramBlock)
 		{
@@ -1965,11 +1952,10 @@ public class Recompiler
 	 * @param inputs
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	public static boolean checkCPTransform(MRJobInstruction inst, MatrixObject[] inputs) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException, IOException 
+		throws DMLRuntimeException, IOException 
 	{
 		boolean ret = true;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/hops/rewrite/RewriteConstantFolding.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/rewrite/RewriteConstantFolding.java b/src/main/java/org/apache/sysml/hops/rewrite/RewriteConstantFolding.java
index 945b21f..f4b57cc 100644
--- a/src/main/java/org/apache/sysml/hops/rewrite/RewriteConstantFolding.java
+++ b/src/main/java/org/apache/sysml/hops/rewrite/RewriteConstantFolding.java
@@ -38,7 +38,6 @@ import org.apache.sysml.lops.LopsException;
 import org.apache.sysml.lops.compile.Dag;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.Program;
 import org.apache.sysml.runtime.controlprogram.ProgramBlock;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
@@ -191,13 +190,12 @@ public class RewriteConstantFolding extends HopRewriteRule
 	 * 
 	 * @return
 	 * @throws IOException 
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws LopsException 
 	 * @throws DMLRuntimeException 
 	 * @throws HopsException 
 	 */
 	private LiteralOp evalScalarOperation( Hop bop ) 
-		throws LopsException, DMLRuntimeException, DMLUnsupportedOperationException, IOException, HopsException
+		throws LopsException, DMLRuntimeException, IOException, HopsException
 	{
 		//Timing time = new Timing( true );
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/lops/compile/Dag.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/lops/compile/Dag.java b/src/main/java/org/apache/sysml/lops/compile/Dag.java
index 29c1250..dba852b 100644
--- a/src/main/java/org/apache/sysml/lops/compile/Dag.java
+++ b/src/main/java/org/apache/sysml/lops/compile/Dag.java
@@ -64,7 +64,6 @@ import org.apache.sysml.parser.ParameterizedBuiltinFunctionExpression;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.StatementBlock;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.parfor.ProgramConverter;
 import org.apache.sysml.runtime.controlprogram.parfor.util.IDSequence;
 import org.apache.sysml.runtime.instructions.CPInstructionParser;
@@ -228,10 +227,9 @@ public class Dag<N extends Lop>
 	 * @throws LopsException
 	 * @throws IOException
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public ArrayList<Instruction> getJobs(DMLConfig config)
-			throws LopsException, IOException, DMLRuntimeException, DMLUnsupportedOperationException 
+			throws LopsException, IOException, DMLRuntimeException 
 	{
 		return getJobs(null, config);
 	}
@@ -241,13 +239,11 @@ public class Dag<N extends Lop>
 	 * 
 	 * @param config
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 
 	public ArrayList<Instruction> getJobs(StatementBlock sb, DMLConfig config)
-			throws LopsException, IOException, DMLRuntimeException,
-			DMLUnsupportedOperationException {
+			throws LopsException, IOException, DMLRuntimeException {
 		
 		if (config != null) 
 		{
@@ -276,8 +272,7 @@ public class Dag<N extends Lop>
 	}
 
 	private static void deleteUpdatedTransientReadVariables(StatementBlock sb, ArrayList<Lop> nodeV,
-			ArrayList<Instruction> inst) throws DMLRuntimeException,
-			DMLUnsupportedOperationException {
+			ArrayList<Instruction> inst) throws DMLRuntimeException {
 
 		if ( sb == null ) 
 			return;
@@ -350,9 +345,8 @@ public class Dag<N extends Lop>
 
 	}
 	  
-	private static void generateRemoveInstructions(StatementBlock sb,
-			ArrayList<Instruction> deleteInst)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+	private static void generateRemoveInstructions(StatementBlock sb, ArrayList<Instruction> deleteInst)
+		throws DMLRuntimeException {
 		
 		if ( sb == null ) 
 			return;
@@ -675,8 +669,6 @@ public class Dag<N extends Lop>
 						CPInstruction currInstr = CPInstructionParser.parseSingleInstruction(inst_string);
 						currInstr.setLocation(n);						
 						inst.add(currInstr);
-					} catch (DMLUnsupportedOperationException e) {
-						throw new LopsException(n.printErrorLocation() + "error generating instructions from input variables in Dag -- \n", e);
 					} catch (DMLRuntimeException e) {
 						throw new LopsException(n.printErrorLocation() + "error generating instructions from input variables in Dag -- \n", e);
 					}
@@ -797,12 +789,10 @@ public class Dag<N extends Lop>
 	 * 
 	 * @param node_v
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	private ArrayList<Instruction> doGreedyGrouping(StatementBlock sb, ArrayList<Lop> node_v)
-			throws LopsException, IOException, DMLRuntimeException,
-			DMLUnsupportedOperationException
+			throws LopsException, IOException, DMLRuntimeException
 	{
 		if( LOG.isTraceEnabled() )
 			LOG.trace("Grouping DAG ============");
@@ -1284,9 +1274,8 @@ public class Dag<N extends Lop>
 	 * @param node
 	 * @param inst
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
-	private void processConsumersForInputs(Lop node, ArrayList<Instruction> inst, ArrayList<Instruction> delteInst) throws DMLRuntimeException, DMLUnsupportedOperationException {
+	private void processConsumersForInputs(Lop node, ArrayList<Instruction> inst, ArrayList<Instruction> delteInst) throws DMLRuntimeException {
 		// reduce the consumer count for all input lops
 		// if the count becomes zero, then then variable associated w/ input can be removed
 		for(Lop in : node.getInputs() ) {
@@ -1299,7 +1288,7 @@ public class Dag<N extends Lop>
 		}
 	}
 	
-	private static void processConsumers(Lop node, ArrayList<Instruction> inst, ArrayList<Instruction> deleteInst, Lop locationInfo) throws DMLRuntimeException, DMLUnsupportedOperationException {
+	private static void processConsumers(Lop node, ArrayList<Instruction> inst, ArrayList<Instruction> deleteInst, Lop locationInfo) throws DMLRuntimeException {
 		// reduce the consumer count for all input lops
 		// if the count becomes zero, then then variable associated w/ input can be removed
 		if ( node.removeConsumer() == 0 ) {
@@ -1329,11 +1318,9 @@ public class Dag<N extends Lop>
 	 * @param deleteInst
 	 * @throws LopsException
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private void generateControlProgramJobs(ArrayList<Lop> execNodes,
-			ArrayList<Instruction> inst, ArrayList<Instruction> writeInst, ArrayList<Instruction> deleteInst) throws LopsException,
-			DMLUnsupportedOperationException, DMLRuntimeException {
+			ArrayList<Instruction> inst, ArrayList<Instruction> writeInst, ArrayList<Instruction> deleteInst) throws LopsException, DMLRuntimeException {
 
 		// nodes to be deleted from execnodes
 		ArrayList<Lop> markedNodes = new ArrayList<Lop>();
@@ -2104,15 +2091,12 @@ public class Dag<N extends Lop>
 	 * @param jobNodes
 	 * @throws LopsException
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private void generateMRJobs(ArrayList<Lop> execNodes,
 			ArrayList<Instruction> inst,
 			ArrayList<Instruction> writeinst,
 			ArrayList<Instruction> deleteinst, ArrayList<ArrayList<Lop>> jobNodes)
-			throws LopsException, DMLUnsupportedOperationException,
-			DMLRuntimeException
-
+			throws LopsException, DMLRuntimeException
 	{
 		printJobNodes(jobNodes);
 		
@@ -2326,11 +2310,10 @@ public class Dag<N extends Lop>
 	/**
 	 * Method to setup output filenames and outputInfos, and to generate related instructions
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws LopsException 
 	 */
 	private NodeOutput setupNodeOutputs(Lop node, ExecType et, boolean cellModeOverride, boolean copyTWrite) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException, LopsException {
+	throws DMLRuntimeException, LopsException {
 		
 		OutputParameters oparams = node.getOutputParameters();
 		NodeOutput out = new NodeOutput();
@@ -2790,13 +2773,11 @@ public class Dag<N extends Lop>
 	 * @param deleteinst
 	 * @param jobType
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	private void generateMapReduceInstructions(ArrayList<Lop> execNodes,
 			ArrayList<Instruction> inst, ArrayList<Instruction> writeinst, ArrayList<Instruction> deleteinst, ArrayList<Instruction> rmvarinst, 
-			JobType jt) throws LopsException,
-			DMLUnsupportedOperationException, DMLRuntimeException
+			JobType jt) throws LopsException, DMLRuntimeException
 	{
 		ArrayList<Byte> resultIndices = new ArrayList<Byte>();
 		ArrayList<String> inputs = new ArrayList<String>();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/lops/runtime/RunMRJobs.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/lops/runtime/RunMRJobs.java b/src/main/java/org/apache/sysml/lops/runtime/RunMRJobs.java
index f6ae1a7..519d5ff 100644
--- a/src/main/java/org/apache/sysml/lops/runtime/RunMRJobs.java
+++ b/src/main/java/org/apache/sysml/lops/runtime/RunMRJobs.java
@@ -35,7 +35,6 @@ import org.apache.sysml.lops.compile.JobType;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
@@ -511,11 +510,10 @@ public class RunMRJobs
 	 * @param inputMatrices
 	 * @param outputMatrices
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	private static JobReturn executeInMemoryReblockOperations( MRJobInstruction inst, String shuffleInst, MatrixObject[] inputMatrices, MatrixObject[] outputMatrices ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		MatrixCharacteristics[] mc = new MatrixCharacteristics[outputMatrices.length];
 		ReblockInstruction[] rblkSet = MRInstructionParser.parseReblockInstructions(shuffleInst);
@@ -538,7 +536,7 @@ public class RunMRJobs
 	}
 	
 	private static JobReturn executeInMemoryDataGenOperations( MRJobInstruction inst, String randInst, MatrixObject[] outputMatrices ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		MatrixCharacteristics[] mc = new MatrixCharacteristics[outputMatrices.length];
 		DataGenMRInstruction[] dgSet = MRInstructionParser.parseDataGenInstructions(randInst);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/parser/DMLProgram.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/parser/DMLProgram.java b/src/main/java/org/apache/sysml/parser/DMLProgram.java
index 9aac143..834b8b5 100644
--- a/src/main/java/org/apache/sysml/parser/DMLProgram.java
+++ b/src/main/java/org/apache/sysml/parser/DMLProgram.java
@@ -34,7 +34,6 @@ import org.apache.sysml.lops.LopsException;
 import org.apache.sysml.lops.compile.Dag;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ExternalFunctionProgramBlock;
 import org.apache.sysml.runtime.controlprogram.ExternalFunctionProgramBlockCP;
 import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
@@ -175,7 +174,7 @@ public class DMLProgram
 	}
 	
 	
-	public Program getRuntimeProgram(DMLConfig config) throws IOException, LanguageException, DMLRuntimeException, LopsException, DMLUnsupportedOperationException {
+	public Program getRuntimeProgram(DMLConfig config) throws IOException, LanguageException, DMLRuntimeException, LopsException {
 		
 		// constructor resets the set of registered functions
 		Program rtprog = new Program();
@@ -213,10 +212,9 @@ public class DMLProgram
 	 * @throws IOException
 	 * @throws LopsException
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public ProgramBlock createRuntimeProgramBlock(Program prog, StatementBlock sb, DMLConfig config) 
-		throws IOException, LopsException, DMLRuntimeException, DMLUnsupportedOperationException 
+		throws IOException, LopsException, DMLRuntimeException 
 	{
 		Dag<Lop> dag = null; 
 		Dag<Lop> pred_dag = null;
@@ -583,11 +581,10 @@ public class DMLProgram
 	 * @param pb
 	 * @return
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	@SuppressWarnings("unused")
 	private ProgramBlock verifyAndCorrectProgramBlock(VariableSet in, VariableSet out, VariableSet kill, ProgramBlock pb) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{	
 		//RULE 1: if in IN and not in OUT, then there should be an rmvar or rmfilevar inst
 		//(currently required for specific cases of external functions)
@@ -642,7 +639,7 @@ public class DMLProgram
 	}
 	
 	private Instruction createCleanupInstruction(String varName) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//(example "CP+Lops.OPERAND_DELIMITOR+rmvar+Lops.OPERAND_DELIMITOR+Var7")
 		StringBuilder sb = new StringBuilder();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/DMLUnsupportedOperationException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/DMLUnsupportedOperationException.java b/src/main/java/org/apache/sysml/runtime/DMLUnsupportedOperationException.java
deleted file mode 100644
index 0e36d95..0000000
--- a/src/main/java/org/apache/sysml/runtime/DMLUnsupportedOperationException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.sysml.runtime;
-
-import org.apache.sysml.api.DMLException;
-
-public class DMLUnsupportedOperationException extends DMLException 
-{
-	
-	private static final long serialVersionUID = 1L;
-
-	public DMLUnsupportedOperationException(String string) {
-		super(string);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/ForProgramBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/ForProgramBlock.java b/src/main/java/org/apache/sysml/runtime/controlprogram/ForProgramBlock.java
index 146e173..db853f6 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/ForProgramBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/ForProgramBlock.java
@@ -27,7 +27,6 @@ import org.apache.sysml.parser.ForStatementBlock;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.DMLScriptException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.Instruction;
 import org.apache.sysml.runtime.instructions.cp.Data;
@@ -155,7 +154,7 @@ public class ForProgramBlock extends ProgramBlock
 	
 	@Override	
 	public void execute(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		// add the iterable predicate variable to the variable set
 		String iterVarName = _iterablePredicateVars[0];

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/FunctionProgramBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/FunctionProgramBlock.java b/src/main/java/org/apache/sysml/runtime/controlprogram/FunctionProgramBlock.java
index c28a6cc..cf45313 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/FunctionProgramBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/FunctionProgramBlock.java
@@ -27,7 +27,6 @@ import org.apache.sysml.hops.recompile.Recompiler;
 import org.apache.sysml.parser.DataIdentifier;
 import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.DMLScriptException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.Data;
 import org.apache.sysml.utils.Statistics;
@@ -80,7 +79,7 @@ public class FunctionProgramBlock extends ProgramBlock
 	
 	@Override
 	public void execute(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		//dynamically recompile entire function body (according to function inputs)
 		try {

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/IfProgramBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/IfProgramBlock.java b/src/main/java/org/apache/sysml/runtime/controlprogram/IfProgramBlock.java
index a0a06d4..27b285c 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/IfProgramBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/IfProgramBlock.java
@@ -27,7 +27,6 @@ import org.apache.sysml.parser.IfStatementBlock;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.DMLScriptException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.Instruction;
 import org.apache.sysml.runtime.instructions.Instruction.INSTRUCTION_TYPE;
@@ -144,7 +143,7 @@ public class IfProgramBlock extends ProgramBlock
 	
 	@Override
 	public void execute(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		BooleanObject predResult = executePredicate(ec); 
 	
@@ -202,10 +201,9 @@ public class IfProgramBlock extends ProgramBlock
 	 * @param ec
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private BooleanObject executePredicate(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		BooleanObject result = null;
 		try

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/ParForProgramBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/ParForProgramBlock.java b/src/main/java/org/apache/sysml/runtime/controlprogram/ParForProgramBlock.java
index eb85306..fd53f4d 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/ParForProgramBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/ParForProgramBlock.java
@@ -48,7 +48,6 @@ import org.apache.sysml.parser.ParForStatementBlock;
 import org.apache.sysml.parser.StatementBlock;
 import org.apache.sysml.parser.VariableSet;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.CacheException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
@@ -520,7 +519,7 @@ public class ParForProgramBlock extends ForProgramBlock
 	
 	@Override	
 	public void execute(ExecutionContext ec)
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		ParForStatementBlock sb = (ParForStatementBlock)getStatementBlock();
 		
@@ -682,12 +681,11 @@ public class ParForProgramBlock extends ForProgramBlock
 	 * @param from
 	 * @param to
 	 * @param incr
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 * @throws InterruptedException 
 	 */
 	private void executeLocalParFor( ExecutionContext ec, IntObject itervar, IntObject from, IntObject to, IntObject incr ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException, InterruptedException
+		throws DMLRuntimeException, InterruptedException
 	{
 		/* Step 1) init parallel workers, task queue and threads
 		 *         start threads (from now on waiting for tasks)
@@ -816,12 +814,11 @@ public class ParForProgramBlock extends ForProgramBlock
 	 * @param from
 	 * @param to
 	 * @param incr
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 * @throws IOException 
 	 */
 	private void executeRemoteMRParFor( ExecutionContext ec, IntObject itervar, IntObject from, IntObject to, IntObject incr ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException, IOException
+		throws DMLRuntimeException, IOException
 	{
 		/* Step 0) check and recompile MR inst
 		 * Step 1) serialize child PB and inst
@@ -915,12 +912,11 @@ public class ParForProgramBlock extends ForProgramBlock
 	 * @param from
 	 * @param to
 	 * @param incr
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 * @throws IOException
 	 */
 	private void executeRemoteMRParForDP( ExecutionContext ec, IntObject itervar, IntObject from, IntObject to, IntObject incr ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException, IOException
+		throws DMLRuntimeException, IOException
 	{
 		/* Step 0) check and recompile MR inst
 		 * Step 1) serialize child PB and inst
@@ -1000,10 +996,9 @@ public class ParForProgramBlock extends ForProgramBlock
 	 * @param to
 	 * @param incr
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	private void executeRemoteSparkParFor(ExecutionContext ec, IntObject itervar, IntObject from, IntObject to, IntObject incr) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		Timing time = ( _monitor ? new Timing(true) : null );
 		
@@ -1065,7 +1060,7 @@ public class ParForProgramBlock extends ForProgramBlock
 	}
 	
 	private void executeRemoteSparkParForDP( ExecutionContext ec, IntObject itervar, IntObject from, IntObject to, IntObject incr ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException, IOException
+		throws DMLRuntimeException, IOException
 	{
 		Timing time = ( _monitor ? new Timing(true) : null );
 		
@@ -1133,10 +1128,9 @@ public class ParForProgramBlock extends ForProgramBlock
 	 * 
 	 * @param ec
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	private void handleDataPartitioning( ExecutionContext ec ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		if( _dataPartitioner != PDataPartitioner.NONE )
 		{			
@@ -1204,10 +1198,9 @@ public class ParForProgramBlock extends ForProgramBlock
 	 * 
 	 * @param ec
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private void handleSparkRepartitioning( ExecutionContext ec ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		if( OptimizerUtils.isSparkExecutionMode() &&
 			_variablesRP != null && !_variablesRP.isEmpty() ) {
@@ -1222,10 +1215,9 @@ public class ParForProgramBlock extends ForProgramBlock
 	 * 
 	 * @param ec
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private void handleSparkEagerCaching( ExecutionContext ec ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		if( OptimizerUtils.isSparkExecutionMode() &&
 			_variablesECache != null && !_variablesECache.isEmpty() ) {
@@ -1393,7 +1385,6 @@ public class ParForProgramBlock extends ForProgramBlock
 	 * @return
 	 * @throws InstantiationException
 	 * @throws IllegalAccessException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 * @throws CloneNotSupportedException
 	 */

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/Program.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/Program.java b/src/main/java/org/apache/sysml/runtime/controlprogram/Program.java
index bfbe124..24ccaef 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/Program.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/Program.java
@@ -26,7 +26,6 @@ import java.util.Map.Entry;
 import org.apache.sysml.parser.DMLProgram;
 import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.DMLScriptException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 
 
@@ -135,7 +134,7 @@ public class Program
 	}
 
 	public void execute(ExecutionContext ec)
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ec.initDebugProgramCounters();
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/ProgramBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/ProgramBlock.java b/src/main/java/org/apache/sysml/runtime/controlprogram/ProgramBlock.java
index 02e3e0c..a8d324e 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/ProgramBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/ProgramBlock.java
@@ -32,7 +32,6 @@ import org.apache.sysml.parser.StatementBlock;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.DMLScriptException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.Instruction;
@@ -129,10 +128,9 @@ public class ProgramBlock
 	 * 
 	 * @param ec
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public void execute(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		ArrayList<Instruction> tmp = _inst;
 
@@ -175,10 +173,9 @@ public class ProgramBlock
 	 * @param hops
 	 * @param ec
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public ScalarObject executePredicate(ArrayList<Instruction> inst, Hop hops, boolean requiresRecompile, ValueType retType, ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ArrayList<Instruction> tmp = inst;
 		
@@ -211,10 +208,9 @@ public class ProgramBlock
 	 * @param inst
 	 * @param ec
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	protected void executeInstructions(ArrayList<Instruction> inst, ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		for (int i = 0; i < inst.size(); i++) 
 		{
@@ -232,10 +228,9 @@ public class ProgramBlock
 	 * @param inst
 	 * @param ec
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	protected ScalarObject executePredicateInstructions(ArrayList<Instruction> inst, ValueType retType, ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		ScalarObject ret = null;
 		String retName = null;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/WhileProgramBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/WhileProgramBlock.java b/src/main/java/org/apache/sysml/runtime/controlprogram/WhileProgramBlock.java
index 1edfd22..c84a7c3 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/WhileProgramBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/WhileProgramBlock.java
@@ -27,7 +27,6 @@ import org.apache.sysml.parser.WhileStatementBlock;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.DMLScriptException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.Instruction;
 import org.apache.sysml.runtime.instructions.Instruction.INSTRUCTION_TYPE;
@@ -114,7 +113,7 @@ public class WhileProgramBlock extends ProgramBlock
 		{ return _exitInstructions; }
 	
 	private BooleanObject executePredicate(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		BooleanObject result = null;
 		try
@@ -168,7 +167,7 @@ public class WhileProgramBlock extends ProgramBlock
 		return result;
 	}
 	
-	public void execute(ExecutionContext ec) throws DMLRuntimeException, DMLUnsupportedOperationException {
+	public void execute(ExecutionContext ec) throws DMLRuntimeException {
 
 		BooleanObject predResult = executePredicate(ec); 
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheIOException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheIOException.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheIOException.java
deleted file mode 100644
index dff68b8..0000000
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheIOException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.sysml.runtime.controlprogram.caching;
-
-
-public class CacheIOException extends CacheException
-{
-
-	
-	private static final long serialVersionUID = 1L;
-
-	public CacheIOException ()
-	{
-		super ();
-	}
-
-	public CacheIOException (String message)
-	{
-		super (message);
-	}
-
-	public CacheIOException (Exception cause)
-	{
-		super (cause);
-	}
-
-	public CacheIOException (String message, Exception cause)
-	{
-		super (message, cause);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheStatusException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheStatusException.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheStatusException.java
deleted file mode 100644
index fa392df..0000000
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheStatusException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.sysml.runtime.controlprogram.caching;
-
-
-public class CacheStatusException extends CacheException
-{
-
-	
-	private static final long serialVersionUID = 1L;
-
-	public CacheStatusException (String message)
-	{
-		super (message);
-	}
-
-	public CacheStatusException (Exception cause)
-	{
-		super (cause);
-	}
-
-	public CacheStatusException (String message, Exception cause)
-	{
-		super (message, cause);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheableData.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheableData.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheableData.java
index b3bd8ff..be6f287 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheableData.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheableData.java
@@ -396,23 +396,19 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
 	 * 
 	 * @param data 
 	 * 
-	 * @throws CacheIOException if the eviction fails, the data blob
-	 *     remains as it was at the start.
+	 * @throws CacheException 
 	 */
 	protected abstract void evictBlobFromMemory(T data) 
-		throws CacheIOException;
+		throws CacheException;
 	
 	/**
 	 * Low-level cache I/O method that physically restores the data blob to
 	 * main memory.  Must be defined by a subclass, never called by users.
 	 *
-	 * @throws CacheIOException if the restore fails, the data blob
-	 *     remains as it was at the start.
-	 * @throws CacheAssignmentException if the restored blob cannot be assigned
-	 *     to this envelope.
+	 * @throws CacheException 
 	 */
 	protected abstract void restoreBlobIntoMemory()
-		throws CacheIOException;
+		throws CacheException;
 
 	/**
 	 * Low-level cache I/O method that deletes the file containing the
@@ -487,12 +483,12 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
 				break;
 			case READ:
 				if (isModify)
-					throw new CacheStatusException ("READ-MODIFY not allowed.");
+					throw new CacheException ("READ-MODIFY not allowed.");
 				else
 					addOneRead();
 				break;
 			case MODIFY:
-				throw new CacheStatusException ("MODIFY-MODIFY not allowed.");
+				throw new CacheException ("MODIFY-MODIFY not allowed.");
 		}
 
 		if( LOG.isTraceEnabled() )
@@ -520,7 +516,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
 			case EMPTY:
 			case CACHED:
 			case CACHED_NOWRITE:	
-				throw new CacheStatusException("Redundant release.");
+				throw new CacheException("Redundant release.");
 			case READ:
 				removeOneRead( isBlobPresent(), cacheNoWrite );
 				break;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/caching/FrameObject.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/FrameObject.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/FrameObject.java
index 0055a51..78dcdf5 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/FrameObject.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/FrameObject.java
@@ -161,12 +161,12 @@ public class FrameObject extends CacheableData<FrameBlock>
 	}
 
 	@Override
-	protected void evictBlobFromMemory(FrameBlock mb) throws CacheIOException {
+	protected void evictBlobFromMemory(FrameBlock mb) throws CacheException {
 		throw new RuntimeException("Caching not implemented yet for FrameObject.");
 	}
 
 	@Override
-	protected void restoreBlobIntoMemory() throws CacheIOException {
+	protected void restoreBlobIntoMemory() throws CacheException {
 		throw new RuntimeException("Caching not implemented yet for FrameObject.");
 	}
 


[11/11] incubator-systemml git commit: [SYSTEMML-561] Fix frame-matrix casting (robustness wrong input types)

Posted by mb...@apache.org.
[SYSTEMML-561] Fix frame-matrix casting (robustness wrong input types)

Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/328b644c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/328b644c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/328b644c

Branch: refs/heads/master
Commit: 328b644cb22091dd7f0c3cb7e44766159fda1592
Parents: 6c89c3a
Author: Matthias Boehm <mb...@us.ibm.com>
Authored: Tue Apr 5 14:21:56 2016 -0700
Committer: Matthias Boehm <mb...@us.ibm.com>
Committed: Tue Apr 5 14:21:56 2016 -0700

----------------------------------------------------------------------
 .../runtime/instructions/cp/VariableCPInstruction.java  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/328b644c/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java
index 0bd3fad..da7a8a0 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/VariableCPInstruction.java
@@ -519,16 +519,16 @@ public class VariableCPInstruction extends CPInstruction
 			break;
 		case CastAsMatrixVariable:{
 			MatrixBlock out = null;
-			if( input1.getDataType()==DataType.SCALAR ) {
-				ScalarObject scalarInput = ec.getScalarInput(input1.getName(), input1.getValueType(), input1.isLiteral());
-				out = new MatrixBlock(1,1,false);
-				out.quickSetValue(0, 0, scalarInput.getDoubleValue());	
-			}
-			else { //DataType.FRAME
+			if( input1.getDataType()==DataType.FRAME ) {
 				FrameBlock fin = ec.getFrameInput(input1.getName());
 				out = DataConverter.convertToMatrixBlock(fin);
 				ec.releaseFrameInput(input1.getName());
 			}
+			else { //assume DataType.SCALAR otherwise
+				ScalarObject scalarInput = ec.getScalarInput(input1.getName(), input1.getValueType(), input1.isLiteral());
+				out = new MatrixBlock(1,1,false);
+				out.quickSetValue(0, 0, scalarInput.getDoubleValue());		
+			}
 			ec.setMatrixOutput(output.getName(), out);
 			break;
 		}


[06/11] incubator-systemml git commit: [SYSTEMML-616] Cleanup exception handling (stage 1, remove unnecessary)

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarArithmeticSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarArithmeticSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarArithmeticSPInstruction.java
index 24eb045..bbe96ff 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarArithmeticSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarArithmeticSPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.spark;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -34,7 +33,7 @@ public class MatrixScalarArithmeticSPInstruction extends ArithmeticBinarySPInstr
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//sanity check opcode
 		String opcode = getOpcode();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarBuiltinSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarBuiltinSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarBuiltinSPInstruction.java
index 195e96c..024e31b 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarBuiltinSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarBuiltinSPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.spark;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -35,7 +34,7 @@ public class MatrixScalarBuiltinSPInstruction extends BuiltinBinarySPInstruction
 	
 	@Override 
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{	
 		//sanity check opcode
 		String opcode = getOpcode();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarRelationalSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarRelationalSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarRelationalSPInstruction.java
index 4d8b75f..9f8edcb 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarRelationalSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixScalarRelationalSPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.spark;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -35,7 +34,7 @@ public class MatrixScalarRelationalSPInstruction extends RelationalBinarySPInstr
 
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		String opcode = getOpcode();
 		if ( !(opcode.equalsIgnoreCase("==") || opcode.equalsIgnoreCase("!=") || opcode.equalsIgnoreCase("<")

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/PMapmmSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/PMapmmSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/PMapmmSPInstruction.java
index e59de45..0b0ee35 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/PMapmmSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/PMapmmSPInstruction.java
@@ -32,7 +32,6 @@ import scala.Tuple2;
 
 import org.apache.sysml.lops.PMapMult;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.Multiply;
@@ -94,7 +93,7 @@ public class PMapmmSPInstruction extends BinarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/ParameterizedBuiltinSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/ParameterizedBuiltinSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/ParameterizedBuiltinSPInstruction.java
index d099853..782161f 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/ParameterizedBuiltinSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/ParameterizedBuiltinSPInstruction.java
@@ -33,7 +33,6 @@ import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.parser.Statement;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
@@ -100,7 +99,7 @@ public class ParameterizedBuiltinSPInstruction  extends ComputationSPInstruction
 	}
 	
 	public static ParameterizedBuiltinSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		// first part is always the opcode
@@ -170,7 +169,7 @@ public class ParameterizedBuiltinSPInstruction  extends ComputationSPInstruction
 
 	@Override 
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		String opcode = getOpcode();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/PmmSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/PmmSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/PmmSPInstruction.java
index 5581388..44313e6 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/PmmSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/PmmSPInstruction.java
@@ -31,7 +31,6 @@ import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.lops.MapMult.CacheType;
 import org.apache.sysml.lops.PMMJ;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.Multiply;
@@ -96,7 +95,7 @@ public class PmmSPInstruction extends BinarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
@@ -136,7 +135,7 @@ public class PmmSPInstruction extends BinarySPInstruction
 		private int _brlen = -1;
 		
 		public RDDPMMFunction( CacheType type, PartitionedBroadcastMatrix binput, long rlen, int brlen ) 
-			throws DMLRuntimeException, DMLUnsupportedOperationException
+			throws DMLRuntimeException
 		{
 			_brlen = brlen;
 			_rlen = rlen;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/QuantilePickSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/QuantilePickSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/QuantilePickSPInstruction.java
index 55b9584..befc9f6 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/QuantilePickSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/QuantilePickSPInstruction.java
@@ -29,7 +29,6 @@ import scala.Tuple2;
 
 import org.apache.sysml.lops.PickByCount.OperationTypes;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -111,7 +110,7 @@ public class QuantilePickSPInstruction extends BinarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/QuantileSortSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/QuantileSortSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/QuantileSortSPInstruction.java
index 793354f..4be5fd0 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/QuantileSortSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/QuantileSortSPInstruction.java
@@ -25,7 +25,6 @@ import org.apache.sysml.lops.SortKeys;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -90,7 +89,7 @@ public class QuantileSortSPInstruction extends UnarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		boolean weighted = (input2 != null);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/QuaternarySPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/QuaternarySPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/QuaternarySPInstruction.java
index c87b5ec..c021c04 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/QuaternarySPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/QuaternarySPInstruction.java
@@ -45,7 +45,6 @@ import org.apache.sysml.lops.WeightedUnaryMM;
 import org.apache.sysml.lops.WeightedUnaryMM.WUMMType;
 import org.apache.sysml.lops.WeightedUnaryMMR;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -207,7 +206,7 @@ public class QuaternarySPInstruction extends ComputationSPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		QuaternaryOperator qop = (QuaternaryOperator) _optr;
@@ -390,7 +389,7 @@ public class QuaternarySPInstruction extends ComputationSPInstruction
 		private static final long serialVersionUID = -8209188316939435099L;
 		
 		public RDDQuaternaryFunction1( QuaternaryOperator qop, PartitionedBroadcastMatrix bcU, PartitionedBroadcastMatrix bcV ) 
-			throws DMLRuntimeException, DMLUnsupportedOperationException
+			throws DMLRuntimeException
 		{
 			super(qop, bcU, bcV);
 		}
@@ -439,7 +438,7 @@ public class QuaternarySPInstruction extends ComputationSPInstruction
 		private static final long serialVersionUID = 7493974462943080693L;
 		
 		public RDDQuaternaryFunction2( QuaternaryOperator qop, PartitionedBroadcastMatrix bcU, PartitionedBroadcastMatrix bcV ) 
-			throws DMLRuntimeException, DMLUnsupportedOperationException
+			throws DMLRuntimeException
 		{
 			super(qop, bcU, bcV);
 		}
@@ -475,7 +474,7 @@ public class QuaternarySPInstruction extends ComputationSPInstruction
 		private static final long serialVersionUID = -2294086455843773095L;
 		
 		public RDDQuaternaryFunction3( QuaternaryOperator qop, PartitionedBroadcastMatrix bcU, PartitionedBroadcastMatrix bcV ) 
-			throws DMLRuntimeException, DMLUnsupportedOperationException
+			throws DMLRuntimeException
 		{
 			super(qop, bcU, bcV);
 		}
@@ -514,7 +513,7 @@ public class QuaternarySPInstruction extends ComputationSPInstruction
 		private static final long serialVersionUID = 7328911771600289250L;
 		
 		public RDDQuaternaryFunction4( QuaternaryOperator qop ) 
-			throws DMLRuntimeException, DMLUnsupportedOperationException
+			throws DMLRuntimeException
 		{ 
 			super(qop, null, null);		
 		}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/ReblockSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/ReblockSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/ReblockSPInstruction.java
index 5685e44..000bd63 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/ReblockSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/ReblockSPInstruction.java
@@ -24,7 +24,6 @@ import org.apache.hadoop.io.Text;
 import org.apache.spark.api.java.JavaPairRDD;
 import org.apache.sysml.hops.recompile.Recompiler;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
@@ -80,7 +79,7 @@ public class ReblockSPInstruction extends UnarySPInstruction
 	@Override
 	@SuppressWarnings("unchecked")
 	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/ReorgSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/ReorgSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/ReorgSPInstruction.java
index 1514e5e..ee5b9a6 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/ReorgSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/ReorgSPInstruction.java
@@ -30,7 +30,6 @@ import scala.Tuple2;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.DiagIndex;
@@ -119,7 +118,7 @@ public class ReorgSPInstruction extends UnarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		String opcode = getOpcode();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/RmmSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/RmmSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/RmmSPInstruction.java
index d4ea437..e301f04 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/RmmSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/RmmSPInstruction.java
@@ -29,7 +29,6 @@ import org.apache.spark.api.java.function.PairFunction;
 import scala.Tuple2;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.Multiply;
@@ -83,7 +82,7 @@ public class RmmSPInstruction extends BinarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/SPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/SPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/SPInstruction.java
index 8b27d29..ae16075 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/SPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/SPInstruction.java
@@ -23,7 +23,6 @@ import org.apache.sysml.api.MLContext;
 import org.apache.sysml.api.MLContextProxy;
 import org.apache.sysml.lops.runtime.RunMRJobs;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.Instruction;
@@ -84,7 +83,7 @@ public abstract class SPInstruction extends Instruction
 	
 	@Override
 	public Instruction preprocessInstruction(ExecutionContext ec)
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//default pre-process behavior (e.g., debug state)
 		Instruction tmp = super.preprocessInstruction(ec);
@@ -114,7 +113,7 @@ public abstract class SPInstruction extends Instruction
 
 	@Override 
 	public abstract void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException, DMLUnsupportedOperationException;
+			throws DMLRuntimeException;
 
 	@Override
 	public void postprocessInstruction(ExecutionContext ec)

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/TernarySPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/TernarySPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/TernarySPInstruction.java
index fa00eb0..e743820 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/TernarySPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/TernarySPInstruction.java
@@ -31,7 +31,6 @@ import scala.Tuple2;
 import org.apache.sysml.lops.Ternary;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.CTable;
@@ -115,7 +114,7 @@ public class TernarySPInstruction extends ComputationSPInstruction
 
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 	

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/TsmmSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/TsmmSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/TsmmSPInstruction.java
index 2e162bb..6bd20a4 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/TsmmSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/TsmmSPInstruction.java
@@ -25,7 +25,6 @@ import org.apache.spark.api.java.function.Function;
 
 import org.apache.sysml.lops.MMTSJ.MMTSJType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -76,7 +75,7 @@ public class TsmmSPInstruction extends UnarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/UaggOuterChainSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/UaggOuterChainSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/UaggOuterChainSPInstruction.java
index ae1ab91..e2cb782 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/UaggOuterChainSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/UaggOuterChainSPInstruction.java
@@ -32,7 +32,6 @@ import scala.Tuple2;
 import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
 import org.apache.sysml.lops.UAggOuterChain;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.Builtin;
@@ -120,7 +119,7 @@ public class UaggOuterChainSPInstruction extends BinarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/WriteSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/WriteSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/WriteSPInstruction.java
index 3a6ad01..987cf7d 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/WriteSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/WriteSPInstruction.java
@@ -30,7 +30,6 @@ import org.apache.spark.api.java.JavaRDD;
 
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
@@ -128,7 +127,7 @@ public class WriteSPInstruction extends SPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{			
 		SparkExecutionContext sec = (SparkExecutionContext) ec;
 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/ZipmmSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/ZipmmSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/ZipmmSPInstruction.java
index 3316b60..8ad18fe 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/ZipmmSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/ZipmmSPInstruction.java
@@ -25,7 +25,6 @@ import org.apache.spark.api.java.function.Function;
 import scala.Tuple2;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.Multiply;
@@ -85,7 +84,7 @@ public class ZipmmSPInstruction extends BinarySPInstruction
 	
 	@Override
 	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBroadcastMatrix.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBroadcastMatrix.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBroadcastMatrix.java
index bfd5e0b..f79d8c1 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBroadcastMatrix.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBroadcastMatrix.java
@@ -24,7 +24,6 @@ import java.io.Serializable;
 import org.apache.spark.broadcast.Broadcast;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 
 /**
@@ -91,7 +90,7 @@ public class PartitionedBroadcastMatrix implements Serializable
 	}
 	
 	public MatrixBlock sliceOperations(long rl, long ru, long cl, long cu, MatrixBlock matrixBlock) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		MatrixBlock ret = null;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedMatrixBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedMatrixBlock.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedMatrixBlock.java
index 985de11..901b130 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedMatrixBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedMatrixBlock.java
@@ -32,7 +32,6 @@ import java.util.ArrayList;
 import scala.Tuple2;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.spark.utils.SparkUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
@@ -258,11 +257,10 @@ public class PartitionedMatrixBlock implements Externalizable
 	 * @param cu
 	 * @param matrixBlock
 	 * @return
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 */
 	public MatrixBlock sliceOperations(long rl, long ru, long cl, long cu, MatrixBlock matrixBlock) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		int lrl = (int) rl;
 		int lru = (int) ru;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDSortUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDSortUtils.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDSortUtils.java
index 34c1358..48a8496 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDSortUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDSortUtils.java
@@ -35,7 +35,6 @@ import org.apache.spark.broadcast.Broadcast;
 import scala.Tuple2;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
 import org.apache.sysml.runtime.functionobjects.SortIndex;
@@ -186,65 +185,6 @@ public class RDDSortUtils
 	}
 	
 	/**
-	 * 
-	 * @param val
-	 * @param data
-	 * @param asc
-	 * @param rlen
-	 * @param brlen
-	 * @param bclen
-	 * @param ec
-	 * @param r_op
-	 * @return
-	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
-	 */
-	/* This function collects and sorts value column through cluster distribution and then broadcasts it. 
-	 * 
-	 * For now, its commented out until it gets evaluated completely through experiments.
-	 */
-//	public static JavaPairRDD<MatrixIndexes, MatrixBlock> sortDataByValDistSort( JavaPairRDD<MatrixIndexes, MatrixBlock> val, 
-//			JavaPairRDD<MatrixIndexes, MatrixBlock> data, boolean asc, long rlen, long clen, int brlen, int bclen, 
-//				ExecutionContext ec, ReorgOperator r_op) 
-//					throws DMLRuntimeException, DMLUnsupportedOperationException
-//	{
-//		SparkExecutionContext sec = (SparkExecutionContext)ec;
-//		MatrixBlock sortedBlock;
-//		
-//		//create value-index rdd from inputs
-//		JavaPairRDD<ValueIndexPair, Double> dvals = val
-//				.flatMapToPair(new ExtractDoubleValuesWithIndexFunction(brlen));
-//	
-//		//sort (creates sorted range per partition)
-//		long hdfsBlocksize = InfrastructureAnalyzer.getHDFSBlockSize();
-//		int numPartitions = (int)Math.ceil(((double)rlen*16)/hdfsBlocksize);
-//		JavaRDD<ValueIndexPair> sdvals = dvals
-//				.sortByKey(new IndexComparator(asc), true, numPartitions)
-//				.keys(); //workaround for index comparator
-//	 
-//		//create target indexes by original index
-//		JavaPairRDD<Long, Long> ixmap = sdvals
-//				.zipWithIndex()
-//				.mapToPair(new ExtractIndexFunction())			// Original Index sorted by values
-//				.sortByKey();									// Original Index sorted to original order, with target index associaed with them.
-//		
-//		JavaPairRDD<MatrixIndexes, MatrixBlock> ixmap2 = ixmap 
-//        		.mapPartitions(new ConvertToBinaryBlockFunction4(rlen, brlen))
-//        		.mapToPair(new UnfoldBinaryBlockFunction());
-//		
-//		sortedBlock = SparkExecutionContext.toMatrixBlock(ixmap2, (int)rlen, 1, brlen, bclen, -1);
-//
-//		PartitionedMatrixBlock pmb = new PartitionedMatrixBlock(sortedBlock, brlen, bclen);		
-//		Broadcast<PartitionedMatrixBlock> _pmb = sec.getSparkContext().broadcast(pmb);	
-//
-//		JavaPairRDD<MatrixIndexes, MatrixBlock> ret = data
-//					.flatMapToPair(new ShuffleMatrixBlockRowsInMemFunction(rlen, brlen, _pmb));
-//		ret = RDDAggregateUtils.mergeByKey(ret);
-//
-//		return ret;	
-//	}
-	
-	/**
 	 * This function collects and sorts value column in memory and then broadcasts it. 
 	 * 
 	 * @param val
@@ -257,12 +197,11 @@ public class RDDSortUtils
 	 * @param r_op
 	 * @return
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static JavaPairRDD<MatrixIndexes, MatrixBlock> sortDataByValMemSort( JavaPairRDD<MatrixIndexes, MatrixBlock> val, 
 			JavaPairRDD<MatrixIndexes, MatrixBlock> data, boolean asc, long rlen, long clen, int brlen, int bclen, 
 			SparkExecutionContext sec, ReorgOperator r_op) 
-					throws DMLRuntimeException, DMLUnsupportedOperationException
+					throws DMLRuntimeException
 	{
 		//collect orderby column for in-memory sorting
 		MatrixBlock inMatBlock = SparkExecutionContext

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/SparkUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/SparkUtils.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/SparkUtils.java
index 6b9037a..3c898a6 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/SparkUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/SparkUtils.java
@@ -34,7 +34,6 @@ import scala.Tuple2;
 
 import org.apache.sysml.lops.Checkpoint;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.spark.functions.CopyBinaryCellFunction;
 import org.apache.sysml.runtime.instructions.spark.functions.CopyBlockFunction;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
@@ -97,7 +96,6 @@ public class SparkUtils
 	 * @param blen
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static MatrixBlock[] partitionIntoRowBlocks( MatrixBlock mb, int blen ) 
 		throws DMLRuntimeException
@@ -123,7 +121,6 @@ public class SparkUtils
 	 * @param brlen
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static MatrixBlock[] partitionIntoColumnBlocks( MatrixBlock mb, int blen ) 
 		throws DMLRuntimeException

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/io/FrameReaderFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/FrameReaderFactory.java b/src/main/java/org/apache/sysml/runtime/io/FrameReaderFactory.java
index 58f2490..e18a7d2 100644
--- a/src/main/java/org/apache/sysml/runtime/io/FrameReaderFactory.java
+++ b/src/main/java/org/apache/sysml/runtime/io/FrameReaderFactory.java
@@ -23,7 +23,6 @@ import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.matrix.data.CSVFileFormatProperties;
 import org.apache.sysml.runtime.matrix.data.FileFormatProperties;
 import org.apache.sysml.runtime.matrix.data.InputInfo;
-import org.apache.sysml.runtime.matrix.data.OutputInfo;
 
 /**
  * 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/io/FrameWriter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/FrameWriter.java b/src/main/java/org/apache/sysml/runtime/io/FrameWriter.java
index 6c1b303..b5058f0 100644
--- a/src/main/java/org/apache/sysml/runtime/io/FrameWriter.java
+++ b/src/main/java/org/apache/sysml/runtime/io/FrameWriter.java
@@ -24,7 +24,6 @@ import java.util.List;
 
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.matrix.data.FrameBlock;
 
 /**
@@ -44,12 +43,11 @@ public abstract class FrameWriter
 	 * @param rlen
 	 * @param clen
 	 * @return
-	 * @throws IOException
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws IOException 
 	 * @throws DMLRuntimeException 
 	 */
 	public abstract void writeFrameToHDFS( FrameBlock src, String fname, long rlen, long clen )
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException;
+		throws IOException, DMLRuntimeException;
 	
 	/**
 	 * 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/io/FrameWriterBinaryBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/FrameWriterBinaryBlock.java b/src/main/java/org/apache/sysml/runtime/io/FrameWriterBinaryBlock.java
index 7daf3c3..d8eddd9 100644
--- a/src/main/java/org/apache/sysml/runtime/io/FrameWriterBinaryBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/io/FrameWriterBinaryBlock.java
@@ -27,7 +27,6 @@ import org.apache.hadoop.io.SequenceFile;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.matrix.data.FrameBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
 import org.apache.sysml.runtime.util.MapReduceTool;
@@ -49,11 +48,10 @@ public class FrameWriterBinaryBlock extends FrameWriter
 	 * @return
 	 * @throws IOException 
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	@Override
 	public void writeFrameToHDFS( FrameBlock src, String fname, long rlen, long clen )
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException 
+		throws IOException, DMLRuntimeException 
 	{
 		//prepare file access
 		JobConf job = new JobConf(ConfigurationManager.getCachedJobConf());
@@ -75,12 +73,11 @@ public class FrameWriterBinaryBlock extends FrameWriter
 	 * @param clen
 	 * @return 
 	 * @throws IOException
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 */
 	@SuppressWarnings("deprecation")
 	protected void writeBinaryBlockFrameToHDFS( Path path, JobConf job, FrameBlock src, long rlen, long clen )
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException
+		throws IOException, DMLRuntimeException
 	{
 		FileSystem fs = FileSystem.get(job);
 		int brlen = ConfigurationManager.getBlocksize();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/io/FrameWriterTextCSV.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/FrameWriterTextCSV.java b/src/main/java/org/apache/sysml/runtime/io/FrameWriterTextCSV.java
index 10d957f..455f44d 100644
--- a/src/main/java/org/apache/sysml/runtime/io/FrameWriterTextCSV.java
+++ b/src/main/java/org/apache/sysml/runtime/io/FrameWriterTextCSV.java
@@ -29,7 +29,6 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.matrix.data.CSVFileFormatProperties;
 import org.apache.sysml.runtime.matrix.data.FrameBlock;
 import org.apache.sysml.runtime.util.MapReduceTool;
@@ -56,12 +55,11 @@ public class FrameWriterTextCSV extends FrameWriter
 	 * @param clen
 	 * @return
 	 * @throws IOException 
-	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws DMLRuntimeException  
 	 */
 	@Override
 	public void writeFrameToHDFS(FrameBlock src, String fname, long rlen, long clen) 
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException 
+		throws IOException, DMLRuntimeException 
 	{
 		//validity check frame dimensions
 		if( src.getNumRows() != rlen || src.getNumColumns() != clen ) {

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/io/FrameWriterTextCell.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/FrameWriterTextCell.java b/src/main/java/org/apache/sysml/runtime/io/FrameWriterTextCell.java
index c595448..8064ce5 100644
--- a/src/main/java/org/apache/sysml/runtime/io/FrameWriterTextCell.java
+++ b/src/main/java/org/apache/sysml/runtime/io/FrameWriterTextCell.java
@@ -29,7 +29,6 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.matrix.data.FrameBlock;
 import org.apache.sysml.runtime.util.MapReduceTool;
 
@@ -41,11 +40,10 @@ public class FrameWriterTextCell extends FrameWriter
 	 * @return
 	 * @throws IOException 
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	@Override
 	public void writeFrameToHDFS( FrameBlock src, String fname, long rlen, long clen )
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException 
+		throws IOException, DMLRuntimeException 
 	{
 		//validity check frame dimensions
 		if( src.getNumRows() != rlen || src.getNumColumns() != clen ) {

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/io/MatrixWriter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/MatrixWriter.java b/src/main/java/org/apache/sysml/runtime/io/MatrixWriter.java
index 98965b9..eca3caf 100644
--- a/src/main/java/org/apache/sysml/runtime/io/MatrixWriter.java
+++ b/src/main/java/org/apache/sysml/runtime/io/MatrixWriter.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.io;
 import java.io.IOException;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 
 /**
@@ -44,11 +43,10 @@ public abstract class MatrixWriter
 	 * @param bclen
 	 * @param expNnz
 	 * @return
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 */
 	public abstract void writeMatrixToHDFS( MatrixBlock src, String fname, long rlen, long clen, int brlen, int bclen, long nnz )
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException;
+		throws IOException, DMLRuntimeException;
 	
 	/**
 	 * Writes a minimal entry to represent an empty matrix on hdfs.
@@ -60,7 +58,6 @@ public abstract class MatrixWriter
 	 * @param bclen
 	 * @throws IOException
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public abstract void writeEmptyMatrixToHDFS( String fname, long rlen, long clen, int brlen, int bclen )
 		throws IOException, DMLRuntimeException;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/io/WriterBinaryBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/WriterBinaryBlock.java b/src/main/java/org/apache/sysml/runtime/io/WriterBinaryBlock.java
index 54b011f..a3e0ebf 100644
--- a/src/main/java/org/apache/sysml/runtime/io/WriterBinaryBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/io/WriterBinaryBlock.java
@@ -28,7 +28,6 @@ import org.apache.hadoop.io.SequenceFile;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
@@ -48,7 +47,7 @@ public class WriterBinaryBlock extends MatrixWriter
 
 	@Override
 	public void writeMatrixToHDFS(MatrixBlock src, String fname, long rlen, long clen, int brlen, int bclen, long nnz) 
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException 
+		throws IOException, DMLRuntimeException 
 	{
 		//prepare file access
 		JobConf job = new JobConf(ConfigurationManager.getCachedJobConf());
@@ -93,12 +92,11 @@ public class WriterBinaryBlock extends MatrixWriter
 	 * @param brlen
 	 * @param bclen
 	 * @throws IOException
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 */
 	@SuppressWarnings("deprecation")
 	protected void writeBinaryBlockMatrixToHDFS( Path path, JobConf job, MatrixBlock src, long rlen, long clen, int brlen, int bclen, int replication )
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException
+		throws IOException, DMLRuntimeException
 	{
 		boolean sparse = src.isInSparseFormat();
 		FileSystem fs = FileSystem.get(job);
@@ -187,12 +185,11 @@ public class WriterBinaryBlock extends MatrixWriter
 	 * @param bclen
 	 * @param replication
 	 * @throws IOException
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 */
 	@SuppressWarnings("deprecation")
 	protected void writeDiagBinaryBlockMatrixToHDFS( Path path, JobConf job, MatrixBlock src, long rlen, long clen, int brlen, int bclen, int replication ) 
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException
+		throws IOException, DMLRuntimeException
 	{
 		boolean sparse = src.isInSparseFormat();
 		FileSystem fs = FileSystem.get(job);
@@ -293,11 +290,10 @@ public class WriterBinaryBlock extends MatrixWriter
 	 * @param pformat
 	 * @throws IOException
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	@SuppressWarnings("deprecation")
 	public void writePartitionedBinaryBlockMatrixToHDFS( Path path, JobConf job, MatrixBlock src, long rlen, long clen, int brlen, int bclen, PDataPartitionFormat pformat )
-			throws IOException, DMLRuntimeException, DMLUnsupportedOperationException
+			throws IOException, DMLRuntimeException
 	{
 		boolean sparse = src.isInSparseFormat();
 		FileSystem fs = FileSystem.get(job);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/io/WriterBinaryBlockParallel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/WriterBinaryBlockParallel.java b/src/main/java/org/apache/sysml/runtime/io/WriterBinaryBlockParallel.java
index a950c88..b316f8b 100644
--- a/src/main/java/org/apache/sysml/runtime/io/WriterBinaryBlockParallel.java
+++ b/src/main/java/org/apache/sysml/runtime/io/WriterBinaryBlockParallel.java
@@ -34,7 +34,6 @@ import org.apache.hadoop.mapred.JobConf;
 import org.apache.sysml.conf.DMLConfig;
 import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
@@ -59,12 +58,11 @@ public class WriterBinaryBlockParallel extends WriterBinaryBlock
 	 * @param brlen
 	 * @param bclen
 	 * @throws IOException
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 */
 	@Override
 	protected void writeBinaryBlockMatrixToHDFS( Path path, JobConf job, MatrixBlock src, long rlen, long clen, int brlen, int bclen, int replication )
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException
+		throws IOException, DMLRuntimeException
 	{
 		//estimate output size and number of output blocks (min 1)
 		int numPartFiles = (int)(OptimizerUtils.estimatePartitionedSizeExactSparsity(rlen, clen, brlen, bclen, src.getNonZeros()) 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/io/WriterBinaryCell.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/WriterBinaryCell.java b/src/main/java/org/apache/sysml/runtime/io/WriterBinaryCell.java
index 66b0324..8c66d52 100644
--- a/src/main/java/org/apache/sysml/runtime/io/WriterBinaryCell.java
+++ b/src/main/java/org/apache/sysml/runtime/io/WriterBinaryCell.java
@@ -28,7 +28,6 @@ import org.apache.hadoop.io.SequenceFile;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.matrix.data.IJV;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixCell;
@@ -40,7 +39,7 @@ public class WriterBinaryCell extends MatrixWriter
 
 	@Override
 	public void writeMatrixToHDFS(MatrixBlock src, String fname, long rlen, long clen, int brlen, int bclen, long nnz) 
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException 
+		throws IOException, DMLRuntimeException 
 	{
 		//prepare file access
 		JobConf job = new JobConf(ConfigurationManager.getCachedJobConf());

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/io/WriterMatrixMarket.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/WriterMatrixMarket.java b/src/main/java/org/apache/sysml/runtime/io/WriterMatrixMarket.java
index 7b37385..42d504a 100644
--- a/src/main/java/org/apache/sysml/runtime/io/WriterMatrixMarket.java
+++ b/src/main/java/org/apache/sysml/runtime/io/WriterMatrixMarket.java
@@ -35,7 +35,6 @@ import org.apache.hadoop.io.IOUtils;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.matrix.data.IJV;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.util.MapReduceTool;
@@ -47,7 +46,7 @@ public class WriterMatrixMarket extends MatrixWriter
 {
 	@Override
 	public void writeMatrixToHDFS(MatrixBlock src, String fname, long rlen, long clen, int brlen, int bclen, long nnz) 
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException 
+		throws IOException, DMLRuntimeException 
 	{
 		//validity check matrix dimensions
 		if( src.getNumRows() != rlen || src.getNumColumns() != clen ) {

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/io/WriterTextCSV.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/WriterTextCSV.java b/src/main/java/org/apache/sysml/runtime/io/WriterTextCSV.java
index 54ec1a4..f18a8ec 100644
--- a/src/main/java/org/apache/sysml/runtime/io/WriterTextCSV.java
+++ b/src/main/java/org/apache/sysml/runtime/io/WriterTextCSV.java
@@ -36,7 +36,6 @@ import org.apache.hadoop.io.IOUtils;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.matrix.CSVReblockMR;
 import org.apache.sysml.runtime.matrix.data.CSVFileFormatProperties;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -60,7 +59,7 @@ public class WriterTextCSV extends MatrixWriter
 	
 	@Override
 	public void writeMatrixToHDFS(MatrixBlock src, String fname, long rlen, long clen, int brlen, int bclen, long nnz) 
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException 
+		throws IOException, DMLRuntimeException 
 	{
 		//validity check matrix dimensions
 		if( src.getNumRows() != rlen || src.getNumColumns() != clen ) {

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/io/WriterTextCell.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/io/WriterTextCell.java b/src/main/java/org/apache/sysml/runtime/io/WriterTextCell.java
index e293fd6..dd421ed 100644
--- a/src/main/java/org/apache/sysml/runtime/io/WriterTextCell.java
+++ b/src/main/java/org/apache/sysml/runtime/io/WriterTextCell.java
@@ -30,7 +30,6 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.matrix.data.IJV;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.util.MapReduceTool;
@@ -39,7 +38,7 @@ public class WriterTextCell extends MatrixWriter
 {
 	@Override
 	public void writeMatrixToHDFS(MatrixBlock src, String fname, long rlen, long clen, int brlen, int bclen, long nnz) 
-		throws IOException, DMLRuntimeException, DMLUnsupportedOperationException 
+		throws IOException, DMLRuntimeException 
 	{
 		//validity check matrix dimensions
 		if( src.getNumRows() != rlen || src.getNumColumns() != clen ) {

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/GMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/GMR.java b/src/main/java/org/apache/sysml/runtime/matrix/GMR.java
index 0d399fa..dd54886 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/GMR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/GMR.java
@@ -36,7 +36,6 @@ import org.apache.sysml.conf.DMLConfig;
 import org.apache.sysml.lops.Lop;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
 import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
 import org.apache.sysml.runtime.instructions.Instruction;
@@ -315,10 +314,9 @@ public class GMR
 	 * @param rlens
 	 * @param clens
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	private static void setupDistributedCache(JobConf job, String instMap, String instRed, String[] inputs, long[] rlens, long[] clens) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		//concatenate mapper and reducer instructions
 		String allInsts = (instMap!=null && !instMap.trim().isEmpty() ) ? instMap : null;
@@ -386,10 +384,9 @@ public class GMR
 	 * @param inst4
 	 * @return
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	private static boolean[] getDistCacheOnlyInputs(byte[] realIndexes, String inst1, String inst2, String inst3, String inst4) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		boolean[] ret = new boolean[realIndexes.length];
 		String[] inst = new String[]{inst1, inst2, inst3, inst4};

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/MatrixCharacteristics.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/MatrixCharacteristics.java b/src/main/java/org/apache/sysml/runtime/matrix/MatrixCharacteristics.java
index 8151465..65f3b1a 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/MatrixCharacteristics.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/MatrixCharacteristics.java
@@ -25,7 +25,6 @@ import java.util.HashMap;
 
 import org.apache.sysml.lops.MMTSJ.MMTSJType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.mr.AggregateBinaryInstruction;
 import org.apache.sysml.runtime.instructions.mr.AggregateInstruction;
 import org.apache.sysml.runtime.instructions.mr.AggregateUnaryInstruction;
@@ -204,27 +203,26 @@ public class MatrixCharacteristics implements Serializable
 	}
 	
 	public static void reorg(MatrixCharacteristics dim, ReorgOperator op, 
-			MatrixCharacteristics dimOut) throws DMLUnsupportedOperationException, DMLRuntimeException
+			MatrixCharacteristics dimOut) throws DMLRuntimeException
 	{
 		op.fn.computeDimension(dim, dimOut);
 	}
 	
 	public static void aggregateUnary(MatrixCharacteristics dim, AggregateUnaryOperator op, 
-			MatrixCharacteristics dimOut) throws DMLUnsupportedOperationException, DMLRuntimeException
+			MatrixCharacteristics dimOut) throws DMLRuntimeException
 	{
 		op.indexFn.computeDimension(dim, dimOut);
 	}
 	
 	public static void aggregateBinary(MatrixCharacteristics dim1, MatrixCharacteristics dim2,
 			AggregateBinaryOperator op, MatrixCharacteristics dimOut) 
-	throws DMLUnsupportedOperationException
 	{
 		//set dimension
 		dimOut.set(dim1.numRows, dim2.numColumns, dim1.numRowsPerBlock, dim2.numColumnsPerBlock);
 	}
 	
 	public static void computeDimension(HashMap<Byte, MatrixCharacteristics> dims, MRInstruction ins) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		MatrixCharacteristics dimOut=dims.get(ins.output);
 		if(dimOut==null)

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/data/CM_N_COVCell.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/CM_N_COVCell.java b/src/main/java/org/apache/sysml/runtime/matrix/data/CM_N_COVCell.java
index a1fc979..58bd529 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/CM_N_COVCell.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/CM_N_COVCell.java
@@ -28,7 +28,6 @@ import java.util.ArrayList;
 import org.apache.hadoop.io.WritableComparable;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.cp.CM_COV_Object;
 import org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue;
 import org.apache.sysml.runtime.matrix.operators.AggregateBinaryOperator;
@@ -55,27 +54,27 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 	@Override
 	public MatrixValue aggregateBinaryOperations(MatrixValue m1Value,
 			MatrixValue m2Value, MatrixValue result, AggregateBinaryOperator op)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 
 	@Override
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op,
 			MatrixValue result, int brlen, int bclen, MatrixIndexes indexesIn)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 
 	@Override
 	public MatrixValue binaryOperations(BinaryOperator op,
 			MatrixValue thatValue, MatrixValue result)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 
 	@Override
 	public void binaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");		
 	}
 
@@ -122,14 +121,14 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 	@Override
 	public void incrementalAggregate(AggregateOperator aggOp,
 			MatrixValue correction, MatrixValue newWithCorrection)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new RuntimeException("operation not supported fro WeightedCell");
 	}
 	
 	@Override
 	public void incrementalAggregate(AggregateOperator aggOp,
 			MatrixValue newWithCorrection)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new RuntimeException("operation not supported fro WeightedCell");
 	}
 
@@ -146,7 +145,7 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 	@Override
 	public MatrixValue reorgOperations(ReorgOperator op, MatrixValue result,
 			int startRow, int startColumn, int length)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new RuntimeException("operation not supported fro WeightedCell");
 	}
 
@@ -174,7 +173,7 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 
 	@Override
 	public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 	
@@ -195,13 +194,13 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 
 	@Override
 	public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 
 	@Override
 	public void unaryOperationsInPlace(UnaryOperator op)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 
@@ -274,14 +273,14 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 
 	@Override
 	public MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 
 	@Override
 	public void ternaryOperations(Operator op, MatrixValue that,
 			MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 		
 	}
@@ -289,34 +288,34 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 	@Override
 	public void ternaryOperations(Operator op, MatrixValue that,
 			double scalarThat2, boolean ignoreZeros, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 
 	@Override
 	public void ternaryOperations(Operator op, double scalarThat,
 			double scalarThat2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 	
 	@Override
 	public void ternaryOperations(Operator op, MatrixIndexes ix1, double scalarThat, boolean left, int brlen,
 			CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 
 	@Override
 	public void ternaryOperations(Operator op, double scalarThat,
 			MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 	
 	@Override
 	public MatrixValue quaternaryOperations(QuaternaryOperator qop, MatrixValue um, MatrixValue vm, MatrixValue wm, MatrixValue out)
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
@@ -326,13 +325,13 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 	public void sliceOperations(ArrayList<IndexedMatrixValue> outlist,
 			IndexRange range, int rowCut, int colCut, int blockRowFactor,
 			int blockColFactor, int boundaryRlen, int boundaryClen)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");		
 	}
 	
 	@Override
 	public MatrixValue replaceOperations(MatrixValue result, double pattern, double replacement)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");		
 	}
 
@@ -340,7 +339,7 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op,
 			MatrixValue result, int blockingFactorRow, int blockingFactorCol,
 			MatrixIndexes indexesIn, boolean inCP)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 
@@ -348,14 +347,14 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 	public MatrixValue aggregateBinaryOperations(MatrixIndexes m1Index,
 			MatrixValue m1Value, MatrixIndexes m2Index, MatrixValue m2Value,
 			MatrixValue result, AggregateBinaryOperator op)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 
 	@Override
 	public void appendOperations(MatrixValue valueIn2, ArrayList<IndexedMatrixValue> outlist,
 			int blockRowFactor, int blockColFactor, boolean cbind, boolean m2IsLast, int nextNCol)
-	throws DMLUnsupportedOperationException, DMLRuntimeException   {
+	throws DMLRuntimeException   {
 		throw new DMLRuntimeException("operation not supported fro WeightedCell");
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixAgg.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixAgg.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixAgg.java
index a5620e5..974d0f4 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixAgg.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixAgg.java
@@ -29,7 +29,6 @@ import java.util.concurrent.Future;
 
 import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.runtime.functionobjects.Builtin.BuiltinFunctionCode;
 import org.apache.sysml.runtime.functionobjects.CM;
@@ -706,10 +705,9 @@ public class LibMatrixAgg
 	 * @param aop
 	 * @return
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	private static void aggregateFinalResult( AggregateOperator aop, MatrixBlock out, MatrixBlock partout ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		AggregateOperator laop = aop;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixMult.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixMult.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixMult.java
index 698149c..23cd5ba 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixMult.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixMult.java
@@ -37,7 +37,6 @@ import org.apache.sysml.lops.WeightedSigmoid.WSigmoidType;
 import org.apache.sysml.lops.WeightedSquaredLoss.WeightsType;
 import org.apache.sysml.lops.WeightedUnaryMM.WUMMType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.SwapIndex;
 import org.apache.sysml.runtime.functionobjects.ValueFunction;
 import org.apache.sysml.runtime.matrix.operators.ReorgOperator;
@@ -226,10 +225,9 @@ public class LibMatrixMult
 	 * @param ret
 	 * @param ct
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static void matrixMultChain(MatrixBlock mX, MatrixBlock mV, MatrixBlock mW, MatrixBlock ret, ChainType ct) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{		
 		//check inputs / outputs (after that mV and mW guaranteed to be dense)
 		if( mX.isEmptyBlock(false) || mV.isEmptyBlock(false) || (mW !=null && mW.isEmptyBlock(false)) ) {
@@ -271,10 +269,9 @@ public class LibMatrixMult
 	 * @param ct
 	 * @param k
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static void matrixMultChain(MatrixBlock mX, MatrixBlock mV, MatrixBlock mW, MatrixBlock ret, ChainType ct, int k) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{		
 		//check inputs / outputs (after that mV and mW guaranteed to be dense)
 		if( mX.isEmptyBlock(false) || mV.isEmptyBlock(false) || (mW !=null && mW.isEmptyBlock(false)) ) {
@@ -331,10 +328,9 @@ public class LibMatrixMult
 	 * @param ret
 	 * @param leftTranspose
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static void matrixMultTransposeSelf( MatrixBlock m1, MatrixBlock ret, boolean leftTranspose )
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//check inputs / outputs
 		if( m1.isEmptyBlock(false) ) {
@@ -368,11 +364,10 @@ public class LibMatrixMult
 	 * @param ret
 	 * @param leftTranspose
 	 * @param k
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static void matrixMultTransposeSelf( MatrixBlock m1, MatrixBlock ret, boolean leftTranspose, int k )
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//check inputs / outputs
 		if( m1.isEmptyBlock(false) ) {
@@ -426,11 +421,10 @@ public class LibMatrixMult
 	 * @param m2
 	 * @param ret1
 	 * @param ret2
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static void matrixMultPermute( MatrixBlock pm1, MatrixBlock m2, MatrixBlock ret1, MatrixBlock ret2 )
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//check inputs / outputs
 		if( pm1.isEmptyBlock(false) || m2.isEmptyBlock(false) )
@@ -471,12 +465,10 @@ public class LibMatrixMult
 	 * @param m2
 	 * @param ret1
 	 * @param ret2
-	 * @throws DMLUnsupportedOperationException
-	 * @throws DMLRuntimeException
 	 * @throws DMLRuntimeException 
 	 */
 	public static void matrixMultPermute( MatrixBlock pm1, MatrixBlock m2, MatrixBlock ret1, MatrixBlock ret2, int k)
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//check inputs / outputs
 		if( pm1.isEmptyBlock(false) || m2.isEmptyBlock(false) )
@@ -1606,7 +1598,6 @@ public class LibMatrixMult
 	 * @param ret
 	 * @param ct
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private static void matrixMultChainDense(MatrixBlock mX, MatrixBlock mV, MatrixBlock mW, MatrixBlock ret, ChainType ct, int rl, int ru) 
 	{
@@ -1661,7 +1652,6 @@ public class LibMatrixMult
 	 * @param rl
 	 * @param ru
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private static void matrixMultChainSparse(MatrixBlock mX, MatrixBlock mV, MatrixBlock mW, MatrixBlock ret, ChainType ct, int rl, int ru) 
 	{
@@ -1718,7 +1708,6 @@ public class LibMatrixMult
 	 * @param ret
 	 * @param leftTranspose
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	private static void matrixMultTransposeSelfDense( MatrixBlock m1, MatrixBlock ret, boolean leftTranspose, int rl, int ru ) 
 		throws DMLRuntimeException
@@ -1856,7 +1845,6 @@ public class LibMatrixMult
 	 * 
 	 * @param out
 	 * @param leftTranspose
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	private static void matrixMultTransposeSelfSparse( MatrixBlock m1, MatrixBlock ret, boolean leftTranspose, int rl, int ru ) 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixOuterAgg.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixOuterAgg.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixOuterAgg.java
index fd551d5..dab24a0 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixOuterAgg.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixOuterAgg.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.matrix.data;
 import java.util.Arrays;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.runtime.functionobjects.Equals;
 import org.apache.sysml.runtime.functionobjects.GreaterThan;
@@ -120,15 +119,17 @@ public class LibMatrixOuterAgg
 			
 	}
 
-	/*
+	/**
 	 * 
 	 * @param iCols
 	 * @param vmb
 	 * @param bOp
 	 * @param uaggOp
-	 * 
+	 * @return
+	 * @throws DMLRuntimeException
 	 */
-	public static int[] prepareRowIndices(int iCols, double vmb[], BinaryOperator bOp, AggregateUnaryOperator uaggOp) throws DMLRuntimeException, DMLUnsupportedOperationException
+	public static int[] prepareRowIndices(int iCols, double vmb[], BinaryOperator bOp, AggregateUnaryOperator uaggOp) 
+		throws DMLRuntimeException
 	{
 		return (isRowIndexMax(uaggOp)?prepareRowIndicesMax(iCols, vmb, bOp):prepareRowIndicesMin(iCols, vmb, bOp));
 	}
@@ -161,7 +162,7 @@ public class LibMatrixOuterAgg
 	 * @param bOp
 	 * @return vixCumSum
 	 */
-	public static int[] prepareRowIndicesMax(int iCols, double vmb[], BinaryOperator bOp) throws DMLRuntimeException, DMLUnsupportedOperationException
+	public static int[] prepareRowIndicesMax(int iCols, double vmb[], BinaryOperator bOp) throws DMLRuntimeException
 	{
 		int[] vixCumSum = null;
 		int[] vix = new int[iCols];
@@ -241,7 +242,7 @@ public class LibMatrixOuterAgg
 	 * @param bOp
 	 * @return vixCumSum
 	 */
-	public static int[] prepareRowIndicesMin(int iCols, double vmb[], BinaryOperator bOp) throws DMLRuntimeException, DMLUnsupportedOperationException
+	public static int[] prepareRowIndicesMin(int iCols, double vmb[], BinaryOperator bOp) throws DMLRuntimeException
 	{
 		int[] vixCumSum = null;
 		int[] vix = new int[iCols];

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java
index 388a632..b288ba0 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixReorg.java
@@ -29,7 +29,6 @@ import java.util.HashSet;
 import java.util.Map.Entry;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.DiagIndex;
 import org.apache.sysml.runtime.functionobjects.RevIndex;
 import org.apache.sysml.runtime.functionobjects.SortIndex;
@@ -184,11 +183,10 @@ public class LibMatrixReorg
 	 * @param rows1
 	 * @param brlen
 	 * @param out
-	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws DMLRuntimeException  
 	 */
 	public static void rev( IndexedMatrixValue in, long rlen, int brlen, ArrayList<IndexedMatrixValue> out ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//input block reverse 
 		MatrixIndexes inix = in.getIndexes();
@@ -482,11 +480,10 @@ public class LibMatrixReorg
 	 * @param in
 	 * @param out
 	 * @param rows
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 */
 	public static MatrixBlock rmempty(MatrixBlock in, MatrixBlock ret, boolean rows) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		return rmempty(in, ret, rows, null);
 	}
@@ -497,11 +494,10 @@ public class LibMatrixReorg
 	 * @param in
 	 * @param out
 	 * @param rows
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 */
 	public static MatrixBlock rmempty(MatrixBlock in, MatrixBlock ret, boolean rows, MatrixBlock select) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//check for empty inputs 
 		//(the semantics of removeEmpty are that for an empty m-by-n matrix, the output 
@@ -618,10 +614,9 @@ public class LibMatrixReorg
 	 * @param rows
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static MatrixBlock rexpand(MatrixBlock in, MatrixBlock ret, double max, boolean rows, boolean cast, boolean ignore) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//prepare parameters
 		int lmax = (int)UtilFunctions.toLong(max);
@@ -658,10 +653,9 @@ public class LibMatrixReorg
 	 * @param bclen
 	 * @param outList
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static void rexpand(IndexedMatrixValue data, double max, boolean rows, boolean cast, boolean ignore, long brlen, long bclen, ArrayList<IndexedMatrixValue> outList) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//prepare parameters
 		MatrixIndexes ix = data.getIndexes();
@@ -1797,10 +1791,9 @@ public class LibMatrixReorg
 	 * @param select
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private static MatrixBlock removeEmptyRows(MatrixBlock in, MatrixBlock ret, MatrixBlock select) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{	
 		final int m = in.rlen;
 		final int n = in.clen;
@@ -1895,10 +1888,9 @@ public class LibMatrixReorg
 	 * @param select
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private static MatrixBlock removeEmptyColumns(MatrixBlock in, MatrixBlock ret, MatrixBlock select) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		final int m = in.rlen;
 		final int n = in.clen;


[03/11] incubator-systemml git commit: [SYSTEMML-613] Refactoring transform encoders (api, simplify, cleanup)

Posted by mb...@apache.org.
[SYSTEMML-613] Refactoring transform encoders (api, simplify, cleanup)

Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/d9e0748b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/d9e0748b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/d9e0748b

Branch: refs/heads/master
Commit: d9e0748b895f6ef7d8f22542c0630036e12b596f
Parents: c8c8d81
Author: Matthias Boehm <mb...@us.ibm.com>
Authored: Mon Apr 4 20:54:51 2016 -0700
Committer: Matthias Boehm <mb...@us.ibm.com>
Committed: Tue Apr 5 00:18:17 2016 -0700

----------------------------------------------------------------------
 .../org/apache/sysml/api/jmlc/Connection.java   |  12 +-
 .../runtime/transform/ApplyTfCSVSPARK.java      |   1 -
 .../sysml/runtime/transform/BinAgent.java       | 147 ++++++--------
 .../sysml/runtime/transform/DataTransform.java  |  83 ++++----
 .../sysml/runtime/transform/DistinctValue.java  |  31 ++-
 .../sysml/runtime/transform/DummycodeAgent.java | 138 +++++---------
 .../sysml/runtime/transform/MVImputeAgent.java  | 191 ++++++++-----------
 .../sysml/runtime/transform/OmitAgent.java      |  71 ++-----
 .../sysml/runtime/transform/RecodeAgent.java    | 154 ++++++---------
 .../apache/sysml/runtime/transform/TfUtils.java | 114 ++++++-----
 .../runtime/transform/TransformationAgent.java  |  87 ---------
 .../sysml/runtime/transform/decode/Decoder.java |   3 +-
 .../transform/decode/DecoderComposite.java      |   3 +-
 .../transform/decode/DecoderFactory.java        |  13 +-
 .../runtime/transform/decode/DecoderRecode.java |   3 +-
 .../sysml/runtime/transform/encode/Encoder.java | 104 ++++++++++
 .../functions/transform/ScalingTest.java        |   5 +-
 17 files changed, 501 insertions(+), 659 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/api/jmlc/Connection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/jmlc/Connection.java b/src/main/java/org/apache/sysml/api/jmlc/Connection.java
index abb22ed..00477cf 100644
--- a/src/main/java/org/apache/sysml/api/jmlc/Connection.java
+++ b/src/main/java/org/apache/sysml/api/jmlc/Connection.java
@@ -63,8 +63,6 @@ import org.apache.sysml.runtime.matrix.data.InputInfo;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.Pair;
 import org.apache.sysml.runtime.transform.TfUtils;
-import org.apache.sysml.runtime.transform.TransformationAgent;
-import org.apache.sysml.runtime.transform.TransformationAgent.TX_METHOD;
 import org.apache.sysml.runtime.transform.decode.DecoderRecode;
 import org.apache.sysml.runtime.util.DataConverter;
 import org.apache.sysml.runtime.util.MapReduceTool;
@@ -462,14 +460,14 @@ public class Connection
 			
 			//parse json transform specification
 			JSONObject jSpec = new JSONObject(spec);
-			if ( jSpec.containsKey(TX_METHOD.RECODE.toString()))  {
+			if ( jSpec.containsKey(TfUtils.TXMETHOD_RECODE))  {
 				JSONArray attrs = null; //TODO simplify once json spec consolidated
-				if( jSpec.get(TX_METHOD.RECODE.toString()) instanceof JSONObject ) {
-					JSONObject obj = (JSONObject) jSpec.get(TX_METHOD.RECODE.toString());
-					attrs = (JSONArray) obj.get(TransformationAgent.JSON_ATTRS);
+				if( jSpec.get(TfUtils.TXMETHOD_RECODE) instanceof JSONObject ) {
+					JSONObject obj = (JSONObject) jSpec.get(TfUtils.TXMETHOD_RECODE);
+					attrs = (JSONArray) obj.get(TfUtils.JSON_ATTRS);
 				}
 				else
-					attrs = (JSONArray)jSpec.get(TX_METHOD.RECODE.toString());				
+					attrs = (JSONArray)jSpec.get(TfUtils.TXMETHOD_RECODE);				
 				for(int j=0; j<attrs.length(); j++) 
 					specRecodeIDs.add(UtilFunctions.toInt(attrs.get(j)));
 			}	

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/ApplyTfCSVSPARK.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/ApplyTfCSVSPARK.java b/src/main/java/org/apache/sysml/runtime/transform/ApplyTfCSVSPARK.java
index 9b4f70c..c1d99e6 100644
--- a/src/main/java/org/apache/sysml/runtime/transform/ApplyTfCSVSPARK.java
+++ b/src/main/java/org/apache/sysml/runtime/transform/ApplyTfCSVSPARK.java
@@ -124,7 +124,6 @@ public class ApplyTfCSVSPARK {
 					_tfmapper.processHeaderLine();
 					
 					if (_tfmapper.hasHeader() ) {
-						//outLines.add(dcdHeader); // if the header needs to be preserved in the output file
 						continue; 
 					}
 				}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/BinAgent.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/BinAgent.java b/src/main/java/org/apache/sysml/runtime/transform/BinAgent.java
index 8a7199e..4f24afd 100644
--- a/src/main/java/org/apache/sysml/runtime/transform/BinAgent.java
+++ b/src/main/java/org/apache/sysml/runtime/transform/BinAgent.java
@@ -41,68 +41,67 @@ import org.apache.wink.json4j.JSONObject;
 import scala.Tuple2;
 
 import org.apache.sysml.runtime.transform.MVImputeAgent.MVMethod;
+import org.apache.sysml.runtime.transform.encode.Encoder;
 import org.apache.sysml.runtime.util.UtilFunctions;
 
-public class BinAgent extends TransformationAgent {
-	
+public class BinAgent extends Encoder 
+{	
 	private static final long serialVersionUID = 1917445005206076078L;
 
 	public static final String MIN_PREFIX = "min";
 	public static final String MAX_PREFIX = "max";
 	public static final String NBINS_PREFIX = "nbins";
 
-	private int[] _binList = null;
-	//private byte[] _binMethodList = null;	// Not used, since only equi-width is supported for now. 
 	private int[] _numBins = null;
-
 	private double[] _min=null, _max=null;	// min and max among non-missing values
-
 	private double[] _binWidths = null;		// width of a bin for each attribute
 	
-	BinAgent() { }
+	public BinAgent() {
+		super( null );
+	}
 	
-	BinAgent(JSONObject parsedSpec) throws JSONException {
-		
-		if ( !parsedSpec.containsKey(TX_METHOD.BIN.toString()) )
+	public BinAgent(JSONObject parsedSpec) 
+		throws JSONException 
+	{
+		super( null );		
+		if ( !parsedSpec.containsKey(TfUtils.TXMETHOD_BIN) )
 			return;
 		
-		JSONObject obj = (JSONObject) parsedSpec.get(TX_METHOD.BIN.toString());
-		
-		JSONArray attrs = (JSONArray) obj.get(JSON_ATTRS);
-		//JSONArray mthds = (JSONArray) obj.get(JSON_MTHD);
-		JSONArray nbins = (JSONArray) obj.get(JSON_NBINS);
+		JSONObject obj = (JSONObject) parsedSpec.get(TfUtils.TXMETHOD_BIN);		
+		JSONArray attrs = (JSONArray) obj.get(TfUtils.JSON_ATTRS);
+		JSONArray nbins = (JSONArray) obj.get(TfUtils.JSON_NBINS);
 			
-		assert(attrs.size() == nbins.size());
-			
-		_binList = new int[attrs.size()];
+		initColList(attrs);
 		_numBins = new int[attrs.size()];
-		for(int i=0; i < _binList.length; i++) {
-			_binList[i] = UtilFunctions.toInt(attrs.get(i));
+		for(int i=0; i < _numBins.length; i++)
 			_numBins[i] = UtilFunctions.toInt(nbins.get(i)); 
-		}
 		
 		// initialize internal transformation metadata
-		_min = new double[_binList.length];
+		_min = new double[_colList.length];
 		Arrays.fill(_min, Double.MAX_VALUE);
-		_max = new double[_binList.length];
+		_max = new double[_colList.length];
 		Arrays.fill(_max, -Double.MAX_VALUE);
 		
-		_binWidths = new double[_binList.length];
+		_binWidths = new double[_colList.length];
 	}
+
+	public int[] getNumBins() { return _numBins; }
+	public double[] getMin()  { return _min; }
+	public double[] getBinWidths() { return _binWidths; }
 	
 	public void prepare(String[] words, TfUtils agents) {
-		if ( _binList == null )
+		if ( !isApplicable() )
 			return;
 		
-		for(int i=0; i <_binList.length; i++) {
-			int colID = _binList[i];
+		for(int i=0; i <_colList.length; i++) {
+			int colID = _colList[i];
 			
 			String w = null;
 			double d = 0;
 				
 			// equi-width
 			w = UtilFunctions.unquote(words[colID-1].trim());
-			if(!agents.isNA(w)) {
+			if(!TfUtils.isNA(agents.getNAStrings(),w)) {
 				d = UtilFunctions.parseToDouble(w);
 				if(d < _min[i])
 					_min[i] = d;
@@ -136,12 +135,12 @@ public class BinAgent extends TransformationAgent {
 	 */
 	@Override
 	public void mapOutputTransformationMetadata(OutputCollector<IntWritable, DistinctValue> out, int taskID, TfUtils agents) throws IOException {
-		if ( _binList == null )
+		if( !isApplicable() )
 			return;
 		
 		try { 
-			for(int i=0; i < _binList.length; i++) {
-				int colID = _binList[i];
+			for(int i=0; i < _colList.length; i++) {
+				int colID = _colList[i];
 				IntWritable iw = new IntWritable(-colID);
 				
 				out.collect(iw,  prepMinOutput(i));
@@ -154,12 +153,12 @@ public class BinAgent extends TransformationAgent {
 	}
 	
 	public ArrayList<Tuple2<Integer, DistinctValue>> mapOutputTransformationMetadata(int taskID, ArrayList<Tuple2<Integer, DistinctValue>> list, TfUtils agents) throws IOException {
-		if ( _binList == null )
+		if ( !isApplicable() )
 			return list;
 		
 		try { 
-			for(int i=0; i < _binList.length; i++) {
-				int colID = _binList[i];
+			for(int i=0; i < _colList.length; i++) {
+				int colID = _colList[i];
 				Integer iw = -colID;
 				
 				list.add( new Tuple2<Integer,DistinctValue>(iw, prepMinOutput(i)) );
@@ -174,7 +173,7 @@ public class BinAgent extends TransformationAgent {
 
 	private void writeTfMtd(int colID, String min, String max, String binwidth, String nbins, String tfMtdDir, FileSystem fs, TfUtils agents) throws IOException 
 	{
-		Path pt = new Path(tfMtdDir+"/Bin/"+ agents.getName(colID) + BIN_FILE_SUFFIX);
+		Path pt = new Path(tfMtdDir+"/Bin/"+ agents.getName(colID) + TfUtils.BIN_FILE_SUFFIX);
 		BufferedWriter br=new BufferedWriter(new OutputStreamWriter(fs.create(pt,true)));
 		br.write(colID + TfUtils.TXMTD_SEP + min + TfUtils.TXMTD_SEP + max + TfUtils.TXMTD_SEP + binwidth + TfUtils.TXMTD_SEP + nbins + "\n");
 		br.close();
@@ -225,15 +224,15 @@ public class BinAgent extends TransformationAgent {
 	
 	
 	public void outputTransformationMetadata(String outputDir, FileSystem fs, TfUtils agents) throws IOException {
-		if(_binList == null)
+		if( !isApplicable() )
 			return;
 		
 		MVImputeAgent mvagent = agents.getMVImputeAgent();
-		for(int i=0; i < _binList.length; i++) {
-			int colID = _binList[i];
+		for(int i=0; i < _colList.length; i++) {
+			int colID = _colList[i];
 			
 			// If the column is imputed with a constant, then adjust min and max based the value of the constant.
-			if ( mvagent.isImputed(colID) != -1 && mvagent.getMethod(colID) == MVMethod.CONSTANT ) 
+			if ( mvagent.isApplicable(colID) != -1 && mvagent.getMethod(colID) == MVMethod.CONSTANT ) 
 			{
 				double cst = UtilFunctions.parseToDouble( mvagent.getReplacement(colID) );
 				if ( cst < _min[i])
@@ -249,11 +248,6 @@ public class BinAgent extends TransformationAgent {
 	
 	// ------------------------------------------------------------------------------------------------
 
-	public int[] getBinList() { return _binList; }
-	public int[] getNumBins() { return _numBins; }
-	public double[] getMin()  { return _min; }
-	public double[] getBinWidths() { return _binWidths; }
-	
 	/**
 	 * Method to load transform metadata for all attributes
 	 * 
@@ -262,14 +256,14 @@ public class BinAgent extends TransformationAgent {
 	 */
 	@Override
 	public void loadTxMtd(JobConf job, FileSystem fs, Path txMtdDir, TfUtils agents) throws IOException {
-		if ( _binList == null )
+		if( !isApplicable() )
 			return;
 		
 		if(fs.isDirectory(txMtdDir)) {
-			for(int i=0; i<_binList.length;i++) {
-				int colID = _binList[i];
+			for(int i=0; i<_colList.length;i++) {
+				int colID = _colList[i];
 				
-				Path path = new Path( txMtdDir + "/Bin/" + agents.getName(colID) + BIN_FILE_SUFFIX);
+				Path path = new Path( txMtdDir + "/Bin/" + agents.getName(colID) + TfUtils.BIN_FILE_SUFFIX);
 				TfUtils.checkValidInputFile(fs, path, true); 
 					
 				BufferedReader br = new BufferedReader(new InputStreamReader(fs.open(path)));
@@ -300,56 +294,27 @@ public class BinAgent extends TransformationAgent {
 	 * @return
 	 */
 	@Override
-	public String[] apply(String[] words, TfUtils agents) {
-		if ( _binList == null )
+	public String[] apply(String[] words) {
+		if( !isApplicable() )
 			return words;
 	
-		for(int i=0; i < _binList.length; i++) {
-			int colID = _binList[i];
-			
+		for(int i=0; i < _colList.length; i++) {
+			int colID = _colList[i];
 			try {
-			double val = UtilFunctions.parseToDouble(words[colID-1]);
-			int binid = 1;
-			double tmp = _min[i] + _binWidths[i];
-			while(val > tmp && binid < _numBins[i]) {
-				tmp += _binWidths[i];
-				binid++;
-			}
-			words[colID-1] = Integer.toString(binid);
-			} catch(NumberFormatException e)
-			{
+				double val = UtilFunctions.parseToDouble(words[colID-1]);
+				int binid = 1;
+				double tmp = _min[i] + _binWidths[i];
+				while(val > tmp && binid < _numBins[i]) {
+					tmp += _binWidths[i];
+					binid++;
+				}
+				words[colID-1] = Integer.toString(binid);
+			} 
+			catch(NumberFormatException e) {
 				throw new RuntimeException("Encountered \"" + words[colID-1] + "\" in column ID \"" + colID + "\", when expecting a numeric value. Consider adding \"" + words[colID-1] + "\" to na.strings, along with an appropriate imputation method.");
 			}
 		}
 		
 		return words;
 	}
-	
-	/**
-	 * Check if the given column ID is subjected to this transformation.
-	 * 
-	 */
-	public int isBinned(int colID)
-	{
-		if(_binList == null)
-			return -1;
-		
-		int idx = Arrays.binarySearch(_binList, colID);
-		return ( idx >= 0 ? idx : -1);
-	}
-
-
-	@Override
-	public void print() {
-		System.out.print("Binning List (Equi-width): \n    ");
-		for(int i : _binList) {
-			System.out.print(i + " ");
-		}
-		System.out.print("\n    ");
-		for(int b : _numBins) {
-			System.out.print(b + " ");
-		}
-		System.out.println();
-	}
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/DataTransform.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/DataTransform.java b/src/main/java/org/apache/sysml/runtime/transform/DataTransform.java
index 16f6228..a88923f 100644
--- a/src/main/java/org/apache/sysml/runtime/transform/DataTransform.java
+++ b/src/main/java/org/apache/sysml/runtime/transform/DataTransform.java
@@ -78,7 +78,6 @@ import org.apache.sysml.runtime.matrix.data.InputInfo;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.OutputInfo;
 import org.apache.sysml.runtime.matrix.mapred.MRJobConfiguration;
-import org.apache.sysml.runtime.transform.TransformationAgent.TX_METHOD;
 import org.apache.sysml.runtime.util.MapReduceTool;
 import org.apache.sysml.runtime.util.UtilFunctions;
 import org.apache.sysml.utils.JSONHelper;
@@ -237,8 +236,8 @@ public class DataTransform
 		
 		// --------------------------------------------------------------------------
 		// Omit
-		if( inputSpec.containsKey(TX_METHOD.OMIT.toString()) ) {
-			JSONArray arrtmp = (JSONArray) inputSpec.get(TX_METHOD.OMIT.toString());
+		if( inputSpec.containsKey(TfUtils.TXMETHOD_OMIT) ) {
+			JSONArray arrtmp = (JSONArray) inputSpec.get(TfUtils.TXMETHOD_OMIT);
 			omitList = new int[arrtmp.size()];
 			for(int i=0; i<arrtmp.size(); i++) {
 				if(byPositions)
@@ -254,8 +253,8 @@ public class DataTransform
 			omitList = null;
 		// --------------------------------------------------------------------------
 		// Missing value imputation
-		if( inputSpec.containsKey(TX_METHOD.IMPUTE.toString()) ) {
-			JSONArray arrtmp = (JSONArray) inputSpec.get(TX_METHOD.IMPUTE.toString());
+		if( inputSpec.containsKey(TfUtils.TXMETHOD_IMPUTE) ) {
+			JSONArray arrtmp = (JSONArray) inputSpec.get(TfUtils.TXMETHOD_IMPUTE);
 			
 			mvList = new int[arrtmp.size()];
 			mvMethods = new byte[arrtmp.size()];
@@ -306,8 +305,8 @@ public class DataTransform
 			mvList = null;
 		// --------------------------------------------------------------------------
 		// Recoding
-		if( inputSpec.containsKey(TX_METHOD.RECODE.toString()) ) {
-			JSONArray arrtmp = (JSONArray) inputSpec.get(TX_METHOD.RECODE.toString());
+		if( inputSpec.containsKey(TfUtils.TXMETHOD_RECODE) ) {
+			JSONArray arrtmp = (JSONArray) inputSpec.get(TfUtils.TXMETHOD_RECODE);
 			rcdList = new int[arrtmp.size()];
 			for(int i=0; i<arrtmp.size(); i++) {
 				if (byPositions)
@@ -323,8 +322,8 @@ public class DataTransform
 			rcdList = null;
 		// --------------------------------------------------------------------------
 		// Binning
-		if( inputSpec.containsKey(TX_METHOD.BIN.toString()) ) {
-			JSONArray arrtmp = (JSONArray) inputSpec.get(TX_METHOD.BIN.toString());
+		if( inputSpec.containsKey(TfUtils.TXMETHOD_BIN) ) {
+			JSONArray arrtmp = (JSONArray) inputSpec.get(TfUtils.TXMETHOD_BIN);
 			
 			binList = new int[arrtmp.size()];
 			binMethods = new byte[arrtmp.size()];
@@ -349,7 +348,7 @@ public class DataTransform
 					throw new IOException("Unknown missing value imputation method (" + stmp + ") in transformation specification: " + specWithNames);
 				binMethods[i] = btmp;
 				
-				numBins[i] = entry.get(TransformationAgent.JSON_NBINS);
+				numBins[i] = entry.get(TfUtils.JSON_NBINS);
 				if ( ((Integer) numBins[i]).intValue() <= 1 ) 
 					throw new IllegalArgumentException("Invalid transformation on column \"" + (String) entry.get(NAME) + "\". Number of bins must be greater than 1.");
 			}
@@ -371,8 +370,8 @@ public class DataTransform
 			binList = null;
 		// --------------------------------------------------------------------------
 		// Dummycoding
-		if( inputSpec.containsKey(TX_METHOD.DUMMYCODE.toString()) ) {
-			JSONArray arrtmp = (JSONArray) inputSpec.get(TX_METHOD.DUMMYCODE.toString());
+		if( inputSpec.containsKey(TfUtils.TXMETHOD_DUMMYCODE) ) {
+			JSONArray arrtmp = (JSONArray) inputSpec.get(TfUtils.TXMETHOD_DUMMYCODE);
 			dcdList = new int[arrtmp.size()];
 			for(int i=0; i<arrtmp.size(); i++) {
 				if (byPositions)
@@ -388,8 +387,8 @@ public class DataTransform
 			dcdList = null;
 		// --------------------------------------------------------------------------
 		// Scaling
-		if(inputSpec.containsKey(TX_METHOD.SCALE.toString()) ) {
-			JSONArray arrtmp = (JSONArray) inputSpec.get(TX_METHOD.SCALE.toString());
+		if(inputSpec.containsKey(TfUtils.TXMETHOD_SCALE) ) {
+			JSONArray arrtmp = (JSONArray) inputSpec.get(TfUtils.TXMETHOD_SCALE);
 			
 			scaleList = new int[arrtmp.size()];
 			scaleMethods = new byte[arrtmp.size()];
@@ -535,55 +534,55 @@ public class DataTransform
 		if (omitList != null)
 		{
 			JSONObject rcdSpec = new JSONObject();
-			rcdSpec.put(TransformationAgent.JSON_ATTRS, toJSONArray(omitList));
-			outputSpec.put(TX_METHOD.OMIT.toString(), rcdSpec);
+			rcdSpec.put(TfUtils.JSON_ATTRS, toJSONArray(omitList));
+			outputSpec.put(TfUtils.TXMETHOD_OMIT, rcdSpec);
 		}
 		
 		if (mvList != null)
 		{
 			JSONObject mvSpec = new JSONObject();
-			mvSpec.put(TransformationAgent.JSON_ATTRS, toJSONArray(mvList));
-			mvSpec.put(TransformationAgent.JSON_MTHD, toJSONArray(mvMethods));
-			mvSpec.put(TransformationAgent.JSON_CONSTS, toJSONArray(mvConstants));
-			outputSpec.put(TX_METHOD.IMPUTE.toString(), mvSpec);
+			mvSpec.put(TfUtils.JSON_ATTRS, toJSONArray(mvList));
+			mvSpec.put(TfUtils.JSON_MTHD, toJSONArray(mvMethods));
+			mvSpec.put(TfUtils.JSON_CONSTS, toJSONArray(mvConstants));
+			outputSpec.put(TfUtils.TXMETHOD_IMPUTE, mvSpec);
 		}
 		
 		if (rcdList != null)
 		{
 			JSONObject rcdSpec = new JSONObject();
-			rcdSpec.put(TransformationAgent.JSON_ATTRS, toJSONArray(rcdList));
-			outputSpec.put(TX_METHOD.RECODE.toString(), rcdSpec);
+			rcdSpec.put(TfUtils.JSON_ATTRS, toJSONArray(rcdList));
+			outputSpec.put(TfUtils.TXMETHOD_RECODE, rcdSpec);
 		}
 		
 		if (binList != null)
 		{
 			JSONObject binSpec = new JSONObject();
-			binSpec.put(TransformationAgent.JSON_ATTRS, toJSONArray(binList));
-			binSpec.put(TransformationAgent.JSON_MTHD, toJSONArray(binMethods));
-			binSpec.put(TransformationAgent.JSON_NBINS, toJSONArray(numBins));
-			outputSpec.put(TX_METHOD.BIN.toString(), binSpec);
+			binSpec.put(TfUtils.JSON_ATTRS, toJSONArray(binList));
+			binSpec.put(TfUtils.JSON_MTHD, toJSONArray(binMethods));
+			binSpec.put(TfUtils.JSON_NBINS, toJSONArray(numBins));
+			outputSpec.put(TfUtils.TXMETHOD_BIN, binSpec);
 		}
 		
 		if (dcdList != null)
 		{
 			JSONObject dcdSpec = new JSONObject();
-			dcdSpec.put(TransformationAgent.JSON_ATTRS, toJSONArray(dcdList));
-			outputSpec.put(TX_METHOD.DUMMYCODE.toString(), dcdSpec);
+			dcdSpec.put(TfUtils.JSON_ATTRS, toJSONArray(dcdList));
+			outputSpec.put(TfUtils.TXMETHOD_DUMMYCODE, dcdSpec);
 		}
 		
 		if (scaleList != null)
 		{
 			JSONObject scaleSpec = new JSONObject();
-			scaleSpec.put(TransformationAgent.JSON_ATTRS, toJSONArray(scaleList));
-			scaleSpec.put(TransformationAgent.JSON_MTHD, toJSONArray(scaleMethods));
-			outputSpec.put(TX_METHOD.SCALE.toString(), scaleSpec);
+			scaleSpec.put(TfUtils.JSON_ATTRS, toJSONArray(scaleList));
+			scaleSpec.put(TfUtils.JSON_MTHD, toJSONArray(scaleMethods));
+			outputSpec.put(TfUtils.TXMETHOD_SCALE, scaleSpec);
 		}
 		
 		if (mvrcdList != null)
 		{
 			JSONObject mvrcd = new JSONObject();
-			mvrcd.put(TransformationAgent.JSON_ATTRS, toJSONArray(mvrcdList));
-			outputSpec.put(TX_METHOD.MVRCD.toString(), mvrcd);
+			mvrcd.put(TfUtils.JSON_ATTRS, toJSONArray(mvrcdList));
+			outputSpec.put(TfUtils.TXMETHOD_MVRCD, mvrcd);
 		}
 		
 		// return output spec with IDs
@@ -635,11 +634,11 @@ public class DataTransform
 		MapReduceTool.renameFileOnHDFS(tmpPath + "/" + TfUtils.TXMTD_DC_COLNAMES, txMtdPath + "/" + TfUtils.TXMTD_DC_COLNAMES);
 		MapReduceTool.renameFileOnHDFS(tmpPath + "/" + TfUtils.TXMTD_COLTYPES, txMtdPath + "/" + TfUtils.TXMTD_COLTYPES);
 		
-		if ( fs.exists(new Path(tmpPath +"/Dummycode/" + TransformationAgent.DCD_FILE_NAME)) ) 
+		if ( fs.exists(new Path(tmpPath +"/Dummycode/" + TfUtils.DCD_FILE_NAME)) ) 
 		{
 			if ( !fs.exists( new Path(txMtdPath + "/Dummycode/") )) 
 				fs.mkdirs(new Path(txMtdPath + "/Dummycode/"));
-			MapReduceTool.renameFileOnHDFS( tmpPath + "/Dummycode/" + TransformationAgent.DCD_FILE_NAME, txMtdPath + "/Dummycode/" + TransformationAgent.DCD_FILE_NAME);
+			MapReduceTool.renameFileOnHDFS( tmpPath + "/Dummycode/" + TfUtils.DCD_FILE_NAME, txMtdPath + "/Dummycode/" + TfUtils.DCD_FILE_NAME);
 		}
 	}
 	
@@ -666,17 +665,17 @@ public class DataTransform
 		br.close();
 		
 		// fetch relevant attribute lists
-		if ( !spec.containsKey(TX_METHOD.DUMMYCODE.toString()) )
+		if ( !spec.containsKey(TfUtils.TXMETHOD_DUMMYCODE) )
 			return ret;
 		
-		JSONArray dcdList = (JSONArray) ((JSONObject)spec.get(TX_METHOD.DUMMYCODE.toString())).get(TransformationAgent.JSON_ATTRS);
+		JSONArray dcdList = (JSONArray) ((JSONObject)spec.get(TfUtils.TXMETHOD_DUMMYCODE)).get(TfUtils.JSON_ATTRS);
 
 		// look for numBins among binned columns
 		for(Object o : dcdList) 
 		{
 			int id = UtilFunctions.toInt(o);
 			
-			Path binpath = new Path( tfMtdPath + "/Bin/" + UtilFunctions.unquote(columnNames[id-1]) + TransformationAgent.BIN_FILE_SUFFIX);
+			Path binpath = new Path( tfMtdPath + "/Bin/" + UtilFunctions.unquote(columnNames[id-1]) + TfUtils.BIN_FILE_SUFFIX);
 			Path rcdpath = new Path( tfMtdPath + "/Recode/" + UtilFunctions.unquote(columnNames[id-1]) + TfUtils.TXMTD_RCD_DISTINCT_SUFFIX);
 			
 			if ( TfUtils.checkValidInputFile(fs, binpath, false ) )
@@ -1063,7 +1062,7 @@ public class DataTransform
 			ret = new MatrixBlock(input.getNumRows(), input.getNumColumns(), false);
 			Iterator<String[]> iter = input.getStringRowIterator();
 			for( int i=0; iter.hasNext(); i++ ) {
-				String[] tmp = agents.apply(iter.next(), true);
+				String[] tmp = agents.apply(iter.next());
 				for( int j=0; j<tmp.length; j++ )
 					ret.appendValue(i, j, UtilFunctions.parseToDouble(tmp[j]));
 			}
@@ -1227,7 +1226,7 @@ public class DataTransform
 			_ba.loadTxMtd(job, fs, tmp, agents);
 			
 			_da.setRecodeMapsCP( _ra.getCPRecodeMaps() );
-			_da.setNumBins(_ba.getBinList(), _ba.getNumBins());
+			_da.setNumBins(_ba.getColList(), _ba.getNumBins());
 			_da.loadTxMtd(job, fs, tmp, agents);
 		}
 		else {
@@ -1247,7 +1246,7 @@ public class DataTransform
 			_ba.loadTxMtd(job, fs, tmp, agents);
 			
 			_da.setRecodeMaps( _ra.getRecodeMaps() );
-			_da.setNumBins(_ba.getBinList(), _ba.getNumBins());
+			_da.setNumBins(_ba.getColList(), _ba.getNumBins());
 			_da.loadTxMtd(job, fs, tmp, agents);
 		}
 		
@@ -1296,7 +1295,7 @@ public class DataTransform
 
 				if(!agents.omit(words))
 				{
-					words = agents.apply(words, !isApply);
+					words = agents.apply(words);
 	
 					if (isCSV)
 					{

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/DistinctValue.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/DistinctValue.java b/src/main/java/org/apache/sysml/runtime/transform/DistinctValue.java
index 2e52657..c35e160 100644
--- a/src/main/java/org/apache/sysml/runtime/transform/DistinctValue.java
+++ b/src/main/java/org/apache/sysml/runtime/transform/DistinctValue.java
@@ -59,8 +59,7 @@ public class DistinctValue implements Writable, Serializable {
 		_count = count;
 	}
 	
-	public DistinctValue(OffsetCount oc) throws CharacterCodingException 
-	{
+	public DistinctValue(OffsetCount oc) throws CharacterCodingException {
 		this(oc.filename + "," + oc.fileOffset, oc.count);
 	}
 	
@@ -70,8 +69,13 @@ public class DistinctValue implements Writable, Serializable {
 		_count = -1;
 	}
 	
-	public String getWord() {  return new String( _bytes, 0, _length, Charset.forName("UTF-8") ); }
-	public long getCount() { return _count; }
+	public String getWord() {  
+		return new String( _bytes, 0, _length, Charset.forName("UTF-8") ); 
+	}
+	
+	public long getCount() { 
+		return _count; 
+	}
 	
 	@Override
 	public void write(DataOutput out) throws IOException {
@@ -85,24 +89,17 @@ public class DistinctValue implements Writable, Serializable {
 	@Override
 	public void readFields(DataInput in) throws IOException {
 	    // read word 
-		int newLength = WritableUtils.readVInt(in);
-	    _bytes = new byte[newLength];
-	    in.readFully(_bytes, 0, newLength);
-	    _length = newLength;
-	    if (_length != _bytes.length)
-	    	System.out.println("ERROR in DistinctValue.readFields()");
+		_length = WritableUtils.readVInt(in);
+	    _bytes = new byte[_length];
+	    in.readFully(_bytes, 0, _length);
 	    // read count
 	    _count = in.readLong();
 	}
 	
 	public OffsetCount getOffsetCount() {
-		OffsetCount oc = new OffsetCount();
 		String[] parts = getWord().split(",");
-		oc.filename = parts[0];
-		oc.fileOffset = UtilFunctions.parseToLong(parts[1]);
-		oc.count = getCount();
-		
-		return oc;
+		return new OffsetCount( parts[0],
+				UtilFunctions.parseToLong(parts[1]),
+				getCount() );
 	}
-	
 }

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/DummycodeAgent.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/DummycodeAgent.java b/src/main/java/org/apache/sysml/runtime/transform/DummycodeAgent.java
index e623ab5..9ceb368 100644
--- a/src/main/java/org/apache/sysml/runtime/transform/DummycodeAgent.java
+++ b/src/main/java/org/apache/sysml/runtime/transform/DummycodeAgent.java
@@ -41,13 +41,13 @@ import org.apache.wink.json4j.JSONObject;
 import com.google.common.base.Functions;
 import com.google.common.collect.Ordering;
 
+import org.apache.sysml.runtime.transform.encode.Encoder;
 import org.apache.sysml.runtime.util.UtilFunctions;
 
-public class DummycodeAgent extends TransformationAgent {	
-	
+public class DummycodeAgent extends Encoder 
+{		
 	private static final long serialVersionUID = 5832130477659116489L;
 
-	private int[] _dcdList = null;
 	private long numCols = 0;
 	
 	private HashMap<Integer, HashMap<String,String>> _finalMaps = null;
@@ -59,26 +59,18 @@ public class DummycodeAgent extends TransformationAgent {
 	private int[] _dcdColumnMap = null;			// to help in translating between original and dummycoded column IDs
 	private long _dummycodedLength = 0;			// #of columns after dummycoded
 	
-	DummycodeAgent(int[] list) {
-		_dcdList = list;
+	public DummycodeAgent(int[] list) {
+		super(list);
 	}
 	
-	DummycodeAgent(JSONObject parsedSpec, long ncol) throws JSONException {
+	public DummycodeAgent(JSONObject parsedSpec, long ncol) throws JSONException {
+		super(null);
 		numCols = ncol;
 		
-		if ( !parsedSpec.containsKey(TX_METHOD.DUMMYCODE.toString()) )
-			return;
-		
-		JSONObject obj = (JSONObject) parsedSpec.get(TX_METHOD.DUMMYCODE.toString());
-		JSONArray attrs = (JSONArray) obj.get(JSON_ATTRS);
-			
-		_dcdList = new int[attrs.size()];
-		for(int i=0; i < _dcdList.length; i++) 
-			_dcdList[i] = UtilFunctions.toInt(attrs.get(i));
-	}
-	
-	public int[] dcdList() {
-		return _dcdList;
+		if ( !parsedSpec.containsKey(TfUtils.TXMETHOD_DUMMYCODE) )
+			return;		
+		JSONObject obj = (JSONObject) parsedSpec.get(TfUtils.TXMETHOD_DUMMYCODE);
+		initColList( (JSONArray)obj.get(TfUtils.JSON_ATTRS) );	
 	}
 	
 	/**
@@ -137,26 +129,26 @@ public class DummycodeAgent extends TransformationAgent {
 	public int genDcdMapsAndColTypes(FileSystem fs, String txMtdDir, int numCols, TfUtils agents) throws IOException {
 		
 		// initialize all column types in the transformed data to SCALE
-		ColumnTypes[] ctypes = new ColumnTypes[(int) _dummycodedLength];
+		TfUtils.ColumnTypes[] ctypes = new TfUtils.ColumnTypes[(int) _dummycodedLength];
 		for(int i=0; i < _dummycodedLength; i++)
-			ctypes[i] = ColumnTypes.SCALE;
+			ctypes[i] = TfUtils.ColumnTypes.SCALE;
 		
 		_dcdColumnMap = new int[numCols];
 
-		Path pt=new Path(txMtdDir+"/Dummycode/" + DCD_FILE_NAME);
+		Path pt=new Path(txMtdDir+"/Dummycode/" + TfUtils.DCD_FILE_NAME);
 		BufferedWriter br=new BufferedWriter(new OutputStreamWriter(fs.create(pt,true)));
 		
 		int sum=1;
 		int idx = 0;
 		for(int colID=1; colID <= numCols; colID++) 
 		{
-			if ( _dcdList != null && idx < _dcdList.length && _dcdList[idx] == colID )
+			if ( _colList != null && idx < _colList.length && _colList[idx] == colID )
 			{
 				br.write(colID + TfUtils.TXMTD_SEP + "1" + TfUtils.TXMTD_SEP + sum + TfUtils.TXMTD_SEP + (sum+_domainSizes[idx]-1) + "\n");
 				_dcdColumnMap[colID-1] = (sum+_domainSizes[idx]-1)-1;
 
 				for(int i=sum; i <=(sum+_domainSizes[idx]-1); i++)
-					ctypes[i-1] = ColumnTypes.DUMMYCODED;
+					ctypes[i-1] = TfUtils.ColumnTypes.DUMMYCODED;
 				
 				sum += _domainSizes[idx];
 				idx++;
@@ -166,11 +158,11 @@ public class DummycodeAgent extends TransformationAgent {
 				br.write(colID + TfUtils.TXMTD_SEP + "0" + TfUtils.TXMTD_SEP + sum + TfUtils.TXMTD_SEP + sum + "\n");
 				_dcdColumnMap[colID-1] = sum-1;
 				
-				if ( agents.getBinAgent().isBinned(colID) != -1 )
-					ctypes[sum-1] = ColumnTypes.ORDINAL;	// binned variable results in an ordinal column
+				if ( agents.getBinAgent().isApplicable(colID) != -1 )
+					ctypes[sum-1] = TfUtils.ColumnTypes.ORDINAL;	// binned variable results in an ordinal column
 				
-				if ( agents.getRecodeAgent().isRecoded(colID) != -1 )
-					ctypes[sum-1] = ColumnTypes.NOMINAL;
+				if ( agents.getRecodeAgent().isApplicable(colID) != -1 )
+					ctypes[sum-1] = TfUtils.ColumnTypes.NOMINAL;
 				
 				sum += 1;
 			}
@@ -181,9 +173,9 @@ public class DummycodeAgent extends TransformationAgent {
 		pt=new Path(txMtdDir + File.separator + TfUtils.TXMTD_COLTYPES);
 		br=new BufferedWriter(new OutputStreamWriter(fs.create(pt,true)));
 		
-		br.write(columnTypeToID(ctypes[0]) + "");
+		br.write(ctypes[0].toID() + "");
 		for(int i = 1; i < _dummycodedLength; i++) 
-			br.write( TfUtils.TXMTD_SEP + columnTypeToID(ctypes[i]));
+			br.write( TfUtils.TXMTD_SEP + ctypes[i].toID() );
 		br.close();
 		
 		return sum-1;
@@ -211,7 +203,7 @@ public class DummycodeAgent extends TransformationAgent {
 	
 	public String constructDummycodedHeader(String header, Pattern delim) {
 		
-		if(_dcdList == null && _binList == null )
+		if(_colList == null && _binList == null )
 			// none of the columns are dummycoded, simply return the given header
 			return header;
 		
@@ -223,11 +215,11 @@ public class DummycodeAgent extends TransformationAgent {
 		// Dummycoding can be performed on either on a recoded column or on a binned column
 		
 		// process recoded columns
-		if(_finalMapsCP != null && _dcdList != null) 
+		if(_finalMapsCP != null && _colList != null) 
 		{
-			for(int i=0; i <_dcdList.length; i++) 
+			for(int i=0; i <_colList.length; i++) 
 			{
-				int colID = _dcdList[i];
+				int colID = _colList[i];
 				HashMap<String,Long> map = _finalMapsCP.get(colID);
 				String colName = UtilFunctions.unquote(names[colID-1]);
 				
@@ -242,17 +234,17 @@ public class DummycodeAgent extends TransformationAgent {
 					for(int idx=0; idx < newNames.size(); idx++) 
 					{
 						if(idx==0) 
-							sb.append( colName + DCD_NAME_SEP + newNames.get(idx));
+							sb.append( colName + TfUtils.DCD_NAME_SEP + newNames.get(idx));
 						else
-							sb.append( delim + colName + DCD_NAME_SEP + newNames.get(idx));
+							sb.append( delim + colName + TfUtils.DCD_NAME_SEP + newNames.get(idx));
 					}
 					names[colID-1] = sb.toString();			// replace original column name with dcd name
 				}
 			}
 		}
-		else if(_finalMaps != null && _dcdList != null) {
-			for(int i=0; i <_dcdList.length; i++) {
-				int colID = _dcdList[i];
+		else if(_finalMaps != null && _colList != null) {
+			for(int i=0; i <_colList.length; i++) {
+				int colID = _colList[i];
 				HashMap<String,String> map = _finalMaps.get(colID);
 				String colName = UtilFunctions.unquote(names[colID-1]);
 				
@@ -272,9 +264,9 @@ public class DummycodeAgent extends TransformationAgent {
 					for(int idx=0; idx < newNames.size(); idx++) 
 					{
 						if(idx==0) 
-							sb.append( colName + DCD_NAME_SEP + newNames.get(idx));
+							sb.append( colName + TfUtils.DCD_NAME_SEP + newNames.get(idx));
 						else
-							sb.append( delim + colName + DCD_NAME_SEP + newNames.get(idx));
+							sb.append( delim + colName + TfUtils.DCD_NAME_SEP + newNames.get(idx));
 					}
 					names[colID-1] = sb.toString();			// replace original column name with dcd name
 				}
@@ -288,7 +280,7 @@ public class DummycodeAgent extends TransformationAgent {
 				int colID = _binList[i];
 				
 				// need to consider only binned and dummycoded columns
-				if(isDummyCoded(colID) == -1)
+				if(isApplicable(colID) == -1)
 					continue;
 				
 				int numBins = _numBins[i];
@@ -297,9 +289,9 @@ public class DummycodeAgent extends TransformationAgent {
 				sb.setLength(0);
 				for(int idx=0; idx < numBins; idx++) 
 					if(idx==0) 
-						sb.append( colName + DCD_NAME_SEP + "Bin" + (idx+1) );
+						sb.append( colName + TfUtils.DCD_NAME_SEP + "Bin" + (idx+1) );
 					else
-						sb.append( delim + colName + DCD_NAME_SEP + "Bin" + (idx+1) );
+						sb.append( delim + colName + TfUtils.DCD_NAME_SEP + "Bin" + (idx+1) );
 				names[colID-1] = sb.toString();			// replace original column name with dcd name
 			}
 		
@@ -319,21 +311,20 @@ public class DummycodeAgent extends TransformationAgent {
 	
 	@Override
 	public void loadTxMtd(JobConf job, FileSystem fs, Path txMtdDir, TfUtils agents) throws IOException {
-		if ( _dcdList == null )
-		{
+		if ( !isApplicable() ) {
 			_dummycodedLength = numCols;
 			return;
 		}
 		
 		// sort to-be dummycoded column IDs in ascending order. This is the order in which the new dummycoded record is constructed in apply() function.
-		Arrays.sort(_dcdList);	
-		_domainSizes = new int[_dcdList.length];
+		Arrays.sort(_colList);	
+		_domainSizes = new int[_colList.length];
 
 		_dummycodedLength = numCols;
 		
 		//HashMap<String, String> map = null;
-		for(int i=0; i<_dcdList.length; i++) {
-			int colID = _dcdList[i];
+		for(int i=0; i<_colList.length; i++) {
+			int colID = _colList[i];
 			
 			// Find the domain size for colID using _finalMaps or _finalMapsCP
 			int domainSize = 0;
@@ -372,26 +363,26 @@ public class DummycodeAgent extends TransformationAgent {
 	 * @return
 	 */
 	@Override
-	public String[] apply(String[] words, TfUtils agents) {
-		
-		if ( _dcdList == null )
+	public String[] apply(String[] words) 
+	{
+		if( !isApplicable() )
 			return words;
 		
 		String[] nwords = new String[(int)_dummycodedLength];
-		
 		int rcdVal = 0;
 		
 		for(int colID=1, idx=0, ncolID=1; colID <= words.length; colID++) {
-			if(idx < _dcdList.length && colID==_dcdList[idx]) {
+			if(idx < _colList.length && colID==_colList[idx]) {
 				// dummycoded columns
 				try {
-				rcdVal = UtilFunctions.parseToInt(UtilFunctions.unquote(words[colID-1]));
-				nwords[ ncolID-1+rcdVal-1 ] = "1";
-				ncolID += _domainSizes[idx];
-				idx++;
-				} catch (Exception e) {
-					System.out.println("Error in dummycoding: colID="+colID + ", rcdVal=" + rcdVal+", word="+words[colID-1] + ", domainSize=" + _domainSizes[idx] + ", dummyCodedLength=" + _dummycodedLength);
-					throw new RuntimeException(e);
+					rcdVal = UtilFunctions.parseToInt(UtilFunctions.unquote(words[colID-1]));
+					nwords[ ncolID-1+rcdVal-1 ] = "1";
+					ncolID += _domainSizes[idx];
+					idx++;
+				} 
+				catch (Exception e) {
+					throw new RuntimeException("Error in dummycoding: colID="+colID + ", rcdVal=" + rcdVal+", word="+words[colID-1] 
+							+ ", domainSize=" + _domainSizes[idx] + ", dummyCodedLength=" + _dummycodedLength);
 				}
 			}
 			else {
@@ -402,27 +393,4 @@ public class DummycodeAgent extends TransformationAgent {
 		
 		return nwords;
 	}
-	
-	/**
-	 * Check if the given column ID is subjected to this transformation.
-	 * 
-	 */
-	public int isDummyCoded(int colID)
-	{
-		if(_dcdList == null)
-			return -1;
-		
-		int idx = Arrays.binarySearch(_dcdList, colID);
-		return ( idx >= 0 ? idx : -1);
-	}
-	
-	@Override
-	public void print() {
-		System.out.print("Dummycoding List: \n    ");
-		for(int i : _dcdList) {
-			System.out.print(i + " ");
-		}
-		System.out.println();
-	}
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/MVImputeAgent.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/MVImputeAgent.java b/src/main/java/org/apache/sysml/runtime/transform/MVImputeAgent.java
index 9763403..5cadef6 100644
--- a/src/main/java/org/apache/sysml/runtime/transform/MVImputeAgent.java
+++ b/src/main/java/org/apache/sysml/runtime/transform/MVImputeAgent.java
@@ -26,7 +26,6 @@ import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.nio.charset.CharacterCodingException;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.BitSet;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -50,10 +49,11 @@ import org.apache.sysml.runtime.instructions.cp.CM_COV_Object;
 import org.apache.sysml.runtime.instructions.cp.KahanObject;
 import org.apache.sysml.runtime.matrix.operators.CMOperator;
 import org.apache.sysml.runtime.matrix.operators.CMOperator.AggregateOperationTypes;
+import org.apache.sysml.runtime.transform.encode.Encoder;
 import org.apache.sysml.runtime.util.UtilFunctions;
 
-public class MVImputeAgent extends TransformationAgent {
-	
+public class MVImputeAgent extends Encoder 
+{	
 	private static final long serialVersionUID = 9057868620144662194L;
 
 	public static final String MEAN_PREFIX = "mean";
@@ -65,7 +65,6 @@ public class MVImputeAgent extends TransformationAgent {
 	
 	public enum MVMethod { INVALID, GLOBAL_MEAN, GLOBAL_MODE, CONSTANT };
 	
-	private int[] _mvList = null;
 	/* 
 	 * Imputation Methods:
 	 * 1 - global_mean
@@ -94,6 +93,8 @@ public class MVImputeAgent extends TransformationAgent {
 	private CM_COV_Object[] _scnomvVarList = null;		// column-level variances, computed so far
 	
 	private String[] _replacementList = null;		// replacements: for global_mean, mean; and for global_mode, recode id of mode category
+	private String[] _NAstrings = null;
+	
 	
 	public String[] getReplacements() { return _replacementList; }
 	public KahanObject[] getMeans()   { return _meanList; }
@@ -101,46 +102,47 @@ public class MVImputeAgent extends TransformationAgent {
 	public KahanObject[] getMeans_scnomv()   { return _scnomvMeanList; }
 	public CM_COV_Object[] getVars_scnomv()  { return _scnomvVarList; }
 	
-	MVImputeAgent(JSONObject parsedSpec) throws JSONException {
-	
-		boolean isMV = parsedSpec.containsKey(TX_METHOD.IMPUTE.toString());
-		boolean isSC = parsedSpec.containsKey(TX_METHOD.SCALE.toString());
+	public MVImputeAgent(JSONObject parsedSpec, String[] NAstrings)
+		throws JSONException 
+	{
+		super(null);	
+		boolean isMV = parsedSpec.containsKey(TfUtils.TXMETHOD_IMPUTE);
+		boolean isSC = parsedSpec.containsKey(TfUtils.TXMETHOD_SCALE);		
+		_NAstrings = NAstrings;
 		
 		if(!isMV) {
 			// MV Impute is not applicable
-			_mvList = null;
+			_colList = null;
 			_mvMethodList = null;
 			_meanList = null;
 			_countList = null;
 			_replacementList = null;
 		}
 		else {
-			JSONObject mvobj = (JSONObject) parsedSpec.get(TX_METHOD.IMPUTE.toString());
-			JSONArray mvattrs = (JSONArray) mvobj.get(JSON_ATTRS);
-			JSONArray mvmthds = (JSONArray) mvobj.get(JSON_MTHD);
+			JSONObject mvobj = (JSONObject) parsedSpec.get(TfUtils.TXMETHOD_IMPUTE);
+			JSONArray mvattrs = (JSONArray) mvobj.get(TfUtils.JSON_ATTRS);
+			JSONArray mvmthds = (JSONArray) mvobj.get(TfUtils.JSON_MTHD);
 			int mvLength = mvattrs.size();
 			
-			assert(mvLength == mvmthds.size());
-			
-			_mvList = new int[mvLength];
+			_colList = new int[mvLength];
 			_mvMethodList = new byte[mvLength];
 			
 			_meanList = new KahanObject[mvLength];
 			_countList = new long[mvLength];
 			_varList = new CM_COV_Object[mvLength];
 			
-			_isMVScaled = new BitSet(_mvList.length);
+			_isMVScaled = new BitSet(_colList.length);
 			_isMVScaled.clear();
 			
-			for(int i=0; i < _mvList.length; i++) {
-				_mvList[i] = UtilFunctions.toInt(mvattrs.get(i));
+			for(int i=0; i < _colList.length; i++) {
+				_colList[i] = UtilFunctions.toInt(mvattrs.get(i));
 				_mvMethodList[i] = (byte) UtilFunctions.toInt(mvmthds.get(i)); 
 				_meanList[i] = new KahanObject(0, 0);
 			}
 			
 			_replacementList = new String[mvLength]; 	// contains replacements for all columns (scale and categorical)
 			
-			JSONArray constants = (JSONArray)mvobj.get(JSON_CONSTS);
+			JSONArray constants = (JSONArray)mvobj.get(TfUtils.JSON_CONSTS);
 			for(int i=0; i < constants.size(); i++) {
 				if ( constants.get(i) == null )
 					_replacementList[i] = "NaN";
@@ -159,12 +161,12 @@ public class MVImputeAgent extends TransformationAgent {
 		}
 		else
 		{
-			if ( _mvList != null ) 
-				_mvscMethodList = new byte[_mvList.length];
+			if ( _colList != null ) 
+				_mvscMethodList = new byte[_colList.length];
 			
-			JSONObject scobj = (JSONObject) parsedSpec.get(TX_METHOD.SCALE.toString());
-			JSONArray scattrs = (JSONArray) scobj.get(JSON_ATTRS);
-			JSONArray scmthds = (JSONArray) scobj.get(JSON_MTHD);
+			JSONObject scobj = (JSONObject) parsedSpec.get(TfUtils.TXMETHOD_SCALE);
+			JSONArray scattrs = (JSONArray) scobj.get(TfUtils.JSON_ATTRS);
+			JSONArray scmthds = (JSONArray) scobj.get(TfUtils.JSON_MTHD);
 			int scLength = scattrs.size();
 			
 			int[] _allscaled = new int[scLength];
@@ -178,7 +180,7 @@ public class MVImputeAgent extends TransformationAgent {
 				_allscaled[i] = colID;
 				
 				// check if the attribute is also MV imputed
-				int mvidx = isImputed(colID);
+				int mvidx = isApplicable(colID);
 				if(mvidx != -1)
 				{
 					_isMVScaled.set(mvidx);
@@ -203,7 +205,7 @@ public class MVImputeAgent extends TransformationAgent {
 					colID = UtilFunctions.toInt(scattrs.get(i));
 					mthd = (byte)UtilFunctions.toInt(scmthds.get(i)); 
 							
-					if(isImputed(colID) == -1)
+					if(isApplicable(colID) == -1)
 					{	// scaled but not imputed
 						_scnomvList[idx] = colID;
 						_scnomvMethodList[idx] = mthd;
@@ -216,17 +218,17 @@ public class MVImputeAgent extends TransformationAgent {
 		}
 	}
 	
-	public void prepare(String[] words, TfUtils agents) throws IOException {
+	public void prepare(String[] words) throws IOException {
 		
 		try {
 			String w = null;
-			if(_mvList != null)
-			for(int i=0; i <_mvList.length; i++) {
-				int colID = _mvList[i];
+			if(_colList != null)
+			for(int i=0; i <_colList.length; i++) {
+				int colID = _colList[i];
 				w = UtilFunctions.unquote(words[colID-1].trim());
 				
 				try {
-				if(!agents.isNA(w)) {
+				if(!TfUtils.isNA(_NAstrings, w)) {
 					_countList[i]++;
 					
 					boolean computeMean = (_mvMethodList[i] == 1 || _isMVScaled.get(i) );
@@ -421,9 +423,9 @@ public class MVImputeAgent extends TransformationAgent {
 			StringBuilder sb = new StringBuilder();
 			DistinctValue dv = null;
 			
-			if(_mvList != null)
-				for(int i=0; i < _mvList.length; i++) {
-					int colID = _mvList[i];
+			if(_colList != null)
+				for(int i=0; i < _colList.length; i++) {
+					int colID = _colList[i];
 					IntWritable iw = new IntWritable(-colID);
 					
 					dv = prepMeanOutput(taskID, i, sb, false);				outDV(iw, dv, out);
@@ -476,9 +478,9 @@ public class MVImputeAgent extends TransformationAgent {
 			StringBuilder sb = new StringBuilder();
 			DistinctValue dv = null;
 			
-			if(_mvList != null)
-				for(int i=0; i < _mvList.length; i++) {
-					int colID = _mvList[i];
+			if(_colList != null)
+				for(int i=0; i < _colList.length; i++) {
+					int colID = _colList[i];
 					Integer iw = -colID;
 					
 					dv = prepMeanOutput(taskID, i, sb, false);				addDV(iw, dv, list);
@@ -516,7 +518,7 @@ public class MVImputeAgent extends TransformationAgent {
 	
 	private void writeTfMtd(int colID, String mean, String tfMtdDir, FileSystem fs, TfUtils agents) throws IOException 
 	{
-		Path pt=new Path(tfMtdDir+"/Impute/"+ agents.getName(colID) + MV_FILE_SUFFIX);
+		Path pt=new Path(tfMtdDir+"/Impute/"+ agents.getName(colID) + TfUtils.MV_FILE_SUFFIX);
 		BufferedWriter br=new BufferedWriter(new OutputStreamWriter(fs.create(pt,true)));
 		br.write(colID + TfUtils.TXMTD_SEP + mean + "\n");
 		br.close();
@@ -524,7 +526,7 @@ public class MVImputeAgent extends TransformationAgent {
 	
 	private void writeTfMtd(int colID, String mean, String sdev, String tfMtdDir, FileSystem fs, TfUtils agents) throws IOException 
 	{
-		Path pt=new Path(tfMtdDir+"/Scale/"+ agents.getName(colID) + SCALE_FILE_SUFFIX);
+		Path pt=new Path(tfMtdDir+"/Scale/"+ agents.getName(colID) + TfUtils.SCALE_FILE_SUFFIX);
 		BufferedWriter br=new BufferedWriter(new OutputStreamWriter(fs.create(pt,true)));
 		br.write(colID + TfUtils.TXMTD_SEP + mean + TfUtils.TXMTD_SEP + sdev + "\n");
 		br.close();
@@ -532,7 +534,7 @@ public class MVImputeAgent extends TransformationAgent {
 	
 	private void writeTfMtd(int colID, String min, String max, String binwidth, String nbins, String tfMtdDir, FileSystem fs, TfUtils agents) throws IOException 
 	{
-		Path pt = new Path(tfMtdDir+"/Bin/"+ agents.getName(colID) + BIN_FILE_SUFFIX);
+		Path pt = new Path(tfMtdDir+"/Bin/"+ agents.getName(colID) + TfUtils.BIN_FILE_SUFFIX);
 		BufferedWriter br=new BufferedWriter(new OutputStreamWriter(fs.create(pt,true)));
 		br.write(colID + TfUtils.TXMTD_SEP + min + TfUtils.TXMTD_SEP + max + TfUtils.TXMTD_SEP + binwidth + TfUtils.TXMTD_SEP + nbins + "\n");
 		br.close();
@@ -541,9 +543,9 @@ public class MVImputeAgent extends TransformationAgent {
 	public void outputTransformationMetadata(String outputDir, FileSystem fs, TfUtils agents) throws IOException {
 		
 		try{
-			if (_mvList != null)
-				for(int i=0; i < _mvList.length; i++) {
-					int colID = _mvList[i];
+			if (_colList != null)
+				for(int i=0; i < _colList.length; i++) {
+					int colID = _colList[i];
 					
 					double imputedValue = Double.NaN;
 					KahanObject gmean = null;
@@ -770,11 +772,11 @@ public class MVImputeAgent extends TransformationAgent {
 		{
 			try {
 				if( totalValidCount != totalRecordCount) {
-					// In the presense of missing values, the variance needs to be adjusted.
+					// In the presence of missing values, the variance needs to be adjusted.
 					// The mean does not need to be adjusted, when mv impute method is global_mean, 
 					// since missing values themselves are replaced with gmean.
 					long totalMissingCount = (totalRecordCount-totalValidCount);
-					int idx = isImputed(colID);
+					int idx = isApplicable(colID);
 					if(idx != -1 && _mvMethodList[idx] == 3) 
 						_meanFn.execute(gmean, UtilFunctions.parseToDouble(_replacementList[idx]), totalRecordCount);
 					_varFn.execute(gcm, gmean._sum, totalMissingCount);
@@ -797,7 +799,7 @@ public class MVImputeAgent extends TransformationAgent {
 
 	private String readReplacement(int colID, FileSystem fs, Path  txMtdDir, TfUtils agents) throws IOException
 	{
-		Path path = new Path( txMtdDir + "/Impute/" + agents.getName(colID) + MV_FILE_SUFFIX);
+		Path path = new Path( txMtdDir + "/Impute/" + agents.getName(colID) + TfUtils.MV_FILE_SUFFIX);
 		TfUtils.checkValidInputFile(fs, path, true); 
 		
 		BufferedReader br = new BufferedReader(new InputStreamReader(fs.open(path)));
@@ -810,7 +812,7 @@ public class MVImputeAgent extends TransformationAgent {
 	
 	public String readScaleLine(int colID, FileSystem fs, Path txMtdDir, TfUtils agents) throws IOException
 	{
-		Path path = new Path( txMtdDir + "/Scale/" + agents.getName(colID) + SCALE_FILE_SUFFIX);
+		Path path = new Path( txMtdDir + "/Scale/" + agents.getName(colID) + TfUtils.SCALE_FILE_SUFFIX);
 		TfUtils.checkValidInputFile(fs, path, true); 
 		BufferedReader br = new BufferedReader(new InputStreamReader(fs.open(path)));
 		String line = br.readLine();
@@ -846,9 +848,9 @@ public class MVImputeAgent extends TransformationAgent {
 		if(fs.isDirectory(tfMtdDir)) {
 			
 			// Load information about missing value imputation
-			if (_mvList != null)
-				for(int i=0; i<_mvList.length;i++) {
-					int colID = _mvList[i];
+			if (_colList != null)
+				for(int i=0; i<_colList.length;i++) {
+					int colID = _colList[i];
 					
 					if ( _mvMethodList[i] == 1 || _mvMethodList[i] == 2 )
 						// global_mean or global_mode
@@ -862,10 +864,10 @@ public class MVImputeAgent extends TransformationAgent {
 				}
 			
 			// Load scaling information
-			if(_mvList != null)
-				for(int i=0; i < _mvList.length; i++)
+			if(_colList != null)
+				for(int i=0; i < _colList.length; i++)
 					if ( _isMVScaled.get(i) ) 
-						processScalingFile(i, _mvList, _meanList, _varList, fs, tfMtdDir, agents);
+						processScalingFile(i, _colList, _meanList, _varList, fs, tfMtdDir, agents);
 			
 			if(_scnomvList != null)
 				for(int i=0; i < _scnomvList.length; i++)
@@ -884,21 +886,21 @@ public class MVImputeAgent extends TransformationAgent {
 	 * @return
 	 */
 	@Override
-	public String[] apply(String[] words, TfUtils agents) {
-		
-		if ( _mvList != null)
-		for(int i=0; i < _mvList.length; i++) {
-			int colID = _mvList[i];
-			String w = UtilFunctions.unquote(words[colID-1]);
-			if(agents.isNA(w))
-				w = words[colID-1] = _replacementList[i];
-			
-			if ( _isMVScaled.get(i) )
-				if ( _mvscMethodList[i] == 1 )
-					words[colID-1] = Double.toString( UtilFunctions.parseToDouble(w) - _meanList[i]._sum );
-				else
-					words[colID-1] = Double.toString( (UtilFunctions.parseToDouble(w) - _meanList[i]._sum) / _varList[i].mean._sum );
-		}
+	public String[] apply(String[] words) 
+	{	
+		if( isApplicable() )
+			for(int i=0; i < _colList.length; i++) {
+				int colID = _colList[i];
+				String w = UtilFunctions.unquote(words[colID-1]);
+				if(TfUtils.isNA(_NAstrings, w))
+					w = words[colID-1] = _replacementList[i];
+				
+				if ( _isMVScaled.get(i) )
+					if ( _mvscMethodList[i] == 1 )
+						words[colID-1] = Double.toString( UtilFunctions.parseToDouble(w) - _meanList[i]._sum );
+					else
+						words[colID-1] = Double.toString( (UtilFunctions.parseToDouble(w) - _meanList[i]._sum) / _varList[i].mean._sum );
+			}
 		
 		if(_scnomvList != null)
 		for(int i=0; i < _scnomvList.length; i++)
@@ -913,23 +915,8 @@ public class MVImputeAgent extends TransformationAgent {
 		return words;
 	}
 	
-	/**
-	 * Check if the given column ID is subjected to this transformation.
-	 * 
-	 */
-	public int isImputed(int colID)
-	{
-		if(_mvList == null)
-			return -1;
-		
-		int idx = Arrays.binarySearch(_mvList, colID);
-		return ( idx >= 0 ? idx : -1);
-	}
-	
-	public MVMethod getMethod(int colID) 
-	{
-		int idx = isImputed(colID);
-		
+	public MVMethod getMethod(int colID) {
+		int idx = isApplicable(colID);		
 		if(idx == -1)
 			return MVMethod.INVALID;
 		
@@ -943,35 +930,13 @@ public class MVImputeAgent extends TransformationAgent {
 		
 	}
 	
-	public long getNonMVCount(int colID) 
-	{
-		int idx = isImputed(colID);
-		if(idx == -1)
-			return 0;
-		else
-			return _countList[idx];
+	public long getNonMVCount(int colID) {
+		int idx = isApplicable(colID);
+		return (idx == -1) ? 0 : _countList[idx];
 	}
 	
-	public String getReplacement(int colID) 
-	{
-		int idx = isImputed(colID);
-		
-		if(idx == -1)
-			return null;
-		else
-			return _replacementList[idx];
-	}
-	
-	public void print() {
-		System.out.print("MV Imputation List: \n    ");
-		for(int i : _mvList) {
-			System.out.print(i + " ");
-		}
-		System.out.print("\n    ");
-		for(byte b : _mvMethodList) {
-			System.out.print(b + " ");
-		}
-		System.out.println();
+	public String getReplacement(int colID)  {
+		int idx = isApplicable(colID);		
+		return (idx == -1) ? null : _replacementList[idx];
 	}
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/OmitAgent.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/OmitAgent.java b/src/main/java/org/apache/sysml/runtime/transform/OmitAgent.java
index bd2feb3..c169129 100644
--- a/src/main/java/org/apache/sysml/runtime/transform/OmitAgent.java
+++ b/src/main/java/org/apache/sysml/runtime/transform/OmitAgent.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.transform;
 
 import java.io.IOException;
-import java.util.Arrays;
 import java.util.Iterator;
 
 import org.apache.hadoop.fs.FileSystem;
@@ -31,71 +30,43 @@ import org.apache.hadoop.mapred.OutputCollector;
 import org.apache.wink.json4j.JSONArray;
 import org.apache.wink.json4j.JSONException;
 import org.apache.wink.json4j.JSONObject;
-
+import org.apache.sysml.runtime.transform.encode.Encoder;
 import org.apache.sysml.runtime.util.UtilFunctions;
 
-public class OmitAgent extends TransformationAgent {
-	
+public class OmitAgent extends Encoder 
+{	
 	private static final long serialVersionUID = 1978852120416654195L;
 
-	private int[] _omitList = null;
-
-	OmitAgent() { }
+	public OmitAgent() { 
+		super(null);
+	}
 	
-	OmitAgent(int[] list) {
-		_omitList = list;
+	public OmitAgent(int[] list) {
+		super(list);
 	}
 	
-	public OmitAgent(JSONObject parsedSpec) throws JSONException {
-		if (!parsedSpec.containsKey(TX_METHOD.OMIT.toString()))
+	public OmitAgent(JSONObject parsedSpec) 
+		throws JSONException 
+	{
+		super(null);
+		if (!parsedSpec.containsKey(TfUtils.TXMETHOD_OMIT))
 			return;
-		JSONObject obj = (JSONObject) parsedSpec.get(TX_METHOD.OMIT.toString());
-		JSONArray attrs = (JSONArray) obj.get(JSON_ATTRS);
-		
-		_omitList = new int[attrs.size()];
-		for(int i=0; i < _omitList.length; i++) 
-			_omitList[i] = UtilFunctions.toInt(attrs.get(i));
+		JSONObject obj = (JSONObject) parsedSpec.get(TfUtils.TXMETHOD_OMIT);
+		initColList((JSONArray) obj.get(TfUtils.JSON_ATTRS));
 	}
 	
 	public boolean omit(String[] words, TfUtils agents) 
 	{
-		if(_omitList == null)
+		if( !isApplicable() )
 			return false;
 		
-		for(int i=0; i<_omitList.length; i++) 
-		{
-			int colID = _omitList[i];
-			if(agents.isNA(UtilFunctions.unquote(words[colID-1].trim())))
+		for(int i=0; i<_colList.length; i++) {
+			int colID = _colList[i];
+			if(TfUtils.isNA(agents.getNAStrings(),UtilFunctions.unquote(words[colID-1].trim())))
 				return true;
 		}
 		return false;
 	}
-	
-	public boolean isApplicable() 
-	{
-		return (_omitList != null);
-	}
-	
-	/**
-	 * Check if the given column ID is subjected to this transformation.
-	 * 
-	 */
-	public int isOmitted(int colID)
-	{
-		if(_omitList == null)
-			return -1;
-		
-		int idx = Arrays.binarySearch(_omitList, colID);
-		return ( idx >= 0 ? idx : -1);
-	}
-
-	@Override
-	public void print() {
-		System.out.print("Omit List: \n    ");
-		for(int i : _omitList) 
-			System.out.print(i + " ");
-		System.out.println();
-	}
 
 	@Override
 	public void mapOutputTransformationMetadata(
@@ -115,10 +86,8 @@ public class OmitAgent extends TransformationAgent {
 	}
 
 	@Override
-	public String[] apply(String[] words, TfUtils agents) {
+	public String[] apply(String[] words) {
 		return null;
 	}
-
-
 }
  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/RecodeAgent.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/RecodeAgent.java b/src/main/java/org/apache/sysml/runtime/transform/RecodeAgent.java
index aa7c22e..1f9749d 100644
--- a/src/main/java/org/apache/sysml/runtime/transform/RecodeAgent.java
+++ b/src/main/java/org/apache/sysml/runtime/transform/RecodeAgent.java
@@ -25,7 +25,6 @@ import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -48,44 +47,42 @@ import org.apache.sysml.runtime.matrix.data.FrameBlock;
 import org.apache.sysml.runtime.matrix.data.Pair;
 import org.apache.sysml.runtime.transform.MVImputeAgent.MVMethod;
 import org.apache.sysml.runtime.transform.decode.DecoderRecode;
+import org.apache.sysml.runtime.transform.encode.Encoder;
 import org.apache.sysml.runtime.util.UtilFunctions;
 
-public class RecodeAgent extends TransformationAgent {
-	
+public class RecodeAgent extends Encoder 
+{	
 	private static final long serialVersionUID = 8213163881283341874L;
 
-	private int[] _rcdList = null;
 	private int[] _mvrcdList = null;
 	private int[] _fullrcdList = null;
 
 	// HashMap< columnID, HashMap<distinctValue, count> >
 	private HashMap<Integer, HashMap<String, Long>> _rcdMaps  = new HashMap<Integer, HashMap<String, Long>>();
+	private HashMap<Integer, HashMap<String,String>> _finalMaps = null;
 	
-	RecodeAgent(JSONObject parsedSpec) throws JSONException {
-		
-		int rcdCount = 0;
-		
-		if ( parsedSpec.containsKey(TX_METHOD.RECODE.toString())) 
+	public RecodeAgent(JSONObject parsedSpec)
+		throws JSONException 
+	{
+		super(null);
+		int rcdCount = 0;	
+		if ( parsedSpec.containsKey(TfUtils.TXMETHOD_RECODE)) 
 		{
 			//TODO consolidate external and internal json spec definitions
 			JSONArray attrs = null;
-			if( parsedSpec.get(TX_METHOD.RECODE.toString()) instanceof JSONObject ) {
-				JSONObject obj = (JSONObject) parsedSpec.get(TX_METHOD.RECODE.toString());
-				attrs = (JSONArray) obj.get(JSON_ATTRS);
+			if( parsedSpec.get(TfUtils.TXMETHOD_RECODE) instanceof JSONObject ) {
+				JSONObject obj = (JSONObject) parsedSpec.get(TfUtils.TXMETHOD_RECODE);
+				attrs = (JSONArray) obj.get(TfUtils.JSON_ATTRS);
 			}
 			else
-				attrs = (JSONArray)parsedSpec.get(TX_METHOD.RECODE.toString());
-			
-			_rcdList = new int[attrs.size()];
-			for(int i=0; i < _rcdList.length; i++) 
-				_rcdList[i] = UtilFunctions.toInt(attrs.get(i));
-			rcdCount = _rcdList.length;
+				attrs = (JSONArray)parsedSpec.get(TfUtils.TXMETHOD_RECODE);			
+			rcdCount = initColList(attrs);
 		}
 		
-		if ( parsedSpec.containsKey(TX_METHOD.MVRCD.toString())) 
+		if ( parsedSpec.containsKey(TfUtils.TXMETHOD_MVRCD)) 
 		{
-			JSONObject obj = (JSONObject) parsedSpec.get(TX_METHOD.MVRCD.toString());
-			JSONArray attrs = (JSONArray) obj.get(JSON_ATTRS);
+			JSONObject obj = (JSONObject) parsedSpec.get(TfUtils.TXMETHOD_MVRCD);
+			JSONArray attrs = (JSONArray) obj.get(TfUtils.JSON_ATTRS);
 			
 			_mvrcdList = new int[attrs.size()];
 			for(int i=0; i < _mvrcdList.length; i++) 
@@ -97,9 +94,9 @@ public class RecodeAgent extends TransformationAgent {
 		{
 			_fullrcdList = new int[rcdCount];
 			int idx = -1;
-			if(_rcdList != null)
-				for(int i=0; i < _rcdList.length; i++)
-					_fullrcdList[++idx] = _rcdList[i]; 
+			if(_colList != null)
+				for(int i=0; i < _colList.length; i++)
+					_fullrcdList[++idx] = _colList[i]; 
 			
 			if(_mvrcdList != null)
 				for(int i=0; i < _mvrcdList.length; i++)
@@ -114,8 +111,8 @@ public class RecodeAgent extends TransformationAgent {
 	 * @param frame
 	 */
 	public void initRecodeMaps( FrameBlock frame ) {
-		for( int j=0; j<_rcdList.length; j++ ) {
-			int colID = _rcdList[j]; //1-based
+		for( int j=0; j<_colList.length; j++ ) {
+			int colID = _colList[j]; //1-based
 			HashMap<String,Long> map = new HashMap<String,Long>();
 			for( int i=0; i<frame.getNumRows(); i++ ) {
 				String[] tmp = frame.get(i, colID-1).toString().split(Lop.DATATYPE_PREFIX);
@@ -125,8 +122,16 @@ public class RecodeAgent extends TransformationAgent {
 		}
 	}
 	
+	public HashMap<Integer, HashMap<String,Long>> getCPRecodeMaps() { 
+		return _rcdMaps; 
+	}
+	
+	public HashMap<Integer, HashMap<String,String>> getRecodeMaps() {
+		return _finalMaps;
+	}
+	
 	void prepare(String[] words, TfUtils agents) {
-		if ( _rcdList == null && _mvrcdList == null )
+		if ( _colList == null && _mvrcdList == null )
 			return;
 		
 		String w = null;
@@ -183,7 +188,7 @@ public class RecodeAgent extends TransformationAgent {
 	}
 	
 	public void mapOutputHelper(int taskID, OutputCollector<IntWritable, DistinctValue> out, ArrayList<Tuple2<Integer, DistinctValue>> list, TfUtils agents) throws IOException {
-		if ( _rcdList == null  && _mvrcdList == null )
+		if ( _colList == null  && _mvrcdList == null )
 			return;
 		
 		try 
@@ -241,7 +246,7 @@ public class RecodeAgent extends TransformationAgent {
 		int rcdIndex = 0, modeIndex = 0;
 		long maxCount = Long.MIN_VALUE;
 		
-		boolean isRecoded = (isRecoded(colID) != -1);
+		boolean isRecoded = (isApplicable(colID) != -1);
 		boolean isModeImputed = (mvagent.getMethod(colID) == MVMethod.GLOBAL_MODE);
 		
 		Path pt=new Path(outputDir+"/Recode/"+ agents.getName(colID) + TfUtils.TXMTD_RCD_MAP_SUFFIX);
@@ -293,7 +298,7 @@ public class RecodeAgent extends TransformationAgent {
 		if ( isRecoded ) 
 		{
 			// output mode
-			pt=new Path(outputDir+"/Recode/"+ agents.getName(colID) + MODE_FILE_SUFFIX);
+			pt=new Path(outputDir+"/Recode/"+ agents.getName(colID) + TfUtils.MODE_FILE_SUFFIX);
 			br=new BufferedWriter(new OutputStreamWriter(fs.create(pt,true)));
 			br.write(UtilFunctions.quote(mode) + "," + modeIndex + "," + maxCount );
 			br.close();
@@ -307,7 +312,7 @@ public class RecodeAgent extends TransformationAgent {
 		
 		if (isModeImputed) 
 		{
-			pt=new Path(outputDir+"/Impute/"+ agents.getName(colID) + MV_FILE_SUFFIX);
+			pt=new Path(outputDir+"/Impute/"+ agents.getName(colID) + TfUtils.MV_FILE_SUFFIX);
 			br=new BufferedWriter(new OutputStreamWriter(fs.create(pt,true)));
 			br.write(colID + "," + UtilFunctions.quote(mode));
 			br.close();
@@ -316,7 +321,7 @@ public class RecodeAgent extends TransformationAgent {
 	}
 	
 	public void outputTransformationMetadata(String outputDir, FileSystem fs, TfUtils agents) throws IOException {
-		if(_rcdList == null && _mvrcdList == null )
+		if(_colList == null && _mvrcdList == null )
 			return;
 		
 		for(int i=0; i<_fullrcdList.length; i++) {
@@ -356,15 +361,6 @@ public class RecodeAgent extends TransformationAgent {
 		writeMetadata(map, outputDir, colID, fs, agents, false);
 	}
 	
-	// ------------------------------------------------------------------------------------------------
-	
-	public HashMap<Integer, HashMap<String,Long>> getCPRecodeMaps() { return _rcdMaps; }
-	
-	HashMap<Integer, HashMap<String,String>> _finalMaps = null;
-	public HashMap<Integer, HashMap<String,String>> getRecodeMaps() {
-		return _finalMaps;
-	}
-	
 	/**
 	 * Method to load recode maps of all attributes, at once.
 	 * 
@@ -373,14 +369,14 @@ public class RecodeAgent extends TransformationAgent {
 	 */
 	@Override
 	public void loadTxMtd(JobConf job, FileSystem fs, Path txMtdDir, TfUtils agents) throws IOException {
-		if ( _rcdList == null )
+		if( !isApplicable() )
 			return;
 		
 		_finalMaps = new HashMap<Integer, HashMap<String, String>>();
 	
 		if(fs.isDirectory(txMtdDir)) {
-			for(int i=0; i<_rcdList.length;i++) {
-				int colID = _rcdList[i];
+			for(int i=0; i<_colList.length;i++) {
+				int colID = _colList[i];
 				
 				Path path = new Path( txMtdDir + "/Recode/" + agents.getName(colID) + TfUtils.TXMTD_RCD_MAP_SUFFIX);
 				TfUtils.checkValidInputFile(fs, path, true); 
@@ -404,22 +400,7 @@ public class RecodeAgent extends TransformationAgent {
 			fs.close();
 			throw new RuntimeException("Path to recode maps must be a directory: " + txMtdDir);
 		}
-	}
-	
-	/**
-	 * Check if the given column ID is subjected to this transformation.
-	 * 
-	 */
-	public int isRecoded(int colID)
-	{
-		if(_rcdList == null)
-			return -1;
-		
-		int idx = Arrays.binarySearch(_rcdList, colID);
-		return ( idx >= 0 ? idx : -1);
-	}
-
-	
+	}	
 
 	/**
 	 * Method to apply transformations.
@@ -428,16 +409,17 @@ public class RecodeAgent extends TransformationAgent {
 	 * @return
 	 */
 	@Override
-	public String[] apply(String[] words, TfUtils agents) {
-		if ( _rcdList == null )
+	public String[] apply(String[] words) 
+	{
+		if( !isApplicable() )
 			return words;
 		
 		//apply recode maps on relevant columns of given row
-		for(int i=0; i < _rcdList.length; i++) {
+		for(int i=0; i < _colList.length; i++) {
 			//prepare input and get code
-			int colID = _rcdList[i];
+			int colID = _colList[i];
 			String key = UtilFunctions.unquote(words[colID-1].trim());
-			String val = _finalMaps.get(colID).get(key);			
+			String val = lookupRCDMap(colID, key);			
 			// replace unseen keys with NaN 
 			words[colID-1] = (val!=null) ? val : "NaN";
 		}
@@ -447,43 +429,17 @@ public class RecodeAgent extends TransformationAgent {
 	
 	/**
 	 * 
-	 * @param words
-	 * @param agents
+	 * @param colID
+	 * @param key
 	 * @return
 	 */
-	public String[] cp_apply(String[] words, TfUtils agents) {
-		if ( _rcdList == null )
-			return words;
-		
-		//apply recode maps on relevant columns of given row
-		for(int i=0; i < _rcdList.length; i++) {
-			//prepare input and get code
-			int colID = _rcdList[i];
-			String key = UtilFunctions.unquote(words[colID-1].trim());
-			Long val = _rcdMaps.get(colID).get(key);			
-			// replace unseen keys with NaN
-			words[colID-1] = (val!=null) ? Long.toString(val) : "NaN";
-		}
-			
-		return words;
-	}
-	
-	public void printMaps() {
-		for(Integer k : _rcdMaps.keySet()) {
-			System.out.println("Column " + k);
-			HashMap<String,Long> map = _rcdMaps.get(k);
-			for(String w : map.keySet()) {
-				System.out.println("    " + w + " : " + map.get(w));
-			}
-		}
-	}
-	
-	public void print() {
-		System.out.print("Recoding List: \n    ");
-		for(int i : _rcdList) {
-			System.out.print(i + " ");
+	private String lookupRCDMap(int colID, String key) {
+		if( _finalMaps!=null )
+			return _finalMaps.get(colID).get(key);
+		else { //used for cp
+			Long tmp = _rcdMaps.get(colID).get(key);
+			return (tmp!=null) ? Long.toString(tmp) : null;
 		}
-		System.out.println();
 	}
 }
  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/TfUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/TfUtils.java b/src/main/java/org/apache/sysml/runtime/transform/TfUtils.java
index bc08a3a..16ccf6e 100644
--- a/src/main/java/org/apache/sysml/runtime/transform/TfUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/transform/TfUtils.java
@@ -53,6 +53,36 @@ public class TfUtils implements Serializable{
 	
 	private static final long serialVersionUID = 526252850872633125L;
 
+	protected enum ColumnTypes { 
+		SCALE, 
+		NOMINAL, 
+		ORDINAL, 
+		DUMMYCODED, 
+		INVALID;
+	
+		protected byte toID() { 
+			switch(this) {
+				case SCALE: return 1;
+				case NOMINAL: return 2;
+				case ORDINAL: return 3;
+				// Ideally, dummycoded columns should be of a different type. Treating them as SCALE is incorrect, semantically.
+				case DUMMYCODED: return 1; 
+				default:
+					throw new RuntimeException("Invalid Column Type: " + this);
+			}
+		}	
+	}
+	
+	//transform methods
+	public static final String TXMETHOD_IMPUTE    = "impute";
+	public static final String TXMETHOD_RECODE    = "recode";
+	public static final String TXMETHOD_BIN       = "bin";
+	public static final String TXMETHOD_DUMMYCODE = "dummycode";
+	public static final String TXMETHOD_SCALE     = "scale";
+	public static final String TXMETHOD_OMIT      = "omit";
+	public static final String TXMETHOD_MVRCD     = "mvrcd";
+		
+	//transform meta data constants
 	public static final String TXMTD_SEP 	     = ",";
 	public static final String TXMTD_COLTYPES 	 = "coltypes.csv";	
 	public static final String TXMTD_COLNAMES    = "column.names";
@@ -60,6 +90,17 @@ public class TfUtils implements Serializable{
 	public static final String TXMTD_RCD_MAP_SUFFIX 	 = ".map";
 	public static final String TXMTD_RCD_DISTINCT_SUFFIX = ".ndistinct";
 	
+	public static final String JSON_ATTRS 	= "attributes"; 
+	public static final String JSON_MTHD 	= "methods"; 
+	public static final String JSON_CONSTS = "constants"; 
+	public static final String JSON_NBINS 	= "numbins"; 		
+	protected static final String MV_FILE_SUFFIX 		= ".impute";
+	protected static final String MODE_FILE_SUFFIX 		= ".mode";
+	protected static final String BIN_FILE_SUFFIX 		= ".bin";
+	protected static final String SCALE_FILE_SUFFIX		= ".scale";
+	protected static final String DCD_FILE_NAME 		= "dummyCodeMaps.csv";	
+	protected static final String DCD_NAME_SEP 	= "_";
+	
 	
 	private OmitAgent _oa = null;
 	private MVImputeAgent _mia = null;
@@ -136,7 +177,7 @@ public class TfUtils implements Serializable{
 	{
 		//TODO recodemaps handover
 		_numInputCols = inNcol;
-		createAgents(spec);
+		createAgents(spec, new String[]{});
 	}
 	
 	protected static boolean checkValidInputFile(FileSystem fs, Path path, boolean err)
@@ -200,9 +241,11 @@ public class TfUtils implements Serializable{
 		return parseNAStrings(job.get(MRJobConfiguration.TF_NA_STRINGS));
 	}
 	
-	private void createAgents(JSONObject spec) throws IOException, JSONException {
+	private void createAgents(JSONObject spec, String[] naStrings) 
+		throws IOException, JSONException 
+	{
 		_oa = new OmitAgent(spec);
-		_mia = new MVImputeAgent(spec);
+		_mia = new MVImputeAgent(spec, naStrings);
 		_ra = new RecodeAgent(spec);
 		_ba = new BinAgent(spec);
 		_da = new DummycodeAgent(spec, _numInputCols);
@@ -242,7 +285,7 @@ public class TfUtils implements Serializable{
 		_outputPath = outputPath;
 		
 		parseColumnNames();		
-		createAgents(spec);
+		createAgents(spec, naStrings);
 	}
 	
 	public void incrValid() { _numValidRecords++; }
@@ -282,25 +325,23 @@ public class TfUtils implements Serializable{
 	 * @param w
 	 * @return
 	 */
-	public boolean isNA(String w) {
-		if(_NAstrings == null)
+	public static boolean isNA(String[] NAstrings, String w) {
+		if(NAstrings == null)
 			return false;
 		
-		for(String na : _NAstrings) {
+		for(String na : NAstrings) {
 			if(w.equals(na))
 				return true;
 		}
 		return false;
 	}
 	
-	public String[] getWords(Text line)
-	{
+	public String[] getWords(Text line) {
 		return getWords(line.toString());
 	}
 	
 
-	public String[] getWords(String line) 
-	{
+	public String[] getWords(String line) {
 		return getDelim().split(line.trim(), -1);
 	}
 	
@@ -315,10 +356,10 @@ public class TfUtils implements Serializable{
 		String[] words = getWords(line);
 		if(!getOmitAgent().omit(words, this))
 		{
-			getMVImputeAgent().prepare(words, this);
+			getMVImputeAgent().prepare(words);
 			getRecodeAgent().prepare(words, this);
 			getBinAgent().prepare(words, this);
-			incrValid();;
+			incrValid();
 		}
 		incrTotal();
 		
@@ -354,30 +395,10 @@ public class TfUtils implements Serializable{
 		// associate recode maps and bin definitions with dummycoding agent,
 		// as recoded and binned columns are typically dummycoded
 		getDummycodeAgent().setRecodeMaps( getRecodeAgent().getRecodeMaps() );
-		getDummycodeAgent().setNumBins(getBinAgent().getBinList(), getBinAgent().getNumBins());
+		getDummycodeAgent().setNumBins(getBinAgent().getColList(), getBinAgent().getNumBins());
 		getDummycodeAgent().loadTxMtd(job, fs, tfMtdDir, this);
 
 	}
-	
-	/*public void loadTfMetadata () throws IOException
-	{
-		Path tfMtdDir = (DistributedCache.getLocalCacheFiles(_rJob))[0];
-		FileSystem localFS = FileSystem.getLocal(_rJob);
-		
-		loadTfMetadata(_rJob, localFS, tfMtdDir);
-		
-		FileSystem fs;
-		fs = FileSystem.get(_rJob);
-		Path thisPath=new Path(_rJob.get(MRConfigurationNames.MR_MAP_INPUT_FILE)).makeQualified(fs);
-		String thisfile=thisPath.toString();
-			
-		Path smallestFilePath=new Path(_rJob.get(MRJobConfiguration.TF_SMALLEST_FILE)).makeQualified(fs);
-		if(thisfile.toString().equals(smallestFilePath.toString()))
-			_partFileWithHeader=true;
-		else
-			_partFileWithHeader = false;
-	}*/
-
 
 	public String processHeaderLine() throws IOException 
 	{
@@ -402,11 +423,6 @@ public class TfUtils implements Serializable{
 		return getOmitAgent().omit(words, this);
 	}
 	
-	
-	public String[] apply(String[] words) {
-		return apply(words, false);
-	}
-	
 	/**
 	 * Function to apply transformation metadata on a given row.
 	 * 
@@ -414,18 +430,11 @@ public class TfUtils implements Serializable{
 	 * @param optimizeMaps
 	 * @return
 	 */
-	public String[] apply ( String[] words, boolean optimizeMaps ) 
-	{
-		words = getMVImputeAgent().apply(words, this);
-		
-		if(optimizeMaps)
-			// specific case of transform() invoked from CP (to save boxing and unboxing)
-			words = getRecodeAgent().cp_apply(words, this);
-		else
-			words = getRecodeAgent().apply(words, this);
-
-		words = getBinAgent().apply(words, this);
-		words = getDummycodeAgent().apply(words, this);		
+	public String[] apply( String[] words ) {
+		words = getMVImputeAgent().apply(words);
+		words = getRecodeAgent().apply(words);
+		words = getBinAgent().apply(words);
+		words = getDummycodeAgent().apply(words);		
 		_numTransformedRows++;
 		
 		return words;
@@ -443,8 +452,7 @@ public class TfUtils implements Serializable{
 		}
 	}
 	
-	public String checkAndPrepOutputString(String []words) throws DMLRuntimeException 
-	{
+	public String checkAndPrepOutputString(String []words) throws DMLRuntimeException {
 		return checkAndPrepOutputString(words, new StringBuilder());
 	}
 	

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/TransformationAgent.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/TransformationAgent.java b/src/main/java/org/apache/sysml/runtime/transform/TransformationAgent.java
deleted file mode 100644
index 0cdf682..0000000
--- a/src/main/java/org/apache/sysml/runtime/transform/TransformationAgent.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.sysml.runtime.transform;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.Iterator;
-
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.io.IntWritable;
-import org.apache.hadoop.mapred.JobConf;
-import org.apache.hadoop.mapred.OutputCollector;
-
-public abstract class TransformationAgent implements Serializable {
-	
-	private static final long serialVersionUID = -2995384194257356337L;
-	
-	public static enum TX_METHOD { 
-		IMPUTE ("impute"), 
-		RECODE ("recode"), 
-		BIN ("bin"), 
-		DUMMYCODE ("dummycode"), 
-		SCALE ("scale"),
-		OMIT ("omit"),
-		MVRCD ("mvrcd");
-		
-		private String _name;
-		
-		TX_METHOD(String name) { _name = name; }
-		
-		public String toString() {
-			return _name;
-		}
-	}
-	
-	public static final String JSON_ATTRS 	= "attributes"; 
-	public static final String JSON_MTHD 	= "methods"; 
-	public static final String JSON_CONSTS = "constants"; 
-	public static final String JSON_NBINS 	= "numbins"; 	
-	
-	protected static final String MV_FILE_SUFFIX 		= ".impute";
-	protected static final String MODE_FILE_SUFFIX 		= ".mode";
-	protected static final String BIN_FILE_SUFFIX 		= ".bin";
-	protected static final String SCALE_FILE_SUFFIX		= ".scale";
-	protected static final String DCD_FILE_NAME 		= "dummyCodeMaps.csv";
-	
-	protected static final String DCD_NAME_SEP 	= "_";
-	
-	
-	abstract public void print();
-	abstract public void mapOutputTransformationMetadata(OutputCollector<IntWritable, DistinctValue> out, int taskID, TfUtils agents) throws IOException;
-	abstract public void mergeAndOutputTransformationMetadata(Iterator<DistinctValue> values, String outputDir, int colID, FileSystem fs, TfUtils agents) throws IOException;
-	
-	abstract public void loadTxMtd(JobConf job, FileSystem fs, Path txMtdDir, TfUtils agents) throws IOException;
-	abstract public String[] apply(String[] words, TfUtils agents);
-	
-	protected enum ColumnTypes { SCALE, NOMINAL, ORDINAL, DUMMYCODED, INVALID }
-	protected byte columnTypeToID(ColumnTypes type) throws IOException { 
-		switch(type) 
-		{
-		case SCALE: return 1;
-		case NOMINAL: return 2;
-		case ORDINAL: return 3;
-		case DUMMYCODED: return 1; // Ideally, dummycoded columns should be of a different type. Treating them as SCALE is incorrect, semantically.
-		default:
-			throw new IOException("Invalid Column Type: " + type);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/decode/Decoder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/decode/Decoder.java b/src/main/java/org/apache/sysml/runtime/transform/decode/Decoder.java
index 1999f10..f66ed5e 100644
--- a/src/main/java/org/apache/sysml/runtime/transform/decode/Decoder.java
+++ b/src/main/java/org/apache/sysml/runtime/transform/decode/Decoder.java
@@ -44,8 +44,9 @@ public abstract class Decoder
 	 * 
 	 * @param in
 	 * @param out
+	 * @return
 	 */
-	public abstract void decode(double[] in, Object[] out);
+	public abstract Object[] decode(double[] in, Object[] out);
 	
 	/**
 	 * Block decode API converting a matrix block into a frame block.

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderComposite.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderComposite.java b/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderComposite.java
index 4ad11ed..b0b0909 100644
--- a/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderComposite.java
+++ b/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderComposite.java
@@ -47,9 +47,10 @@ public class DecoderComposite extends Decoder
 	}
 
 	@Override
-	public void decode(double[] in, Object[] out) {
+	public Object[] decode(double[] in, Object[] out) {
 		for( Decoder decoder : _decoders )
 			decoder.decode(in, out);
+		return out;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderFactory.java b/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderFactory.java
index e6560c6..cdf9a52 100644
--- a/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderFactory.java
+++ b/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderFactory.java
@@ -26,8 +26,7 @@ import java.util.List;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.matrix.data.FrameBlock;
-import org.apache.sysml.runtime.transform.TransformationAgent;
-import org.apache.sysml.runtime.transform.TransformationAgent.TX_METHOD;
+import org.apache.sysml.runtime.transform.TfUtils;
 import org.apache.sysml.runtime.util.UtilFunctions;
 import org.apache.wink.json4j.JSONArray;
 import org.apache.wink.json4j.JSONObject;
@@ -59,14 +58,14 @@ public class DecoderFactory
 			}
 			
 			//create decoder 'recode'
-			if ( jSpec.containsKey(TX_METHOD.RECODE.toString()))  {
+			if ( jSpec.containsKey(TfUtils.TXMETHOD_RECODE))  {
 				JSONArray attrs = null;
-				if( jSpec.get(TX_METHOD.RECODE.toString()) instanceof JSONObject ) {
-					JSONObject obj = (JSONObject) jSpec.get(TX_METHOD.RECODE.toString());
-					attrs = (JSONArray) obj.get(TransformationAgent.JSON_ATTRS);
+				if( jSpec.get(TfUtils.TXMETHOD_RECODE) instanceof JSONObject ) {
+					JSONObject obj = (JSONObject) jSpec.get(TfUtils.TXMETHOD_RECODE);
+					attrs = (JSONArray) obj.get(TfUtils.JSON_ATTRS);
 				}
 				else
-					attrs = (JSONArray)jSpec.get(TX_METHOD.RECODE.toString());
+					attrs = (JSONArray)jSpec.get(TfUtils.TXMETHOD_RECODE);
 				
 				int[] rcCols = new int[attrs.size()];
 				for(int j=0; j<rcCols.length; j++) 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderRecode.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderRecode.java b/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderRecode.java
index 0c9a872..f554f8b 100644
--- a/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderRecode.java
+++ b/src/main/java/org/apache/sysml/runtime/transform/decode/DecoderRecode.java
@@ -61,11 +61,12 @@ public class DecoderRecode extends Decoder
 	}
 
 	@Override
-	public void decode(double[] in, Object[] out) {
+	public Object[] decode(double[] in, Object[] out) {
 		for( int j=0; j<_rcCols.length; j++ ) {
 			long key = UtilFunctions.toLong(in[_rcCols[j]]);
 			out[_rcCols[j]] = _rcMaps[j].get(key);
 		}
+		return out;
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/main/java/org/apache/sysml/runtime/transform/encode/Encoder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/transform/encode/Encoder.java b/src/main/java/org/apache/sysml/runtime/transform/encode/Encoder.java
new file mode 100644
index 0000000..32694c9
--- /dev/null
+++ b/src/main/java/org/apache/sysml/runtime/transform/encode/Encoder.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.sysml.runtime.transform.encode;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.Iterator;
+
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.io.IntWritable;
+import org.apache.hadoop.mapred.JobConf;
+import org.apache.hadoop.mapred.OutputCollector;
+import org.apache.sysml.runtime.transform.DistinctValue;
+import org.apache.sysml.runtime.transform.TfUtils;
+import org.apache.sysml.runtime.util.UtilFunctions;
+import org.apache.wink.json4j.JSONArray;
+
+/**
+ * Base class for all transform encoders providing both a row and block
+ * interface for decoding frames to matrices.
+ * 
+ */
+public abstract class Encoder implements Serializable
+{
+	private static final long serialVersionUID = 2299156350718979064L;
+	
+	protected int[] _colList = null;
+	
+	protected Encoder( int[] colList ) {
+		_colList = colList;
+	}
+	
+	public int[] getColList() {
+		return _colList;
+	}
+	
+	/**
+	 * 
+	 * @param attrs
+	 */
+	public int initColList(JSONArray attrs) {
+		_colList = new int[attrs.size()];
+		for(int i=0; i < _colList.length; i++) 
+			_colList[i] = UtilFunctions.toInt(attrs.get(i));	
+		return _colList.length;
+	}
+	
+	/**
+	 * Indicates if this encoder is applicable, i.e, if there is at 
+	 * least one column to encode. 
+	 * 
+	 * @return
+	 */
+	public boolean isApplicable()  {
+		return (_colList != null && _colList.length > 0);
+	}
+	
+	/**
+	 * Indicates if this encoder is applicable for the given column ID,
+	 * i.e., if it is subject to this transformation.
+	 * 
+	 */
+	public int isApplicable(int colID) {
+		if(_colList == null)
+			return -1;
+		int idx = Arrays.binarySearch(_colList, colID);
+		return ( idx >= 0 ? idx : -1);
+	}
+	
+	/**
+	 * Encode input data according to existing transform meta
+	 * data (transform apply).
+	 * 
+	 * @param in
+	 * @return
+	 */
+	public abstract String[] apply(String[] in);
+	
+	
+	//OLD API: kept for a transition phase only
+	//TODO stage 2: refactor data and meta data IO into minimal set of ultility functions
+	abstract public void mapOutputTransformationMetadata(OutputCollector<IntWritable, DistinctValue> out, int taskID, TfUtils agents) throws IOException;
+	abstract public void mergeAndOutputTransformationMetadata(Iterator<DistinctValue> values, String outputDir, int colID, FileSystem fs, TfUtils agents) throws IOException;
+	abstract public void loadTxMtd(JobConf job, FileSystem fs, Path txMtdDir, TfUtils agents) throws IOException;
+}



[04/11] incubator-systemml git commit: [SYSTEMML-616] Cleanup exception handling (stage 1, remove unnecessary)

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/mapred/ReduceBase.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/ReduceBase.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/ReduceBase.java
index d6e3939..8839223 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/ReduceBase.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/ReduceBase.java
@@ -30,7 +30,6 @@ import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.OutputCollector;
 import org.apache.hadoop.mapred.Reporter;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.Plus;
 import org.apache.sysml.runtime.instructions.mr.AggregateInstruction;
 import org.apache.sysml.runtime.instructions.mr.MRInstruction;
@@ -126,8 +125,6 @@ public class ReduceBase extends MRBaseForCommonInstructions
 			}
 			
 			
-		} catch (DMLUnsupportedOperationException e) {
-			throw new RuntimeException(e);
 		} catch (DMLRuntimeException e) {
 			throw new RuntimeException(e);
 		}		
@@ -271,8 +268,7 @@ public class ReduceBase extends MRBaseForCommonInstructions
 	
 	protected void outputResultsFromCachedValues(Reporter reporter) throws IOException
 	{
-		for(int i=0; i<resultIndexes.length; i++)
-		{
+		for(int i=0; i<resultIndexes.length; i++) {
 			byte output=resultIndexes[i];
 			ArrayList<IndexedMatrixValue> outValues=cachedValues.get(output);
 			if(outValues==null)
@@ -280,52 +276,14 @@ public class ReduceBase extends MRBaseForCommonInstructions
 			for(IndexedMatrixValue outValue: outValues)
 				collectOutput_N_Increase_Counter(outValue.getIndexes(), 
 					outValue.getValue(), i, reporter);
-	//		LOG.info("output: "+outValue.getIndexes()+" -- "+outValue.getValue()+" ~~ tag: "+output);
-		//	System.out.println("Reducer output: "+outValue.getIndexes()+" -- "+outValue.getValue()+" ~~ tag: "+output);
 		}
 	}
 
 	
 	//process one aggregate instruction
-/*	private void processAggregateHelp(MatrixIndexes indexes, TaggedMatrixValue tagged, 
-			AggregateInstruction instruction) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException
-	{
-		AggregateOperator aggOp=(AggregateOperator)instruction.getOperator();
-		
-		IndexedMatrixValue out=cachedValues.get(instruction.output);
-		IndexedMatrixValue correction=null;
-		if(aggOp.correctionExists)
-			correction=correctionCache.get(instruction.output);
-		if(out==null)
-		{
-			out=cachedValues.holdPlace(instruction.output, valueClass);
-			out.getIndexes().setIndexes(indexes);
-			if(aggOp.correctionExists )
-			{
-				if(correction==null)
-					correction=correctionCache.holdPlace(instruction.output, valueClass);
-				OperationsOnMatrixValues.startAggregation(out.getValue(), correction.getValue(), aggOp, 
-					tagged.getBaseObject().getNumRows(), tagged.getBaseObject().getNumColumns(),
-					tagged.getBaseObject().isInSparseFormat());
-			}else
-				OperationsOnMatrixValues.startAggregation(out.getValue(), null, aggOp, 
-						tagged.getBaseObject().getNumRows(), tagged.getBaseObject().getNumColumns(),
-						tagged.getBaseObject().isInSparseFormat());
-		}
-		
-		if(aggOp.correctionExists)
-			OperationsOnMatrixValues.incrementalAggregation(out.getValue(), correction.getValue(), 
-				tagged.getBaseObject(), (AggregateOperator)instruction.getOperator());
-		else
-			OperationsOnMatrixValues.incrementalAggregation(out.getValue(), null, 
-					tagged.getBaseObject(), (AggregateOperator)instruction.getOperator());	
-	}
-	*/
-	//process one aggregate instruction
 	private void processAggregateHelp(long row, long col, MatrixValue value, 
 			AggregateInstruction instruction, boolean imbededCorrection) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		AggregateOperator aggOp=(AggregateOperator)instruction.getOperator();
 		
@@ -355,19 +313,14 @@ public class ReduceBase extends MRBaseForCommonInstructions
 				OperationsOnMatrixValues.startAggregation(out.getValue(), null, aggOp, 
 						value.getNumRows(), value.getNumColumns(),
 						value.isInSparseFormat(), imbededCorrection);
-			//System.out.println("after start: "+out);
 		}
-		//System.out.println("value to add: "+value);
+
 		if(aggOp.correctionExists)// && !imbededCorrection)
-		{
-			//System.out.println("incremental aggregation maxindex/minindex");
 			OperationsOnMatrixValues.incrementalAggregation(out.getValue(), correction.getValue(), 
 					value, (AggregateOperator)instruction.getOperator(), imbededCorrection);
-		}
 		else
 			OperationsOnMatrixValues.incrementalAggregation(out.getValue(), null, 
 					value, (AggregateOperator)instruction.getOperator(), imbededCorrection);
-		//System.out.println("after increment: "+out);
 	}
 	
 	//process all the aggregate instructions for one group of values

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/udf/ExternalFunctionInvocationInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/udf/ExternalFunctionInvocationInstruction.java b/src/main/java/org/apache/sysml/udf/ExternalFunctionInvocationInstruction.java
index 4b3f78f..85f8738 100644
--- a/src/main/java/org/apache/sysml/udf/ExternalFunctionInvocationInstruction.java
+++ b/src/main/java/org/apache/sysml/udf/ExternalFunctionInvocationInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.udf;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.Instruction;
 
@@ -75,7 +74,7 @@ public class ExternalFunctionInvocationInstruction extends Instruction
 
 	@Override
 	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException, DMLUnsupportedOperationException 
+			throws DMLRuntimeException 
 	{
 		//do nothing (not applicable because this instruction is only used as
 		//meta data container)

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/utils/AppException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/utils/AppException.java b/src/main/java/org/apache/sysml/utils/AppException.java
deleted file mode 100644
index a8a23f2..0000000
--- a/src/main/java/org/apache/sysml/utils/AppException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.sysml.utils;
-
-import org.apache.sysml.api.DMLException;
-
-/**
- * This exception should be thrown to flag errors by systemML apps
- * including data transformation, post-processing etc.
- */
-public class AppException extends DMLException 
-{
-	
-	private static final long serialVersionUID = 1L;
-
-	public AppException(String string) {
-		super(string);
-	}
-
-	public AppException(String string, Exception ex){
-		super(string,ex);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/yarn/DMLAppMasterUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/yarn/DMLAppMasterUtils.java b/src/main/java/org/apache/sysml/yarn/DMLAppMasterUtils.java
index c4de6b7..0930475 100644
--- a/src/main/java/org/apache/sysml/yarn/DMLAppMasterUtils.java
+++ b/src/main/java/org/apache/sysml/yarn/DMLAppMasterUtils.java
@@ -35,7 +35,6 @@ import org.apache.sysml.hops.OptimizerUtils.OptimizationLevel;
 import org.apache.sysml.lops.Lop;
 import org.apache.sysml.lops.LopsException;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.Program;
 import org.apache.sysml.runtime.controlprogram.ProgramBlock;
 import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
@@ -116,11 +115,10 @@ public class DMLAppMasterUtils
 	 * @throws DMLRuntimeException
 	 * @throws HopsException
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	public static void setupProgramMappingRemoteMaxMemory(Program prog) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		if( DMLScript.isActiveAM() && isResourceOptimizerEnabled() )
 		{

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/yarn/ropt/ResourceOptimizer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/yarn/ropt/ResourceOptimizer.java b/src/main/java/org/apache/sysml/yarn/ropt/ResourceOptimizer.java
index 4b31af2..701ba76 100644
--- a/src/main/java/org/apache/sysml/yarn/ropt/ResourceOptimizer.java
+++ b/src/main/java/org/apache/sysml/yarn/ropt/ResourceOptimizer.java
@@ -41,7 +41,6 @@ import org.apache.sysml.parser.StatementBlock;
 import org.apache.sysml.parser.WhileStatementBlock;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
 import org.apache.sysml.runtime.controlprogram.FunctionProgramBlock;
 import org.apache.sysml.runtime.controlprogram.IfProgramBlock;
@@ -183,13 +182,12 @@ public class ResourceOptimizer
 	 * @param rc
 	 * @return
 	 * @throws IOException 
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws LopsException 
 	 * @throws HopsException 
 	 * @throws DMLRuntimeException 
 	 */
 	public static ArrayList<ProgramBlock> compileProgram( ArrayList<ProgramBlock> prog, ResourceConfig rc ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		//recompile program block hierarchy to list of blocks and apply optimized resource configuration
 		ArrayList<ProgramBlock> B = compileProgram(prog, null, rc.getCPResource(), rc.getMaxMRResource());
@@ -205,13 +203,12 @@ public class ResourceOptimizer
 	 * @param B
 	 * @return
 	 * @throws IOException 
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws LopsException 
 	 * @throws HopsException 
 	 * @throws DMLRuntimeException 
 	 */
 	private static ArrayList<ProgramBlock> compileProgram( ArrayList<ProgramBlock> prog, ArrayList<ProgramBlock> B, double cp, double mr ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		if( B == null ) //init 
 		{
@@ -234,14 +231,13 @@ public class ResourceOptimizer
 	 * @param pb
 	 * @param Bp
 	 * @return
-	 * @throws IOException 
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws IOException  
 	 * @throws LopsException 
 	 * @throws HopsException 
 	 * @throws DMLRuntimeException 
 	 */
 	private static ArrayList<ProgramBlock> compileProgram( ProgramBlock pb, ArrayList<ProgramBlock> B, double cp, double mr ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		if (pb instanceof FunctionProgramBlock)
 		{
@@ -317,11 +313,10 @@ public class ResourceOptimizer
 	 * @throws DMLRuntimeException
 	 * @throws HopsException
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	private static void recompileProgramBlocks( ArrayList<ProgramBlock> pbs, long cp, double[][] memo ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		for( int i=0; i<pbs.size(); i++ )
 		{
@@ -339,11 +334,10 @@ public class ResourceOptimizer
 	 * @throws DMLRuntimeException
 	 * @throws HopsException
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	private static void recompileProgramBlock( ProgramBlock pb, long cp, long mr ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		//init compiler memory budget
 		InfrastructureAnalyzer.setLocalMaxMemory( cp );
@@ -455,11 +449,10 @@ public class ResourceOptimizer
 	 * @param pb
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws HopsException 
 	 */
 	private static double getProgramCosts( ProgramBlock pb ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException, HopsException
+		throws DMLRuntimeException, HopsException
 	{
 		double val = 0;
 		if( COST_INDIVIDUAL_BLOCKS ) {
@@ -483,11 +476,10 @@ public class ResourceOptimizer
 	/**
 	 * 
 	 * @param prog
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 */
 	private static double getProgramCosts( Program prog ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//we need to cost the entire program in order to take in-memory status into account
 		ExecutionContext ec = ExecutionContextFactory.createContext();
@@ -708,10 +700,9 @@ public class ResourceOptimizer
 	 * @param min
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private static double[][] initLocalMemoTable( ArrayList<ProgramBlock> Bp, double min ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//allocate memo structure
 		int len = Bp.size();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/yarn/ropt/ResourceOptimizerCPMigration.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/yarn/ropt/ResourceOptimizerCPMigration.java b/src/main/java/org/apache/sysml/yarn/ropt/ResourceOptimizerCPMigration.java
index 0bb5cc3..416a615 100644
--- a/src/main/java/org/apache/sysml/yarn/ropt/ResourceOptimizerCPMigration.java
+++ b/src/main/java/org/apache/sysml/yarn/ropt/ResourceOptimizerCPMigration.java
@@ -168,7 +168,7 @@ public class ResourceOptimizerCPMigration
 	
 	public HashMap<Long, ProgramBlock> sbIdMap;		// Pointer to all reachable program blocks
 	
-	public CPMigrationOptimizer(Program rtprog) throws DMLRuntimeException, DMLUnsupportedOperationException, HopsException {
+	public CPMigrationOptimizer(Program rtprog) throws DMLRuntimeException, HopsException {
 		prog = rtprog;
 		copiedProgramBlocks = ProgramConverter.rcreateDeepCopyProgramBlocks(prog._programBlocks, 1, -1, new HashSet<String>(), false);
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameReadWriteTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameReadWriteTest.java b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameReadWriteTest.java
index 757a418..866a93d 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameReadWriteTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameReadWriteTest.java
@@ -25,7 +25,6 @@ import java.util.List;
 
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.cp.AppendCPInstruction.AppendType;
 import org.apache.sysml.runtime.io.FrameReader;
 import org.apache.sysml.runtime.io.FrameReaderFactory;
@@ -34,6 +33,7 @@ import org.apache.sysml.runtime.io.FrameWriterFactory;
 import org.apache.sysml.runtime.matrix.data.CSVFileFormatProperties;
 import org.apache.sysml.runtime.matrix.data.FrameBlock;
 import org.apache.sysml.runtime.matrix.data.OutputInfo;
+import org.apache.sysml.runtime.util.MapReduceTool;
 import org.apache.sysml.runtime.util.UtilFunctions;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.utils.TestUtils;
@@ -155,11 +155,11 @@ public class FrameReadWriteTest extends AutomatedTestBase
 	 * @param frame2
 	 * @param fprop
 	 * @return 
-	 * @throws DMLUnsupportedOperationException, DMLRuntimeException, IOException
+	 * @throws DMLRuntimeException, IOException
 	 */
 
 	void writeAndVerifyData(OutputInfo oinfo, FrameBlock frame1, FrameBlock frame2, CSVFileFormatProperties fprop)
-		throws DMLUnsupportedOperationException, DMLRuntimeException, IOException
+		throws DMLRuntimeException, IOException
 	{
 		String fname1 = TEST_DIR + "/frameData1";
 		String fname2 = TEST_DIR + "/frameData2";
@@ -179,6 +179,8 @@ public class FrameReadWriteTest extends AutomatedTestBase
 		// Verify that data read with original frames
 		verifyFrameData(frame1, frame1Read);			
 		verifyFrameData(frame2, frame2Read);
+		MapReduceTool.deleteFileIfExistOnHDFS(fname1);
+		MapReduceTool.deleteFileIfExistOnHDFS(fname2);
 	}
 	
 }


[09/11] incubator-systemml git commit: [SYSTEMML-616] Cleanup exception handling (stage 1, remove unnecessary)

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java
index cb553f7..e05ea8d 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java
@@ -363,7 +363,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 		long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
 		
 		if ( !isAvailableToRead() )
-			throw new CacheStatusException ("MatrixObject not available to read.");
+			throw new CacheException ("MatrixObject not available to read.");
 		
 		//get object from cache
 		if( _data == null )
@@ -407,7 +407,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 			}
 			catch (IOException e)
 			{
-				throw new CacheIOException("Reading of " + _hdfsFileName + " ("+getVarName()+") failed.", e);
+				throw new CacheException("Reading of " + _hdfsFileName + " ("+getVarName()+") failed.", e);
 			}
 			
 			_isAcquireFromEmpty = true;
@@ -450,7 +450,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 		long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
 		
 		if ( !isAvailableToModify() )
-			throw new CacheStatusException("MatrixObject not available to modify.");
+			throw new CacheException("MatrixObject not available to modify.");
 		
 		//get object from cache
 		if( _data == null )
@@ -470,7 +470,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 			}
 			catch (IOException e)
 			{
-				throw new CacheIOException("Reading of " + _hdfsFileName + " ("+getVarName()+") failed.", e);
+				throw new CacheException("Reading of " + _hdfsFileName + " ("+getVarName()+") failed.", e);
 			}
 		}
 
@@ -509,7 +509,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 		long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
 		
 		if (! isAvailableToModify ())
-			throw new CacheStatusException ("MatrixObject not available to modify.");
+			throw new CacheException ("MatrixObject not available to modify.");
 		
 		//clear old data 
 		clearData(); 
@@ -543,7 +543,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 	 * In-Status:  READ, MODIFY;
 	 * Out-Status: READ(-1), EVICTABLE, EMPTY.
 	 * 
-	 * @throws CacheStatusException
+	 * @throws CacheException
 	 */
 	@Override
 	public synchronized void release() 
@@ -625,7 +625,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 		if( !isCleanupEnabled() ) 
 			return; // do nothing
 		if( !isAvailableToModify() )
-			throw new CacheStatusException ("MatrixObject (" + this.getDebugName() + ") not available to modify. Status = " + this.getStatusAsString() + ".");
+			throw new CacheException ("MatrixObject (" + this.getDebugName() + ") not available to modify. Status = " + this.getStatusAsString() + ".");
 		
 		// clear existing WB / FS representation (but prevent unnecessary probes)
 		if( !(isEmpty(true)||(_data!=null && isBelowCachingThreshold()) 
@@ -672,7 +672,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 		
 		//prevent concurrent modifications
 		if ( !isAvailableToRead() )
-			throw new CacheStatusException ("MatrixObject not available to read.");
+			throw new CacheException ("MatrixObject not available to read.");
 
 		LOG.trace("Exporting " + this.getDebugName() + " to " + fName + " in format " + outputFormat);
 				
@@ -705,7 +705,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 				}
 				catch (IOException e)
 				{
-				    throw new CacheIOException("Reading of " + _hdfsFileName + " ("+getVarName()+") failed.", e);
+				    throw new CacheException("Reading of " + _hdfsFileName + " ("+getVarName()+") failed.", e);
 				}
 			}
 			//get object from cache
@@ -723,7 +723,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 			}
 			catch (Exception e)
 			{
-				throw new CacheIOException ("Export to " + fName + " failed.", e);
+				throw new CacheException ("Export to " + fName + " failed.", e);
 			}
 			finally
 			{
@@ -744,7 +744,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 				writeMetaData( fName, outputFormat, formatProperties );
 			}
 			catch (Exception e) {
-				throw new CacheIOException ("Export to " + fName + " failed.", e);
+				throw new CacheException ("Export to " + fName + " failed.", e);
 			}
 		}
 		else if( getRDDHandle()!=null && //pending rdd operation
@@ -757,7 +757,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 				writeMetaData( fName, outputFormat, formatProperties );
 			}
 			catch (Exception e) {
-				throw new CacheIOException ("Export to " + fName + " failed.", e);
+				throw new CacheException ("Export to " + fName + " failed.", e);
 			}
 		}
 		else 
@@ -777,10 +777,10 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 	 * @param fName
 	 * @param outputFormat
 	 * @return
-	 * @throws CacheIOException
+	 * @throws CacheException
 	 */
 	public synchronized boolean moveData(String fName, String outputFormat) 
-		throws CacheIOException 
+		throws CacheException 
 	{	
 		boolean ret = false;
 		
@@ -809,7 +809,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 		}
 		catch (Exception e)
 		{
-			throw new CacheIOException ("Move to " + fName + " failed.", e);
+			throw new CacheException ("Move to " + fName + " failed.", e);
 		}
 		
 		return ret;
@@ -887,7 +887,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 		long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
 		
 		if ( !_partitioned )
-			throw new CacheStatusException ("MatrixObject not available to indexed read.");
+			throw new CacheException ("MatrixObject not available to indexed read.");
 		
 		//return static partition of set from outside of the program
 		if( _partitionInMemory != null )
@@ -992,13 +992,13 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 	 * 
 	 * @param pred
 	 * @return
-	 * @throws CacheStatusException 
+	 * @throws CacheException 
 	 */
 	public String getPartitionFileName( IndexRange pred, int brlen, int bclen ) 
-		throws CacheStatusException
+		throws CacheException
 	{
 		if ( !_partitioned )
-			throw new CacheStatusException ("MatrixObject not available to indexed read.");
+			throw new CacheException ("MatrixObject not available to indexed read.");
 		
 		StringBuilder sb = new StringBuilder();
 		sb.append(_hdfsFileName);
@@ -1022,7 +1022,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 				sb.append((pred.colStart-1)/bclen+1);
 				break;
 			default:
-				throw new CacheStatusException ("MatrixObject not available to indexed read.");
+				throw new CacheException ("MatrixObject not available to indexed read.");
 		}
 
 		return sb.toString();
@@ -1047,14 +1047,14 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 
 	@Override
 	protected void evictBlobFromMemory ( MatrixBlock mb ) 
-		throws CacheIOException
+		throws CacheException
 	{
-		throw new CacheIOException("Redundant explicit eviction.");
+		throw new CacheException("Redundant explicit eviction.");
 	}
 	
 	@Override
 	protected void restoreBlobIntoMemory () 
-		throws CacheIOException
+		throws CacheException
 	{
 		long begin = 0;
 		
@@ -1070,7 +1070,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 						(_hdfsFileName == null ? "null" : _hdfsFileName) + ", Restore from path: " + filePath);
 				
 		if (_data != null)
-			throw new CacheIOException (filePath + " : Cannot restore on top of existing in-memory data.");
+			throw new CacheException (filePath + " : Cannot restore on top of existing in-memory data.");
 
 		try
 		{
@@ -1078,12 +1078,12 @@ public class MatrixObject extends CacheableData<MatrixBlock>
 		}
 		catch (IOException e)
 		{
-			throw new CacheIOException (filePath + " : Restore failed.", e);	
+			throw new CacheException (filePath + " : Restore failed.", e);	
 		}
 		
 		//check for success
 	    if (_data == null)
-			throw new CacheIOException (filePath + " : Restore failed.");
+			throw new CacheException (filePath + " : Restore failed.");
 	    
 	    if( LOG.isTraceEnabled() )
 	    	LOG.trace("Restoring matrix - COMPLETED ... " + (System.currentTimeMillis()-begin) + " msec.");

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java b/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java
index 7ee9bb5..66bee85 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java
@@ -42,7 +42,6 @@ import org.apache.sysml.api.MLContextProxy;
 import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.lops.Checkpoint;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.Program;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
@@ -229,11 +228,10 @@ public class SparkExecutionContext extends ExecutionContext
 	 * @param varname
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	@SuppressWarnings("unchecked")
 	public JavaPairRDD<MatrixIndexes,MatrixBlock> getBinaryBlockRDDHandleForVariable( String varname ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		return (JavaPairRDD<MatrixIndexes,MatrixBlock>) getRDDHandleForVariable( varname, InputInfo.BinaryBlockInputInfo);
 	}
@@ -244,10 +242,9 @@ public class SparkExecutionContext extends ExecutionContext
 	 * @param inputInfo
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public JavaPairRDD<?,?> getRDDHandleForVariable( String varname, InputInfo inputInfo ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		MatrixObject mo = getMatrixObject(varname);
 		return getRDDHandleForMatrixObject(mo, inputInfo);
@@ -260,12 +257,11 @@ public class SparkExecutionContext extends ExecutionContext
 	 * 
 	 * @param varname
 	 * @return
-	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws DMLRuntimeException  
 	 */
 	@SuppressWarnings("unchecked")
 	public JavaPairRDD<?,?> getRDDHandleForMatrixObject( MatrixObject mo, InputInfo inputInfo ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{		
 		//NOTE: MB this logic should be integrated into MatrixObject
 		//However, for now we cannot assume that spark libraries are 
@@ -348,11 +344,10 @@ public class SparkExecutionContext extends ExecutionContext
 	 * @param varname
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	@SuppressWarnings("unchecked")
 	public PartitionedBroadcastMatrix getBroadcastForVariable( String varname ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{		
 		long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
 
@@ -415,10 +410,9 @@ public class SparkExecutionContext extends ExecutionContext
 	 * @param varname
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public BlockPartitioner getPartitionerForRDDVariable(String varname) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//get input rdd and matrix characteristics
 		JavaPairRDD<MatrixIndexes,MatrixBlock> in = getBinaryBlockRDDHandleForVariable(varname);
@@ -453,11 +447,10 @@ public class SparkExecutionContext extends ExecutionContext
 	 * @param sc
 	 * @param block
 	 * @return
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 */
 	public static JavaPairRDD<MatrixIndexes,MatrixBlock> toJavaPairRDD(JavaSparkContext sc, MatrixBlock src, int brlen, int bclen) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{	
 		long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
 		LinkedList<Tuple2<MatrixIndexes,MatrixBlock>> list = new LinkedList<Tuple2<MatrixIndexes,MatrixBlock>>();
@@ -1054,11 +1047,10 @@ public class SparkExecutionContext extends ExecutionContext
 	 * 
 	 * @param var
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	@SuppressWarnings("unchecked")
 	public void repartitionAndCacheMatrixObject( String var ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//get input rdd and default storage level
 		MatrixObject mo = getMatrixObject(var);
@@ -1102,11 +1094,10 @@ public class SparkExecutionContext extends ExecutionContext
 	 * 
 	 * @param var
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	@SuppressWarnings("unchecked")
 	public void cacheMatrixObject( String var ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//get input rdd and default storage level
 		MatrixObject mo = getMatrixObject(var);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java
index 7dd80b9..72cf976 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java
@@ -41,7 +41,6 @@ import org.apache.hadoop.mapred.Reporter;
 import org.apache.hadoop.mapred.TextInputFormat;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.parfor.util.Cell;
@@ -553,10 +552,9 @@ public class DataPartitionerLocal extends DataPartitioner
 	 * @param bclen
 	 * @throws DMLRuntimeException
 	 * @throws IOException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	private void appendBlockToStagingArea( String dir, MatrixBlock mb, long row_offset, long col_offset, long brlen, long bclen ) 
-		throws DMLRuntimeException, IOException, DMLUnsupportedOperationException
+		throws DMLRuntimeException, IOException
 	{
 		//NOTE: for temporary block we always create dense representations
 		boolean sparse = mb.isInSparseFormat();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkMapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkMapper.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkMapper.java
index b4defa2..8f33081 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkMapper.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkMapper.java
@@ -27,7 +27,6 @@ import org.apache.hadoop.io.Writable;
 import org.apache.spark.api.java.function.PairFlatMapFunction;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
 import org.apache.sysml.runtime.controlprogram.parfor.util.PairWritableBlock;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
@@ -61,7 +60,7 @@ public class DataPartitionerRemoteSparkMapper extends ParWorker implements PairF
 	private PDataPartitionFormat _dpf = null;
 	
 	public DataPartitionerRemoteSparkMapper(MatrixCharacteristics mc, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		_rlen = mc.getRows();
 		_clen = mc.getCols();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java
index dcd42ec..334094d 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java
@@ -31,7 +31,6 @@ import org.apache.spark.api.java.function.VoidFunction;
 
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.parfor.util.PairWritableBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
@@ -50,7 +49,7 @@ public class DataPartitionerRemoteSparkReducer implements VoidFunction<Tuple2<Lo
 	private String _fnameNew = null;
 	
 	public DataPartitionerRemoteSparkReducer(String fnameNew, OutputInfo oi) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		_fnameNew = fnameNew;
 		//_oi = oi;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java
index 2ca3275..b18d5b8 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java
@@ -26,7 +26,6 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
 import org.apache.sysml.runtime.controlprogram.ProgramBlock;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
@@ -141,10 +140,9 @@ public abstract class ParWorker
 	 * 
 	 * @param task
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	protected void executeTask( Task task ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		LOG.trace("EXECUTE PARFOR_WORKER ID="+_workerID+" for task "+task.toCompactString());
 		
@@ -163,10 +161,9 @@ public abstract class ParWorker
 	 * 
 	 * @param task
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private void executeSetTask( Task task ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//monitoring start
 		Timing time1 = null, time2 = null;		
@@ -210,10 +207,9 @@ public abstract class ParWorker
 	 * 
 	 * @param task
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	private void executeRangeTask( Task task ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//monitoring start
 		Timing time1 = null, time2 = null;		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java
index a684c08..b334a62 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java
@@ -45,7 +45,6 @@ import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.parser.WhileStatementBlock;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ExternalFunctionProgramBlock;
 import org.apache.sysml.runtime.controlprogram.ExternalFunctionProgramBlockCP;
 import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
@@ -205,11 +204,10 @@ public class ProgramConverter
 	 * @param forceDeepCopy 
 	 * 
 	 * @return
-	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws DMLRuntimeException 
 	 */
 	public static ArrayList<ProgramBlock> rcreateDeepCopyProgramBlocks(ArrayList<ProgramBlock> childBlocks, long pid, int IDPrefix, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		ArrayList<ProgramBlock> tmp = new ArrayList<ProgramBlock>();
 		
@@ -267,11 +265,10 @@ public class ProgramConverter
 	 * @param IDPrefix
 	 * @param prog
 	 * @return
-	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws DMLRuntimeException 
 	 */
 	public static WhileProgramBlock createDeepCopyWhileProgramBlock(WhileProgramBlock wpb, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ArrayList<Instruction> predinst = createDeepCopyInstructionSet(wpb.getPredicate(), pid, IDPrefix, prog, fnStack, fnCreated, plain, true);
 		WhileProgramBlock tmpPB = new WhileProgramBlock(prog, predinst);
@@ -292,11 +289,10 @@ public class ProgramConverter
 	 * @param IDPrefix
 	 * @param prog
 	 * @return
-	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws DMLRuntimeException 
 	 */
 	public static IfProgramBlock createDeepCopyIfProgramBlock(IfProgramBlock ipb, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		ArrayList<Instruction> predinst = createDeepCopyInstructionSet(ipb.getPredicate(), pid, IDPrefix, prog, fnStack, fnCreated, plain, true);
 		IfProgramBlock tmpPB = new IfProgramBlock(prog, predinst);
@@ -319,10 +315,9 @@ public class ProgramConverter
 	 * @param prog
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static ForProgramBlock createDeepCopyForProgramBlock(ForProgramBlock fpb, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ForProgramBlock tmpPB = new ForProgramBlock(prog,fpb.getIterablePredicateVars());
 		tmpPB.setStatementBlock( createForStatementBlockCopy((ForStatementBlock)fpb.getStatementBlock(), pid, plain, forceDeepCopy));
@@ -343,10 +338,9 @@ public class ProgramConverter
 	 * @param prog
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static ForProgramBlock createShallowCopyForProgramBlock(ForProgramBlock fpb, Program prog ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ForProgramBlock tmpPB = new ForProgramBlock(prog,fpb.getIterablePredicateVars());
 		
@@ -365,10 +359,9 @@ public class ProgramConverter
 	 * @param prog
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static ForProgramBlock createShallowCopyParForProgramBlock(ParForProgramBlock pfpb, Program prog ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ParForProgramBlock tmpPB = new ParForProgramBlock(prog,pfpb.getIterablePredicateVars(),pfpb.getParForParams());
 		
@@ -391,11 +384,10 @@ public class ProgramConverter
 	 * @param IDPrefix
 	 * @param prog
 	 * @return
-	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws DMLRuntimeException 
 	 */
 	public static ParForProgramBlock createDeepCopyParForProgramBlock(ParForProgramBlock pfpb, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ParForProgramBlock tmpPB = null;
 		
@@ -432,11 +424,10 @@ public class ProgramConverter
 	 * 
 	 * @param oldName
 	 * @param pid
-	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws DMLRuntimeException  
 	 */
 	public static void createDeepCopyFunctionProgramBlock(String namespace, String oldName, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//fpb guaranteed to be non-null (checked inside getFunctionProgramBlock)
 		FunctionProgramBlock fpb = prog.getFunctionProgramBlock(namespace, oldName);
@@ -500,10 +491,9 @@ public class ProgramConverter
 	 * @param fpb
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static FunctionProgramBlock createDeepCopyFunctionProgramBlock(FunctionProgramBlock fpb, HashSet<String> fnStack, HashSet<String> fnCreated) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		if( fpb == null )
 			throw new DMLRuntimeException("Unable to create a deep copy of a non-existing FunctionProgramBlock.");
@@ -537,10 +527,9 @@ public class ProgramConverter
 	 * @param pid
 	 * @return
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static ArrayList<Instruction> createDeepCopyInstructionSet(ArrayList<Instruction> instSet, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean cpFunctions) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ArrayList<Instruction> tmp = new ArrayList<Instruction>();
 		for( Instruction inst : instSet )
@@ -565,10 +554,9 @@ public class ProgramConverter
 	 * @param pid
 	 * @return
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static Instruction cloneInstruction( Instruction oInst, long pid, boolean plain, boolean cpFunctions ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		Instruction inst = null;
 		String tmpString = oInst.toString();
@@ -597,7 +585,7 @@ public class ProgramConverter
 				inst = new MRJobInstruction( (MRJobInstruction)oInst );
 			}
 			else
-				throw new DMLUnsupportedOperationException("Failed to clone instruction: "+oInst);
+				throw new DMLRuntimeException("Failed to clone instruction: "+oInst);
 		}
 		catch(Exception ex)
 		{
@@ -827,10 +815,9 @@ public class ProgramConverter
 	 * @param body
 	 * @return
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static String serializeParForBody( ParForBody body ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ArrayList<ProgramBlock> pbs = body.getChildBlocks();
 		ArrayList<String> rVnames   = body.getResultVarNames();
@@ -900,10 +887,9 @@ public class ProgramConverter
 	 * @param prog
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static String serializeProgram( Program prog, ArrayList<ProgramBlock> pbs ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//note program contains variables, programblocks and function program blocks 
 		//but in order to avoid redundancy, we only serialize function program blocks
@@ -1279,10 +1265,9 @@ public class ProgramConverter
 	 * @param pbs
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static String rSerializeFunctionProgramBlocks(HashMap<String,FunctionProgramBlock> pbs, HashSet<String> cand) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		StringBuilder sb = new StringBuilder();
 		
@@ -1312,10 +1297,9 @@ public class ProgramConverter
 	 * @param pbs
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static String rSerializeProgramBlocks(ArrayList<ProgramBlock> pbs) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		StringBuilder sb = new StringBuilder();
 		int count = 0;
@@ -1338,10 +1322,9 @@ public class ProgramConverter
 	 * @param pb
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static String rSerializeProgramBlock( ProgramBlock pb) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		StringBuilder sb = new StringBuilder();
 		
@@ -1417,7 +1400,7 @@ public class ProgramConverter
 			
 			//check for nested remote ParFOR
 			if( PExecMode.valueOf( pfpb.getParForParams().get( ParForStatementBlock.EXEC_MODE )) == PExecMode.REMOTE_MR )
-				throw new DMLUnsupportedOperationException( NOT_SUPPORTED_MR_PARFOR );
+				throw new DMLRuntimeException( NOT_SUPPORTED_MR_PARFOR );
 			
 			sb.append( serializeStringArray(pfpb.getIterablePredicateVars()) );
 			sb.append( COMPONENTS_DELIM );
@@ -1536,10 +1519,9 @@ public class ProgramConverter
 	 * @param id
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static ParForBody parseParForBody( String in, int id ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ParForBody body = new ParForBody();
 		
@@ -1594,10 +1576,9 @@ public class ProgramConverter
 	 * @param id
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static Program parseProgram( String in, int id ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		String lin = in.substring( PARFOR_PROG_BEGIN.length(),in.length()-PARFOR_PROG_END.length()).trim(); 
 		
@@ -1647,10 +1628,9 @@ public class ProgramConverter
 	 * @param id
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static HashMap<String,FunctionProgramBlock> parseFunctionProgramBlocks( String in, Program prog, int id ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		HashMap<String,FunctionProgramBlock> ret = new HashMap<String, FunctionProgramBlock>();
 		HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer( in, ELEMENT_DELIM );
@@ -1681,11 +1661,10 @@ public class ProgramConverter
 	 * @param prog
 	 * @param id
 	 * @return
-	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws DMLRuntimeException 
 	 */
 	public static ArrayList<ProgramBlock> rParseProgramBlocks(String in, Program prog, int id) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ArrayList<ProgramBlock> pbs = new ArrayList<ProgramBlock>();
 		String tmpdata = in.substring(PARFOR_PBS_BEGIN.length(),in.length()-PARFOR_PBS_END.length()); ;
@@ -1707,10 +1686,9 @@ public class ProgramConverter
 	 * @param id
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static ProgramBlock rParseProgramBlock( String in, Program prog, int id )
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ProgramBlock pb = null;
 		
@@ -1729,7 +1707,7 @@ public class ProgramConverter
  		else if ( in.startsWith(PARFOR_PB_BEGIN ) )
 			pb = rParseGenericProgramBlock( in, prog, id );
 		else 
-			throw new DMLUnsupportedOperationException( NOT_SUPPORTED_PB+" "+in );
+			throw new DMLRuntimeException( NOT_SUPPORTED_PB+" "+in );
 		
 		return pb;
 	}
@@ -1741,10 +1719,9 @@ public class ProgramConverter
 	 * @param id
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static WhileProgramBlock rParseWhileProgramBlock( String in, Program prog, int id ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		String lin = in.substring( PARFOR_PB_WHILE.length(),in.length()-PARFOR_PB_END.length()); 
 		HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer(lin, COMPONENTS_DELIM);
@@ -1777,10 +1754,9 @@ public class ProgramConverter
 	 * @param id
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static ForProgramBlock rParseForProgramBlock( String in, Program prog, int id ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		String lin = in.substring( PARFOR_PB_FOR.length(),in.length()-PARFOR_PB_END.length()); 
 		HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer(lin, COMPONENTS_DELIM);
@@ -1819,10 +1795,9 @@ public class ProgramConverter
 	 * @param id
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static ParForProgramBlock rParseParForProgramBlock( String in, Program prog, int id ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		String lin = in.substring( PARFOR_PB_PARFOR.length(),in.length()-PARFOR_PB_END.length()); 
 		HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer(lin, COMPONENTS_DELIM);
@@ -1865,10 +1840,9 @@ public class ProgramConverter
 	 * @param id
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static IfProgramBlock rParseIfProgramBlock( String in, Program prog, int id ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		String lin = in.substring( PARFOR_PB_IF.length(),in.length()-PARFOR_PB_END.length()); 
 		HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer(lin, COMPONENTS_DELIM);
@@ -1903,10 +1877,9 @@ public class ProgramConverter
 	 * @param id
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static FunctionProgramBlock rParseFunctionProgramBlock( String in, Program prog, int id ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		String lin = in.substring( PARFOR_PB_FC.length(),in.length()-PARFOR_PB_END.length()); 
 		HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer(lin, COMPONENTS_DELIM);
@@ -1939,11 +1912,10 @@ public class ProgramConverter
 	 * @param prog
 	 * @param id
 	 * @return
-	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws DMLRuntimeException 
 	 */
 	public static ExternalFunctionProgramBlock rParseExternalFunctionProgramBlock( String in, Program prog, int id ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		String lin = in.substring( PARFOR_PB_EFC.length(),in.length()-PARFOR_PB_END.length()); 
 		HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer(lin, COMPONENTS_DELIM);
@@ -1983,10 +1955,9 @@ public class ProgramConverter
 	 * @param id
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static ProgramBlock rParseGenericProgramBlock( String in, Program prog, int id ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		String lin = in.substring( PARFOR_PB_BEGIN.length(),in.length()-PARFOR_PB_END.length()); 
 		StringTokenizer st = new StringTokenizer(lin,COMPONENTS_DELIM);
@@ -2003,11 +1974,10 @@ public class ProgramConverter
 	 * 
 	 * @param in
 	 * @return
-	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws DMLRuntimeException 
 	 */
 	public static ArrayList<Instruction> parseInstructions( String in, int id ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ArrayList<Instruction> insts = new ArrayList<Instruction>();  
 
@@ -2212,10 +2182,9 @@ public class ProgramConverter
 	 * @param in
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static ExecutionContext parseExecutionContext(String in, Program prog) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		ExecutionContext ec = null;
 		
@@ -2249,10 +2218,9 @@ public class ProgramConverter
 	 * @param replacement
 	 * @return
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static Instruction saveReplaceThreadID( Instruction inst, String pattern, String replacement ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//currently known, relevant instructions: createvar, rand, seq, extfunct, 
 		if( inst instanceof MRJobInstruction )

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java
index a511b9b..484888e 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java
@@ -31,7 +31,6 @@ import scala.Tuple2;
 
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
@@ -68,13 +67,12 @@ public class RemoteDPParForSpark
 	 * @param replication
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static RemoteParForJobReturn runJob(long pfid, String itervar, String matrixvar, String program, String resultFile, MatrixObject input, 
 			                                   ExecutionContext ec,
 			                                   PDataPartitionFormat dpf, OutputInfo oi, boolean tSparseCol, //config params
 			                                   boolean enableCPCaching, int numReducers )  //opt params
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		String jobname = "ParFor-DPESP";
 		long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java
index cd2875c..7ee578f 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java
@@ -29,7 +29,6 @@ import org.apache.spark.TaskContext;
 import org.apache.spark.api.java.function.PairFlatMapFunction;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
 import org.apache.sysml.runtime.controlprogram.caching.CacheableData;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
@@ -69,7 +68,7 @@ public class RemoteDPParForSparkWorker extends ParWorker implements PairFlatMapF
 	private Accumulator<Integer> _aIters = null;
 	
 	public RemoteDPParForSparkWorker(String program, String inputVar, String iterVar, boolean cpCaching, MatrixCharacteristics mc, boolean tSparseCol, PDataPartitionFormat dpf, OutputInfo oinfo, Accumulator<Integer> atasks, Accumulator<Integer> aiters) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//keep inputs (unfortunately, spark does not expose task ids and it would be implementation-dependent
 		//when this constructor is actually called; hence, we do lazy initialization on task execution)
@@ -147,12 +146,11 @@ public class RemoteDPParForSparkWorker extends ParWorker implements PairFlatMapF
 	/**
 	 * 
 	 * @param ID
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 * @throws IOException 
 	 */
 	private void configureWorker( long ID ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, IOException
 	{
 		_workerID = ID;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java
index 639266f..c228840 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java
@@ -30,7 +30,6 @@ import scala.Tuple2;
 
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
@@ -64,11 +63,10 @@ public class RemoteParForSpark
 	 * @param numMappers
 	 * @return
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static RemoteParForJobReturn runJob(long pfid, String program, List<Task> tasks, ExecutionContext ec,
 			                                   boolean cpCaching, int numMappers) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException  
+		throws DMLRuntimeException  
 	{
 		String jobname = "ParFor-ESP";
 		long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java
index 2d5ea5d..18b5ca2 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java
@@ -27,7 +27,6 @@ import org.apache.spark.TaskContext;
 import org.apache.spark.api.java.function.PairFlatMapFunction;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.CacheableData;
 import org.apache.sysml.runtime.controlprogram.parfor.util.IDHandler;
 import org.apache.sysml.runtime.util.LocalFileUtils;
@@ -51,7 +50,7 @@ public class RemoteParForSparkWorker extends ParWorker implements PairFlatMapFun
 	private Accumulator<Integer> _aIters = null;
 	
 	public RemoteParForSparkWorker(String program, boolean cpCaching, Accumulator<Integer> atasks, Accumulator<Integer> aiters) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//keep inputs (unfortunately, spark does not expose task ids and it would be implementation-dependent
 		//when this constructor is actually called; hence, we do lazy initialization on task execution)
@@ -93,12 +92,11 @@ public class RemoteParForSparkWorker extends ParWorker implements PairFlatMapFun
 	/**
 	 * 
 	 * @param ID
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 * @throws IOException 
 	 */
 	private void configureWorker( long ID ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, IOException
 	{
 		_workerID = ID;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java
index f4db2b5..35d8b84 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java
@@ -47,7 +47,6 @@ import org.apache.sysml.parser.WhileStatement;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.WhileStatementBlock;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
 import org.apache.sysml.runtime.controlprogram.FunctionProgramBlock;
 import org.apache.sysml.runtime.controlprogram.IfProgramBlock;
@@ -103,7 +102,7 @@ public class OptTreeConverter
 	}
 	
 	public static OptTree createOptTree( int ck, double cm, PlanInputType type, ParForStatementBlock pfsb, ParForProgramBlock pfpb, ExecutionContext ec ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException, HopsException
+		throws DMLRuntimeException, HopsException
 	{	
 		OptNode root = null;
 		switch( type )
@@ -133,11 +132,10 @@ public class OptTreeConverter
 	 * @param cm
 	 * @param pfpb
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static OptTree createOptTree( int ck, double cm, ParForProgramBlock pfpb ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		// TODO: Passing an empty variable map here, for now. Must be reevaluated 
 		// whenever this function is used.
@@ -149,7 +147,7 @@ public class OptTreeConverter
 	}
 	
 	public static OptTree createAbstractOptTree( int ck, double cm, ParForStatementBlock pfsb, ParForProgramBlock pfpb, Set<String> memo, ExecutionContext ec ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		OptTree tree = null;
 		OptNode root = null;
@@ -173,11 +171,10 @@ public class OptTreeConverter
 	 * @param vars
 	 * @param topLevel
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static OptNode rCreateOptNode( ProgramBlock pb, LocalVariableMap vars, boolean topLevel, boolean storeObjs ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		OptNode node = null;
 		
@@ -296,11 +293,10 @@ public class OptTreeConverter
 	 * @param instset
 	 * @param vars
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static ArrayList<OptNode> createOptNodes (ArrayList<Instruction> instset, LocalVariableMap vars, boolean storeObjs) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		ArrayList<OptNode> tmp = new ArrayList<OptNode>(instset.size());
 		for( Instruction inst : instset )
@@ -313,11 +309,10 @@ public class OptTreeConverter
 	 * @param inst
 	 * @param vars
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static OptNode createOptNode( Instruction inst, LocalVariableMap vars, boolean storeObjs ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		OptNode node = new OptNode(NodeType.INST);
 		String instStr = inst.toString();
@@ -344,7 +339,7 @@ public class OptTreeConverter
 				break;
 			default:
 				// In initial prototype, parfor is not supported for spark, so this exception will be thrown
-				throw new DMLUnsupportedOperationException("Unsupported instruction type.");
+				throw new DMLRuntimeException("Unsupported instruction type.");
 		}
 		
 		//create statistics 
@@ -891,11 +886,10 @@ public class OptTreeConverter
 	 * @param n
 	 * @param pbOld
 	 * @param pbNew
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException 
 	 */
 	public static void replaceProgramBlock(OptNode parent, OptNode n, ProgramBlock pbOld, ProgramBlock pbNew, boolean rtMap) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		ProgramBlock pbParent = null;
 		if( rtMap )
@@ -933,7 +927,7 @@ public class OptTreeConverter
 			replaceProgramBlock( fpb.getChildBlocks(), pbOld, pbNew );	
 		}
 		else
-			throw new DMLUnsupportedOperationException("Optimizer doesn't support "+pbParent.getClass().getName());
+			throw new DMLRuntimeException("Optimizer doesn't support "+pbParent.getClass().getName());
 		
 		//update repository
 		if( rtMap )

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java
index edae6a1..6ee8957 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java
@@ -51,7 +51,6 @@ import org.apache.sysml.parser.StatementBlock;
 import org.apache.sysml.parser.WhileStatement;
 import org.apache.sysml.parser.WhileStatementBlock;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
 import org.apache.sysml.runtime.controlprogram.FunctionProgramBlock;
 import org.apache.sysml.runtime.controlprogram.IfProgramBlock;
@@ -114,10 +113,9 @@ public class OptimizationWrapper
 	 * @param rtprog
 	 * @throws DMLRuntimeException 
 	 * @throws LanguageException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static void optimize(DMLProgram prog, Program rtprog, boolean monitor) 
-		throws DMLRuntimeException, LanguageException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException, LanguageException 
 	{
 		LOG.debug("ParFOR Opt: Running optimize all on DML program "+DMLScript.getUUID());
 		
@@ -156,10 +154,9 @@ public class OptimizationWrapper
 	 * @param sb
 	 * @param pb
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public static void optimize( POptMode type, ParForStatementBlock sb, ParForProgramBlock pb, ExecutionContext ec, boolean monitor ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		Timing time = new Timing(true);
 		
@@ -201,12 +198,11 @@ public class OptimizationWrapper
 	 * @param sb
 	 * @param pb
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws  
 	 */
 	@SuppressWarnings("unused")
 	private static void optimize( POptMode otype, int ck, double cm, ParForStatementBlock sb, ParForProgramBlock pb, ExecutionContext ec, boolean monitor ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		Timing time = new Timing(true);
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java
index 743321b..4d9fd60 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java
@@ -28,7 +28,6 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.sysml.hops.Hop;
 import org.apache.sysml.parser.ParForStatementBlock;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.POptMode;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
@@ -74,11 +73,10 @@ public abstract class Optimizer
 	 * 
 	 * @param plan
 	 * @return true if plan changed, false otherwise
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 */
 	public abstract boolean optimize(ParForStatementBlock sb, ParForProgramBlock pb, OptTree plan, CostEstimator est, ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException;	
+		throws DMLRuntimeException;	
 	
 	/**
 	 * 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java
index a2efb93..2daf841 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java
@@ -27,7 +27,6 @@ import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.lops.LopProperties;
 import org.apache.sysml.parser.ParForStatementBlock;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
@@ -77,7 +76,7 @@ public class OptimizerConstrained extends OptimizerRuleBased
 	 */
 	@Override
 	public boolean optimize(ParForStatementBlock sb, ParForProgramBlock pb, OptTree plan, CostEstimator est, ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		LOG.debug("--- "+getOptMode()+" OPTIMIZER -------");
 

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java
index 0dde4fb..8344522 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java
@@ -69,7 +69,6 @@ import org.apache.sysml.parser.ParForStatementBlock;
 import org.apache.sysml.parser.StatementBlock;
 import org.apache.sysml.parser.VariableSet;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
 import org.apache.sysml.runtime.controlprogram.FunctionProgramBlock;
 import org.apache.sysml.runtime.controlprogram.IfProgramBlock;
@@ -212,7 +211,7 @@ public class OptimizerRuleBased extends Optimizer
 	 */
 	@Override
 	public boolean optimize(ParForStatementBlock sb, ParForProgramBlock pb, OptTree plan, CostEstimator est, ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		LOG.debug("--- "+getOptMode()+" OPTIMIZER -------");
 
@@ -877,11 +876,10 @@ public class OptimizerRuleBased extends Optimizer
 	 * @throws DMLRuntimeException
 	 * @throws HopsException
 	 * @throws LopsException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	protected void recompileLIX( OptNode n, LocalVariableMap vars ) 
-		throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, HopsException, LopsException, IOException
 	{
 		Hop h = OptTreeConverter.getAbstractPlanMapping().getMappedHop(n.getID());
 		
@@ -1347,11 +1345,10 @@ public class OptimizerRuleBased extends Optimizer
 	 * @param M
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	@SuppressWarnings("all")
 	protected boolean rewriteNestedParallelism(OptNode n, double M, boolean flagLIX ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		boolean nested = false;
 	
@@ -2882,10 +2879,9 @@ public class OptimizerRuleBased extends Optimizer
 	 * 
 	 * @param n
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	protected void rewriteInjectSparkLoopCheckpointing(OptNode n) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//get program blocks of root parfor
 		Object[] progobj = OptTreeConverter.getAbstractPlanMapping().getMappedProg(n.getID());
@@ -2925,10 +2921,9 @@ public class OptimizerRuleBased extends Optimizer
 	 * 
 	 * @param n
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	protected void rewriteInjectSparkRepartition(OptNode n, LocalVariableMap vars) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//get program blocks of root parfor
 		Object[] progobj = OptTreeConverter.getAbstractPlanMapping().getMappedProg(n.getID());
@@ -3016,10 +3011,9 @@ public class OptimizerRuleBased extends Optimizer
 	 * 
 	 * @param n
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	protected void rewriteSetSparkEagerRDDCaching(OptNode n, LocalVariableMap vars) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//get program blocks of root parfor
 		Object[] progobj = OptTreeConverter.getAbstractPlanMapping().getMappedProg(n.getID());
@@ -3555,10 +3549,9 @@ public class OptimizerRuleBased extends Optimizer
 	 * 
 	 * @param n
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	protected void rewriteRemoveRecursiveParFor(OptNode n, LocalVariableMap vars) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		int count = 0; //num removed parfor
 		
@@ -3623,12 +3616,11 @@ public class OptimizerRuleBased extends Optimizer
 	 * @param parfor
 	 * @param recPBs
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws HopsException
 	 * @throws LanguageException
 	 */
 	protected void rFindAndUnfoldRecursiveFunction( OptNode n, ParForProgramBlock parfor, HashSet<ParForProgramBlock> recPBs, LocalVariableMap vars )
-		throws DMLRuntimeException, DMLUnsupportedOperationException, HopsException, LanguageException
+		throws DMLRuntimeException, HopsException, LanguageException
 	{
 		//unfold if found
 		if( n.getNodeType() == NodeType.FUNCCALL && n.isRecursive())
@@ -3747,11 +3739,10 @@ public class OptimizerRuleBased extends Optimizer
 	 * @param oldName
 	 * @param newName
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws HopsException 
 	 */
 	protected void rReplaceFunctionNames( OptNode n, String oldName, String newName ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException, HopsException
+		throws DMLRuntimeException, HopsException
 	{
 		if( n.getNodeType() == NodeType.FUNCCALL)
 		{
@@ -3798,11 +3789,10 @@ public class OptimizerRuleBased extends Optimizer
 	 * @param n
 	 * @param recPBs
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	protected int removeRecursiveParFor( OptNode n, HashSet<ParForProgramBlock> recPBs ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		int count = 0;
 		
@@ -3852,10 +3842,9 @@ public class OptimizerRuleBased extends Optimizer
 	 * 
 	 * @param n
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	protected void rewriteRemoveUnnecessaryParFor(OptNode n) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		int count = removeUnnecessaryParFor( n );
 		
@@ -3867,11 +3856,10 @@ public class OptimizerRuleBased extends Optimizer
 	 * 
 	 * @param n
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	protected int removeUnnecessaryParFor( OptNode n ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		int count = 0;
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java
index 5289ce2..6d571ea 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java
@@ -59,7 +59,6 @@ import org.apache.sysml.parser.ParseException;
 import org.apache.sysml.parser.Expression.DataType;
 import org.apache.sysml.parser.Expression.ValueType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ExternalFunctionProgramBlockCP;
 import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
 import org.apache.sysml.runtime.controlprogram.Program;
@@ -428,11 +427,10 @@ public class PerfTestTool
 	
 	/**
 	 * 
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	private static void registerInstructions() 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//reset ID sequences for consistent IDs
 		_seqInst.reset();
@@ -718,11 +716,10 @@ public class PerfTestTool
 	/**
 	 * 
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	private static void executeTest( ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, IOException
 	{
 		System.out.println("SystemML PERFORMANCE TEST TOOL:");
 		
@@ -826,11 +823,10 @@ public class PerfTestTool
 	 * 
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	private static double executeTestCase1D( TestMeasure m, InternalTestVariable v, DataFormat df, double varValue, ProgramBlock pb, boolean vectors, IOSchema schema, ExecutionContext ec ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, IOException
 	{
 		double datasize = -1;
 		double dim1 = -1, dim2 = -1;
@@ -950,11 +946,10 @@ public class PerfTestTool
 	 * @param schema
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws IOException
 	 */
 	private static double executeTestCaseMD( TestMeasure m, InternalTestVariable[] v, DataFormat df, double[] varValue, ProgramBlock pb, IOSchema schema, ExecutionContext ec ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException, IOException
+		throws DMLRuntimeException, IOException
 	{
 		//double datasize = DEFAULT_DATASIZE;
 		double sparsity = DEFAULT_SPARSITY;
@@ -1018,10 +1013,9 @@ public class PerfTestTool
 	 * @param pb
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public static double executeGenericProgramBlock( TestMeasure measure, ProgramBlock pb, ExecutionContext ec ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		double value = 0;
 		try
@@ -1276,13 +1270,12 @@ public class PerfTestTool
 	/**
 	 * 
 	 * @param fname
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 * @throws XMLStreamException
 	 * @throws IOException
 	 */
 	public static void externalReadProfile( String fname ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException, XMLStreamException, IOException
+		throws DMLRuntimeException, XMLStreamException, IOException
 	{
 		//validate external name (security issue)
 		if( !LocalFileUtils.validateExternalFilename(fname, false) )
@@ -1299,11 +1292,11 @@ public class PerfTestTool
 	 * @param dirname
 	 * @return
 	 * @throws IOException
-	 * @throws DMLUnsupportedOperationException
+	 * @throws DMLRuntimeException 
 	 */
 	@SuppressWarnings("all")
 	private static HashMap<Integer,Long> writeResults( String dirname ) 
-		throws IOException, DMLUnsupportedOperationException 
+		throws IOException, DMLRuntimeException 
 	{
 		HashMap<Integer,Long> map = new HashMap<Integer, Long>();
 		int count = 1;
@@ -1386,7 +1379,7 @@ public class PerfTestTool
 								//sbuff[offset+2*plen+plen*(plen-1)/2] = String.valueOf(tmp);
 							}
 							else
-								throw new DMLUnsupportedOperationException("More than 3 dims currently not supported.");
+								throw new DMLRuntimeException("More than 3 dims currently not supported.");
 								
 						}
 							

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java
index a914c0b..8844dc6 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java
@@ -44,7 +44,6 @@ import org.apache.sysml.parser.StatementBlock;
 import org.apache.sysml.parser.WhileStatement;
 import org.apache.sysml.parser.WhileStatementBlock;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
 import org.apache.sysml.runtime.controlprogram.IfProgramBlock;
 import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
@@ -73,13 +72,12 @@ public class ProgramRecompiler
 	 * @param sbs
 	 * @return
 	 * @throws IOException 
-	 * @throws DMLUnsupportedOperationException 
 	 * @throws DMLRuntimeException 
 	 * @throws LopsException 
 	 * @throws HopsException 
 	 */
 	public static ArrayList<ProgramBlock> generatePartitialRuntimeProgram(Program rtprog, ArrayList<StatementBlock> sbs) 
-		throws LopsException, DMLRuntimeException, DMLUnsupportedOperationException, IOException, HopsException
+		throws LopsException, DMLRuntimeException, IOException, HopsException
 	{
 		ArrayList<ProgramBlock> ret = new ArrayList<ProgramBlock>();
 		DMLConfig config = ConfigurationManager.getDMLConfig();
@@ -110,11 +108,10 @@ public class ProgramRecompiler
 	 * @param var
 	 * @param ec
 	 * @param force
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static void rFindAndRecompileIndexingHOP( StatementBlock sb, ProgramBlock pb, String var, ExecutionContext ec, boolean force )
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		if( pb instanceof IfProgramBlock && sb instanceof IfStatementBlock )
 		{
@@ -222,11 +219,10 @@ public class ProgramRecompiler
 	 * @param parforSB
 	 * @param vars
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static LocalVariableMap getReusableScalarVariables( DMLProgram prog, StatementBlock parforSB, LocalVariableMap vars ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		LocalVariableMap constVars = new LocalVariableMap(); 
 		
@@ -244,7 +240,7 @@ public class ProgramRecompiler
 	}
 	
 	public static void replaceConstantScalarVariables( StatementBlock sb, LocalVariableMap vars )
-		throws DMLUnsupportedOperationException, DMLRuntimeException, HopsException
+		throws DMLRuntimeException, HopsException
 	{
 		if( sb instanceof IfStatementBlock )
 		{
@@ -312,11 +308,10 @@ public class ProgramRecompiler
 	 * @param parforSB
 	 * @param var
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static boolean isApplicableForReuseVariable( DMLProgram prog, StatementBlock parforSB, String var )
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		boolean ret = false;
 		
@@ -331,11 +326,10 @@ public class ProgramRecompiler
 	 * @param sb
 	 * @param parforSB
 	 * @param var
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	private static boolean isApplicableForReuseVariable( StatementBlock sb, StatementBlock parforSB, String var )
-			throws DMLUnsupportedOperationException, DMLRuntimeException
+			throws DMLRuntimeException
 	{
 		boolean ret = false;
 		
@@ -533,10 +527,9 @@ public class ProgramRecompiler
 	 * @param offset
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	protected static ArrayList<Instruction> createNestedParallelismToInstructionSet(String iterVar, String offset) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//create instruction string
 		StringBuilder sb = new StringBuilder("CP"+Lop.OPERAND_DELIMITOR+"+"+Lop.OPERAND_DELIMITOR);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/functionobjects/Builtin.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/Builtin.java b/src/main/java/org/apache/sysml/runtime/functionobjects/Builtin.java
index beea376..20299e9 100644
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/Builtin.java
+++ b/src/main/java/org/apache/sysml/runtime/functionobjects/Builtin.java
@@ -26,7 +26,6 @@ import org.apache.commons.math3.util.FastMath;
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.DMLScriptException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 
 
 /**
@@ -281,7 +280,7 @@ public class Builtin extends ValueFunction
 		throw new CloneNotSupportedException();
 	}
 	
-	public boolean checkArity(int _arity) throws DMLUnsupportedOperationException {
+	public boolean checkArity(int _arity) throws DMLRuntimeException {
 		switch (bFunc) {
 		case ABS:
 		case SIN:
@@ -319,7 +318,7 @@ public class Builtin extends ValueFunction
 		case MIN:
 			return (_arity == 2);
 		default:
-			throw new DMLUnsupportedOperationException("checkNumberOfOperands(): Unknown opcode: " + bFunc);
+			throw new DMLRuntimeException("checkNumberOfOperands(): Unknown opcode: " + bFunc);
 		}
 	}
 	

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java b/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
index 8ecb2e1..a84b912 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
@@ -25,7 +25,6 @@ import org.apache.sysml.lops.DataGen;
 import org.apache.sysml.lops.UnaryCP;
 import org.apache.sysml.lops.LopProperties.ExecType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.cp.AggregateBinaryCPInstruction;
 import org.apache.sysml.runtime.instructions.cp.AggregateTernaryCPInstruction;
 import org.apache.sysml.runtime.instructions.cp.AggregateUnaryCPInstruction;
@@ -257,7 +256,7 @@ public class CPInstructionParser extends InstructionParser
 	}
 
 	public static CPInstruction parseSingleInstruction (String str ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		if ( str == null || str.isEmpty() )
 			return null;
@@ -272,7 +271,7 @@ public class CPInstructionParser extends InstructionParser
 	}
 	
 	public static CPInstruction parseSingleInstruction ( CPINSTRUCTION_TYPE cptype, String str ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		ExecType execType = null; 
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/Instruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/Instruction.java b/src/main/java/org/apache/sysml/runtime/instructions/Instruction.java
index 3b28762..97f792d 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/Instruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/Instruction.java
@@ -26,7 +26,6 @@ import org.apache.sysml.api.monitoring.Location;
 import org.apache.sysml.lops.Lop;
 import org.apache.sysml.parser.DataIdentifier;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 
 
@@ -197,11 +196,10 @@ public abstract class Instruction
 	 * 
 	 * @param ec
 	 * @return
-	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException 
+	 * @throws DMLRuntimeException 
 	 */
 	public Instruction preprocessInstruction(ExecutionContext ec)
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		//update debug status
 		ec.updateDebugState( this );
@@ -215,10 +213,9 @@ public abstract class Instruction
 	 * 
 	 * @param ec
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public abstract void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException;
+		throws DMLRuntimeException;
 	
 	/**
 	 * This method should be used for any tear down after executing this instruction.

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/InstructionParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/InstructionParser.java b/src/main/java/org/apache/sysml/runtime/instructions/InstructionParser.java
index e00cde3..5ae3124 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/InstructionParser.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/InstructionParser.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions;
 
 import org.apache.sysml.lops.LopProperties.ExecType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.cp.CPInstruction.CPINSTRUCTION_TYPE;
 import org.apache.sysml.runtime.instructions.mr.MRInstruction.MRINSTRUCTION_TYPE;
 import org.apache.sysml.runtime.instructions.spark.SPInstruction.SPINSTRUCTION_TYPE;
@@ -30,7 +29,7 @@ import org.apache.sysml.runtime.instructions.spark.SPInstruction.SPINSTRUCTION_T
 public class InstructionParser 
 {		
 	public static Instruction parseSingleInstruction ( String str ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{	
 		if ( str == null || str.isEmpty() )
 			return null;
@@ -59,7 +58,7 @@ public class InstructionParser
 	}
 	
 	public static Instruction[] parseMixedInstructions ( String str ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		if ( str == null || str.isEmpty() )
 			return null;

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/InstructionUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/InstructionUtils.java b/src/main/java/org/apache/sysml/runtime/instructions/InstructionUtils.java
index 675a7a0..c8d406e 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/InstructionUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/InstructionUtils.java
@@ -40,7 +40,6 @@ import org.apache.sysml.lops.WeightedSquaredLossR;
 import org.apache.sysml.lops.WeightedUnaryMM;
 import org.apache.sysml.lops.WeightedUnaryMMR;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.And;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.runtime.functionobjects.Builtin.BuiltinFunctionCode;
@@ -229,11 +228,8 @@ public class InstructionUtils
 	 * 
 	 * @param str
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 */
-	public static MRINSTRUCTION_TYPE getMRType( String str ) 
-		throws DMLUnsupportedOperationException 
-	{
+	public static MRINSTRUCTION_TYPE getMRType( String str ) {
 		String opcode = getOpCode(str);
 		MRINSTRUCTION_TYPE mrtype = MRInstructionParser.String2MRInstructionType.get( opcode ); 
 		return mrtype;
@@ -243,11 +239,8 @@ public class InstructionUtils
 	 * 
 	 * @param str
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 */
-	public static SPINSTRUCTION_TYPE getSPType( String str ) 
-		throws DMLUnsupportedOperationException 
-	{
+	public static SPINSTRUCTION_TYPE getSPType( String str ) {
 		String opcode = getOpCode(str);
 		SPINSTRUCTION_TYPE sptype = SPInstructionParser.String2SPInstructionType.get( opcode ); 
 		return sptype;
@@ -257,11 +250,8 @@ public class InstructionUtils
 	 * 
 	 * @param str
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 */
-	public static CPINSTRUCTION_TYPE getCPType( String str ) 
-		throws DMLUnsupportedOperationException 
-	{
+	public static CPINSTRUCTION_TYPE getCPType( String str ) {
 		String opcode = getOpCode(str);
 		CPINSTRUCTION_TYPE cptype = CPInstructionParser.String2CPInstructionType.get( opcode ); 
 		return cptype;
@@ -272,14 +262,12 @@ public class InstructionUtils
 	 * @param opcode
 	 * @return
 	 */
-	public static boolean isBuiltinFunction ( String opcode ) 
-	{
+	public static boolean isBuiltinFunction( String opcode ) {
 		Builtin.BuiltinFunctionCode bfc = Builtin.String2BuiltinFunctionCode.get(opcode);
 		return (bfc != null);
 	}
 	
-	public static boolean isOperand(String str) 
-	{
+	public static boolean isOperand(String str) {
 		//note: split required for empty tokens
 		String[] parts = str.split(Instruction.DATATYPE_PREFIX);
 		return (parts.length > 1);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/MRInstructionParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/MRInstructionParser.java b/src/main/java/org/apache/sysml/runtime/instructions/MRInstructionParser.java
index 993f0b1..894e7e9 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/MRInstructionParser.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/MRInstructionParser.java
@@ -36,7 +36,6 @@ import org.apache.sysml.lops.WeightedSquaredLossR;
 import org.apache.sysml.lops.WeightedUnaryMM;
 import org.apache.sysml.lops.WeightedUnaryMMR;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.mr.AggregateBinaryInstruction;
 import org.apache.sysml.runtime.instructions.mr.AggregateInstruction;
 import org.apache.sysml.runtime.instructions.mr.AggregateUnaryInstruction;
@@ -297,7 +296,7 @@ public class MRInstructionParser extends InstructionParser
 	
 	
 	public static MRInstruction parseSingleInstruction (String str ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		if ( str == null || str.isEmpty() )
 			return null;
@@ -307,7 +306,7 @@ public class MRInstructionParser extends InstructionParser
 	}
 	
 	public static MRInstruction parseSingleInstruction (MRINSTRUCTION_TYPE mrtype, String str ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		if ( str == null || str.isEmpty() )
 			return null;
@@ -451,7 +450,7 @@ public class MRInstructionParser extends InstructionParser
 		}
 	}
 	
-	public static MRInstruction[] parseMixedInstructions ( String str ) throws DMLUnsupportedOperationException, DMLRuntimeException {
+	public static MRInstruction[] parseMixedInstructions ( String str ) throws DMLRuntimeException {
 		if ( str == null || str.isEmpty() )
 			return null;
 		
@@ -464,7 +463,7 @@ public class MRInstructionParser extends InstructionParser
 		return mrinst;
 	}
 	
-	public static AggregateInstruction[] parseAggregateInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException 
+	public static AggregateInstruction[] parseAggregateInstructions(String str) throws DMLRuntimeException 
 	{
 		AggregateInstruction[] inst=null;
 		if(str!=null && !str.isEmpty())
@@ -480,7 +479,7 @@ public class MRInstructionParser extends InstructionParser
 		return inst;
 	}
 	
-	public static ReblockInstruction[] parseReblockInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException 
+	public static ReblockInstruction[] parseReblockInstructions(String str) throws DMLRuntimeException 
 	{
 		ReblockInstruction[] inst=null;
 		if(str!=null && !str.isEmpty())
@@ -496,7 +495,7 @@ public class MRInstructionParser extends InstructionParser
 		return inst;
 	}
 	
-	public static CSVReblockInstruction[] parseCSVReblockInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException 
+	public static CSVReblockInstruction[] parseCSVReblockInstructions(String str) throws DMLRuntimeException 
 	{
 		CSVReblockInstruction[] inst=null;
 		if(str!=null && !str.isEmpty())
@@ -512,7 +511,7 @@ public class MRInstructionParser extends InstructionParser
 		return inst;
 	}
 	
-	public static CSVWriteInstruction[] parseCSVWriteInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException 
+	public static CSVWriteInstruction[] parseCSVWriteInstructions(String str) throws DMLRuntimeException 
 	{
 		CSVWriteInstruction[] inst=null;
 		if(str!=null && !str.isEmpty())
@@ -528,7 +527,7 @@ public class MRInstructionParser extends InstructionParser
 		return inst;
 	}
 	
-	public static AggregateBinaryInstruction[] parseAggregateBinaryInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException 
+	public static AggregateBinaryInstruction[] parseAggregateBinaryInstructions(String str) throws DMLRuntimeException 
 	{
 		AggregateBinaryInstruction[] inst=null;
 		if(str!=null && !str.isEmpty())
@@ -544,7 +543,7 @@ public class MRInstructionParser extends InstructionParser
 		return inst;
 	}
 	
-	public static DataGenMRInstruction[] parseDataGenInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException 
+	public static DataGenMRInstruction[] parseDataGenInstructions(String str) throws DMLRuntimeException 
 	{
 		DataGenMRInstruction[] inst=null;
 		if(str!=null && !str.isEmpty())
@@ -560,7 +559,7 @@ public class MRInstructionParser extends InstructionParser
 		return inst;
 	}
 	
-	public static MRInstruction[] parseCombineInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException 
+	public static MRInstruction[] parseCombineInstructions(String str) throws DMLRuntimeException 
 	{
 		MRInstruction[] inst=null;
 		if(str!=null && !str.isEmpty())
@@ -582,7 +581,7 @@ public class MRInstructionParser extends InstructionParser
 		return inst;
 	}
 	
-	public static CM_N_COVInstruction[] parseCM_N_COVInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException 
+	public static CM_N_COVInstruction[] parseCM_N_COVInstructions(String str) throws DMLRuntimeException 
 	{
 		CM_N_COVInstruction[] inst=null;
 		if(str!=null && !str.isEmpty())
@@ -599,7 +598,7 @@ public class MRInstructionParser extends InstructionParser
 	}
 
 	public static GroupedAggregateInstruction[] parseGroupedAggInstructions(String str) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException{
+	throws DMLRuntimeException{
 		GroupedAggregateInstruction[] inst=null;
 		if(str!=null && !str.isEmpty())
 		{



[02/11] incubator-systemml git commit: [SYSTEMML-613] Refactoring transform encoders (api, simplify, cleanup)

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/d9e0748b/src/test/java/org/apache/sysml/test/integration/functions/transform/ScalingTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/transform/ScalingTest.java b/src/test/java/org/apache/sysml/test/integration/functions/transform/ScalingTest.java
index 058308b..d0d351c 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/transform/ScalingTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/transform/ScalingTest.java
@@ -30,7 +30,6 @@ import org.apache.hadoop.fs.Path;
 import org.apache.wink.json4j.JSONArray;
 import org.apache.wink.json4j.JSONObject;
 import org.junit.Test;
-
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.conf.ConfigurationManager;
@@ -39,7 +38,7 @@ import org.apache.sysml.runtime.io.ReaderBinaryBlock;
 import org.apache.sysml.runtime.io.ReaderTextCSV;
 import org.apache.sysml.runtime.matrix.data.CSVFileFormatProperties;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
-import org.apache.sysml.runtime.transform.TransformationAgent.TX_METHOD;
+import org.apache.sysml.runtime.transform.TfUtils;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.integration.TestConfiguration;
 import org.apache.sysml.test.utils.TestUtils;
@@ -141,7 +140,7 @@ public class ScalingTest extends AutomatedTestBase
 				obj.put(METHOD, SCALE_METHOD_Z);
 			scaleSpec.add(obj);
 		}
-		outputSpec.put(TX_METHOD.SCALE.toString(), scaleSpec);
+		outputSpec.put(TfUtils.TXMETHOD_SCALE, scaleSpec);
 		
 		FileSystem fs = FileSystem.get(TestUtils.conf);
 		BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fs.create(new Path(specFile),true)));


[05/11] incubator-systemml git commit: [SYSTEMML-616] Cleanup exception handling (stage 1, remove unnecessary)

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixBlock.java b/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixBlock.java
index 8e9a681..80b76c5 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixBlock.java
@@ -40,7 +40,6 @@ import org.apache.sysml.lops.MMTSJ.MMTSJType;
 import org.apache.sysml.lops.MapMultChain.ChainType;
 import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.caching.CacheBlock;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.runtime.functionobjects.CM;
@@ -2793,7 +2792,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 */
 	@Override
 	public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		MatrixBlock ret = checkType(result);
 		
@@ -2819,7 +2818,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 */
 	@Override
 	public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		MatrixBlock ret = checkType(result);
 		
@@ -2863,11 +2862,10 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	/**
 	 * 
 	 * @param op
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	private void sparseUnaryOperations(UnaryOperator op, MatrixBlock ret) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//early abort possible since sparse-safe
 		if( isEmptyBlock(false) )
@@ -2915,11 +2913,10 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * 
 	 * @param op
 	 * @param ret
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	private void denseUnaryOperations(UnaryOperator op, MatrixBlock ret) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//prepare 0-value init (determine if unnecessarily sparse-unsafe)
 		double val0 = op.fn.execute(0);
@@ -2944,12 +2941,11 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	/**
 	 * 
 	 * @param op
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	@Override
 	public void unaryOperationsInPlace(UnaryOperator op) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		if(op.sparseSafe)
 			sparseUnaryOperationsInPlace(op);
@@ -2961,11 +2957,10 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * only apply to non zero cells
 	 * 
 	 * @param op
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	private void sparseUnaryOperationsInPlace(UnaryOperator op) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//early abort possible since sparse-safe
 		if( isEmptyBlock(false) )
@@ -3014,7 +3009,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	}
 	
 	private void denseUnaryOperationsInPlace(UnaryOperator op) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		if( sparse ) //SPARSE MATRIX
 		{
@@ -3057,7 +3052,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * 
 	 */
 	public MatrixValue binaryOperations(BinaryOperator op, MatrixValue thatValue, MatrixValue result) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		MatrixBlock that = checkType(thatValue);
 		MatrixBlock ret = checkType(result);
@@ -3089,7 +3084,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * 
 	 */
 	public void binaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		MatrixBlock that=checkType(thatValue);
 		if( !LibMatrixBincell.isValidDimensionsBinary(this, that) ) {
@@ -3112,7 +3107,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	
 	public void incrementalAggregate(AggregateOperator aggOp, MatrixValue correction, 
 			MatrixValue newWithCorrection)
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		//assert(aggOp.correctionExists); 
 		MatrixBlock cor=checkType(correction);
@@ -3355,7 +3350,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	}
 	
 	public void incrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection)
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//assert(aggOp.correctionExists);
 		MatrixBlock newWithCor=checkType(newWithCorrection);
@@ -3656,11 +3651,10 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param that
 	 * @param ret
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public MatrixBlock appendOperations( MatrixBlock that, MatrixBlock ret ) 	
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		//default append-cbind
 		return appendOperations(that, ret, true);
@@ -3671,11 +3665,10 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param that
 	 * @param ret
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public MatrixBlock appendOperations( MatrixBlock that, MatrixBlock ret, boolean cbind ) 	
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		MatrixBlock result = checkType( ret );
 		final int m = cbind ? rlen : rlen+that.rlen;
@@ -3727,10 +3720,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param tstype
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public MatrixBlock transposeSelfMatrixMultOperations( MatrixBlock out, MMTSJType tstype ) 	
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		return transposeSelfMatrixMultOperations(out, tstype, 1);
 	}
@@ -3741,10 +3733,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param tstype
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public MatrixBlock transposeSelfMatrixMultOperations( MatrixBlock out, MMTSJType tstype, int k ) 	
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//check for transpose type
 		if( !(tstype == MMTSJType.LEFT || tstype == MMTSJType.RIGHT) )
@@ -3777,10 +3768,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param ctype
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public MatrixBlock chainMatrixMultOperations( MatrixBlock v, MatrixBlock w, MatrixBlock out, ChainType ctype ) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 	
+		throws DMLRuntimeException 	
 	{
 		return chainMatrixMultOperations(v, w, out, ctype, 1);
 	}
@@ -3793,10 +3783,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param ctype
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public MatrixBlock chainMatrixMultOperations( MatrixBlock v, MatrixBlock w, MatrixBlock out, ChainType ctype, int k ) 	
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//check for transpose type
 		if( !(ctype == ChainType.XtXv || ctype == ChainType.XtwXv || ctype == ChainType.XtXvy) )
@@ -3832,10 +3821,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param out1Val
 	 * @param out2Val
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public void permutationMatrixMultOperations( MatrixValue m2Val, MatrixValue out1Val, MatrixValue out2Val ) 	
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		permutationMatrixMultOperations(m2Val, out1Val, out2Val, 1);
 	}
@@ -3847,10 +3835,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param out1Val
 	 * @param out2Val
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public void permutationMatrixMultOperations( MatrixValue m2Val, MatrixValue out1Val, MatrixValue out2Val, int k ) 	
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//check input types and dimensions
 		MatrixBlock m2 = checkType(m2Val);
@@ -3876,10 +3863,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param inplace
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public MatrixBlock leftIndexingOperations(MatrixBlock rhsMatrix, IndexRange ixrange, MatrixBlock ret, boolean inplace) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		return leftIndexingOperations(
 				rhsMatrix, (int)ixrange.rowStart, (int)ixrange.rowEnd, 
@@ -3895,11 +3881,10 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 *   2) result[rowLower:rowUpper, colLower:colUpper] = rhsMatrix;
 	 *  
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public MatrixBlock leftIndexingOperations(MatrixBlock rhsMatrix, int rl, int ru, 
 			int cl, int cu, MatrixBlock ret, boolean inplace) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{	
 		// Check the validity of bounds
 		if ( rl < 0 || rl >= getNumRows() || ru < rl || ru >= getNumRows()
@@ -3977,10 +3962,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param ret
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public MatrixBlock leftIndexingOperations(ScalarObject scalar, int rl, int cl, MatrixBlock ret, boolean inplace) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		double inVal = scalar.getDoubleValue();
 		boolean sp = estimateSparsityOnLeftIndexing(rlen, clen, nonZeros, 1, 1, (inVal!=0)?1:0);
@@ -4018,7 +4002,6 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * Extracted submatrix is returned as "result". Note: This operation is now 0-based.
 	 * 
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	public MatrixBlock sliceOperations(int rl, int ru, int cl, int cu, MatrixBlock ret) 
 		throws DMLRuntimeException 
@@ -4274,7 +4257,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	public void appendOperations(MatrixValue v2,
 			ArrayList<IndexedMatrixValue> outlist, int blockRowFactor,
 			int blockColFactor, boolean cbind, boolean m2IsLast, int nextNCol)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{	
 		MatrixBlock m2 = (MatrixBlock)v2;
 		
@@ -4318,7 +4301,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * 
 	 */
 	public MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		checkType(result);
 		double currentSparsity=(double)nonZeros/(double)rlen/(double)clen;
@@ -4427,7 +4410,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, 
 			int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn)
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		return aggregateUnaryOperations(op, result, 
 				blockingFactorRow, blockingFactorCol, indexesIn, false);
@@ -4436,7 +4419,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, 
 			int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn, boolean inCP) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		CellIndex tempCellIndex = new CellIndex(-1,-1);
 		op.indexFn.computeDimension(rlen, clen, tempCellIndex);
@@ -4920,7 +4903,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return covobj;
 	}
 
-	public MatrixValue sortOperations(MatrixValue weights, MatrixValue result) throws DMLRuntimeException, DMLUnsupportedOperationException {
+	public MatrixValue sortOperations(MatrixValue weights, MatrixValue result) throws DMLRuntimeException {
 		boolean wtflag = (weights!=null);
 		
 		MatrixBlock wts= (weights == null ? null : checkType(weights));
@@ -5074,7 +5057,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	}
 	
 	public MatrixValue pickValues(MatrixValue quantiles, MatrixValue ret) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException {
+		throws DMLRuntimeException {
 	
 		MatrixBlock qs=checkType(quantiles);
 		
@@ -5177,12 +5160,11 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param result
 	 * @param op
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public MatrixValue aggregateBinaryOperations(MatrixIndexes m1Index, MatrixValue m1Value, MatrixIndexes m2Index, MatrixValue m2Value, 
 			MatrixValue result, AggregateBinaryOperator op ) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		return aggregateBinaryOperations(m1Value, m2Value, result, op);
 	}
@@ -5191,7 +5173,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * 
 	 */
 	public MatrixValue aggregateBinaryOperations(MatrixValue m1Value, MatrixValue m2Value, MatrixValue result, AggregateBinaryOperator op) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//check input types, dimensions, configuration
 		MatrixBlock m1 = checkType(m1Value);
@@ -5231,11 +5213,10 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param m3
 	 * @param op
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public ScalarObject aggregateTernaryOperations(MatrixBlock m1, MatrixBlock m2, MatrixBlock m3, AggregateBinaryOperator op) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//check input dimensions and operators
 		if( m1.rlen!=m2.rlen || m1.clen!=m2.clen || (m3!=null && (m2.rlen!=m3.rlen || m2.clen!=m3.clen)) )
@@ -5263,11 +5244,10 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param bOp
 	 * @oaram uaggOp
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public MatrixBlock  uaggouterchainOperations(MatrixBlock mbLeft, MatrixBlock mbRight, MatrixBlock mbOut, BinaryOperator bOp, AggregateUnaryOperator uaggOp) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException
+		throws DMLRuntimeException
 	{
 		double bv[] = DataConverter.convertToDoubleVector(mbRight);
 		int bvi[] = null;
@@ -5313,10 +5293,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param op
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public MatrixBlock groupedAggOperations(MatrixValue tgt, MatrixValue wghts, MatrixValue ret, int ngroups, Operator op) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		//single-threaded grouped aggregate 
 		return groupedAggOperations(tgt, wghts, ret, ngroups, op, 1);
@@ -5332,10 +5311,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param k
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public MatrixBlock groupedAggOperations(MatrixValue tgt, MatrixValue wghts, MatrixValue ret, int ngroups, Operator op, int k) 
-		throws DMLRuntimeException, DMLUnsupportedOperationException 		
+		throws DMLRuntimeException 		
 	{
 		//setup input matrices
 		MatrixBlock target = checkType(tgt);
@@ -5396,10 +5374,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param select
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public MatrixBlock removeEmptyOperations( MatrixBlock ret, boolean rows, MatrixBlock select )
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{	
 		MatrixBlock result = checkType(ret);
 		return LibMatrixReorg.rmempty(this, result, rows, select);
@@ -5411,10 +5388,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param rows
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public MatrixBlock removeEmptyOperations( MatrixBlock ret, boolean rows)
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{
 		return removeEmptyOperations(ret, rows, null);
 	}
@@ -5428,10 +5404,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param ignore
 	 * @return
 	 * @throws DMLRuntimeException
-	 * @throws DMLUnsupportedOperationException
 	 */
 	public MatrixBlock rexpandOperations( MatrixBlock ret, double max, boolean rows, boolean cast, boolean ignore )
-		throws DMLRuntimeException, DMLUnsupportedOperationException 
+		throws DMLRuntimeException 
 	{	
 		MatrixBlock result = checkType(ret);
 		return LibMatrixReorg.rexpand(this, result, max, rows, cast, ignore);
@@ -5440,7 +5415,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	
 	@Override
 	public MatrixValue replaceOperations(MatrixValue result, double pattern, double replacement) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		MatrixBlock ret = checkType(result);
 		examSparsity(); //ensure its in the right format
@@ -5535,12 +5510,11 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * (v2) from sclar_input2 (scalarThat)
 	 * (i3,j3,w)  from input3 (that2)
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
 	@Override
 	public void ternaryOperations(Operator op, double scalarThat,
 			MatrixValue that2Val, CTableMap resultMap, MatrixBlock resultBlock)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		MatrixBlock that2 = checkType(that2Val);
 		CTable ctable = CTable.getCTableFnObject();
@@ -5580,7 +5554,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	@Override
 	public void ternaryOperations(Operator op, double scalarThat,
 			double scalarThat2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		CTable ctable = CTable.getCTableFnObject();
 		double v2 = scalarThat;
@@ -5616,7 +5590,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	@Override
 	public void ternaryOperations(Operator op, MatrixIndexes ix1, double scalarThat,
 			boolean left, int brlen, CTableMap resultMap, MatrixBlock resultBlock)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{	
 		CTable ctable = CTable.getCTableFnObject();
 		double w = scalarThat;
@@ -5663,7 +5637,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	@Override
 	public void ternaryOperations(Operator op, MatrixValue thatVal, double scalarThat2, boolean ignoreZeros,
 			     CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{	
 		//setup ctable computation
 		MatrixBlock that = checkType(thatVal);
@@ -5733,7 +5707,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * (w)  from scalar_input3 (scalarThat2)
 	 */
 	public void ternaryOperations(Operator op, MatrixValue thatMatrix, double thatScalar, MatrixBlock resultBlock)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{	
 		MatrixBlock that = checkType(thatMatrix);
 		CTable ctable = CTable.getCTableFnObject();
@@ -5763,14 +5737,14 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * (i1,j1,w)  from input3 (that2)
 	 */
 	public void ternaryOperations(Operator op, MatrixValue thatVal, MatrixValue that2Val, CTableMap resultMap)
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		ternaryOperations(op, thatVal, that2Val, resultMap, null);
 	}
 		
 	@Override
 	public void ternaryOperations(Operator op, MatrixValue thatVal, MatrixValue that2Val, CTableMap resultMap, MatrixBlock resultBlock)
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{	
 		MatrixBlock that = checkType(thatVal);
 		MatrixBlock that2 = checkType(that2Val);
@@ -5805,7 +5779,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	
 	@Override
 	public MatrixValue quaternaryOperations(QuaternaryOperator qop, MatrixValue um, MatrixValue vm, MatrixValue wm, MatrixValue out)
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		return quaternaryOperations(qop, um, vm, wm, out, 1);
 	}
@@ -5820,11 +5794,10 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param wt
 	 * @param k
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public MatrixValue quaternaryOperations(QuaternaryOperator qop, MatrixValue um, MatrixValue vm, MatrixValue wm, MatrixValue out, int k)
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//check input dimensions
 		if( getNumRows() != um.getNumRows() )

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixCell.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixCell.java b/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixCell.java
index 4da2e1b..92794aa 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixCell.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixCell.java
@@ -29,7 +29,6 @@ import java.util.ArrayList;
 import org.apache.hadoop.io.WritableComparable;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.CTable;
 import org.apache.sysml.runtime.functionobjects.ReduceDiag;
 import org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue;
@@ -70,10 +69,10 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 		value=v;
 	}
 
-	private static MatrixCell checkType(MatrixValue cell) throws DMLUnsupportedOperationException
+	private static MatrixCell checkType(MatrixValue cell) throws DMLRuntimeException 
 	{
 		if( cell!=null && !(cell instanceof MatrixCell))
-			throw new DMLUnsupportedOperationException("the Matrix Value is not MatrixCell!");
+			throw new DMLRuntimeException("the Matrix Value is not MatrixCell!");
 		return (MatrixCell) cell;
 	}
 
@@ -172,7 +171,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	@Override
 	public MatrixValue aggregateBinaryOperations(MatrixValue value1,
 			MatrixValue value2, MatrixValue result, AggregateBinaryOperator op) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException {
+	throws DMLRuntimeException {
 		
 		MatrixCell c1=checkType(value1);
 		MatrixCell c2=checkType(value2);
@@ -186,7 +185,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	@Override
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op,
 			MatrixValue result, int brlen, int bclen,
-			MatrixIndexes indexesIn) throws DMLUnsupportedOperationException {
+			MatrixIndexes indexesIn) throws DMLRuntimeException {
 		
 		MatrixCell c3=checkType(result);
 		if(c3==null)
@@ -207,7 +206,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	@Override
 	public MatrixValue binaryOperations(BinaryOperator op,
 			MatrixValue thatValue, MatrixValue result)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		MatrixCell c2=checkType(thatValue);
 		MatrixCell c3=checkType(result);
 		if(c3==null)
@@ -219,22 +218,20 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	@Override
 	public void binaryOperationsInPlace(BinaryOperator op,
 			MatrixValue thatValue)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		MatrixCell c2=checkType(thatValue);
 		setValue(op.fn.execute(this.getValue(), c2.getValue()));
 		
 	}
 
 	public void denseScalarOperationsInPlace(ScalarOperator op)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		value=op.executeScalar(value);
 	}
 
 	@Override
 	public MatrixValue reorgOperations(ReorgOperator op, MatrixValue result,
-			int startRow, int startColumn, int length)
-			throws DMLUnsupportedOperationException {
-		
+			int startRow, int startColumn, int length) throws DMLRuntimeException {		
 		MatrixCell c3=checkType(result);
 		if(c3==null)
 			c3=new MatrixCell();
@@ -243,7 +240,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	}
 
 	@Override
-	public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) throws DMLUnsupportedOperationException, DMLRuntimeException {
+	public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) throws DMLRuntimeException {
 		
 		MatrixCell c3=checkType(result);
 		c3.setValue(op.fn.execute(value, op.getConstant()));
@@ -251,18 +248,18 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	}
 
 	public void sparseScalarOperationsInPlace(ScalarOperator op)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		value=op.executeScalar(value);
 	}
 
 	public void sparseUnaryOperationsInPlace(UnaryOperator op)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		value=op.fn.execute(value);
 	}
 
 	@Override
 	public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		MatrixCell c3=checkType(result);
 		c3.setValue(op.fn.execute(value));
 		return c3;
@@ -270,7 +267,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 
 	@Override
 	public void unaryOperationsInPlace(UnaryOperator op)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		value=op.fn.execute(value);
 	}
 
@@ -320,13 +317,13 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	@Override
 	public void incrementalAggregate(AggregateOperator aggOp,
 			MatrixValue correction, MatrixValue newWithCorrection)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("MatrixCell.incrementalAggregate should never be called");
 	}
 
 	@Override
 	public MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		if(range.rowStart!=0 || range.rowEnd!=0 || range.colStart!=0 || range.colEnd!=0)
 			throw new DMLRuntimeException("wrong range: "+range+" for matrixCell");
 		MatrixCell c3=checkType(result);
@@ -337,14 +334,14 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	@Override
 	public void incrementalAggregate(AggregateOperator aggOp,
 			MatrixValue newWithCorrection)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("MatrixCell.incrementalAggregate should never be called");
 	}
 
 	@Override
 	public void ternaryOperations(Operator op, MatrixValue that,
 			MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		MatrixCell c2=checkType(that);
 		MatrixCell c3=checkType(that2);
@@ -358,7 +355,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	@Override
 	public void ternaryOperations(Operator op, MatrixValue that, double scalarThat2, boolean ignoreZeros, 
 			CTableMap ctableResult, MatrixBlock ctableResultBlock)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		MatrixCell c2=checkType(that);
 		CTable ctable = CTable.getCTableFnObject();
@@ -371,7 +368,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	@Override
 	public void ternaryOperations(Operator op, double scalarThat,
 			double scalarThat2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		CTable ctable = CTable.getCTableFnObject();
 		if ( resultMap != null)
@@ -383,7 +380,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	@Override
 	public void ternaryOperations(Operator op, MatrixIndexes ix1, double scalarThat, boolean left, int brlen,
 			CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		//ctable expand (column vector to ctable)
 		CTable ctable = CTable.getCTableFnObject();
@@ -404,7 +401,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	@Override
 	public void ternaryOperations(Operator op, double scalarThat,
 			MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		MatrixCell c3=checkType(that2);
 		CTable ctable = CTable.getCTableFnObject();
@@ -417,7 +414,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	
 	@Override
 	public MatrixValue quaternaryOperations(QuaternaryOperator qop, MatrixValue um, MatrixValue vm, MatrixValue wm, MatrixValue out)
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		throw new DMLRuntimeException("operation not supported fro MatrixCell");
 	}
@@ -426,14 +423,14 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	public void sliceOperations(ArrayList<IndexedMatrixValue> outlist,
 			IndexRange range, int rowCut, int colCut, int blockRowFactor,
 			int blockColFactor, int boundaryRlen, int boundaryClen)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		((MatrixCell)outlist.get(0).getValue()).setValue(this.value);
 		
 	}
 	
 	@Override
 	public MatrixValue replaceOperations(MatrixValue result, double pattern, double replacement)
-			throws DMLUnsupportedOperationException, DMLRuntimeException 
+			throws DMLRuntimeException 
 	{
 		MatrixCell out = checkType(result);		
 		if( value == pattern || (Double.isNaN(pattern) && Double.isNaN(value)) )
@@ -447,7 +444,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op,
 			MatrixValue result, int blockingFactorRow, int blockingFactorCol,
 			MatrixIndexes indexesIn, boolean inCP)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		return aggregateUnaryOperations(op,	result, blockingFactorRow, blockingFactorCol,indexesIn);
 	}
 
@@ -455,14 +452,14 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	public MatrixValue aggregateBinaryOperations(MatrixIndexes m1Index,
 			MatrixValue m1Value, MatrixIndexes m2Index, MatrixValue m2Value,
 			MatrixValue result, AggregateBinaryOperator op)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		throw new DMLRuntimeException("MatrixCell.aggregateBinaryOperations should never be called");
 	}
 
 	@Override
 	public void appendOperations(MatrixValue valueIn2, ArrayList<IndexedMatrixValue> outlist,
 			int blockRowFactor, int blockColFactor, boolean cbind, boolean m2IsLast, int nextNCol) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException  {
+	throws DMLRuntimeException  {
 		((MatrixCell)outlist.get(0).getValue()).setValue(this.value);
 		MatrixCell c2=checkType(valueIn2);
 		((MatrixCell)outlist.get(1).getValue()).setValue(c2.getValue());	

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixPackedCell.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixPackedCell.java b/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixPackedCell.java
index 7ccedcf..e606922 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixPackedCell.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixPackedCell.java
@@ -26,7 +26,6 @@ import java.io.IOException;
 
 import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.cp.KahanObject;
 import org.apache.sysml.runtime.matrix.operators.AggregateOperator;
 
@@ -64,10 +63,10 @@ public class MatrixPackedCell extends MatrixCell
 		extra_size=size;
 	}
 	
-	public static MatrixPackedCell checkType(MatrixValue cell) throws DMLUnsupportedOperationException
+	public static MatrixPackedCell checkType(MatrixValue cell) throws DMLRuntimeException
 	{
 		if( cell!=null && !(cell instanceof MatrixPackedCell))
-			throw new DMLUnsupportedOperationException("the Matrix Value is not MatrixPackedCell!");
+			throw new DMLRuntimeException("the Matrix Value is not MatrixPackedCell!");
 		return (MatrixPackedCell) cell;
 	}
 	
@@ -82,14 +81,14 @@ public class MatrixPackedCell extends MatrixCell
 	//with corrections
 	@Override
 	public void incrementalAggregate(AggregateOperator aggOp, MatrixValue correction, 
-			MatrixValue newWithCorrection)throws DMLUnsupportedOperationException, DMLRuntimeException {
+			MatrixValue newWithCorrection)throws DMLRuntimeException {
 		incrementalAggregate(aggOp, newWithCorrection);
 	}
 	
 	//with corrections
 	@Override
 	public void incrementalAggregate(AggregateOperator aggOp,
-			MatrixValue newWithCorrection)throws DMLUnsupportedOperationException, DMLRuntimeException {
+			MatrixValue newWithCorrection)throws DMLRuntimeException {
 
 		
 		MatrixPackedCell newWithCor=checkType(newWithCorrection);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixValue.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixValue.java b/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixValue.java
index c4918f9..dd8fd17 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixValue.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/MatrixValue.java
@@ -25,7 +25,6 @@ import java.util.ArrayList;
 import org.apache.hadoop.io.WritableComparable;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue;
 import org.apache.sysml.runtime.matrix.operators.AggregateBinaryOperator;
 import org.apache.sysml.runtime.matrix.operators.AggregateOperator;
@@ -109,78 +108,78 @@ public abstract class MatrixValue implements WritableComparable
 	public abstract void copy(MatrixValue that, boolean sp);
 	
 	public abstract MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 	
 	public abstract MatrixValue binaryOperations(BinaryOperator op, MatrixValue thatValue, MatrixValue result) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 	
 	public abstract void binaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 	
 	public abstract MatrixValue reorgOperations(ReorgOperator op, MatrixValue result,
 			int startRow, int startColumn, int length)
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 	
 	// tertiary where all three inputs are matrices
 	public abstract void ternaryOperations(Operator op, MatrixValue that, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 	
 	// tertiary where first two inputs are matrices, and third input is a scalar (double)
 	public abstract void ternaryOperations(Operator op, MatrixValue that, double scalar_that2, boolean ignoreZeros, CTableMap resultMap, MatrixBlock resultBlock)
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 	
 	// tertiary where first input is a matrix, and second and third inputs are scalars (double)
 	public abstract void ternaryOperations(Operator op, double scalar_that, double scalar_that2, CTableMap resultMap, MatrixBlock resultBlock)
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 	
 	// tertiary where first input is a matrix, and second and third inputs are scalars (double)
 	public abstract void ternaryOperations(Operator op, MatrixIndexes ix1, double scalar_that, boolean left, int brlen, CTableMap resultMap, MatrixBlock resultBlock)
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 
 	// tertiary where first and third inputs are matrices and second is a scalar
 	public abstract void ternaryOperations(Operator op, double scalarThat, MatrixValue that2, CTableMap ctableResult, MatrixBlock ctableResultBlock)
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 
 	public abstract MatrixValue quaternaryOperations(QuaternaryOperator qop, MatrixValue um, MatrixValue vm, MatrixValue wm, MatrixValue out)
-		throws DMLUnsupportedOperationException, DMLRuntimeException;
+		throws DMLRuntimeException;
 		
 	public abstract MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, 
-			int brlen, int bclen, MatrixIndexes indexesIn) throws DMLUnsupportedOperationException, DMLRuntimeException;
+			int brlen, int bclen, MatrixIndexes indexesIn) throws DMLRuntimeException;
 	
 	public abstract MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, 
 			int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn, boolean inCP) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 	
 	public abstract MatrixValue aggregateBinaryOperations(MatrixValue m1Value, MatrixValue m2Value, 
 			MatrixValue result, AggregateBinaryOperator op) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 	
 	public abstract MatrixValue aggregateBinaryOperations(MatrixIndexes m1Index, MatrixValue m1Value, MatrixIndexes m2Index, MatrixValue m2Value, 
 			MatrixValue result, AggregateBinaryOperator op) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 	
 	public abstract MatrixValue unaryOperations(UnaryOperator op, MatrixValue result) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 	
-	public abstract void unaryOperationsInPlace(UnaryOperator op) throws DMLUnsupportedOperationException, DMLRuntimeException;
+	public abstract void unaryOperationsInPlace(UnaryOperator op) throws DMLRuntimeException;
 
 	public abstract void incrementalAggregate(AggregateOperator aggOp, MatrixValue correction, 
-			MatrixValue newWithCorrection)	throws DMLUnsupportedOperationException, DMLRuntimeException;
+			MatrixValue newWithCorrection)	throws DMLRuntimeException;
 	
 	public abstract void incrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection)
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 
 	public abstract MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary)
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 	
 	public abstract void sliceOperations(ArrayList<IndexedMatrixValue> outlist, IndexRange range, int rowCut, int colCut, 
 			int blockRowFactor, int blockColFactor, int boundaryRlen, int boundaryClen)
-	throws DMLUnsupportedOperationException, DMLRuntimeException;
+	throws DMLRuntimeException;
 
 	public abstract MatrixValue replaceOperations( MatrixValue result, double pattern, double replacement )
-			throws DMLUnsupportedOperationException, DMLRuntimeException;
+			throws DMLRuntimeException;
 
 	public abstract void appendOperations(MatrixValue valueIn2, ArrayList<IndexedMatrixValue> outlist,
 			int blockRowFactor, int blockColFactor, boolean cbind, boolean m2IsLast, int nextNCol)
-			throws DMLUnsupportedOperationException, DMLRuntimeException ;
+			throws DMLRuntimeException ;
 }

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/data/OperationsOnMatrixValues.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/OperationsOnMatrixValues.java b/src/main/java/org/apache/sysml/runtime/matrix/data/OperationsOnMatrixValues.java
index 9201795..4fe2834 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/OperationsOnMatrixValues.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/OperationsOnMatrixValues.java
@@ -23,7 +23,6 @@ package org.apache.sysml.runtime.matrix.data;
 import java.util.ArrayList;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
 import org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue;
@@ -43,26 +42,26 @@ public class OperationsOnMatrixValues
 {
 	
 	public static void performScalarIgnoreIndexes(MatrixValue valueIn, MatrixValue valueOut, ScalarOperator op) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		valueIn.scalarOperations(op, valueOut);
 	}
 	
 	public static void performUnaryIgnoreIndexes(MatrixValue valueIn, MatrixValue valueOut, UnaryOperator op) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		valueIn.unaryOperations(op, valueOut);
 	}
 	
 	public static void performUnaryIgnoreIndexesInPlace(MatrixValue valueIn, UnaryOperator op) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		valueIn.unaryOperationsInPlace(op);
 	}
 	
 	public static void performReorg(MatrixIndexes indexesIn, MatrixValue valueIn, MatrixIndexes indexesOut, 
 			         MatrixValue valueOut, ReorgOperator op, int startRow, int startColumn, int length) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//operate on the value indexes first
 		op.fn.execute(indexesIn, indexesOut);
@@ -73,14 +72,14 @@ public class OperationsOnMatrixValues
 
 	public static void performAppend(MatrixValue valueIn1, MatrixValue valueIn2,
 			ArrayList<IndexedMatrixValue> outlist, int blockRowFactor, int blockColFactor,  boolean cbind, boolean m2IsLast, int nextNCol) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		valueIn1.appendOperations(valueIn2, outlist, blockRowFactor, blockColFactor, cbind, m2IsLast, nextNCol);
 	}
 	
 	public static void performZeroOut(MatrixIndexes indexesIn, MatrixValue valueIn, 
 			MatrixIndexes indexesOut, MatrixValue valueOut, IndexRange range, boolean complementary) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		valueIn.zeroOutOperations(valueOut, range, complementary);
 		indexesOut.setIndexes(indexesIn);
@@ -90,7 +89,7 @@ public class OperationsOnMatrixValues
 	// tertiary where all three inputs are matrices
 	public static void performTernary(MatrixIndexes indexesIn1, MatrixValue valueIn1, MatrixIndexes indexesIn2, MatrixValue valueIn2, 
 			MatrixIndexes indexesIn3, MatrixValue valueIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op ) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		//operation on the cells inside the value
 		valueIn1.ternaryOperations(op, valueIn2, valueIn3, resultMap, resultBlock);
@@ -99,7 +98,7 @@ public class OperationsOnMatrixValues
 	// tertiary where first two inputs are matrices, and third input is a scalar (double)
 	public static void performTernary(MatrixIndexes indexesIn1, MatrixValue valueIn1, MatrixIndexes indexesIn2, MatrixValue valueIn2, 
 			double scalarIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		//operation on the cells inside the value
 		valueIn1.ternaryOperations(op, valueIn2, scalarIn3, false, resultMap, resultBlock);
@@ -108,7 +107,7 @@ public class OperationsOnMatrixValues
 	// tertiary where first input is a matrix, and second and third inputs are scalars (double)
 	public static void performTernary(MatrixIndexes indexesIn1, MatrixValue valueIn1, double scalarIn2, 
 			double scalarIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op ) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		//operation on the cells inside the value
 		valueIn1.ternaryOperations(op, scalarIn2, scalarIn3, resultMap, resultBlock);
@@ -117,7 +116,7 @@ public class OperationsOnMatrixValues
 	// tertiary where first input is a matrix, and second is scalars (double)
 	public static void performTernary(MatrixIndexes indexesIn1, MatrixValue valueIn1, double scalarIn2, boolean left,
 			int brlen, CTableMap resultMap, MatrixBlock resultBlock, Operator op ) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		//operation on the cells inside the value
 		valueIn1.ternaryOperations(op, indexesIn1, scalarIn2, left, brlen, resultMap, resultBlock);
@@ -126,7 +125,7 @@ public class OperationsOnMatrixValues
 	// tertiary where first and third inputs are matrices, and second is a scalars (double)
 	public static void performTernary(MatrixIndexes indexesIn1, MatrixValue valueIn1, double scalarIn2, 
 			MatrixIndexes indexesIn3, MatrixValue valueIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op ) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		//operation on the cells inside the value
 		valueIn1.ternaryOperations(op, scalarIn2, valueIn3, resultMap, resultBlock);
@@ -136,7 +135,7 @@ public class OperationsOnMatrixValues
 	//binary operations are those that the indexes of both cells have to be matched
 	public static void performBinaryIgnoreIndexes(MatrixValue value1, MatrixValue value2, 
 			MatrixValue valueOut, BinaryOperator op) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		value1.binaryOperations(op, value2, valueOut);
 	}
@@ -150,12 +149,11 @@ public class OperationsOnMatrixValues
 	 * @param clen
 	 * @param sparseHint
 	 * @param imbededCorrection
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static void startAggregation(MatrixValue valueOut, MatrixValue correction, AggregateOperator op, 
 			int rlen, int clen, boolean sparseHint, boolean imbededCorrection)
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		int outRow=0, outCol=0, corRow=0, corCol=0;
 		if(op.correctionExists)
@@ -249,7 +247,7 @@ public class OperationsOnMatrixValues
 	}
 	
 	public static void incrementalAggregation(MatrixValue valueAgg, MatrixValue correction, MatrixValue valueAdd, 
-			AggregateOperator op, boolean imbededCorrection) throws DMLUnsupportedOperationException, DMLRuntimeException
+			AggregateOperator op, boolean imbededCorrection) throws DMLRuntimeException
 	{
 		if(op.correctionExists)
 		{
@@ -264,7 +262,7 @@ public class OperationsOnMatrixValues
 	
 	public static void performAggregateUnary(MatrixIndexes indexesIn, MatrixValue valueIn, MatrixIndexes indexesOut, 
 			MatrixValue valueOut, AggregateUnaryOperator op,int brlen, int bclen)
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//operate on the value indexes first
 		op.indexFn.execute(indexesIn, indexesOut);
@@ -275,7 +273,7 @@ public class OperationsOnMatrixValues
 	
 	public static void performAggregateBinary(MatrixIndexes indexes1, MatrixValue value1, MatrixIndexes indexes2, MatrixValue value2, 
 			MatrixIndexes indexesOut, MatrixValue valueOut, AggregateBinaryOperator op)
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		//compute output index
 		indexesOut.setIndexes(indexes1.getRowIndex(), indexes2.getColumnIndex());
@@ -287,7 +285,7 @@ public class OperationsOnMatrixValues
 	public static void performAggregateBinaryIgnoreIndexes(
 			MatrixValue value1, MatrixValue value2,
 			MatrixValue valueOut, AggregateBinaryOperator op) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException {
+	throws DMLRuntimeException {
 			
 		//perform on the value
 		value1.aggregateBinaryOperations(value1, value2, valueOut, op);
@@ -300,11 +298,10 @@ public class OperationsOnMatrixValues
 	 * @param brlen
 	 * @param bclen
 	 * @param outlist
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static void performSlice(IndexedMatrixValue in, IndexRange ixrange, int brlen, int bclen, ArrayList<IndexedMatrixValue> outlist) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		long cellIndexTopRow = UtilFunctions.computeCellIndex(in.getIndexes().getRowIndex(), brlen, 0);
 		long cellIndexBottomRow = UtilFunctions.computeCellIndex(in.getIndexes().getRowIndex(), brlen, in.getValue().getNumRows()-1);
@@ -373,11 +370,10 @@ public class OperationsOnMatrixValues
 	 * @param rlen
 	 * @param clen
 	 * @param outlist
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static void performShift(IndexedMatrixValue in, IndexRange ixrange, int brlen, int bclen, long rlen, long clen, ArrayList<IndexedMatrixValue> outlist) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		MatrixIndexes ix = in.getIndexes();
 		MatrixBlock mb = (MatrixBlock)in.getValue();
@@ -435,9 +431,8 @@ public class OperationsOnMatrixValues
 	 * @param bclen
 	 * @param outlist
 	 * @throws DMLRuntimeException 
-	 * @throws DMLUnsupportedOperationException 
 	 */
-	public static void performMapGroupedAggregate( Operator op, IndexedMatrixValue inTarget, MatrixBlock groups, int ngroups, int brlen, int bclen, ArrayList<IndexedMatrixValue> outlist ) throws DMLRuntimeException, DMLUnsupportedOperationException
+	public static void performMapGroupedAggregate( Operator op, IndexedMatrixValue inTarget, MatrixBlock groups, int ngroups, int brlen, int bclen, ArrayList<IndexedMatrixValue> outlist ) throws DMLRuntimeException
 	{
 		MatrixIndexes ix = inTarget.getIndexes();
 		MatrixBlock target = (MatrixBlock)inTarget.getValue();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedCell.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedCell.java b/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedCell.java
index ded012c..dac0170 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedCell.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedCell.java
@@ -25,7 +25,6 @@ import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator;
 import org.apache.sysml.runtime.matrix.operators.ReorgOperator;
 import org.apache.sysml.runtime.matrix.operators.ScalarOperator;
@@ -57,17 +56,17 @@ public class WeightedCell extends MatrixCell
 	}
 
 	private static WeightedCell checkType(MatrixValue cell) 
-	throws DMLUnsupportedOperationException
+	throws DMLRuntimeException
 	{
 		if( cell!=null && !(cell instanceof WeightedCell))
-			throw new DMLUnsupportedOperationException("the Matrix Value is not WeightedCell!");
+			throw new DMLRuntimeException("the Matrix Value is not WeightedCell!");
 		return (WeightedCell) cell;
 	}
 	public void copy(MatrixValue that){
 		WeightedCell c2;
 		try {
 			c2 = checkType(that);
-		} catch (DMLUnsupportedOperationException e) {
+		} catch (DMLRuntimeException e) {
 			throw new RuntimeException(e);
 		}
 		value=c2.getValue();
@@ -121,7 +120,7 @@ public class WeightedCell extends MatrixCell
 	@Override
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op,
 			MatrixValue result, int brlen, int bclen,
-			MatrixIndexes indexesIn) throws DMLUnsupportedOperationException {
+			MatrixIndexes indexesIn) throws DMLRuntimeException {
 		super.aggregateUnaryOperations(op, result, brlen, bclen, indexesIn);
 		WeightedCell c3=checkType(result);
 		c3.setWeight(weight);
@@ -130,14 +129,14 @@ public class WeightedCell extends MatrixCell
 
 	//TODO: how to handle -minus left vs. minus right
 	public void denseScalarOperationsInPlace(ScalarOperator op)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		value=op.executeScalar(value);
 	}
 
 	@Override
 	public MatrixValue reorgOperations(ReorgOperator op, MatrixValue result,
 			int startRow, int startColumn, int length)
-			throws DMLUnsupportedOperationException {
+			throws DMLRuntimeException {
 		super.reorgOperations(op, result, startRow, startColumn, length);
 		WeightedCell c3=checkType(result);
 		c3.setWeight(weight);
@@ -146,7 +145,7 @@ public class WeightedCell extends MatrixCell
 
 	@Override
 	public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		WeightedCell c3=checkType(result);
 		c3.setValue(op.fn.execute(value, op.getConstant()));
@@ -155,18 +154,18 @@ public class WeightedCell extends MatrixCell
 	}
 
 	public void sparseScalarOperationsInPlace(ScalarOperator op)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		value=op.executeScalar(value);
 	}
 
 	public void sparseUnaryOperationsInPlace(UnaryOperator op)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		value=op.fn.execute(value);
 	}
 
 	@Override
 	public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		WeightedCell c3=checkType(result);
 		c3.setValue(op.fn.execute(value));
 		c3.setWeight(weight);
@@ -175,7 +174,7 @@ public class WeightedCell extends MatrixCell
 
 	@Override
 	public void unaryOperationsInPlace(UnaryOperator op)
-			throws DMLUnsupportedOperationException, DMLRuntimeException {
+			throws DMLRuntimeException {
 		value=op.fn.execute(value);
 	}
 }

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedPair.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedPair.java b/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedPair.java
index f830360..c9a6292 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedPair.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedPair.java
@@ -24,8 +24,7 @@ import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
-
+import org.apache.sysml.runtime.DMLRuntimeException;
 
 public class WeightedPair extends WeightedCell 
 {
@@ -52,17 +51,17 @@ public class WeightedPair extends WeightedCell
 		out.writeDouble(weight);
 	}
 
-	private static WeightedPair checkType(MatrixValue cell) throws DMLUnsupportedOperationException
+	private static WeightedPair checkType(MatrixValue cell) throws DMLRuntimeException
 	{
 		if( cell!=null && !(cell instanceof WeightedPair))
-			throw new DMLUnsupportedOperationException("the Matrix Value is not WeightedPair!");
+			throw new DMLRuntimeException("the Matrix Value is not WeightedPair!");
 		return (WeightedPair) cell;
 	}
 	public void copy(MatrixValue that){
 		WeightedPair c2;
 		try {
 			c2 = checkType(that);
-		} catch (DMLUnsupportedOperationException e) {
+		} catch (DMLRuntimeException e) {
 			throw new RuntimeException(e);
 		}
 		value=c2.getValue();

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/mapred/CSVAssignRowIDMapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/CSVAssignRowIDMapper.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/CSVAssignRowIDMapper.java
index 06b15e0..91caca8 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/CSVAssignRowIDMapper.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/CSVAssignRowIDMapper.java
@@ -34,7 +34,6 @@ import org.apache.hadoop.mapred.OutputCollector;
 import org.apache.hadoop.mapred.Reporter;
 import org.apache.wink.json4j.JSONException;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.mr.CSVReblockInstruction;
 import org.apache.sysml.runtime.matrix.CSVReblockMR;
 import org.apache.sysml.runtime.matrix.CSVReblockMR.OffsetCount;
@@ -122,12 +121,10 @@ public class CSVAssignRowIDMapper extends MapReduceBase implements Mapper<LongWr
 					break;
 				}
 			}
-		} catch (DMLUnsupportedOperationException e) {
-			throw new RuntimeException(e);
 		} catch (DMLRuntimeException e) {
 			throw new RuntimeException(e);
 		}
-
+		
 		// load properties relevant to transform
 		try {
 			boolean omit = job.getBoolean(MRJobConfiguration.TF_TRANSFORM, false);

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/mapred/CSVReblockReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/CSVReblockReducer.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/CSVReblockReducer.java
index f512104..c0dadbd 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/CSVReblockReducer.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/CSVReblockReducer.java
@@ -29,7 +29,6 @@ import org.apache.hadoop.mapred.Reducer;
 import org.apache.hadoop.mapred.Reporter;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.mr.CSVReblockInstruction;
 import org.apache.sysml.runtime.instructions.mr.ReblockInstruction;
 import org.apache.sysml.runtime.matrix.CSVReblockMR.BlockRow;
@@ -115,8 +114,6 @@ public class CSVReblockReducer extends ReduceBase implements Reducer<TaggedFirst
 		CSVReblockInstruction[] reblockInstructions;
 		try {
 			reblockInstructions = MRJobConfiguration.getCSVReblockInstructions(job);
-		} catch (DMLUnsupportedOperationException e) {
-			throw new RuntimeException(e);
 		} catch (DMLRuntimeException e) {
 			throw new RuntimeException(e);
 		}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRCombinerReducerBase.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRCombinerReducerBase.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRCombinerReducerBase.java
index bc7e936..57440b3 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRCombinerReducerBase.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRCombinerReducerBase.java
@@ -27,7 +27,6 @@ import java.util.Iterator;
 import org.apache.hadoop.mapred.JobConf;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.mr.AggregateBinaryInstruction;
 import org.apache.sysml.runtime.instructions.mr.AggregateInstruction;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
@@ -59,8 +58,6 @@ public class MMCJMRCombinerReducerBase extends ReduceBase
 		AggregateBinaryInstruction[] ins;
 		try {
 			ins = MRJobConfiguration.getAggregateBinaryInstructions(job);
-		} catch (DMLUnsupportedOperationException e) {
-			throw new RuntimeException(e);
 		} catch (DMLRuntimeException e) {
 			throw new RuntimeException(e);
 		}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRMapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRMapper.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRMapper.java
index 5d255d5..b9e9723 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRMapper.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRMapper.java
@@ -30,7 +30,6 @@ import org.apache.hadoop.mapred.OutputCollector;
 import org.apache.hadoop.mapred.Reporter;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.mr.AggregateBinaryInstruction;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -65,8 +64,6 @@ implements Mapper<Writable, Writable, Writable, Writable>
 		AggregateBinaryInstruction[] ins;
 		try {
 			ins = MRJobConfiguration.getAggregateBinaryInstructions(job);
-		} catch (DMLUnsupportedOperationException e) {
-			throw new RuntimeException(e);
 		} catch (DMLRuntimeException e) {
 			throw new RuntimeException(e);
 		}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRReducer.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRReducer.java
index f7adedb..a9b7d8b 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRReducer.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMCJMRReducer.java
@@ -31,9 +31,8 @@ import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.OutputCollector;
 import org.apache.hadoop.mapred.Reducer;
 import org.apache.hadoop.mapred.Reporter;
-
 import org.apache.sysml.hops.OptimizerUtils;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
+import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -159,7 +158,7 @@ implements Reducer<TaggedFirstSecondIndexes, MatrixValue, Writable, Writable>
 				try {
 					OperationsOnMatrixValues.performAggregateBinaryIgnoreIndexes(left.value, 
 							right.value, valueBuffer, (AggregateBinaryOperator)aggBinInstruction.getOperator());
-				} catch (DMLUnsupportedOperationException e) {
+				} catch (DMLRuntimeException e) {
 					throw new IOException(e);
 				}
 
@@ -209,7 +208,7 @@ implements Reducer<TaggedFirstSecondIndexes, MatrixValue, Writable, Writable>
 			{
 				realWriteToCollector(indexes, value_out);
 			}
-		} catch (DMLUnsupportedOperationException e) {
+		} catch (DMLRuntimeException e) {
 			throw new IOException(e);
 		}
 	}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMRJMRMapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMRJMRMapper.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMRJMRMapper.java
index 1aee6fc..e83713c 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMRJMRMapper.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMRJMRMapper.java
@@ -32,7 +32,6 @@ import org.apache.hadoop.mapred.OutputCollector;
 import org.apache.hadoop.mapred.Reporter;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.mr.AggregateBinaryInstruction;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.TaggedMatrixValue;
@@ -117,8 +116,6 @@ implements Mapper<Writable, Writable, Writable, Writable>
 		AggregateBinaryInstruction[] aggBinInstructions;
 		try {
 			aggBinInstructions = MRJobConfiguration.getAggregateBinaryInstructions(job);
-		} catch (DMLUnsupportedOperationException e) {
-			throw new RuntimeException(e);
 		} catch (DMLRuntimeException e) {
 			throw new RuntimeException(e);
 		}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMRJMRReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMRJMRReducer.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMRJMRReducer.java
index 5bf650a..2b500b7 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMRJMRReducer.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MMRJMRReducer.java
@@ -29,7 +29,6 @@ import org.apache.hadoop.mapred.Reducer;
 import org.apache.hadoop.mapred.Reporter;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.mr.AggregateBinaryInstruction;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -157,8 +156,6 @@ implements Reducer<TripleIndexes, TaggedMatrixValue, MatrixIndexes, MatrixValue>
 		super.configure(job);
 		try {
 			aggBinInstructions = MRJobConfiguration.getAggregateBinaryInstructions(job);
-		} catch (DMLUnsupportedOperationException e) {
-			throw new RuntimeException(e);
 		} catch (DMLRuntimeException e) {
 			throw new RuntimeException(e);
 		}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRBaseForCommonInstructions.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRBaseForCommonInstructions.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRBaseForCommonInstructions.java
index 21b2426..78d1613 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRBaseForCommonInstructions.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRBaseForCommonInstructions.java
@@ -31,7 +31,6 @@ import org.apache.hadoop.mapred.MapReduceBase;
 import org.apache.hadoop.mapred.Reporter;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
 import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
 import org.apache.sysml.runtime.instructions.Instruction;
@@ -160,11 +159,10 @@ public class MRBaseForCommonInstructions extends MapReduceBase
 	/**
 	 * 
 	 * @param mixed_instructions
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	protected void processMixedInstructions(ArrayList<MRInstruction> mixed_instructions) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		if( mixed_instructions != null )
 			for( MRInstruction ins : mixed_instructions )
@@ -178,12 +176,11 @@ public class MRBaseForCommonInstructions extends MapReduceBase
 	 * @param cachedValues
 	 * @param tempValue
 	 * @param zeroInput
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	protected void processOneInstruction(MRInstruction ins, Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//Timing time = new Timing(true);
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRJobConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRJobConfiguration.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRJobConfiguration.java
index c59be60..5974e3e 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRJobConfiguration.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRJobConfiguration.java
@@ -49,7 +49,6 @@ import org.apache.sysml.conf.DMLConfig;
 import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.lops.Lop;
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
 import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
 import org.apache.sysml.runtime.controlprogram.parfor.util.IDSequence;
@@ -551,49 +550,49 @@ public class MRJobConfiguration
 				DoubleWritable.class);
 	}
 	
-	public static MRInstruction[] getInstructionsInReducer(JobConf job) throws DMLUnsupportedOperationException, DMLRuntimeException
+	public static MRInstruction[] getInstructionsInReducer(JobConf job) throws DMLRuntimeException
 	{
 		String str=job.get(INSTRUCTIONS_IN_REDUCER_CONFIG);
 		MRInstruction[] mixed_ops = MRInstructionParser.parseMixedInstructions(str);
 		return mixed_ops;
 	}
 	
-	public static ReblockInstruction[] getReblockInstructions(JobConf job) throws DMLUnsupportedOperationException, DMLRuntimeException
+	public static ReblockInstruction[] getReblockInstructions(JobConf job) throws DMLRuntimeException
 	{
 		String str=job.get(REBLOCK_INSTRUCTIONS_CONFIG);
 		ReblockInstruction[] reblock_instructions = MRInstructionParser.parseReblockInstructions(str);
 		return reblock_instructions;
 	}
 	
-	public static CSVReblockInstruction[] getCSVReblockInstructions(JobConf job) throws DMLUnsupportedOperationException, DMLRuntimeException
+	public static CSVReblockInstruction[] getCSVReblockInstructions(JobConf job) throws DMLRuntimeException
 	{
 		String str=job.get(CSV_REBLOCK_INSTRUCTIONS_CONFIG);
 		CSVReblockInstruction[] reblock_instructions = MRInstructionParser.parseCSVReblockInstructions(str);
 		return reblock_instructions;
 	}
 	
-	public static CSVWriteInstruction[] getCSVWriteInstructions(JobConf job) throws DMLUnsupportedOperationException, DMLRuntimeException
+	public static CSVWriteInstruction[] getCSVWriteInstructions(JobConf job) throws DMLRuntimeException
 	{
 		String str=job.get(CSV_WRITE_INSTRUCTIONS_CONFIG);
 		CSVWriteInstruction[] reblock_instructions = MRInstructionParser.parseCSVWriteInstructions(str);
 		return reblock_instructions;
 	}
 	
-	public static AggregateInstruction[] getAggregateInstructions(JobConf job) throws DMLUnsupportedOperationException, DMLRuntimeException
+	public static AggregateInstruction[] getAggregateInstructions(JobConf job) throws DMLRuntimeException
 	{
 		String str=job.get(AGGREGATE_INSTRUCTIONS_CONFIG);
 		AggregateInstruction[] agg_instructions = MRInstructionParser.parseAggregateInstructions(str);
 		return agg_instructions;
 	}
 	
-	public static MRInstruction[] getCombineInstruction(JobConf job) throws DMLUnsupportedOperationException, DMLRuntimeException
+	public static MRInstruction[] getCombineInstruction(JobConf job) throws DMLRuntimeException
 	{
 		String str=job.get(COMBINE_INSTRUCTIONS_CONFIG);
 		MRInstruction[] comb_instructions = MRInstructionParser.parseCombineInstructions(str);
 		return comb_instructions;
 	}
 	
-	public static MRInstruction[] getInstructionsInMapper(JobConf job) throws DMLUnsupportedOperationException, DMLRuntimeException
+	public static MRInstruction[] getInstructionsInMapper(JobConf job) throws DMLRuntimeException
 	{
 		String str=job.get(INSTRUCTIONS_IN_MAPPER_CONFIG);
 		MRInstruction[] instructions = MRInstructionParser.parseMixedInstructions(str);
@@ -906,18 +905,18 @@ public class MRJobConfiguration
 	}
 	
 	// TODO: check Rand
-	public static DataGenMRInstruction[] getDataGenInstructions(JobConf job) throws DMLUnsupportedOperationException, DMLRuntimeException {
+	public static DataGenMRInstruction[] getDataGenInstructions(JobConf job) throws DMLRuntimeException {
 		String str=job.get(RAND_INSTRUCTIONS_CONFIG);
 		return MRInstructionParser.parseDataGenInstructions(str);
 	}
 	
-	public static AggregateBinaryInstruction[] getAggregateBinaryInstructions(JobConf job) throws DMLUnsupportedOperationException, DMLRuntimeException
+	public static AggregateBinaryInstruction[] getAggregateBinaryInstructions(JobConf job) throws DMLRuntimeException
 	{
 		String str=job.get(AGGREGATE_BINARY_INSTRUCTIONS_CONFIG);
 		return MRInstructionParser.parseAggregateBinaryInstructions(str);
 	}
 	
-	public static CM_N_COVInstruction[] getCM_N_COVInstructions(JobConf job) throws DMLUnsupportedOperationException, DMLRuntimeException
+	public static CM_N_COVInstruction[] getCM_N_COVInstructions(JobConf job) throws DMLRuntimeException
 	{
 		String str=job.get(CM_N_COV_INSTRUCTIONS_CONFIG);
 		return MRInstructionParser.parseCM_N_COVInstructions(str);
@@ -927,11 +926,10 @@ public class MRJobConfiguration
 	 * 
 	 * @param job
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static GroupedAggregateInstruction[] getGroupedAggregateInstructions(JobConf job) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException
+		throws DMLRuntimeException
 	{
 		//parse all grouped aggregate instructions
 		String str=job.get(GROUPEDAGG_INSTRUCTIONS_CONFIG);
@@ -1339,7 +1337,7 @@ public class MRJobConfiguration
 	
 	public static MatrixChar_N_ReducerGroups computeMatrixCharacteristics(JobConf job, byte[] inputIndexes, 
 			String instructionsInMapper, String aggInstructionsInReducer, String aggBinInstructions, 
-			String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ) throws DMLUnsupportedOperationException, DMLRuntimeException
+			String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ) throws DMLRuntimeException
 	{
 		return computeMatrixCharacteristics(job, inputIndexes, null, instructionsInMapper, null, aggInstructionsInReducer, 
 				aggBinInstructions, otherInstructionsInReducer, resultIndexes, mapOutputIndexes, forMMCJ);
@@ -1347,7 +1345,7 @@ public class MRJobConfiguration
 	
 	public static MatrixChar_N_ReducerGroups computeMatrixCharacteristics(JobConf job, byte[] inputIndexes, 
 			String instructionsInMapper, String reblockInstructions, String aggInstructionsInReducer, String aggBinInstructions, 
-			String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ) throws DMLUnsupportedOperationException, DMLRuntimeException
+			String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ) throws DMLRuntimeException
 	{
 		return computeMatrixCharacteristics(job, inputIndexes, null, instructionsInMapper, reblockInstructions, aggInstructionsInReducer, 
 				aggBinInstructions, otherInstructionsInReducer, resultIndexes, mapOutputIndexes, forMMCJ);
@@ -1395,12 +1393,11 @@ public class MRJobConfiguration
 	 * @param mapOutputIndexes
 	 * @param forMMCJ
 	 * @return
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public static MatrixChar_N_ReducerGroups computeMatrixCharacteristics(JobConf job, byte[] inputIndexes, String dataGenInstructions,
 			String instructionsInMapper, String reblockInstructions, String aggInstructionsInReducer, String aggBinInstructions, 
-			String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ) throws DMLUnsupportedOperationException, DMLRuntimeException
+			String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ) throws DMLRuntimeException
 	{
 		HashSet<Byte> intermediateMatrixIndexes=new HashSet<Byte>();
 		HashMap<Byte, MatrixCharacteristics> dims=new HashMap<Byte, MatrixCharacteristics>();
@@ -1738,7 +1735,7 @@ public class MRJobConfiguration
 	
 	public static HashSet<Byte> setUpOutputIndexesForMapper(JobConf job, byte[] inputIndexes, String instructionsInMapper, 
 			String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		return setUpOutputIndexesForMapper(job, inputIndexes, null, instructionsInMapper, 
 				null, aggInstructionsInReducer, otherInstructionsInReducer, resultIndexes);
@@ -1746,14 +1743,14 @@ public class MRJobConfiguration
 	
 	public static HashSet<Byte> setUpOutputIndexesForMapper(JobConf job, byte[] inputIndexes, String instructionsInMapper, 
 			String reblockInstructions, String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		return setUpOutputIndexesForMapper(job, inputIndexes, null, instructionsInMapper, 
 				reblockInstructions, aggInstructionsInReducer, otherInstructionsInReducer, resultIndexes);
 	}
 	public static HashSet<Byte> setUpOutputIndexesForMapper(JobConf job, byte[] inputIndexes, String randInstructions, String instructionsInMapper, 
 			String reblockInstructions, String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) 
-	throws DMLUnsupportedOperationException, DMLRuntimeException
+	throws DMLRuntimeException
 	{
 		//find out what results are needed to send to reducers
 		

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/mapred/MapperBase.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MapperBase.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MapperBase.java
index 6067d7f..082de29 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MapperBase.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MapperBase.java
@@ -32,7 +32,6 @@ import org.apache.hadoop.mapred.OutputCollector;
 import org.apache.hadoop.mapred.Reporter;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.instructions.mr.AggregateBinaryInstruction;
 import org.apache.sysml.runtime.instructions.mr.CSVReblockInstruction;
 import org.apache.sysml.runtime.instructions.mr.DataGenMRInstruction;
@@ -212,8 +211,6 @@ public abstract class MapperBase extends MRBaseForCommonInstructions
 			
 			allCSVReblockIns=MRJobConfiguration.getCSVReblockInstructions(job);
 			
-		} catch (DMLUnsupportedOperationException e) {
-			throw new RuntimeException(e);
 		} catch (DMLRuntimeException e) {
 			throw new RuntimeException(e);
 		}

http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/matrix/mapred/PartialAggregator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/PartialAggregator.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/PartialAggregator.java
index 8136479..0430af7 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/PartialAggregator.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/PartialAggregator.java
@@ -28,7 +28,6 @@ import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.Reporter;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.operators.AggregateBinaryOperator;
@@ -107,11 +106,10 @@ public class PartialAggregator extends MMCJMRCache
 	 * @param value
 	 * @param leftcached
 	 * @throws IOException
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	public void aggregateToBuffer(MatrixIndexes indexes, MatrixValue value, boolean leftcached) 
-		throws IOException, DMLUnsupportedOperationException, DMLRuntimeException
+		throws IOException, DMLRuntimeException
 	{
 		if( !memOnly )
 		{
@@ -183,11 +181,10 @@ public class PartialAggregator extends MMCJMRCache
 	 * @param indexes
 	 * @param value
 	 * @param leftcached
-	 * @throws DMLUnsupportedOperationException
 	 * @throws DMLRuntimeException
 	 */
 	private void aggregateToBufferHelp(MatrixIndexes indexes, MatrixValue value, boolean leftcached) 
-		throws DMLUnsupportedOperationException, DMLRuntimeException 
+		throws DMLRuntimeException 
 	{
 		Integer ix = _bufferMap.get( indexes );
 		if( ix != null ) //agg into existing block