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 2018/03/25 02:40:23 UTC

[01/12] systemml git commit: [SYSTEMML-2191] Cleanup exception hierarchy and handling, part 3

Repository: systemml
Updated Branches:
  refs/heads/master 583f34480 -> a839b30b2


http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/RandomMatrixGenerator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/RandomMatrixGenerator.java b/src/main/java/org/apache/sysml/runtime/matrix/data/RandomMatrixGenerator.java
index b4c6c95..6fc7399 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/RandomMatrixGenerator.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/RandomMatrixGenerator.java
@@ -59,10 +59,8 @@ public class RandomMatrixGenerator {
 	 * @param rpb    rows per block
 	 * @param cpb    columns per block
 	 * @param sp     sparsity (0 = completely sparse, 1 = completely dense)
-	 * @throws DMLRuntimeException if error
 	 */
-	public RandomMatrixGenerator(PDF pdf, int r, int c, int rpb, int cpb, double sp) throws DMLRuntimeException
-	{
+	public RandomMatrixGenerator(PDF pdf, int r, int c, int rpb, int cpb, double sp) {
 		this(pdf, r, c, rpb, cpb, sp, Double.NaN, Double.NaN);
 	}
 
@@ -76,10 +74,8 @@ public class RandomMatrixGenerator {
 	 * @param sp     sparsity (0 = completely sparse, 1 = completely dense)
 	 * @param min    minimum of range of random numbers
 	 * @param max    maximum of range of random numbers
-	 * @throws DMLRuntimeException if error
 	 */
-	public RandomMatrixGenerator(String pdfStr, int r, int c, int rpb, int cpb, double sp, double min, double max) throws DMLRuntimeException
-	{
+	public RandomMatrixGenerator(String pdfStr, int r, int c, int rpb, int cpb, double sp, double min, double max) {
 		init(PDF.valueOf(pdfStr.toUpperCase()), r, c, rpb, cpb, sp, min, max);
 	}
 
@@ -93,10 +89,8 @@ public class RandomMatrixGenerator {
 	 * @param sp     sparsity (0 = completely sparse, 1 = completely dense)
 	 * @param min    minimum of range of random numbers
 	 * @param max    maximum of range of random numbers
-	 * @throws DMLRuntimeException if error
 	 */
-	public RandomMatrixGenerator(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max) throws DMLRuntimeException
-	{
+	public RandomMatrixGenerator(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max) {
 		init(pdf, r, c, rpb, cpb, sp, min, max);
 	}
 
@@ -110,10 +104,8 @@ public class RandomMatrixGenerator {
 	 * @param sp     sparsity (0 = completely sparse, 1 = completely dense)
 	 * @param min    minimum of range of random numbers
 	 * @param max    maximum of range of random numbers
-	 * @throws DMLRuntimeException if error
 	 */
-	public void init(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max) throws DMLRuntimeException
-	{
+	public void init(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max) {
 		_pdf = pdf;
 		_rows = r;
 		_cols = c;
@@ -137,10 +129,8 @@ public class RandomMatrixGenerator {
 	 * @param min    minimum of range of random numbers
 	 * @param max    maximum of range of random numbers
 	 * @param mean   the poisson mean
-	 * @throws DMLRuntimeException if error
 	 */
-	public RandomMatrixGenerator(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max, double mean) throws DMLRuntimeException
-	{
+	public RandomMatrixGenerator(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max, double mean) {
 		init(pdf, r, c, rpb, cpb, sp, min, max, mean);
 	}
 
@@ -155,10 +145,8 @@ public class RandomMatrixGenerator {
 	 * @param min    minimum of range of random numbers
 	 * @param max    maximum of range of random numbers
 	 * @param mean   the poisson mean
-	 * @throws DMLRuntimeException if error
 	 */
-	public void init(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max, double mean) throws DMLRuntimeException
-	{
+	public void init(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max, double mean) {
 		_pdf = pdf;
 		_rows = r;
 		_cols = c;
@@ -171,8 +159,7 @@ public class RandomMatrixGenerator {
 		setupValuePRNG();
 	}
 	
-	protected void setupValuePRNG() throws DMLRuntimeException 
-	{
+	protected void setupValuePRNG() {
 		switch (_pdf) {
 		case NORMAL:
 			_valuePRNG = new NormalPRNGenerator();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/SinglePrecisionCudaSupportFunctions.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/SinglePrecisionCudaSupportFunctions.java b/src/main/java/org/apache/sysml/runtime/matrix/data/SinglePrecisionCudaSupportFunctions.java
index 8429d35..d5edf48 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/SinglePrecisionCudaSupportFunctions.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/SinglePrecisionCudaSupportFunctions.java
@@ -25,7 +25,6 @@ import static jcuda.runtime.cudaMemcpyKind.cudaMemcpyHostToDevice;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.sysml.api.DMLScript;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.gpu.GPUInstruction;
 import org.apache.sysml.runtime.instructions.gpu.context.GPUContext;
 import org.apache.sysml.utils.GPUStatistics;
@@ -163,7 +162,7 @@ public class SinglePrecisionCudaSupportFunctions implements CudaSupportFunctions
 	}
 	
 	@Override
-	public void deviceToHost(GPUContext gCtx, Pointer src, double[] dest, String instName, boolean isEviction) throws DMLRuntimeException {
+	public void deviceToHost(GPUContext gCtx, Pointer src, double[] dest, String instName, boolean isEviction) {
 		long t1 = DMLScript.FINEGRAINED_STATISTICS  && instName != null? System.nanoTime() : 0;
 		// We invoke transfer matrix from device to host in two cases:
 		// 1. During eviction of unlocked matrices
@@ -193,7 +192,7 @@ public class SinglePrecisionCudaSupportFunctions implements CudaSupportFunctions
 	}
 
 	@Override
-	public void hostToDevice(GPUContext gCtx, double[] src, Pointer dest, String instName) throws DMLRuntimeException {
+	public void hostToDevice(GPUContext gCtx, double[] src, Pointer dest, String instName) {
 		LOG.debug("Potential OOM: Allocated additional space in hostToDevice");
 		// TODO: Perform conversion on GPU using double2float and float2double kernels
 		long t1 = DMLScript.FINEGRAINED_STATISTICS  && instName != null? System.nanoTime() : 0;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 faad3d2..8229dba 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
@@ -55,9 +55,7 @@ public class WeightedCell extends MatrixCell
 		out.writeDouble(weight);
 	}
 
-	private static WeightedCell checkType(MatrixValue cell) 
-	throws DMLRuntimeException
-	{
+	private static WeightedCell checkType(MatrixValue cell) {
 		if( cell!=null && !(cell instanceof WeightedCell))
 			throw new DMLRuntimeException("the Matrix Value is not WeightedCell!");
 		return (WeightedCell) cell;
@@ -120,24 +118,21 @@ public class WeightedCell extends MatrixCell
 	@Override
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op,
 			MatrixValue result, int brlen, int bclen,
-			MatrixIndexes indexesIn) throws DMLRuntimeException {
+			MatrixIndexes indexesIn) {
 		super.aggregateUnaryOperations(op, result, brlen, bclen, indexesIn);
 		WeightedCell c3=checkType(result);
 		c3.setWeight(weight);
 		return c3;
 	}
 
-	//TODO: how to handle -minus left vs. minus right
 	@Override
-	public void denseScalarOperationsInPlace(ScalarOperator op)
-			throws DMLRuntimeException {
+	public void denseScalarOperationsInPlace(ScalarOperator op) {
 		value=op.executeScalar(value);
 	}
 
 	@Override
 	public MatrixValue reorgOperations(ReorgOperator op, MatrixValue result,
-			int startRow, int startColumn, int length)
-			throws DMLRuntimeException {
+			int startRow, int startColumn, int length) {
 		super.reorgOperations(op, result, startRow, startColumn, length);
 		WeightedCell c3=checkType(result);
 		c3.setWeight(weight);
@@ -145,9 +140,7 @@ public class WeightedCell extends MatrixCell
 	}
 
 	@Override
-	public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) 
-		throws DMLRuntimeException 
-	{
+	public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) {
 		WeightedCell c3=checkType(result);
 		c3.setValue(op.fn.execute(value, op.getConstant()));
 		c3.setWeight(weight);
@@ -155,20 +148,17 @@ public class WeightedCell extends MatrixCell
 	}
 
 	@Override
-	public void sparseScalarOperationsInPlace(ScalarOperator op)
-			throws DMLRuntimeException {
+	public void sparseScalarOperationsInPlace(ScalarOperator op) {
 		value=op.executeScalar(value);
 	}
 
 	@Override
-	public void sparseUnaryOperationsInPlace(UnaryOperator op)
-			throws DMLRuntimeException {
+	public void sparseUnaryOperationsInPlace(UnaryOperator op) {
 		value=op.fn.execute(value);
 	}
 
 	@Override
-	public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result)
-			throws DMLRuntimeException {
+	public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result) {
 		WeightedCell c3=checkType(result);
 		c3.setValue(op.fn.execute(value));
 		c3.setWeight(weight);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 a255272..2dbca6b 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
@@ -52,8 +52,7 @@ public class WeightedPair extends WeightedCell
 		out.writeDouble(weight);
 	}
 
-	private static WeightedPair checkType(MatrixValue cell) throws DMLRuntimeException
-	{
+	private static WeightedPair checkType(MatrixValue cell) {
 		if( cell!=null && !(cell instanceof WeightedPair))
 			throw new DMLRuntimeException("the Matrix Value is not WeightedPair!");
 		return (WeightedPair) cell;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/mapred/DistributedCacheInput.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/DistributedCacheInput.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/DistributedCacheInput.java
index 8122dcd..c9e95b1 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/DistributedCacheInput.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/DistributedCacheInput.java
@@ -87,9 +87,7 @@ public class DistributedCacheInput
 		_pformat = null;
 	}
 
-	public IndexedMatrixValue getDataBlock(int rowBlockIndex, int colBlockIndex)
-		throws DMLRuntimeException 
-	{
+	public IndexedMatrixValue getDataBlock(int rowBlockIndex, int colBlockIndex) {
 		//probe missing block (read on-demand)
 		if( dataBlocks==null || dataBlocks[rowBlockIndex-1][colBlockIndex-1]==null )
 			readDataBlocks( rowBlockIndex, colBlockIndex );
@@ -98,37 +96,27 @@ public class DistributedCacheInput
 		return dataBlocks[rowBlockIndex-1][colBlockIndex-1];
 	}
 
-	public double[] getRowVectorArray() 
-		throws DMLRuntimeException
-	{
+	public double[] getRowVectorArray() {
 		double[] ret = new double[(int)_clen];
-		
 		for( int j=0; j<_clen; j+=_bclen ) {
 			MatrixBlock mb = (MatrixBlock) getDataBlock(1, (int)Math.ceil((double)(j+1)/_bclen)).getValue(); 
 			double[] mbtmp = DataConverter.convertToDoubleVector(mb, false);
 			System.arraycopy(mbtmp, 0, ret, j, mbtmp.length);
 		}
-		
 		return ret;
 	}
 
-	public double[] getColumnVectorArray() 
-		throws DMLRuntimeException
-	{
+	public double[] getColumnVectorArray() {
 		double[] ret = new double[(int)_rlen];
-		
 		for( int j=0; j<_rlen; j+=_brlen ) {
 			MatrixBlock mb = (MatrixBlock) getDataBlock((int)Math.ceil((double)(j+1)/_brlen),1).getValue(); 
 			double[] mbtmp = DataConverter.convertToDoubleVector(mb, false);
 			System.arraycopy(mbtmp, 0, ret, j, mbtmp.length);
 		}
-		
 		return ret;
 	}
 
-	private void readDataBlocks( int rowBlockIndex, int colBlockIndex )
-		throws DMLRuntimeException 
-	{
+	private void readDataBlocks( int rowBlockIndex, int colBlockIndex ) {
 		//get filename for rowblock/colblock
 		String fname = _localFilePath.toString();
 		if( isPartitioned() ) 
@@ -156,30 +144,23 @@ public class DistributedCacheInput
 		} 
 	}
 
-	private boolean isPartitioned()
-	{
+	private boolean isPartitioned() {
 		return (_pformat != PDataPartitionFormat.NONE);
 	}
 
-	private String getPartitionFileName( int rowBlockIndex, int colBlockIndex  ) 
-		throws DMLRuntimeException
-	{
+	private String getPartitionFileName( int rowBlockIndex, int colBlockIndex  ) {
 		long partition = -1;
-		switch( _pformat )
-		{
-			case ROW_BLOCK_WISE_N:
-			{
+		switch( _pformat ) {
+			case ROW_BLOCK_WISE_N:{
 				long numRowBlocks = (long)Math.ceil(((double)PARTITION_SIZE)/_clen/_brlen); 
 				partition = (rowBlockIndex-1)/numRowBlocks + 1;	
 				break;
 			}
-			case COLUMN_BLOCK_WISE_N:
-			{
+			case COLUMN_BLOCK_WISE_N: {
 				long numColBlocks = (long)Math.ceil(((double)PARTITION_SIZE)/_rlen/_bclen); 
 				partition = (colBlockIndex-1)/numColBlocks + 1;
 				break;
 			}
-			
 			default: 
 				throw new DMLRuntimeException("Unsupported partition format for distributed cache input: "+_pformat);
 		}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 dc18b1d..6a9dc23 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
@@ -138,18 +138,14 @@ public class MRBaseForCommonInstructions extends MapReduceBase
 		}
 	}
 
-	protected void processMixedInstructions(ArrayList<MRInstruction> mixed_instructions) 
-		throws DMLRuntimeException
-	{
+	protected void processMixedInstructions(ArrayList<MRInstruction> mixed_instructions) {
 		if( mixed_instructions != null )
 			for( MRInstruction ins : mixed_instructions )
 				processOneInstruction(ins, valueClass, cachedValues, tempValue, zeroInput);
 	}
 
 	protected void processOneInstruction(MRInstruction ins, Class<? extends MatrixValue> valueClass,
-			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput) 
-		throws DMLRuntimeException
-	{
+			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput) {
 		//Timing time = new Timing(true);
 		
 		if ( ins instanceof AggregateBinaryInstruction ) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 1c233fe..1db292f 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
@@ -395,9 +395,7 @@ public class MRJobConfiguration
 	}
 	
 	
-	public static void setOutputInfo(JobConf job, int i, OutputInfo outputinfo, boolean sourceInBlock) 
-		throws DMLRuntimeException
-	{
+	public static void setOutputInfo(JobConf job, int i, OutputInfo outputinfo, boolean sourceInBlock) {
 		Class<? extends Converter> converterClass;
 		if(sourceInBlock)
 		{
@@ -454,50 +452,43 @@ public class MRJobConfiguration
 		return outputConverter;
 	}
 
-	public static MRInstruction[] getInstructionsInReducer(JobConf job) throws DMLRuntimeException
-	{
+	public static MRInstruction[] getInstructionsInReducer(JobConf job) {
 		String str=job.get(INSTRUCTIONS_IN_REDUCER_CONFIG);
 		MRInstruction[] mixed_ops = MRInstructionParser.parseMixedInstructions(str);
 		return mixed_ops;
 	}
 	
-	public static ReblockInstruction[] getReblockInstructions(JobConf job) throws DMLRuntimeException
-	{
+	public static ReblockInstruction[] getReblockInstructions(JobConf job) {
 		String str=job.get(REBLOCK_INSTRUCTIONS_CONFIG);
 		ReblockInstruction[] reblock_instructions = MRInstructionParser.parseReblockInstructions(str);
 		return reblock_instructions;
 	}
 	
-	public static CSVReblockInstruction[] getCSVReblockInstructions(JobConf job) throws DMLRuntimeException
-	{
+	public static CSVReblockInstruction[] getCSVReblockInstructions(JobConf job) {
 		String str=job.get(CSV_REBLOCK_INSTRUCTIONS_CONFIG);
 		CSVReblockInstruction[] reblock_instructions = MRInstructionParser.parseCSVReblockInstructions(str);
 		return reblock_instructions;
 	}
 	
-	public static CSVWriteInstruction[] getCSVWriteInstructions(JobConf job) throws DMLRuntimeException
-	{
+	public static CSVWriteInstruction[] getCSVWriteInstructions(JobConf job) {
 		String str=job.get(CSV_WRITE_INSTRUCTIONS_CONFIG);
 		CSVWriteInstruction[] reblock_instructions = MRInstructionParser.parseCSVWriteInstructions(str);
 		return reblock_instructions;
 	}
 	
-	public static AggregateInstruction[] getAggregateInstructions(JobConf job) throws DMLRuntimeException
-	{
+	public static AggregateInstruction[] getAggregateInstructions(JobConf job) {
 		String str=job.get(AGGREGATE_INSTRUCTIONS_CONFIG);
 		AggregateInstruction[] agg_instructions = MRInstructionParser.parseAggregateInstructions(str);
 		return agg_instructions;
 	}
 	
-	public static MRInstruction[] getCombineInstruction(JobConf job) throws DMLRuntimeException
-	{
+	public static MRInstruction[] getCombineInstruction(JobConf job) {
 		String str=job.get(COMBINE_INSTRUCTIONS_CONFIG);
 		MRInstruction[] comb_instructions = MRInstructionParser.parseCombineInstructions(str);
 		return comb_instructions;
 	}
 	
-	public static MRInstruction[] getInstructionsInMapper(JobConf job) throws DMLRuntimeException
-	{
+	public static MRInstruction[] getInstructionsInMapper(JobConf job) {
 		String str=job.get(INSTRUCTIONS_IN_MAPPER_CONFIG);
 		MRInstruction[] instructions = MRInstructionParser.parseMixedInstructions(str);
 		return instructions;
@@ -526,9 +517,7 @@ public class MRJobConfiguration
 	}
 	
 	//partitioning configurations
-	public static void setPartitioningInfo( JobConf job, long rlen, long clen, int brlen, int bclen, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf, int n, String fnameNew )
-		throws DMLRuntimeException
-	{
+	public static void setPartitioningInfo( JobConf job, long rlen, long clen, int brlen, int bclen, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf, int n, String fnameNew ){
 		job.set(PARTITIONING_INPUT_MATRIX_NUM_ROW_CONFIG, String.valueOf(rlen));
 		job.set(PARTITIONING_INPUT_MATRIX_NUM_COLUMN_CONFIG, String.valueOf(clen));
 		job.set(PARTITIONING_INPUT_BLOCK_NUM_ROW_CONFIG, String.valueOf(brlen));
@@ -540,9 +529,7 @@ public class MRJobConfiguration
 		job.set(PARTITIONING_OUTPUT_FILENAME_CONFIG, fnameNew);
 	}
 	
-	public static void setPartitioningInfo( JobConf job, long rlen, long clen, int brlen, int bclen, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf, int n, String fnameNew, String itervar, String matrixvar, boolean tSparseCol )
-			throws DMLRuntimeException
-	{
+	public static void setPartitioningInfo( JobConf job, long rlen, long clen, int brlen, int bclen, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf, int n, String fnameNew, String itervar, String matrixvar, boolean tSparseCol ) {
 		//set basic partitioning information
 		setPartitioningInfo(job, rlen, clen, brlen, bclen, ii, oi, dpf, n, fnameNew);
 		
@@ -556,12 +543,9 @@ public class MRJobConfiguration
 		job.setBoolean(PARTITIONING_TRANSPOSE_COL_CONFIG, tSparseCol);		
 	}
 	
-	public static void setPartitioningInfo( JobConf job, long rlen, long clen, int brlen, int bclen, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf, int n, String fnameNew, boolean keepIndexes )
-			throws DMLRuntimeException
-	{
+	public static void setPartitioningInfo( JobConf job, long rlen, long clen, int brlen, int bclen, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf, int n, String fnameNew, boolean keepIndexes ) {
 		//set basic partitioning information
 		setPartitioningInfo(job, rlen, clen, brlen, bclen, ii, oi, dpf, n, fnameNew);
-		
 		//set transpose sparse column vector
 		job.setBoolean(PARTITIONING_OUTPUT_KEEP_INDEXES_CONFIG, keepIndexes);
 	}
@@ -633,9 +617,7 @@ public class MRJobConfiguration
 		return job.getBoolean(PARTITIONING_TRANSPOSE_COL_CONFIG, false);
 	}
 	
-	public static void setResultMergeInfo( JobConf job, String fnameNew, boolean accum, InputInfo ii, String stagingDir, long rlen, long clen, int brlen, int bclen )
-		throws DMLRuntimeException
-	{
+	public static void setResultMergeInfo( JobConf job, String fnameNew, boolean accum, InputInfo ii, String stagingDir, long rlen, long clen, int brlen, int bclen ) {
 		job.set(RESULTMERGE_COMPARE_FILENAME_CONFIG, fnameNew);
 		job.set(RESULTMERGE_ACCUMULATOR_CONFIG, String.valueOf(accum));
 		job.set(RESULTMERGE_INPUT_INFO_CONFIG, InputInfo.inputInfoToString(ii));
@@ -787,27 +769,22 @@ public class MRJobConfiguration
 		job.set(RAND_INSTRUCTIONS_CONFIG, randInstrctions);
 	}
 	
-	// TODO: check Rand
-	public static DataGenMRInstruction[] getDataGenInstructions(JobConf job) throws DMLRuntimeException {
+	public static DataGenMRInstruction[] getDataGenInstructions(JobConf job) {
 		String str=job.get(RAND_INSTRUCTIONS_CONFIG);
 		return MRInstructionParser.parseDataGenInstructions(str);
 	}
 	
-	public static AggregateBinaryInstruction[] getAggregateBinaryInstructions(JobConf job) throws DMLRuntimeException
-	{
+	public static AggregateBinaryInstruction[] getAggregateBinaryInstructions(JobConf job) {
 		String str=job.get(AGGREGATE_BINARY_INSTRUCTIONS_CONFIG);
 		return MRInstructionParser.parseAggregateBinaryInstructions(str);
 	}
 	
-	public static CM_N_COVInstruction[] getCM_N_COVInstructions(JobConf job) throws DMLRuntimeException
-	{
+	public static CM_N_COVInstruction[] getCM_N_COVInstructions(JobConf job) {
 		String str=job.get(CM_N_COV_INSTRUCTIONS_CONFIG);
 		return MRInstructionParser.parseCM_N_COVInstructions(str);
 	}
 
-	public static GroupedAggregateInstruction[] getGroupedAggregateInstructions(JobConf job) 
-		throws DMLRuntimeException
-	{
+	public static GroupedAggregateInstruction[] getGroupedAggregateInstructions(JobConf job) {
 		//parse all grouped aggregate instructions
 		String str=job.get(GROUPEDAGG_INSTRUCTIONS_CONFIG);
 		GroupedAggregateInstruction[] tmp = MRInstructionParser.parseGroupedAggInstructions(str);
@@ -821,35 +798,31 @@ public class MRJobConfiguration
 		return tmp;
 	}
 	
-	public static String[] getOutputs(JobConf job)
-	{
+	public static String[] getOutputs(JobConf job) {
 		return job.getStrings(OUTPUT_MATRICES_DIRS_CONFIG);
 	}
 	
-	private static byte[] stringArrayToByteArray(String[] istrs)
-	{
+	private static byte[] stringArrayToByteArray(String[] istrs) {
 		byte[] ret=new byte[istrs.length];
 		for(int i=0; i<istrs.length; i++)
 			ret[i]=Byte.parseByte(istrs[i]);
 		return ret;
 	}
 	
-	public static byte[] getResultIndexes(JobConf job)
-	{
+	public static byte[] getResultIndexes(JobConf job) {
 		String[] istrs=job.get(RESULT_INDEXES_CONFIG).split(Instruction.INSTRUCTION_DELIM);
 		return stringArrayToByteArray(istrs);
 	}
-	public static byte[] getResultDimsUnknown(JobConf job)
-	{
+	
+	public static byte[] getResultDimsUnknown(JobConf job) {
 		String str=job.get(RESULT_DIMS_UNKNOWN_CONFIG);
 		if (str==null || str.isEmpty())
 			return null;
 		String[] istrs=str.split(Instruction.INSTRUCTION_DELIM);
 		return stringArrayToByteArray(istrs);
 	}
-		
-	public static byte[] getIntermediateMatrixIndexes(JobConf job)
-	{
+	
+	public static byte[] getIntermediateMatrixIndexes(JobConf job) {
 		String str=job.get(INTERMEDIATE_INDEXES_CONFIG);
 		if(str==null || str.isEmpty())
 			return null;
@@ -1174,7 +1147,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 DMLRuntimeException
+			String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ)
 	{
 		return computeMatrixCharacteristics(job, inputIndexes, null, instructionsInMapper, null, aggInstructionsInReducer, 
 				aggBinInstructions, otherInstructionsInReducer, resultIndexes, mapOutputIndexes, forMMCJ);
@@ -1182,7 +1155,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 DMLRuntimeException
+			String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ)
 	{
 		return computeMatrixCharacteristics(job, inputIndexes, null, instructionsInMapper, reblockInstructions, aggInstructionsInReducer, 
 				aggBinInstructions, otherInstructionsInReducer, resultIndexes, mapOutputIndexes, forMMCJ);
@@ -1230,11 +1203,10 @@ public class MRJobConfiguration
 	 * @param mapOutputIndexes set of map output indexes
 	 * @param forMMCJ ?
 	 * @return reducer groups
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	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 DMLRuntimeException
+			String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ)
 	{
 		HashSet<Byte> intermediateMatrixIndexes=new HashSet<>();
 		HashMap<Byte, MatrixCharacteristics> dims=new HashMap<>();
@@ -1571,24 +1543,18 @@ public class MRJobConfiguration
 	}
 	
 	public static HashSet<Byte> setUpOutputIndexesForMapper(JobConf job, byte[] inputIndexes, String instructionsInMapper, 
-			String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) 
-	throws DMLRuntimeException
-	{
+			String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) {
 		return setUpOutputIndexesForMapper(job, inputIndexes, null, instructionsInMapper, 
 				null, aggInstructionsInReducer, otherInstructionsInReducer, resultIndexes);
 	}
 	
 	public static HashSet<Byte> setUpOutputIndexesForMapper(JobConf job, byte[] inputIndexes, String instructionsInMapper, 
-			String reblockInstructions, String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) 
-	throws DMLRuntimeException
-	{
+			String reblockInstructions, String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) {
 		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 DMLRuntimeException
-	{
+			String reblockInstructions, String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) {
 		//find out what results are needed to send to reducers
 		
 		HashSet<Byte> indexesInMapper=new HashSet<>();
@@ -1649,9 +1615,7 @@ public class MRJobConfiguration
 		
 	}
 	
-	private static void getIndexes(MRInstruction[] instructions, HashSet<Byte> indexes) 
-		throws DMLRuntimeException
-	{
+	private static void getIndexes(MRInstruction[] instructions, HashSet<Byte> indexes) {
 		if(instructions==null)
 			return;
 		for(MRInstruction ins: instructions)

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 dcec043..c46eb46 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
@@ -132,9 +132,7 @@ public class PartialAggregator extends MMCJMRCache
 		return nonZeros;
 	}
 
-	private void aggregateToBufferHelp(MatrixIndexes indexes, MatrixValue value, boolean leftcached) 
-		throws DMLRuntimeException 
-	{
+	private void aggregateToBufferHelp(MatrixIndexes indexes, MatrixValue value, boolean leftcached) {
 		Integer ix = _bufferMap.get( indexes );
 		if( ix != null ) //agg into existing block 
 		{

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 15441ec..a940d6f 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
@@ -282,9 +282,7 @@ public class ReduceBase extends MRBaseForCommonInstructions
 	
 	//process one aggregate instruction
 	private void processAggregateHelp(long row, long col, MatrixValue value, 
-			AggregateInstruction instruction, boolean imbededCorrection) 
-	throws DMLRuntimeException
-	{
+			AggregateInstruction instruction, boolean imbededCorrection) {
 		AggregateOperator aggOp=(AggregateOperator)instruction.getOperator();
 		
 		//there should be just one value in cache.

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/operators/LeftScalarOperator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/operators/LeftScalarOperator.java b/src/main/java/org/apache/sysml/runtime/matrix/operators/LeftScalarOperator.java
index 64cd914..e3e4621 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/operators/LeftScalarOperator.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/operators/LeftScalarOperator.java
@@ -20,7 +20,6 @@
 
 package org.apache.sysml.runtime.matrix.operators;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.runtime.functionobjects.GreaterThan;
 import org.apache.sysml.runtime.functionobjects.GreaterThanEquals;
@@ -53,7 +52,7 @@ public class LeftScalarOperator extends ScalarOperator
 	}
 
 	@Override
-	public double executeScalar(double in) throws DMLRuntimeException {
+	public double executeScalar(double in) {
 		return fn.execute(_constant, in);
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/operators/RightScalarOperator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/operators/RightScalarOperator.java b/src/main/java/org/apache/sysml/runtime/matrix/operators/RightScalarOperator.java
index fbd478e..53a448e 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/operators/RightScalarOperator.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/operators/RightScalarOperator.java
@@ -20,7 +20,6 @@
 
 package org.apache.sysml.runtime.matrix.operators;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.runtime.functionobjects.Divide;
 import org.apache.sysml.runtime.functionobjects.GreaterThan;
@@ -56,7 +55,7 @@ public class RightScalarOperator extends ScalarOperator
 	}
 	
 	@Override
-	public double executeScalar(double in) throws DMLRuntimeException {
+	public double executeScalar(double in) {
 		return fn.execute(in, _constant);
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/operators/ScalarOperator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/operators/ScalarOperator.java b/src/main/java/org/apache/sysml/runtime/matrix/operators/ScalarOperator.java
index 089c88f..bd4c354 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/operators/ScalarOperator.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/operators/ScalarOperator.java
@@ -20,7 +20,6 @@
 
 package org.apache.sysml.runtime.matrix.operators;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.functionobjects.And;
 import org.apache.sysml.runtime.functionobjects.BitwShiftL;
 import org.apache.sysml.runtime.functionobjects.BitwShiftR;
@@ -73,10 +72,8 @@ public abstract class ScalarOperator extends Operator
 	 * 
 	 * @param in input value
 	 * @return result
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public abstract double executeScalar(double in) 
-		throws DMLRuntimeException;
+	public abstract double executeScalar(double in);
 	
 	/**
 	 * Indicates if the function is statically sparse safe, i.e., it is always

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java b/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java
index 01f44cf..78f8059 100644
--- a/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java
+++ b/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java
@@ -713,9 +713,7 @@ public abstract class AutomatedTestBase
 	}
 
 
-	protected static FrameBlock readDMLFrameFromHDFS(String fileName, InputInfo iinfo)
-			throws DMLRuntimeException, IOException
-	{
+	protected static FrameBlock readDMLFrameFromHDFS(String fileName, InputInfo iinfo) throws IOException {
 		//read frame data from hdfs
 		String strFrameFileName = baseDirectory + OUTPUT_DIR + fileName;
 		FrameReader reader = FrameReaderFactory.createFrameReader(iinfo);
@@ -725,9 +723,7 @@ public abstract class AutomatedTestBase
 	}
 
 
-	protected static FrameBlock readDMLFrameFromHDFS(String fileName, InputInfo iinfo, MatrixCharacteristics md)
-			throws DMLRuntimeException, IOException
-	{
+	protected static FrameBlock readDMLFrameFromHDFS(String fileName, InputInfo iinfo, MatrixCharacteristics md) throws IOException {
 		//read frame data from hdfs
 		String strFrameFileName = baseDirectory + OUTPUT_DIR + fileName;
 		FrameReader reader = FrameReaderFactory.createFrameReader(iinfo);
@@ -735,9 +731,7 @@ public abstract class AutomatedTestBase
 		return reader.readFrameFromHDFS(strFrameFileName, md.getRows(), md.getCols());
 	}
 
-	protected static FrameBlock readRFrameFromHDFS(String fileName, InputInfo iinfo, MatrixCharacteristics md)
-			throws DMLRuntimeException, IOException
-	{
+	protected static FrameBlock readRFrameFromHDFS(String fileName, InputInfo iinfo, MatrixCharacteristics md) throws IOException {
 		//read frame data from hdfs
 		String strFrameFileName = baseDirectory + EXPECTED_DIR + fileName;
 
@@ -1732,11 +1726,8 @@ public abstract class AutomatedTestBase
 	 * @param bIncludeR
 	 *            generates also the corresponding R frame data
 	 * @throws IOException
-	 * @throws DMLRuntimeException
 	 */
-	protected double[][] writeInputFrame(String name, double[][] data, boolean bIncludeR, ValueType[] schema, OutputInfo oi)
-			throws DMLRuntimeException, IOException
-	{
+	protected double[][] writeInputFrame(String name, double[][] data, boolean bIncludeR, ValueType[] schema, OutputInfo oi) throws IOException {
 		String completePath = baseDirectory + INPUT_DIR + name;
 		String completeRPath = baseDirectory + INPUT_DIR + name + ".csv";
 
@@ -1759,16 +1750,12 @@ public abstract class AutomatedTestBase
 		return data;
 	}
 
-	protected double[][] writeInputFrameWithMTD(String name, double[][] data, boolean bIncludeR, ValueType[] schema, OutputInfo oi)
-			throws DMLRuntimeException, IOException
-	{
+	protected double[][] writeInputFrameWithMTD(String name, double[][] data, boolean bIncludeR, ValueType[] schema, OutputInfo oi) throws IOException {
 		MatrixCharacteristics mc = new MatrixCharacteristics(data.length, data[0].length, OptimizerUtils.DEFAULT_BLOCKSIZE, data[0].length, -1);
 		return writeInputFrameWithMTD(name, data, bIncludeR, mc, schema, oi);
 	}
 
-	protected double[][] writeInputFrameWithMTD(String name, double[][] data, boolean bIncludeR, MatrixCharacteristics mc, ValueType[] schema, OutputInfo oi)
-			throws DMLRuntimeException, IOException
-	{
+	protected double[][] writeInputFrameWithMTD(String name, double[][] data, boolean bIncludeR, MatrixCharacteristics mc, ValueType[] schema, OutputInfo oi) throws IOException {
 		writeInputFrame(name, data, bIncludeR, schema, oi);
 
 		// write metadata file
@@ -1798,10 +1785,9 @@ public abstract class AutomatedTestBase
 	 * @param schema
 	 * @param oi
 	 * @throws IOException
-	 * @throws DMLRuntimeException
 	 */
 	protected double[][] writeInputFrame(String name, double[][] data, ValueType[] schema, OutputInfo oi)
-			throws DMLRuntimeException, IOException
+			throws IOException
 	{
 		return writeInputFrame(name, data, false, schema, oi);
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java
index ff539ab..8b4d9be 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java
@@ -36,7 +36,6 @@ import org.apache.spark.sql.types.StructType;
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.parser.Expression.ValueType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContextFactory;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.spark.functions.CopyFrameBlockPairFunction;
@@ -416,21 +415,10 @@ public class FrameConverterTest extends AutomatedTestBase
 			}
 	}
 	
-
-	/**
-	 * @param oinfo 
-	 * @param frame1
-	 * @param frame2
-	 * @param fprop
-	 * @param schema
-	 * @return 
-	 * @throws DMLRuntimeException, IOException
-	 */
-
 	@SuppressWarnings("unchecked")
 	private static void runConverter(ConvType type, MatrixCharacteristics mc, MatrixCharacteristics mcMatrix, 
 			List<ValueType> schema, String fnameIn, String fnameOut)
-		throws DMLRuntimeException, IOException
+		throws IOException
 	{
 		SparkExecutionContext sec = (SparkExecutionContext) ExecutionContextFactory.createContext();
 		JavaSparkContext sc = sec.getSparkContext();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java
index fc37042..d5ef742 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java
@@ -34,7 +34,6 @@ import org.apache.sysml.hops.LeftIndexingOp;
 import org.apache.sysml.hops.LeftIndexingOp.LeftIndexingMethod;
 import org.apache.sysml.lops.LopProperties.ExecType;
 import org.apache.sysml.parser.Expression.ValueType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.FrameBlock;
 import org.apache.sysml.runtime.matrix.data.InputInfo;
@@ -97,30 +96,30 @@ public class FrameIndexingDistTest extends AutomatedTestBase
 
 	// Left Indexing Spark test cases
 	@Test
-	public void testMapLeftIndexingSP() throws DMLRuntimeException, IOException {
+	public void testMapLeftIndexingSP() throws IOException {
 		runTestLeftIndexing(ExecType.SPARK, LeftIndexingMethod.SP_MLEFTINDEX_R, schemaMixedLarge, IXType.LIX, true);
 	}
 	
 	@Test
-	public void testGeneralLeftIndexingSP() throws DMLRuntimeException, IOException {
+	public void testGeneralLeftIndexingSP() throws IOException {
 		runTestLeftIndexing(ExecType.SPARK, LeftIndexingMethod.SP_GLEFTINDEX, schemaMixedLarge, IXType.LIX, true);
 	}
 	
 	
 	// Right Indexing Spark test cases
 	@Test
-	public void testRightIndexingSPSparse() throws DMLRuntimeException, IOException {
+	public void testRightIndexingSPSparse() throws IOException {
 		runTestLeftIndexing(ExecType.SPARK, null, schemaMixedLarge, IXType.RIX, true);
 	}
 	
 	@Test
-	public void testRightIndexingSPDense() throws DMLRuntimeException, IOException {
+	public void testRightIndexingSPDense() throws IOException {
 		runTestLeftIndexing(ExecType.SPARK, null, schemaMixedLarge, IXType.RIX, false);
 	}
 	
 
 	
-	private void runTestLeftIndexing(ExecType et, LeftIndexingOp.LeftIndexingMethod indexingMethod, ValueType[] schema, IXType itype, boolean bSparse) throws DMLRuntimeException, IOException {
+	private void runTestLeftIndexing(ExecType et, LeftIndexingOp.LeftIndexingMethod indexingMethod, ValueType[] schema, IXType itype, boolean bSparse) throws IOException {
 		
 		boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
 		RUNTIME_PLATFORM oldRTP = rtplatform;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java
index 05f9136..fec16db 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java
@@ -27,7 +27,6 @@ import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.lops.LopProperties.ExecType;
 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.io.FrameReader;
 import org.apache.sysml.runtime.io.FrameReaderFactory;
 import org.apache.sysml.runtime.io.FrameWriter;
@@ -185,7 +184,7 @@ public class FrameMatrixCastingTest extends AutomatedTestBase
 	}
 	
 	private static void writeMatrixOrFrameInput(String fname, double[][] A, int rows, int cols, DataType dt, ValueType vt) 
-		throws DMLRuntimeException, IOException 
+		throws IOException 
 	{
 		int blksize = ConfigurationManager.getBlocksize();
 		
@@ -208,7 +207,7 @@ public class FrameMatrixCastingTest extends AutomatedTestBase
 	}
 	
 	private static double[][] readMatrixOrFrameInput(String fname, int rows, int cols, DataType dt) 
-		throws DMLRuntimeException, IOException 
+		throws IOException 
 	{
 		MatrixBlock ret = null;
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixReblockTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixReblockTest.java b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixReblockTest.java
index e11aeb9..c3b5311 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixReblockTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixReblockTest.java
@@ -24,7 +24,6 @@ import java.io.IOException;
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.lops.LopProperties.ExecType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.io.FrameWriter;
 import org.apache.sysml.runtime.io.FrameWriterFactory;
 import org.apache.sysml.runtime.io.MatrixReader;
@@ -227,7 +226,7 @@ public class FrameMatrixReblockTest extends AutomatedTestBase
 	}
 	
 	private static void writeFrameInput(String fname, String ofmt, double[][] frame, int rows, int cols) 
-		throws DMLRuntimeException, IOException 
+		throws IOException 
 	{
 		MatrixBlock mb = DataConverter.convertToMatrixBlock(frame);
 		FrameBlock fb = DataConverter.convertToFrameBlock(mb);
@@ -239,7 +238,7 @@ public class FrameMatrixReblockTest extends AutomatedTestBase
 	}
 	
 	private static double[][] readMatrixOutput(String fname, String ofmt, int rows, int cols) 
-		throws DMLRuntimeException, IOException 
+		throws IOException 
 	{
 		MatrixReader reader = MatrixReaderFactory.createMatrixReader(InputInfo.stringExternalToInputInfo(ofmt));
 		MatrixBlock mb = reader.readMatrixFromHDFS(fname, rows, cols, 1000, 1000, -1);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixWriteTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixWriteTest.java b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixWriteTest.java
index aaac262..2cbbf55 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixWriteTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixWriteTest.java
@@ -24,7 +24,6 @@ import java.io.IOException;
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.lops.LopProperties.ExecType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.io.FrameReader;
 import org.apache.sysml.runtime.io.FrameReaderFactory;
 import org.apache.sysml.runtime.matrix.data.FrameBlock;
@@ -171,7 +170,7 @@ public class FrameMatrixWriteTest extends AutomatedTestBase
 	}
 	
 	private static double[][] readFrameInput(String fname, String ofmt, int rows, int cols) 
-		throws DMLRuntimeException, IOException 
+		throws IOException 
 	{
 		//read input data
 		FrameReader reader = FrameReaderFactory.createFrameReader(InputInfo.stringExternalToInputInfo(ofmt));

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 7f04d66..77ebf10 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
@@ -24,7 +24,6 @@ import java.io.IOException;
 import org.apache.sysml.conf.CompilerConfig;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.parser.Expression.ValueType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.io.FrameReader;
 import org.apache.sysml.runtime.io.FrameReaderFactory;
 import org.apache.sysml.runtime.io.FrameWriter;
@@ -220,7 +219,7 @@ public class FrameReadWriteTest extends AutomatedTestBase
 	}
 	
 	void writeAndVerifyData(OutputInfo oinfo, FrameBlock frame1, FrameBlock frame2, CSVFileFormatProperties fprop)
-		throws DMLRuntimeException, IOException
+		throws IOException
 	{
 		String fname1 = SCRIPT_DIR + TEST_DIR + "/frameData1";
 		String fname2 = SCRIPT_DIR + TEST_DIR + "/frameData2";

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/io/FullDynWriteTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/io/FullDynWriteTest.java b/src/test/java/org/apache/sysml/test/integration/functions/io/FullDynWriteTest.java
index d52ba02..74c2328 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/io/FullDynWriteTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/io/FullDynWriteTest.java
@@ -27,7 +27,6 @@ import org.junit.Test;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.lops.LopProperties.ExecType;
 import org.apache.sysml.parser.Expression.ValueType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.InputInfo;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -200,20 +199,8 @@ public class FullDynWriteTest extends AutomatedTestBase
 		return C;
 	}
 	
-	/**
-	 * 
-	 * @param A
-	 * @param dir
-	 * @param oi
-	 * @param rows
-	 * @param cols
-	 * @param brows
-	 * @param bcols
-	 * @throws DMLRuntimeException
-	 * @throws IOException
-	 */
 	private static void writeMatrix( double[][] A, String fname, OutputInfo oi, long rows, long cols, int brows, int bcols, long nnz ) 
-		throws DMLRuntimeException, IOException
+		throws IOException
 	{
 		MapReduceTool.deleteFileIfExistOnHDFS(fname);
 		MapReduceTool.deleteFileIfExistOnHDFS(fname+".mtd");

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/io/SeqParReadTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/io/SeqParReadTest.java b/src/test/java/org/apache/sysml/test/integration/functions/io/SeqParReadTest.java
index c6dc9b8..d62fb15 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/io/SeqParReadTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/io/SeqParReadTest.java
@@ -25,7 +25,6 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.apache.sysml.conf.CompilerConfig;
 import org.apache.sysml.parser.Expression.ValueType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.OutputInfo;
@@ -255,7 +254,7 @@ public class SeqParReadTest extends AutomatedTestBase {
 	}
 	
 	private static void writeMatrix( double[][] A, String fname, OutputInfo oi, long rows, long cols, int brows, int bcols, long nnz ) 
-		throws DMLRuntimeException, IOException
+		throws IOException
 	{
 		MapReduceTool.deleteFileWithMTDIfExistOnHDFS(fname);
 		MatrixCharacteristics mc = new MatrixCharacteristics(rows, cols, brows, bcols, nnz);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameReadMetaTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameReadMetaTest.java b/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameReadMetaTest.java
index 0f99031..5d23863 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameReadMetaTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameReadMetaTest.java
@@ -32,7 +32,6 @@ 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.lops.Lop;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.io.IOUtilFunctions;
 import org.apache.sysml.runtime.matrix.data.FrameBlock;
 import org.apache.sysml.runtime.transform.TfUtils;
@@ -157,9 +156,7 @@ public class FrameReadMetaTest extends AutomatedTestBase
 	}
 
 	@SuppressWarnings("unchecked")
-	private static HashMap<String,Long>[] getRecodeMaps(String spec, FrameBlock M) 
-		throws DMLRuntimeException 
-	{
+	private static HashMap<String,Long>[] getRecodeMaps(String spec, FrameBlock M) {
 		List<Integer> collist = Arrays.asList(ArrayUtils.toObject(
 				TfMetaUtils.parseJsonIDList(spec, M.getColumnNames(), TfUtils.TXMETHOD_RECODE)));
 		HashMap<String,Long>[] ret = new HashMap[M.getNumColumns()];

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorFrameConversionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorFrameConversionTest.java b/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorFrameConversionTest.java
index 3a6865a..d5484ce 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorFrameConversionTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorFrameConversionTest.java
@@ -39,7 +39,6 @@ import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.parser.Expression.ValueType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.spark.utils.FrameRDDConverterUtils;
 import org.apache.sysml.runtime.instructions.spark.utils.RDDConverterUtils;
@@ -291,9 +290,7 @@ public class DataFrameVectorFrameConversionTest extends AutomatedTestBase
 	}
 
 	@SuppressWarnings("resource")
-	private static Dataset<Row> createDataFrame(SparkSession sparkSession, MatrixBlock mb, boolean containsID, ValueType[] schema) 
-		throws DMLRuntimeException
-	{
+	private static Dataset<Row> createDataFrame(SparkSession sparkSession, MatrixBlock mb, boolean containsID, ValueType[] schema) {
 		//create in-memory list of rows
 		List<Row> list = new ArrayList<Row>();		 
 		int off = (containsID ? 1 : 0);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorScriptTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorScriptTest.java b/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorScriptTest.java
index d6f0d9d..f8fbfe0 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorScriptTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorScriptTest.java
@@ -42,7 +42,6 @@ import org.apache.sysml.api.mlcontext.Matrix;
 import org.apache.sysml.api.mlcontext.Script;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.parser.Expression.ValueType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.spark.utils.RDDConverterUtils;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -280,9 +279,7 @@ public class DataFrameVectorScriptTest extends MLContextTestBase
 	}
 
 	@SuppressWarnings("resource")
-	private static Dataset<Row> createDataFrame(SparkSession sparkSession, MatrixBlock mb, boolean containsID, ValueType[] schema)
-		throws DMLRuntimeException
-	{
+	private static Dataset<Row> createDataFrame(SparkSession sparkSession, MatrixBlock mb, boolean containsID, ValueType[] schema) {
 		//create in-memory list of rows
 		List<Row> list = new ArrayList<Row>();
 		int off = (containsID ? 1 : 0);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/python/PythonTestRunner.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/python/PythonTestRunner.java b/src/test/java/org/apache/sysml/test/integration/functions/python/PythonTestRunner.java
index afe6f5f..2c63716 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/python/PythonTestRunner.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/python/PythonTestRunner.java
@@ -52,39 +52,37 @@ public class PythonTestRunner extends AutomatedTestBase
 	
 	
 	@Test
-	public void testMLContext() throws DMLRuntimeException, IOException, InterruptedException  {
+	public void testMLContext() throws IOException, InterruptedException  {
 		runPythonTest("test_mlcontext.py");
 	}
 	
 	@Test
-	public void testMatrixBinaryOp() throws DMLRuntimeException, IOException, InterruptedException  {
+	public void testMatrixBinaryOp() throws IOException, InterruptedException  {
 		runPythonTest("test_matrix_binary_op.py");
 	}
 	
 	@Test
-	public void testMatrixAggFn() throws DMLRuntimeException, IOException, InterruptedException  {
+	public void testMatrixAggFn() throws IOException, InterruptedException  {
 		runPythonTest("test_matrix_agg_fn.py");
 	}
 	
 	@Test
-	public void testMLLearn_df() throws DMLRuntimeException, IOException, InterruptedException  {
+	public void testMLLearn_df() throws IOException, InterruptedException  {
 		runPythonTest("test_mllearn_df.py");
 	}
 	
 	@Test
-	public void testMLLearn_numpy() throws DMLRuntimeException, IOException, InterruptedException  {
+	public void testMLLearn_numpy() throws IOException, InterruptedException  {
 		runPythonTest("test_mllearn_numpy.py");
 	}
 	
-	public void runPythonTest(String pythonFileName) throws IOException, DMLRuntimeException, InterruptedException {
+	public void runPythonTest(String pythonFileName) throws IOException, InterruptedException {
 		if(!RUN_PYTHON_TEST)
 			return;
 			
 		if(!new File("target/SystemML.jar").exists()) {
 			throw new DMLRuntimeException("Please build the project before running PythonTestRunner");
 		}
-//		String [] args = { "--master", "local[*]", "--driver-class-path", "target/SystemML.jar", "src/main/python/tests/test_mlcontext.py"};
-//		org.apache.spark.deploy.SparkSubmit.main(args);
 		Map<String, String> env = System.getenv();
 		if(!env.containsKey("SPARK_HOME")) {
 			throw new DMLRuntimeException("Please set the SPARK_HOME environment variable");

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/recompile/IPAComplexAppendTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/recompile/IPAComplexAppendTest.java b/src/test/java/org/apache/sysml/test/integration/functions/recompile/IPAComplexAppendTest.java
index e4991c7..534ab91 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/recompile/IPAComplexAppendTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/recompile/IPAComplexAppendTest.java
@@ -25,7 +25,6 @@ import org.junit.Test;
 
 import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.parser.Expression.ValueType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.OutputInfo;
@@ -55,44 +54,27 @@ public class IPAComplexAppendTest extends AutomatedTestBase
 	
 	
 	@Test
-	public void testComplexAppendNoIPANoRewrites() 
-		throws DMLRuntimeException, IOException 
-	{
+	public void testComplexAppendNoIPANoRewrites() throws IOException {
 		runIPAAppendTest(false, false);
 	}
 	
 	@Test
-	public void testComplexAppendIPANoRewrites() 
-		throws DMLRuntimeException, IOException 
-	{
+	public void testComplexAppendIPANoRewrites() throws IOException {
 		runIPAAppendTest(true, false);
 	}
 	
 	@Test
-	public void testComplexAppendNoIPARewrites() 
-		throws DMLRuntimeException, IOException 
-	{
+	public void testComplexAppendNoIPARewrites() throws IOException {
 		runIPAAppendTest(false, true);
 	}
 	
 	@Test
-	public void testComplexAppendIPARewrites() 
-		throws DMLRuntimeException, IOException 
-	{
+	public void testComplexAppendIPARewrites() throws IOException {
 		runIPAAppendTest(true, true);
 	}
-
-	/**
-	 * 
-	 * @param condition
-	 * @param branchRemoval
-	 * @param IPA
-	 * @throws DMLRuntimeException 
-	 * @throws IOException 
-	 */
-	private void runIPAAppendTest( boolean IPA, boolean rewrites ) 
-		throws DMLRuntimeException, IOException
-	{	
+	
+	private void runIPAAppendTest( boolean IPA, boolean rewrites ) throws IOException
+	{
 		boolean oldFlagIPA = OptimizerUtils.ALLOW_INTER_PROCEDURAL_ANALYSIS;
 		boolean oldFlagRewrites = OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION;
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/recompile/RewriteComplexMapMultChainTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/recompile/RewriteComplexMapMultChainTest.java b/src/test/java/org/apache/sysml/test/integration/functions/recompile/RewriteComplexMapMultChainTest.java
index 3f7b5a3..224a19e 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/recompile/RewriteComplexMapMultChainTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/recompile/RewriteComplexMapMultChainTest.java
@@ -26,7 +26,6 @@ import org.junit.Test;
 
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.lops.LopProperties.ExecType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.matrix.data.MatrixValue.CellIndex;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.integration.TestConfiguration;
@@ -62,73 +61,46 @@ public class RewriteComplexMapMultChainTest extends AutomatedTestBase
 	
 	
 	@Test
-	public void testRewriteExpr1SingleColumnCP() 
-		throws DMLRuntimeException, IOException 
-	{
+	public void testRewriteExpr1SingleColumnCP() throws IOException {
 		runRewriteMapMultChain(TEST_NAME1, true, ExecType.CP);
 	}
 	
 	@Test
-	public void testRewriteExpr1MultiColumnCP() 
-		throws DMLRuntimeException, IOException 
-	{
+	public void testRewriteExpr1MultiColumnCP() throws IOException {
 		runRewriteMapMultChain(TEST_NAME1, false, ExecType.CP);
 	}
 	
 	@Test
-	public void testRewriteExpr1SingleColumnMR() 
-		throws DMLRuntimeException, IOException 
-	{
+	public void testRewriteExpr1SingleColumnMR() throws IOException {
 		runRewriteMapMultChain(TEST_NAME1, true, ExecType.MR);
 	}
 	
 	@Test
-	public void testRewriteExpr1MultiColumnMR() 
-		throws DMLRuntimeException, IOException 
-	{
+	public void testRewriteExpr1MultiColumnMR() throws IOException {
 		runRewriteMapMultChain(TEST_NAME1, false, ExecType.MR);
 	}
 	
 	@Test
-	public void testRewriteExpr2SingleColumnCP() 
-		throws DMLRuntimeException, IOException 
-	{
+	public void testRewriteExpr2SingleColumnCP() throws IOException {
 		runRewriteMapMultChain(TEST_NAME2, true, ExecType.CP);
 	}
 	
 	@Test
-	public void testRewriteExpr2MultiColumnCP() 
-		throws DMLRuntimeException, IOException 
-	{
+	public void testRewriteExpr2MultiColumnCP() throws IOException {
 		runRewriteMapMultChain(TEST_NAME2, false, ExecType.CP);
 	}
 	
 	@Test
-	public void testRewriteExpr2SingleColumnMR() 
-		throws DMLRuntimeException, IOException 
-	{
+	public void testRewriteExpr2SingleColumnMR() throws IOException {
 		runRewriteMapMultChain(TEST_NAME2, true, ExecType.MR);
 	}
 	
 	@Test
-	public void testRewriteExpr2MultiColumnMR() 
-		throws DMLRuntimeException, IOException 
-	{
+	public void testRewriteExpr2MultiColumnMR() throws IOException {
 		runRewriteMapMultChain(TEST_NAME2, false, ExecType.MR);
 	}
-	
 
-	/**
-	 * 
-	 * @param condition
-	 * @param branchRemoval
-	 * @param IPA
-	 * @throws DMLRuntimeException 
-	 * @throws IOException 
-	 */
-	private void runRewriteMapMultChain( String TEST_NAME, boolean singleCol, ExecType et ) 
-		throws DMLRuntimeException, IOException
-	{	
+	private void runRewriteMapMultChain( String TEST_NAME, boolean singleCol, ExecType et ) throws IOException {
 		RUNTIME_PLATFORM platformOld = rtplatform;
 		
 		try
@@ -175,5 +147,4 @@ public class RewriteComplexMapMultChainTest extends AutomatedTestBase
 			rtplatform = platformOld;
 		}
 	}
-	
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java
index c50e760..8e55140 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.test.integration.functions.transform;
 
-import java.io.IOException;
 import java.util.HashMap;
 import java.util.Iterator;
 
@@ -27,7 +26,6 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.lops.LopProperties.ExecType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.io.FrameReader;
 import org.apache.sysml.runtime.io.FrameReaderFactory;
 import org.apache.sysml.runtime.io.FrameWriter;
@@ -92,14 +90,6 @@ public class TransformEncodeDecodeTest extends AutomatedTestBase
 		runTransformEncodeDecodeTest(ExecType.CP, true, "binary");
 	}
 	
-	/**
-	 * 
-	 * @param sparseM1
-	 * @param sparseM2
-	 * @param instType
-	 * @throws IOException 
-	 * @throws DMLRuntimeException 
-	 */
 	private void runTransformEncodeDecodeTest( ExecType et, boolean sparse, String fmt)
 	{
 		RUNTIME_PLATFORM platformOld = rtplatform;
@@ -110,7 +100,7 @@ public class TransformEncodeDecodeTest extends AutomatedTestBase
 			getAndLoadTestConfiguration(TEST_NAME1);
 			
 			//get input/output info
-			InputInfo iinfo = InputInfo.stringExternalToInputInfo(fmt);			
+			InputInfo iinfo = InputInfo.stringExternalToInputInfo(fmt);
 			OutputInfo oinfo = InputInfo.getMatchingOutputInfo(iinfo);
 			
 			//generate and write input data

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/unit/UtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/unit/UtilsTest.java b/src/test/java/org/apache/sysml/test/unit/UtilsTest.java
index 02c96a0..38bd01c 100644
--- a/src/test/java/org/apache/sysml/test/unit/UtilsTest.java
+++ b/src/test/java/org/apache/sysml/test/unit/UtilsTest.java
@@ -27,8 +27,6 @@ import java.io.IOException;
 import java.util.Arrays;
 
 import org.apache.sysml.conf.DMLConfig;
-import org.apache.sysml.parser.ParseException;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.gpu.context.GPUContextPool;
 import org.junit.Assert;
 import org.junit.Test;
@@ -83,9 +81,8 @@ public class UtilsTest {
 		GPUContextPool.parseListString("-1-4", 6);
 	}
 
-
 	@Test
-	public void testDMLConfig1() throws DMLRuntimeException{
+	public void testDMLConfig1() {
 		DMLConfig dmlConfig = new DMLConfig();
 		dmlConfig.setTextValue("A", "a");
 		dmlConfig.setTextValue("B", "b");
@@ -103,10 +100,8 @@ public class UtilsTest {
 		Assert.assertEquals("a", dmlConfig.getTextValue("E"));
 	}
 
-
-
 	@Test
-	public void testDMLConfig2() throws DMLRuntimeException, IOException, ParseException {
+	public void testDMLConfig2() throws IOException {
 
 		String testStr = "<root>"
 				+ "<A>a</A>"
@@ -131,8 +126,4 @@ public class UtilsTest {
 		dmlConfig.setTextValue("E", "a");
 		Assert.assertEquals("a", dmlConfig.getTextValue("E"));
 	}
-
-
-
-
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/utils/TestUtils.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/utils/TestUtils.java b/src/test/java/org/apache/sysml/test/utils/TestUtils.java
index 612ed40..5357be0 100644
--- a/src/test/java/org/apache/sysml/test/utils/TestUtils.java
+++ b/src/test/java/org/apache/sysml/test/utils/TestUtils.java
@@ -52,7 +52,6 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.SequenceFile;
 import org.apache.sysml.parser.Expression.ValueType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.io.FrameWriter;
 import org.apache.sysml.runtime.io.FrameWriterFactory;
 import org.apache.sysml.runtime.io.IOUtilFunctions;
@@ -1527,11 +1526,8 @@ public class TestUtils
 	 *            frame data
 	 * @param isR
 	 * @throws IOException 
-	 * @throws DMLRuntimeException 
 	 */
-	public static void writeTestFrame(String file, double[][] data, ValueType[] schema, OutputInfo oi, boolean isR) 
-			throws DMLRuntimeException, IOException 
-	{
+	public static void writeTestFrame(String file, double[][] data, ValueType[] schema, OutputInfo oi, boolean isR) throws IOException {
 		FrameWriter writer = FrameWriterFactory.createFrameWriter(oi);
 		FrameBlock frame = new FrameBlock(schema);
 		initFrameData(frame, data, schema, data.length);
@@ -1548,20 +1544,11 @@ public class TestUtils
 	 * @param data
 	 *            frame data
 	 * @throws IOException 
-	 * @throws DMLRuntimeException 
 	 */
-	public static void writeTestFrame(String file, double[][] data, ValueType[] schema, OutputInfo oi)
-		throws DMLRuntimeException, IOException
-	{
+	public static void writeTestFrame(String file, double[][] data, ValueType[] schema, OutputInfo oi) throws IOException {
 		writeTestFrame(file, data, schema, oi, false);
 	}
 
-	/**
-	 * 
-	 * @param frame
-	 * @param data
-	 * @param lschema
-	 */
 	public static void initFrameData(FrameBlock frame, double[][] data, ValueType[] lschema, int rows) {
 		Object[] row1 = new Object[lschema.length];
 		for( int i=0; i<rows; i++ ) {


[11/12] systemml git commit: [SYSTEMML-2191] Cleanup exception hierarchy and handling, part 3

Posted by mb...@apache.org.
[SYSTEMML-2191] Cleanup exception hierarchy and handling, part 3

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

Branch: refs/heads/master
Commit: 1f3239763d52fa718b3f93d7976d017858fa1461
Parents: 583f344
Author: Matthias Boehm <mb...@gmail.com>
Authored: Sat Mar 24 17:43:36 2018 -0700
Committer: Matthias Boehm <mb...@gmail.com>
Committed: Sat Mar 24 17:43:36 2018 -0700

----------------------------------------------------------------------
 .../parfor/RemoteDPParForSpark.java             |   2 +-
 .../sysml/runtime/functionobjects/Builtin.java  |  14 +-
 .../sysml/runtime/functionobjects/CM.java       |  13 +-
 .../sysml/runtime/functionobjects/COV.java      |   6 +-
 .../sysml/runtime/functionobjects/CTable.java   |  15 +-
 .../runtime/functionobjects/FunctionObject.java |  24 +-
 .../runtime/functionobjects/KahanPlus.java      |  11 +-
 .../runtime/functionobjects/KahanPlusSq.java    | 111 +++---
 .../sysml/runtime/functionobjects/Mean.java     |   3 +-
 .../functionobjects/ParameterizedBuiltin.java   |  11 +-
 .../sysml/runtime/functionobjects/Plus.java     |   4 +-
 .../runtime/functionobjects/RemoveFile.java     |  51 ---
 .../runtime/functionobjects/RenameFile.java     |  52 ---
 .../functionobjects/TernaryValueFunction.java   |   4 +-
 .../instructions/CPInstructionParser.java       |  14 +-
 .../instructions/GPUInstructionParser.java      |  11 +-
 .../sysml/runtime/instructions/Instruction.java |  20 +-
 .../runtime/instructions/InstructionParser.java |  14 +-
 .../runtime/instructions/InstructionUtils.java  |  36 +-
 .../instructions/MRInstructionParser.java       |  97 ++---
 .../runtime/instructions/MRJobInstruction.java  |  12 +-
 .../instructions/SPInstructionParser.java       |   9 +-
 .../cp/AggregateBinaryCPInstruction.java        |   8 +-
 .../cp/AggregateTernaryCPInstruction.java       |  18 +-
 .../cp/AggregateUnaryCPInstruction.java         |   8 +-
 .../instructions/cp/AppendCPInstruction.java    |   8 +-
 .../instructions/cp/BinaryCPInstruction.java    |  18 +-
 .../cp/BinaryMatrixMatrixCPInstruction.java     |   5 +-
 .../cp/BinaryMatrixScalarCPInstruction.java     |   5 +-
 .../cp/BinaryScalarScalarCPInstruction.java     |   2 +-
 .../instructions/cp/BreakPointInstruction.java  |   5 +-
 .../cp/BuiltinNaryCPInstruction.java            |   2 +-
 .../runtime/instructions/cp/CM_COV_Object.java  |  36 +-
 .../runtime/instructions/cp/CPInstruction.java  |  13 +-
 .../cp/CentralMomentCPInstruction.java          |   8 +-
 .../cp/CompressionCPInstruction.java            |  12 +-
 .../cp/ConvolutionCPInstruction.java            |  23 +-
 .../cp/CovarianceCPInstruction.java             |  21 +-
 .../instructions/cp/CtableCPInstruction.java    |   7 +-
 .../sysml/runtime/instructions/cp/Data.java     |   8 +-
 .../instructions/cp/DataGenCPInstruction.java   |   6 +-
 .../cp/DataPartitionCPInstruction.java          |  10 +-
 .../instructions/cp/EvalNaryCPInstruction.java  |   2 +-
 .../cp/FrameAppendCPInstruction.java            |   1 -
 .../cp/FrameIndexingCPInstruction.java          |  14 +-
 .../cp/FunctionCallCPInstruction.java           |  26 +-
 .../instructions/cp/IndexingCPInstruction.java  |   8 +-
 .../instructions/cp/MMChainCPInstruction.java   |  13 +-
 .../instructions/cp/MMTSJCPInstruction.java     |   8 +-
 .../cp/MatrixAppendCPInstruction.java           |   9 +-
 .../cp/MatrixBuiltinNaryCPInstruction.java      |   2 +-
 .../cp/MatrixIndexingCPInstruction.java         |   4 +-
 .../cp/MatrixReshapeCPInstruction.java          |  10 +-
 .../cp/MultiReturnBuiltinCPInstruction.java     |   8 +-
 ...ReturnParameterizedBuiltinCPInstruction.java |   8 +-
 .../instructions/cp/PMMJCPInstruction.java      |  12 +-
 .../cp/ParameterizedBuiltinCPInstruction.java   |  10 +-
 .../cp/QuantilePickCPInstruction.java           |  30 +-
 .../cp/QuantileSortCPInstruction.java           |   8 +-
 .../cp/QuaternaryCPInstruction.java             |   8 +-
 .../instructions/cp/ReorgCPInstruction.java     |   8 +-
 .../cp/ScalarAppendCPInstruction.java           |  14 +-
 .../cp/ScalarBuiltinNaryCPInstruction.java      |   2 +-
 .../instructions/cp/SpoofCPInstruction.java     |   9 +-
 .../cp/StringInitCPInstruction.java             |  14 +-
 .../runtime/instructions/cp/StringObject.java   |   4 +-
 .../instructions/cp/TernaryCPInstruction.java   |   5 +-
 .../cp/UaggOuterChainCPInstruction.java         |   8 +-
 .../instructions/cp/UnaryCPInstruction.java     |  15 +-
 .../cp/UnaryMatrixCPInstruction.java            |  12 +-
 .../cp/UnaryScalarCPInstruction.java            |   5 +-
 .../instructions/cp/VariableCPInstruction.java  |  80 ++---
 .../cpfile/MatrixIndexingCPFileInstruction.java |   8 +-
 .../ParameterizedBuiltinCPFileInstruction.java  |  42 +--
 .../gpu/AggregateBinaryGPUInstruction.java      |  27 +-
 .../gpu/AggregateUnaryGPUInstruction.java       |   9 +-
 .../gpu/ArithmeticBinaryGPUInstruction.java     |   2 +-
 .../gpu/BuiltinBinaryGPUInstruction.java        |   2 +-
 .../gpu/BuiltinUnaryGPUInstruction.java         |   1 -
 .../gpu/ConvolutionGPUInstruction.java          |  24 +-
 .../instructions/gpu/GPUInstruction.java        |  29 +-
 .../instructions/gpu/MMTSJGPUInstruction.java   |  36 +-
 .../gpu/MatrixAppendGPUInstruction.java         |  20 +-
 .../gpu/MatrixBuiltinGPUInstruction.java        |   2 +-
 .../gpu/MatrixIndexingGPUInstruction.java       |   9 +-
 .../MatrixMatrixArithmeticGPUInstruction.java   |   5 +-
 .../gpu/MatrixMatrixAxpyGPUInstruction.java     |   4 +-
 .../gpu/MatrixMatrixBuiltinGPUInstruction.java  |   2 +-
 ...rixMatrixRelationalBinaryGPUInstruction.java |   3 +-
 .../gpu/RelationalBinaryGPUInstruction.java     |   2 +-
 .../instructions/gpu/ReorgGPUInstruction.java   |  21 +-
 .../ScalarMatrixArithmeticGPUInstruction.java   |   5 +-
 .../gpu/ScalarMatrixBuiltinGPUInstruction.java  |   2 +-
 ...larMatrixRelationalBinaryGPUInstruction.java |   3 +-
 .../instructions/gpu/context/CSRPointer.java    |  68 +---
 .../gpu/context/ExecutionConfig.java            |   9 +-
 .../instructions/gpu/context/GPUContext.java    |  57 +--
 .../gpu/context/GPUContextPool.java             |  17 +-
 .../gpu/context/GPUMemoryManager.java           |  10 +-
 .../instructions/gpu/context/GPUObject.java     |  95 ++---
 .../instructions/gpu/context/JCudaKernels.java  |  12 +-
 .../mr/AggregateBinaryInstruction.java          |  10 +-
 .../instructions/mr/AggregateInstruction.java   |   9 +-
 .../mr/AggregateUnaryInstruction.java           |   6 +-
 .../instructions/mr/AppendGInstruction.java     |   8 +-
 .../instructions/mr/AppendInstruction.java      |   8 +-
 .../instructions/mr/AppendMInstruction.java     |  10 +-
 .../instructions/mr/AppendRInstruction.java     |   9 +-
 .../mr/BinUaggChainInstruction.java             |  13 +-
 .../instructions/mr/BinaryInstruction.java      |  17 +-
 .../instructions/mr/BinaryMInstruction.java     |  16 +-
 .../instructions/mr/CM_N_COVInstruction.java    |   7 +-
 .../instructions/mr/CSVWriteInstruction.java    |   8 +-
 .../mr/CombineBinaryInstruction.java            |   9 +-
 .../mr/CombineTernaryInstruction.java           |  12 +-
 .../mr/CombineUnaryInstruction.java             |  11 +-
 .../instructions/mr/CtableInstruction.java      |  24 +-
 .../mr/CumulativeAggregateInstruction.java      |  12 +-
 .../mr/CumulativeOffsetInstruction.java         |  10 +-
 .../mr/CumulativeSplitInstruction.java          |  11 +-
 .../mr/DataPartitionMRInstruction.java          |   8 +-
 .../mr/GroupedAggregateInstruction.java         |  15 +-
 .../mr/GroupedAggregateMInstruction.java        |  12 +-
 .../instructions/mr/MMTSJMRInstruction.java     |   9 +-
 .../runtime/instructions/mr/MRInstruction.java  |  12 +-
 .../mr/MapMultChainInstruction.java             |  36 +-
 .../mr/MatrixReshapeMRInstruction.java          |   9 +-
 .../instructions/mr/PMMJMRInstruction.java      |  10 +-
 .../mr/ParameterizedBuiltinMRInstruction.java   |   7 +-
 .../instructions/mr/PickByCountInstruction.java |  21 +-
 .../instructions/mr/QuaternaryInstruction.java  |   5 +-
 .../instructions/mr/RandInstruction.java        |  12 +-
 .../mr/RangeBasedReIndexInstruction.java        |  16 +-
 .../instructions/mr/ReblockInstruction.java     |   5 +-
 .../mr/RemoveEmptyMRInstruction.java            |  12 +-
 .../instructions/mr/ReorgInstruction.java       |  11 +-
 .../instructions/mr/ReplicateInstruction.java   |   8 +-
 .../instructions/mr/ScalarInstruction.java      |   8 +-
 .../runtime/instructions/mr/SeqInstruction.java |  14 +-
 .../instructions/mr/TernaryInstruction.java     |   9 +-
 .../mr/UaggOuterChainInstruction.java           |   9 +-
 .../instructions/mr/UnaryInstruction.java       |   9 +-
 .../instructions/mr/ZeroOutInstruction.java     |  11 +-
 .../spark/AggregateTernarySPInstruction.java    |  13 +-
 .../spark/AggregateUnarySPInstruction.java      |   9 +-
 .../spark/AppendGAlignedSPInstruction.java      |  10 +-
 .../spark/AppendGSPInstruction.java             |   8 +-
 .../spark/AppendMSPInstruction.java             |   6 +-
 .../spark/AppendRSPInstruction.java             |   4 +-
 .../spark/BinUaggChainSPInstruction.java        |  13 +-
 .../spark/BinaryMatrixBVectorSPInstruction.java |   7 +-
 .../spark/BinaryMatrixMatrixSPInstruction.java  |   8 +-
 .../spark/BinaryMatrixScalarSPInstruction.java  |   5 +-
 .../instructions/spark/BinarySPInstruction.java |  24 +-
 .../spark/BuiltinNarySPInstruction.java         |  13 +-
 .../spark/CSVReblockSPInstruction.java          |  16 +-
 .../instructions/spark/CastSPInstruction.java   |  10 +-
 .../spark/CentralMomentSPInstruction.java       |   8 +-
 .../spark/CheckpointSPInstruction.java          |   9 +-
 .../spark/CompressionSPInstruction.java         |   9 +-
 .../spark/ComputationSPInstruction.java         |  16 +-
 .../spark/ConvolutionSPInstruction.java         |  12 +-
 .../spark/CovarianceSPInstruction.java          |  24 +-
 .../instructions/spark/CpmmSPInstruction.java   |  10 +-
 .../instructions/spark/CtableSPInstruction.java |   8 +-
 .../spark/CumulativeAggregateSPInstruction.java |   9 +-
 .../spark/CumulativeOffsetSPInstruction.java    |  11 +-
 .../spark/FrameAppendMSPInstruction.java        |   4 +-
 .../spark/FrameAppendRSPInstruction.java        |  18 +-
 .../spark/FrameIndexingSPInstruction.java       |   8 +-
 .../spark/IndexingSPInstruction.java            |   4 +-
 .../spark/MapmmChainSPInstruction.java          |  27 +-
 .../instructions/spark/MapmmSPInstruction.java  |   8 +-
 .../spark/MatrixAppendMSPInstruction.java       |   5 +-
 .../spark/MatrixAppendRSPInstruction.java       |   5 +-
 .../spark/MatrixIndexingSPInstruction.java      |  14 +-
 .../spark/MatrixReshapeSPInstruction.java       |   8 +-
 ...ReturnParameterizedBuiltinSPInstruction.java |   8 +-
 .../instructions/spark/PMapmmSPInstruction.java |   8 +-
 .../ParameterizedBuiltinSPInstruction.java      |  14 +-
 .../instructions/spark/PmmSPInstruction.java    |  21 +-
 .../spark/QuantilePickSPInstruction.java        |  14 +-
 .../spark/QuantileSortSPInstruction.java        |   7 +-
 .../spark/QuaternarySPInstruction.java          |  68 +---
 .../instructions/spark/RandSPInstruction.java   |  21 +-
 .../spark/ReblockSPInstruction.java             |  13 +-
 .../instructions/spark/ReorgSPInstruction.java  |  33 +-
 .../instructions/spark/RmmSPInstruction.java    |  10 +-
 .../instructions/spark/SPInstruction.java       |  12 +-
 .../instructions/spark/SpoofSPInstruction.java  |  56 +--
 .../spark/TernarySPInstruction.java             |  15 +-
 .../instructions/spark/Tsmm2SPInstruction.java  |  19 +-
 .../instructions/spark/TsmmSPInstruction.java   |  16 +-
 .../spark/UaggOuterChainSPInstruction.java      |  14 +-
 .../spark/UnaryMatrixSPInstruction.java         |   7 +-
 .../instructions/spark/UnarySPInstruction.java  |  11 +-
 .../instructions/spark/WriteSPInstruction.java  |  16 +-
 .../instructions/spark/ZipmmSPInstruction.java  |   9 +-
 .../spark/data/PartitionedBlock.java            |  13 +-
 .../spark/data/PartitionedBroadcast.java        |   9 +-
 .../ComputeBinaryBlockNnzFunction.java          |   6 +-
 .../functions/ConvertMatrixBlockToIJVLines.java |   2 +-
 .../functions/ConvertStringToLongTextPair.java  |   3 +-
 .../functions/ExtractBlockForBinaryReblock.java |   4 +-
 .../spark/functions/ReorgMapFunction.java       |   4 +-
 .../spark/utils/FrameRDDConverterUtils.java     |  45 +--
 .../spark/utils/RDDConverterUtils.java          |  34 +-
 .../spark/utils/RDDConverterUtilsExt.java       |  49 ++-
 .../instructions/spark/utils/RDDSortUtils.java  |   3 -
 .../instructions/spark/utils/SparkUtils.java    |   3 +-
 .../apache/sysml/runtime/matrix/CleanupMR.java  |   2 +-
 .../sysml/runtime/matrix/DataPartitionMR.java   |   4 +-
 .../org/apache/sysml/runtime/matrix/GMR.java    |  10 +-
 .../apache/sysml/runtime/matrix/JobReturn.java  |   7 +-
 .../runtime/matrix/MatrixCharacteristics.java   |  13 +-
 .../org/apache/sysml/runtime/matrix/SortMR.java |   5 +-
 .../sysml/runtime/matrix/data/CM_N_COVCell.java |  54 +--
 .../matrix/data/ConvolutionParameters.java      |   6 +-
 .../matrix/data/CudaSupportFunctions.java       |   5 +-
 .../DoublePrecisionCudaSupportFunctions.java    |   4 +-
 .../sysml/runtime/matrix/data/FrameBlock.java   |  35 +-
 .../sysml/runtime/matrix/data/InputInfo.java    |   6 +-
 .../runtime/matrix/data/LibCommonsMath.java     |  47 +--
 .../sysml/runtime/matrix/data/LibMatrixAgg.java | 179 +++-------
 .../runtime/matrix/data/LibMatrixBincell.java   | 105 ++----
 .../runtime/matrix/data/LibMatrixCUDA.java      | 207 ++++-------
 .../runtime/matrix/data/LibMatrixCuDNN.java     |  61 ++--
 .../LibMatrixCuDNNConvolutionAlgorithm.java     |  14 +-
 .../data/LibMatrixCuDNNInputRowFetcher.java     |   6 +-
 .../data/LibMatrixCuDNNPoolingDescriptors.java  |  10 +-
 .../runtime/matrix/data/LibMatrixCuMatMult.java |  25 +-
 .../sysml/runtime/matrix/data/LibMatrixDNN.java |  39 +-
 .../runtime/matrix/data/LibMatrixDNNConv2d.java |  11 +-
 .../runtime/matrix/data/LibMatrixDNNHelper.java |   3 +-
 .../runtime/matrix/data/LibMatrixDNNIm2Col.java |   4 +-
 .../matrix/data/LibMatrixDNNPooling.java        |   7 +-
 .../runtime/matrix/data/LibMatrixDNNRelu.java   |   4 +-
 .../runtime/matrix/data/LibMatrixDatagen.java   |  46 +--
 .../runtime/matrix/data/LibMatrixMult.java      | 277 ++++-----------
 .../runtime/matrix/data/LibMatrixNative.java    |  15 +-
 .../runtime/matrix/data/LibMatrixOuterAgg.java  | 266 +++-----------
 .../runtime/matrix/data/LibMatrixReorg.java     | 117 ++----
 .../sysml/runtime/matrix/data/MatrixBlock.java  | 356 +++++--------------
 .../sysml/runtime/matrix/data/MatrixCell.java   |  73 ++--
 .../runtime/matrix/data/MatrixPackedCell.java   |  13 +-
 .../sysml/runtime/matrix/data/MatrixValue.java  |  55 +--
 .../matrix/data/OperationsOnMatrixValues.java   |  93 ++---
 .../sysml/runtime/matrix/data/OutputInfo.java   |   6 +-
 .../matrix/data/RandomMatrixGenerator.java      |  27 +-
 .../SinglePrecisionCudaSupportFunctions.java    |   5 +-
 .../sysml/runtime/matrix/data/WeightedCell.java |  26 +-
 .../sysml/runtime/matrix/data/WeightedPair.java |   3 +-
 .../matrix/mapred/DistributedCacheInput.java    |  37 +-
 .../mapred/MRBaseForCommonInstructions.java     |   8 +-
 .../matrix/mapred/MRJobConfiguration.java       |  96 ++---
 .../matrix/mapred/PartialAggregator.java        |   4 +-
 .../sysml/runtime/matrix/mapred/ReduceBase.java |   4 +-
 .../matrix/operators/LeftScalarOperator.java    |   3 +-
 .../matrix/operators/RightScalarOperator.java   |   3 +-
 .../matrix/operators/ScalarOperator.java        |   5 +-
 .../test/integration/AutomatedTestBase.java     |  28 +-
 .../functions/frame/FrameConverterTest.java     |  14 +-
 .../functions/frame/FrameIndexingDistTest.java  |  11 +-
 .../functions/frame/FrameMatrixCastingTest.java |   5 +-
 .../functions/frame/FrameMatrixReblockTest.java |   5 +-
 .../functions/frame/FrameMatrixWriteTest.java   |   3 +-
 .../functions/frame/FrameReadWriteTest.java     |   3 +-
 .../functions/io/FullDynWriteTest.java          |  15 +-
 .../functions/io/SeqParReadTest.java            |   3 +-
 .../functions/jmlc/FrameReadMetaTest.java       |   5 +-
 .../DataFrameVectorFrameConversionTest.java     |   5 +-
 .../mlcontext/DataFrameVectorScriptTest.java    |   5 +-
 .../functions/python/PythonTestRunner.java      |  14 +-
 .../recompile/IPAComplexAppendTest.java         |  32 +-
 .../RewriteComplexMapMultChainTest.java         |  47 +--
 .../transform/TransformEncodeDecodeTest.java    |  12 +-
 .../org/apache/sysml/test/unit/UtilsTest.java   |  13 +-
 .../org/apache/sysml/test/utils/TestUtils.java  |  17 +-
 278 files changed, 1502 insertions(+), 4194 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 b12dc88..82cb2fa 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
@@ -193,7 +193,7 @@ public class RemoteDPParForSpark
 		private static final long serialVersionUID = 2016614593596923995L;
 
 		@Override
-		public Tuple2<Long, Iterable<Writable>> call(Tuple2<Long, Writable> arg0) throws Exception {
+		public Tuple2<Long, Iterable<Writable>> call(Tuple2<Long, Writable> arg0) {
 			return new Tuple2<>(arg0._1(), Collections.singletonList(arg0._2()));
 		}
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 ef0a6c0..e96a195 100644
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/Builtin.java
+++ b/src/main/java/org/apache/sysml/runtime/functionobjects/Builtin.java
@@ -291,9 +291,7 @@ public class Builtin extends ValueFunction
 	}
 
 	@Override
-	public double execute (double in) 
-		throws DMLRuntimeException 
-	{
+	public double execute (double in) {
 		switch(bFunc) {
 			case SIN:    return FASTMATH ? FastMath.sin(in) : Math.sin(in);
 			case COS:    return FASTMATH ? FastMath.cos(in) : Math.cos(in);
@@ -337,7 +335,7 @@ public class Builtin extends ValueFunction
 	}
 
 	@Override
-	public double execute (long in) throws DMLRuntimeException {
+	public double execute (long in) {
 		return execute((double)in);
 	}
 
@@ -345,7 +343,7 @@ public class Builtin extends ValueFunction
 	 * Builtin functions with two inputs
 	 */	
 	@Override
-	public double execute (double in1, double in2) throws DMLRuntimeException {
+	public double execute (double in1, double in2) {
 		switch(bFunc) {
 		
 		/*
@@ -433,7 +431,7 @@ public class Builtin extends ValueFunction
 	}
 	
 	@Override
-	public double execute (long in1, long in2) throws DMLRuntimeException {
+	public double execute (long in1, long in2) {
 		switch(bFunc) {
 		
 		case MAX:    
@@ -458,9 +456,7 @@ public class Builtin extends ValueFunction
 	}
 
 	@Override
-	public String execute (String in1) 
-		throws DMLRuntimeException 
-	{
+	public String execute (String in1) {
 		switch (bFunc) {
 		case PRINT:
 			if (!DMLScript.suppressPrint2Stdout())

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/functionobjects/CM.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/CM.java b/src/main/java/org/apache/sysml/runtime/functionobjects/CM.java
index a27e515..1a906c9 100644
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/CM.java
+++ b/src/main/java/org/apache/sysml/runtime/functionobjects/CM.java
@@ -83,13 +83,10 @@ public class CM extends ValueFunction
 	 * Special case for weights w2==1
 	 */
 	@Override
-	public Data execute(Data in1, double in2) 
-		throws DMLRuntimeException 
-	{
+	public Data execute(Data in1, double in2) {
 		CM_COV_Object cm1=(CM_COV_Object) in1;
 		
-		if(cm1.isCMAllZeros())
-		{
+		if(cm1.isCMAllZeros()) {
 			cm1.w=1;
 			cm1.mean.set(in2, 0);
 			cm1.m2.set(0,0);
@@ -189,9 +186,7 @@ public class CM extends ValueFunction
 	 * General case for arbitrary weights w2
 	 */
 	@Override
-	public Data execute(Data in1, double in2, double w2) 
-		throws DMLRuntimeException 
-	{
+	public Data execute(Data in1, double in2, double w2) {
 		CM_COV_Object cm1=(CM_COV_Object) in1;
 		
 		if(cm1.isCMAllZeros())
@@ -295,7 +290,7 @@ public class CM extends ValueFunction
 	 * Combining stats from two partitions of the data.
 	 */
 	@Override
-	public Data execute(Data in1, Data in2) throws DMLRuntimeException 
+	public Data execute(Data in1, Data in2)
 	{
 		CM_COV_Object cm1=(CM_COV_Object) in1;
 		CM_COV_Object cm2=(CM_COV_Object) in2;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/functionobjects/COV.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/COV.java b/src/main/java/org/apache/sysml/runtime/functionobjects/COV.java
index ff801cc..82c7a2c 100644
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/COV.java
+++ b/src/main/java/org/apache/sysml/runtime/functionobjects/COV.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.runtime.functionobjects;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.cp.CM_COV_Object;
 import org.apache.sysml.runtime.instructions.cp.Data;
 import org.apache.sysml.runtime.instructions.cp.KahanObject;
@@ -59,10 +58,8 @@ public class COV extends ValueFunction
 	 * @param v ?
 	 * @param w2 ?
 	 * @return result
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public Data execute(Data in1, double u, double v, double w2) 
-		throws DMLRuntimeException 
 	{
 		CM_COV_Object cov1=(CM_COV_Object) in1;
 		if(cov1.isCOVAllZeros())
@@ -95,7 +92,6 @@ public class COV extends ValueFunction
 	 */
 	@Override
 	public Data execute(Data in1, double u, double v) 
-		throws DMLRuntimeException 
 	{
 		CM_COV_Object cov1=(CM_COV_Object) in1;
 		if(cov1.isCOVAllZeros())
@@ -119,7 +115,7 @@ public class COV extends ValueFunction
 	}
 	
 	@Override
-	public Data execute(Data in1, Data in2) throws DMLRuntimeException 
+	public Data execute(Data in1, Data in2)
 	{
 		CM_COV_Object cov1=(CM_COV_Object) in1;
 		CM_COV_Object cov2=(CM_COV_Object) in2;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/functionobjects/CTable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/CTable.java b/src/main/java/org/apache/sysml/runtime/functionobjects/CTable.java
index af6d8a0..4e837a6 100644
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/CTable.java
+++ b/src/main/java/org/apache/sysml/runtime/functionobjects/CTable.java
@@ -42,18 +42,14 @@ public class CTable extends ValueFunction
 		return singleObj;
 	}
 
-	public void execute(double v1, double v2, double w, boolean ignoreZeros, CTableMap resultMap, MatrixBlock resultBlock) 
-		throws DMLRuntimeException 
-	{
+	public void execute(double v1, double v2, double w, boolean ignoreZeros, CTableMap resultMap, MatrixBlock resultBlock) {
 		if( resultBlock != null )
 			execute(v1, v2, w, ignoreZeros, resultBlock);
 		else
 			execute(v1, v2, w, ignoreZeros, resultMap);
 	}
 	
-	public void execute(double v1, double v2, double w, boolean ignoreZeros, CTableMap resultMap) 
-		throws DMLRuntimeException 
-	{	
+	public void execute(double v1, double v2, double w, boolean ignoreZeros, CTableMap resultMap) {
 		// If any of the values are NaN (i.e., missing) then 
 		// we skip this tuple, proceed to the next tuple
 		if ( Double.isNaN(v1) || Double.isNaN(v2) || Double.isNaN(w) ) {
@@ -79,8 +75,7 @@ public class CTable extends ValueFunction
 	}	
 
 	public void execute(double v1, double v2, double w, boolean ignoreZeros, MatrixBlock ctableResult) 
-		throws DMLRuntimeException 
-	{	
+	{
 		// If any of the values are NaN (i.e., missing) then 
 		// we skip this tuple, proceed to the next tuple
 		if ( Double.isNaN(v1) || Double.isNaN(v2) || Double.isNaN(w) ) {
@@ -112,8 +107,7 @@ public class CTable extends ValueFunction
 	}
 
 	public int execute(int row, double v2, double w, int maxCol, MatrixBlock ctableResult) 
-		throws DMLRuntimeException 
-	{	
+	{
 		// If any of the values are NaN (i.e., missing) then 
 		// we skip this tuple, proceed to the next tuple
 		if ( Double.isNaN(v2) || Double.isNaN(w) ) {
@@ -135,7 +129,6 @@ public class CTable extends ValueFunction
 	}
 
 	public Pair<MatrixIndexes,Double> execute( long row, double v2, double w ) 
-		throws DMLRuntimeException
 	{
 		// If any of the values are NaN (i.e., missing) then 
 		// we skip this tuple, proceed to the next tuple

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/functionobjects/FunctionObject.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/FunctionObject.java b/src/main/java/org/apache/sysml/runtime/functionobjects/FunctionObject.java
index d18e758..e66e324 100644
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/FunctionObject.java
+++ b/src/main/java/org/apache/sysml/runtime/functionobjects/FunctionObject.java
@@ -35,32 +35,32 @@ public abstract class FunctionObject
 
 	//basic execute methods for all function objects
 	
-	public double execute ( double in1, double in2 ) throws DMLRuntimeException {
+	public double execute ( double in1, double in2 ) {
 		throw new DMLRuntimeException("FunctionObject.execute(double,double): should never get called in the base class");
 	}
 	
-	public double execute ( long in1, long in2 )  throws DMLRuntimeException  {
+	public double execute ( long in1, long in2 ) {
 		throw new DMLRuntimeException("FunctionObject.execute(int,int): should never get called in the base class");
 	}
 	
-	public double execute ( double in )  throws DMLRuntimeException {
+	public double execute ( double in ) {
 		throw new DMLRuntimeException("FunctionObject.execute(double): should never get called in the base class");
 	}
 	
-	public double execute ( long in )  throws DMLRuntimeException {
+	public double execute ( long in ) {
 		throw new DMLRuntimeException("FunctionObject.execute(int): should never get called in the base class");
 	}
 	
-	public boolean execute ( boolean in1, boolean in2 )  throws DMLRuntimeException  {
+	public boolean execute ( boolean in1, boolean in2 ) {
 		throw new DMLRuntimeException("FunctionObject.execute(boolean,boolean): should never get called in the base class");
 	}
 	
-	public boolean execute ( boolean in )  throws DMLRuntimeException  {
+	public boolean execute ( boolean in ) {
 		throw new DMLRuntimeException("FunctionObject.execute(boolean): should never get called in the base class");
 	}
 	
 	// this version is for parameterized builtins with input parameters of form: name=value 
-	public double execute ( HashMap<String,String> params )  throws DMLRuntimeException  {
+	public double execute ( HashMap<String,String> params ) {
 		throw new DMLRuntimeException("FunctionObject.execute(HashMap<String,String> params): should never get called in the base class");
 	}
 
@@ -70,15 +70,15 @@ public abstract class FunctionObject
 	 * For complex function object that operates on objects instead of native values 
 	 */
 
-	public Data execute(Data in1, double in2) throws DMLRuntimeException {
+	public Data execute(Data in1, double in2) {
 		throw new DMLRuntimeException("execute(): should not be invoked from base class.");
 	}
 	
-	public Data execute(Data in1, double in2, double in3) throws DMLRuntimeException {
+	public Data execute(Data in1, double in2, double in3) {
 		throw new DMLRuntimeException("execute(): should not be invoked from base class.");
 	}
 	
-	public Data execute(Data in1, Data in2) throws DMLRuntimeException {
+	public Data execute(Data in1, Data in2) {
 		throw new DMLRuntimeException("execute(): should not be invoked from base class.");
 	}
 	
@@ -87,11 +87,11 @@ public abstract class FunctionObject
 	 * For file functions and specific builtin functions 
 	 */
 
-	public String execute ( String in1 ) throws DMLRuntimeException {
+	public String execute ( String in1 ) {
 		throw new DMLRuntimeException("FileFunction.execute(String): should never get called in the base class");
 	}
 	
-	public String execute ( String in1, String in2 ) throws DMLRuntimeException {
+	public String execute ( String in1, String in2 ) {
 		throw new DMLRuntimeException("FileFunction.execute(String,String): should never get called in the base class");
 	}	
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/functionobjects/KahanPlus.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/KahanPlus.java b/src/main/java/org/apache/sysml/runtime/functionobjects/KahanPlus.java
index 3d524fe..28b1b44 100644
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/KahanPlus.java
+++ b/src/main/java/org/apache/sysml/runtime/functionobjects/KahanPlus.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.functionobjects;
 
 import java.io.Serializable;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.cp.Data;
 import org.apache.sysml.runtime.instructions.cp.KahanObject;
 
@@ -44,9 +43,7 @@ public class KahanPlus extends KahanFunction implements Serializable
 	}
 	
 	@Override
-	public Data execute(Data in1, double in2) 
-		throws DMLRuntimeException 
-	{
+	public Data execute(Data in1, double in2) {
 		KahanObject kahanObj=(KahanObject)in1;
 		
 		//fast path for INF/-INF in order to ensure result correctness
@@ -59,14 +56,12 @@ public class KahanPlus extends KahanFunction implements Serializable
 		//default path for any other value
 		double correction=in2+kahanObj._correction;
 		double sum=kahanObj._sum+correction;
-		kahanObj.set(sum, correction-(sum-kahanObj._sum)); //prevent eager JIT opt 		
+		kahanObj.set(sum, correction-(sum-kahanObj._sum)); //prevent eager JIT opt
 		return kahanObj;
 	}
 	
 	@Override // in1, in2 is the sum, in3 is the correction
-	public Data execute(Data in1, double in2, double in3) 
-		throws DMLRuntimeException 
-	{
+	public Data execute(Data in1, double in2, double in3) {
 		KahanObject kahanObj=(KahanObject)in1;
 		
 		//fast path for INF/-INF in order to ensure result correctness

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/functionobjects/KahanPlusSq.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/KahanPlusSq.java b/src/main/java/org/apache/sysml/runtime/functionobjects/KahanPlusSq.java
index 7a8c7c9..47f3abc 100644
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/KahanPlusSq.java
+++ b/src/main/java/org/apache/sysml/runtime/functionobjects/KahanPlusSq.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.runtime.functionobjects;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.cp.Data;
 import org.apache.sysml.runtime.instructions.cp.KahanObject;
 
@@ -32,66 +31,64 @@ import java.io.Serializable;
  */
 public class KahanPlusSq extends KahanFunction implements Serializable {
 
-    private static final long serialVersionUID = 5774388904472231717L;
+	private static final long serialVersionUID = 5774388904472231717L;
 
-    private static KahanPlusSq singleObj = null;
-    private KahanPlus kplus = null;
+	private static KahanPlusSq singleObj = null;
+	private KahanPlus kplus = null;
 
-    private KahanPlusSq() {
-        kplus = KahanPlus.getKahanPlusFnObject();
-    }
+	private KahanPlusSq() {
+		kplus = KahanPlus.getKahanPlusFnObject();
+	}
 
-    /**
-     * Get the KahanPlusSq singleton object.
-     * 
-     * @return KahanPlusSq singleton object
-     */
-    public static KahanPlusSq getKahanPlusSqFnObject() {
-        if (singleObj == null)
-            singleObj = new KahanPlusSq();
-        return singleObj;
-    }
+	/**
+	 * Get the KahanPlusSq singleton object.
+	 * 
+	 * @return KahanPlusSq singleton object
+	 */
+	public static KahanPlusSq getKahanPlusSqFnObject() {
+		if (singleObj == null)
+			singleObj = new KahanPlusSq();
+		return singleObj;
+	}
 
-    /**
-     * Square the given term, then add to the existing sum using
-     * the Kahan summation algorithm.
-     *
-     * @param kObj A KahanObject supplied as a Data type containing
-     *             the current sum and correction factor for the
-     *             Kahan summation algorithm.
-     * @param in The current term to be squared and added.
-     */
-    @Override
-    public Data execute(Data kObj, double in)
-            throws DMLRuntimeException {
-        kplus.execute(kObj, in * in);
-        return kObj;
-    }
+	/**
+	 * Square the given term, then add to the existing sum using
+	 * the Kahan summation algorithm.
+	 *
+	 * @param kObj A KahanObject supplied as a Data type containing
+	 *  the current sum and correction factor for the
+	 *  Kahan summation algorithm.
+	 * @param in The current term to be squared and added.
+	 */
+	@Override
+	public Data execute(Data kObj, double in) {
+		kplus.execute(kObj, in * in);
+		return kObj;
+	}
 
-    /**
-     * Add the given sum and correction factor to the existing
-     * sum in the KahanObject using the Kahan summation algorithm.
-     *
-     * @param kObj A KahanObject supplied as a Data type containing
-     *             the current sum and correction factor for the
-     *             Kahan summation algorithm.
-     * @param sum The current sum.
-     * @param corr The current correction factor.
-     */
-    @Override
-    public Data execute(Data kObj, double sum, double corr)
-            throws DMLRuntimeException {
-        kplus.execute(kObj, sum, corr);
-        return kObj;
-    }
+	/**
+	 * Add the given sum and correction factor to the existing
+	 * sum in the KahanObject using the Kahan summation algorithm.
+	 *
+	 * @param kObj A KahanObject supplied as a Data type containing
+	 *  the current sum and correction factor for the
+	 *  Kahan summation algorithm.
+	 * @param sum The current sum.
+	 * @param corr The current correction factor.
+	 */
+	@Override
+	public Data execute(Data kObj, double sum, double corr) {
+		kplus.execute(kObj, sum, corr);
+		return kObj;
+	}
 
-    @Override
-    public void execute2(KahanObject kObj, double in) {
-        kplus.execute2(kObj, in * in);
-    }
-    
-    @Override
-    public void execute3(KahanObject kObj, double in, int count) {
-        kplus.execute3(kObj, in * in, count);
-    }
+	@Override
+	public void execute2(KahanObject kObj, double in) {
+		kplus.execute2(kObj, in * in);
+	}
+	
+	@Override
+	public void execute3(KahanObject kObj, double in, int count) {
+		kplus.execute3(kObj, in * in, count);
+	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/functionobjects/Mean.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/Mean.java b/src/main/java/org/apache/sysml/runtime/functionobjects/Mean.java
index 907e732..cbdacd1 100644
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/Mean.java
+++ b/src/main/java/org/apache/sysml/runtime/functionobjects/Mean.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.runtime.functionobjects;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.cp.Data;
 import org.apache.sysml.runtime.instructions.cp.KahanObject;
 
@@ -43,7 +42,7 @@ public class Mean extends ValueFunction
 	}
 	
 	@Override
-	public Data execute(Data in1, double in2, double count) throws DMLRuntimeException {
+	public Data execute(Data in1, double in2, double count) {
 		KahanObject kahanObj=(KahanObject)in1;
 		double delta = (in2-kahanObj._sum)/count;
 		_plus.execute(in1, delta);	

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/functionobjects/ParameterizedBuiltin.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/ParameterizedBuiltin.java b/src/main/java/org/apache/sysml/runtime/functionobjects/ParameterizedBuiltin.java
index 60886c0..909fdc8 100644
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/ParameterizedBuiltin.java
+++ b/src/main/java/org/apache/sysml/runtime/functionobjects/ParameterizedBuiltin.java
@@ -27,7 +27,6 @@ import org.apache.commons.math3.distribution.ExponentialDistribution;
 import org.apache.commons.math3.distribution.FDistribution;
 import org.apache.commons.math3.distribution.NormalDistribution;
 import org.apache.commons.math3.distribution.TDistribution;
-import org.apache.commons.math3.exception.MathArithmeticException;
 
 import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.util.UtilFunctions;
@@ -89,11 +88,11 @@ public class ParameterizedBuiltin extends ValueFunction
 		distFunc = dist;
 	}
 
-	public static ParameterizedBuiltin getParameterizedBuiltinFnObject (String str) throws DMLRuntimeException {
+	public static ParameterizedBuiltin getParameterizedBuiltinFnObject (String str) {
 		return getParameterizedBuiltinFnObject (str, null);
 	}
 
-	public static ParameterizedBuiltin getParameterizedBuiltinFnObject (String str, String str2) throws DMLRuntimeException {
+	public static ParameterizedBuiltin getParameterizedBuiltinFnObject (String str, String str2) {
 		
 		ParameterizedBuiltinCode code = String2ParameterizedBuiltinCode.get(str);
 		
@@ -178,7 +177,7 @@ public class ParameterizedBuiltin extends ValueFunction
 	}
 	
 	@Override
-	public double execute(HashMap<String,String> params) throws DMLRuntimeException {
+	public double execute(HashMap<String,String> params) {
 		switch(bFunc) {
 		case CDF:
 		case INVCDF:
@@ -205,10 +204,8 @@ public class ParameterizedBuiltin extends ValueFunction
 	 * @param params map of parameters
 	 * @param inverse true if inverse
 	 * @return cdf or inverse cdf
-	 * @throws MathArithmeticException if MathArithmeticException occurs
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static double computeFromDistribution (ProbabilityDistributionCode dcode, HashMap<String,String> params, boolean inverse ) throws MathArithmeticException, DMLRuntimeException {
+	private static double computeFromDistribution (ProbabilityDistributionCode dcode, HashMap<String,String> params, boolean inverse ) {
 		
 		// given value is "quantile" when inverse=false, and it is "probability" when inverse=true
 		double val = Double.parseDouble(params.get("target"));

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/functionobjects/Plus.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/Plus.java b/src/main/java/org/apache/sysml/runtime/functionobjects/Plus.java
index fc1a8f6..70aa598 100644
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/Plus.java
+++ b/src/main/java/org/apache/sysml/runtime/functionobjects/Plus.java
@@ -21,8 +21,6 @@ package org.apache.sysml.runtime.functionobjects;
 
 import java.io.Serializable;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
-
 // Singleton class
 
 public class Plus extends ValueFunction implements Serializable 
@@ -57,7 +55,7 @@ public class Plus extends ValueFunction implements Serializable
 	}
 
 	@Override
-	public String execute ( String in1, String in2 ) throws DMLRuntimeException {
+	public String execute ( String in1, String in2 ) {
 		return in1 + in2;
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/functionobjects/RemoveFile.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/RemoveFile.java b/src/main/java/org/apache/sysml/runtime/functionobjects/RemoveFile.java
deleted file mode 100644
index 2412380..0000000
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/RemoveFile.java
+++ /dev/null
@@ -1,51 +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.functionobjects;
-
-import java.io.IOException;
-
-import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.util.MapReduceTool;
-
-
-public class RemoveFile extends FileFunction 
-{
-	private static RemoveFile singleObj = null;
-
-	private RemoveFile() {
-		// nothing to do here
-	}
-	
-	public static RemoveFile getRemoveFileFnObject() {
-		if ( singleObj == null )
-			singleObj = new RemoveFile();
-		return singleObj;
-	}
-
-	@Override
-	public String execute (String fname) throws DMLRuntimeException {
-		try {
-			MapReduceTool.deleteFileIfExistOnHDFS(fname);
-		} catch (IOException e) {
-			throw new DMLRuntimeException(e);
-		}
-		return null;
-	}
-}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/functionobjects/RenameFile.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/RenameFile.java b/src/main/java/org/apache/sysml/runtime/functionobjects/RenameFile.java
deleted file mode 100644
index ef6f8a5..0000000
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/RenameFile.java
+++ /dev/null
@@ -1,52 +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.functionobjects;
-
-import java.io.IOException;
-
-import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.util.MapReduceTool;
-
-
-public class RenameFile extends FileFunction 
-{
-		
-	private static RenameFile singleObj = null;
-
-	private RenameFile() {
-		// nothing to do here
-	}
-	
-	public static RenameFile getRenameFileFnObject() {
-		if ( singleObj == null )
-			singleObj = new RenameFile();
-		return singleObj;
-	}
-
-	@Override
-	public String execute (String origName, String newName) throws DMLRuntimeException {
-		try {
-			MapReduceTool.renameFileOnHDFS(origName, newName);
-		} catch (IOException e) {
-			throw new DMLRuntimeException(e);
-		}
-		return null;
-	}
-}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/functionobjects/TernaryValueFunction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/TernaryValueFunction.java b/src/main/java/org/apache/sysml/runtime/functionobjects/TernaryValueFunction.java
index 9629746..eb5b6c7 100644
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/TernaryValueFunction.java
+++ b/src/main/java/org/apache/sysml/runtime/functionobjects/TernaryValueFunction.java
@@ -21,15 +21,13 @@ package org.apache.sysml.runtime.functionobjects;
 
 import java.io.Serializable;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.matrix.operators.BinaryOperator;
 
 public abstract class TernaryValueFunction extends ValueFunction implements Serializable
 {
 	private static final long serialVersionUID = 4837616587192612216L;
 	
-	public abstract double execute ( double in1, double in2, double in3 )
-		throws DMLRuntimeException;
+	public abstract double execute ( double in1, double in2, double in3 );
 	
 	public interface ValueFunctionWithConstant {
 		public BinaryOperator setOp2Constant(double cnt);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 43b3895..c8d0d6c 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
@@ -293,12 +293,9 @@ public class CPInstructionParser extends InstructionParser
 		String2CPFileInstructionType.put( "rmempty"	    , CPType.ParameterizedBuiltin);
 	}
 
-	public static CPInstruction parseSingleInstruction (String str ) 
-		throws DMLRuntimeException 
-	{
+	public static CPInstruction parseSingleInstruction (String str ) {
 		if ( str == null || str.isEmpty() )
 			return null;
-
 		CPType cptype = InstructionUtils.getCPType(str); 
 		if ( cptype == null ) 
 			throw new DMLRuntimeException("Unable derive cptype for instruction: " + str);
@@ -308,16 +305,11 @@ public class CPInstructionParser extends InstructionParser
 		return cpinst;
 	}
 	
-	public static CPInstruction parseSingleInstruction ( CPType cptype, String str ) 
-		throws DMLRuntimeException 
-	{
+	public static CPInstruction parseSingleInstruction ( CPType cptype, String str ) {
 		ExecType execType = null; 
-		
 		if ( str == null || str.isEmpty() ) 
 			return null;
-		
-		switch(cptype) 
-		{
+		switch(cptype) {
 			case AggregateUnary:
 				return AggregateUnaryCPInstruction.parseInstruction(str);
 			

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/GPUInstructionParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/GPUInstructionParser.java b/src/main/java/org/apache/sysml/runtime/instructions/GPUInstructionParser.java
index d4e18cb..903dca6 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/GPUInstructionParser.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/GPUInstructionParser.java
@@ -144,13 +144,10 @@ public class GPUInstructionParser  extends InstructionParser
 		String2GPUInstructionType.put( RightIndex.OPCODE, GPUINSTRUCTION_TYPE.MatrixIndexing); 
 	}
 	
-	public static GPUInstruction parseSingleInstruction (String str ) 
-		throws DMLRuntimeException 
-	{
+	public static GPUInstruction parseSingleInstruction (String str ) {
 		if ( str == null || str.isEmpty() )
 			return null;
-
-		GPUINSTRUCTION_TYPE cptype = InstructionUtils.getGPUType(str); 
+		GPUINSTRUCTION_TYPE cptype = InstructionUtils.getGPUType(str);
 		if ( cptype == null ) 
 			throw new DMLRuntimeException("Unable derive cptype for instruction: " + str);
 		GPUInstruction cpinst = parseSingleInstruction(cptype, str);
@@ -159,9 +156,7 @@ public class GPUInstructionParser  extends InstructionParser
 		return cpinst;
 	}
 	
-	public static GPUInstruction parseSingleInstruction ( GPUINSTRUCTION_TYPE gputype, String str ) 
-		throws DMLRuntimeException 
-	{
+	public static GPUInstruction parseSingleInstruction ( GPUINSTRUCTION_TYPE gputype, String str ) {
 		if( str == null || str.isEmpty() ) 
 			return null;	
 		if( gputype == null )

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 1171e80..11dfb99 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/Instruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/Instruction.java
@@ -24,7 +24,6 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.lops.Lop;
 import org.apache.sysml.parser.DataIdentifier;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 
 
@@ -210,11 +209,8 @@ public abstract class Instruction
 	 * 
 	 * @param pattern ?
 	 * @param replace ?
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void updateInstructionThreadID(String pattern, String replace) 
-		throws DMLRuntimeException
-	{
+	public void updateInstructionThreadID(String pattern, String replace) {
 		//do nothing
 	}
 	
@@ -225,11 +221,8 @@ public abstract class Instruction
 	 * 
 	 * @param ec execution context
 	 * @return instruction
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public Instruction preprocessInstruction(ExecutionContext ec)
-		throws DMLRuntimeException
-	{
+	public Instruction preprocessInstruction(ExecutionContext ec){
 		//update debug status
 		ec.updateDebugState( this );
 		
@@ -241,10 +234,8 @@ public abstract class Instruction
 	 * This method should be used to execute the instruction. 
 	 * 
 	 * @param ec execution context
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public abstract void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException;
+	public abstract void processInstruction(ExecutionContext ec);
 	
 	/**
 	 * This method should be used for any tear down after executing this instruction.
@@ -252,11 +243,8 @@ public abstract class Instruction
 	 * call the super method.
 	 * 
 	 * @param ec execution context
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void postprocessInstruction(ExecutionContext ec)
-		throws DMLRuntimeException
-	{
+	public void postprocessInstruction(ExecutionContext ec) {
 		//do nothing
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 e483100..d25bbdc 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/InstructionParser.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/InstructionParser.java
@@ -29,9 +29,7 @@ import org.apache.sysml.runtime.instructions.spark.SPInstruction.SPType;
 
 public class InstructionParser 
 {
-	public static Instruction parseSingleInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static Instruction parseSingleInstruction ( String str ) {
 		if ( str == null || str.isEmpty() )
 			return null;
 		
@@ -67,19 +65,13 @@ public class InstructionParser
 		}
 	}
 	
-	public static Instruction[] parseMixedInstructions ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static Instruction[] parseMixedInstructions ( String str ) {
 		if ( str == null || str.isEmpty() )
 			return null;
-		
 		String[] strlist = str.split(Instruction.INSTRUCTION_DELIM);
 		Instruction[] inst = new Instruction[strlist.length];
-		
-		for ( int i=0; i < inst.length; i++ ) {
+		for ( int i=0; i < inst.length; i++ )
 			inst[i] = parseSingleInstruction ( strlist[i] );
-		}
-		
 		return inst;
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 172aa15..294827d 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/InstructionUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/InstructionUtils.java
@@ -103,9 +103,7 @@ import org.apache.sysml.runtime.matrix.operators.UnaryOperator;
 public class InstructionUtils 
 {
 
-	public static int checkNumFields( String str, int expected ) 
-		throws DMLRuntimeException 
-	{
+	public static int checkNumFields( String str, int expected ) {
 		//note: split required for empty tokens
 		int numParts = str.split(Instruction.OPERAND_DELIM).length;
 		int numFields = numParts - 2; // -2 accounts for execType and opcode
@@ -116,9 +114,7 @@ public class InstructionUtils
 		return numFields; 
 	}
 
-	public static int checkNumFields( String[] parts, int expected ) 
-		throws DMLRuntimeException 
-	{
+	public static int checkNumFields( String[] parts, int expected ) {
 		int numParts = parts.length;
 		int numFields = numParts - 1; //account for opcode
 		
@@ -128,9 +124,7 @@ public class InstructionUtils
 		return numFields; 
 	}
 
-	public static int checkNumFields( String[] parts, int expected1, int expected2 ) 
-		throws DMLRuntimeException 
-	{
+	public static int checkNumFields( String[] parts, int expected1, int expected2 ) {
 		int numParts = parts.length;
 		int numFields = numParts - 1; //account for opcode
 		
@@ -140,16 +134,12 @@ public class InstructionUtils
 		return numFields; 
 	}
 
-	public static int checkNumFields( String str, int expected1, int expected2 ) 
-		throws DMLRuntimeException 
-	{
+	public static int checkNumFields( String str, int expected1, int expected2 ) {
 		//note: split required for empty tokens
 		int numParts = str.split(Instruction.OPERAND_DELIM).length;
 		int numFields = numParts - 2; // -2 accounts for execType and opcode
-		
 		if ( numFields != expected1 && numFields != expected2 ) 
 			throw new DMLRuntimeException("checkNumFields() for (" + str + ") -- expected number (" + expected1 + " or "+ expected2 +") != is not equal to actual number (" + numFields + ").");
-		
 		return numFields; 
 	}
 	
@@ -161,8 +151,7 @@ public class InstructionUtils
 	 * @param str instruction string
 	 * @return instruction parts as string array
 	 */
-	public static String[] getInstructionParts( String str ) 
-	{
+	public static String[] getInstructionParts( String str ) {
 		StringTokenizer st = new StringTokenizer( str, Instruction.OPERAND_DELIM );
 		String[] ret = new String[st.countTokens()-1];
 		st.nextToken(); // stripping-off the exectype
@@ -188,8 +177,7 @@ public class InstructionUtils
 	 * @param str instruction string
 	 * @return instruction parts as string array
 	 */
-	public static String[] getInstructionPartsWithValueType( String str ) 
-	{
+	public static String[] getInstructionPartsWithValueType( String str ) {
 		//note: split required for empty tokens
 		String[] parts = str.split(Instruction.OPERAND_DELIM, -1);
 		String[] ret = new String[parts.length-1]; // stripping-off the exectype
@@ -503,9 +491,7 @@ public class InstructionUtils
 			new UnaryOperator(Builtin.getBuiltinFnObject(opcode));
 	}
 
-	public static Operator parseBinaryOrBuiltinOperator(String opcode, CPOperand in1, CPOperand in2) 
-		throws DMLRuntimeException 
-	{
+	public static Operator parseBinaryOrBuiltinOperator(String opcode, CPOperand in1, CPOperand in2) {
 		if( LibCommonsMath.isSupportedMatrixMatrixOperation(opcode) )
 			return null;
 		boolean matrixScalar = (in1.getDataType() != in2.getDataType());
@@ -516,9 +502,7 @@ public class InstructionUtils
 				parseBinaryOperator(opcode));
 	}
 	
-	public static Operator parseExtendedBinaryOrBuiltinOperator(String opcode, CPOperand in1, CPOperand in2) 
-		throws DMLRuntimeException 
-	{
+	public static Operator parseExtendedBinaryOrBuiltinOperator(String opcode, CPOperand in1, CPOperand in2) {
 		boolean matrixScalar = (in1.getDataType() != in2.getDataType());
 		return Builtin.isBuiltinFnObject(opcode) ?
 			(matrixScalar ? new RightScalarOperator( Builtin.getBuiltinFnObject(opcode), 0) :
@@ -755,9 +739,7 @@ public class InstructionUtils
 		throw new RuntimeException("Unknown binary opcode " + opcode);
 	}
 
-	public static BinaryOperator parseExtendedBinaryOperator(String opcode) 
-		throws DMLRuntimeException
-	{
+	public static BinaryOperator parseExtendedBinaryOperator(String opcode) {
 		if(opcode.equalsIgnoreCase("==") || opcode.equalsIgnoreCase("map=="))
 			return new BinaryOperator(Equals.getEqualsFnObject());
 		else if(opcode.equalsIgnoreCase("!=") || opcode.equalsIgnoreCase("map!="))

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 6777d51..e587fc6 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/MRInstructionParser.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/MRInstructionParser.java
@@ -318,19 +318,14 @@ public class MRInstructionParser extends InstructionParser
 	}
 	
 	
-	public static MRInstruction parseSingleInstruction (String str ) 
-		throws DMLRuntimeException 
-	{
+	public static MRInstruction parseSingleInstruction (String str ) {
 		if ( str == null || str.isEmpty() )
 			return null;
-		
 		MRType mrtype = InstructionUtils.getMRType(str); 
 		return parseSingleInstruction(mrtype, str);
 	}
 	
-	public static MRInstruction parseSingleInstruction (MRType mrtype, String str ) 
-		throws DMLRuntimeException 
-	{
+	public static MRInstruction parseSingleInstruction (MRType mrtype, String str ) {
 		if ( str == null || str.isEmpty() )
 			return null;
 		
@@ -474,125 +469,88 @@ public class MRInstructionParser extends InstructionParser
 		}
 	}
 	
-	public static MRInstruction[] parseMixedInstructions ( String str ) throws DMLRuntimeException {
+	public static MRInstruction[] parseMixedInstructions ( String str ) {
 		if ( str == null || str.isEmpty() )
 			return null;
-		
 		Instruction[] inst = InstructionParser.parseMixedInstructions(str);
 		MRInstruction[] mrinst = new MRInstruction[inst.length];
-		for ( int i=0; i < inst.length; i++ ) {
+		for ( int i=0; i < inst.length; i++ )
 			mrinst[i] = (MRInstruction) inst[i];
-		}
-		
 		return mrinst;
 	}
 	
-	public static AggregateInstruction[] parseAggregateInstructions(String str) throws DMLRuntimeException 
-	{
+	public static AggregateInstruction[] parseAggregateInstructions(String str) {
 		AggregateInstruction[] inst=null;
-		if(str!=null && !str.isEmpty())
-		{
+		if(str!=null && !str.isEmpty()) {
 			String[] strlist = str.split(Instruction.INSTRUCTION_DELIM);
 			inst = new AggregateInstruction[strlist.length];
-			
 			for(int i=0; i < strlist.length; i++)
-			{
 				inst[i] = (AggregateInstruction) AggregateInstruction.parseInstruction( strlist[i] );
-			}
 		}
 		return inst;
 	}
 	
-	public static ReblockInstruction[] parseReblockInstructions(String str) throws DMLRuntimeException 
-	{
+	public static ReblockInstruction[] parseReblockInstructions(String str) {
 		ReblockInstruction[] inst=null;
-		if(str!=null && !str.isEmpty())
-		{
+		if(str!=null && !str.isEmpty()) {
 			String[] strlist = str.split(Instruction.INSTRUCTION_DELIM);
 			inst = new ReblockInstruction[strlist.length];
-			
 			for(int i=0; i < strlist.length; i++)
-			{
 				inst[i] = (ReblockInstruction) ReblockInstruction.parseInstruction( strlist[i] );
-			}
 		}
 		return inst;
 	}
 	
-	public static CSVReblockInstruction[] parseCSVReblockInstructions(String str) throws DMLRuntimeException 
-	{
+	public static CSVReblockInstruction[] parseCSVReblockInstructions(String str) {
 		CSVReblockInstruction[] inst=null;
-		if(str!=null && !str.isEmpty())
-		{
+		if(str!=null && !str.isEmpty()) {
 			String[] strlist = str.split(Instruction.INSTRUCTION_DELIM);
 			inst = new CSVReblockInstruction[strlist.length];
-			
 			for(int i=0; i < strlist.length; i++)
-			{
 				inst[i] = (CSVReblockInstruction) CSVReblockInstruction.parseInstruction( strlist[i] );
-			}
 		}
 		return inst;
 	}
 	
-	public static CSVWriteInstruction[] parseCSVWriteInstructions(String str) throws DMLRuntimeException 
-	{
+	public static CSVWriteInstruction[] parseCSVWriteInstructions(String str) {
 		CSVWriteInstruction[] inst=null;
-		if(str!=null && !str.isEmpty())
-		{
+		if(str!=null && !str.isEmpty()) {
 			String[] strlist = str.split(Instruction.INSTRUCTION_DELIM);
 			inst = new CSVWriteInstruction[strlist.length];
-			
 			for(int i=0; i < strlist.length; i++)
-			{
 				inst[i] = (CSVWriteInstruction) CSVWriteInstruction.parseInstruction( strlist[i] );
-			}
 		}
 		return inst;
 	}
 	
-	public static AggregateBinaryInstruction[] parseAggregateBinaryInstructions(String str) throws DMLRuntimeException 
-	{
+	public static AggregateBinaryInstruction[] parseAggregateBinaryInstructions(String str) {
 		AggregateBinaryInstruction[] inst=null;
-		if(str!=null && !str.isEmpty())
-		{
+		if(str!=null && !str.isEmpty()) {
 			String[] strlist = str.split(Instruction.INSTRUCTION_DELIM);
 			inst = new AggregateBinaryInstruction[strlist.length];
-			
 			for(int i=0; i < strlist.length; i++)
-			{
 				inst[i] = (AggregateBinaryInstruction) AggregateBinaryInstruction.parseInstruction( strlist[i] );
-			}
 		}
 		return inst;
 	}
 	
-	public static DataGenMRInstruction[] parseDataGenInstructions(String str) throws DMLRuntimeException 
-	{
+	public static DataGenMRInstruction[] parseDataGenInstructions(String str) {
 		DataGenMRInstruction[] inst=null;
-		if(str!=null && !str.isEmpty())
-		{
+		if(str!=null && !str.isEmpty()) {
 			String[] strlist = str.split(Instruction.INSTRUCTION_DELIM);
 			inst = new DataGenMRInstruction[strlist.length];
-			
 			for(int i=0; i < strlist.length; i++)
-			{
 				inst[i] = (DataGenMRInstruction) InstructionParser.parseSingleInstruction(strlist[i]);
-			}
 		}
 		return inst;
 	}
 	
-	public static MRInstruction[] parseCombineInstructions(String str) throws DMLRuntimeException 
-	{
+	public static MRInstruction[] parseCombineInstructions(String str) {
 		MRInstruction[] inst=null;
-		if(str!=null && !str.isEmpty())
-		{
+		if(str!=null && !str.isEmpty()) {
 			String[] strlist = str.split(Instruction.INSTRUCTION_DELIM);
 			inst = new MRInstruction[strlist.length];
-			
-			for(int i=0; i < strlist.length; i++)
-			{
+			for(int i=0; i < strlist.length; i++) {
 				MRType type = InstructionUtils.getMRType(strlist[i]);
 				if(type==MRType.CombineBinary)
 					inst[i] = (CombineBinaryInstruction) CombineBinaryInstruction.parseInstruction( strlist[i] );
@@ -605,34 +563,25 @@ public class MRInstructionParser extends InstructionParser
 		return inst;
 	}
 	
-	public static CM_N_COVInstruction[] parseCM_N_COVInstructions(String str) throws DMLRuntimeException 
+	public static CM_N_COVInstruction[] parseCM_N_COVInstructions(String str)
 	{
 		CM_N_COVInstruction[] inst=null;
-		if(str!=null && !str.isEmpty())
-		{
+		if(str!=null && !str.isEmpty()) {
 			String[] strlist = str.split(Instruction.INSTRUCTION_DELIM);
 			inst = new CM_N_COVInstruction[strlist.length];
-			
 			for(int i=0; i < strlist.length; i++)
-			{
 				inst[i] = (CM_N_COVInstruction) CM_N_COVInstruction.parseInstruction( strlist[i] );
-			}
 		}
 		return inst;
 	}
 
-	public static GroupedAggregateInstruction[] parseGroupedAggInstructions(String str) 
-	throws DMLRuntimeException{
+	public static GroupedAggregateInstruction[] parseGroupedAggInstructions(String str) {
 		GroupedAggregateInstruction[] inst=null;
-		if(str!=null && !str.isEmpty())
-		{
+		if(str!=null && !str.isEmpty()) {
 			String[] strlist = str.split(Instruction.INSTRUCTION_DELIM);
 			inst = new GroupedAggregateInstruction[strlist.length];
-			
 			for(int i=0; i < strlist.length; i++)
-			{
 				inst[i] = (GroupedAggregateInstruction) GroupedAggregateInstruction.parseInstruction( strlist[i] );
-			}
 		}
 		return inst;
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 88a309d..b817b88 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/MRJobInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/MRJobInstruction.java
@@ -840,9 +840,8 @@ public class MRJobInstruction extends Instruction
 	 * 
 	 * @param ec execution context
 	 * @return array of matrix objects
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public MatrixObject[] extractOutputMatrices(ExecutionContext ec) throws DMLRuntimeException {
+	public MatrixObject[] extractOutputMatrices(ExecutionContext ec) {
 		outputMatrices = new MatrixObject[getOutputVars().length];
 		int ind = 0;
 		for(String oo: getOutputVars()) {
@@ -942,7 +941,7 @@ public class MRJobInstruction extends Instruction
 		return tmp;
 	}
 	
-	public void printCompleteMRJobInstruction(MatrixCharacteristics[] resultStats) throws DMLRuntimeException {
+	public void printCompleteMRJobInstruction(MatrixCharacteristics[] resultStats) {
 		LOG.trace("jobtype" + jobType);
 		LOG.trace("Inputs: \n");
 		for(int i=0, mi=0; i < inputVars.length; i++ ) {
@@ -992,8 +991,7 @@ public class MRJobInstruction extends Instruction
 	}
 	
 	@Override
-	public void updateInstructionThreadID(String pattern, String replace) 
-		throws DMLRuntimeException
+	public void updateInstructionThreadID(String pattern, String replace)
 	{
 		if( dimsUnknownFilePrefix!=null )
 			dimsUnknownFilePrefix = dimsUnknownFilePrefix.replaceAll(pattern, replace);
@@ -1270,9 +1268,7 @@ public class MRJobInstruction extends Instruction
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		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/systemml/blob/1f323976/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 a9155c9..8d0fb54 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/SPInstructionParser.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/SPInstructionParser.java
@@ -312,12 +312,9 @@ public class SPInstructionParser extends InstructionParser
 		String2SPInstructionType.put( "spoof"	, SPType.SpoofFused);
 	}
 
-	public static SPInstruction parseSingleInstruction (String str ) 
-		throws DMLRuntimeException 
-	{
+	public static SPInstruction parseSingleInstruction (String str ) {
 		if ( str == null || str.isEmpty() )
 			return null;
-
 		SPType cptype = InstructionUtils.getSPType(str); 
 		if ( cptype == null )
 			// return null;
@@ -328,9 +325,7 @@ public class SPInstructionParser extends InstructionParser
 		return spinst;
 	}
 	
-	public static SPInstruction parseSingleInstruction ( SPType sptype, String str ) 
-		throws DMLRuntimeException 
-	{	
+	public static SPInstruction parseSingleInstruction ( SPType sptype, String str ) {
 		if ( str == null || str.isEmpty() ) 
 			return null;
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 32732d3..a9a8947 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
@@ -38,9 +38,7 @@ public class AggregateBinaryCPInstruction extends BinaryCPInstruction {
 		super(CPType.AggregateBinary, op, in1, in2, out, opcode, istr);
 	}
 
-	public static AggregateBinaryCPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static AggregateBinaryCPInstruction parseInstruction( String str ) {
 		CPOperand in1 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand in2 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand out = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
@@ -64,9 +62,7 @@ public class AggregateBinaryCPInstruction extends BinaryCPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		//get inputs
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 		MatrixBlock matBlock2 = ec.getMatrixInput(input2.getName(), getExtendedOpcode());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 c087016..9e83eb0 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
@@ -33,9 +33,7 @@ public class AggregateTernaryCPInstruction extends ComputationCPInstruction {
 		super(CPType.AggregateTernary, op, in1, in2, in3, out, opcode, istr);
 	}
 
-	public static AggregateTernaryCPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static AggregateTernaryCPInstruction parseInstruction( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 		
@@ -57,18 +55,16 @@ public class AggregateTernaryCPInstruction extends ComputationCPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{		
+	public void processInstruction(ExecutionContext ec) {
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
-        MatrixBlock matBlock2 = ec.getMatrixInput(input2.getName(), getExtendedOpcode());
-        MatrixBlock matBlock3 = input3.isLiteral() ? null : //matrix or literal 1
-        						ec.getMatrixInput(input3.getName(), getExtendedOpcode());
-			
+		MatrixBlock matBlock2 = ec.getMatrixInput(input2.getName(), getExtendedOpcode());
+		MatrixBlock matBlock3 = input3.isLiteral() ? null : //matrix or literal 1
+			ec.getMatrixInput(input3.getName(), getExtendedOpcode());
+		
 		AggregateTernaryOperator ab_op = (AggregateTernaryOperator) _optr;
 		MatrixBlock ret = matBlock1.aggregateTernaryOperations(
 				matBlock1, matBlock2, matBlock3, new MatrixBlock(), ab_op, true);
-			
+		
 		//release inputs/outputs
 		ec.releaseMatrixInput(input1.getName(), getExtendedOpcode());
 		ec.releaseMatrixInput(input2.getName(), getExtendedOpcode());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 c6e3cce..65e6a97 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
@@ -57,9 +57,7 @@ public class AggregateUnaryCPInstruction extends UnaryCPInstruction
 		_type = type;
 	}
 	
-	public static AggregateUnaryCPInstruction parseInstruction(String str)
-		throws DMLRuntimeException 
-	{
+	public static AggregateUnaryCPInstruction parseInstruction(String str) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 		CPOperand in1 = new CPOperand(parts[1]);
@@ -77,9 +75,7 @@ public class AggregateUnaryCPInstruction extends UnaryCPInstruction
 	}
 	
 	@Override
-	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException
-	{
+	public void processInstruction( ExecutionContext ec ) {
 		String output_name = output.getName();
 		String opcode = getOpcode();
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/AppendCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/AppendCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/AppendCPInstruction.java
index 1754024..dd82b4a 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/AppendCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/AppendCPInstruction.java
@@ -44,9 +44,7 @@ public abstract class AppendCPInstruction extends BinaryCPInstruction
 		_type = type;
 	}
 
-	public static AppendCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static AppendCPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields (parts, 5);
 		
@@ -67,8 +65,8 @@ public abstract class AppendCPInstruction extends BinaryCPInstruction
 		if( type == AppendType.STRING )
 			return new ScalarAppendCPInstruction(op, in1, in2, in3, out, type, opcode, str);
 		else if( in1.getDataType()==DataType.MATRIX )
-			return new MatrixAppendCPInstruction(op, in1, in2, in3, out, type, opcode, str);	
+			return new MatrixAppendCPInstruction(op, in1, in2, in3, out, type, opcode, str);
 		else //DataType.FRAME
-			return new FrameAppendCPInstruction(op, in1, in2, in3, out, type, opcode, str);		
+			return new FrameAppendCPInstruction(op, in1, in2, in3, out, type, opcode, str);
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryCPInstruction.java
index f0bdbd1..d1ae120 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryCPInstruction.java
@@ -36,9 +36,7 @@ public abstract class BinaryCPInstruction extends ComputationCPInstruction {
 		super(type, op, in1, in2, in3, out, opcode, istr);
 	}
 
-	public static BinaryCPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static BinaryCPInstruction parseInstruction( String str ) {
 		CPOperand in1 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand in2 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand out = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
@@ -56,23 +54,17 @@ public abstract class BinaryCPInstruction extends ComputationCPInstruction {
 			return new BinaryMatrixScalarCPInstruction(operator, in1, in2, out, opcode, str);
 	}
 	
-	protected static String parseBinaryInstruction(String instr, CPOperand in1, CPOperand in2, CPOperand out)
-		throws DMLRuntimeException
-	{	
+	protected static String parseBinaryInstruction(String instr, CPOperand in1, CPOperand in2, CPOperand out) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(instr);
 		InstructionUtils.checkNumFields ( parts, 3 );
-		
 		String opcode = parts[0];
 		in1.split(parts[1]);
 		in2.split(parts[2]);
 		out.split(parts[3]);
-		
 		return opcode;
 	}
 	
-	protected static String parseBinaryInstruction(String instr, CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out)
-		throws DMLRuntimeException
-	{
+	protected static String parseBinaryInstruction(String instr, CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(instr);
 		InstructionUtils.checkNumFields ( parts, 4 );
 		
@@ -85,9 +77,7 @@ public abstract class BinaryCPInstruction extends ComputationCPInstruction {
 		return opcode;
 	}
 	
-	protected static void checkOutputDataType(CPOperand in1, CPOperand in2, CPOperand out) 
-		throws DMLRuntimeException 
-	{
+	protected static void checkOutputDataType(CPOperand in1, CPOperand in2, CPOperand out) {
 		// check for valid data type of output
 		if((in1.getDataType() == DataType.MATRIX || in2.getDataType() == DataType.MATRIX) && out.getDataType() != DataType.MATRIX)
 			throw new DMLRuntimeException("Element-wise matrix operations between variables " + in1.getName() + 

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryMatrixMatrixCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryMatrixMatrixCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryMatrixMatrixCPInstruction.java
index e584a85..5ab853d 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryMatrixMatrixCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryMatrixMatrixCPInstruction.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.runtime.instructions.cp;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.LibCommonsMath;
@@ -35,9 +34,7 @@ public class BinaryMatrixMatrixCPInstruction extends BinaryCPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{
+	public void processInstruction(ExecutionContext ec) {
 		String opcode = getOpcode();
 		if ( LibCommonsMath.isSupportedMatrixMatrixOperation(opcode) ) {
 			MatrixBlock solution = LibCommonsMath.matrixMatrixOperations(

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryMatrixScalarCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryMatrixScalarCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryMatrixScalarCPInstruction.java
index c809049..a9ec74e 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryMatrixScalarCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryMatrixScalarCPInstruction.java
@@ -20,7 +20,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.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -34,9 +33,7 @@ public class BinaryMatrixScalarCPInstruction extends BinaryCPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{
+	public void processInstruction(ExecutionContext ec) {
 		CPOperand mat = ( input1.getDataType() == DataType.MATRIX ) ? input1 : input2;
 		CPOperand scalar = ( input1.getDataType() == DataType.MATRIX ) ? input2 : input1;
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryScalarScalarCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryScalarScalarCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryScalarScalarCPInstruction.java
index 76f53fb..5f7f8a7 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryScalarScalarCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/BinaryScalarScalarCPInstruction.java
@@ -33,7 +33,7 @@ public class BinaryScalarScalarCPInstruction extends BinaryCPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) throws DMLRuntimeException{
+	public void processInstruction(ExecutionContext ec) {
 		ScalarObject so1 = ec.getScalarInput(input1.getName(), input1.getValueType(), input1.isLiteral());
 		ScalarObject so2 = ec.getScalarInput(input2.getName(), input2.getValueType(), input2.isLiteral() );
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/BreakPointInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/BreakPointInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/BreakPointInstruction.java
index 72dfd7e..c5ac38d 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/BreakPointInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/BreakPointInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.debug.DebugState;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.Instruction;
 
@@ -98,9 +97,7 @@ public class BreakPointInstruction extends Instruction
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{
+	public void processInstruction(ExecutionContext ec) {
 		if( DMLScript.ENABLE_DEBUG_MODE && isBPInstructionEnabled()) {
 			DebugState dbState = ec.getDebugState();
 			

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinNaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinNaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinNaryCPInstruction.java
index e38fc0b..8f5058d 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinNaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/BuiltinNaryCPInstruction.java
@@ -47,7 +47,7 @@ public abstract class BuiltinNaryCPInstruction extends CPInstruction
 		this.inputs = inputs;
 	}
 
-	public static BuiltinNaryCPInstruction parseInstruction(String str) throws DMLRuntimeException {
+	public static BuiltinNaryCPInstruction parseInstruction(String str) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 		CPOperand outputOperand = new CPOperand(parts[parts.length - 1]);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/CM_COV_Object.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/CM_COV_Object.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/CM_COV_Object.java
index e662b33..2490996 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/CM_COV_Object.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/CM_COV_Object.java
@@ -131,17 +131,13 @@ public class CM_COV_Object extends Data
 	 * 
 	 * @param op operator
 	 * @return result of the aggregated operation for the given operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public double getRequiredResult(Operator op) throws DMLRuntimeException
-	{
-		if(op instanceof CMOperator)
-		{
+	public double getRequiredResult(Operator op) {
+		if(op instanceof CMOperator) {
 			AggregateOperationTypes agg=((CMOperator)op).aggOpType;
 			return getRequiredResult(agg);
 		}
-		else
-		{
+		else {
 			//avoid division by 0
 			if(w==1.0)
 				return 0;
@@ -156,9 +152,8 @@ public class CM_COV_Object extends Data
 	 * 
 	 * @param agg aggregate operation type
 	 * @return result of the aggregated operation given the operation type
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public double getRequiredResult(AggregateOperationTypes agg) throws DMLRuntimeException {
+	public double getRequiredResult(AggregateOperationTypes agg) {
 		switch(agg)
 		{
 			case COUNT:
@@ -178,20 +173,14 @@ public class CM_COV_Object extends Data
 		}
 	}
 
-	public double getRequiredPartialResult(Operator op) 
-		throws DMLRuntimeException
-	{
-		if(op instanceof CMOperator)
-		{
+	public double getRequiredPartialResult(Operator op) {
+		if(op instanceof CMOperator) {
 			AggregateOperationTypes agg=((CMOperator)op).aggOpType;
-			switch(agg)
-			{
-				case COUNT:
-					return 0;
-				case MEAN:
-					return mean._sum;
-				case CM2:					
-				case CM3:					
+			switch(agg) {
+				case COUNT: return 0;
+				case MEAN:  return mean._sum;
+				case CM2:
+				case CM3:
 				case CM4:
 				case VARIANCE:
 					throw new DMLRuntimeException("Aggregation operator '"+agg.toString()+"' does not apply to partial aggregation.");
@@ -203,8 +192,7 @@ public class CM_COV_Object extends Data
 			return c2._sum;
 	}
 
-	public double getWeight() 
-	{
+	public double getWeight() {
 		return w;
 	}
 	


[09/12] systemml git commit: [SYSTEMML-2191] Cleanup exception hierarchy and handling, part 3

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateBinaryGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateBinaryGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateBinaryGPUInstruction.java
index 29a1ead..1d8f7fe 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateBinaryGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateBinaryGPUInstruction.java
@@ -53,16 +53,11 @@ public class AggregateBinaryGPUInstruction extends GPUInstruction {
 		_isRightTransposed = rightTranspose;
 	}
 
-	public static AggregateBinaryGPUInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static AggregateBinaryGPUInstruction parseInstruction( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
-
-		if ( !opcode.equalsIgnoreCase("ba+*")) {
+		if ( !opcode.equalsIgnoreCase("ba+*"))
  			throw new DMLRuntimeException("AggregateBinaryInstruction.parseInstruction():: Unknown opcode " + opcode);
-		}
-		
 		InstructionUtils.checkNumFields( parts, 5 );
 		CPOperand in1 = new CPOperand(parts[1]);
 		CPOperand in2 = new CPOperand(parts[2]);
@@ -75,28 +70,18 @@ public class AggregateBinaryGPUInstruction extends GPUInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		GPUStatistics.incrementNoOfExecutedGPUInst();
-		
 		AggregateBinaryOperator op = (AggregateBinaryOperator) _optr;
-		if( !(op.binaryFn instanceof Multiply && op.aggOp.increOp.fn instanceof Plus) ) {
+		if( !(op.binaryFn instanceof Multiply && op.aggOp.increOp.fn instanceof Plus) )
 			throw new DMLRuntimeException("Unsupported binary aggregate operation: ("+op.binaryFn+", "+op.aggOp+").");
-		}
-		
-		//get inputs
 		MatrixObject m1 = getMatrixInputForGPUInstruction(ec, _input1.getName());
 		MatrixObject m2 = getMatrixInputForGPUInstruction(ec, _input2.getName());
-
-
 		//compute matrix multiplication
 		int rlen = (int) (_isLeftTransposed ? m1.getNumColumns() : m1.getNumRows());
 		int clen = (int) (_isRightTransposed ? m2.getNumRows() : m2.getNumColumns());
-
 		ec.setMetaData(_output.getName(), rlen, clen);
 		LibMatrixCuMatMult.matmult(ec, ec.getGPUContext(0), getExtendedOpcode(), m1, m2, _output.getName(), _isLeftTransposed, _isRightTransposed);
-		
 		//release inputs/outputs
 		ec.releaseMatrixInputForGPUInstruction(_input1.getName());
 		ec.releaseMatrixInputForGPUInstruction(_input2.getName());
@@ -104,13 +89,13 @@ public class AggregateBinaryGPUInstruction extends GPUInstruction {
 	}
 
 	@SuppressWarnings("unused")
-	private static MatrixBlock transpose(MatrixBlock m1) throws DMLRuntimeException {
+	private static MatrixBlock transpose(MatrixBlock m1) {
 		ReorgOperator r_op = new ReorgOperator(SwapIndex.getSwapIndexFnObject(), 1);
 		return (MatrixBlock) (m1.reorgOperations(r_op, new MatrixBlock(), 0, 0, 0));
 	}
 
 	@SuppressWarnings("unused")
-	private static boolean isSparse(ExecutionContext ec, String var) throws DMLRuntimeException {
+	private static boolean isSparse(ExecutionContext ec, String var) {
 		MatrixObject mo = ec.getMatrixObject(var);
 		return LibMatrixCUDA.isInSparseFormat(ec.getGPUContext(0), mo);
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateUnaryGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateUnaryGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateUnaryGPUInstruction.java
index 767f173..1d5802b 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateUnaryGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/AggregateUnaryGPUInstruction.java
@@ -46,9 +46,7 @@ public class AggregateUnaryGPUInstruction extends GPUInstruction {
 		_output = out;
 	}
 
-  public static AggregateUnaryGPUInstruction parseInstruction(String str )
-          throws DMLRuntimeException
-  {
+  public static AggregateUnaryGPUInstruction parseInstruction(String str ) {
     String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
     String opcode = parts[0];
     CPOperand in1 = new CPOperand(parts[1]);
@@ -66,9 +64,7 @@ public class AggregateUnaryGPUInstruction extends GPUInstruction {
   }
 
   @Override
-  public void processInstruction(ExecutionContext ec)
-          throws DMLRuntimeException
-  {
+  public void processInstruction(ExecutionContext ec) {
     GPUStatistics.incrementNoOfExecutedGPUInst();
 
     String opcode = getOpcode();
@@ -103,5 +99,4 @@ public class AggregateUnaryGPUInstruction extends GPUInstruction {
       ec.releaseMatrixOutputForGPUInstruction(_output.getName());
     }
   }
-
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/ArithmeticBinaryGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ArithmeticBinaryGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ArithmeticBinaryGPUInstruction.java
index e1f06ba..763439a 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ArithmeticBinaryGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ArithmeticBinaryGPUInstruction.java
@@ -39,7 +39,7 @@ public abstract class ArithmeticBinaryGPUInstruction extends GPUInstruction {
 		_output = out;
 	}
 
-	public static ArithmeticBinaryGPUInstruction parseInstruction ( String str ) throws DMLRuntimeException {
+	public static ArithmeticBinaryGPUInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields ( parts, 3 );
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/BuiltinBinaryGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/BuiltinBinaryGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/BuiltinBinaryGPUInstruction.java
index b145c09..be56bc6 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/BuiltinBinaryGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/BuiltinBinaryGPUInstruction.java
@@ -44,7 +44,7 @@ public abstract class BuiltinBinaryGPUInstruction extends GPUInstruction {
 		this.input2 = input2;
 	}
 
-  public static BuiltinBinaryGPUInstruction parseInstruction(String str) throws DMLRuntimeException {
+  public static BuiltinBinaryGPUInstruction parseInstruction(String str) {
     CPOperand in1 = new CPOperand("", Expression.ValueType.UNKNOWN, Expression.DataType.UNKNOWN);
     CPOperand in2 = new CPOperand("", Expression.ValueType.UNKNOWN, Expression.DataType.UNKNOWN);
     CPOperand out = new CPOperand("", Expression.ValueType.UNKNOWN, Expression.DataType.UNKNOWN);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/BuiltinUnaryGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/BuiltinUnaryGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/BuiltinUnaryGPUInstruction.java
index 93a8f35..c4e9fad 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/BuiltinUnaryGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/BuiltinUnaryGPUInstruction.java
@@ -46,7 +46,6 @@ public abstract class BuiltinUnaryGPUInstruction extends GPUInstruction {
 	}
 	
 	public static BuiltinUnaryGPUInstruction parseInstruction ( String str ) 
-		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/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/ConvolutionGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ConvolutionGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ConvolutionGPUInstruction.java
index 9e2d672..591fd54 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ConvolutionGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ConvolutionGPUInstruction.java
@@ -44,7 +44,7 @@ public class ConvolutionGPUInstruction extends GPUInstruction {
 	private ArrayList<CPOperand> _padding = new ArrayList<>();
 	private double _intermediateMemoryBudget = 0;
 	
-	public ConvolutionGPUInstruction(CPOperand in1, CPOperand in2, CPOperand out, String opcode, String istr, double intermediateMemoryBudget) throws DMLRuntimeException {
+	public ConvolutionGPUInstruction(CPOperand in1, CPOperand in2, CPOperand out, String opcode, String istr, double intermediateMemoryBudget) {
 		super(new ReorgOperator(SwapIndex.getSwapIndexFnObject()), opcode, istr);
 		if (!(opcode.equals("bias_add") || opcode.equals("bias_multiply") || opcode.equals("relu_backward"))) {
 			throw new DMLRuntimeException(
@@ -58,7 +58,7 @@ public class ConvolutionGPUInstruction extends GPUInstruction {
 		_intermediateMemoryBudget = intermediateMemoryBudget;
 	}
 	
-	public ConvolutionGPUInstruction(CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out, String opcode, String istr, double intermediateMemoryBudget) throws DMLRuntimeException {
+	public ConvolutionGPUInstruction(CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out, String opcode, String istr, double intermediateMemoryBudget) {
 		super(new ReorgOperator(SwapIndex.getSwapIndexFnObject()), opcode, istr);
 		if( !opcode.equals("channel_sums") ) {
 			throw new DMLRuntimeException("Incorrect usage. Expected the opcode to be channel_sums, but found " + opcode);
@@ -98,12 +98,9 @@ public class ConvolutionGPUInstruction extends GPUInstruction {
 		_intermediateMemoryBudget = intermediateMemoryBudget;
 	}
 
-	public static ConvolutionGPUInstruction parseInstruction(String str)
-		throws DMLRuntimeException 
-	{
+	public static ConvolutionGPUInstruction parseInstruction(String str) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
-		
 		if( ( opcode.equalsIgnoreCase("conv2d")
 			 || opcode.equalsIgnoreCase("conv2d_backward_filter")
 			 || opcode.equalsIgnoreCase("conv2d_backward_data")) ) {
@@ -111,7 +108,6 @@ public class ConvolutionGPUInstruction extends GPUInstruction {
 			CPOperand in1 = new CPOperand(parts[1]);
 			CPOperand in2 = new CPOperand(parts[2]);
 			CPOperand out = new CPOperand(parts[15]);
-		
 			ArrayList<CPOperand> stride = new ArrayList<>();
 			ArrayList<CPOperand> padding = new ArrayList<>();
 			ArrayList<CPOperand> input_shape = new ArrayList<>();
@@ -237,7 +233,7 @@ public class ConvolutionGPUInstruction extends GPUInstruction {
 		}
 	}
 
-	public void processBiasInstruction(String instOpcode, ExecutionContext ec) throws DMLRuntimeException {
+	public void processBiasInstruction(String instOpcode, ExecutionContext ec) {
 		GPUStatistics.incrementNoOfExecutedGPUInst();
 		MatrixObject input = getMatrixInputForGPUInstruction(ec, _input1.getName());
 		MatrixObject bias = getMatrixInputForGPUInstruction(ec, _input2.getName());
@@ -254,7 +250,7 @@ public class ConvolutionGPUInstruction extends GPUInstruction {
 	}
 
 	// (X > 0) * dout
-	public void processReLUBackwardInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processReLUBackwardInstruction(ExecutionContext ec) {
 		GPUStatistics.incrementNoOfExecutedGPUInst();
 		MatrixObject input = getMatrixInputForGPUInstruction(ec, _input1.getName());
 		MatrixObject dout = getMatrixInputForGPUInstruction(ec, _input2.getName());
@@ -268,7 +264,7 @@ public class ConvolutionGPUInstruction extends GPUInstruction {
 		ec.releaseMatrixOutputForGPUInstruction(_output.getName());
 	}
 	
-	public void processChannelSumsInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processChannelSumsInstruction(ExecutionContext ec) {
 		GPUStatistics.incrementNoOfExecutedGPUInst();
 		MatrixObject input = getMatrixInputForGPUInstruction(ec, _input1.getName());
 		int C = (int) ec.getScalarInput(_input2.getName(), _input2.getValueType(), _input2.isLiteral()).getLongValue();
@@ -286,9 +282,7 @@ public class ConvolutionGPUInstruction extends GPUInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-			throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		if (instOpcode.equalsIgnoreCase("bias_add") || instOpcode.equalsIgnoreCase("bias_multiply")) {
 			processBiasInstruction(instOpcode, ec);
 			return;
@@ -431,9 +425,7 @@ public class ConvolutionGPUInstruction extends GPUInstruction {
 	}
 
 
-	private static int getScalarInput(ExecutionContext ec, ArrayList<CPOperand> aL, int index) 
-		throws DMLRuntimeException 
-	{
+	private static int getScalarInput(ExecutionContext ec, ArrayList<CPOperand> aL, int index) {
 		return (int) ec.getScalarInput(aL.get(index).getName(),
 			aL.get(index).getValueType(), aL.get(index).isLiteral()).getLongValue();
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/GPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/GPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/GPUInstruction.java
index 63eb34a..722b564 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/GPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/GPUInstruction.java
@@ -23,7 +23,6 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.lops.runtime.RunMRJobs;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.GPUInstructionParser;
@@ -180,44 +179,34 @@ public abstract class GPUInstruction extends Instruction {
 	}
 
 	@Override
-	public Instruction preprocessInstruction(ExecutionContext ec)
-		throws DMLRuntimeException
-	{
+	public Instruction preprocessInstruction(ExecutionContext ec) {
 		//default preprocess behavior (e.g., debug state)
 		Instruction tmp = super.preprocessInstruction(ec);
-
 		//instruction patching
 		if( tmp.requiresLabelUpdate() ) { //update labels only if required
 			//note: no exchange of updated instruction as labels might change in the general case
 			String updInst = RunMRJobs.updateLabels(tmp.toString(), ec.getVariables());
 			tmp = GPUInstructionParser.parseSingleInstruction(updInst);
 		}
-
 		return tmp;
 	}
 
 	@Override
-	public abstract void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException;
-
+	public abstract void processInstruction(ExecutionContext ec);
+	
 	@Override
-	public void postprocessInstruction(ExecutionContext ec)
-					throws DMLRuntimeException
-	{
+	public void postprocessInstruction(ExecutionContext ec) {
 		if(DMLScript.SYNCHRONIZE_GPU) {
 			long t0 = DMLScript.FINEGRAINED_STATISTICS ? System.nanoTime() : 0;
 			jcuda.runtime.JCuda.cudaDeviceSynchronize();
-			if(DMLScript.FINEGRAINED_STATISTICS) {
+			if(DMLScript.FINEGRAINED_STATISTICS)
 				GPUStatistics.maintainCPMiscTimes(getExtendedOpcode(), GPUInstruction.MISC_TIMER_CUDA_SYNC, System.nanoTime() - t0);
-			}
 		}
 		if(LOG.isDebugEnabled()) {
-			for(GPUContext gpuCtx : ec.getGPUContexts()) {
+			for(GPUContext gpuCtx : ec.getGPUContexts())
 				if(gpuCtx != null)
 					gpuCtx.printMemoryInfo(getOpcode());
-			}
 		}
-			
 	}
 
 	/**
@@ -226,9 +215,8 @@ public abstract class GPUInstruction extends Instruction {
 	 * @param ec		active {@link ExecutionContext}
 	 * @param name	name of input matrix (that the {@link ExecutionContext} is aware of)
 	 * @return	the matrix object
-	 * @throws DMLRuntimeException if an error occurs
 	 */
-	protected MatrixObject getMatrixInputForGPUInstruction(ExecutionContext ec, String name) throws DMLRuntimeException {
+	protected MatrixObject getMatrixInputForGPUInstruction(ExecutionContext ec, String name) {
 		return ec.getMatrixInputForGPUInstruction(name, getExtendedOpcode());
 	}
 
@@ -240,9 +228,8 @@ public abstract class GPUInstruction extends Instruction {
 	 * @param numRows number of rows of matrix object
 	 * @param numCols number of columns of matrix object
 	 * @return	the matrix object
-	 * @throws DMLRuntimeException	if an error occurs
 	 */
-	protected MatrixObject getDenseMatrixOutputForGPUInstruction(ExecutionContext ec, String name, long numRows, long numCols) throws DMLRuntimeException {
+	protected MatrixObject getDenseMatrixOutputForGPUInstruction(ExecutionContext ec, String name, long numRows, long numCols) {
 		long t0 = DMLScript.FINEGRAINED_STATISTICS ? System.nanoTime() : 0;
 		Pair<MatrixObject, Boolean> mb = ec.getDenseMatrixOutputForGPUInstruction(name, numRows, numCols);
 		if (DMLScript.FINEGRAINED_STATISTICS && mb.getValue()) GPUStatistics.maintainCPMiscTimes(getExtendedOpcode(), GPUInstruction.MISC_TIMER_ALLOCATE_DENSE_OUTPUT, System.nanoTime() - t0);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/MMTSJGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MMTSJGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MMTSJGPUInstruction.java
index f795f54..310e358 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MMTSJGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MMTSJGPUInstruction.java
@@ -19,13 +19,6 @@
 
 package org.apache.sysml.runtime.instructions.gpu;
 
-/*
- * Parses and processes the MMTSJ GPU Instruction
- * @function	GPUInstruction(...)
- * @function	parseInstruction(...)
- * @function	processInstruction(...)
- * @function	getMMTSJType(...)
- */
 import org.apache.sysml.lops.MMTSJ.MMTSJType;
 import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
@@ -65,14 +58,7 @@ public class MMTSJGPUInstruction extends GPUInstruction {
 		_output = out;
 	}
 
-        /**
-         * parse MMTSJ GPU instruction
-         * @param str instruction string
-         * @return MMTSJGPUInstruction object
-         * @throws DMLRuntimeException if DMLRuntimeException occurs
-         */
         public static MMTSJGPUInstruction parseInstruction ( String str )
-        	throws DMLRuntimeException
         {
                 String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
                 InstructionUtils.checkNumFields ( parts, 3 );
@@ -88,39 +74,21 @@ public class MMTSJGPUInstruction extends GPUInstruction {
                         return new MMTSJGPUInstruction(new Operator(true), in1, titype, out, opcode, str);
         }
 
-        /**
-         * process MMTSJ GPU instruction 
-         * @param ec	execution context
-         * @throws DMLRuntimeException if DMLRuntimeException occurs
-         */
         @Override
-        public void processInstruction(ExecutionContext ec)
-                throws DMLRuntimeException
-        {
+        public void processInstruction(ExecutionContext ec) {
                 GPUStatistics.incrementNoOfExecutedGPUInst();
-
-                //get input
                 MatrixObject mat = getMatrixInputForGPUInstruction(ec, _input.getName());
-               
                 boolean isLeftTransposed = ( _type == MMTSJType.LEFT);
-
                 int rlen = (int) (isLeftTransposed? mat.getNumColumns() : mat.getNumRows());
                 int clen = rlen;
-
                 //execute operations 
                 ec.setMetaData(_output.getName(), rlen, clen);
                 LibMatrixCUDA.matmultTSMM(ec, ec.getGPUContext(0), getExtendedOpcode(), mat, _output.getName(), isLeftTransposed);
-                
                 ec.releaseMatrixInputForGPUInstruction(_input.getName());
                 ec.releaseMatrixOutputForGPUInstruction(_output.getName());
         }
 
-        /**
-         * returns left/right depending on the type of MMTSJ instruction
-         * @return MMTSJType object
-         */
-        public MMTSJType getMMTSJType()
-        {
+        public MMTSJType getMMTSJType() {
                 return _type;
         }
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixAppendGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixAppendGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixAppendGPUInstruction.java
index a183d29..a6e0b23 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixAppendGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixAppendGPUInstruction.java
@@ -50,12 +50,9 @@ public class MatrixAppendGPUInstruction extends GPUInstruction {
 		this.atype = type;
 	}
 
-	public static MatrixAppendGPUInstruction parseInstruction ( String str )
-			throws DMLRuntimeException
-	{
+	public static MatrixAppendGPUInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields (parts, 5);
-
 		String opcode = parts[0];
 		CPOperand in1 = new CPOperand(parts[1]);
 		CPOperand in2 = new CPOperand(parts[2]);
@@ -63,36 +60,29 @@ public class MatrixAppendGPUInstruction extends GPUInstruction {
 		CPOperand in3 = new CPOperand(parts[3]);
 		CPOperand out = new CPOperand(parts[4]);
 		boolean cbind = Boolean.parseBoolean(parts[5]);
-
 		AppendCPInstruction.AppendType type = (in1.getDataType()!= Expression.DataType.MATRIX && in1.getDataType()!= Expression.DataType.FRAME) ?
 				AppendCPInstruction.AppendType.STRING : cbind ? AppendCPInstruction.AppendType.CBIND : AppendCPInstruction.AppendType.RBIND;
-
 		if (in1.getDataType()!= Expression.DataType.MATRIX || in2.getDataType()!= Expression.DataType.MATRIX){
 			throw new DMLRuntimeException("GPU : Error in internal state - Append was called on data other than matrices");
 		}
-
 		if(!opcode.equalsIgnoreCase("append"))
 			throw new DMLRuntimeException("Unknown opcode while parsing a AppendCPInstruction: " + str);
-
 		Operator op = new ReorgOperator(OffsetColumnIndex.getOffsetColumnIndexFnObject(-1));
 		return new MatrixAppendGPUInstruction(op, in1, in2, out, type, opcode, str);
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processInstruction(ExecutionContext ec) {
 		GPUStatistics.incrementNoOfExecutedGPUInst();
-
 		String opcode = getOpcode();
 		MatrixObject mat1 = getMatrixInputForGPUInstruction(ec, input1.getName());
 		MatrixObject mat2 = getMatrixInputForGPUInstruction(ec, input2.getName());
-
-		if(atype == AppendCPInstruction.AppendType.CBIND) {
+		if(atype == AppendCPInstruction.AppendType.CBIND)
 			LibMatrixCUDA.cbind(ec, ec.getGPUContext(0), getExtendedOpcode(), mat1, mat2, output.getName());
-		} else if (atype == AppendCPInstruction.AppendType.RBIND ) {
+		else if (atype == AppendCPInstruction.AppendType.RBIND )
 			LibMatrixCUDA.rbind(ec, ec.getGPUContext(0), getExtendedOpcode(), mat1, mat2, output.getName());
-		} else {
+		else
 			throw new DMLRuntimeException("Unsupported GPU operator:" + opcode);
-		}
 		ec.releaseMatrixInputForGPUInstruction(input1.getName());
 		ec.releaseMatrixInputForGPUInstruction(input2.getName());
 		ec.releaseMatrixOutputForGPUInstruction(output.getName());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixBuiltinGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixBuiltinGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixBuiltinGPUInstruction.java
index f54bc80..159608f 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixBuiltinGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixBuiltinGPUInstruction.java
@@ -36,7 +36,7 @@ public class MatrixBuiltinGPUInstruction extends BuiltinUnaryGPUInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processInstruction(ExecutionContext ec) {
 		GPUStatistics.incrementNoOfExecutedGPUInst();
 		
 		String opcode = getOpcode();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixIndexingGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixIndexingGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixIndexingGPUInstruction.java
index 9b29d4a..9ea91a5 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixIndexingGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixIndexingGPUInstruction.java
@@ -63,7 +63,7 @@ public class MatrixIndexingGPUInstruction extends GPUInstruction {
 		output = out;
 	}
 
-	public static MatrixIndexingGPUInstruction parseInstruction ( String str ) throws DMLRuntimeException {
+	public static MatrixIndexingGPUInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 		
@@ -117,8 +117,7 @@ public class MatrixIndexingGPUInstruction extends GPUInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException {
+	public void processInstruction(ExecutionContext ec) {
 		GPUStatistics.incrementNoOfExecutedGPUInst();
 		String opcode = getOpcode();
 		
@@ -134,11 +133,11 @@ public class MatrixIndexingGPUInstruction extends GPUInstruction {
 		}
 	}
 	
-	IndexRange getIndexRange(ExecutionContext ec) throws DMLRuntimeException {
+	IndexRange getIndexRange(ExecutionContext ec) {
 		return new IndexRange( //rl, ru, cl, ru
 			(int)(ec.getScalarInput(rowLower.getName(), rowLower.getValueType(), rowLower.isLiteral()).getLongValue()-1),
 			(int)(ec.getScalarInput(rowUpper.getName(), rowUpper.getValueType(), rowUpper.isLiteral()).getLongValue()-1),
 			(int)(ec.getScalarInput(colLower.getName(), colLower.getValueType(), colLower.isLiteral()).getLongValue()-1),
-			(int)(ec.getScalarInput(colUpper.getName(), colUpper.getValueType(), colUpper.isLiteral()).getLongValue()-1));		
+			(int)(ec.getScalarInput(colUpper.getName(), colUpper.getValueType(), colUpper.isLiteral()).getLongValue()-1));
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixArithmeticGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixArithmeticGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixArithmeticGPUInstruction.java
index d332bc8..9f4f2c5 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixArithmeticGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixArithmeticGPUInstruction.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.runtime.instructions.gpu;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
@@ -36,7 +35,7 @@ public class MatrixMatrixArithmeticGPUInstruction extends ArithmeticBinaryGPUIns
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processInstruction(ExecutionContext ec) {
 		GPUStatistics.incrementNoOfExecutedGPUInst();
 		
 		MatrixObject in1 = getMatrixInputForGPUInstruction(ec, _input1.getName());
@@ -45,8 +44,6 @@ public class MatrixMatrixArithmeticGPUInstruction extends ArithmeticBinaryGPUIns
 		//TODO: make hop level changes for this
 		boolean isLeftTransposed = false;
 		boolean isRightTransposed = false;
-		// int rlen = isLeftTransposed ? (int) in1.getNumColumns() : (int) in1.getNumRows();
-		// int clen = isLeftTransposed ? (int) in1.getNumRows() : (int) in1.getNumColumns();
 
 		long rlen1 = in1.getNumRows();
 		long clen1 = in1.getNumColumns();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixAxpyGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixAxpyGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixAxpyGPUInstruction.java
index 778c400..a4eea05 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixAxpyGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixAxpyGPUInstruction.java
@@ -41,7 +41,7 @@ public class MatrixMatrixAxpyGPUInstruction extends ArithmeticBinaryGPUInstructi
 		this.multiplier = multiplier;
 	}
 
-	public static MatrixMatrixAxpyGPUInstruction parseInstruction ( String str ) throws DMLRuntimeException {
+	public static MatrixMatrixAxpyGPUInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields ( parts, 4 );
 		
@@ -77,7 +77,7 @@ public class MatrixMatrixAxpyGPUInstruction extends ArithmeticBinaryGPUInstructi
 
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processInstruction(ExecutionContext ec) {
 		GPUStatistics.incrementNoOfExecutedGPUInst();
 		
 		MatrixObject in1 = getMatrixInputForGPUInstruction(ec, _input1.getName());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixBuiltinGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixBuiltinGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixBuiltinGPUInstruction.java
index 0ef7a44..b877d38 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixBuiltinGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixBuiltinGPUInstruction.java
@@ -36,7 +36,7 @@ public class MatrixMatrixBuiltinGPUInstruction extends BuiltinBinaryGPUInstructi
 	}
 
   @Override
-  public void processInstruction(ExecutionContext ec) throws DMLRuntimeException {
+  public void processInstruction(ExecutionContext ec) {
     GPUStatistics.incrementNoOfExecutedGPUInst();
 
     String opcode = getOpcode();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixRelationalBinaryGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixRelationalBinaryGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixRelationalBinaryGPUInstruction.java
index 224e7b5..df64f78 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixRelationalBinaryGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/MatrixMatrixRelationalBinaryGPUInstruction.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.runtime.instructions.gpu;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
@@ -36,7 +35,7 @@ public class MatrixMatrixRelationalBinaryGPUInstruction extends RelationalBinary
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processInstruction(ExecutionContext ec) {
 		GPUStatistics.incrementNoOfExecutedGPUInst();
 
 		MatrixObject in1 = getMatrixInputForGPUInstruction(ec, _input1.getName());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/RelationalBinaryGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/RelationalBinaryGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/RelationalBinaryGPUInstruction.java
index 505e6e4..a63954f 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/RelationalBinaryGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/RelationalBinaryGPUInstruction.java
@@ -40,7 +40,7 @@ public abstract class RelationalBinaryGPUInstruction extends GPUInstruction {
 		_output = out;
 	}
 
-	public static RelationalBinaryGPUInstruction parseInstruction ( String str ) throws DMLRuntimeException {
+	public static RelationalBinaryGPUInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields ( parts, 3 );
 

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/ReorgGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ReorgGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ReorgGPUInstruction.java
index 2c32cd5..f191d2a 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ReorgGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ReorgGPUInstruction.java
@@ -55,38 +55,27 @@ public class ReorgGPUInstruction extends GPUInstruction {
 		_output = out;
 	}
 
-	public static ReorgGPUInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static ReorgGPUInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
-        InstructionUtils.checkNumFields ( parts, 2 );
-        
+		InstructionUtils.checkNumFields ( parts, 2 );
 		String opcode = parts[0];
 		CPOperand in = new CPOperand(parts[1]);
-		CPOperand out = new CPOperand(parts[2]);	
-					
-		if ( !(opcode.equalsIgnoreCase("r'")) ) {
+		CPOperand out = new CPOperand(parts[2]);
+		if ( !(opcode.equalsIgnoreCase("r'")) )
 			throw new DMLRuntimeException("Unknown opcode while parsing a ReorgInstruction: " + str);
-		}
 		else
 			return new ReorgGPUInstruction(new ReorgOperator(SwapIndex.getSwapIndexFnObject()), in, out, opcode, str);
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		GPUStatistics.incrementNoOfExecutedGPUInst();
-		//acquire input
 		MatrixObject mat = getMatrixInputForGPUInstruction(ec, _input.getName());
-
 		int rlen = (int) mat.getNumColumns();
 		int clen = (int) mat.getNumRows();
-		
 		//execute operation
 		ec.setMetaData(_output.getName(), rlen, clen);
 		LibMatrixCUDA.transpose(ec, ec.getGPUContext(0), getExtendedOpcode(), mat, _output.getName());
-		
 		//release inputs/outputs
 		ec.releaseMatrixInputForGPUInstruction(_input.getName());
 		ec.releaseMatrixOutputForGPUInstruction(_output.getName());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixArithmeticGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixArithmeticGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixArithmeticGPUInstruction.java
index 4552c1f..2593837 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixArithmeticGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixArithmeticGPUInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.gpu;
 
 import org.apache.sysml.parser.Expression.DataType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
@@ -38,9 +37,7 @@ public class ScalarMatrixArithmeticGPUInstruction extends ArithmeticBinaryGPUIns
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{
+	public void processInstruction(ExecutionContext ec) {
 		GPUStatistics.incrementNoOfExecutedGPUInst();
 		
 		CPOperand mat = ( _input1.getDataType() == DataType.MATRIX ) ? _input1 : _input2;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixBuiltinGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixBuiltinGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixBuiltinGPUInstruction.java
index f8e024f..93c012b 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixBuiltinGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixBuiltinGPUInstruction.java
@@ -40,7 +40,7 @@ public class ScalarMatrixBuiltinGPUInstruction extends BuiltinBinaryGPUInstructi
 	}
 
   @Override
-  public void processInstruction(ExecutionContext ec) throws DMLRuntimeException {
+  public void processInstruction(ExecutionContext ec) {
     GPUStatistics.incrementNoOfExecutedGPUInst();
 
     String opcode = getOpcode();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixRelationalBinaryGPUInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixRelationalBinaryGPUInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixRelationalBinaryGPUInstruction.java
index 59e717f..bf5b017 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixRelationalBinaryGPUInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/ScalarMatrixRelationalBinaryGPUInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.gpu;
 
 import org.apache.sysml.parser.Expression;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
@@ -38,7 +37,7 @@ public class ScalarMatrixRelationalBinaryGPUInstruction extends RelationalBinary
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processInstruction(ExecutionContext ec) {
 		GPUStatistics.incrementNoOfExecutedGPUInst();
 
 		CPOperand mat = ( _input1.getDataType() == Expression.DataType.MATRIX ) ? _input1 : _input2;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/CSRPointer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/CSRPointer.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/CSRPointer.java
index a50e56a..bdc5b21 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/CSRPointer.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/CSRPointer.java
@@ -116,29 +116,17 @@ public class CSRPointer {
 		return numElems * ((long) LibMatrixCUDA.sizeOfDataType);
 	}
 
-	//  private Pointer allocate(String instName, long size) throws DMLRuntimeException {
-	//    return getGPUContext().allocate(instName, size);
-	//  }
-
 	private static long getIntSizeOf(long numElems) {
 		return numElems * ((long) Sizeof.INT);
 	}
 
-	//  private void cudaFreeHelper(Pointer toFree) throws DMLRuntimeException {
-	//    getGPUContext().cudaFreeHelper(toFree);
-	//  }
-
-	public static int toIntExact(long l) throws DMLRuntimeException {
+	public static int toIntExact(long l) {
 		if (l < Integer.MIN_VALUE || l > Integer.MAX_VALUE) {
 			throw new DMLRuntimeException("Cannot be cast to int:" + l);
 		}
 		return (int) l;
 	}
 
-	//  private void cudaFreeHelper(String instName, Pointer toFree, boolean eager) throws DMLRuntimeException {
-	//    getGPUContext().cudaFreeHelper(instName, toFree, eager);
-	//  }
-
 	/**
 	 * @return Singleton default matrix descriptor object
 	 * (set with CUSPARSE_MATRIX_TYPE_GENERAL, CUSPARSE_INDEX_BASE_ZERO)
@@ -188,9 +176,8 @@ public class CSRPointer {
 	 * @param rowPtr integer array of row pointers
 	 * @param colInd integer array of column indices
 	 * @param values double array of non zero values
-	 * @throws DMLRuntimeException if error occurs
 	 */
-	public static void copyToDevice(GPUContext gCtx, CSRPointer dest, int rows, long nnz, int[] rowPtr, int[] colInd, double[] values) throws DMLRuntimeException {
+	public static void copyToDevice(GPUContext gCtx, CSRPointer dest, int rows, long nnz, int[] rowPtr, int[] colInd, double[] values) {
 		CSRPointer r = dest;
 		long t0 = 0;
 		if (DMLScript.STATISTICS)
@@ -218,9 +205,8 @@ public class CSRPointer {
 	 * @param nnz    [input] number of non-zeroes
 	 * @param rowPtr [output] pre-allocated integer array of row pointers of size (rows+1)
 	 * @param colInd [output] pre-allocated integer array of column indices of size nnz
-	 * @throws DMLRuntimeException if error
 	 */
-	public static void copyPtrToHost(CSRPointer src, int rows, long nnz, int[] rowPtr, int[] colInd) throws DMLRuntimeException {
+	public static void copyPtrToHost(CSRPointer src, int rows, long nnz, int[] rowPtr, int[] colInd) {
 		CSRPointer r = src;
 		cudaMemcpy(Pointer.to(rowPtr), r.rowPtr, getIntSizeOf(rows + 1), cudaMemcpyDeviceToHost);
 		cudaMemcpy(Pointer.to(colInd), r.colInd, getIntSizeOf(nnz), cudaMemcpyDeviceToHost);
@@ -237,13 +223,10 @@ public class CSRPointer {
 	 * @param m      Rows in A
 	 * @param n      Columns in Bs
 	 * @return CSR (compressed sparse row) pointer
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static CSRPointer allocateForDgeam(GPUContext gCtx, cusparseHandle handle, CSRPointer A, CSRPointer B, int m,
-			int n) throws DMLRuntimeException {
-		if (A.nnz >= Integer.MAX_VALUE || B.nnz >= Integer.MAX_VALUE) {
+	public static CSRPointer allocateForDgeam(GPUContext gCtx, cusparseHandle handle, CSRPointer A, CSRPointer B, int m, int n) {
+		if (A.nnz >= Integer.MAX_VALUE || B.nnz >= Integer.MAX_VALUE)
 			throw new DMLRuntimeException("Number of non zeroes is larger than supported by cuSparse");
-		}
 		CSRPointer C = new CSRPointer(gCtx);
 		step1AllocateRowPointers(gCtx, handle, C, m);
 		step2GatherNNZGeam(gCtx, handle, A, B, C, m, n);
@@ -265,10 +248,9 @@ public class CSRPointer {
 	 * @param n      Columns in B
 	 * @param k      Columns in A / Rows in B
 	 * @return a {@link CSRPointer} instance that encapsulates the CSR matrix on GPU
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static CSRPointer allocateForMatrixMultiply(GPUContext gCtx, cusparseHandle handle, CSRPointer A, int transA,
-			CSRPointer B, int transB, int m, int n, int k) throws DMLRuntimeException {
+			CSRPointer B, int transB, int m, int n, int k) {
 		// Following the code example at http://docs.nvidia.com/cuda/cusparse/#cusparse-lt-t-gt-csrgemm and at
 		// https://github.com/jcuda/jcuda-matrix-utils/blob/master/JCudaMatrixUtils/src/test/java/org/jcuda/matrix/samples/JCusparseSampleDgemm.java
 		CSRPointer C = new CSRPointer(gCtx);
@@ -285,9 +267,8 @@ public class CSRPointer {
 	 * @param nnz2 number of non-zeroes
 	 * @param rows number of rows
 	 * @return a {@link CSRPointer} instance that encapsulates the CSR matrix on GPU
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static CSRPointer allocateEmpty(GPUContext gCtx, long nnz2, long rows) throws DMLRuntimeException {
+	public static CSRPointer allocateEmpty(GPUContext gCtx, long nnz2, long rows) {
 		LOG.trace("GPU : allocateEmpty from CSRPointer with nnz=" + nnz2 + " and rows=" + rows + ", GPUContext=" + gCtx);
 		if(nnz2 < 0) throw new DMLRuntimeException("Incorrect usage of internal API, number of non zeroes is less than 0 when trying to allocate sparse data on GPU");
 		if(rows <= 0) throw new DMLRuntimeException("Incorrect usage of internal API, number of rows is less than or equal to 0 when trying to allocate sparse data on GPU");
@@ -312,10 +293,8 @@ public class CSRPointer {
 	 * @param handle a valid {@link cusparseHandle}
 	 * @param C      Output matrix
 	 * @param rowsC  number of rows in C
-	 * @throws DMLRuntimeException ?
 	 */
-	private static void step1AllocateRowPointers(GPUContext gCtx, cusparseHandle handle, CSRPointer C, int rowsC)
-			throws DMLRuntimeException {
+	private static void step1AllocateRowPointers(GPUContext gCtx, cusparseHandle handle, CSRPointer C, int rowsC) {
 		LOG.trace("GPU : step1AllocateRowPointers" + ", GPUContext=" + gCtx);
 		cusparseSetPointerMode(handle, cusparsePointerMode.CUSPARSE_POINTER_MODE_HOST);
 		//cudaDeviceSynchronize;
@@ -334,10 +313,8 @@ public class CSRPointer {
 	 * @param C      Output Sparse Matrix C on GPU
 	 * @param m      Rows in C
 	 * @param n      Columns in C
-	 * @throws DMLRuntimeException ?
 	 */
-	private static void step2GatherNNZGeam(GPUContext gCtx, cusparseHandle handle, CSRPointer A, CSRPointer B,
-			CSRPointer C, int m, int n) throws DMLRuntimeException {
+	private static void step2GatherNNZGeam(GPUContext gCtx, cusparseHandle handle, CSRPointer A, CSRPointer B, CSRPointer C, int m, int n) {
 		LOG.trace("GPU : step2GatherNNZGeam for DGEAM" + ", GPUContext=" + gCtx);
 		int[] CnnzArray = { -1 };
 		cusparseXcsrgeamNnz(handle, m, n, A.descr, toIntExact(A.nnz), A.rowPtr, A.colInd, B.descr, toIntExact(B.nnz),
@@ -367,10 +344,9 @@ public class CSRPointer {
 	 * @param m      Number of rows of sparse matrix op ( A ) and C
 	 * @param n      Number of columns of sparse matrix op ( B ) and C
 	 * @param k      Number of columns/rows of sparse matrix op ( A ) / op ( B )
-	 * @throws DMLRuntimeException ?
 	 */
 	private static void step2GatherNNZGemm(GPUContext gCtx, cusparseHandle handle, CSRPointer A, int transA,
-			CSRPointer B, int transB, CSRPointer C, int m, int n, int k) throws DMLRuntimeException {
+			CSRPointer B, int transB, CSRPointer C, int m, int n, int k) {
 		LOG.trace("GPU : step2GatherNNZGemm for DGEMM" + ", GPUContext=" + gCtx);
 		int[] CnnzArray = { -1 };
 		if (A.nnz >= Integer.MAX_VALUE || B.nnz >= Integer.MAX_VALUE) {
@@ -396,10 +372,8 @@ public class CSRPointer {
 	 * @param gCtx   a valid {@link GPUContext}
 	 * @param handle a valid {@link cusparseHandle}
 	 * @param C      Output sparse matrix on GPU
-	 * @throws DMLRuntimeException ?
 	 */
-	private static void step3AllocateValNInd(GPUContext gCtx, cusparseHandle handle, CSRPointer C)
-			throws DMLRuntimeException {
+	private static void step3AllocateValNInd(GPUContext gCtx, cusparseHandle handle, CSRPointer C) {
 		LOG.trace("GPU : step3AllocateValNInd" + ", GPUContext=" + gCtx);
 		// Increment cudaCount by one when all three arrays of CSR sparse array are allocated
 		C.val = gCtx.allocate(null, getDataTypeSizeOf(C.nnz));
@@ -424,30 +398,25 @@ public class CSRPointer {
 	// nnzC elements respectively, then finally calls function cusparse[S|D|C|Z]csrgeam()
 	// to complete matrix C.
 
-	public CSRPointer clone(int rows) throws DMLRuntimeException {
+	public CSRPointer clone(int rows) {
 		CSRPointer me = this;
 		CSRPointer that = new CSRPointer(me.getGPUContext());
-
 		that.allocateMatDescrPointer();
-
 		that.nnz = me.nnz;
 		that.val = allocate(that.nnz * LibMatrixCUDA.sizeOfDataType);
-		// TODO: Nakul ... can you please double-check whether the below was a bug or intentional ?
 		that.rowPtr = allocate(rows * Sizeof.INT);
 		that.colInd = allocate(that.nnz * Sizeof.INT);
-
 		cudaMemcpy(that.val, me.val, that.nnz * LibMatrixCUDA.sizeOfDataType, cudaMemcpyDeviceToDevice);
 		cudaMemcpy(that.rowPtr, me.rowPtr, rows * Sizeof.INT, cudaMemcpyDeviceToDevice);
 		cudaMemcpy(that.colInd, me.colInd, that.nnz * Sizeof.INT, cudaMemcpyDeviceToDevice);
-
 		return that;
 	}
 
-	private Pointer allocate(long size) throws DMLRuntimeException {
+	private Pointer allocate(long size) {
 		return getGPUContext().allocate(size);
 	}
 
-	private void cudaFreeHelper(Pointer toFree, boolean eager) throws DMLRuntimeException {
+	private void cudaFreeHelper(Pointer toFree, boolean eager) {
 		getGPUContext().cudaFreeHelper(toFree, eager);
 	}
 
@@ -490,10 +459,9 @@ public class CSRPointer {
 	 * @param cols           number of columns in this CSR matrix
 	 * @param instName          name of the invoking instruction to record{@link Statistics}.
 	 * @return A {@link Pointer} to the allocated dense matrix (in column-major format)
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public Pointer toColumnMajorDenseMatrix(cusparseHandle cusparseHandle, cublasHandle cublasHandle, int rows,
-			int cols, String instName) throws DMLRuntimeException {
+			int cols, String instName) {
 		long t0 = DMLScript.FINEGRAINED_STATISTICS && instName != null ? System.nanoTime() : 0;
 		LOG.trace("GPU : sparse -> column major dense (inside CSRPointer) on " + this + ", GPUContext="
 				+ getGPUContext());
@@ -514,9 +482,8 @@ public class CSRPointer {
 	/**
 	 * Calls cudaFree lazily on the allocated {@link Pointer} instances
 	 *
-	 * @throws DMLRuntimeException ?
 	 */
-	public void deallocate() throws DMLRuntimeException {
+	public void deallocate() {
 		deallocate(DMLScript.EAGER_CUDA_FREE);
 	}
 
@@ -524,9 +491,8 @@ public class CSRPointer {
 	 * Calls cudaFree lazily or eagerly on the allocated {@link Pointer} instances
 	 *
 	 * @param eager whether to do eager or lazy cudaFrees
-	 * @throws DMLRuntimeException ?
 	 */
-	public void deallocate(boolean eager) throws DMLRuntimeException {
+	public void deallocate(boolean eager) {
 		if (nnz > 0) {
 			cudaFreeHelper(val, eager);
 			cudaFreeHelper(rowPtr, eager);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/ExecutionConfig.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/ExecutionConfig.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/ExecutionConfig.java
index cae0660..872fef7 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/ExecutionConfig.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/ExecutionConfig.java
@@ -66,9 +66,8 @@ public class ExecutionConfig {
 	 *
 	 * @param numCells number of cells
 	 * @return execution configuration
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static ExecutionConfig getConfigForSimpleVectorOperations(int numCells) throws DMLRuntimeException {
+	public static ExecutionConfig getConfigForSimpleVectorOperations(int numCells) {
 		if(numCells == 0)
 			throw new DMLRuntimeException("Attempting to invoke a kernel with 0 threads");
 		int deviceNumber = 0;
@@ -86,9 +85,8 @@ public class ExecutionConfig {
 	 * @param rlen number of rows
 	 * @param clen number of columns
 	 * @return execution configuration
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static ExecutionConfig getConfigForSimpleMatrixOperations(int rlen, int clen) throws DMLRuntimeException {
+	public static ExecutionConfig getConfigForSimpleMatrixOperations(int rlen, int clen) {
 		return getConfigForSimpleVectorOperations(rlen * clen);
 	}
 
@@ -109,9 +107,8 @@ public class ExecutionConfig {
 	 *
 	 * @param deviceNumber device number of the given device
 	 * @return The maximum block dimension, in x-direction
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int getMaxBlockDim(int deviceNumber) throws DMLRuntimeException {
+	private static int getMaxBlockDim(int deviceNumber) {
 		//    	return 32;
 		// TODO: Use JCudaDriver.cuOccupancyMaxPotentialBlockSize to chose the block size that maximizes occupancy
 		Integer ret = maxBlockDimForDevice.get(deviceNumber);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContext.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContext.java
index 9f41e04..7f8f106 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContext.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContext.java
@@ -90,7 +90,7 @@ public class GPUContext {
 		return memoryManager;
 	}
 
-	protected GPUContext(int deviceNum) throws DMLRuntimeException {
+	protected GPUContext(int deviceNum) {
 		this.deviceNum = deviceNum;
 		cudaSetDevice(deviceNum);
 
@@ -123,15 +123,14 @@ public class GPUContext {
 	 * Print information of memory usage.
 	 *
 	 * @param opcode opcode of caller
-	 * @throws DMLRuntimeException if error
 	 */
-	public void printMemoryInfo(String opcode) throws DMLRuntimeException {
+	public void printMemoryInfo(String opcode) {
 		if (LOG.isDebugEnabled()) {
 			LOG.debug(opcode + ": " + memoryManager.toString());
 		}
 	}
 
-	private void initializeCudaLibraryHandles() throws DMLRuntimeException {
+	private void initializeCudaLibraryHandles() {
 		deleteCudaLibraryHandles();
 
 		if (cudnnHandle == null) {
@@ -178,9 +177,8 @@ public class GPUContext {
 	 * If in a multi-threaded environment like parfor, this method must be called when in the
 	 * appropriate thread.
 	 *
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void initializeThread() throws DMLRuntimeException {
+	public void initializeThread() {
 		cudaSetDevice(deviceNum);
 		initializeCudaLibraryHandles();
 	}
@@ -190,9 +188,8 @@ public class GPUContext {
 	 *
 	 * @param size size of data (in bytes) to allocate
 	 * @return jcuda pointer
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public Pointer allocate(long size) throws DMLRuntimeException {
+	public Pointer allocate(long size) {
 		return memoryManager.malloc(null, size);
 	}
 
@@ -202,9 +199,8 @@ public class GPUContext {
 	 * @param instructionName name of instruction for which to record per instruction performance statistics, null if don't want to record
 	 * @param size            size of data (in bytes) to allocate
 	 * @return jcuda pointer
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public Pointer allocate(String instructionName, long size) throws DMLRuntimeException {
+	public Pointer allocate(String instructionName, long size) {
 		return memoryManager.malloc(instructionName, size);
 	}
 
@@ -213,9 +209,8 @@ public class GPUContext {
 	 * Does lazy cudaFree calls.
 	 *
 	 * @param toFree {@link Pointer} instance to be freed
-	 * @throws DMLRuntimeException if error
 	 */
-	public void cudaFreeHelper(final Pointer toFree) throws DMLRuntimeException {
+	public void cudaFreeHelper(final Pointer toFree) {
 		cudaFreeHelper(null, toFree, DMLScript.EAGER_CUDA_FREE);
 	}
 
@@ -224,9 +219,8 @@ public class GPUContext {
 	 *
 	 * @param toFree {@link Pointer} instance to be freed
 	 * @param eager  true if to be done eagerly
-	 * @throws DMLRuntimeException if error
 	 */
-	public void cudaFreeHelper(final Pointer toFree, boolean eager) throws DMLRuntimeException {
+	public void cudaFreeHelper(final Pointer toFree, boolean eager) {
 		cudaFreeHelper(null, toFree, eager);
 	}
 
@@ -235,9 +229,8 @@ public class GPUContext {
 	 *
 	 * @param instructionName name of the instruction for which to record per instruction free time, null if do not want to record
 	 * @param toFree          {@link Pointer} instance to be freed
-	 * @throws DMLRuntimeException if error
 	 */
-	public void cudaFreeHelper(String instructionName, final Pointer toFree) throws DMLRuntimeException {
+	public void cudaFreeHelper(String instructionName, final Pointer toFree) {
 		cudaFreeHelper(instructionName, toFree, DMLScript.EAGER_CUDA_FREE);
 	}
 
@@ -247,9 +240,8 @@ public class GPUContext {
 	 * @param instructionName name of the instruction for which to record per instruction free time, null if do not want to record
 	 * @param toFree          {@link Pointer} instance to be freed
 	 * @param eager           true if to be done eagerly
-	 * @throws DMLRuntimeException if error
 	 */
-	public void cudaFreeHelper(String instructionName, final Pointer toFree, boolean eager) throws DMLRuntimeException {
+	public void cudaFreeHelper(String instructionName, final Pointer toFree, boolean eager) {
 		memoryManager.free(instructionName, toFree, eager);
 	}
 
@@ -265,10 +257,8 @@ public class GPUContext {
 
 	/**
 	 * Makes sure that GPU that SystemML is trying to use has the minimum compute capability needed.
-	 *
-	 * @throws DMLRuntimeException if the compute capability is less than what is required
 	 */
-	public void ensureComputeCapability() throws DMLRuntimeException {
+	public void ensureComputeCapability() {
 		int[] devices = { -1 };
 		cudaGetDeviceCount(devices);
 		if (devices[0] == -1) {
@@ -308,9 +298,8 @@ public class GPUContext {
 	 * Gets the device properties for the active GPU (set with cudaSetDevice()).
 	 *
 	 * @return the device properties
-	 * @throws DMLRuntimeException ?
 	 */
-	public cudaDeviceProp getGPUProperties() throws DMLRuntimeException {
+	public cudaDeviceProp getGPUProperties() {
 		return GPUContextPool.getGPUProperties(deviceNum);
 	}
 
@@ -318,9 +307,8 @@ public class GPUContext {
 	 * Gets the maximum number of threads per block for "active" GPU.
 	 *
 	 * @return the maximum number of threads per block
-	 * @throws DMLRuntimeException ?
 	 */
-	public int getMaxThreadsPerBlock() throws DMLRuntimeException {
+	public int getMaxThreadsPerBlock() {
 		cudaDeviceProp deviceProps = getGPUProperties();
 		return deviceProps.maxThreadsPerBlock;
 	}
@@ -329,9 +317,8 @@ public class GPUContext {
 	 * Gets the maximum number of blocks supported by the active cuda device.
 	 *
 	 * @return the maximum number of blocks supported
-	 * @throws DMLRuntimeException ?
 	 */
-	public int getMaxBlocks() throws DMLRuntimeException {
+	public int getMaxBlocks() {
 		cudaDeviceProp deviceProp = getGPUProperties();
 		return deviceProp.maxGridSize[0];
 	}
@@ -340,9 +327,8 @@ public class GPUContext {
 	 * Gets the shared memory per block supported by the active cuda device.
 	 *
 	 * @return the shared memory per block
-	 * @throws DMLRuntimeException ?
 	 */
-	public long getMaxSharedMemory() throws DMLRuntimeException {
+	public long getMaxSharedMemory() {
 		cudaDeviceProp deviceProp = getGPUProperties();
 		return deviceProp.sharedMemPerBlock;
 	}
@@ -351,9 +337,8 @@ public class GPUContext {
 	 * Gets the warp size supported by the active cuda device.
 	 *
 	 * @return the warp size
-	 * @throws DMLRuntimeException ?
 	 */
-	public int getWarpSize() throws DMLRuntimeException {
+	public int getWarpSize() {
 		cudaDeviceProp deviceProp = getGPUProperties();
 		return deviceProp.warpSize;
 	}
@@ -406,9 +391,8 @@ public class GPUContext {
 	/**
 	 * Destroys this GPUContext object.
 	 *
-	 * @throws DMLRuntimeException if error
 	 */
-	public void destroy() throws DMLRuntimeException {
+	public void destroy() {
 		if (LOG.isTraceEnabled()) {
 			LOG.trace("GPU : this context was destroyed, this = " + this.toString());
 		}
@@ -445,14 +429,12 @@ public class GPUContext {
 	 * If memory is being used between MLContext invocations, they are pointed to by a {@link GPUObject} instance
 	 * which would be part of the {@link MatrixObject}. The cleanup of that {@link MatrixObject} instance will
 	 * cause the memory associated with that block on the GPU to be freed up.
-	 *
-	 * @throws DMLRuntimeException ?
 	 */
-	public void clearMemory() throws DMLRuntimeException {
+	public void clearMemory() {
 		memoryManager.clearMemory();
 	}
 	
-	public void clearTemporaryMemory() throws DMLRuntimeException {
+	public void clearTemporaryMemory() {
 		memoryManager.clearTemporaryMemory();
 	}
 
@@ -460,5 +442,4 @@ public class GPUContext {
 	public String toString() {
 		return "GPUContext{" + "deviceNum=" + deviceNum + '}';
 	}
-
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContextPool.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContextPool.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContextPool.java
index e030180..242127a 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContextPool.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContextPool.java
@@ -80,10 +80,8 @@ public class GPUContextPool {
 	 * Also sets behaviour for J{Cuda, Cudnn, Cublas, Cusparse} in case of error
 	 * Initializes the CUDA driver
 	 * All these need be done once, and not per GPU
-	 *
-	 * @throws DMLRuntimeException ?
 	 */
-	public synchronized static void initializeGPU() throws DMLRuntimeException {
+	public synchronized static void initializeGPU() {
 		initialized = true;
 		GPUContext.LOG.info("Initializing CUDA");
 		long start = System.nanoTime();
@@ -207,9 +205,8 @@ public class GPUContextPool {
 	 * Reserves and gets an initialized list of GPUContexts
 	 *
 	 * @return null if no GPUContexts in pool, otherwise a valid list of GPUContext
-	 * @throws DMLRuntimeException ?
 	 */
-	public static synchronized List<GPUContext> reserveAllGPUContexts() throws DMLRuntimeException {
+	public static synchronized List<GPUContext> reserveAllGPUContexts() {
 		if (reserved)
 			throw new DMLRuntimeException("Trying to re-reserve GPUs");
 		if (!initialized)
@@ -233,9 +230,8 @@ public class GPUContextPool {
 	 *
 	 * @param device the device number (on a machine with more than 1 GPU)
 	 * @return the device properties
-	 * @throws DMLRuntimeException if there is problem initializing the GPUContexts
 	 */
-	static cudaDeviceProp getGPUProperties(int device) throws DMLRuntimeException {
+	static cudaDeviceProp getGPUProperties(int device) {
 		// do once - initialization of GPU
 		if (!initialized)
 			initializeGPU();
@@ -246,9 +242,8 @@ public class GPUContextPool {
 	 * Number of available devices on this machine
 	 *
 	 * @return number of available GPUs on this machine
-	 * @throws DMLRuntimeException if error
 	 */
-	public static int getDeviceCount() throws DMLRuntimeException {
+	public static int getDeviceCount() {
 		if (!initialized)
 			initializeGPU();
 		return deviceCount;
@@ -256,10 +251,8 @@ public class GPUContextPool {
 
 	/**
 	 * Unreserves all GPUContexts
-	 *
-	 * @throws DMLRuntimeException if error
 	 */
-	public static synchronized void freeAllGPUContexts() throws DMLRuntimeException {
+	public static synchronized void freeAllGPUContexts() {
 		if (!reserved)
 			throw new DMLRuntimeException("Trying to free unreserved GPUs");
 		reserved = false;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUMemoryManager.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUMemoryManager.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUMemoryManager.java
index c0df38b..e2012a7 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUMemoryManager.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUMemoryManager.java
@@ -153,9 +153,8 @@ public class GPUMemoryManager {
 	 * @param opcode instruction name
 	 * @param size size in bytes
 	 * @return allocated pointer
-	 * @throws DMLRuntimeException if error
 	 */
-	public Pointer malloc(String opcode, long size) throws DMLRuntimeException {
+	public Pointer malloc(String opcode, long size) {
 		if(size < 0) {
 			throw new DMLRuntimeException("Cannot allocate memory of size " + size);
 		}
@@ -296,9 +295,8 @@ public class GPUMemoryManager {
 	 * @param opcode instruction name
 	 * @param toFree pointer to free
 	 * @param eager whether to deallocate eagerly
-	 * @throws DMLRuntimeException if error
 	 */
-	public void free(String opcode, Pointer toFree, boolean eager) throws DMLRuntimeException {
+	public void free(String opcode, Pointer toFree, boolean eager) {
 		Pointer dummy = new Pointer();
 		if (toFree == dummy) { // trying to free a null pointer
 			return;
@@ -325,10 +323,8 @@ public class GPUMemoryManager {
 	
 	/**
 	 * Clear the allocated GPU objects
-	 * 
-	 * @throws DMLRuntimeException if error
 	 */
-	public void clearMemory() throws DMLRuntimeException {
+	public void clearMemory() {
 		// First deallocate all the GPU objects
 		for(GPUObject gpuObj : allocatedGPUObjects) {
 			if(gpuObj.isDirty()) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java
index c0a50ec..613e16f 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java
@@ -98,10 +98,6 @@ public class GPUObject {
 	 */
 	protected MatrixObject mat = null;
 
-	//	private Pointer allocate(String instName, long size) throws DMLRuntimeException {
-	//		return getGPUContext().allocate(instName, size);
-	//	}
-
 	@Override
 	public Object clone() {
 		GPUObject me = this;
@@ -135,19 +131,15 @@ public class GPUObject {
 		return that;
 	}
 
-	private Pointer allocate(long size) throws DMLRuntimeException {
+	private Pointer allocate(long size) {
 		return getGPUContext().allocate(size);
 	}
 
-	private void cudaFreeHelper(Pointer toFree) throws DMLRuntimeException {
+	private void cudaFreeHelper(Pointer toFree) {
 		getGPUContext().cudaFreeHelper(toFree);
 	}
 
-	//	private void cudaFreeHelper(Pointer toFree, boolean eager) throws DMLRuntimeException {
-	//		getGPUContext().cudaFreeHelper(toFree, eager);
-	//	}
-
-	private void cudaFreeHelper(String instName, Pointer toFree, boolean eager) throws DMLRuntimeException {
+	private void cudaFreeHelper(String instName, Pointer toFree, boolean eager) {
 		getGPUContext().cudaFreeHelper(instName, toFree, eager);
 	}
 
@@ -164,11 +156,9 @@ public class GPUObject {
 	 * @param n        columns in output matrix
 	 * @param lda      rows in input matrix
 	 * @param ldc      columns in output matrix
-	 * @throws DMLRuntimeException if operation failed
 	 * @return transposed matrix
 	 */
-	public static Pointer transpose(GPUContext gCtx, Pointer densePtr, int m, int n, int lda, int ldc)
-			throws DMLRuntimeException {
+	public static Pointer transpose(GPUContext gCtx, Pointer densePtr, int m, int n, int lda, int ldc) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : transpose of block of size [" + m + "," + n + "]" + ", GPUContext=" + gCtx);
 		}
@@ -195,10 +185,9 @@ public class GPUObject {
 	 * @param rows           number of rows
 	 * @param cols           number of columns
 	 * @return CSR (compressed sparse row) pointer
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static CSRPointer columnMajorDenseToRowMajorSparse(GPUContext gCtx, cusparseHandle cusparseHandle,
-			Pointer densePtr, int rows, int cols) throws DMLRuntimeException {
+			Pointer densePtr, int rows, int cols) {
 		cusparseMatDescr matDescr = CSRPointer.getDefaultCuSparseMatrixDescriptor();
 		Pointer nnzPerRowPtr = null;
 		Pointer nnzTotalDevHostPtr = null;
@@ -255,9 +244,8 @@ public class GPUObject {
 	 * Needed for operations like cusparseDcsrgemm(cusparseHandle, int, int, int, int, int, cusparseMatDescr, int, Pointer, Pointer, Pointer, cusparseMatDescr, int, Pointer, Pointer, Pointer, cusparseMatDescr, Pointer, Pointer, Pointer)
 	 *
 	 * @param sparseMatrixPtr CSR (compressed sparse row) pointer
-	 * @throws DMLRuntimeException ?
 	 */
-	public void setSparseMatrixCudaPointer(CSRPointer sparseMatrixPtr) throws DMLRuntimeException {
+	public void setSparseMatrixCudaPointer(CSRPointer sparseMatrixPtr) {
 		if (this.jcudaSparseMatrixPtr != null) {
 			throw new DMLRuntimeException("jcudaSparseMatrixPtr was already allocated for " + this + ", this will cause a memory leak on the GPU");
 		}
@@ -273,9 +261,8 @@ public class GPUObject {
 	 * Convenience method to directly set the dense matrix pointer on GPU
 	 *
 	 * @param densePtr dense pointer
-	 * @throws DMLRuntimeException ?
 	 */
-	public void setDenseMatrixCudaPointer(Pointer densePtr) throws DMLRuntimeException {
+	public void setDenseMatrixCudaPointer(Pointer densePtr) {
 		if (this.jcudaDenseMatrixPtr != null) {
 			throw new DMLRuntimeException("jcudaDenseMatrixPtr was already allocated for " + this + ", this will cause a memory leak on the GPU");
 		}
@@ -292,10 +279,8 @@ public class GPUObject {
 
 	/**
 	 * Converts this GPUObject from dense to sparse format.
-	 *
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void denseToSparse() throws DMLRuntimeException {
+	public void denseToSparse() {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : dense -> sparse on " + this + ", GPUContext=" + getGPUContext());
 		}
@@ -324,10 +309,8 @@ public class GPUObject {
 
 	/**
 	 * Convenience method. Converts Row Major Dense Matrix to Column Major Dense Matrix
-	 *
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void denseRowMajorToColumnMajor() throws DMLRuntimeException {
+	public void denseRowMajorToColumnMajor() {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : dense Ptr row-major -> col-major on " + this + ", GPUContext=" + getGPUContext());
 		}
@@ -347,10 +330,8 @@ public class GPUObject {
 
 	/**
 	 * Convenience method. Converts Column Major Dense Matrix to Row Major Dense Matrix
-	 *
-	 * @throws DMLRuntimeException if error
 	 */
-	public void denseColumnMajorToRowMajor() throws DMLRuntimeException {
+	public void denseColumnMajorToRowMajor() {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : dense Ptr row-major -> col-major on " + this + ", GPUContext=" + getGPUContext());
 		}
@@ -371,10 +352,8 @@ public class GPUObject {
 
 	/**
 	 * Convert sparse to dense (Performs transpose, use sparseToColumnMajorDense if the kernel can deal with column major format)
-	 *
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void sparseToDense() throws DMLRuntimeException {
+	public void sparseToDense() {
 		sparseToDense(null);
 	}
 
@@ -383,9 +362,8 @@ public class GPUObject {
 	 * Also records per instruction invokation of sparseToDense.
 	 *
 	 * @param instructionName Name of the instruction for which statistics are recorded in {@link GPUStatistics}
-	 * @throws DMLRuntimeException ?
 	 */
-	public void sparseToDense(String instructionName) throws DMLRuntimeException {
+	public void sparseToDense(String instructionName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : sparse -> dense on " + this + ", GPUContext=" + getGPUContext());
 		}
@@ -409,10 +387,8 @@ public class GPUObject {
 
 	/**
 	 * More efficient method to convert sparse to dense but returns dense in column major format
-	 *
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void sparseToColumnMajorDense() throws DMLRuntimeException {
+	public void sparseToColumnMajorDense() {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : sparse -> col-major dense on " + this + ", GPUContext=" + getGPUContext());
 		}
@@ -457,10 +433,8 @@ public class GPUObject {
 	/**
 	 * Allocates a sparse and empty {@link GPUObject}
 	 * This is the result of operations that are both non zero matrices.
-	 *
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void allocateSparseAndEmpty() throws DMLRuntimeException {
+	public void allocateSparseAndEmpty() {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : allocate sparse and empty block on " + this + ", GPUContext=" + getGPUContext());
 		}
@@ -472,9 +446,8 @@ public class GPUObject {
 	 * and fills it up with a single value
 	 *
 	 * @param v value to fill up the dense matrix
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void allocateAndFillDense(double v) throws DMLRuntimeException {
+	public void allocateAndFillDense(double v) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : allocate and fill dense with value " + v + " on " + this + ", GPUContext=" + getGPUContext());
 		}
@@ -496,9 +469,8 @@ public class GPUObject {
 	 * Being allocated is a prerequisite to being sparse and empty.
 	 *
 	 * @return true if sparse and empty
-	 * @throws DMLRuntimeException if error
 	 */
-	public boolean isSparseAndEmpty() throws DMLRuntimeException {
+	public boolean isSparseAndEmpty() {
 		boolean isSparseAndAllocated = isAllocated() && LibMatrixCUDA.isInSparseFormat(getGPUContext(), mat);
 		boolean isEmptyAndSparseAndAllocated = isSparseAndAllocated && getJcudaSparseMatrixPtr().nnz == 0;
 		return isEmptyAndSparseAndAllocated;
@@ -511,9 +483,8 @@ public class GPUObject {
 	 * @param instName instruction name
 	 * @param recomputeDenseNNZ recompute NNZ if dense
 	 * @return the number of nonzeroes
-	 * @throws DMLRuntimeException if error
 	 */
-	public long getNnz(String instName, boolean recomputeDenseNNZ) throws DMLRuntimeException {
+	public long getNnz(String instName, boolean recomputeDenseNNZ) {
 		if(isAllocated()) {
 			if(LibMatrixCUDA.isInSparseFormat(getGPUContext(), mat)) {
 				return getJcudaSparseMatrixPtr().nnz;
@@ -554,7 +525,7 @@ public class GPUObject {
 			throw new DMLRuntimeException("Expected the GPU object to be allocated");
 	}
 
-	public boolean acquireDeviceRead(String opcode) throws DMLRuntimeException {
+	public boolean acquireDeviceRead(String opcode) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : acquireDeviceRead on " + this);
 		}
@@ -573,7 +544,7 @@ public class GPUObject {
 		return transferred;
 	}
 
-	public boolean acquireDeviceModifyDense() throws DMLRuntimeException {
+	public boolean acquireDeviceModifyDense() {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : acquireDeviceModifyDense on " + this + ", GPUContext=" + getGPUContext());
 		}
@@ -593,7 +564,7 @@ public class GPUObject {
 		return allocated;
 	}
 
-	public boolean acquireDeviceModifySparse() throws DMLRuntimeException {
+	public boolean acquireDeviceModifySparse() {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : acquireDeviceModifySparse on " + this + ", GPUContext=" + getGPUContext());
 		}
@@ -619,7 +590,7 @@ public class GPUObject {
 	 * @param instName name of the instruction
 	 * @return true if a copy to host happened, false otherwise
 	 */
-	public boolean acquireHostRead(String instName) throws DMLRuntimeException {
+	public boolean acquireHostRead(String instName) {
 		boolean copied = false;
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : acquireDeviceModifySparse on " + this + ", GPUContext=" + getGPUContext());
@@ -639,14 +610,14 @@ public class GPUObject {
 		return writeLock || readLocks.longValue() > 0;
 	}
 	
-	public void addReadLock() throws DMLRuntimeException {
+	public void addReadLock() {
 		if(writeLock)
 			throw new DMLRuntimeException("Attempting to add a read lock when writeLock="+ writeLock);
 		else
 			readLocks.increment();
 	}
 	
-	public void addWriteLock() throws DMLRuntimeException {
+	public void addWriteLock() {
 		if(readLocks.longValue() > 0)
 			throw new DMLRuntimeException("Attempting to add a write lock when readLocks="+ readLocks.longValue());
 		else if(writeLock)
@@ -655,13 +626,13 @@ public class GPUObject {
 			writeLock = true;
 	}
 	
-	public void releaseReadLock() throws DMLRuntimeException {
+	public void releaseReadLock() {
 		readLocks.decrement();
 		if(readLocks.longValue() < 0)
 			throw new DMLRuntimeException("Attempting to release a read lock when readLocks="+ readLocks.longValue());
 	}
 	
-	public void releaseWriteLock() throws DMLRuntimeException {
+	public void releaseWriteLock() {
 		if(writeLock)
 			writeLock = false;
 		else
@@ -675,10 +646,8 @@ public class GPUObject {
 
 	/**
 	 * Updates the locks depending on the eviction policy selected
-	 *
-	 * @throws DMLRuntimeException if there is no locked GPU Object or if could not obtain a {@link GPUContext}
 	 */
-	private void updateReleaseLocks() throws DMLRuntimeException {
+	private void updateReleaseLocks() {
 		DMLScript.EvictionPolicy evictionPolicy = DMLScript.GPU_EVICTION_POLICY;
 		switch (evictionPolicy) {
 			case LRU:
@@ -699,10 +668,8 @@ public class GPUObject {
 
 	/**
 	 * Releases input allocated on GPU
-	 *
-	 * @throws DMLRuntimeException if data is not allocated or if there is no locked GPU Object or if could not obtain a {@link GPUContext}
 	 */
-	public void releaseInput() throws DMLRuntimeException {
+	public void releaseInput() {
 		releaseReadLock();
 		updateReleaseLocks();
 		if (!isAllocated())
@@ -711,10 +678,8 @@ public class GPUObject {
 
 	/**
 	 * releases output allocated on GPU
-	 *
-	 * @throws DMLRuntimeException if data is not allocated or if there is no locked GPU Object or if could not obtain a {@link GPUContext}
 	 */
-	public void releaseOutput() throws DMLRuntimeException {
+	public void releaseOutput() {
 		releaseWriteLock();
 		updateReleaseLocks();
 		// Currently, there is no convenient way to acquireDeviceModify independently of dense/sparse format. 
@@ -725,7 +690,7 @@ public class GPUObject {
 			throw new DMLRuntimeException("Attempting to release an output before allocating it");
 	}
 
-	void allocateDenseMatrixOnDevice() throws DMLRuntimeException {
+	void allocateDenseMatrixOnDevice() {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : allocateDenseMatrixOnDevice, on " + this + ", GPUContext=" + getGPUContext());
 		}
@@ -742,7 +707,7 @@ public class GPUObject {
 		setDenseMatrixCudaPointer(tmp);
 	}
 
-	void allocateSparseMatrixOnDevice() throws DMLRuntimeException {
+	void allocateSparseMatrixOnDevice() {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : allocateSparseMatrixOnDevice, on " + this + ", GPUContext=" + getGPUContext());
 		}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/JCudaKernels.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/JCudaKernels.java b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/JCudaKernels.java
index 181b08d..743c7e6 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/JCudaKernels.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/gpu/context/JCudaKernels.java
@@ -55,10 +55,8 @@ public class JCudaKernels {
 	/**
 	 * Loads the kernels in the file ptxFileName. Though cubin files are also supported, we will stick with
 	 * ptx file as they are target-independent similar to Java's .class files.
-	 *
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	JCudaKernels() throws DMLRuntimeException {
+	JCudaKernels() {
 		module = new CUmodule();
 		// Load the kernels specified in the ptxFileName file
 		checkResult(cuModuleLoadDataEx(module, initKernels(ptxFileName), 0, new int[0], Pointer.to(new int[0])));
@@ -71,9 +69,8 @@ public class JCudaKernels {
 	 * @param name      name of the kernel
 	 * @param config    execution configuration
 	 * @param arguments can be of type Pointer, long, double, float and int
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void launchKernel(String name, ExecutionConfig config, Object... arguments) throws DMLRuntimeException {
+	public void launchKernel(String name, ExecutionConfig config, Object... arguments) {
 		name = name + LibMatrixCUDA.customKernelSuffix;
 		CUfunction function = kernels.get(name);
 		
@@ -115,7 +112,7 @@ public class JCudaKernels {
 			JCuda.cudaDeviceSynchronize();
 	}
 
-	public static void checkResult(int cuResult) throws DMLRuntimeException {
+	public static void checkResult(int cuResult) {
 		if (cuResult != CUresult.CUDA_SUCCESS) {
 			throw new DMLRuntimeException(CUresult.stringFor(cuResult));
 		}
@@ -126,9 +123,8 @@ public class JCudaKernels {
 	 *
 	 * @param ptxFileName
 	 * @return
-	 * @throws DMLRuntimeException
 	 */
-	private static Pointer initKernels(String ptxFileName) throws DMLRuntimeException {
+	private static Pointer initKernels(String ptxFileName) {
 		InputStream in = null;
 		ByteArrayOutputStream out = null;
 		try {

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 1c3d8bc..2e75c9a 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
@@ -81,9 +81,7 @@ public class AggregateBinaryInstruction extends BinaryMRInstructionBase implemen
 		return _aggType;
 	}
 
-	public static AggregateBinaryInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static AggregateBinaryInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionParts ( str );
 		
 		byte in1, in2, out;
@@ -129,9 +127,7 @@ public class AggregateBinaryInstruction extends BinaryMRInstructionBase implemen
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException 
-	{	
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		IndexedMatrixValue in1=cachedValues.getFirst(input1);
 		IndexedMatrixValue in2=cachedValues.getFirst(input2);
 		
@@ -179,10 +175,8 @@ public class AggregateBinaryInstruction extends BinaryMRInstructionBase implemen
 	 * @param in2 indexed matrix value 2
 	 * @param blockRowFactor ?
 	 * @param blockColFactor ?
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	private void processMapMultInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, IndexedMatrixValue in1, IndexedMatrixValue in2, int blockRowFactor, int blockColFactor) 
-		throws DMLRuntimeException 
 	{
 		boolean removeOutput = true;
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 be924df..d8038a5 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
@@ -34,9 +34,7 @@ public class AggregateInstruction extends UnaryMRInstructionBase {
 		instString = istr;
 	}
 
-	public static AggregateInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{	
+	public static AggregateInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionParts ( str );
 		
 		byte in, out;
@@ -52,7 +50,7 @@ public class AggregateInstruction extends UnaryMRInstructionBase {
 		}
 		else {
 			InstructionUtils.checkNumFields ( str, 2 );
-			agg = InstructionUtils.parseAggregateOperator(opcode, null, null);	
+			agg = InstructionUtils.parseAggregateOperator(opcode, null, null);
 		}
 		
 		return new AggregateInstruction(agg, in, out, str);
@@ -61,8 +59,7 @@ public class AggregateInstruction extends UnaryMRInstructionBase {
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		
 		throw new DMLRuntimeException("no processInstruction for AggregateInstruction!");
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 923d110..6d2b07f 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
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 import java.util.ArrayList;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.functionobjects.ReduceDiag;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -42,7 +41,7 @@ public class AggregateUnaryInstruction extends UnaryMRInstructionBase {
 		_dropCorr = dropCorr;
 	}
 
-	public static AggregateUnaryInstruction parseInstruction ( String str ) throws DMLRuntimeException {
+	public static AggregateUnaryInstruction parseInstruction ( String str ) {
 		
 		InstructionUtils.checkNumFields ( str, 3 );
 		
@@ -60,8 +59,7 @@ public class AggregateUnaryInstruction extends UnaryMRInstructionBase {
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, 
-			int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
+			int blockRowFactor, int blockColFactor) {
 		
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList != null )


[03/12] systemml git commit: [SYSTEMML-2191] Cleanup exception hierarchy and handling, part 3

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNPooling.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNPooling.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNPooling.java
index 5d3a631..9e3d8f8 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNPooling.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNPooling.java
@@ -23,7 +23,6 @@ import java.util.Arrays;
 import java.util.concurrent.Callable;
 
 import org.apache.sysml.hops.OptimizerUtils;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.matrix.data.LibMatrixDNN.PoolingType;
 import org.apache.sysml.runtime.matrix.data.LibMatrixDNNHelper.CellIndex3;
 
@@ -43,9 +42,8 @@ public class LibMatrixDNNPooling {
 	 * @param params convolution parameters
 	 * @param poolType type of pooling
 	 * @return list of callable tasks for performing pooling operation
-	 * @throws DMLRuntimeException if error occurs
 	 */
-	public static ArrayList<Callable<Long>> getPoolingWorkers(ConvolutionParameters params, PoolingType poolType) throws DMLRuntimeException {
+	public static ArrayList<Callable<Long>> getPoolingWorkers(ConvolutionParameters params, PoolingType poolType) {
 		ArrayList<Callable<Long>> ret = new ArrayList<>();
 		// Try to create twice as many tasks as threads for improved load balance
 		int k = OptimizerUtils.getConstrainedNumThreads(params.numThreads);
@@ -66,9 +64,8 @@ public class LibMatrixDNNPooling {
 	 * @param performReluBackward whether to perform ReLU backward
 	 * @param poolType type of pooling operation to perform
 	 * @return list of callable tasks for performing maxpooling backward operation
-	 * @throws DMLRuntimeException if error occurs
 	 */
-	public static ArrayList<Callable<Long>> getPoolingBackwardWorkers(ConvolutionParameters params, boolean performReluBackward, PoolingType poolType) throws DMLRuntimeException {
+	public static ArrayList<Callable<Long>> getPoolingBackwardWorkers(ConvolutionParameters params, boolean performReluBackward, PoolingType poolType) {
 		ArrayList<Callable<Long>> ret = new ArrayList<>();
 		// Try to create twice as many tasks as threads for improved load balance
 		int k = OptimizerUtils.getConstrainedNumThreads(params.numThreads);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNRelu.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNRelu.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNRelu.java
index 83a714b..bb0fcf1 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNRelu.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNRelu.java
@@ -22,7 +22,6 @@ import java.util.ArrayList;
 import java.util.concurrent.Callable;
 
 import org.apache.sysml.hops.OptimizerUtils;
-import org.apache.sysml.runtime.DMLRuntimeException;
 
 /**
  * This class contains the different implementation of rotate180 operation
@@ -34,9 +33,8 @@ public class LibMatrixDNNRelu
 	 * 
 	 * @param params convolution parameters
 	 * @return list of callable tasks for performing relu backward operation
-	 * @throws DMLRuntimeException if error occurs
 	 */
-	public static ArrayList<Callable<Long>> getReluBackwardWorkers(ConvolutionParameters params) throws DMLRuntimeException {
+	public static ArrayList<Callable<Long>> getReluBackwardWorkers(ConvolutionParameters params) {
 		ArrayList<Callable<Long>> ret = new ArrayList<>();
 		int k = OptimizerUtils.getConstrainedNumThreads(params.numThreads);
 		int taskSize = (int)(Math.ceil((double)params.N / k));

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDatagen.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDatagen.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDatagen.java
index 3e77a72..fa47c37 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDatagen.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDatagen.java
@@ -96,9 +96,7 @@ public class LibMatrixDatagen
 	}
 
 	@Deprecated
-	public static LongStream computeNNZperBlock(long nrow, long ncol, int brlen, int bclen, double sparsity) 
-		throws DMLRuntimeException 
-	{
+	public static LongStream computeNNZperBlock(long nrow, long ncol, int brlen, int bclen, double sparsity) {
 		long lnumBlocks = (long) (Math.ceil((double)nrow/brlen) * Math.ceil((double)ncol/bclen));
 		
 		//sanity check max number of blocks (before cast to avoid overflow)
@@ -135,9 +133,7 @@ public class LibMatrixDatagen
 		}
 	}
 
-    public static RandomMatrixGenerator createRandomMatrixGenerator(String pdfStr, int r, int c, int rpb, int cpb, double sp, double min, double max, String distParams)
-    	throws DMLRuntimeException
-    {
+    public static RandomMatrixGenerator createRandomMatrixGenerator(String pdfStr, int r, int c, int rpb, int cpb, double sp, double min, double max, String distParams) {
 		RandomMatrixGenerator.PDF pdf = RandomMatrixGenerator.PDF.valueOf(pdfStr.toUpperCase());
 		RandomMatrixGenerator rgen = null;
     	switch (pdf) {
@@ -181,12 +177,8 @@ public class LibMatrixDatagen
      * @param rgen random matrix generator
      * @param bigrand Well1024a pseudo-random number generator
      * @param bSeed seed for random generator
-     * @throws DMLRuntimeException if DMLRuntimeException occurs
      */
-	public static void generateRandomMatrix( MatrixBlock out, RandomMatrixGenerator rgen,
-							Well1024a bigrand, long bSeed ) 
-		throws DMLRuntimeException
-	{
+	public static void generateRandomMatrix( MatrixBlock out, RandomMatrixGenerator rgen, Well1024a bigrand, long bSeed ) {
 		boolean invokedFromCP = (bigrand != null);
 		int rows = rgen._rows;
 		int cols = rgen._cols;
@@ -259,11 +251,8 @@ public class LibMatrixDatagen
      * @param bigrand Well1024a pseudo-random number generator
      * @param bSeed seed for random generator
      * @param k ?
-     * @throws DMLRuntimeException if DMLRuntimeException occurs
-	 */
-	public static void generateRandomMatrix( MatrixBlock out, RandomMatrixGenerator rgen, Well1024a bigrand, long bSeed, int k ) 
-		throws DMLRuntimeException
-	{	
+     */
+	public static void generateRandomMatrix( MatrixBlock out, RandomMatrixGenerator rgen, Well1024a bigrand, long bSeed, int k ) {
 		int rows = rgen._rows;
 		int cols = rgen._cols;
 		int rpb = rgen._rowsPerBlock;
@@ -362,11 +351,8 @@ public class LibMatrixDatagen
 	 * @param from lower end point
 	 * @param to upper end point
 	 * @param incr increment value
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void generateSequence(MatrixBlock out, double from, double to, double incr) 
-		throws DMLRuntimeException 
-	{
+	public static void generateSequence(MatrixBlock out, double from, double to, double incr) {
 		//check valid increment value
 		if( (from > to && incr > 0) || incr == 0 )
 			throw new DMLRuntimeException("Wrong sequence increment: from="+from+", to="+to+ ", incr="+incr);
@@ -397,11 +383,8 @@ public class LibMatrixDatagen
 	 * @param size sample size
 	 * @param replace if true, sample with replacement
 	 * @param seed seed for random generator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void generateSample(MatrixBlock out, long range, int size, boolean replace, long seed)
-		throws DMLRuntimeException 
-	{
+	public static void generateSample(MatrixBlock out, long range, int size, boolean replace, long seed) {
 		//set meta data and allocate dense block
 		out.reset(size, 1, false);
 		out.allocateDenseBlock();
@@ -462,9 +445,7 @@ public class LibMatrixDatagen
 		return lseeds;
 	}
 
-	private static void genRandomNumbers(boolean invokedFromCP, int rl, int ru, int cl, int cu, MatrixBlock out, RandomMatrixGenerator rgen, long bSeed, long[] seeds) 
-		throws DMLRuntimeException 
-	{
+	private static void genRandomNumbers(boolean invokedFromCP, int rl, int ru, int cl, int cu, MatrixBlock out, RandomMatrixGenerator rgen, long bSeed, long[] seeds) {
 		int rows = rgen._rows;
 		int cols = rgen._cols;
 		int rpb = rgen._rowsPerBlock;
@@ -589,9 +570,7 @@ public class LibMatrixDatagen
 		} // rbi
 	}
 
-	private static void checkMatrixDimensionsAndSparsity(int rows, int cols, double sp) 
-		throws DMLRuntimeException
-	{
+	private static void checkMatrixDimensionsAndSparsity(int rows, int cols, double sp) {
 		if( rows < 0 || cols < 0 || sp < 0 || sp > 1)
 			throw new DMLRuntimeException("Invalid matrix characteristics: "+rows+"x"+cols+", "+sp);
 	}
@@ -619,9 +598,7 @@ public class LibMatrixDatagen
 		private long _bSeed = 0;
 		private long[] _seeds = null;
 		
-		public RandTask(int rl, int ru, int cl, int cu, MatrixBlock out, RandomMatrixGenerator rgen, long bSeed, long[] seeds) 
-			throws DMLRuntimeException 
-		{
+		public RandTask(int rl, int ru, int cl, int cu, MatrixBlock out, RandomMatrixGenerator rgen, long bSeed, long[] seeds) {
 			_rl = rl;
 			_ru = ru;
 			_cl = cl;
@@ -633,10 +610,9 @@ public class LibMatrixDatagen
 		}
 
 		@Override
-		public Long call() throws Exception {
+		public Long call() {
 			//execute rand operations (with block indexes)
 			genRandomNumbers(true, _rl, _ru, _cl, _cu, _out, _rgen, _bSeed, _seeds);
-			
 			//thread-local maintenance of non-zero values
 			int rpb =_rgen._rowsPerBlock, cpb = _rgen._colsPerBlock;
 			return _out.recomputeNonZeros(_rl*rpb, Math.min(_ru*rpb,_rgen._rows)-1,

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 214c8eb..e7290a8 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
@@ -77,11 +77,8 @@ public class LibMatrixMult
 	 * @param m1 first matrix
 	 * @param m2 second matrix
 	 * @param ret result matrix
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret) 
-		throws DMLRuntimeException
-	{	
+	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret) {
 		matrixMult(m1, m2, ret, 0, m1.rlen);
 	}
 	
@@ -96,19 +93,16 @@ public class LibMatrixMult
 	 * @param m2 second matrix
 	 * @param ret result matrix
 	 * @param fixedRet if true, output representation is fixed and nnzs not recomputed
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, boolean fixedRet) throws DMLRuntimeException {
+	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, boolean fixedRet) {
 		matrixMult(m1, m2, ret, 0, m1.rlen, fixedRet);
 	}
 	
-	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, int rl, int ru) throws DMLRuntimeException {
+	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, int rl, int ru) {
 		matrixMult(m1, m2, ret, rl, ru, false);
 	}
 	
-	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, int rl, int ru, boolean fixedRet) 
-		throws DMLRuntimeException
-	{
+	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, int rl, int ru, boolean fixedRet) {
 		//check inputs / outputs
 		if( m1.isEmptyBlock(false) || m2.isEmptyBlock(false) ) {
 			ret.examSparsity(); //turn empty dense into sparse
@@ -162,11 +156,8 @@ public class LibMatrixMult
 	 * @param m2 second matrix
 	 * @param ret result matrix
 	 * @param k maximum parallelism
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, int k) 
-		throws DMLRuntimeException
-	{
+	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, int k) {
 		//check inputs / outputs
 		if( m1.isEmptyBlock(false) || m2.isEmptyBlock(false) ) {
 			ret.examSparsity(); //turn empty dense into sparse
@@ -246,11 +237,8 @@ public class LibMatrixMult
 	 * @param mW w matrix
 	 * @param ret result matrix
 	 * @param ct chain type
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void matrixMultChain(MatrixBlock mX, MatrixBlock mV, MatrixBlock mW, MatrixBlock ret, ChainType ct) 
-		throws DMLRuntimeException
-	{		
+	public static void matrixMultChain(MatrixBlock mX, MatrixBlock mV, MatrixBlock mW, MatrixBlock ret, ChainType ct) {
 		//check inputs / outputs (after that mV and mW guaranteed to be dense)
 		if( mX.isEmptyBlock(false) || mV.isEmptyBlock(false) || (mW !=null && mW.isEmptyBlock(false)) ) {
 			ret.examSparsity(); //turn empty dense into sparse
@@ -290,11 +278,8 @@ public class LibMatrixMult
 	 * @param ret result matrix
 	 * @param ct chain type
 	 * @param k maximum parallelism
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void matrixMultChain(MatrixBlock mX, MatrixBlock mV, MatrixBlock mW, MatrixBlock ret, ChainType ct, int k) 
-		throws DMLRuntimeException
-	{		
+	public static void matrixMultChain(MatrixBlock mX, MatrixBlock mV, MatrixBlock mW, MatrixBlock ret, ChainType ct, int k) {
 		//check inputs / outputs (after that mV and mW guaranteed to be dense)
 		if( mX.isEmptyBlock(false) || mV.isEmptyBlock(false) || (mW !=null && mW.isEmptyBlock(false)) ) {
 			ret.examSparsity(); //turn empty dense into sparse
@@ -341,9 +326,7 @@ public class LibMatrixMult
 		//		              "("+mV.isInSparseFormat()+","+mV.getNumRows()+","+mV.getNumColumns()+","+mV.getNonZeros()+") in "+time.stop());
 	}
 
-	public static void matrixMultTransposeSelf( MatrixBlock m1, MatrixBlock ret, boolean leftTranspose )
-		throws DMLRuntimeException
-	{
+	public static void matrixMultTransposeSelf( MatrixBlock m1, MatrixBlock ret, boolean leftTranspose ) {
 		//check inputs / outputs
 		if( m1.isEmptyBlock(false) ) {
 			ret.examSparsity(); //turn empty dense into sparse
@@ -370,9 +353,7 @@ public class LibMatrixMult
 		//System.out.println("TSMM ("+m1.isInSparseFormat()+","+m1.getNumRows()+","+m1.getNumColumns()+","+m1.getNonZeros()+","+leftTranspose+") in "+time.stop());
 	}
 
-	public static void matrixMultTransposeSelf( MatrixBlock m1, MatrixBlock ret, boolean leftTranspose, int k )
-		throws DMLRuntimeException
-	{
+	public static void matrixMultTransposeSelf( MatrixBlock m1, MatrixBlock ret, boolean leftTranspose, int k ) {
 		//check inputs / outputs
 		if( m1.isEmptyBlock(false) ) {
 			ret.examSparsity(); //turn empty dense into sparse
@@ -421,9 +402,7 @@ public class LibMatrixMult
 		//System.out.println("TSMM k="+k+" ("+m1.isInSparseFormat()+","+m1.getNumRows()+","+m1.getNumColumns()+","+m1.getNonZeros()+","+leftTranspose+") in "+time.stop());
 	}
 
-	public static void matrixMultPermute( MatrixBlock pm1, MatrixBlock m2, MatrixBlock ret1, MatrixBlock ret2 )
-		throws DMLRuntimeException
-	{
+	public static void matrixMultPermute( MatrixBlock pm1, MatrixBlock m2, MatrixBlock ret1, MatrixBlock ret2 ) {
 		//check inputs / outputs
 		if( pm1.isEmptyBlock(false) || m2.isEmptyBlock(false) )
 			return;
@@ -457,9 +436,7 @@ public class LibMatrixMult
 		//                  "("+m2.isInSparseFormat()+","+m2.getNumRows()+","+m2.getNumColumns()+","+m2.getNonZeros()+") in "+time.stop());
 	}	
 
-	public static void matrixMultPermute( MatrixBlock pm1, MatrixBlock m2, MatrixBlock ret1, MatrixBlock ret2, int k)
-		throws DMLRuntimeException
-	{
+	public static void matrixMultPermute( MatrixBlock pm1, MatrixBlock m2, MatrixBlock ret1, MatrixBlock ret2, int k) {
 		//check inputs / outputs
 		if( pm1.isEmptyBlock(false) || m2.isEmptyBlock(false) )
 			return;
@@ -502,9 +479,7 @@ public class LibMatrixMult
 		//                   "("+m2.isInSparseFormat()+","+m2.getNumRows()+","+m2.getNumColumns()+","+m2.getNonZeros()+") in "+time.stop());
 	}	
 
-	public static void matrixMultWSLoss(MatrixBlock mX, MatrixBlock mU, MatrixBlock mV, MatrixBlock mW, MatrixBlock ret, WeightsType wt) 
-		throws DMLRuntimeException 
-	{
+	public static void matrixMultWSLoss(MatrixBlock mX, MatrixBlock mU, MatrixBlock mV, MatrixBlock mW, MatrixBlock ret, WeightsType wt) {
 		//check for empty result
 		if( wt==WeightsType.POST && mW.isEmptyBlock(false) 
 			|| wt==WeightsType.POST_NZ && mX.isEmptyBlock(false) ) {
@@ -532,9 +507,7 @@ public class LibMatrixMult
 		//                  "("+mV.isInSparseFormat()+","+mV.getNumRows()+","+mV.getNumColumns()+","+mV.getNonZeros()+") in "+time.stop());
 	}
 
-	public static void matrixMultWSLoss(MatrixBlock mX, MatrixBlock mU, MatrixBlock mV, MatrixBlock mW, MatrixBlock ret, WeightsType wt, int k) 
-		throws DMLRuntimeException 
-	{
+	public static void matrixMultWSLoss(MatrixBlock mX, MatrixBlock mU, MatrixBlock mV, MatrixBlock mW, MatrixBlock ret, WeightsType wt, int k) {
 		//check for empty result
 		if( wt==WeightsType.POST && mW.isEmptyBlock(false)
 			|| wt==WeightsType.POST_NZ && mX.isEmptyBlock(false) ) {
@@ -551,8 +524,7 @@ public class LibMatrixMult
 		
 		//Timing time = new Timing(true);
 		
-		try 
-		{			
+		try {
 			ExecutorService pool = CommonThreadPool.get(k);
 			ArrayList<MatrixMultWSLossTask> tasks = new ArrayList<>();
 			int blklen = (int)(Math.ceil((double)mX.rlen/k));
@@ -575,9 +547,7 @@ public class LibMatrixMult
 		//                   "("+mV.isInSparseFormat()+","+mV.getNumRows()+","+mV.getNumColumns()+","+mV.getNonZeros()+") in "+time.stop());
 	}
 
-	public static void matrixMultWSigmoid(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WSigmoidType wt) 
-		throws DMLRuntimeException 
-	{
+	public static void matrixMultWSigmoid(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WSigmoidType wt) {
 		//check for empty result
 		if( mW.isEmptyBlock(false) ) {
 			ret.examSparsity(); //turn empty dense into sparse
@@ -606,9 +576,7 @@ public class LibMatrixMult
 		//                 "("+mV.isInSparseFormat()+","+mV.getNumRows()+","+mV.getNumColumns()+","+mV.getNonZeros()+") in "+time.stop());
 	}
 
-	public static void matrixMultWSigmoid(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WSigmoidType wt, int k) 
-		throws DMLRuntimeException 
-	{
+	public static void matrixMultWSigmoid(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WSigmoidType wt, int k) {
 		//check for empty result
 		if( mW.isEmptyBlock(false) ) {
 			ret.examSparsity(); //turn empty dense into sparse
@@ -666,11 +634,8 @@ public class LibMatrixMult
 	 * @param mX matrix X
 	 * @param ret result type
 	 * @param wt weighted divide matrix multiplication type
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void matrixMultWDivMM(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock mX, MatrixBlock ret, WDivMMType wt) 
-		throws DMLRuntimeException 
-	{
+	public static void matrixMultWDivMM(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock mX, MatrixBlock ret, WDivMMType wt) {
 		//check for empty result 
 		if(   mW.isEmptyBlock(false) 
 		   || (wt.isLeft() && mU.isEmptyBlock(false))
@@ -717,11 +682,8 @@ public class LibMatrixMult
 	 * @param ret result matrix
 	 * @param wt weighted divide matrix multiplication type
 	 * @param k maximum parallelism
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void matrixMultWDivMM(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock mX, MatrixBlock ret, WDivMMType wt, int k) 
-		throws DMLRuntimeException 
-	{
+	public static void matrixMultWDivMM(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock mX, MatrixBlock ret, WDivMMType wt, int k) {
 		//check for empty result 
 		if(   mW.isEmptyBlock(false) 
 		   || (wt.isLeft() && mU.isEmptyBlock(false))
@@ -777,9 +739,7 @@ public class LibMatrixMult
 		//                "("+mV.isInSparseFormat()+","+mV.getNumRows()+","+mV.getNumColumns()+","+mV.getNonZeros()+") in "+time.stop());
 	}	
 
-	public static void matrixMultWCeMM(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, double eps, MatrixBlock ret, WCeMMType wt) 
-		throws DMLRuntimeException 
-	{
+	public static void matrixMultWCeMM(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, double eps, MatrixBlock ret, WCeMMType wt) {
 		//check for empty result 
 		if( mW.isEmptyBlock(false) )  {
 			ret.examSparsity(); //turn empty dense into sparse
@@ -804,9 +764,7 @@ public class LibMatrixMult
 		//                 "("+mV.isInSparseFormat()+","+mV.getNumRows()+","+mV.getNumColumns()+","+mV.getNonZeros()+") in "+time.stop());
 	}
 
-	public static void matrixMultWCeMM(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, double eps, MatrixBlock ret, WCeMMType wt, int k) 
-		throws DMLRuntimeException 
-	{
+	public static void matrixMultWCeMM(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, double eps, MatrixBlock ret, WCeMMType wt, int k) {
 		//check for empty result 
 		if( mW.isEmptyBlock(false) )  {
 			ret.examSparsity(); //turn empty dense into sparse
@@ -839,9 +797,7 @@ public class LibMatrixMult
 		//                 "("+mV.isInSparseFormat()+","+mV.getNumRows()+","+mV.getNumColumns()+","+mV.getNonZeros()+") in "+time.stop());
 	}
 
-	public static void matrixMultWuMM(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WUMMType wt, ValueFunction fn) 
-		throws DMLRuntimeException 
-	{
+	public static void matrixMultWuMM(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WUMMType wt, ValueFunction fn) {
 		//check for empty result
 		if( mW.isEmptyBlock(false) ) {
 			ret.examSparsity(); //turn empty dense into sparse
@@ -870,9 +826,7 @@ public class LibMatrixMult
 		//                 "("+mV.isInSparseFormat()+","+mV.getNumRows()+","+mV.getNumColumns()+","+mV.getNonZeros()+") in "+time.stop());
 	}
 
-	public static void matrixMultWuMM(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WUMMType wt, ValueFunction fn, int k) 
-		throws DMLRuntimeException 
-	{
+	public static void matrixMultWuMM(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WUMMType wt, ValueFunction fn, int k) {
 		//check for empty result
 		if( mW.isEmptyBlock(false) ) {
 			ret.examSparsity(); //turn empty dense into sparse
@@ -921,9 +875,7 @@ public class LibMatrixMult
 	// optimized matrix mult implementation //
 	//////////////////////////////////////////
 
-	private static void matrixMultDenseDense(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, boolean tm2, boolean pm2, int rl, int ru, int cl, int cu) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultDenseDense(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, boolean tm2, boolean pm2, int rl, int ru, int cl, int cu) {
 		DenseBlock a = m1.getDenseBlock();
 		DenseBlock b = m2.getDenseBlock();
 		DenseBlock c = ret.getDenseBlock();
@@ -993,18 +945,14 @@ public class LibMatrixMult
 		}
 	}
 	
-	private static void matrixMultDenseDenseMVShortRHS(DenseBlock a, DenseBlock b, DenseBlock c, int cd, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultDenseDenseMVShortRHS(DenseBlock a, DenseBlock b, DenseBlock c, int cd, int rl, int ru) {
 		double[] bvals = b.valuesAt(0);
 		double[] cvals = c.valuesAt(0);
 		for( int i=rl; i < ru; i++ )
 			cvals[i] = dotProduct(a.values(i), bvals, a.pos(i), 0, cd);
 	}
 	
-	private static void matrixMultDenseDenseMVTallRHS(DenseBlock a, DenseBlock b, DenseBlock c, int cd, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultDenseDenseMVTallRHS(DenseBlock a, DenseBlock b, DenseBlock c, int cd, int rl, int ru) {
 		final int blocksizeI = 32;
 		final int blocksizeK = 2*1024; //16KB vector blocks (L1)
 		double[] bvals = b.valuesAt(0);
@@ -1019,9 +967,7 @@ public class LibMatrixMult
 		}
 	}
 	
-	private static void matrixMultDenseDenseVM(DenseBlock a, DenseBlock b, DenseBlock c, int n, int cd, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultDenseDenseVM(DenseBlock a, DenseBlock b, DenseBlock c, int n, int cd, int rl, int ru) {
 		double[] avals = a.valuesAt(0); //vector
 		double[] cvals = c.valuesAt(0); //vector
 		
@@ -1044,9 +990,7 @@ public class LibMatrixMult
 		}
 	}
 	
-	private static void matrixMultDenseDenseMMShortLHS(DenseBlock a, DenseBlock b, DenseBlock c, int m, int n, int cd, int rl, int ru)
-		throws DMLRuntimeException
-	{
+	private static void matrixMultDenseDenseMMShortLHS(DenseBlock a, DenseBlock b, DenseBlock c, int m, int n, int cd, int rl, int ru) {
 		//cache-conscious parallelization over rows in rhs matrix
 		final int kn = (ru-rl)%4;
 		
@@ -1087,9 +1031,7 @@ public class LibMatrixMult
 		}
 	}
 	
-	private static void matrixMultDenseDenseMMSkinnyRHS(DenseBlock a, DenseBlock b, DenseBlock c, int n2, int cd, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultDenseDenseMMSkinnyRHS(DenseBlock a, DenseBlock b, DenseBlock c, int n2, int cd, int rl, int ru) {
 		//note: prepared rhs input via transpose for: m > n && cd > 64 && n < 64
 		//however, explicit flag required since dimension change m2
 		for( int i=rl; i < ru; i++ ) {
@@ -1100,9 +1042,7 @@ public class LibMatrixMult
 		}
 	}
 	
-	private static void matrixMultDenseDenseMM(DenseBlock a, DenseBlock b, DenseBlock c, int n, int cd, int rl, int ru, int cl, int cu) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultDenseDenseMM(DenseBlock a, DenseBlock b, DenseBlock c, int n, int cd, int rl, int ru, int cl, int cu) {
 		//1) Unrolled inner loop (for better instruction-level parallelism)
 		//2) Blocked execution (for less cache trashing in parallel exec) 	
 		//3) Asymmetric block sizes (for less misses in inner loop, yet blocks in L1/L2)
@@ -1160,9 +1100,7 @@ public class LibMatrixMult
 				}
 	}
 
-	private static void matrixMultDenseSparse(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, boolean pm2, int rl, int ru) 
-		throws DMLRuntimeException 
-	{
+	private static void matrixMultDenseSparse(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, boolean pm2, int rl, int ru) {
 		DenseBlock a = m1.getDenseBlock();
 		DenseBlock c = ret.getDenseBlock();
 		int m = m1.rlen;
@@ -1227,9 +1165,7 @@ public class LibMatrixMult
 		}
 	}
 
-	private static void matrixMultSparseDense(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, boolean pm2, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultSparseDense(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, boolean pm2, int rl, int ru) {
 		SparseBlock a = m1.sparseBlock;
 		DenseBlock b = m2.getDenseBlock();
 		DenseBlock c = ret.getDenseBlock();
@@ -1282,9 +1218,7 @@ public class LibMatrixMult
 		}
 	}
 	
-	private static void matrixMultSparseDenseMVShortRHS(SparseBlock a, DenseBlock b, DenseBlock c, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultSparseDenseMVShortRHS(SparseBlock a, DenseBlock b, DenseBlock c, int rl, int ru) {
 		double[] bvals = b.valuesAt(0);
 		double[] cvals = c.valuesAt(0);
 		for( int i=rl; i<ru; i++ )
@@ -1293,9 +1227,7 @@ public class LibMatrixMult
 					a.indexes(i), a.pos(i), 0, a.size(i));
 	}
 	
-	private static void matrixMultSparseDenseMVTallRHS(SparseBlock a, DenseBlock b, DenseBlock c, int cd, long xsp, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultSparseDenseMVTallRHS(SparseBlock a, DenseBlock b, DenseBlock c, int cd, long xsp, int rl, int ru) {
 		double[] bvals = b.valuesAt(0);
 		double[] cvals = c.valuesAt(0);
 		
@@ -1321,9 +1253,7 @@ public class LibMatrixMult
 		}
 	}
 	
-	private static void matrixMultSparseDenseVM(SparseBlock a, DenseBlock b, DenseBlock c, int n, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultSparseDenseVM(SparseBlock a, DenseBlock b, DenseBlock c, int n, int rl, int ru) {
 		if( a.isEmpty(0) )
 			return;
 		
@@ -1349,9 +1279,7 @@ public class LibMatrixMult
 		}
 	}
 	
-	private static void matrixMultSparseDenseMMShortLHS(SparseBlock a, DenseBlock b, DenseBlock c, int n, int cd, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultSparseDenseMMShortLHS(SparseBlock a, DenseBlock b, DenseBlock c, int n, int cd, int rl, int ru) {
 		int arlen = a.numRows();
 		for( int i=0; i<arlen; i++ ) {
 			if( a.isEmpty(i) ) continue;
@@ -1391,9 +1319,7 @@ public class LibMatrixMult
 		}
 	}
 	
-	private static void matrixMultSparseDenseMMSkinnyRHS(SparseBlock a, DenseBlock b, DenseBlock c, int n, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultSparseDenseMMSkinnyRHS(SparseBlock a, DenseBlock b, DenseBlock c, int n, int rl, int ru) {
 		//no blocking since b and c fit into cache anyway
 		for( int i=rl, cix=rl*n; i<ru; i++, cix+=n ) {
 			if( a.isEmpty(i) ) continue;
@@ -1414,9 +1340,7 @@ public class LibMatrixMult
 		}
 	}
 	
-	private static void matrixMultSparseDenseMM(SparseBlock a, DenseBlock b, DenseBlock c, int n, int cd, long xsp, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultSparseDenseMM(SparseBlock a, DenseBlock b, DenseBlock c, int n, int cd, long xsp, int rl, int ru) {
 		//blocksizes to fit blocks of B (dense) and several rows of A/C in common L2 cache size, 
 		//while blocking A/C for L1/L2 yet allowing long scans (2 pages) in the inner loop over j
 		//in case of almost ultra-sparse matrices, we cannot ensure the blocking for the rhs and
@@ -1464,9 +1388,7 @@ public class LibMatrixMult
 		}
 	}
 
-	private static void matrixMultSparseSparse(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, boolean pm2, int rl, int ru) 
-		throws DMLRuntimeException
-	{	
+	private static void matrixMultSparseSparse(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, boolean pm2, int rl, int ru) {
 		SparseBlock a = m1.sparseBlock;
 		SparseBlock b = m2.sparseBlock;
 		DenseBlock c = ret.getDenseBlock();
@@ -1570,11 +1492,8 @@ public class LibMatrixMult
 	 * @param ret result matrix
 	 * @param rl row lower bound
 	 * @param ru row upper bound
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void matrixMultUltraSparse(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, int rl, int ru) 
-		throws DMLRuntimeException 
-	{
+	private static void matrixMultUltraSparse(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, int rl, int ru) {
 		final boolean leftUS = m1.isUltraSparse()
 			|| (m1.isUltraSparse(false) && !m2.isUltraSparse());
 		final int m  = m1.rlen;
@@ -1754,9 +1673,7 @@ public class LibMatrixMult
 		}
 	}
 
-	private static void matrixMultTransposeSelfDense( MatrixBlock m1, MatrixBlock ret, boolean leftTranspose, int rl, int ru ) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultTransposeSelfDense( MatrixBlock m1, MatrixBlock ret, boolean leftTranspose, int rl, int ru ) {
 		//2) transpose self matrix multiply dense
 		// (compute only upper-triangular matrix due to symmetry)
 		DenseBlock a = m1.getDenseBlock();
@@ -1909,9 +1826,7 @@ public class LibMatrixMult
 		}
 	}
 
-	private static void matrixMultTransposeSelfSparse( MatrixBlock m1, MatrixBlock ret, boolean leftTranspose, int rl, int ru ) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultTransposeSelfSparse( MatrixBlock m1, MatrixBlock ret, boolean leftTranspose, int rl, int ru ) {
 		//2) transpose self matrix multiply sparse
 		// (compute only upper-triangular matrix due to symmetry)
 		SparseBlock a = m1.sparseBlock;
@@ -2026,9 +1941,7 @@ public class LibMatrixMult
 		}
 	}
 
-	private static void matrixMultPermuteDense(MatrixBlock pm1, MatrixBlock m2, MatrixBlock ret1, MatrixBlock ret2, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultPermuteDense(MatrixBlock pm1, MatrixBlock m2, MatrixBlock ret1, MatrixBlock ret2, int rl, int ru) {
 		double[] a = pm1.getDenseBlockValues();
 		DenseBlock b = m2.getDenseBlock();
 		DenseBlock c = ret1.getDenseBlock();
@@ -2461,9 +2374,7 @@ public class LibMatrixMult
 		ret.quickSetValue(0, 0, wsloss);
 	}
 	
-	private static void addMatrixMultWSLossNoWeightCorrection(MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, int k) 
-		throws DMLRuntimeException 
-	{
+	private static void addMatrixMultWSLossNoWeightCorrection(MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, int k) {
 		MatrixBlock tmp1 = new MatrixBlock(mU.clen, mU.clen, false);
 		MatrixBlock tmp2 = new MatrixBlock(mU.clen, mU.clen, false);
 		matrixMultTransposeSelf(mU, tmp1, true, k);
@@ -2473,9 +2384,7 @@ public class LibMatrixMult
 			dotProduct(tmp1.getDenseBlockValues(), tmp2.getDenseBlockValues(), mU.clen*mU.clen)));
 	}
 
-	private static void matrixMultWSigmoidDense(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WSigmoidType wt, int rl, int ru) 
-		throws DMLRuntimeException 
-	{
+	private static void matrixMultWSigmoidDense(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WSigmoidType wt, int rl, int ru) {
 		DenseBlock w = mW.getDenseBlock();
 		DenseBlock c = ret.getDenseBlock();
 		DenseBlock u = mU.getDenseBlock();
@@ -2515,9 +2424,7 @@ public class LibMatrixMult
 		}
 	}
 
-	private static void matrixMultWSigmoidSparseDense(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WSigmoidType wt, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultWSigmoidSparseDense(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WSigmoidType wt, int rl, int ru) {
 		SparseBlock w = mW.sparseBlock;
 		SparseBlock c = ret.sparseBlock;
 		DenseBlock u = mU.getDenseBlock();
@@ -2545,9 +2452,7 @@ public class LibMatrixMult
 		}
 	}
 
-	private static void matrixMultWSigmoidGeneric (MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WSigmoidType wt, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultWSigmoidGeneric (MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WSigmoidType wt, int rl, int ru) {
 		final int n = mW.clen; 
 		final int cd = mU.clen;
 	
@@ -2590,9 +2495,7 @@ public class LibMatrixMult
 		}
 	}
 
-	private static void matrixMultWDivMMDense(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock mX, MatrixBlock ret, WDivMMType wt, int rl, int ru, int cl, int cu) 
-		throws DMLRuntimeException
-	{	
+	private static void matrixMultWDivMMDense(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock mX, MatrixBlock ret, WDivMMType wt, int rl, int ru, int cl, int cu) {
 		final boolean basic = wt.isBasic();
 		final boolean left = wt.isLeft();
 		final boolean mult = wt.isMult();
@@ -2643,9 +2546,7 @@ public class LibMatrixMult
 		}
 	}
 
-	private static void matrixMultWDivMMSparseDense(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock mX, MatrixBlock ret, WDivMMType wt, int rl, int ru, int cl, int cu) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultWDivMMSparseDense(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock mX, MatrixBlock ret, WDivMMType wt, int rl, int ru, int cl, int cu) {
 		final boolean basic = wt.isBasic();
 		final boolean left = wt.isLeft();
 		final boolean mult = wt.isMult();
@@ -2744,9 +2645,7 @@ public class LibMatrixMult
 		}
 	}
 
-	private static void matrixMultWDivMMGeneric(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock mX, MatrixBlock ret, WDivMMType wt, int rl, int ru, int cl, int cu) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultWDivMMGeneric(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock mX, MatrixBlock ret, WDivMMType wt, int rl, int ru, int cl, int cu) {
 		final boolean basic = wt.isBasic();
 		final boolean left = wt.isLeft(); 
 		final boolean mult = wt.isMult();
@@ -2930,9 +2829,7 @@ public class LibMatrixMult
 		ret.quickSetValue(0, 0, wceval);
 	}
 
-	private static void matrixMultWuMMDense(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WUMMType wt, ValueFunction fn, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultWuMMDense(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WUMMType wt, ValueFunction fn, int rl, int ru) {
 		DenseBlock w = mW.getDenseBlock();
 		DenseBlock c = ret.getDenseBlock();
 		DenseBlock u = mU.getDenseBlock();
@@ -2971,9 +2868,7 @@ public class LibMatrixMult
 		}
 	}
 
-	private static void matrixMultWuMMSparseDense(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WUMMType wt, ValueFunction fn, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultWuMMSparseDense(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WUMMType wt, ValueFunction fn, int rl, int ru) {
 		SparseBlock w = mW.sparseBlock;
 		SparseBlock c = ret.sparseBlock;
 		DenseBlock u = mU.getDenseBlock();
@@ -2999,9 +2894,7 @@ public class LibMatrixMult
 		}
 	}
 
-	private static void matrixMultWuMMGeneric (MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WUMMType wt, ValueFunction fn, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void matrixMultWuMMGeneric (MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WUMMType wt, ValueFunction fn, int rl, int ru) {
 		final int n = mW.clen;
 		final int cd = mU.clen;
 		boolean flagmult = (wt==WUMMType.MULT);
@@ -3600,9 +3493,7 @@ public class LibMatrixMult
 			c[cix+k2] += b.quickGetValue(bix, k2) * wtmp;
 	}
 
-	private static double wumm( final double wij, double[] u, double[] v, final int uix, final int vix, final boolean flagmult, ValueFunction fn, final int len ) 
-		throws DMLRuntimeException
-	{
+	private static double wumm( final double wij, double[] u, double[] v, final int uix, final int vix, final boolean flagmult, ValueFunction fn, final int len ) {
 		//compute dot product over ui vj 
 		double uvij = dotProduct(u, v, uix, vix, len);
 		
@@ -3613,9 +3504,7 @@ public class LibMatrixMult
 		return flagmult ? wij * cval : wij / cval;
 	}
 
-	private static double wumm( final double wij, MatrixBlock u, MatrixBlock v, final int uix, final int vix, final boolean flagmult, ValueFunction fn, final int len ) 
-		throws DMLRuntimeException
-	{
+	private static double wumm( final double wij, MatrixBlock u, MatrixBlock v, final int uix, final int vix, final boolean flagmult, ValueFunction fn, final int len ) {
 		//compute dot product over ui vj 
 		double uvij = dotProductGeneric(u, v, uix, vix, len);
 
@@ -3694,9 +3583,7 @@ public class LibMatrixMult
 		return nnz;
 	}
 
-	private static MatrixBlock prepMatrixMultTransposeSelfInput( MatrixBlock m1, boolean leftTranspose ) 
-		throws DMLRuntimeException
-	{
+	private static MatrixBlock prepMatrixMultTransposeSelfInput( MatrixBlock m1, boolean leftTranspose ) {
 		MatrixBlock ret = m1;
 		
 		if( !leftTranspose && m1.sparse && m1.rlen > 1) //X%*%t(X) SPARSE MATRIX
@@ -3750,9 +3637,7 @@ public class LibMatrixMult
 				&& OptimizerUtils.getSparsity(m2.rlen, m2.clen, m2.nonZeros)<1.0);
 	}
 
-	private static MatrixBlock prepMatrixMultRightInput( MatrixBlock m1, MatrixBlock m2 ) 
-		throws DMLRuntimeException
-	{
+	private static MatrixBlock prepMatrixMultRightInput( MatrixBlock m1, MatrixBlock m2 ) {
 		MatrixBlock ret = m2;
 		
 		//transpose if dense-dense, skinny rhs matrix (not vector), and memory guarded by output 
@@ -3884,8 +3769,7 @@ public class LibMatrixMult
 		}
 		
 		@Override
-		public Object call() throws DMLRuntimeException
-		{
+		public Object call() {
 			//setup target index ranges
 			int rl = _pm2c ? 0 : _rl;
 			int ru = _pm2c ? _m1.rlen : _ru;
@@ -3925,9 +3809,7 @@ public class LibMatrixMult
 		private int _rl = -1;
 		private int _ru = -1;
 
-		protected MatrixMultChainTask( MatrixBlock mX, MatrixBlock mV, MatrixBlock mW, ChainType ct, int rl, int ru ) 
-			throws DMLRuntimeException
-		{
+		protected MatrixMultChainTask( MatrixBlock mX, MatrixBlock mV, MatrixBlock mW, ChainType ct, int rl, int ru ) {
 			_m1 = mX;
 			_m2 = mV;
 			_m3 = mW;
@@ -3937,8 +3819,7 @@ public class LibMatrixMult
 		}
 		
 		@Override
-		public double[] call() throws DMLRuntimeException
-		{
+		public double[] call() {
 			//thread-local allocation for partial aggregation
 			MatrixBlock ret = new MatrixBlock(1, _m1.clen, false);
 			ret.allocateDenseBlock();
@@ -3973,7 +3854,7 @@ public class LibMatrixMult
 		}
 		
 		@Override
-		public Object call() throws DMLRuntimeException {
+		public Object call() {
 			if( _m1.sparse )
 				matrixMultTransposeSelfSparse(_m1, _ret, _left, _rl, _ru);
 			else
@@ -4002,8 +3883,7 @@ public class LibMatrixMult
 		}
 		
 		@Override
-		public Object call() throws DMLRuntimeException
-		{
+		public Object call() {
 			if( _m2.sparse )
 				matrixMultPermuteSparse(_pm1, _m2, _ret1, _ret2, _rl, _ru);
 			else if( _ret1.sparse )
@@ -4026,9 +3906,7 @@ public class LibMatrixMult
 		private int _rl = -1;
 		private int _ru = -1;
 
-		protected MatrixMultWSLossTask(MatrixBlock mX, MatrixBlock mU, MatrixBlock mV, MatrixBlock mW, WeightsType wt, int rl, int ru) 
-			throws DMLRuntimeException
-		{
+		protected MatrixMultWSLossTask(MatrixBlock mX, MatrixBlock mU, MatrixBlock mV, MatrixBlock mW, WeightsType wt, int rl, int ru) {
 			_mX = mX;
 			_mU = mU;
 			_mV = mV;
@@ -4043,8 +3921,7 @@ public class LibMatrixMult
 		}
 		
 		@Override
-		public Double call() throws DMLRuntimeException
-		{
+		public Double call() {
 			if( !_mX.sparse && !_mU.sparse && !_mV.sparse && (_mW==null || !_mW.sparse) 
 				&& !_mX.isEmptyBlock() && !_mU.isEmptyBlock() && !_mV.isEmptyBlock() 
 				&& (_mW==null || !_mW.isEmptyBlock()))
@@ -4070,9 +3947,7 @@ public class LibMatrixMult
 		private int _rl = -1;
 		private int _ru = -1;
 		
-		protected MatrixMultWSigmoidTask(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WSigmoidType wt, int rl, int ru) 
-			throws DMLRuntimeException
-		{
+		protected MatrixMultWSigmoidTask(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WSigmoidType wt, int rl, int ru) {
 			_mW = mW;
 			_mU = mU;
 			_mV = mV;
@@ -4083,8 +3958,7 @@ public class LibMatrixMult
 		}
 		
 		@Override
-		public Long call() throws DMLRuntimeException
-		{
+		public Long call() {
 			//core weighted square sum mm computation
 			if( !_mW.sparse && !_mU.sparse && !_mV.sparse && !_mU.isEmptyBlock() && !_mV.isEmptyBlock() )
 				matrixMultWSigmoidDense(_mW, _mU, _mV, _ret, _wt, _rl, _ru);
@@ -4111,9 +3985,7 @@ public class LibMatrixMult
 		private int _cl = -1;
 		private int _cu = -1;
 		
-		protected MatrixMultWDivTask(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock mX, MatrixBlock ret, WDivMMType wt, int rl, int ru, int cl, int cu) 
-			throws DMLRuntimeException
-		{
+		protected MatrixMultWDivTask(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock mX, MatrixBlock ret, WDivMMType wt, int rl, int ru, int cl, int cu) {
 			_mW = mW;
 			_mU = mU;
 			_mV = mV;
@@ -4127,8 +3999,7 @@ public class LibMatrixMult
 		}
 		
 		@Override
-		public Long call() throws DMLRuntimeException
-		{
+		public Long call() {
 			//core weighted div mm computation
 			boolean scalarX = _wt.hasScalar();
 			if( !_mW.sparse && !_mU.sparse && !_mV.sparse && (_mX==null || !_mX.sparse || scalarX) && !_mU.isEmptyBlock() && !_mV.isEmptyBlock() )
@@ -4156,9 +4027,7 @@ public class LibMatrixMult
 		private int _rl = -1;
 		private int _ru = -1;
 
-		protected MatrixMultWCeTask(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, double eps, WCeMMType wt, int rl, int ru) 
-			throws DMLRuntimeException
-		{
+		protected MatrixMultWCeTask(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, double eps, WCeMMType wt, int rl, int ru) {
 			_mW = mW;
 			_mU = mU;
 			_mV = mV;
@@ -4173,8 +4042,7 @@ public class LibMatrixMult
 		}
 		
 		@Override
-		public Double call() throws DMLRuntimeException
-		{
+		public Double call() {
 			//core weighted cross entropy mm computation
 			if( !_mW.sparse && !_mU.sparse && !_mV.sparse && !_mU.isEmptyBlock() && !_mV.isEmptyBlock() )
 				matrixMultWCeMMDense(_mW, _mU, _mV, _eps, _ret, _wt, _rl, _ru);
@@ -4199,9 +4067,7 @@ public class LibMatrixMult
 		private int _rl = -1;
 		private int _ru = -1;
 		
-		protected MatrixMultWuTask(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WUMMType wt, ValueFunction fn, int rl, int ru) 
-			throws DMLRuntimeException
-		{
+		protected MatrixMultWuTask(MatrixBlock mW, MatrixBlock mU, MatrixBlock mV, MatrixBlock ret, WUMMType wt, ValueFunction fn, int rl, int ru) {
 			_mW = mW;
 			_mU = mU;
 			_mV = mV;
@@ -4213,8 +4079,7 @@ public class LibMatrixMult
 		}
 		
 		@Override
-		public Long call() throws DMLRuntimeException
-		{
+		public Long call() {
 			//core weighted square sum mm computation
 			if( !_mW.sparse && !_mU.sparse && !_mV.sparse && !_mU.isEmptyBlock() && !_mV.isEmptyBlock() )
 				matrixMultWuMMDense(_mW, _mU, _mV, _ret, _wt, _fn, _rl, _ru);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixNative.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixNative.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixNative.java
index 4eb284e..c0922da 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixNative.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixNative.java
@@ -30,7 +30,6 @@ import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.conf.DMLConfig;
 import org.apache.sysml.hops.OptimizerUtils;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.utils.NativeHelper;
 import org.apache.sysml.utils.Statistics;
 
@@ -61,13 +60,12 @@ public class LibMatrixNative
 	 * @param m2 rhs matrix block
 	 * @param ret output matrix block
 	 * @param k number of threads
-	 * @throws DMLRuntimeException if error occurs
 	 */
-	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, int k) throws DMLRuntimeException {
+	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, int k) {
 		matrixMult(m1, m2, ret, k, true);
 	}
 	
-	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, int k, boolean examSparsity) throws DMLRuntimeException {
+	public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, int k, boolean examSparsity) {
 		// Sanity check:
 		k = k <= 0 ? NativeHelper.getMaxNumThreads() : k;
 		
@@ -125,9 +123,8 @@ public class LibMatrixNative
 	 * @param filter filter
 	 * @param outputBlock output of convolution
 	 * @param params convolution parameters
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void conv2d(MatrixBlock input, MatrixBlock filter, MatrixBlock outputBlock, ConvolutionParameters params) throws DMLRuntimeException {
+	public static void conv2d(MatrixBlock input, MatrixBlock filter, MatrixBlock outputBlock, ConvolutionParameters params) {
 		LibMatrixDNN.checkInputsConv2d(input, filter, outputBlock, params);
 		params.numThreads = params.numThreads <= 0 ? NativeHelper.getMaxNumThreads() : params.numThreads;
 		if(NativeHelper.isNativeLibraryLoaded() && !input.isInSparseFormat() && !filter.isInSparseFormat()) {
@@ -202,9 +199,8 @@ public class LibMatrixNative
 	 * @param dout errors from next layer
 	 * @param outputBlock  output errors
 	 * @param params convolution parameters
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void conv2dBackwardFilter(MatrixBlock input, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params) throws DMLRuntimeException {
+	public static void conv2dBackwardFilter(MatrixBlock input, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params) {
 		LibMatrixDNN.checkInputsConv2dBackwardFilter(input, dout, outputBlock, params);
 		params.numThreads = params.numThreads <= 0 ? NativeHelper.getMaxNumThreads() : params.numThreads;
 		if(NativeHelper.isNativeLibraryLoaded() && !dout.isInSparseFormat() && !input.isInSparseFormat()) {
@@ -239,9 +235,8 @@ public class LibMatrixNative
 	 * @param dout errors from next layer
 	 * @param outputBlock  output errors
 	 * @param params convolution parameters
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void conv2dBackwardData(MatrixBlock filter, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params) throws DMLRuntimeException {
+	public static void conv2dBackwardData(MatrixBlock filter, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params) {
 		LibMatrixDNN.checkInputsConv2dBackwardData(filter, dout, outputBlock, params);
 		params.numThreads = params.numThreads <= 0 ? NativeHelper.getMaxNumThreads() : params.numThreads;
 		if(NativeHelper.isNativeLibraryLoaded() && !dout.isInSparseFormat() && !filter.isInSparseFormat()) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 2c9f476..33a14b8 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
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.matrix.data;
 
 import java.util.Arrays;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.functionobjects.Builtin;
 import org.apache.sysml.runtime.functionobjects.Equals;
 import org.apache.sysml.runtime.functionobjects.GreaterThan;
@@ -113,9 +112,7 @@ public class LibMatrixOuterAgg
 			
 	}
 
-	public static int[] prepareRowIndices(int iCols, double vmb[], BinaryOperator bOp, AggregateUnaryOperator uaggOp) 
-		throws DMLRuntimeException
-	{
+	public static int[] prepareRowIndices(int iCols, double vmb[], BinaryOperator bOp, AggregateUnaryOperator uaggOp) {
 		return (isRowIndexMax(uaggOp)?prepareRowIndicesMax(iCols, vmb, bOp):prepareRowIndicesMin(iCols, vmb, bOp));
 	}
 	
@@ -145,9 +142,8 @@ public class LibMatrixOuterAgg
 	 * @param vmb ?
 	 * @param bOp binary operator
 	 * @return array of maximum row indices
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static int[] prepareRowIndicesMax(int iCols, double vmb[], BinaryOperator bOp) throws DMLRuntimeException
+	public static int[] prepareRowIndicesMax(int iCols, double vmb[], BinaryOperator bOp)
 	{
 		int[] vixCumSum = null;
 		int[] vix = new int[iCols];
@@ -225,9 +221,8 @@ public class LibMatrixOuterAgg
 	 * @param vmb ?
 	 * @param bOp binary operator
 	 * @return array of minimum row indices
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static int[] prepareRowIndicesMin(int iCols, double vmb[], BinaryOperator bOp) throws DMLRuntimeException
+	public static int[] prepareRowIndicesMin(int iCols, double vmb[], BinaryOperator bOp)
 	{
 		int[] vixCumSum = null;
 		int[] vix = new int[iCols];
@@ -302,9 +297,7 @@ public class LibMatrixOuterAgg
 		}
 	}
 
-	public static void aggregateMatrix(MatrixBlock in1Val, MatrixBlock outVal, double[] bv, int[] bvi, BinaryOperator bOp, AggregateUnaryOperator uaggOp) 
-			throws DMLRuntimeException
-	{		
+	public static void aggregateMatrix(MatrixBlock in1Val, MatrixBlock outVal, double[] bv, int[] bvi, BinaryOperator bOp, AggregateUnaryOperator uaggOp) {
 		// compute unary aggregate outer chain
 		if(isRowIndexMax(uaggOp)) 
 		{
@@ -370,14 +363,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRowSumLtGe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRowSumLtGe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) {
 		int agg0 = sumRowSumLtGeColSumGtLe(0.0, bv, bOp);
 		int m = in.rlen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(i, 0);
 			int cnt = (ai == 0) ? agg0: sumRowSumLtGeColSumGtLe(ai, bv, bOp);
@@ -392,14 +381,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRowSumGtLe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static void uaRowSumGtLe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) {
 		int agg0 = sumRowSumGtLeColSumLtGe(0.0, bv, bOp);
 		int m = in.rlen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(i, 0);
 			int cnt = (ai == 0) ? agg0: sumRowSumGtLeColSumLtGe(ai, bv, bOp);
@@ -415,14 +400,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRowSumEqNe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRowSumEqNe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) {
 		int agg0 = sumEqNe(0.0, bv, bOp);
 		int m = in.rlen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(i, 0);
 			int cnt = (ai == 0) ? agg0: sumEqNe(ai, bv, bOp);
@@ -437,11 +418,8 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaColSumLtGe(MatrixBlock in1Val, MatrixBlock outVal, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaColSumLtGe(MatrixBlock in1Val, MatrixBlock outVal, double[] bv, BinaryOperator bOp) {
 		if (in1Val.isInSparseFormat())
 			s_uaColSumLtGe(in1Val, outVal, bv, bOp);
 		else
@@ -455,11 +433,8 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaColSumGtLe(MatrixBlock in1Val, MatrixBlock outVal, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static void uaColSumGtLe(MatrixBlock in1Val, MatrixBlock outVal, double[] bv, BinaryOperator bOp) {
 		if (in1Val.isInSparseFormat())
 			s_uaColSumGtLe(in1Val, outVal, bv, bOp);
 		else
@@ -474,11 +449,8 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaColSumEqNe(MatrixBlock in1Val, MatrixBlock outVal, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaColSumEqNe(MatrixBlock in1Val, MatrixBlock outVal, double[] bv, BinaryOperator bOp) {
 		if (in1Val.isInSparseFormat())
 			s_uaColSumEqNe(in1Val, outVal, bv, bOp);
 		else
@@ -493,14 +465,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaSumLtGe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaSumLtGe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) {
 		int agg0 = sumRowSumLtGeColSumGtLe(0.0, bv, bOp);
 		int m = in.rlen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(i, 0);
 			int cnt = (ai == 0) ? agg0: sumRowSumLtGeColSumGtLe(ai, bv, bOp);
@@ -516,11 +484,8 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaSumGtLe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaSumGtLe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) {
 		int agg0 = sumRowSumGtLeColSumLtGe(0.0, bv, bOp);
 		int m = in.rlen;
 		
@@ -540,14 +505,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaSumEqNe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaSumEqNe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) {
 		int agg0 = sumEqNe(0.0, bv, bOp);
 		int m = in.rlen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(i, 0);
 			int cnt = (ai == 0) ? agg0: sumEqNe(ai, bv, bOp);
@@ -564,14 +525,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRIMLt(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRIMLt(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ind0 = uarimaxLt(0.0, bv, bvi, bOp);
 		int m = in.rlen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(i, 0);
 			int ind = (ai == 0) ? ind0: uarimaxLt(ai, bv, bvi, bOp);
@@ -586,11 +543,8 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRIMLe(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRIMLe(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ind0 = uarimaxLe(0.0, bv, bvi, bOp);
 		int m = in.rlen;
 		
@@ -608,11 +562,8 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRIMGt(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRIMGt(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ind0 = uarimaxGt(0.0, bv, bvi, bOp);
 		int m = in.rlen;
 		
@@ -631,14 +582,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRIMGe(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRIMGe(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ind0 = uarimaxGe(0.0, bv, bvi, bOp);
 		int m = in.rlen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(i, 0);
 			int ind = (ai == 0) ? ind0: uarimaxGe(ai, bv, bvi, bOp);
@@ -654,14 +601,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRIMEq(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRIMEq(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ind0 = uarimaxEq(0.0, bv, bvi, bOp);
 		int m = in.rlen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(i, 0);
 			int ind = (ai == 0) ? ind0: uarimaxEq(ai, bv, bvi, bOp);
@@ -678,11 +621,8 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRIMNe(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRIMNe(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ind0 = uarimaxNe(0.0, bv, bvi, bOp);
 		int m = in.rlen;
 		
@@ -701,14 +641,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRIMinLt(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRIMinLt(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ind0 = uariminLt(0.0, bv, bvi, bOp);
 		int m = in.rlen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(i, 0);
 			int ind = (ai == 0) ? ind0: uariminLt(ai, bv, bvi, bOp);
@@ -723,14 +659,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRIMinLe(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRIMinLe(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ind0 = uariminLe(0.0, bv, bvi, bOp);
 		int m = in.rlen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(i, 0);
 			int ind = (ai == 0) ? ind0: uariminLe(ai, bv, bvi, bOp);
@@ -745,14 +677,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRIMinGt(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRIMinGt(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ind0 = uariminGt(0.0, bv, bvi, bOp);
 		int m = in.rlen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(i, 0);
 			int ind = (ai == 0) ? ind0: uariminGt(ai, bv, bvi, bOp);
@@ -768,11 +696,8 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRIMinGe(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRIMinGe(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ind0 = uariminGe(0.0, bv, bvi, bOp);
 		int m = in.rlen;
 		
@@ -791,14 +716,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRIMinEq(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRIMinEq(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ind0 = uariminEq(0.0, bv, bvi, bOp);
 		int m = in.rlen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(i, 0);
 			int ind = (ai == 0) ? ind0: uariminEq(ai, bv, bvi, bOp);
@@ -815,14 +736,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void uaRIMinNe(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void uaRIMinNe(MatrixBlock in, MatrixBlock out, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ind0 = uariminNe(0.0, bv, bvi, bOp);
 		int m = in.rlen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(i, 0);
 			int ind = (ai == 0) ? ind0: uariminNe(ai, bv, bvi, bOp);
@@ -838,15 +755,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void d_uaColSumLtGe(MatrixBlock in, MatrixBlock out, double[] bv, 
-			BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static void d_uaColSumLtGe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) {
 		int agg0 = sumRowSumGtLeColSumLtGe(0.0, bv, bOp);
 		int m = in.clen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(0, i);
 			int cnt = (ai == 0) ? agg0: sumRowSumGtLeColSumLtGe(ai, bv, bOp);
@@ -861,11 +773,8 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void s_uaColSumLtGe(MatrixBlock in, MatrixBlock out, double[] bv,	BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static void s_uaColSumLtGe(MatrixBlock in, MatrixBlock out, double[] bv,	BinaryOperator bOp) {
 		int agg0 = sumRowSumGtLeColSumLtGe(0.0, bv, bOp);
 
 		//allocate and initialize output values (not indices) 
@@ -899,14 +808,10 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void d_uaColSumGtLe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static void d_uaColSumGtLe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) {
 		int agg0 = sumRowSumLtGeColSumGtLe(0.0, bv, bOp);
 		int m = in.clen;
-		
 		for( int i=0; i<m; i++ ) {
 			double ai = in.quickGetValue(0, i);
 			int cnt = (ai == 0) ? agg0: sumRowSumLtGeColSumGtLe(ai, bv, bOp);
@@ -921,11 +826,8 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void s_uaColSumGtLe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static void s_uaColSumGtLe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) {
 		int agg0 = sumRowSumLtGeColSumGtLe(0.0, bv, bOp);
 		
 		//allocate and initialize output values (not indices) 
@@ -959,11 +861,8 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void d_uaColSumEqNe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void d_uaColSumEqNe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) {
 		int agg0 = sumEqNe(0.0, bv, bOp);
 		int m = in.clen;
 		
@@ -981,11 +880,8 @@ public class LibMatrixOuterAgg
 	 * @param out output matrix block
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void s_uaColSumEqNe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{		
+	private static void s_uaColSumEqNe(MatrixBlock in, MatrixBlock out, double[] bv, BinaryOperator bOp) {
 		int agg0 = sumEqNe(0.0, bv, bOp);
 
 		//allocate and initialize output values (not indices) 
@@ -1020,14 +916,10 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int sumRowSumGtLeColSumLtGe(double value, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int sumRowSumGtLeColSumLtGe(double value, double[] bv, BinaryOperator bOp) {
 		int ix = Arrays.binarySearch(bv, value);
 		int cnt = 0;
-		
 		if( ix >= 0 ){ //match, scan to next val
 			while( ix > 0 && value==bv[ix-1]) --ix;
 			ix++;	//Readjust index to match subsenquent index calculation.
@@ -1050,11 +942,8 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int sumRowSumLtGeColSumGtLe(double value, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int sumRowSumLtGeColSumGtLe(double value, double[] bv, BinaryOperator bOp) {
 		int ix = Arrays.binarySearch(bv, value);
 		int cnt = 0;
 		
@@ -1078,11 +967,8 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int sumEqNe(double value, double[] bv, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int sumEqNe(double value, double[] bv, BinaryOperator bOp) {
 		int ix = Arrays.binarySearch(bv, value);
 		int cnt = 0;
 		
@@ -1105,11 +991,8 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int uarimaxEq(double value, double[] bv, int bvi[], BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int uarimaxEq(double value, double[] bv, int bvi[], BinaryOperator bOp) {
 		int ix = Arrays.binarySearch(bv, value);
 		int ixMax = bv.length;
 		
@@ -1125,13 +1008,9 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int uarimaxNe(double value, double[] bv, int bvi[], BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int uarimaxNe(double value, double[] bv, int bvi[], BinaryOperator bOp) {
 		int ixMax = bv.length;
-		
 		if( bv[bv.length-1] == value ) 
 			ixMax = bvi[0]+1;
 		return ixMax;
@@ -1144,11 +1023,8 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int uarimaxGt(double value, double[] bv, int bvi[], BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int uarimaxGt(double value, double[] bv, int bvi[], BinaryOperator bOp) {
 		int ixMax = bv.length;
 		
 		if(value <= bv[0] || value > bv[bv.length-1]) 
@@ -1168,21 +1044,15 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int uarimaxGe(double value, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int uarimaxGe(double value, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ixMax = bv.length;
-		
 		if(value < bv[0] || value >= bv[bv.length-1]) 
 			return ixMax;
-		
 		int ix = Arrays.binarySearch(bv, value);
 		if(ix < 0)
 			ix = Math.abs(ix)-2;
 		ixMax = bvi[ix]+1; 
-		
 		return ixMax;
 	}
 
@@ -1193,21 +1063,15 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int uarimaxLt(double value, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int uarimaxLt(double value, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ixMax = bv.length;
-		
 		if(value < bv[0] || value >= bv[bv.length-1]) 
 			return ixMax;
-		
 		int ix = Arrays.binarySearch(bv, value);
 		if (ix < 0) 
 			ix = Math.abs(ix)-2;
 		ixMax = bvi[ix]+1; 
-		
 		return ixMax;
 	}
 
@@ -1217,21 +1081,15 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int uarimaxLe(double value, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int uarimaxLe(double value, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ixMax = bv.length;
-		
 		if(value <= bv[0] || value > bv[bv.length-1]) 
 			return ixMax;
-		
 		int ix = Arrays.binarySearch(bv, value);
 		if(ix < 0)
 			ix = Math.abs(ix)-1;
 		ixMax = bvi[ix]+1; 
-		
 		return ixMax;
 	}
 	
@@ -1242,13 +1100,9 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int uariminEq(double value, double[] bv, int bvi[], BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int uariminEq(double value, double[] bv, int bvi[], BinaryOperator bOp) {
 		int ixMin = 1;
-		
 		if(value == bv[0])
 			ixMin = bvi[0]+1;
 		return ixMin;
@@ -1261,13 +1115,9 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int uariminNe(double value, double[] bv, int bvi[], BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int uariminNe(double value, double[] bv, int bvi[], BinaryOperator bOp) {
 		int ixMin = 1;
-		
 		if( bv[0] != value ) 
 			ixMin = bvi[0]+1;
 		return ixMin;
@@ -1280,20 +1130,14 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int uariminGt(double value, double[] bv, int bvi[], BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int uariminGt(double value, double[] bv, int bvi[], BinaryOperator bOp) {
 		int ixMin = 1;
-		
 		if(value <= bv[0] || value > bv[bv.length-1]) 
 			return ixMin;
-		
 		int ix = Arrays.binarySearch(bv, value);
 		ix = Math.abs(ix)-1;
 		ixMin = bvi[ix]+1; 
-		
 		return ixMin;
 	}
 
@@ -1304,21 +1148,15 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int uariminGe(double value, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int uariminGe(double value, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ixMin = 1;
-		
 		if(value <= bv[0] || value > bv[bv.length-1]) 
 			return ixMin;
-		
 		int ix = Arrays.binarySearch(bv, value);
 		if(ix < 0)
 			ix = Math.abs(ix)-1;
 		ixMin = bvi[ix-1]+1; 
-		
 		return ixMin;
 	}
 
@@ -1329,21 +1167,15 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int uariminLt(double value, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int uariminLt(double value, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ixMin = 1;
-		
 		if(value < bv[0] || value >= bv[bv.length-1]) 
 			return ixMin;
-		
 		int ix = Arrays.binarySearch(bv, value);
 		if (ix < 0) 
 			ix = Math.abs(ix)-2;
 		ixMin = bvi[ix]+1; 
-		
 		return ixMin;
 	}
 
@@ -1353,21 +1185,15 @@ public class LibMatrixOuterAgg
 	 * @param value ?
 	 * @param bv ?
 	 * @param bOp binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static int uariminLe(double value, double[] bv, int[] bvi, BinaryOperator bOp) 
-			throws DMLRuntimeException
-	{
+	private static int uariminLe(double value, double[] bv, int[] bvi, BinaryOperator bOp) {
 		int ixMin = 1;
-		
 		if(value < bv[0] || value > bv[bv.length-1]) 
 			return ixMin;
-		
 		int ix = Arrays.binarySearch(bv, value);
 		if (ix < 0) 
 			ix = Math.abs(ix)-1;
 		ixMin = bvi[ix]+1; 
-		
 		return ixMin;
 	}
 	


[08/12] systemml git commit: [SYSTEMML-2191] Cleanup exception hierarchy and handling, part 3

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 ea39010..e3e4126 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
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 import java.util.ArrayList;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
@@ -43,19 +42,15 @@ public class AppendGInstruction extends AppendInstruction {
 		_len = _offset + _offset2;
 	}
 
-	public static AppendGInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static AppendGInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionParts ( str );
 		InstructionUtils.checkNumFields (parts, 6);
-			
 		byte in1 = Byte.parseByte(parts[1]);
 		byte in2 = Byte.parseByte(parts[2]);
 		long offset = (long)(Double.parseDouble(parts[3]));
 		long len = (long)(Double.parseDouble(parts[4]));
 		byte out = Byte.parseByte(parts[5]);
 		boolean cbind = Boolean.parseBoolean(parts[6]);
-			
 		return new AppendGInstruction(null, in1, in2, offset, len, out, cbind, str);
 	}
 	
@@ -63,7 +58,6 @@ public class AppendGInstruction extends AppendInstruction {
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int brlen, int bclen)
-			throws DMLRuntimeException 
 	{
 		//setup basic meta data
 		int blen = _cbind ? bclen : brlen;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 f92d62c..59c6714 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
@@ -40,9 +40,7 @@ public class AppendInstruction extends BinaryMRInstructionBase {
 		return _cbind;
 	}
 
-	public static AppendInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static AppendInstruction parseInstruction ( String str ) {
 		String opcode = InstructionUtils.getOpCode(str);
 		if( opcode.equals("mappend") )
 			return AppendMInstruction.parseInstruction(str);
@@ -57,9 +55,7 @@ public class AppendInstruction extends BinaryMRInstructionBase {
 	
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
-			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int brlen, int bclen)
-			throws DMLRuntimeException 
-	{
+			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int brlen, int bclen) {
 		throw new DMLRuntimeException("Operations on base append instruction not supported.");
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 0294121..a14acb2 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
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.lops.AppendM.CacheType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -42,19 +41,15 @@ public class AppendMInstruction extends AppendInstruction implements IDistribute
 		_offset = offset;
 	}
 
-	public static AppendMInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static AppendMInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionParts ( str );
 		InstructionUtils.checkNumFields(parts, 6);
-		
 		byte in1 = Byte.parseByte(parts[1]);
 		byte in2 = Byte.parseByte(parts[2]);
 		long offset = (long)(Double.parseDouble(parts[3]));
 		byte out = Byte.parseByte(parts[4]);
 		CacheType type = CacheType.valueOf(parts[5]);
 		boolean cbind = Boolean.parseBoolean(parts[6]);
-		
 		return new AppendMInstruction(null, in1, in2, offset, type, out, cbind, str);
 	}
 	
@@ -72,8 +67,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 DMLRuntimeException 
-	{	
+	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input1);
 		if( blkList == null ) 
 			return;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 32e61e2..6adef18 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
@@ -32,25 +32,20 @@ public class AppendRInstruction extends AppendInstruction {
 		super(op, in1, in2, out, cbind, istr);
 	}
 
-	public static AppendRInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static AppendRInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionParts ( str );
 		InstructionUtils.checkNumFields(parts, 4);
-		
 		byte in1 = Byte.parseByte(parts[1]);
 		byte in2 = Byte.parseByte(parts[2]);
 		byte out = Byte.parseByte(parts[3]);
 		boolean cbind = Boolean.parseBoolean(parts[4]);
-		
 		return new AppendRInstruction(null, in1, in2, out, cbind, str);
 	}
 	
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int brlen, int bclen)
-			throws DMLRuntimeException 
-	{		
+	{
 		//get both inputs
 		IndexedMatrixValue left = cachedValues.getFirst(input1);
 		IndexedMatrixValue right = cachedValues.getFirst(input2);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 90c33ff..f55dd88 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
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 import java.util.ArrayList;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
@@ -50,27 +49,21 @@ public class BinUaggChainInstruction extends UnaryInstruction {
 		instString = istr;
 	}
 
-	public static BinUaggChainInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{		
+	public static BinUaggChainInstruction parseInstruction( String str ) {
 		//check number of fields (2/3 inputs, output, type)
 		InstructionUtils.checkNumFields ( str, 4 );
-		
 		//parse instruction parts (without exec type)
-		String[] parts = InstructionUtils.getInstructionParts( str );		
-		
+		String[] parts = InstructionUtils.getInstructionParts( str );
 		BinaryOperator bop = InstructionUtils.parseBinaryOperator(parts[1]);
 		AggregateUnaryOperator uaggop = InstructionUtils.parseBasicAggregateUnaryOperator(parts[2]);
 		byte in1 = Byte.parseByte(parts[3]);
 		byte out = Byte.parseByte(parts[4]);
-		
 		return new BinUaggChainInstruction(bop, uaggop, in1, out, str);
 	}
 	
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
-			           IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLRuntimeException 
+		IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
 	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get( input );
 		if( blkList == null )

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 cde7f78..18e57cb 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
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.runtime.instructions.mr;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -36,31 +35,23 @@ public class BinaryInstruction extends BinaryMRInstructionBase {
 		instString = istr;
 	}
 
-	public static BinaryInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{	
+	public static BinaryInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 3 );
-		
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		byte in1, in2, out;
 		String opcode = parts[0];
 		in1 = Byte.parseByte(parts[1]);
 		in2 = Byte.parseByte(parts[2]);
 		out = Byte.parseByte(parts[3]);
-		
 		BinaryOperator bop = InstructionUtils.parseBinaryOperator(opcode);
-		if( bop != null )
-			return new BinaryInstruction(MRType.Binary, bop, in1, in2, out, str);
-		else
-			return null;
+		return (bop == null) ? null : 
+			new BinaryInstruction(MRType.Binary, bop, in1, in2, out, str);
 	}
 	
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput,
-			int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
+			int blockRowFactor, int blockColFactor) {
 		
 		IndexedMatrixValue in1=cachedValues.getFirst(input1);
 		IndexedMatrixValue in2=cachedValues.getFirst(input2);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 c8ebdfd..428016f 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
@@ -23,7 +23,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.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.data.OperationsOnMatrixValues;
@@ -43,13 +42,9 @@ public class BinaryMInstruction extends BinaryMRInstructionBase implements IDist
 		_vectorType = vtype;
 	}
 
-	public static BinaryMInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{	
+	public static BinaryMInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 5 );
-		
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		byte in1, in2, out;
 		String opcode = parts[0];
 		in1 = Byte.parseByte(parts[1]);
@@ -57,7 +52,6 @@ public class BinaryMInstruction extends BinaryMRInstructionBase implements IDist
 		out = Byte.parseByte(parts[3]);
 		CacheType ctype = CacheType.valueOf(parts[4]);
 		VectorType vtype = VectorType.valueOf(parts[5]);
-		
 		BinaryOperator bop = InstructionUtils.parseExtendedBinaryOperator(opcode);
 		return new BinaryMInstruction(bop, in1, in2, ctype, vtype, out, str);
 	}
@@ -65,15 +59,11 @@ public class BinaryMInstruction extends BinaryMRInstructionBase implements IDist
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput,
-			int blockRowFactor, int blockColFactor)
-		throws DMLRuntimeException 
-	{	
+			int blockRowFactor, int blockColFactor) {
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input1);
 		if( blkList == null ) 
 			return;
-		
-		for(IndexedMatrixValue in1 : blkList)
-		{
+		for(IndexedMatrixValue in1 : blkList) {
 			//allocate space for the output value
 			//try to avoid coping as much as possible
 			IndexedMatrixValue out;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 6c69cc2..7c6f41e 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
@@ -38,9 +38,7 @@ public class CM_N_COVInstruction extends UnaryMRInstructionBase {
 		instString = istr;
 	}
 
-	public static CM_N_COVInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{	
+	public static CM_N_COVInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionParts ( str );
 		
 		byte in, out;
@@ -81,8 +79,7 @@ public class CM_N_COVInstruction extends UnaryMRInstructionBase {
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		
 		throw new DMLRuntimeException("no processInstruction for AggregateInstruction!");
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 050225b..4e84a34 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
@@ -44,13 +44,10 @@ public class CSVWriteInstruction extends UnaryMRInstructionBase {
 		Operator op = null;
 		byte input, output;
 		String[] s=str.split(Instruction.OPERAND_DELIM);
-		
 		String[] in1f = s[2].split(Instruction.DATATYPE_PREFIX);
 		input=Byte.parseByte(in1f[0]);
-		
 		String[] outf = s[3].split(Instruction.DATATYPE_PREFIX);
 		output=Byte.parseByte(outf[0]);
-		
 		String header=s[4];
 		String delim=s[5];
 		boolean sparse=Boolean.parseBoolean(s[6]);
@@ -60,8 +57,7 @@ public class CSVWriteInstruction extends UnaryMRInstructionBase {
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
-		throw new DMLRuntimeException("CSVWriteInstruction.processInstruction should never be called");		
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
+		throw new DMLRuntimeException("CSVWriteInstruction.processInstruction should never be called");
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 2359845..3676f02 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
@@ -38,19 +38,15 @@ public class CombineBinaryInstruction extends BinaryMRInstructionBase {
 		instString = istr;
 	}
 
-	public static CombineBinaryInstruction parseInstruction ( String str ) throws DMLRuntimeException {
-		
+	public static CombineBinaryInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 4 );
-		
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		byte in1, in2, out;
 		String opcode = parts[0];
 		boolean isWeight=Boolean.parseBoolean(parts[1]);
 		in1 = Byte.parseByte(parts[2]);
 		in2 = Byte.parseByte(parts[3]);
 		out = Byte.parseByte(parts[4]);
-		
 		if ( opcode.equalsIgnoreCase("combinebinary") ) {
 			return new CombineBinaryInstruction(null, isWeight, in1, in2, out, str);
 		}else
@@ -65,8 +61,7 @@ public class CombineBinaryInstruction extends BinaryMRInstructionBase {
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		throw new DMLRuntimeException("CombineInstruction.processInstruction should never be called!");
 		
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 7db8616..7f66d31 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
@@ -32,31 +32,25 @@ public class CombineTernaryInstruction extends CtableInstruction {
 		super(MRType.CombineTernary, op, in1, in2, in3, out, -1, -1, istr);
 	}
 
-	public static CombineTernaryInstruction parseInstruction ( String str ) throws DMLRuntimeException {
-		
+	public static CombineTernaryInstruction parseInstruction ( String str ) {
 		// example instruction string - ctabletransform:::0:DOUBLE:::1:DOUBLE:::2:DOUBLE:::3:DOUBLE 
 		InstructionUtils.checkNumFields ( str, 4 );
-		
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		byte in1, in2, in3, out;
 		String opcode = parts[0];
 		in1 = Byte.parseByte(parts[1]);
 		in2 = Byte.parseByte(parts[2]);
 		in3 = Byte.parseByte(parts[3]);
 		out = Byte.parseByte(parts[4]);
-		
-		if ( opcode.equalsIgnoreCase("combineternary") ) {
+		if ( opcode.equalsIgnoreCase("combineternary") )
 			return new CombineTernaryInstruction(null, in1, in2, in3, out, str);
-		} 
 		return null;
 	}
 	
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, 
-			int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
+			int blockRowFactor, int blockColFactor) {
 		throw new DMLRuntimeException("CombineTernaryInstruction.processInstruction should never be called!");
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 d255148..2a3525e 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
@@ -33,17 +33,13 @@ public class CombineUnaryInstruction extends UnaryMRInstructionBase {
 		instString = istr;
 	}
 
-	public static CombineUnaryInstruction parseInstruction ( String str ) throws DMLRuntimeException {
-		
+	public static CombineUnaryInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 2 );
-		
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		byte in, out;
 		String opcode = parts[0];
 		in  = Byte.parseByte(parts[1]);
 		out = Byte.parseByte(parts[2]);
-		
 		if ( opcode.equalsIgnoreCase("combineunary") ) {
 			return new CombineUnaryInstruction(null, in, out, str);
 		}else
@@ -53,10 +49,7 @@ public class CombineUnaryInstruction extends UnaryMRInstructionBase {
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		throw new DMLRuntimeException("CombineInstruction.processInstruction should never be called!");
-		
 	}
-	
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/mr/CtableInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/CtableInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/CtableInstruction.java
index 9bb9973..4a99d59 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/CtableInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/CtableInstruction.java
@@ -103,14 +103,7 @@ public class CtableInstruction extends MRInstruction {
 	}
 
 	public static CtableInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{		
-		// example instruction string 
-		// - ctabletransform:::0:DOUBLE:::1:DOUBLE:::2:DOUBLE:::3:DOUBLE 
-		// - ctabletransformscalarweight:::0:DOUBLE:::1:DOUBLE:::1.0:DOUBLE:::3:DOUBLE 
-		// - ctabletransformhistogram:::0:DOUBLE:::1.0:DOUBLE:::1.0:DOUBLE:::3:DOUBLE 
-		// - ctabletransformweightedhistogram:::0:DOUBLE:::1:INT:::1:DOUBLE:::2:DOUBLE 
-		
+	{
 		//check number of fields
 		InstructionUtils.checkNumFields ( str, 6 );
 		
@@ -160,12 +153,9 @@ public class CtableInstruction 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 DMLRuntimeException 
-	{	
-		
+	{
 		IndexedMatrixValue in1, in2, in3 = null;
 		in1 = cachedValues.getFirst(input1);
-		
 		CTableMap ctableResult = null;
 		MatrixBlock ctableResultBlock = null;
 		
@@ -238,26 +228,24 @@ public class CtableInstruction extends MRInstruction {
 				break;
 			}
 			default:
-				throw new DMLRuntimeException("Unrecognized opcode in Tertiary Instruction: " + instString);		
+				throw new DMLRuntimeException("Unrecognized opcode in Tertiary Instruction: " + instString);
 		}
 	}
 	
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, 
-			int blockRowFactor, int blockColFactor)
-		throws DMLRuntimeException 
-	{
+			int blockRowFactor, int blockColFactor) {
 		throw new DMLRuntimeException("This function should not be called!");
 	}
 
 	@Override
-	public byte[] getAllIndexes() throws DMLRuntimeException {
+	public byte[] getAllIndexes() {
 		return new byte[]{input1, input2, input3, output};
 	}
 
 	@Override
-	public byte[] getInputIndexes() throws DMLRuntimeException {
+	public byte[] getInputIndexes() {
 		return new byte[]{input1, input2, input3};
 	}
 

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 ee85fca..ca5172d 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
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 import java.util.ArrayList;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -45,27 +44,20 @@ public class CumulativeAggregateInstruction extends AggregateUnaryInstruction {
 		_mcIn = mcIn;
 	}
 	
-	public static CumulativeAggregateInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static CumulativeAggregateInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 2 );
-		
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		String opcode = parts[0];
 		byte in = Byte.parseByte(parts[1]);
 		byte out = Byte.parseByte(parts[2]);
-		
 		AggregateUnaryOperator aggun = InstructionUtils.parseCumulativeAggregateUnaryOperator(opcode);
-		
 		return new CumulativeAggregateInstruction(aggun, in, out, str);
 	}
 	
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLRuntimeException 
-	{	
+	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList == null ) 
 			return;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 fadea8d..817ba31 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
@@ -53,26 +53,20 @@ public class CumulativeOffsetInstruction extends BinaryInstruction {
 		}
 	}
 
-	public static CumulativeOffsetInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static CumulativeOffsetInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 3 );
-		
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		String opcode = parts[0];
 		byte in1 = Byte.parseByte(parts[1]);
 		byte in2 = Byte.parseByte(parts[2]);
 		byte out = Byte.parseByte(parts[3]);
-		
 		return new CumulativeOffsetInstruction(in1, in2, out, opcode, str);
 	}
 	
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		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/systemml/blob/1f323976/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 bc21b47..80777bd 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
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 import java.util.ArrayList;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -46,25 +45,19 @@ public class CumulativeSplitInstruction extends UnaryInstruction {
 		_lastRowBlockIndex = (long)Math.ceil((double)_mcIn.getRows()/_mcIn.getRowsPerBlock());
 	}
 	
-	public static CumulativeSplitInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static CumulativeSplitInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 3 );
-		
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		byte in = Byte.parseByte(parts[1]);
 		byte out = Byte.parseByte(parts[2]);
 		double init = Double.parseDouble(parts[3]);
-		
 		return new CumulativeSplitInstruction(in, out, init, str);
 	}
 	
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLRuntimeException 
-	{	
+	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList == null ) 
 			return;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/mr/DataPartitionMRInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/mr/DataPartitionMRInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/mr/DataPartitionMRInstruction.java
index 48e90ec..02d02ac 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/mr/DataPartitionMRInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/mr/DataPartitionMRInstruction.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.runtime.instructions.mr;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.operators.Operator;
 
@@ -33,17 +32,12 @@ public class DataPartitionMRInstruction extends UnaryInstruction {
 		super(MRType.Partition, op, in, out, istr);
 	}
 
-	public static DataPartitionMRInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static DataPartitionMRInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 3 );
-		
 		String[] parts = InstructionUtils.getInstructionParts ( str );
 		byte in, out;
 		in = Byte.parseByte(parts[1]);
 		out = Byte.parseByte(parts[2]);
-		
 		return new DataPartitionMRInstruction(null, in, out, str);
 	}
-
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 2da328b..28ce7cb 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
@@ -63,15 +63,11 @@ public class GroupedAggregateInstruction extends UnaryMRInstructionBase {
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput,
-			int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		throw new DMLRuntimeException("GroupedAggregateInstruction.processInstruction() should not be called!");
-		
 	}
 
-	public static GroupedAggregateInstruction parseInstruction ( String str ) throws DMLRuntimeException {
-		
+	public static GroupedAggregateInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionParts ( str );
 		if(parts.length<3)
 			throw new DMLRuntimeException("the number of fields of instruction "+str+" is less than 2!");
@@ -81,16 +77,13 @@ public class GroupedAggregateInstruction extends UnaryMRInstructionBase {
 		out = Byte.parseByte(parts[parts.length - 3]);
 		boolean weights = Boolean.parseBoolean(parts[parts.length-2]);
 		int ngroups = Integer.parseInt(parts[parts.length-1]);
-		
-		if ( !opcode.equalsIgnoreCase("groupedagg") ) {
+		if ( !opcode.equalsIgnoreCase("groupedagg") )
 			throw new DMLRuntimeException("Invalid opcode in GroupedAggregateInstruction: " + opcode);
-		}
-		
 		Operator optr = parseGroupedAggOperator(parts[2], parts[3]);
 		return new GroupedAggregateInstruction(optr, in, out, weights, ngroups, str);
 	}
 	
-	public static Operator parseGroupedAggOperator(String fn, String other) throws DMLRuntimeException {
+	public static Operator parseGroupedAggOperator(String fn, String other) {
 		AggregateOperationTypes op = AggregateOperationTypes.INVALID;
 		if ( fn.equalsIgnoreCase("centralmoment") )
 			// in case of CM, we also need to pass "order"

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 6af0e70..a1256af 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
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.functionobjects.KahanPlus;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
@@ -45,29 +44,22 @@ public class GroupedAggregateMInstruction extends BinaryMRInstructionBase implem
 		_ngroups = ngroups;
 	}
 
-	public static GroupedAggregateMInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static GroupedAggregateMInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionParts ( str );
 		InstructionUtils.checkNumFields(parts, 5);
-		
 		byte in1 = Byte.parseByte(parts[1]);
 		byte in2 = Byte.parseByte(parts[2]);
 		byte out = Byte.parseByte(parts[3]);
 		int ngroups = Integer.parseInt(parts[4]);
 		//partitioning ignored
-		
 		Operator op = new AggregateOperator(0, KahanPlus.getKahanPlusFnObject(), true, CorrectionLocationType.LASTCOLUMN);
-		
 		return new GroupedAggregateMInstruction(op, in1, in2, out, ngroups, str);
 	}
 	
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, 
-			int blockRowFactor, int blockColFactor)
-		throws DMLRuntimeException 
-	{	
+			int blockRowFactor, int blockColFactor) {
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input1);
 		if( blkList == null ) 
 			return;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 be2da27..9d308cb 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
@@ -44,17 +44,13 @@ public class MMTSJMRInstruction extends UnaryInstruction {
 		return _type;
 	}
 
-	public static MMTSJMRInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static MMTSJMRInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 3 );
-		
 		String[] parts = InstructionUtils.getInstructionParts(str);
 		String opcode = parts[0];
 		byte in = Byte.parseByte(parts[1]);
 		byte out = Byte.parseByte(parts[2]);
 		MMTSJType titype = MMTSJType.valueOf(parts[3]);
-		 
 		if(!opcode.equalsIgnoreCase("tsmm"))
 			throw new DMLRuntimeException("Unknown opcode while parsing an MMTIJMRInstruction: " + str);
 		else
@@ -65,8 +61,7 @@ public class MMTSJMRInstruction extends UnaryInstruction {
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLRuntimeException 
-	{		
+	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList !=null )
 			for(IndexedMatrixValue imv : blkList)

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 0cc105c..41f29b3 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
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.runtime.instructions.mr;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.Instruction;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
@@ -57,17 +56,14 @@ public abstract class MRInstruction extends Instruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processInstruction(ExecutionContext ec) {
 		//do nothing (not applicable for MR instructions)
 	}
 
 	public abstract void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
-			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) 
-		throws DMLRuntimeException;
+			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor);
 
-	public abstract byte[] getInputIndexes() 
-		throws DMLRuntimeException;
+	public abstract byte[] getInputIndexes();
 
-	public abstract byte[] getAllIndexes() 
-		throws DMLRuntimeException;
+	public abstract byte[] getAllIndexes();
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 0701293..0afeb5d 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
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.ArrayList;
 
 import org.apache.sysml.lops.MapMultChain.ChainType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
@@ -97,14 +96,12 @@ public class MapMultChainInstruction extends MRInstruction implements IDistribut
 		return _input3;
 	}
 
-	public static MapMultChainInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{		
+	public static MapMultChainInstruction parseInstruction( String str ) {
 		//check number of fields (2/3 inputs, output, type)
 		InstructionUtils.checkNumFields ( str, 4, 5 );
 		
 		//parse instruction parts (without exec type)
-		String[] parts = InstructionUtils.getInstructionParts( str );		
+		String[] parts = InstructionUtils.getInstructionParts( str );
 		byte in1 = Byte.parseByte(parts[1]);
 		byte in2 = Byte.parseByte(parts[2]);
 		
@@ -122,32 +119,29 @@ public class MapMultChainInstruction extends MRInstruction implements IDistribut
 			ChainType type = ChainType.valueOf(parts[5]);
 		
 			return new MapMultChainInstruction(type, in1, in2, in3, out, str);
-		}	
+		}
 	}
 	
 	@Override //IDistributedCacheConsumer
-	public boolean isDistCacheOnlyIndex( String inst, byte index )
-	{
+	public boolean isDistCacheOnlyIndex( String inst, byte index ) {
 		return (_chainType == ChainType.XtXv) ?
 			(index==_input2 && index!=_input1) :
 			(index==_input2 && index!=_input1) || (index==_input3 && index!=_input1);
 	}
 	
 	@Override //IDistributedCacheConsumer
-	public void addDistCacheIndex( String inst, ArrayList<Byte> indexes )
-	{
+	public void addDistCacheIndex( String inst, ArrayList<Byte> indexes ) {
 		if( _chainType == ChainType.XtXv ){
 			indexes.add(_input2);
 		}
 		else {
 			indexes.add(_input2);
-			indexes.add(_input3);	
+			indexes.add(_input3);
 		}
 	}
 	
 	@Override
-	public byte[] getInputIndexes() 
-	{
+	public byte[] getInputIndexes() {
 		if( _chainType==ChainType.XtXv )
 			return new byte[]{_input1, _input2};
 		else
@@ -155,8 +149,7 @@ public class MapMultChainInstruction extends MRInstruction implements IDistribut
 	}
 
 	@Override
-	public byte[] getAllIndexes() 
-	{
+	public byte[] getAllIndexes() {
 		if( _chainType==ChainType.XtXv )
 			return new byte[]{_input1, _input2, output};
 		else
@@ -167,7 +160,6 @@ 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 DMLRuntimeException 
 	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(_input1);
 		if( blkList !=null )
@@ -209,15 +201,11 @@ public class MapMultChainInstruction extends MRInstruction implements IDistribut
 	 * @param inVal input matrix value
 	 * @param outIx output matrix indexes
 	 * @param outVal output matrix value
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private void processXtXvOperations(MatrixIndexes inIx, MatrixValue inVal, MatrixIndexes outIx, MatrixValue outVal ) 
-		throws DMLRuntimeException
-	{
+	private void processXtXvOperations(MatrixIndexes inIx, MatrixValue inVal, MatrixIndexes outIx, MatrixValue outVal ) {
 		DistributedCacheInput dcInput2 = MRBaseForCommonInstructions.dcValues.get(_input2); //v
 		MatrixBlock Xi = (MatrixBlock)inVal;
 		MatrixBlock v = (MatrixBlock) dcInput2.getDataBlock(1, 1).getValue();
-		
 		//process core block operation
 		Xi.chainMatrixMultOperations(v, null, (MatrixBlock) outVal, ChainType.XtXv);
 		outIx.setIndexes(1, 1);
@@ -231,17 +219,13 @@ public class MapMultChainInstruction extends MRInstruction implements IDistribut
 	 * @param inVal input matrix value
 	 * @param outIx output matrix indexes
 	 * @param outVal output matrix value
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private void processXtwXvOperations(MatrixIndexes inIx, MatrixValue inVal, MatrixIndexes outIx, MatrixValue outVal, ChainType chain )
-		throws DMLRuntimeException
-	{
+	private void processXtwXvOperations(MatrixIndexes inIx, MatrixValue inVal, MatrixIndexes outIx, MatrixValue outVal, ChainType chain ) {
 		DistributedCacheInput dcInput2 = MRBaseForCommonInstructions.dcValues.get(_input2); //v
 		DistributedCacheInput dcInput3 = MRBaseForCommonInstructions.dcValues.get(_input3); //w
 		MatrixBlock Xi = (MatrixBlock) inVal;
 		MatrixBlock v = (MatrixBlock) dcInput2.getDataBlock(1, 1).getValue();
 		MatrixBlock w = (MatrixBlock) dcInput3.getDataBlock((int)inIx.getRowIndex(), 1).getValue();
-		
 		//process core block operation
 		Xi.chainMatrixMultOperations(v, w, (MatrixBlock) outVal, chain);
 		outIx.setIndexes(1, 1);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 00c2240..c252cc5 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
@@ -51,11 +51,8 @@ public class MatrixReshapeMRInstruction extends UnaryInstruction {
 		_mcIn = mcIn;
 	}
 
-	public static MatrixReshapeMRInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static MatrixReshapeMRInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 5 );
-		
 		String[] parts = InstructionUtils.getInstructionParts(str);
 		String opcode = parts[0];
 		byte in = Byte.parseByte(parts[1]);
@@ -63,7 +60,6 @@ public class MatrixReshapeMRInstruction extends UnaryInstruction {
 		long cols = UtilFunctions.toLong(Double.parseDouble(parts[3])); //save cast
 		boolean byrow = Boolean.parseBoolean(parts[4]);
 		byte out = Byte.parseByte(parts[5]);
-		 
 		if(!opcode.equalsIgnoreCase("rshape"))
 			throw new DMLRuntimeException("Unknown opcode while parsing an MatrixReshapeMRInstruction: " + str);
 		else
@@ -74,8 +70,7 @@ public class MatrixReshapeMRInstruction extends UnaryInstruction {
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int brlen, int bclen )
-		throws DMLRuntimeException 
-	{		
+	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList != null )
 			for(IndexedMatrixValue imv : blkList)

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 72d8d14..a5a790f 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
@@ -54,11 +54,8 @@ public class PMMJMRInstruction extends BinaryMRInstructionBase implements IDistr
 		return _outputEmptyBlocks;
 	}
 
-	public static PMMJMRInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static PMMJMRInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 6 );
-		
 		String[] parts = InstructionUtils.getInstructionParts(str);
 		String opcode = parts[0];
 		byte in1 = Byte.parseByte(parts[1]);
@@ -67,10 +64,8 @@ public class PMMJMRInstruction extends BinaryMRInstructionBase implements IDistr
 		byte out = Byte.parseByte(parts[4]);
 		CacheType ctype = CacheType.valueOf(parts[5]);
 		boolean outputEmpty = Boolean.parseBoolean(parts[6]);
-		
 		if(!opcode.equalsIgnoreCase("pmm"))
 			throw new DMLRuntimeException("Unknown opcode while parsing an PmmMRInstruction: " + str);
-		
 		return new PMMJMRInstruction(new Operator(true), in1, in2, out, nrow, ctype, outputEmpty, str);
 	}
 	
@@ -78,8 +73,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 DMLRuntimeException 
-	{	
+	{
 		//get both matrix inputs (left side always permutation)
 		DistributedCacheInput dcInput = MRBaseForCommonInstructions.dcValues.get(input1);
 		IndexedMatrixValue in2 = cachedValues.getFirst(input2);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 262f8ac..cf6ad40 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
@@ -85,9 +85,7 @@ public class ParameterizedBuiltinMRInstruction extends UnaryInstruction {
 		}
 	}
 
-	public static ParameterizedBuiltinMRInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static ParameterizedBuiltinMRInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionParts(str);
 		String opcode = parts[0];
 		
@@ -124,8 +122,7 @@ public class ParameterizedBuiltinMRInstruction extends UnaryInstruction {
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLRuntimeException 
-	{		
+	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList !=null )
 			for(IndexedMatrixValue imv : blkList)

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 a7c9120..607084c 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
@@ -51,43 +51,34 @@ public class PickByCountInstruction extends MRInstruction {
 		isValuePick = false;
 	}
 
-	public static PickByCountInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{	
+	public static PickByCountInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 5 );
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		OperationTypes ptype = OperationTypes.valueOf(parts[4]);
-		
-		if ( ptype == OperationTypes.VALUEPICK ) 
-		{
+		if ( ptype == OperationTypes.VALUEPICK ) {
 			byte in1 = Byte.parseByte(parts[1]);
 			byte in2 = Byte.parseByte(parts[2]);
 			byte out = Byte.parseByte(parts[3]);
 			return new PickByCountInstruction(null, in1, in2, out, str);
 		} 
-		else if ( ptype == OperationTypes.RANGEPICK ) 
-		{
+		else if ( ptype == OperationTypes.RANGEPICK ) {
 			byte in1 = Byte.parseByte(parts[1]);
 			double cstant = Double.parseDouble(parts[2]);
 			byte out = Byte.parseByte(parts[3]);
 			return new PickByCountInstruction(null, in1, cstant, out, str);
 		}
-		
 		return null;
 	}
 
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		throw new DMLRuntimeException("PickByCountInstruction.processInstruction should never be called!");
-		
 	}
 
 	@Override
-	public byte[] getAllIndexes() throws DMLRuntimeException {
+	public byte[] getAllIndexes() {
 		if( isValuePick ) {
 			return new byte[]{input1,input2,output};
 		}
@@ -98,7 +89,7 @@ public class PickByCountInstruction extends MRInstruction {
 	}
 
 	@Override
-	public byte[] getInputIndexes() throws DMLRuntimeException {
+	public byte[] getInputIndexes() {
 		if( isValuePick ) {
 			return new byte[]{input1,input2};
 		}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 98504b0..bf7dfdf 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
@@ -109,9 +109,7 @@ public class QuaternaryInstruction extends MRInstruction implements IDistributed
 		}
 	}
 
-	public static QuaternaryInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{		
+	public static QuaternaryInstruction parseInstruction( String str ) {
 		String opcode = InstructionUtils.getOpCode(str);
 		
 		//validity check
@@ -281,7 +279,6 @@ 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 DMLRuntimeException 
 	{
 		QuaternaryOperator qop = (QuaternaryOperator)optr; 
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 dac987b..00c939f 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
@@ -20,7 +20,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.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -73,12 +72,10 @@ public class RandInstruction extends DataGenMRInstruction {
 		return seed;
 	}
 
-	public static RandInstruction parseInstruction(String str) throws DMLRuntimeException 
+	public static RandInstruction parseInstruction(String str)
 	{
 		InstructionUtils.checkNumFields ( str, 13 );
-
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		Operator op = null;
 		byte input = Byte.parseByte(parts[1]);
 		byte output = Byte.parseByte(parts[2]);
@@ -93,16 +90,13 @@ public class RandInstruction extends DataGenMRInstruction {
 		String baseDir = parts[11];
 		String pdf = parts[12];
 		String pdfParams = parts[13];
-		
 		return new RandInstruction(op, input, output, rows, cols, rpb, cpb, minValue, maxValue, sparsity, seed, pdf, pdfParams, baseDir, str);
 	}
 
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException 
-	{
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		//do nothing (only meta carrier, handled in special job type)
-	}	
+	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 6c48c3f..0d4ef93 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
@@ -58,12 +58,9 @@ public class RangeBasedReIndexInstruction extends UnaryMRInstructionBase {
 					mcIn.getRowsPerBlock(), mcIn.getColsPerBlock(), -1);
 	}
 
-	public static RangeBasedReIndexInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{	
+	public static RangeBasedReIndexInstruction parseInstruction( String str ) {
 		InstructionUtils.checkNumFields ( str, 8 );
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		String opcode = parts[0];
 		boolean forLeft = false;
 		if(opcode.equalsIgnoreCase(RightIndex.OPCODE+"ForLeft"))
@@ -71,14 +68,12 @@ public class RangeBasedReIndexInstruction extends UnaryMRInstructionBase {
 		else if(!opcode.equalsIgnoreCase(RightIndex.OPCODE))
 			throw new DMLRuntimeException("Unknown opcode while parsing a Select: " + str);
 		byte in = Byte.parseByte(parts[1]); 
-		IndexRange rng=new IndexRange(UtilFunctions.parseToLong(parts[2]), 
-									  UtilFunctions.parseToLong(parts[3]), 
-									  UtilFunctions.parseToLong(parts[4]),
-									  UtilFunctions.parseToLong(parts[5]));		
+		IndexRange rng=new IndexRange(
+			UtilFunctions.parseToLong(parts[2]), UtilFunctions.parseToLong(parts[3]),
+			UtilFunctions.parseToLong(parts[4]),  UtilFunctions.parseToLong(parts[5]));
 		byte out = Byte.parseByte(parts[6]);
 		long rlen = Long.parseLong(parts[7]);
 		long clen = Long.parseLong(parts[8]);
-		
 		return new RangeBasedReIndexInstruction(new ReIndexOperator(), in, out, rng, forLeft, rlen, clen, str);
 	}
 	
@@ -86,8 +81,7 @@ public class RangeBasedReIndexInstruction extends UnaryMRInstructionBase {
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
 			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		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/systemml/blob/1f323976/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 97d12c2..a474658 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
@@ -62,10 +62,7 @@ public class ReblockInstruction extends UnaryMRInstructionBase {
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		throw new DMLRuntimeException("ReblockInstruction.processInstruction should never be called");
-		
 	}
-	
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 fa26152..c2700ef 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
@@ -62,33 +62,25 @@ public class RemoveEmptyMRInstruction extends BinaryInstruction {
 		return _len;
 	}
 
-	public static RemoveEmptyMRInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static RemoveEmptyMRInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields (str, 6);
-		
 		String[] parts = InstructionUtils.getInstructionParts(str);
 		String opcode = parts[0];
-		
 		if(!opcode.equalsIgnoreCase("rmempty"))
 			throw new DMLRuntimeException("Unknown opcode while parsing an RemoveEmptyMRInstruction: " + str);
-		
 		byte in1 = Byte.parseByte(parts[1]);
 		byte in2 = Byte.parseByte(parts[2]);
 		long rlen = UtilFunctions.toLong(Double.parseDouble(parts[3]));
 		boolean rmRows = parts[4].equals("rows");
 		boolean emptyRet = Boolean.parseBoolean(parts[5].toLowerCase());
 		byte out = Byte.parseByte(parts[6]);
-		
 		return new RemoveEmptyMRInstruction(null, in1, in2, rlen, rmRows, emptyRet, out, str);
 	}
 	
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLRuntimeException
-	{
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		//get input and offsets
 		IndexedMatrixValue inData = cachedValues.getFirst(input1);
 		IndexedMatrixValue inOffset = cachedValues.getFirst(input2);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 3bfab97..2995b49 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
@@ -54,17 +54,13 @@ public class ReorgInstruction extends UnaryMRInstructionBase {
 		_outputEmptyBlocks = flag; 
 	}
 	
-	public static ReorgInstruction parseInstruction ( String str ) throws DMLRuntimeException {
-		
+	public static ReorgInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 2 );
-		
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		byte in, out;
 		String opcode = parts[0];
 		in = Byte.parseByte(parts[1]);
 		out = Byte.parseByte(parts[2]);
-		
 		if ( opcode.equalsIgnoreCase("r'") ) {
 			return new ReorgInstruction(new ReorgOperator(SwapIndex.getSwapIndexFnObject()), in, out, str);
 		} 
@@ -77,15 +73,12 @@ public class ReorgInstruction extends UnaryMRInstructionBase {
 		else {
 			throw new DMLRuntimeException("Unknown opcode while parsing a ReorgInstruction: " + str);
 		}
-		
 	}
 
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, 
-			int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
-		
+			int blockRowFactor, int blockColFactor) {
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		
 		if( blkList != null )

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 272d249..a6052b8 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
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 import java.util.ArrayList;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
@@ -49,19 +48,15 @@ public class ReplicateInstruction extends UnaryMRInstructionBase {
 			mcOut.set(_lenM, mcIn.getCols(), mcIn.getRowsPerBlock(), mcIn.getColsPerBlock(), mcIn.getRows());
 	}
 
-	public static ReplicateInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static ReplicateInstruction parseInstruction ( String str ) {
 		//check instruction format
 		InstructionUtils.checkNumFields ( str, 4 );
-		
 		//parse instruction
 		String[] parts = InstructionUtils.getInstructionParts ( str );
 		byte in = Byte.parseByte(parts[1]);
 		boolean repCols = Boolean.parseBoolean(parts[2]);
 		long len = Long.parseLong(parts[3]);
 		byte out = Byte.parseByte(parts[4]);
-		
 		//construct instruction
 		return new ReplicateInstruction(in, out, repCols, len, str);
 	}
@@ -69,7 +64,6 @@ public class ReplicateInstruction extends UnaryMRInstructionBase {
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLRuntimeException 
 	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 762a193..e3eccbd 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
@@ -23,7 +23,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.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -37,18 +36,14 @@ public class ScalarInstruction extends UnaryMRInstructionBase {
 		instString = istr;
 	}
 
-	public static ScalarInstruction parseInstruction ( String str )
-		throws DMLRuntimeException 
-	{	
+	public static ScalarInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 3 );
-		
 		String[] parts = InstructionUtils.getInstructionParts ( str );
 		String opcode = parts[0];
 		boolean firstArgScalar = isFirstArgumentScalar(str);
 		double cst = Double.parseDouble( firstArgScalar ? parts[1] : parts[2]);
 		byte in = Byte.parseByte( firstArgScalar ? parts[2] : parts[1]);
 		byte out = Byte.parseByte(parts[3]);
-		
 		ScalarOperator sop = InstructionUtils.parseScalarBinaryOperator(opcode, firstArgScalar, cst);
 		return new ScalarInstruction(sop, in, out, str);
 	}
@@ -56,7 +51,6 @@ public class ScalarInstruction extends UnaryMRInstructionBase {
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues, 
 			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLRuntimeException
 	{
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		if( blkList != null )

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 c6c607b..c7ff520 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
@@ -20,7 +20,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.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -41,12 +40,9 @@ public class SeqInstruction extends DataGenMRInstruction {
 		instString = istr;
 	}
 
-	public static SeqInstruction parseInstruction(String str) throws DMLRuntimeException 
-	{
+	public static SeqInstruction parseInstruction(String str) {
 		InstructionUtils.checkNumFields ( str, 10 );
-
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		Operator op = null;
 		byte input = Byte.parseByte(parts[1]);
 		byte output = Byte.parseByte(parts[2]);
@@ -58,17 +54,11 @@ public class SeqInstruction extends DataGenMRInstruction {
 		double toValue = Double.parseDouble(parts[8]);
 		double incrValue = Double.parseDouble(parts[9]);
 		String baseDir = parts[10];
-		
 		return new SeqInstruction(op, input, output, rows, cols, rpb, cpb, fromValue, toValue, incrValue, baseDir, str);
 	}
 
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
-		// TODO Auto-generated method stub
-		
-	}
-	
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 d23c826..41dfd2e 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
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.mr;
 import java.util.Arrays;
 
 import org.apache.commons.lang3.ArrayUtils;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -52,9 +51,7 @@ public class TernaryInstruction extends MRInstruction {
 		m3 = input3.isMatrix() ? null :new MatrixBlock(Double.parseDouble(input3.getName()));
 	}
 
-	public static TernaryInstruction parseInstruction ( String str )
-		throws DMLRuntimeException
-	{
+	public static TernaryInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 4 );
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
@@ -68,9 +65,7 @@ public class TernaryInstruction extends MRInstruction {
 	
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass, CachedValueMap cachedValues,
-			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-		throws DMLRuntimeException 
-	{
+			IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		MatrixBlock lm1 = input1.isMatrix() ? (MatrixBlock) cachedValues.getFirst(ixinput1).getValue() : m1;
 		MatrixBlock lm2 = input2.isMatrix() ? (MatrixBlock) cachedValues.getFirst(ixinput2).getValue() : m2;
 		MatrixBlock lm3 = input3.isMatrix() ? (MatrixBlock) cachedValues.getFirst(ixinput3).getValue() : m3;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 d686482..7c75b61 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
@@ -23,7 +23,6 @@ import java.util.ArrayList;
 import java.util.Arrays;
 
 import org.apache.sysml.lops.PartialAggregate.CorrectionLocationType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.functionobjects.ReduceAll;
 import org.apache.sysml.runtime.functionobjects.ReduceCol;
 import org.apache.sysml.runtime.functionobjects.ReduceRow;
@@ -66,9 +65,7 @@ public class UaggOuterChainInstruction extends BinaryInstruction implements IDis
 		instString = istr;
 	}
 
-	public static UaggOuterChainInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static UaggOuterChainInstruction parseInstruction( String str ) {
 		//check number of fields (2/3 inputs, output, type)
 		InstructionUtils.checkNumFields ( str, 5 );
 		
@@ -102,9 +99,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 DMLRuntimeException 
-	{
+			           IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		ArrayList<IndexedMatrixValue> blkList = null; 
 		boolean rightCached = (_uaggOp.indexFn instanceof ReduceCol || _uaggOp.indexFn instanceof ReduceAll
 				               || !LibMatrixOuterAgg.isSupportedUaggOp(_uaggOp, _bOp));

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 49f91fa..4ebe66c 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
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.mr;
 
 import java.util.ArrayList;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixValue;
 import org.apache.sysml.runtime.matrix.mapred.CachedValueMap;
@@ -36,7 +35,7 @@ public class UnaryInstruction extends UnaryMRInstructionBase {
 		instString = istr;
 	}
 
-	public static UnaryInstruction parseInstruction ( String str ) throws DMLRuntimeException {
+	public static UnaryInstruction parseInstruction ( String str ) {
 		String opcode = InstructionUtils.getOpCode(str);
 		InstructionUtils.checkNumFields ( str, 2 );
 		String[] parts = InstructionUtils.getInstructionParts ( str );
@@ -50,11 +49,8 @@ public class UnaryInstruction extends UnaryMRInstructionBase {
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
-		
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
-		
 		if( blkList != null )
 			for(IndexedMatrixValue in : blkList ) {
 				if(in==null) continue;
@@ -72,5 +68,4 @@ public class UnaryInstruction extends UnaryMRInstructionBase {
 					cachedValues.add(output, out);
 			}
 	}
-
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 db78476..47fca64 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
@@ -47,18 +47,13 @@ public class ZeroOutInstruction extends UnaryMRInstructionBase {
 		indexRange = rng;
 	}
 
-	public static ZeroOutInstruction parseInstruction ( String str ) throws DMLRuntimeException {
-		
+	public static ZeroOutInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields ( str, 6 );
-		
 		String[] parts = InstructionUtils.getInstructionParts ( str );
-		
 		String opcode = parts[0];
 		if(!opcode.equalsIgnoreCase("zeroOut"))
 			throw new DMLRuntimeException("Unknown opcode while parsing a zeroout: " + str);
 		byte in = Byte.parseByte(parts[1]);
-
-		//IndexRange rng=new IndexRange(Long.parseLong(parts[2]), Long.parseLong(parts[3]), Long.parseLong(parts[4]), Long.parseLong(parts[5]));
 		IndexRange rng=new IndexRange(UtilFunctions.parseToLong(parts[2]), 
 				UtilFunctions.parseToLong(parts[3]), 
 				UtilFunctions.parseToLong(parts[4]), 
@@ -70,9 +65,7 @@ public class ZeroOutInstruction extends UnaryMRInstructionBase {
 	@Override
 	public void processInstruction(Class<? extends MatrixValue> valueClass,
 			CachedValueMap cachedValues, IndexedMatrixValue tempValue,
-			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor)
-			throws DMLRuntimeException {
-		
+			IndexedMatrixValue zeroInput, int blockRowFactor, int blockColFactor) {
 		ArrayList<IndexedMatrixValue> blkList = cachedValues.get(input);
 		
 		if( blkList != null )

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 9550fcf..4d12106 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
@@ -45,32 +45,25 @@ public class AggregateTernarySPInstruction extends ComputationSPInstruction {
 		super(SPType.AggregateTernary, op, in1, in2, in3, out, opcode, istr);
 	}
 
-	public static AggregateTernarySPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static AggregateTernarySPInstruction parseInstruction( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
-		
 		if ( opcode.equalsIgnoreCase("tak+*") || opcode.equalsIgnoreCase("tack+*") ) {
 			InstructionUtils.checkNumFields( parts, 4 );
-			
 			CPOperand in1 = new CPOperand(parts[1]);
 			CPOperand in2 = new CPOperand(parts[2]);
 			CPOperand in3 = new CPOperand(parts[3]);
 			CPOperand out = new CPOperand(parts[4]);
-			
 			AggregateTernaryOperator op = InstructionUtils.parseAggregateTernaryOperator(opcode);
 			return new AggregateTernarySPInstruction(op, in1, in2, in3, out, opcode, str);
-		} 
+		}
 		else {
 			throw new DMLRuntimeException("AggregateTernaryInstruction.parseInstruction():: Unknown opcode " + opcode);
 		}
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//get inputs

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 8302150..860384f 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.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -54,9 +53,7 @@ public class AggregateUnarySPInstruction extends UnarySPInstruction {
 		_aop = aop;
 	}
 
-	public static AggregateUnarySPInstruction parseInstruction(String str)
-		throws DMLRuntimeException 
-	{
+	public static AggregateUnarySPInstruction parseInstruction(String str) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields(parts, 3);
 		String opcode = parts[0];
@@ -75,9 +72,7 @@ public class AggregateUnarySPInstruction extends UnarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException
-	{
+	public void processInstruction( ExecutionContext ec ) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		MatrixCharacteristics mc = sec.getMatrixCharacteristics(input1.getName());
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 70cf389..292f707 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
@@ -45,9 +45,7 @@ public class AppendGAlignedSPInstruction extends BinarySPInstruction {
 		_cbind = cbind;
 	}
 
-	public static AppendGAlignedSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException
-	{
+	public static AppendGAlignedSPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields (parts, 5);
 		
@@ -67,9 +65,7 @@ public class AppendGAlignedSPInstruction extends BinarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		// general case append (map-extend, aggregate)
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		checkBinaryAppendInputCharacteristics(sec, _cbind, false, true);
@@ -80,7 +76,7 @@ public class AppendGAlignedSPInstruction extends BinarySPInstruction {
 		JavaPairRDD<MatrixIndexes,MatrixBlock> out = null;
 		
 		// Simple changing of matrix indexes of RHS
-		long shiftBy = _cbind ? mc1.getNumColBlocks() : mc1.getNumRowBlocks();		
+		long shiftBy = _cbind ? mc1.getNumColBlocks() : mc1.getNumRowBlocks();
 		out = in2.mapToPair(new ShiftColumnIndex(shiftBy, _cbind));
 		out = in1.union( out );
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 3f28f3f..6c83387 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
@@ -51,9 +51,7 @@ public class AppendGSPInstruction extends BinarySPInstruction {
 		_cbind = cbind;
 	}
 
-	public static AppendGSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{	
+	public static AppendGSPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields(parts, 6);
 		
@@ -74,9 +72,7 @@ public class AppendGSPInstruction extends BinarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		// general case append (map-extend, aggregate)
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		checkBinaryAppendInputCharacteristics(sec, _cbind, false, false);


[02/12] systemml git commit: [SYSTEMML-2191] Cleanup exception hierarchy and handling, part 3

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 c8fedaf..b6fe8d7 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
@@ -96,9 +96,7 @@ public class LibMatrixReorg
 		return (getReorgType(op) != ReorgType.INVALID);
 	}
 
-	public static MatrixBlock reorg( MatrixBlock in, MatrixBlock out, ReorgOperator op ) 
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock reorg( MatrixBlock in, MatrixBlock out, ReorgOperator op ) {
 		ReorgType type = getReorgType(op);
 		
 		switch( type ) {
@@ -119,9 +117,7 @@ public class LibMatrixReorg
 		}
 	}
 
-	public static MatrixBlock transpose( MatrixBlock in, MatrixBlock out ) 
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock transpose( MatrixBlock in, MatrixBlock out ) {
 		//sparse-safe operation
 		if( in.isEmptyBlock(false) )
 			return out;
@@ -162,9 +158,7 @@ public class LibMatrixReorg
 		return out;
 	}
 
-	public static MatrixBlock transpose( MatrixBlock in, MatrixBlock out, int k ) 
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock transpose( MatrixBlock in, MatrixBlock out, int k ) {
 		//redirect small or special cases to sequential execution
 		if( in.isEmptyBlock(false) || (in.rlen * in.clen < PAR_NUMCELL_THRESHOLD) || k == 1
 			|| (SHALLOW_COPY_REORG && !in.sparse && !out.sparse && (in.rlen==1 || in.clen==1) )
@@ -219,9 +213,7 @@ public class LibMatrixReorg
 		return out;
 	}
 
-	public static MatrixBlock rev( MatrixBlock in, MatrixBlock out ) 
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock rev( MatrixBlock in, MatrixBlock out ) {
 		//Timing time = new Timing(true);
 	
 		//sparse-safe operation
@@ -244,9 +236,7 @@ public class LibMatrixReorg
 		return out;
 	}
 
-	public static void rev( IndexedMatrixValue in, long rlen, int brlen, ArrayList<IndexedMatrixValue> out ) 
-		throws DMLRuntimeException
-	{
+	public static void rev( IndexedMatrixValue in, long rlen, int brlen, ArrayList<IndexedMatrixValue> out ) {
 		//input block reverse 
 		MatrixIndexes inix = in.getIndexes();
 		MatrixBlock inblk = (MatrixBlock) in.getValue(); 
@@ -290,9 +280,7 @@ public class LibMatrixReorg
 		}
 	}
 
-	public static MatrixBlock diag( MatrixBlock in, MatrixBlock out )
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock diag( MatrixBlock in, MatrixBlock out ) {
 		//Timing time = new Timing(true);
 		
 		//sparse-safe operation
@@ -316,9 +304,7 @@ public class LibMatrixReorg
 		return out;
 	}
 
-	public static MatrixBlock sort(MatrixBlock in, MatrixBlock out, int[] by, boolean desc, boolean ixret) 
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock sort(MatrixBlock in, MatrixBlock out, int[] by, boolean desc, boolean ixret) {
 		//meta data gathering and preparation
 		boolean sparse = in.isInSparseFormat();
 		int rlen = in.rlen;
@@ -427,11 +413,8 @@ public class LibMatrixReorg
 	 * @param cols number of columns
 	 * @param rowwise if true, reshape by row
 	 * @return output matrix
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static MatrixBlock reshape( MatrixBlock in, MatrixBlock out, int rows, int cols, boolean rowwise ) 
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock reshape( MatrixBlock in, MatrixBlock out, int rows, int cols, boolean rowwise ) {
 		int rlen = in.rlen;
 		int clen = in.clen;
 		
@@ -481,12 +464,9 @@ public class LibMatrixReorg
 	 * @param mcOut output matrix characteristics
 	 * @param rowwise if true, reshape by row
 	 * @return list of indexed matrix values
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static ArrayList<IndexedMatrixValue> reshape( IndexedMatrixValue in, MatrixCharacteristics mcIn, 
-			ArrayList<IndexedMatrixValue> out, MatrixCharacteristics mcOut, boolean rowwise )
-		throws DMLRuntimeException
-	{
+			ArrayList<IndexedMatrixValue> out, MatrixCharacteristics mcOut, boolean rowwise ) {
 		//prepare inputs
 		MatrixIndexes ixIn = in.getIndexes();
 		MatrixBlock mbIn = (MatrixBlock) in.getValue();
@@ -522,11 +502,8 @@ public class LibMatrixReorg
 	 * @param emptyReturn return row/column of zeros for empty input
 	 * @param select ?
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static MatrixBlock rmempty(MatrixBlock in, MatrixBlock ret, boolean rows, boolean emptyReturn, MatrixBlock select) 
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock rmempty(MatrixBlock in, MatrixBlock ret, boolean rows, boolean emptyReturn, MatrixBlock select) {
 		//check for empty inputs 
 		//(the semantics of removeEmpty are that for an empty m-by-n matrix, the output 
 		//is an empty 1-by-n or m-by-1 matrix because we don't allow matrices with dims 0)
@@ -556,11 +533,8 @@ public class LibMatrixReorg
 	 * @param brlen number of rows in a block
 	 * @param bclen number of columns in a block
 	 * @param outList list of indexed matrix values
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void rmempty(IndexedMatrixValue data, IndexedMatrixValue offset, boolean rmRows, long len, long brlen, long bclen, ArrayList<IndexedMatrixValue> outList) 
-		throws DMLRuntimeException
-	{
+	public static void rmempty(IndexedMatrixValue data, IndexedMatrixValue offset, boolean rmRows, long len, long brlen, long bclen, ArrayList<IndexedMatrixValue> outList) {
 		//sanity check inputs
 		if( !(data.getValue() instanceof MatrixBlock && offset.getValue() instanceof MatrixBlock) )
 			throw new DMLRuntimeException("Unsupported input data: expected "+MatrixBlock.class.getName()+" but got "+data.getValue().getClass().getName()+" and "+offset.getValue().getClass().getName());
@@ -650,11 +624,8 @@ public class LibMatrixReorg
 	 * @param ignore ?
 	 * @param k degree of parallelism
 	 * @return output matrix
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static MatrixBlock rexpand(MatrixBlock in, MatrixBlock ret, double max, boolean rows, boolean cast, boolean ignore, int k) 
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock rexpand(MatrixBlock in, MatrixBlock ret, double max, boolean rows, boolean cast, boolean ignore, int k) {
 		//prepare parameters
 		int lmax = (int)UtilFunctions.toLong(max);
 		
@@ -690,11 +661,8 @@ public class LibMatrixReorg
 	 * @param brlen number of rows in a block
 	 * @param bclen number of columns in a block
 	 * @param outList list of indexed matrix values
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void rexpand(IndexedMatrixValue data, double max, boolean rows, boolean cast, boolean ignore, long brlen, long bclen, ArrayList<IndexedMatrixValue> outList) 
-		throws DMLRuntimeException
-	{
+	public static void rexpand(IndexedMatrixValue data, double max, boolean rows, boolean cast, boolean ignore, long brlen, long bclen, ArrayList<IndexedMatrixValue> outList) {
 		//prepare parameters
 		MatrixIndexes ix = data.getIndexes();
 		MatrixBlock in = (MatrixBlock)data.getValue();
@@ -747,9 +715,7 @@ public class LibMatrixReorg
 		return ReorgType.INVALID;
 	}
 
-	private static void transposeDenseToDense(MatrixBlock in, MatrixBlock out, int rl, int ru, int cl, int cu) 
-		throws DMLRuntimeException
-	{
+	private static void transposeDenseToDense(MatrixBlock in, MatrixBlock out, int rl, int ru, int cl, int cu) {
 		final int m = in.rlen;
 		final int n = in.clen;
 		final int n2 = out.clen;
@@ -910,9 +876,7 @@ public class LibMatrixReorg
 		}
 	}
 
-	private static void transposeSparseToDense(MatrixBlock in, MatrixBlock out, int rl, int ru, int cl, int cu) 
-		throws DMLRuntimeException
-	{
+	private static void transposeSparseToDense(MatrixBlock in, MatrixBlock out, int rl, int ru, int cl, int cu) {
 		final int m = in.rlen;
 		final int n = in.clen;
 		
@@ -1002,9 +966,7 @@ public class LibMatrixReorg
 		return cnt;
 	}
 
-	private static void reverseDense(MatrixBlock in, MatrixBlock out)
-		throws DMLRuntimeException
-	{
+	private static void reverseDense(MatrixBlock in, MatrixBlock out) {
 		final int m = in.rlen;
 		final int n = in.clen;
 		
@@ -1030,9 +992,7 @@ public class LibMatrixReorg
 		}
 	}
 
-	private static void reverseSparse(MatrixBlock in, MatrixBlock out)
-		throws DMLRuntimeException
-	{
+	private static void reverseSparse(MatrixBlock in, MatrixBlock out) {
 		final int m = in.rlen;
 		
 		//set basic meta data and allocate output
@@ -1125,9 +1085,7 @@ public class LibMatrixReorg
 		out.setNonZeros(nnz);
 	}
 
-	private static void reshapeDense( MatrixBlock in, MatrixBlock out, int rows, int cols, boolean rowwise ) 
-		throws DMLRuntimeException
-	{
+	private static void reshapeDense( MatrixBlock in, MatrixBlock out, int rows, int cols, boolean rowwise ) {
 		int rlen = in.rlen;
 		int clen = in.clen;
 		
@@ -1410,9 +1368,7 @@ public class LibMatrixReorg
 		}
 	}
 
-	private static void reshapeSparseToDense( MatrixBlock in, MatrixBlock out, int rows, int cols, boolean rowwise ) 
-		throws DMLRuntimeException
-	{
+	private static void reshapeSparseToDense( MatrixBlock in, MatrixBlock out, int rows, int cols, boolean rowwise ) {
 		int rlen = in.rlen;
 		int clen = in.clen;
 		
@@ -1618,9 +1574,7 @@ public class LibMatrixReorg
 
 	private static void reshapeDense( MatrixBlock in, long row_offset, long col_offset, 
 			HashMap<MatrixIndexes,MatrixBlock> rix,
-			MatrixCharacteristics mcIn, MatrixCharacteristics mcOut, boolean rowwise ) 
-		throws DMLRuntimeException
-	{
+			MatrixCharacteristics mcIn, MatrixCharacteristics mcOut, boolean rowwise ) {
 		if( in.isEmptyBlock(false) )
 			return;
 		
@@ -1658,9 +1612,7 @@ public class LibMatrixReorg
 
 	private static void reshapeSparse( MatrixBlock in, long row_offset, long col_offset, 
 			HashMap<MatrixIndexes,MatrixBlock> rix, 
-			MatrixCharacteristics mcIn, MatrixCharacteristics mcOut, boolean rowwise ) 
-		throws DMLRuntimeException
-	{
+			MatrixCharacteristics mcIn, MatrixCharacteristics mcOut, boolean rowwise ) {
 		if( in.isEmptyBlock(false) )
 			return;
 		
@@ -1733,9 +1685,7 @@ public class LibMatrixReorg
 			new MatrixIndexes(ci, cj);
 	}
 
-	private static MatrixBlock removeEmptyRows(MatrixBlock in, MatrixBlock ret, MatrixBlock select, boolean emptyReturn) 
-		throws DMLRuntimeException 
-	{
+	private static MatrixBlock removeEmptyRows(MatrixBlock in, MatrixBlock ret, MatrixBlock select, boolean emptyReturn) {
 		final int m = in.rlen;
 		final int n = in.clen;
 		boolean[] flags = null;
@@ -1858,9 +1808,7 @@ public class LibMatrixReorg
 		return ret;
 	}
 
-	private static MatrixBlock removeEmptyColumns(MatrixBlock in, MatrixBlock ret, MatrixBlock select, boolean emptyReturn) 
-		throws DMLRuntimeException 
-	{
+	private static MatrixBlock removeEmptyColumns(MatrixBlock in, MatrixBlock ret, MatrixBlock select, boolean emptyReturn) {
 		final int m = in.rlen;
 		final int n = in.clen;
 		
@@ -1981,9 +1929,7 @@ public class LibMatrixReorg
 		return ret;
 	}
 
-	private static MatrixBlock rexpandRows(MatrixBlock in, MatrixBlock ret, int max, boolean cast, boolean ignore) 
-		throws DMLRuntimeException
-	{
+	private static MatrixBlock rexpandRows(MatrixBlock in, MatrixBlock ret, int max, boolean cast, boolean ignore) {
 		//set meta data
 		final int rlen = max;
 		final int clen = in.rlen;
@@ -2032,9 +1978,7 @@ public class LibMatrixReorg
 		return ret;
 	}
 	
-	private static MatrixBlock rexpandColumns(MatrixBlock in, MatrixBlock ret, int max, boolean cast, boolean ignore, int k) 
-		throws DMLRuntimeException
-	{
+	private static MatrixBlock rexpandColumns(MatrixBlock in, MatrixBlock ret, int max, boolean cast, boolean ignore, int k) {
 		//set meta data
 		final int rlen = in.rlen;
 		final int clen = max;
@@ -2073,9 +2017,7 @@ public class LibMatrixReorg
 		return ret;
 	}
 
-	private static long rexpandColumns(MatrixBlock in, MatrixBlock ret, int max, boolean cast, boolean ignore, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static long rexpandColumns(MatrixBlock in, MatrixBlock ret, int max, boolean cast, boolean ignore, int rl, int ru) {
 		//initialize auxiliary data structures 
 		int lnnz = 0;
 		int[] cix = null;
@@ -2341,8 +2283,7 @@ public class LibMatrixReorg
 		}
 		
 		@Override
-		public Object call() throws DMLRuntimeException
-		{
+		public Object call() {
 			int rl = _row ? _rl : 0;
 			int ru = _row ? _ru : _in.rlen;
 			int cl = _row ? 0 : _rl;
@@ -2375,7 +2316,7 @@ public class LibMatrixReorg
 		}
 		
 		@Override
-		public int[] call() throws DMLRuntimeException {
+		public int[] call() {
 			return countNnzPerColumn(_in, _rl, _ru);
 		}
 	}
@@ -2401,7 +2342,7 @@ public class LibMatrixReorg
 		}
 		
 		@Override
-		public Long call() throws DMLRuntimeException {
+		public Long call() {
 			return rexpandColumns(_in, _out, _max, _cast, _ignore, _rl, _ru);
 		}
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 bfb394f..fc4a82f 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
@@ -285,11 +285,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param arr 2d double array matrix
 	 * @param r number of rows
 	 * @param c number of columns
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void init(double[][] arr, int r, int c) 
-		throws DMLRuntimeException 
-	{
+	public void init(double[][] arr, int r, int c) {
 		//input checks 
 		if ( sparse )
 			throw new DMLRuntimeException("MatrixBlockDSM.init() can be invoked only on matrices with dense representation.");
@@ -405,15 +402,11 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * 
 	 * @param rl number of rows
 	 * @param cl number of columns
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void allocateDenseBlockUnsafe(int rl, int cl) 
-		throws DMLRuntimeException
-	{
+	public void allocateDenseBlockUnsafe(int rl, int cl) {
 		sparse=false;
 		rlen=rl;
 		clen=cl;
-		
 		//allocate dense block
 		allocateDenseBlock();
 	}
@@ -788,11 +781,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * Utility function for computing the min non-zero value. 
 	 * 
 	 * @return minimum non-zero value
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public double minNonZero() 
-		throws DMLRuntimeException
-	{
+	public double minNonZero() {
 		//check for empty block and return immediately
 		if( isEmptyBlock() )
 			return -1;
@@ -813,19 +803,14 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * Wrapper method for reduceall-min of a matrix.
 	 * 
 	 * @return ?
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public double min() 
-		throws DMLRuntimeException
-	{
+	public double min() {
 		//construct operator
 		AggregateOperator aop = new AggregateOperator(Double.POSITIVE_INFINITY, Builtin.getBuiltinFnObject("min"));
 		AggregateUnaryOperator auop = new AggregateUnaryOperator( aop, ReduceAll.getReduceAllFnObject());
-		
 		//execute operation
 		MatrixBlock out = new MatrixBlock(1, 1, false);
 		LibMatrixAgg.aggregateUnaryMatrix(this, out, auop);
-		
 		return out.quickGetValue(0, 0);
 	}
 	
@@ -833,19 +818,14 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * Wrapper method for reduceall-max of a matrix.
 	 * 
 	 * @return ?
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public double max() 
-		throws DMLRuntimeException
-	{
+	public double max() {
 		//construct operator
 		AggregateOperator aop = new AggregateOperator(Double.NEGATIVE_INFINITY, Builtin.getBuiltinFnObject("max"));
 		AggregateUnaryOperator auop = new AggregateUnaryOperator( aop, ReduceAll.getReduceAllFnObject());
-		
 		//execute operation
 		MatrixBlock out = new MatrixBlock(1, 1, false);
 		LibMatrixAgg.aggregateUnaryMatrix(this, out, auop);
-		
 		return out.quickGetValue(0, 0);
 	}
 	
@@ -853,11 +833,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * Wrapper method for reduceall-sum of a matrix.
 	 * 
 	 * @return Sum of the values in the matrix.
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public double sum() 
-		throws DMLRuntimeException
-	{
+	public double sum() {
 		KahanPlus kplus = KahanPlus.getKahanPlusFnObject();
 		return sumWithFn(kplus);
 	}
@@ -866,11 +843,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * Wrapper method for reduceall-sumSq of a matrix.
 	 *
 	 * @return Sum of the squared values in the matrix.
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public double sumSq()
-			throws DMLRuntimeException
-	{
+	public double sumSq() {
 		KahanPlusSq kplusSq = KahanPlusSq.getKahanPlusSqFnObject();
 		return sumWithFn(kplusSq);
 	}
@@ -882,21 +856,16 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param kfunc A Kahan function object to use for summation.
 	 * @return Sum of the values in the matrix with the given
 	 *         function applied.
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private double sumWithFn(KahanFunction kfunc)
-			throws DMLRuntimeException
-	{
+	private double sumWithFn(KahanFunction kfunc) {
 		//construct operator
 		CorrectionLocationType corrLoc = CorrectionLocationType.LASTCOLUMN;
 		ReduceAll reduceAllObj = ReduceAll.getReduceAllFnObject();
 		AggregateOperator aop = new AggregateOperator(0, kfunc, true, corrLoc);
 		AggregateUnaryOperator auop = new AggregateUnaryOperator(aop, reduceAllObj);
-
 		//execute operation
 		MatrixBlock out = new MatrixBlock(1, 2, false);
 		LibMatrixAgg.aggregateUnaryMatrix(this, out, auop);
-
 		return out.quickGetValue(0, 0);
 	}
 
@@ -999,7 +968,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return evalSparseFormatOnDisk(lrlen, lclen, nonZeros);
 	}
 	
-	public void examSparsity() throws DMLRuntimeException {
+	public void examSparsity() {
 		examSparsity(true);
 	}
 	
@@ -1011,11 +980,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * representations.
 	 * 
 	 * @param allowCSR allow CSR format on dense to sparse conversion
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void examSparsity(boolean allowCSR)
-		throws DMLRuntimeException
-	{
+	public void examSparsity(boolean allowCSR) {
 		//determine target representation
 		boolean sparseDst = evalSparseFormatInMemory(); 
 		
@@ -1143,9 +1109,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		denseBlock = null;
 	}
 	
-	public void sparseToDense()
-		throws DMLRuntimeException
-	{
+	public void sparseToDense() {
 		//set target representation, early abort on empty blocks
 		sparse = false;
 		if(sparseBlock==null)
@@ -1417,11 +1381,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 *                 destination if not present in src and (2) to internally maintain nnz
 	 *           false, assume empty index range in destination and do not maintain nnz
 	 *                  (the invoker is responsible to recompute nnz after all copies are done) 
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void copy(int rl, int ru, int cl, int cu, MatrixBlock src, boolean awareDestNZ ) 
-		throws DMLRuntimeException 
-	{	
+	public void copy(int rl, int ru, int cl, int cu, MatrixBlock src, boolean awareDestNZ ) {
 		if(sparse && src.sparse)
 			copySparseToSparse(rl, ru, cl, cu, src, awareDestNZ);
 		else if(sparse && !src.sparse)
@@ -1475,9 +1436,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		}
 	}
 	
-	private void copySparseToDense(int rl, int ru, int cl, int cu, MatrixBlock src, boolean awareDestNZ) 
-		throws DMLRuntimeException
-	{	
+	private void copySparseToDense(int rl, int ru, int cl, int cu, MatrixBlock src, boolean awareDestNZ) {
 		//handle empty src and dest
 		if( src.isEmptyBlock(false) ) {
 			if( awareDestNZ && denseBlock != null ) {
@@ -1570,9 +1529,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		}
 	}
 	
-	private void copyDenseToDense(int rl, int ru, int cl, int cu, MatrixBlock src, boolean awareDestNZ) 
-		throws DMLRuntimeException
-	{	
+	private void copyDenseToDense(int rl, int ru, int cl, int cu, MatrixBlock src, boolean awareDestNZ) {
 		//handle empty src and dest
 		if( src.isEmptyBlock(false) ) {
 			if( awareDestNZ && denseBlock != null ) {
@@ -1616,7 +1573,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		}
 	}
 
-	public void merge(CacheBlock that, boolean appendOnly) throws DMLRuntimeException {
+	public void merge(CacheBlock that, boolean appendOnly) {
 		merge((MatrixBlock)that, appendOnly);
 	}
 
@@ -1632,11 +1589,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * 
 	 * @param that matrix block
 	 * @param appendOnly ?
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void merge(MatrixBlock that, boolean appendOnly) 
-		throws DMLRuntimeException
-	{
+	public void merge(MatrixBlock that, boolean appendOnly) {
 		//check for empty input source (nothing to merge)
 		if( that == null || that.isEmptyBlock(false) )
 			return;
@@ -2575,9 +2529,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	// Core block operations (called from instructions)
 
 	@Override
-	public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) 
-		throws DMLRuntimeException
-	{
+	public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) {
 		MatrixBlock ret = checkType(result);
 		
 		// estimate the sparsity structure of result matrix
@@ -2598,9 +2550,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	}
 
 	@Override
-	public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result) 
-		throws DMLRuntimeException
-	{
+	public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result) {
 		MatrixBlock ret = checkType(result);
 		
 		// estimate the sparsity structure of result matrix
@@ -2639,9 +2589,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return ret;
 	}
 
-	private void sparseUnaryOperations(UnaryOperator op, MatrixBlock ret) 
-		throws DMLRuntimeException
-	{
+	private void sparseUnaryOperations(UnaryOperator op, MatrixBlock ret) {
 		//early abort possible since sparse-safe
 		if( isEmptyBlock(false) )
 			return;
@@ -2718,9 +2666,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		}
 	}
 
-	private void denseUnaryOperations(UnaryOperator op, MatrixBlock ret) 
-		throws DMLRuntimeException
-	{
+	private void denseUnaryOperations(UnaryOperator op, MatrixBlock ret) {
 		//prepare 0-value init (determine if unnecessarily sparse-unsafe)
 		double val0 = op.fn.execute(0d);
 		
@@ -2744,9 +2690,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	}
 
 	@Override
-	public MatrixValue binaryOperations(BinaryOperator op, MatrixValue thatValue, MatrixValue result) 
-		throws DMLRuntimeException
-	{
+	public MatrixValue binaryOperations(BinaryOperator op, MatrixValue thatValue, MatrixValue result) {
 		MatrixBlock that = checkType(thatValue);
 		MatrixBlock ret = checkType(result);
 		if( !LibMatrixBincell.isValidDimensionsBinary(this, that) ) {
@@ -2774,9 +2718,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	}
 
 	@Override
-	public void binaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue) 
-		throws DMLRuntimeException
-	{
+	public void binaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue) {
 		MatrixBlock that=checkType(thatValue);
 		if( !LibMatrixBincell.isValidDimensionsBinary(this, that) ) {
 			throw new RuntimeException("block sizes are not matched for binary " +
@@ -2794,9 +2736,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		LibMatrixBincell.bincellOpInPlace(this, that, op);
 	}
 	
-	public MatrixBlock ternaryOperations(TernaryOperator op, MatrixBlock m2, MatrixBlock m3, MatrixBlock ret)
-		throws DMLRuntimeException
-	{
+	public MatrixBlock ternaryOperations(TernaryOperator op, MatrixBlock m2, MatrixBlock m3, MatrixBlock ret) {
 		//prepare inputs
 		final boolean s1 = (rlen==1 && clen==1);
 		final boolean s2 = (m2.rlen==1 && m2.clen==1);
@@ -2863,10 +2803,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	}
 	
 	@Override
-	public void incrementalAggregate(AggregateOperator aggOp, MatrixValue correction, 
-			MatrixValue newWithCorrection)
-	throws DMLRuntimeException
-	{
+	public void incrementalAggregate(AggregateOperator aggOp, MatrixValue correction, MatrixValue newWithCorrection) {
 		//assert(aggOp.correctionExists); 
 		MatrixBlock cor=checkType(correction);
 		MatrixBlock newWithCor=checkType(newWithCorrection);
@@ -3104,9 +3041,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	}
 	
 	@Override
-	public void incrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection)
-		throws DMLRuntimeException
-	{
+	public void incrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection) {
 		//assert(aggOp.correctionExists);
 		MatrixBlock newWithCor=checkType(newWithCorrection);
 		KahanObject buffer=new KahanObject(0, 0);
@@ -3310,7 +3245,6 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 
 	@Override
 	public MatrixValue reorgOperations(ReorgOperator op, MatrixValue ret, int startRow, int startColumn, int length)
-		throws DMLRuntimeException 
 	{
 		if ( !( op.fn instanceof SwapIndex || op.fn instanceof DiagIndex 
 			|| op.fn instanceof SortIndex || op.fn instanceof RevIndex ) )
@@ -3390,17 +3324,15 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return result;
 	}
 
-	public MatrixBlock append( MatrixBlock that, MatrixBlock ret ) throws DMLRuntimeException {
+	public MatrixBlock append( MatrixBlock that, MatrixBlock ret ) {
 		return append(that, ret, true); //default cbind
 	}
 
-	public MatrixBlock append( MatrixBlock that, MatrixBlock ret, boolean cbind ) throws DMLRuntimeException {
+	public MatrixBlock append( MatrixBlock that, MatrixBlock ret, boolean cbind ) {
 		return append(new MatrixBlock[]{that}, ret, cbind);
 	}
 	
-	public MatrixBlock append( MatrixBlock[] that, MatrixBlock ret, boolean cbind )
-		throws DMLRuntimeException 
-	{
+	public MatrixBlock append( MatrixBlock[] that, MatrixBlock ret, boolean cbind ) {
 		MatrixBlock result = checkType( ret );
 		final int m = cbind ? rlen : rlen+Arrays.stream(that).mapToInt(mb -> mb.rlen).sum();
 		final int n = cbind ? clen+Arrays.stream(that).mapToInt(mb -> mb.clen).sum() : clen;
@@ -3469,15 +3401,11 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return result;
 	}
 	
-	public MatrixBlock transposeSelfMatrixMultOperations( MatrixBlock out, MMTSJType tstype )
-		throws DMLRuntimeException 
-	{
+	public MatrixBlock transposeSelfMatrixMultOperations( MatrixBlock out, MMTSJType tstype ) {
 		return transposeSelfMatrixMultOperations(out, tstype, 1);
 	}
 
-	public MatrixBlock transposeSelfMatrixMultOperations( MatrixBlock out, MMTSJType tstype, int k )
-		throws DMLRuntimeException 
-	{
+	public MatrixBlock transposeSelfMatrixMultOperations( MatrixBlock out, MMTSJType tstype, int k ) {
 		//check for transpose type
 		if( !(tstype == MMTSJType.LEFT || tstype == MMTSJType.RIGHT) )
 			throw new DMLRuntimeException("Invalid MMTSJ type '"+tstype.toString()+"'.");
@@ -3501,15 +3429,11 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return out;
 	}
 
-	public MatrixBlock chainMatrixMultOperations( MatrixBlock v, MatrixBlock w, MatrixBlock out, ChainType ctype ) 
-		throws DMLRuntimeException 	
-	{
+	public MatrixBlock chainMatrixMultOperations( MatrixBlock v, MatrixBlock w, MatrixBlock out, ChainType ctype ) {
 		return chainMatrixMultOperations(v, w, out, ctype, 1);
 	}
 
-	public MatrixBlock chainMatrixMultOperations( MatrixBlock v, MatrixBlock w, MatrixBlock out, ChainType ctype, int k ) 	
-		throws DMLRuntimeException 
-	{
+	public MatrixBlock chainMatrixMultOperations( MatrixBlock v, MatrixBlock w, MatrixBlock out, ChainType ctype, int k ) {
 		//check for transpose type
 		if( !(ctype == ChainType.XtXv || ctype == ChainType.XtwXv || ctype == ChainType.XtXvy) )
 			throw new DMLRuntimeException("Invalid mmchain type '"+ctype.toString()+"'.");
@@ -3537,15 +3461,11 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return out;
 	}
 
-	public void permutationMatrixMultOperations( MatrixValue m2Val, MatrixValue out1Val, MatrixValue out2Val ) 	
-		throws DMLRuntimeException 
-	{
+	public void permutationMatrixMultOperations( MatrixValue m2Val, MatrixValue out1Val, MatrixValue out2Val ) {
 		permutationMatrixMultOperations(m2Val, out1Val, out2Val, 1);
 	}
 
-	public void permutationMatrixMultOperations( MatrixValue m2Val, MatrixValue out1Val, MatrixValue out2Val, int k ) 	
-		throws DMLRuntimeException 
-	{
+	public void permutationMatrixMultOperations( MatrixValue m2Val, MatrixValue out1Val, MatrixValue out2Val, int k ) {
 		//check input types and dimensions
 		MatrixBlock m2 = checkType(m2Val);
 		MatrixBlock ret1 = checkType(out1Val);
@@ -3562,17 +3482,13 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	}
 	
 	public final MatrixBlock leftIndexingOperations(MatrixBlock rhsMatrix,
-			IndexRange ixrange, MatrixBlock ret, UpdateType update)
-		throws DMLRuntimeException
-	{
+			IndexRange ixrange, MatrixBlock ret, UpdateType update) {
 		return leftIndexingOperations(rhsMatrix, (int)ixrange.rowStart,
 			(int)ixrange.rowEnd, (int)ixrange.colStart, (int)ixrange.colEnd, ret, update);
 	}
 
 	public MatrixBlock leftIndexingOperations(MatrixBlock rhsMatrix,
-			int rl, int ru, int cl, int cu, MatrixBlock ret, UpdateType update)
-		throws DMLRuntimeException 
-	{
+			int rl, int ru, int cl, int cu, MatrixBlock ret, UpdateType update) {
 		// Check the validity of bounds
 		if( rl < 0 || rl >= getNumRows() || ru < rl || ru >= getNumRows()
 			|| cl < 0 || cu >= getNumColumns() || cu < cl || cu >= getNumColumns() ) {
@@ -3662,11 +3578,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param ret ?
 	 * @param update ?
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public MatrixBlock leftIndexingOperations(ScalarObject scalar, int rl, int cl, MatrixBlock ret, UpdateType update)
-		throws DMLRuntimeException 
-	{
+	public MatrixBlock leftIndexingOperations(ScalarObject scalar, int rl, int cl, MatrixBlock ret, UpdateType update) {
 		double inVal = scalar.getDoubleValue();
 		boolean sp = estimateSparsityOnLeftIndexing(rlen, clen, nonZeros, 1, 1, (inVal!=0)?1:0);
 		
@@ -3692,14 +3605,14 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	
 	
 
-	public MatrixBlock slice(IndexRange ixrange, MatrixBlock ret) throws DMLRuntimeException {
+	public MatrixBlock slice(IndexRange ixrange, MatrixBlock ret) {
 		return slice(
 			(int)ixrange.rowStart, (int)ixrange.rowEnd, 
 			(int)ixrange.colStart, (int)ixrange.colEnd, true, ret);
 	}
 	
 	@Override
-	public MatrixBlock slice(int rl, int ru, int cl, int cu, CacheBlock ret) throws DMLRuntimeException {
+	public MatrixBlock slice(int rl, int ru, int cl, int cu, CacheBlock ret) {
 		return slice(rl, ru, cl, cu, true, ret);
 	}
 	
@@ -3714,11 +3627,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param deep should perform deep copy
 	 * @param ret output matrix block
 	 * @return matrix block output matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public MatrixBlock slice(int rl, int ru, int cl, int cu, boolean deep, CacheBlock ret) 
-		throws DMLRuntimeException 
-	{	
+	public MatrixBlock slice(int rl, int ru, int cl, int cu, boolean deep, CacheBlock ret) {
 		// check the validity of bounds
 		if ( rl < 0 || rl >= getNumRows() || ru < rl || ru >= getNumRows()
 				|| cl < 0 || cu >= getNumColumns() || cu < cl || cu >= getNumColumns() ) {
@@ -3756,9 +3666,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return result;
 	}
 
-	private void sliceSparse(int rl, int ru, int cl, int cu, boolean deep, MatrixBlock dest) 
-		throws DMLRuntimeException
-	{
+	private void sliceSparse(int rl, int ru, int cl, int cu, boolean deep, MatrixBlock dest) {
 		//check for early abort
 		if( isEmptyBlock(false) ) 
 			return;
@@ -3802,9 +3710,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		}
 	}
 
-	private void sliceDense(int rl, int ru, int cl, int cu, MatrixBlock dest) 
-		throws DMLRuntimeException
-	{
+	private void sliceDense(int rl, int ru, int cl, int cu, MatrixBlock dest) {
 		//ensure allocated input/output blocks
 		if( denseBlock == null )
 			return;
@@ -3951,9 +3857,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	//nextNCol is the number columns for the block right of block v2
 	public void append(MatrixValue v2,
 			ArrayList<IndexedMatrixValue> outlist, int blockRowFactor,
-			int blockColFactor, boolean cbind, boolean m2IsLast, int nextNCol)
-			throws DMLRuntimeException 
-	{	
+			int blockColFactor, boolean cbind, boolean m2IsLast, int nextNCol) {
 		MatrixBlock m2 = (MatrixBlock)v2;
 		
 		//case 1: copy lhs and rhs to output
@@ -3993,9 +3897,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	}
 
 	@Override
-	public MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary)
-			throws DMLRuntimeException 
-	{
+	public MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary) {
 		checkType(result);
 		double currentSparsity=(double)nonZeros/(double)rlen/(double)clen;
 		double estimatedSps=currentSparsity*(double)(range.rowEnd-range.rowStart+1)
@@ -4104,18 +4006,14 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	
 	@Override
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, 
-			int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn)
-		throws DMLRuntimeException
-	{
+			int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn) {
 		return aggregateUnaryOperations(op, result, 
 				blockingFactorRow, blockingFactorCol, indexesIn, false);
 	}
 	
 	@Override
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, 
-			int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn, boolean inCP) 
-		throws DMLRuntimeException
-	{
+			int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn, boolean inCP)  {
 		CellIndex tempCellIndex = new CellIndex(-1,-1);
 		op.indexFn.computeDimension(rlen, clen, tempCellIndex);
 		if(op.aggOp.correctionExists)
@@ -4171,7 +4069,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	}
 	
 	private void sparseAggregateUnaryHelp(AggregateUnaryOperator op, MatrixBlock result,
-			int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn) throws DMLRuntimeException
+			int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn)
 	{
 		//initialize result
 		if(op.aggOp.initialValue!=0)
@@ -4208,7 +4106,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	}
 	
 	private void denseAggregateUnaryHelp(AggregateUnaryOperator op, MatrixBlock result,
-			int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn) throws DMLRuntimeException
+			int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn)
 	{
 		if(op.aggOp.initialValue!=0)
 			result.reset(result.rlen, result.clen, op.aggOp.initialValue);
@@ -4223,7 +4121,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	}
 	
 	private static void incrementalAggregateUnaryHelp(AggregateOperator aggOp, MatrixBlock result, int row, int column, 
-			double newvalue, KahanObject buffer) throws DMLRuntimeException
+			double newvalue, KahanObject buffer)
 	{
 		if(aggOp.correctionExists)
 		{
@@ -4333,9 +4231,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		}
 	}
 
-	public CM_COV_Object cmOperations(CMOperator op) 
-		throws DMLRuntimeException 
-	{
+	public CM_COV_Object cmOperations(CMOperator op) {
 		// dimension check for input column vectors
 		if ( this.getNumColumns() != 1) {
 			throw new DMLRuntimeException("Central Moment can not be computed on [" 
@@ -4380,9 +4276,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return cmobj;
 	}
 		
-	public CM_COV_Object cmOperations(CMOperator op, MatrixBlock weights) 
-		throws DMLRuntimeException 
-	{
+	public CM_COV_Object cmOperations(CMOperator op, MatrixBlock weights) {
 		/* this._data must be a 1 dimensional vector */
 		if ( this.getNumColumns() != 1 || weights.getNumColumns() != 1) {
 			throw new DMLRuntimeException("Central Moment can be computed only on 1-dimensional column matrices.");
@@ -4420,9 +4314,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return cmobj;
 	}
 	
-	public CM_COV_Object covOperations(COVOperator op, MatrixBlock that) 
-		throws DMLRuntimeException 
-	{
+	public CM_COV_Object covOperations(COVOperator op, MatrixBlock that) {
 		/* this._data must be a 1 dimensional vector */
 		if ( this.getNumColumns() != 1 || that.getNumColumns() != 1 ) {
 			throw new DMLRuntimeException("Covariance can be computed only on 1-dimensional column matrices."); 
@@ -4459,9 +4351,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return covobj;
 	}
 	
-	public CM_COV_Object covOperations(COVOperator op, MatrixBlock that, MatrixBlock weights) 
-		throws DMLRuntimeException 
-	{
+	public CM_COV_Object covOperations(COVOperator op, MatrixBlock that, MatrixBlock weights) {
 		/* this._data must be a 1 dimensional vector */
 		if ( this.getNumColumns() != 1 || that.getNumColumns() != 1 || weights.getNumColumns() != 1) {
 			throw new DMLRuntimeException("Covariance can be computed only on 1-dimensional column matrices."); 
@@ -4507,7 +4397,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return covobj;
 	}
 
-	public MatrixValue sortOperations(MatrixValue weights, MatrixValue result) throws DMLRuntimeException {
+	public MatrixValue sortOperations(MatrixValue weights, MatrixValue result) {
 		boolean wtflag = (weights!=null);
 		
 		MatrixBlock wts= (weights == null ? null : checkType(weights));
@@ -4571,7 +4461,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return result;
 	}
 	
-	public double interQuartileMean() throws DMLRuntimeException {
+	public double interQuartileMean() {
 		//input state: rlen x 2, values and weights, sorted by weight
 		//approach: determine q25 and q75 keys by cumsum of weights
 		double sum_wt = sumWeightForQuantile();
@@ -4607,8 +4497,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return (sum + q25Part*q25Val - q75Part*q75Val) / (sum_wt*0.5); 
 	}
 	
-	public MatrixValue pickValues(MatrixValue quantiles, MatrixValue ret) 
-		throws DMLRuntimeException {
+	public MatrixValue pickValues(MatrixValue quantiles, MatrixValue ret) {
 	
 		MatrixBlock qs=checkType(quantiles);
 		
@@ -4630,18 +4519,16 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return output;
 	}
 	
-	public double median() throws DMLRuntimeException {
+	public double median() {
 		double sum_wt = sumWeightForQuantile();
 		return pickValue(0.5, sum_wt%2==0);
 	}
 	
-	public double pickValue(double quantile) throws DMLRuntimeException{
+	public double pickValue(double quantile){
 		return pickValue(quantile, false);
 	}
 	
-	public double pickValue(double quantile, boolean average) 
-		throws DMLRuntimeException 
-	{
+	public double pickValue(double quantile, boolean average) {
 		double sum_wt = sumWeightForQuantile();
 		
 		// do averaging only if it is asked for; and sum_wt is even
@@ -4687,11 +4574,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * This function computes the total weight
 	 * 
 	 * @return sum weight for quantile
-	 * @throws DMLRuntimeException on error
 	 */
-	public double sumWeightForQuantile() 
-		throws DMLRuntimeException 
-	{
+	public double sumWeightForQuantile() {
 		double sum_wt = 0;
 		for (int i=0; i < getNumRows(); i++ ) {
 			double tmp = quickGetValue(i, 1);
@@ -4704,19 +4588,15 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 						+ "are expected to be integers but found '"+tmp+"'.");
 			}
 		}
-		
 		return sum_wt;
 	}
 	
 	public MatrixBlock aggregateBinaryOperations(MatrixIndexes m1Index, MatrixBlock m1, MatrixIndexes m2Index, MatrixBlock m2, 
-		MatrixBlock ret, AggregateBinaryOperator op ) throws DMLRuntimeException
-	{
+		MatrixBlock ret, AggregateBinaryOperator op ) {
 		return aggregateBinaryOperations(m1, m2, ret, op);
 	}
 
-	public MatrixBlock aggregateBinaryOperations(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, AggregateBinaryOperator op) 
-		throws DMLRuntimeException
-	{
+	public MatrixBlock aggregateBinaryOperations(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, AggregateBinaryOperator op) {
 		//check input types, dimensions, configuration
 		if( m1.clen != m2.rlen ) {
 			throw new RuntimeException("Dimensions do not match for matrix multiplication ("+m1.clen+"!="+m2.rlen+").");
@@ -4747,9 +4627,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return ret;
 	}
 
-	public MatrixBlock aggregateTernaryOperations(MatrixBlock m1, MatrixBlock m2, MatrixBlock m3, MatrixBlock ret, AggregateTernaryOperator op, boolean inCP) 
-		throws DMLRuntimeException
-	{
+	public MatrixBlock aggregateTernaryOperations(MatrixBlock m1, MatrixBlock m2, MatrixBlock m3, MatrixBlock ret, AggregateTernaryOperator op, boolean inCP) {
 		//check input dimensions and operators
 		if( m1.rlen!=m2.rlen || m1.clen!=m2.clen || (m3!=null && (m2.rlen!=m3.rlen || m2.clen!=m3.clen)) )
 			throw new DMLRuntimeException("Invalid dimensions for aggregate ternary ("+m1.rlen+"x"+m1.clen+", "+m2.rlen+"x"+m2.clen+", "+m3.rlen+"x"+m3.clen+").");
@@ -4775,9 +4653,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return ret;
 	}
 
-	public MatrixBlock  uaggouterchainOperations(MatrixBlock mbLeft, MatrixBlock mbRight, MatrixBlock mbOut, BinaryOperator bOp, AggregateUnaryOperator uaggOp) 
-		throws DMLRuntimeException
-	{
+	public MatrixBlock  uaggouterchainOperations(MatrixBlock mbLeft, MatrixBlock mbRight, MatrixBlock mbOut, BinaryOperator bOp, AggregateUnaryOperator uaggOp) {
 		double bv[] = DataConverter.convertToDoubleVector(mbRight);
 		int bvi[] = null;
 		
@@ -4822,18 +4698,13 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param ngroups ?
 	 * @param op operator
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public MatrixBlock groupedAggOperations(MatrixValue tgt, MatrixValue wghts, MatrixValue ret, int ngroups, Operator op) 
-		throws DMLRuntimeException 
-	{
+	public MatrixBlock groupedAggOperations(MatrixValue tgt, MatrixValue wghts, MatrixValue ret, int ngroups, Operator op) {
 		//single-threaded grouped aggregate 
 		return groupedAggOperations(tgt, wghts, ret, ngroups, op, 1);
 	}
 
-	public MatrixBlock groupedAggOperations(MatrixValue tgt, MatrixValue wghts, MatrixValue ret, int ngroups, Operator op, int k) 
-		throws DMLRuntimeException
-	{
+	public MatrixBlock groupedAggOperations(MatrixValue tgt, MatrixValue wghts, MatrixValue ret, int ngroups, Operator op, int k) {
 		//setup input matrices
 		MatrixBlock target = checkType(tgt);
 		MatrixBlock weights = checkType(wghts);
@@ -4882,30 +4753,22 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		return result;
 	}
 
-	public MatrixBlock removeEmptyOperations( MatrixBlock ret, boolean rows, boolean emptyReturn, MatrixBlock select )
-		throws DMLRuntimeException 
-	{
+	public MatrixBlock removeEmptyOperations( MatrixBlock ret, boolean rows, boolean emptyReturn, MatrixBlock select ) {
 		return LibMatrixReorg.rmempty(this, ret, rows, emptyReturn, select);
 	}
 
-	public MatrixBlock removeEmptyOperations( MatrixBlock ret, boolean rows, boolean emptyReturn)
-		throws DMLRuntimeException 
-	{
+	public MatrixBlock removeEmptyOperations( MatrixBlock ret, boolean rows, boolean emptyReturn) {
 		return removeEmptyOperations(ret, rows, emptyReturn, null);
 	}
 
-	public MatrixBlock rexpandOperations( MatrixBlock ret, double max, boolean rows, boolean cast, boolean ignore, int k )
-		throws DMLRuntimeException 
-	{	
+	public MatrixBlock rexpandOperations( MatrixBlock ret, double max, boolean rows, boolean cast, boolean ignore, int k ) {
 		MatrixBlock result = checkType(ret);
 		return LibMatrixReorg.rexpand(this, result, max, rows, cast, ignore, k);
 	}
 	
 	
 	@Override
-	public MatrixValue replaceOperations(MatrixValue result, double pattern, double replacement) 
-		throws DMLRuntimeException
-	{
+	public MatrixValue replaceOperations(MatrixValue result, double pattern, double replacement) {
 		MatrixBlock ret = checkType(result);
 		examSparsity(); //ensure its in the right format
 		ret.reset(rlen, clen, sparse);
@@ -5001,9 +4864,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 */
 	@Override
 	public void ctableOperations(Operator op, double scalarThat,
-			MatrixValue that2Val, CTableMap resultMap, MatrixBlock resultBlock)
-		throws DMLRuntimeException 
-	{
+			MatrixValue that2Val, CTableMap resultMap, MatrixBlock resultBlock) {
 		MatrixBlock that2 = checkType(that2Val);
 		CTable ctable = CTable.getCTableFnObject();
 		double v2 = scalarThat;
@@ -5033,7 +4894,6 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	@Override
 	public void ctableOperations(Operator op, double scalarThat,
 			double scalarThat2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLRuntimeException 
 	{
 		CTable ctable = CTable.getCTableFnObject();
 		double v2 = scalarThat;
@@ -5061,7 +4921,6 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	@Override
 	public void ctableOperations(Operator op, MatrixIndexes ix1, double scalarThat,
 			boolean left, int brlen, CTableMap resultMap, MatrixBlock resultBlock)
-		throws DMLRuntimeException 
 	{	
 		CTable ctable = CTable.getCTableFnObject();
 		double w = scalarThat;
@@ -5097,8 +4956,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	@Override
 	public void ctableOperations(Operator op, MatrixValue thatVal, double scalarThat2, boolean ignoreZeros,
 			     CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLRuntimeException 
-	{	
+	{
 		//setup ctable computation
 		MatrixBlock that = checkType(thatVal);
 		CTable ctable = CTable.getCTableFnObject();
@@ -5157,11 +5015,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param thatMatrix matrix value
 	 * @param thatScalar scalar double
 	 * @param resultBlock result matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void ctableOperations(Operator op, MatrixValue thatMatrix, double thatScalar, MatrixBlock resultBlock)
-			throws DMLRuntimeException 
-	{	
+	public void ctableOperations(Operator op, MatrixValue thatMatrix, double thatScalar, MatrixBlock resultBlock) {
 		MatrixBlock that = checkType(thatMatrix);
 		CTable ctable = CTable.getCTableFnObject();
 		double w = thatScalar;
@@ -5193,18 +5048,13 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param thatVal matrix value 1
 	 * @param that2Val matrix value 2
 	 * @param resultMap table map
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public void ctableOperations(Operator op, MatrixValue thatVal, MatrixValue that2Val, CTableMap resultMap)
-		throws DMLRuntimeException 
-	{
+	public void ctableOperations(Operator op, MatrixValue thatVal, MatrixValue that2Val, CTableMap resultMap) {
 		ctableOperations(op, thatVal, that2Val, resultMap, null);
 	}
-		
+	
 	@Override
-	public void ctableOperations(Operator op, MatrixValue thatVal, MatrixValue that2Val, CTableMap resultMap, MatrixBlock resultBlock)
-		throws DMLRuntimeException
-	{	
+	public void ctableOperations(Operator op, MatrixValue thatVal, MatrixValue that2Val, CTableMap resultMap, MatrixBlock resultBlock) {
 		MatrixBlock that = checkType(thatVal);
 		MatrixBlock that2 = checkType(that2Val);
 		CTable ctable = CTable.getCTableFnObject();
@@ -5236,15 +5086,11 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 		}
 	}
 	
-	public MatrixBlock quaternaryOperations(QuaternaryOperator qop, MatrixBlock um, MatrixBlock vm, MatrixBlock wm, MatrixBlock out)
-		throws DMLRuntimeException
-	{
+	public MatrixBlock quaternaryOperations(QuaternaryOperator qop, MatrixBlock um, MatrixBlock vm, MatrixBlock wm, MatrixBlock out) {
 		return quaternaryOperations(qop, um, vm, wm, out, 1);
 	}
 
-	public MatrixBlock quaternaryOperations(QuaternaryOperator qop, MatrixBlock U, MatrixBlock V, MatrixBlock wm, MatrixBlock out, int k)
-		throws DMLRuntimeException
-	{
+	public MatrixBlock quaternaryOperations(QuaternaryOperator qop, MatrixBlock U, MatrixBlock V, MatrixBlock wm, MatrixBlock out, int k) {
 		//check input dimensions
 		if( getNumRows() != U.getNumRows() )
 			throw new DMLRuntimeException("Dimension mismatch rows on quaternary operation: "+getNumRows()+"!="+U.getNumRows());
@@ -5326,11 +5172,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param pdf pdf
 	 * @param seed random seed
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static MatrixBlock randOperations(int rows, int cols, double sparsity, double min, double max, String pdf, long seed) 
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock randOperations(int rows, int cols, double sparsity, double min, double max, String pdf, long seed) {
 		return randOperations(rows, cols, sparsity, min, max, pdf, seed, 1);
 	}
 	
@@ -5346,11 +5189,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param seed random seed
 	 * @param k ?
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static MatrixBlock randOperations(int rows, int cols, double sparsity, double min, double max, String pdf, long seed, int k) 
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock randOperations(int rows, int cols, double sparsity, double min, double max, String pdf, long seed, int k) {
 		RandomMatrixGenerator rgen = new RandomMatrixGenerator(pdf, rows, cols, 
 				ConfigurationManager.getBlocksize(), ConfigurationManager.getBlocksize(), sparsity, min, max);
 		
@@ -5366,11 +5206,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param rgen random matrix generator
 	 * @param seed seed value
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static MatrixBlock randOperations(RandomMatrixGenerator rgen, long seed) 
-		throws DMLRuntimeException 
-	{
+	public static MatrixBlock randOperations(RandomMatrixGenerator rgen, long seed) {
 		return randOperations(rgen, seed, 1);
 	}
 	
@@ -5381,11 +5218,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param seed seed value
 	 * @param k ?
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static MatrixBlock randOperations(RandomMatrixGenerator rgen, long seed, int k)
-		throws DMLRuntimeException 
-	{
+	public static MatrixBlock randOperations(RandomMatrixGenerator rgen, long seed, int k) {
 		MatrixBlock out = new MatrixBlock();
 		Well1024a bigrand = null;
 
@@ -5420,11 +5254,8 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param bigrand ?
 	 * @param bSeed seed value
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public MatrixBlock randOperationsInPlace(RandomMatrixGenerator rgen, Well1024a bigrand, long bSeed ) 
-		throws DMLRuntimeException
-	{
+	public MatrixBlock randOperationsInPlace(RandomMatrixGenerator rgen, Well1024a bigrand, long bSeed ) {
 		LibMatrixDatagen.generateRandomMatrix(this, rgen, bigrand, bSeed);
 		return this;
 	}
@@ -5448,12 +5279,9 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param bSeed seed value
 	 * @param k ?
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public MatrixBlock randOperationsInPlace(RandomMatrixGenerator rgen, 
-			Well1024a bigrand, long bSeed, int k) 
-		throws DMLRuntimeException
-	{
+			Well1024a bigrand, long bSeed, int k) {
 		LibMatrixDatagen.generateRandomMatrix(this, rgen, bigrand, bSeed, k);
 		return this;
 	}
@@ -5474,31 +5302,21 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 	 * @param to ?
 	 * @param incr ?
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static MatrixBlock seqOperations(double from, double to, double incr) 
-		throws DMLRuntimeException 
-	{
+	public static MatrixBlock seqOperations(double from, double to, double incr) {
 		MatrixBlock out = new MatrixBlock();
 		LibMatrixDatagen.generateSequence( out, from, to, incr );
-		
 		return out;
 	}
 
-	public MatrixBlock seqOperationsInPlace(double from, double to, double incr) 
-		throws DMLRuntimeException 
-	{
+	public MatrixBlock seqOperationsInPlace(double from, double to, double incr) {
 		LibMatrixDatagen.generateSequence( this, from, to, incr );
-		
 		return this;
 	}
 
-	public static MatrixBlock sampleOperations(long range, int size, boolean replace, long seed) 
-		throws DMLRuntimeException 
-	{
+	public static MatrixBlock sampleOperations(long range, int size, boolean replace, long seed) {
 		MatrixBlock out = new MatrixBlock();
 		LibMatrixDatagen.generateSample( out, range, size, replace, seed );
-		
 		return out;
 	}
 	

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 e59ff0d..aa1a01d 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
@@ -67,8 +67,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 		value=v;
 	}
 
-	private static MatrixCell checkType(MatrixValue cell) throws DMLRuntimeException 
-	{
+	private static MatrixCell checkType(MatrixValue cell) {
 		if( cell!=null && !(cell instanceof MatrixCell))
 			throw new DMLRuntimeException("the Matrix Value is not MatrixCell!");
 		return (MatrixCell) cell;
@@ -170,7 +169,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	@Override
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op,
 			MatrixValue result, int brlen, int bclen,
-			MatrixIndexes indexesIn) throws DMLRuntimeException {
+			MatrixIndexes indexesIn) {
 		
 		MatrixCell c3=checkType(result);
 		if(c3==null)
@@ -190,8 +189,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 
 	@Override
 	public MatrixValue binaryOperations(BinaryOperator op,
-			MatrixValue thatValue, MatrixValue result)
-			throws DMLRuntimeException {
+			MatrixValue thatValue, MatrixValue result) {
 		MatrixCell c2=checkType(thatValue);
 		MatrixCell c3=checkType(result);
 		if(c3==null)
@@ -202,21 +200,18 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 
 	@Override
 	public void binaryOperationsInPlace(BinaryOperator op,
-			MatrixValue thatValue)
-			throws DMLRuntimeException {
+			MatrixValue thatValue) {
 		MatrixCell c2=checkType(thatValue);
 		setValue(op.fn.execute(this.getValue(), c2.getValue()));
-		
 	}
 
-	public void denseScalarOperationsInPlace(ScalarOperator op)
-			throws DMLRuntimeException {
+	public void denseScalarOperationsInPlace(ScalarOperator op) {
 		value=op.executeScalar(value);
 	}
 
 	@Override
 	public MatrixValue reorgOperations(ReorgOperator op, MatrixValue result,
-			int startRow, int startColumn, int length) throws DMLRuntimeException {		
+			int startRow, int startColumn, int length) { 
 		MatrixCell c3=checkType(result);
 		if(c3==null)
 			c3=new MatrixCell();
@@ -225,26 +220,22 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	}
 
 	@Override
-	public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) throws DMLRuntimeException {
-		
+	public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) {
 		MatrixCell c3=checkType(result);
 		c3.setValue(op.fn.execute(value, op.getConstant()));
 		return c3;
 	}
 
-	public void sparseScalarOperationsInPlace(ScalarOperator op)
-			throws DMLRuntimeException {
+	public void sparseScalarOperationsInPlace(ScalarOperator op) {
 		value=op.executeScalar(value);
 	}
 
-	public void sparseUnaryOperationsInPlace(UnaryOperator op)
-			throws DMLRuntimeException {
+	public void sparseUnaryOperationsInPlace(UnaryOperator op) {
 		value=op.fn.execute(value);
 	}
 
 	@Override
-	public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result)
-			throws DMLRuntimeException {
+	public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result) {
 		MatrixCell c3=checkType(result);
 		c3.setValue(op.fn.execute(value));
 		return c3;
@@ -275,14 +266,12 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 
 	@Override
 	public void incrementalAggregate(AggregateOperator aggOp,
-			MatrixValue correction, MatrixValue newWithCorrection)
-			throws DMLRuntimeException {
+			MatrixValue correction, MatrixValue newWithCorrection) {
 		throw new DMLRuntimeException("MatrixCell.incrementalAggregate should never be called");
 	}
 
 	@Override
-	public MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary)
-			throws DMLRuntimeException {
+	public MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary) {
 		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);
@@ -292,16 +281,13 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 
 	@Override
 	public void incrementalAggregate(AggregateOperator aggOp,
-			MatrixValue newWithCorrection)
-			throws DMLRuntimeException {
+			MatrixValue newWithCorrection) {
 		throw new DMLRuntimeException("MatrixCell.incrementalAggregate should never be called");
 	}
 
 	@Override
 	public void ctableOperations(Operator op, MatrixValue that,
-			MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLRuntimeException 
-	{
+			MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock) {
 		MatrixCell c2=checkType(that);
 		MatrixCell c3=checkType(that2);
 		CTable ctable = CTable.getCTableFnObject();
@@ -313,9 +299,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 
 	@Override
 	public void ctableOperations(Operator op, MatrixValue that, double scalarThat2, boolean ignoreZeros, 
-			CTableMap ctableResult, MatrixBlock ctableResultBlock)
-			throws DMLRuntimeException 
-	{
+			CTableMap ctableResult, MatrixBlock ctableResultBlock) {
 		MatrixCell c2=checkType(that);
 		CTable ctable = CTable.getCTableFnObject();
 		if ( ctableResult != null)
@@ -326,9 +310,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 
 	@Override
 	public void ctableOperations(Operator op, double scalarThat,
-			double scalarThat2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLRuntimeException 
-	{
+			double scalarThat2, CTableMap resultMap, MatrixBlock resultBlock) {
 		CTable ctable = CTable.getCTableFnObject();
 		if ( resultMap != null)
 			ctable.execute(this.value, scalarThat, scalarThat2, false, resultMap);
@@ -338,9 +320,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	
 	@Override
 	public void ctableOperations(Operator op, MatrixIndexes ix1, double scalarThat, boolean left, int brlen,
-			CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLRuntimeException 
-	{
+			CTableMap resultMap, MatrixBlock resultBlock) {
 		//ctable expand (column vector to ctable)
 		CTable ctable = CTable.getCTableFnObject();
 		if ( resultMap != null ) {
@@ -359,9 +339,7 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 
 	@Override
 	public void ctableOperations(Operator op, double scalarThat,
-			MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLRuntimeException 
-	{
+			MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock) {
 		MatrixCell c3=checkType(that2);
 		CTable ctable = CTable.getCTableFnObject();
 		if ( resultMap != null)
@@ -374,16 +352,12 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	@Override
 	public void slice(ArrayList<IndexedMatrixValue> outlist,
 			IndexRange range, int rowCut, int colCut, int blockRowFactor,
-			int blockColFactor, int boundaryRlen, int boundaryClen)
-			throws DMLRuntimeException {
+			int blockColFactor, int boundaryRlen, int boundaryClen) {
 		((MatrixCell)outlist.get(0).getValue()).setValue(this.value);
-		
 	}
 	
 	@Override
-	public MatrixValue replaceOperations(MatrixValue result, double pattern, double replacement)
-			throws DMLRuntimeException 
-	{
+	public MatrixValue replaceOperations(MatrixValue result, double pattern, double replacement) {
 		MatrixCell out = checkType(result);
 		if( value == pattern || (Double.isNaN(pattern) && Double.isNaN(value)) )
 			out.value = replacement;
@@ -395,18 +369,15 @@ public class MatrixCell extends MatrixValue implements WritableComparable, Seria
 	@Override
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op,
 			MatrixValue result, int blockingFactorRow, int blockingFactorCol,
-			MatrixIndexes indexesIn, boolean inCP)
-			throws DMLRuntimeException {
+			MatrixIndexes indexesIn, boolean inCP) {
 		return aggregateUnaryOperations(op,	result, blockingFactorRow, blockingFactorCol,indexesIn);
 	}
 
 	@Override
 	public void append(MatrixValue valueIn2, ArrayList<IndexedMatrixValue> outlist,
-			int blockRowFactor, int blockColFactor, boolean cbind, boolean m2IsLast, int nextNCol) 
-	throws DMLRuntimeException  {
+			int blockRowFactor, int blockColFactor, boolean cbind, boolean m2IsLast, int nextNCol) {
 		((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/systemml/blob/1f323976/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 4ede878..ecf44b6 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
@@ -57,15 +57,13 @@ public class MatrixPackedCell extends MatrixCell
 		extra_size=size;
 	}
 	
-	public static MatrixPackedCell checkType(MatrixValue cell) throws DMLRuntimeException
-	{
+	public static MatrixPackedCell checkType(MatrixValue cell) {
 		if( cell!=null && !(cell instanceof MatrixPackedCell))
 			throw new DMLRuntimeException("the Matrix Value is not MatrixPackedCell!");
 		return (MatrixPackedCell) cell;
 	}
 	
-	public double getExtraByPostition(int i)
-	{
+	public double getExtraByPostition(int i) {
 		if(extras==null || i>=extra_size)
 			return 0;
 		else
@@ -75,16 +73,13 @@ public class MatrixPackedCell extends MatrixCell
 	//with corrections
 	@Override
 	public void incrementalAggregate(AggregateOperator aggOp, MatrixValue correction, 
-			MatrixValue newWithCorrection)throws DMLRuntimeException {
+			MatrixValue newWithCorrection) {
 		incrementalAggregate(aggOp, newWithCorrection);
 	}
 	
 	//with corrections
 	@Override
-	public void incrementalAggregate(AggregateOperator aggOp,
-			MatrixValue newWithCorrection)throws DMLRuntimeException {
-
-		
+	public void incrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection) {
 		MatrixPackedCell newWithCor=checkType(newWithCorrection);
 		if(aggOp.correctionLocation==CorrectionLocationType.NONE || aggOp.correctionLocation==CorrectionLocationType.LASTROW || aggOp.correctionLocation==CorrectionLocationType.LASTCOLUMN)
 		{

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 3c1c117..05f0634 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
@@ -24,7 +24,6 @@ import java.util.ArrayList;
 
 import org.apache.hadoop.io.WritableComparable;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue;
 import org.apache.sysml.runtime.matrix.operators.AggregateOperator;
 import org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator;
@@ -96,66 +95,50 @@ public abstract class MatrixValue implements WritableComparable
 	public abstract void reset(int rl, int cl);
 	public abstract void reset(int rl, int cl, boolean sp);
 	public abstract void reset(int rl, int cl, boolean sp, long nnzs);
-	public abstract void reset(int rl, int cl, double v) throws DMLRuntimeException ;
+	public abstract void reset(int rl, int cl, double v);
 
 	public abstract void copy(MatrixValue that);
 	public abstract void copy(MatrixValue that, boolean sp);
 	
-	public abstract MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) 
-	throws DMLRuntimeException;
+	public abstract MatrixValue scalarOperations(ScalarOperator op, MatrixValue result);
 	
-	public abstract MatrixValue binaryOperations(BinaryOperator op, MatrixValue thatValue, MatrixValue result) 
-	throws DMLRuntimeException;
+	public abstract MatrixValue binaryOperations(BinaryOperator op, MatrixValue thatValue, MatrixValue result);
 	
-	public abstract void binaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue) 
-	throws DMLRuntimeException;
+	public abstract void binaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue);
 	
 	public abstract MatrixValue reorgOperations(ReorgOperator op, MatrixValue result,
-			int startRow, int startColumn, int length)
-	throws DMLRuntimeException;
+			int startRow, int startColumn, int length);
 	
-	public abstract void ctableOperations(Operator op, MatrixValue that, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)
-		throws DMLRuntimeException;
+	public abstract void ctableOperations(Operator op, MatrixValue that, MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock);
 	
-	public abstract void ctableOperations(Operator op, MatrixValue that, double scalar_that2, boolean ignoreZeros, CTableMap resultMap, MatrixBlock resultBlock)
-		throws DMLRuntimeException;
+	public abstract void ctableOperations(Operator op, MatrixValue that, double scalar_that2, boolean ignoreZeros, CTableMap resultMap, MatrixBlock resultBlock);
 	
-	public abstract void ctableOperations(Operator op, double scalar_that, double scalar_that2, CTableMap resultMap, MatrixBlock resultBlock)
-		throws DMLRuntimeException;
+	public abstract void ctableOperations(Operator op, double scalar_that, double scalar_that2, CTableMap resultMap, MatrixBlock resultBlock);
 	
-	public abstract void ctableOperations(Operator op, MatrixIndexes ix1, double scalar_that, boolean left, int brlen, CTableMap resultMap, MatrixBlock resultBlock)
-		throws DMLRuntimeException;
+	public abstract void ctableOperations(Operator op, MatrixIndexes ix1, double scalar_that, boolean left, int brlen, CTableMap resultMap, MatrixBlock resultBlock);
 
-	public abstract void ctableOperations(Operator op, double scalarThat, MatrixValue that2, CTableMap ctableResult, MatrixBlock ctableResultBlock)
-		throws DMLRuntimeException;
+	public abstract void ctableOperations(Operator op, double scalarThat, MatrixValue that2, CTableMap ctableResult, MatrixBlock ctableResultBlock);
 	
 	public abstract MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, 
-			int brlen, int bclen, MatrixIndexes indexesIn) throws DMLRuntimeException;
+			int brlen, int bclen, MatrixIndexes indexesIn);
 	
 	public abstract MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, 
-			int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn, boolean inCP) 
-	throws DMLRuntimeException;
+			int blockingFactorRow, int blockingFactorCol, MatrixIndexes indexesIn, boolean inCP);
 	
-	public abstract MatrixValue unaryOperations(UnaryOperator op, MatrixValue result) 
-	throws DMLRuntimeException;
+	public abstract MatrixValue unaryOperations(UnaryOperator op, MatrixValue result);
 
 	public abstract void incrementalAggregate(AggregateOperator aggOp, MatrixValue correction, 
-			MatrixValue newWithCorrection)	throws DMLRuntimeException;
+			MatrixValue newWithCorrection);
 	
-	public abstract void incrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection)
-	throws DMLRuntimeException;
+	public abstract void incrementalAggregate(AggregateOperator aggOp, MatrixValue newWithCorrection);
 
-	public abstract MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary)
-	throws DMLRuntimeException;
+	public abstract MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary);
 	
 	public abstract void slice(ArrayList<IndexedMatrixValue> outlist, IndexRange range, int rowCut, int colCut, 
-			int blockRowFactor, int blockColFactor, int boundaryRlen, int boundaryClen)
-	throws DMLRuntimeException;
+			int blockRowFactor, int blockColFactor, int boundaryRlen, int boundaryClen);
 
-	public abstract MatrixValue replaceOperations( MatrixValue result, double pattern, double replacement )
-			throws DMLRuntimeException;
+	public abstract MatrixValue replaceOperations( MatrixValue result, double pattern, double replacement );
 
 	public abstract void append(MatrixValue valueIn2, ArrayList<IndexedMatrixValue> outlist,
-			int blockRowFactor, int blockColFactor, boolean cbind, boolean m2IsLast, int nextNCol)
-			throws DMLRuntimeException ;
+			int blockRowFactor, int blockColFactor, boolean cbind, boolean m2IsLast, int nextNCol);
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 79cddda..6b5b280 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
@@ -45,9 +45,7 @@ import org.apache.sysml.runtime.util.UtilFunctions;
 public class OperationsOnMatrixValues 
 {
 	public static void performReorg(MatrixIndexes indexesIn, MatrixValue valueIn, MatrixIndexes indexesOut, 
-			         MatrixValue valueOut, ReorgOperator op, int startRow, int startColumn, int length) 
-		throws DMLRuntimeException
-	{
+			         MatrixValue valueOut, ReorgOperator op, int startRow, int startColumn, int length) {
 		//operate on the value indexes first
 		op.fn.execute(indexesIn, indexesOut);
 		
@@ -56,57 +54,43 @@ 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 DMLRuntimeException
-	{
+			ArrayList<IndexedMatrixValue> outlist, int blockRowFactor, int blockColFactor,  boolean cbind, boolean m2IsLast, int nextNCol) {
 		valueIn1.append(valueIn2, outlist, blockRowFactor, blockColFactor, cbind, m2IsLast, nextNCol);
 	}
 	
 	public static void performZeroOut(MatrixIndexes indexesIn, MatrixValue valueIn, 
-			MatrixIndexes indexesOut, MatrixValue valueOut, IndexRange range, boolean complementary) 
-	throws DMLRuntimeException
-	{
+			MatrixIndexes indexesOut, MatrixValue valueOut, IndexRange range, boolean complementary) {
 		valueIn.zeroOutOperations(valueOut, range, complementary);
 		indexesOut.setIndexes(indexesIn);
 	}
 	
 	// ------------- Ternary Operations -------------
 	public static void performCtable(MatrixIndexes indexesIn1, MatrixValue valueIn1, MatrixIndexes indexesIn2, MatrixValue valueIn2, 
-			MatrixIndexes indexesIn3, MatrixValue valueIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op ) 
-		throws DMLRuntimeException
-	{
+			MatrixIndexes indexesIn3, MatrixValue valueIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op ) {
 		//operation on the cells inside the value
 		valueIn1.ctableOperations(op, valueIn2, valueIn3, resultMap, resultBlock);
 	}
 	
 	public static void performCtable(MatrixIndexes indexesIn1, MatrixValue valueIn1, MatrixIndexes indexesIn2, MatrixValue valueIn2, 
-			double scalarIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op) 
-		throws DMLRuntimeException
-	{
+			double scalarIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op) {
 		//operation on the cells inside the value
 		valueIn1.ctableOperations(op, valueIn2, scalarIn3, false, resultMap, resultBlock);
 	}
 	
 	public static void performCtable(MatrixIndexes indexesIn1, MatrixValue valueIn1, double scalarIn2, 
-			double scalarIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op ) 
-		throws DMLRuntimeException
-	{
+			double scalarIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op ) {
 		//operation on the cells inside the value
 		valueIn1.ctableOperations(op, scalarIn2, scalarIn3, resultMap, resultBlock);
 	}
 	
 	public static void performCtable(MatrixIndexes indexesIn1, MatrixValue valueIn1, double scalarIn2, boolean left,
-			int brlen, CTableMap resultMap, MatrixBlock resultBlock, Operator op ) 
-		throws DMLRuntimeException
-	{
+			int brlen, CTableMap resultMap, MatrixBlock resultBlock, Operator op ) {
 		//operation on the cells inside the value
 		valueIn1.ctableOperations(op, indexesIn1, scalarIn2, left, brlen, resultMap, resultBlock);
 	}
 	
 	public static void performCtable(MatrixIndexes indexesIn1, MatrixValue valueIn1, double scalarIn2, 
-			MatrixIndexes indexesIn3, MatrixValue valueIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op ) 
-		throws DMLRuntimeException
-	{
+			MatrixIndexes indexesIn3, MatrixValue valueIn3, CTableMap resultMap, MatrixBlock resultBlock, Operator op ) {
 		//operation on the cells inside the value
 		valueIn1.ctableOperations(op, scalarIn2, valueIn3, resultMap, resultBlock);
 	}
@@ -114,16 +98,12 @@ 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 DMLRuntimeException
-	{
+			MatrixValue valueOut, BinaryOperator op) {
 		value1.binaryOperations(op, value2, valueOut);
 	}
 
 	public static void startAggregation(MatrixValue valueOut, MatrixValue correction, AggregateOperator op, 
-			int rlen, int clen, boolean sparseHint, boolean imbededCorrection)
-		throws DMLRuntimeException
-	{
+			int rlen, int clen, boolean sparseHint, boolean imbededCorrection) {
 		int outRow=0, outCol=0, corRow=0, corCol=0;
 		if(op.correctionExists)
 		{
@@ -215,7 +195,7 @@ public class OperationsOnMatrixValues
 	}
 	
 	public static void incrementalAggregation(MatrixValue valueAgg, MatrixValue correction, MatrixValue valueAdd, 
-			AggregateOperator op, boolean imbededCorrection) throws DMLRuntimeException
+			AggregateOperator op, boolean imbededCorrection)
 	{
 		if(op.correctionExists)
 		{
@@ -229,9 +209,7 @@ public class OperationsOnMatrixValues
 	}
 	
 	public static void performAggregateUnary(MatrixIndexes indexesIn, MatrixValue valueIn, MatrixIndexes indexesOut, 
-			MatrixValue valueOut, AggregateUnaryOperator op,int brlen, int bclen)
-		throws DMLRuntimeException
-	{
+			MatrixValue valueOut, AggregateUnaryOperator op,int brlen, int bclen) {
 		//operate on the value indexes first
 		op.indexFn.execute(indexesIn, indexesOut);
 		
@@ -240,9 +218,7 @@ public class OperationsOnMatrixValues
 	}
 	
 	public static void performAggregateBinary(MatrixIndexes indexes1, MatrixBlock value1, MatrixIndexes indexes2, MatrixBlock value2, 
-			MatrixIndexes indexesOut, MatrixBlock valueOut, AggregateBinaryOperator op)
-	throws DMLRuntimeException
-	{
+			MatrixIndexes indexesOut, MatrixBlock valueOut, AggregateBinaryOperator op) {
 		//compute output index
 		indexesOut.setIndexes(indexes1.getRowIndex(), indexes2.getColumnIndex());
 		//perform on the value
@@ -253,8 +229,7 @@ public class OperationsOnMatrixValues
 	}
 
 	public static MatrixValue performAggregateBinaryIgnoreIndexes(MatrixBlock value1, MatrixBlock value2,
-			MatrixBlock valueOut, AggregateBinaryOperator op) 
-	throws DMLRuntimeException {
+			MatrixBlock valueOut, AggregateBinaryOperator op) {
 		//perform on the value
 		if( value2 instanceof CompressedMatrixBlock )
 			value2.aggregateBinaryOperations(value1, value2, valueOut, op);
@@ -264,9 +239,7 @@ public class OperationsOnMatrixValues
 	}
 
 	@SuppressWarnings("rawtypes")
-	public static ArrayList performSlice(IndexRange ixrange, int brlen, int bclen, int iix, int jix, CacheBlock in) 
-		throws DMLRuntimeException
-	{
+	public static ArrayList performSlice(IndexRange ixrange, int brlen, int bclen, int iix, int jix, CacheBlock in) {
 		if( in instanceof MatrixBlock )
 			return performSlice(ixrange, brlen, bclen, iix, jix, (MatrixBlock)in);
 		else if( in instanceof FrameBlock )
@@ -276,9 +249,7 @@ public class OperationsOnMatrixValues
 	
 	
 	@SuppressWarnings("rawtypes")
-	public static ArrayList performSlice(IndexRange ixrange, int brlen, int bclen, int iix, int jix, MatrixBlock in) 
-			throws DMLRuntimeException
-	{
+	public static ArrayList performSlice(IndexRange ixrange, int brlen, int bclen, int iix, int jix, MatrixBlock in) {
 		IndexedMatrixValue imv = new IndexedMatrixValue(new MatrixIndexes(iix, jix), (MatrixBlock)in);
 		ArrayList<IndexedMatrixValue> outlist = new ArrayList<>();
 		performSlice(imv, ixrange, brlen, bclen, outlist);
@@ -286,9 +257,7 @@ public class OperationsOnMatrixValues
 		return SparkUtils.fromIndexedMatrixBlockToPair(outlist);
 	}
 
-	public static void performSlice(IndexedMatrixValue in, IndexRange ixrange, int brlen, int bclen, ArrayList<IndexedMatrixValue> outlist) 
-		throws DMLRuntimeException
-	{
+	public static void performSlice(IndexedMatrixValue in, IndexRange ixrange, int brlen, int bclen, ArrayList<IndexedMatrixValue> outlist) {
 		long cellIndexTopRow = UtilFunctions.computeCellIndex(in.getIndexes().getRowIndex(), brlen, 0);
 		long cellIndexBottomRow = UtilFunctions.computeCellIndex(in.getIndexes().getRowIndex(), brlen, in.getValue().getNumRows()-1);
 		long cellIndexLeftCol = UtilFunctions.computeCellIndex(in.getIndexes().getColumnIndex(), bclen, 0);
@@ -347,9 +316,7 @@ public class OperationsOnMatrixValues
 		in.getValue().slice(outlist, tmpRange, rowCut, colCut, brlen, bclen, boundaryRlen, boundaryClen);
 	}
 
-	public static void performShift(IndexedMatrixValue in, IndexRange ixrange, int brlen, int bclen, long rlen, long clen, ArrayList<IndexedMatrixValue> outlist) 
-		throws DMLRuntimeException
-	{
+	public static void performShift(IndexedMatrixValue in, IndexRange ixrange, int brlen, int bclen, long rlen, long clen, ArrayList<IndexedMatrixValue> outlist) {
 		MatrixIndexes ix = in.getIndexes();
 		MatrixBlock mb = (MatrixBlock)in.getValue();
 		
@@ -398,7 +365,7 @@ public class OperationsOnMatrixValues
 		}
 	}
 
-	public static void performMapGroupedAggregate( Operator op, IndexedMatrixValue inTarget, MatrixBlock groups, int ngroups, int brlen, int bclen, ArrayList<IndexedMatrixValue> outlist ) throws DMLRuntimeException
+	public static void performMapGroupedAggregate( Operator op, IndexedMatrixValue inTarget, MatrixBlock groups, int ngroups, int brlen, int bclen, ArrayList<IndexedMatrixValue> outlist )
 	{
 		MatrixIndexes ix = inTarget.getIndexes();
 		MatrixBlock target = (MatrixBlock)inTarget.getValue();
@@ -409,14 +376,14 @@ public class OperationsOnMatrixValues
 		if( out.getNumRows()<=brlen && out.getNumColumns()<=bclen )
 		{
 			//single output block
-			outlist.add( new IndexedMatrixValue(new MatrixIndexes(1,ix.getColumnIndex()), out) );	
+			outlist.add( new IndexedMatrixValue(new MatrixIndexes(1,ix.getColumnIndex()), out) );
 		}
 		else
 		{
-			//multiple output blocks (by op def, single column block )				
+			//multiple output blocks (by op def, single column block )
 			for(int blockRow = 0; blockRow < (int)Math.ceil(out.getNumRows()/(double)brlen); blockRow++)
 			{
-				int maxRow = (blockRow*brlen + brlen < out.getNumRows()) ? brlen : out.getNumRows() - blockRow*brlen;			
+				int maxRow = (blockRow*brlen + brlen < out.getNumRows()) ? brlen : out.getNumRows() - blockRow*brlen;
 				int row_offset = blockRow*brlen;
 
 				//copy submatrix to block
@@ -424,15 +391,13 @@ public class OperationsOnMatrixValues
 						             0, out.getNumColumns()-1, new MatrixBlock() );
 				
 				//append block to result cache
-				outlist.add(new IndexedMatrixValue(new MatrixIndexes(blockRow+1,ix.getColumnIndex()), tmp));			
+				outlist.add(new IndexedMatrixValue(new MatrixIndexes(blockRow+1,ix.getColumnIndex()), tmp));
 			}
 		}
 	}
 	
 	@SuppressWarnings("rawtypes")
-	public static ArrayList performSlice(IndexRange ixrange, int brlen, int bclen, int iix, int jix, FrameBlock in) 
-			throws DMLRuntimeException
-	{
+	public static ArrayList performSlice(IndexRange ixrange, int brlen, int bclen, int iix, int jix, FrameBlock in) {
 		Pair<Long, FrameBlock> lfp = new Pair<>(new Long(((iix-1)*brlen)+1), in);
 		ArrayList<Pair<Long, FrameBlock>> outlist = new ArrayList<>();
 		performSlice(lfp, ixrange, brlen, bclen, outlist);
@@ -449,11 +414,8 @@ public class OperationsOnMatrixValues
 	 * @param brlen number of rows in a block
 	 * @param bclen number of columns in a block
 	 * @param outlist list of pairs of frame blocks
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void performSlice(Pair<Long,FrameBlock> in, IndexRange ixrange, int brlen, int bclen, ArrayList<Pair<Long,FrameBlock>> outlist) 
-		throws DMLRuntimeException
-	{
+	public static void performSlice(Pair<Long,FrameBlock> in, IndexRange ixrange, int brlen, int bclen, ArrayList<Pair<Long,FrameBlock>> outlist) {
 		long index = in.getKey();
 		FrameBlock block = in.getValue();
 		
@@ -501,9 +463,7 @@ public class OperationsOnMatrixValues
 		block.slice(outlist, tmpRange, rowCut);
 	}
 
-	public static void performShift(Pair<Long,FrameBlock> in, IndexRange ixrange, int brlenLeft, int clenLeft/*, int bclen*/, long rlen, long clen, ArrayList<Pair<Long,FrameBlock>> outlist) 
-		throws DMLRuntimeException
-	{
+	public static void performShift(Pair<Long,FrameBlock> in, IndexRange ixrange, int brlenLeft, int clenLeft/*, int bclen*/, long rlen, long clen, ArrayList<Pair<Long,FrameBlock>> outlist) {
 		Long ix = in.getKey();
 		FrameBlock fb = in.getValue();
 		long start_lhs_globalRowIndex = ixrange.rowStart + (ix-1);
@@ -555,5 +515,4 @@ public class OperationsOnMatrixValues
 			outlist.add(new Pair<>((leftRowIndex-1)*brlenLeft+1, resultBlock));
 		}
 	}
-
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/OutputInfo.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/OutputInfo.java b/src/main/java/org/apache/sysml/runtime/matrix/data/OutputInfo.java
index 1b0424a..ffcd69c 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/OutputInfo.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/OutputInfo.java
@@ -71,7 +71,7 @@ public class OutputInfo implements Serializable
 	public static final OutputInfo CSVOutputInfo=new OutputInfo(UnPaddedOutputFormat.class, 
 			NullWritable.class, RowBlockForTextOutput.class);
 
-	public static InputInfo getMatchingInputInfo(OutputInfo oi) throws DMLRuntimeException {
+	public static InputInfo getMatchingInputInfo(OutputInfo oi) {
 		if ( oi == OutputInfo.BinaryBlockOutputInfo )
 			return InputInfo.BinaryBlockInputInfo;
 		else if ( oi == OutputInfo.MatrixMarketOutputInfo )
@@ -116,9 +116,7 @@ public class OutputInfo implements Serializable
 		return null;
 	}
 	
-	public static String outputInfoToString (OutputInfo oi) 
-		throws DMLRuntimeException
-	{
+	public static String outputInfoToString (OutputInfo oi) {
 		if ( oi == TextCellOutputInfo )
 			return "textcell";
 		else if ( oi == MatrixMarketOutputInfo)


[12/12] systemml git commit: [SYSTEMML-2207] New optional 'secondorder' arg for external functions

Posted by mb...@apache.org.
[SYSTEMML-2207] New optional 'secondorder' arg for external functions

This patch adds an optional argument to the specification of external
functions in order to mark them as 'secondorder', i.e., indicate that
they are calling other functions. Similar to the builtin eval functions,
this flag is in turn used to disable the removal of unused functions,
which might be called within this second order function.


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

Branch: refs/heads/master
Commit: a839b30b26e31f7c1702b24d9a900cb64ad05ec5
Parents: 1f32397
Author: Matthias Boehm <mb...@gmail.com>
Authored: Sat Mar 24 19:34:28 2018 -0700
Committer: Matthias Boehm <mb...@gmail.com>
Committed: Sat Mar 24 19:34:28 2018 -0700

----------------------------------------------------------------------
 .../sysml/hops/ipa/FunctionCallGraph.java       |  8 ++
 .../sysml/parser/ExternalFunctionStatement.java | 23 ++++--
 .../org/apache/sysml/udf/lib/EvalFunction.java  | 84 ++++++++++++++++++++
 .../functions/external/EvalFunctionTest.java    | 74 +++++++++++++++++
 .../scripts/functions/external/SecondOrder.dml  | 33 ++++++++
 .../functions/external/ZPackageSuite.java       |  3 +-
 6 files changed, 216 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/systemml/blob/a839b30b/src/main/java/org/apache/sysml/hops/ipa/FunctionCallGraph.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/hops/ipa/FunctionCallGraph.java b/src/main/java/org/apache/sysml/hops/ipa/FunctionCallGraph.java
index 78cba3d..4268784 100644
--- a/src/main/java/org/apache/sysml/hops/ipa/FunctionCallGraph.java
+++ b/src/main/java/org/apache/sysml/hops/ipa/FunctionCallGraph.java
@@ -36,6 +36,7 @@ import org.apache.sysml.hops.Hop.DataOpTypes;
 import org.apache.sysml.hops.Hop.OpOpN;
 import org.apache.sysml.hops.rewrite.HopRewriteUtils;
 import org.apache.sysml.parser.DMLProgram;
+import org.apache.sysml.parser.ExternalFunctionStatement;
 import org.apache.sysml.parser.ForStatement;
 import org.apache.sysml.parser.ForStatementBlock;
 import org.apache.sysml.parser.FunctionStatement;
@@ -356,6 +357,13 @@ public class FunctionCallGraph
 					
 					//mark as visited for current function call context
 					lfset.add( lfkey );
+					
+					//handle second order external functions
+					FunctionStatementBlock fsb = sb.getDMLProg().getFunctionStatementBlock(lfkey);
+					if( fsb != null && fsb.getStatement(0) instanceof ExternalFunctionStatement
+						&& ((ExternalFunctionStatement)fsb.getStatement(0)).isSecondOrder() ) {
+						ret = true;
+					}
 				}
 				else if( HopRewriteUtils.isData(h, DataOpTypes.TRANSIENTWRITE)
 					&& HopRewriteUtils.isNary(h.getInput().get(0), OpOpN.EVAL) ) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/a839b30b/src/main/java/org/apache/sysml/parser/ExternalFunctionStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/parser/ExternalFunctionStatement.java b/src/main/java/org/apache/sysml/parser/ExternalFunctionStatement.java
index 1a87ebc..00ab76a 100644
--- a/src/main/java/org/apache/sysml/parser/ExternalFunctionStatement.java
+++ b/src/main/java/org/apache/sysml/parser/ExternalFunctionStatement.java
@@ -28,7 +28,7 @@ public class ExternalFunctionStatement extends FunctionStatement
 	public static final String EXEC_TYPE     = "exectype";
 	public static final String CONFIG_FILE   = "configfile";
 	public static final String SIDE_EFFECTS  = "sideeffect";
-	
+	public static final String SECOND_ORDER  = "secondorder";
 	
 	//valid attribute values for execlocation
 	public static final String FILE_BASED    = "file";
@@ -59,6 +59,11 @@ public class ExternalFunctionStatement extends FunctionStatement
 			&& Boolean.parseBoolean(_otherParams.get(SIDE_EFFECTS));
 	}
 	
+	public boolean isSecondOrder() {
+		return _otherParams.containsKey(SECOND_ORDER)
+			&& Boolean.parseBoolean(_otherParams.get(SECOND_ORDER));
+	}
+	
 	/**
 	 * Validates all attributes and attribute values.
 	 * 
@@ -69,7 +74,7 @@ public class ExternalFunctionStatement extends FunctionStatement
 		//warnings for all not defined attributes
 		for( String varName : _otherParams.keySet() )
 			if( !(varName.equals(CLASS_NAME) || varName.equals(EXEC_TYPE) 
-				  || varName.equals(CONFIG_FILE) || varName.equals(SIDE_EFFECTS) ) )
+				  || varName.equals(CONFIG_FILE) || varName.equals(SIDE_EFFECTS) || varName.equals(SECOND_ORDER) ) )
 			{
 				LOG.warn( printWarningLocation() + "External function specifies undefined attribute type '"+varName+"'.");
 			}
@@ -95,12 +100,14 @@ public class ExternalFunctionStatement extends FunctionStatement
 			_otherParams.put(EXEC_TYPE, DEFAULT_EXEC_TYPE);
 		}
 		
-		//side effects
-		if( _otherParams.containsKey( SIDE_EFFECTS ) ) {
-			String sideeffect = _otherParams.get(SIDE_EFFECTS);
-			if( !(sideeffect.equals("true") || sideeffect.equals("false")) ) //always unconditional (invalid parameter)
-				sb.raiseValidateError("External function specifies invalid value for (optional) attribute '"
-					+ SIDE_EFFECTS+"' (valid values: true, false).", false);
+		//side effects/second order
+		for( String param : new String[]{ SIDE_EFFECTS, SECOND_ORDER } ) {
+			if( _otherParams.containsKey( param ) ) {
+				String sideeffect = _otherParams.get(param);
+				if( !(sideeffect.equals("true") || sideeffect.equals("false")) ) //always unconditional (invalid parameter)
+					sb.raiseValidateError("External function specifies invalid value for (optional) attribute '"
+						+ param+"' (valid values: true, false).", false);
+			}
 		}
 	}
 	

http://git-wip-us.apache.org/repos/asf/systemml/blob/a839b30b/src/main/java/org/apache/sysml/udf/lib/EvalFunction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/udf/lib/EvalFunction.java b/src/main/java/org/apache/sysml/udf/lib/EvalFunction.java
new file mode 100644
index 0000000..c9d1028
--- /dev/null
+++ b/src/main/java/org/apache/sysml/udf/lib/EvalFunction.java
@@ -0,0 +1,84 @@
+/*
+ * 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.udf.lib;
+
+import java.util.ArrayList;
+
+import org.apache.commons.lang.NotImplementedException;
+import org.apache.sysml.parser.Expression.DataType;
+
+import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
+import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
+import org.apache.sysml.runtime.controlprogram.context.ExecutionContextFactory;
+import org.apache.sysml.runtime.instructions.cp.CPOperand;
+import org.apache.sysml.runtime.instructions.cp.FunctionCallCPInstruction;
+import org.apache.sysml.udf.FunctionParameter;
+import org.apache.sysml.udf.Matrix;
+import org.apache.sysml.udf.PackageFunction;
+import org.apache.sysml.udf.Scalar;
+import org.apache.sysml.udf.Matrix.ValueType;
+
+/**
+ * This function is for testing purposes only. 
+ */
+public class EvalFunction extends PackageFunction 
+{
+	private static final long serialVersionUID = 1L;
+	
+	private Matrix _ret; 
+	
+	@Override
+	public int getNumFunctionOutputs() {
+		return 1;
+	}
+
+	@Override
+	public FunctionParameter getFunctionOutput(int pos) {
+		switch(pos) {
+			case 0: return _ret;
+			default:
+				throw new RuntimeException("Invalid function output being requested");
+		}
+	}
+
+	@Override
+	public void execute(ExecutionContext ec) {
+		String fname = ((Scalar)getFunctionInput(0)).getValue();
+		MatrixObject in = ((Matrix) getFunctionInput(1)).getMatrixObject();
+		ArrayList<String> inputs = new ArrayList<>(); inputs.add("A");
+		ArrayList<String> outputs = new ArrayList<>(); outputs.add("B");
+		
+		ExecutionContext ec2 = ExecutionContextFactory.createContext(ec.getProgram());
+		CPOperand inName = new CPOperand("TMP", org.apache.sysml.parser.Expression.ValueType.DOUBLE, DataType.MATRIX);
+		ec2.setVariable("TMP", in);
+		
+		FunctionCallCPInstruction fcpi = new FunctionCallCPInstruction(
+			null, fname, new CPOperand[]{inName}, inputs, outputs, "eval func");
+		fcpi.processInstruction(ec2);
+		
+		MatrixObject out = (MatrixObject)ec2.getVariable("B");
+		_ret = new Matrix(out, ValueType.Double);
+	}
+
+	@Override
+	public void execute() {
+		throw new NotImplementedException();
+	}
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/a839b30b/src/test/java/org/apache/sysml/test/integration/functions/external/EvalFunctionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/external/EvalFunctionTest.java b/src/test/java/org/apache/sysml/test/integration/functions/external/EvalFunctionTest.java
new file mode 100644
index 0000000..3165089
--- /dev/null
+++ b/src/test/java/org/apache/sysml/test/integration/functions/external/EvalFunctionTest.java
@@ -0,0 +1,74 @@
+/*
+ * 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.external;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.apache.sysml.runtime.matrix.data.InputInfo;
+import org.apache.sysml.runtime.util.MapReduceTool;
+import org.apache.sysml.test.integration.AutomatedTestBase;
+import org.apache.sysml.test.integration.TestConfiguration;
+
+public class EvalFunctionTest extends AutomatedTestBase 
+{
+	private final static String TEST_NAME = "SecondOrder";
+	private final static String TEST_DIR = "functions/external/";
+	private final static String TEST_CLASS_DIR = TEST_DIR + EvalFunctionTest.class.getSimpleName() + "/";
+	
+	private final static double eps = 1e-7;
+	private final static int rows = 120;
+	private final static int cols = 110;
+	private final static double sparsity = 0.7;
+	
+	
+	@Override
+	public void setUp() {
+		addTestConfiguration(TEST_NAME, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME, new String[] { "Y" }) );
+	}
+
+	@Test
+	public void runEvalFunctionTest() {
+		
+		TestConfiguration config = getTestConfiguration(TEST_NAME);
+		config.addVariable("rows", rows);
+		config.addVariable("cols", cols);
+		loadTestConfiguration(config);
+		
+		String HOME = SCRIPT_DIR + TEST_DIR;
+		fullDMLScriptName = HOME + TEST_NAME + ".dml";
+		programArgs = new String[]{"-args", input("X"), output("Y") };
+		
+		try {
+			double[][] X = getRandomMatrix(rows, cols, 0, 1, sparsity, -7);
+			writeInputMatrixWithMTD("X", X, false);
+			runTest(true, false, null, -1);
+			double[][] Y = MapReduceTool.readMatrixFromHDFS(output("Y"),
+				InputInfo.stringToInputInfo("textcell"), rows, cols, 1000, 1000);
+			for( int i=0; i<rows; i++ )
+				for( int j=0; j<cols; j++ )
+					if( Math.abs(X[i][j]-Y[i][j]+7) > eps )
+						Assert.fail("Wrong results: "+X[i][j]+" vs "+Y[i][j]);
+		} 
+		catch (Exception e)  {
+			e.printStackTrace();
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/systemml/blob/a839b30b/src/test/scripts/functions/external/SecondOrder.dml
----------------------------------------------------------------------
diff --git a/src/test/scripts/functions/external/SecondOrder.dml b/src/test/scripts/functions/external/SecondOrder.dml
new file mode 100644
index 0000000..88cbf47
--- /dev/null
+++ b/src/test/scripts/functions/external/SecondOrder.dml
@@ -0,0 +1,33 @@
+#-------------------------------------------------------------
+#
+# 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.
+#
+#-------------------------------------------------------------
+
+
+foo1 = externalFunction(String fname, Matrix[Double] A)
+return (Matrix[Double] B) 
+implemented in (classname="org.apache.sysml.udf.lib.EvalFunction", exectype="mem", secondorder="true")   
+
+foo2 = function(Matrix[Double] A) return(Matrix[Double] B) {
+   B = A + 7;
+}
+
+X = read($1);
+Y = foo1("foo2", X);
+write(Y, $2)

http://git-wip-us.apache.org/repos/asf/systemml/blob/a839b30b/src/test_suites/java/org/apache/sysml/test/integration/functions/external/ZPackageSuite.java
----------------------------------------------------------------------
diff --git a/src/test_suites/java/org/apache/sysml/test/integration/functions/external/ZPackageSuite.java b/src/test_suites/java/org/apache/sysml/test/integration/functions/external/ZPackageSuite.java
index 6da2a1c..cc9fd1b 100644
--- a/src/test_suites/java/org/apache/sysml/test/integration/functions/external/ZPackageSuite.java
+++ b/src/test_suites/java/org/apache/sysml/test/integration/functions/external/ZPackageSuite.java
@@ -28,8 +28,9 @@ import org.junit.runners.Suite;
 @Suite.SuiteClasses({
 	DynProjectTest.class,
 	DynReadWriteTest.class,
+	EvalFunctionTest.class,
 	FunctionExpressionsTest.class,
-	OrderTest.class
+	OrderTest.class,
 })
 
 


[06/12] systemml git commit: [SYSTEMML-2191] Cleanup exception hierarchy and handling, part 3

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 79d791d..3e09d17 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
@@ -79,9 +79,7 @@ public class ReorgSPInstruction extends UnarySPInstruction {
 		_bSortIndInMem = bSortIndInMem;
 	}
 
-	public static ReorgSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static ReorgSPInstruction parseInstruction ( String str ) {
 		CPOperand in = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand out = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		String opcode = InstructionUtils.getOpCode(str);
@@ -120,9 +118,7 @@ public class ReorgSPInstruction extends UnarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		String opcode = getOpcode();
 
@@ -217,9 +213,7 @@ public class ReorgSPInstruction extends UnarySPInstruction {
 		sec.addLineageRDD(output.getName(), input1.getName());
 	}
 
-	private void updateReorgMatrixCharacteristics(SparkExecutionContext sec) 
-		throws DMLRuntimeException
-	{
+	private void updateReorgMatrixCharacteristics(SparkExecutionContext sec) {
 		MatrixCharacteristics mc1 = sec.getMatrixCharacteristics(input1.getName());
 		MatrixCharacteristics mcOut = sec.getMatrixCharacteristics(output.getName());
 		
@@ -256,19 +250,14 @@ public class ReorgSPInstruction extends UnarySPInstruction {
 		private ReorgOperator _reorgOp = null;
 		private MatrixCharacteristics _mcIn = null;
 		
-		public RDDDiagV2MFunction(MatrixCharacteristics mcIn) 
-			throws DMLRuntimeException 
-		{
+		public RDDDiagV2MFunction(MatrixCharacteristics mcIn) {
 			_reorgOp = new ReorgOperator(DiagIndex.getDiagIndexFnObject());
 			_mcIn = mcIn;
 		}
 		
 		@Override
-		public Iterator<Tuple2<MatrixIndexes, MatrixBlock>> call( Tuple2<MatrixIndexes, MatrixBlock> arg0 ) 
-			throws Exception 
-		{
+		public Iterator<Tuple2<MatrixIndexes, MatrixBlock>> call( Tuple2<MatrixIndexes, MatrixBlock> arg0 ) {
 			ArrayList<Tuple2<MatrixIndexes, MatrixBlock>> ret = new ArrayList<>();
-			
 			MatrixIndexes ixIn = arg0._1();
 			MatrixBlock blkIn = arg0._2();
 			
@@ -299,16 +288,12 @@ public class ReorgSPInstruction extends UnarySPInstruction {
 		
 		private MatrixCharacteristics _mcIn = null;
 		
-		public RDDRevFunction(MatrixCharacteristics mcIn) 
-			throws DMLRuntimeException 
-		{
+		public RDDRevFunction(MatrixCharacteristics mcIn) {
 			_mcIn = mcIn;
 		}
 		
 		@Override
-		public Iterator<Tuple2<MatrixIndexes, MatrixBlock>> call( Tuple2<MatrixIndexes, MatrixBlock> arg0 ) 
-			throws Exception 
-		{
+		public Iterator<Tuple2<MatrixIndexes, MatrixBlock>> call( Tuple2<MatrixIndexes, MatrixBlock> arg0 ) {
 			//construct input
 			IndexedMatrixValue in = SparkUtils.toIndexedMatrixBlock(arg0);
 			
@@ -352,9 +337,7 @@ public class ReorgSPInstruction extends UnarySPInstruction {
 			_bclen = mc.getColsPerBlock();
 		}
 		
-		public Tuple2<MatrixIndexes, MatrixBlock> call(Tuple2<MatrixIndexes, MatrixBlock> arg0)
-			throws Exception 
-		{
+		public Tuple2<MatrixIndexes, MatrixBlock> call(Tuple2<MatrixIndexes, MatrixBlock> arg0) {
 			MatrixIndexes ix = arg0._1();
 			MatrixBlock in = arg0._2();
 			MatrixBlock out = new MatrixBlock(in.getNumRows(), _cols.length, true);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 1aceee8..05f3870 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
@@ -54,9 +54,7 @@ public class RmmSPInstruction extends BinarySPInstruction {
 		super(SPType.RMM, op, in1, in2, out, opcode, istr);
 	}
 
-	public static RmmSPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static RmmSPInstruction parseInstruction( String str ) {
 		String parts[] = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 
@@ -69,13 +67,11 @@ public class RmmSPInstruction extends BinarySPInstruction {
 		} 
 		else {
 			throw new DMLRuntimeException("RmmSPInstruction.parseInstruction():: Unknown opcode " + opcode);
-		}		
+		}
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//get input rdds

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 e3d8dfd..cae232e 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
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.spark;
 
 import org.apache.sysml.lops.runtime.RunMRJobs;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.Instruction;
 import org.apache.sysml.runtime.instructions.SPInstructionParser;
@@ -74,9 +73,7 @@ public abstract class SPInstruction extends Instruction {
 	}
 	
 	@Override
-	public Instruction preprocessInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public Instruction preprocessInstruction(ExecutionContext ec) {
 		//default pre-process behavior (e.g., debug state)
 		Instruction tmp = super.preprocessInstruction(ec);
 		
@@ -92,13 +89,10 @@ public abstract class SPInstruction extends Instruction {
 	}
 
 	@Override 
-	public abstract void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException;
+	public abstract void processInstruction(ExecutionContext ec);
 
 	@Override
-	public void postprocessInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{
+	public void postprocessInstruction(ExecutionContext ec) {
 		//maintain statistics
 		Statistics.incrementNoOfExecutedSPInst();
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/SpoofSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/SpoofSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/SpoofSPInstruction.java
index 2f41fa7..314e118 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/SpoofSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/SpoofSPInstruction.java
@@ -83,9 +83,7 @@ public class SpoofSPInstruction extends SPInstruction {
 		_out = out;
 	}
 
-	public static SpoofSPInstruction parseInstruction(String str) 
-		throws DMLRuntimeException
-	{
+	public static SpoofSPInstruction parseInstruction(String str) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		
 		//String opcode = parts[0];
@@ -103,9 +101,7 @@ public class SpoofSPInstruction extends SPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//decide upon broadcast side inputs
@@ -242,9 +238,7 @@ public class SpoofSPInstruction extends SPInstruction {
 		}
 	}
 	
-	private static boolean[] determineBroadcastInputs(SparkExecutionContext sec, CPOperand[] inputs) 
-		throws DMLRuntimeException 
-	{
+	private static boolean[] determineBroadcastInputs(SparkExecutionContext sec, CPOperand[] inputs) {
 		boolean[] ret = new boolean[inputs.length];
 		double localBudget = OptimizerUtils.getLocalMemBudget()
 			- CacheableData.getBroadcastSize(); //account for other broadcasts
@@ -270,9 +264,7 @@ public class SpoofSPInstruction extends SPInstruction {
 		return ret;
 	}
 	
-	private static boolean[] getMatrixBroadcastVector(SparkExecutionContext sec, CPOperand[] inputs, boolean[] bcVect) 
-			throws DMLRuntimeException 
-	{
+	private static boolean[] getMatrixBroadcastVector(SparkExecutionContext sec, CPOperand[] inputs, boolean[] bcVect) {
 		int numMtx = (int) Arrays.stream(inputs)
 			.filter(in -> in.getDataType().isMatrix()).count();
 		boolean[] ret = new boolean[numMtx];
@@ -282,9 +274,7 @@ public class SpoofSPInstruction extends SPInstruction {
 		return ret;
 	}
 	
-	private static JavaPairRDD<MatrixIndexes, MatrixBlock[]> createJoinedInputRDD(SparkExecutionContext sec, CPOperand[] inputs, boolean[] bcVect, boolean outer) 
-		throws DMLRuntimeException
-	{
+	private static JavaPairRDD<MatrixIndexes, MatrixBlock[]> createJoinedInputRDD(SparkExecutionContext sec, CPOperand[] inputs, boolean[] bcVect, boolean outer) {
 		//get input rdd for main input
 		int main = getMainInputIndex(inputs, bcVect);
 		MatrixCharacteristics mcIn = sec.getMatrixCharacteristics(inputs[main].getName());
@@ -313,9 +303,7 @@ public class SpoofSPInstruction extends SPInstruction {
 		return ret;
 	}
 	
-	private static void maintainLineageInfo(SparkExecutionContext sec, CPOperand[] inputs, boolean[] bcVect, CPOperand output) 
-		throws DMLRuntimeException 
-	{
+	private static void maintainLineageInfo(SparkExecutionContext sec, CPOperand[] inputs, boolean[] bcVect, CPOperand output) {
 		//add lineage info for all rdd/broadcast inputs 
 		for( int i=0; i<inputs.length; i++ )
 			if( inputs[i].getDataType().isMatrix() )
@@ -327,9 +315,7 @@ public class SpoofSPInstruction extends SPInstruction {
 			.filter(i -> inputs[i].isMatrix() && !bcVect[i]).min().orElse(0);
 	}
 	
-	private void updateOutputMatrixCharacteristics(SparkExecutionContext sec, SpoofOperator op) 
-		throws DMLRuntimeException 
-	{
+	private void updateOutputMatrixCharacteristics(SparkExecutionContext sec, SpoofOperator op) {
 		if(op instanceof SpoofCellwise)
 		{
 			MatrixCharacteristics mcIn = sec.getMatrixCharacteristics(_in[0].getName());
@@ -408,15 +394,11 @@ public class SpoofSPInstruction extends SPInstruction {
 			_className = className;
 		}
 		
-		protected ArrayList<MatrixBlock> getAllMatrixInputs(MatrixIndexes ixIn, MatrixBlock[] blkIn) 
-			throws DMLRuntimeException 
-		{
+		protected ArrayList<MatrixBlock> getAllMatrixInputs(MatrixIndexes ixIn, MatrixBlock[] blkIn) {
 			return getAllMatrixInputs(ixIn, blkIn, false);
 		}
 		
-		protected ArrayList<MatrixBlock> getAllMatrixInputs(MatrixIndexes ixIn, MatrixBlock[] blkIn, boolean outer) 
-			throws DMLRuntimeException 
-		{
+		protected ArrayList<MatrixBlock> getAllMatrixInputs(MatrixIndexes ixIn, MatrixBlock[] blkIn, boolean outer) {
 			ArrayList<MatrixBlock> ret = new ArrayList<>();
 			//add all rdd/broadcast inputs (main and side inputs)
 			for( int i=0, posRdd=0, posBc=0; i<_bcInd.length; i++ ) {
@@ -444,18 +426,14 @@ public class SpoofSPInstruction extends SPInstruction {
 		private final int _clen2;
 		private SpoofRowwise _op = null;
 		
-		public RowwiseFunction(String className, byte[] classBytes, boolean[] bcInd, ArrayList<PartitionedBroadcast<MatrixBlock>> bcMatrices, ArrayList<ScalarObject> scalars, int clen, int clen2) 
-			throws DMLRuntimeException
-		{			
+		public RowwiseFunction(String className, byte[] classBytes, boolean[] bcInd, ArrayList<PartitionedBroadcast<MatrixBlock>> bcMatrices, ArrayList<ScalarObject> scalars, int clen, int clen2) {
 			super(className, classBytes, bcInd, bcMatrices, scalars);
 			_clen = clen;
 			_clen2 = clen;
 		}
 		
 		@Override
-		public Iterator<Tuple2<MatrixIndexes, MatrixBlock>> call( Iterator<Tuple2<MatrixIndexes, MatrixBlock[]>> arg ) 
-			throws Exception 
-		{
+		public Iterator<Tuple2<MatrixIndexes, MatrixBlock>> call( Iterator<Tuple2<MatrixIndexes, MatrixBlock[]>> arg ) {
 			//lazy load of shipped class
 			if( _op == null ) {
 				Class<?> loadedClass = CodegenUtils.getClassSync(_className, _classBytes);
@@ -506,9 +484,7 @@ public class SpoofSPInstruction extends SPInstruction {
 		
 		private SpoofOperator _op = null;
 		
-		public CellwiseFunction(String className, byte[] classBytes, boolean[] bcInd, ArrayList<PartitionedBroadcast<MatrixBlock>> bcMatrices, ArrayList<ScalarObject> scalars) 
-			throws DMLRuntimeException
-		{
+		public CellwiseFunction(String className, byte[] classBytes, boolean[] bcInd, ArrayList<PartitionedBroadcast<MatrixBlock>> bcMatrices, ArrayList<ScalarObject> scalars) {
 			super(className, classBytes, bcInd, bcMatrices, scalars);
 		}
 		
@@ -558,9 +534,7 @@ public class SpoofSPInstruction extends SPInstruction {
 		
 		private SpoofOperator _op = null;
 		
-		public MultiAggregateFunction(String className, byte[] classBytes, boolean[] bcInd, ArrayList<PartitionedBroadcast<MatrixBlock>> bcMatrices, ArrayList<ScalarObject> scalars) 
-			throws DMLRuntimeException
-		{
+		public MultiAggregateFunction(String className, byte[] classBytes, boolean[] bcInd, ArrayList<PartitionedBroadcast<MatrixBlock>> bcMatrices, ArrayList<ScalarObject> scalars) {
 			super(className, classBytes, bcInd, bcMatrices, scalars);
 		}
 		
@@ -620,9 +594,7 @@ public class SpoofSPInstruction extends SPInstruction {
 		
 		private SpoofOperator _op = null;
 		
-		public OuterProductFunction(String className, byte[] classBytes, boolean[] bcInd, ArrayList<PartitionedBroadcast<MatrixBlock>> bcMatrices, ArrayList<ScalarObject> scalars) 
-				throws DMLRuntimeException
-		{
+		public OuterProductFunction(String className, byte[] classBytes, boolean[] bcInd, ArrayList<PartitionedBroadcast<MatrixBlock>> bcMatrices, ArrayList<ScalarObject> scalars) {
 			super(className, classBytes, bcInd, bcMatrices, scalars);
 		}
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 96fd310..07265ff 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
@@ -23,7 +23,6 @@ import java.io.Serializable;
 
 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.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -36,13 +35,11 @@ import org.apache.sysml.runtime.matrix.operators.TernaryOperator;
 import scala.Tuple2;
 
 public class TernarySPInstruction extends ComputationSPInstruction {
-	private TernarySPInstruction(TernaryOperator op, CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out,
-			String opcode, String str) throws DMLRuntimeException {
+	private TernarySPInstruction(TernaryOperator op, CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out, String opcode, String str) {
 		super(SPType.Ternary, op, in1, in2, in3, out, opcode, str);
 	}
 
-	public static TernarySPInstruction parseInstruction(String str) throws DMLRuntimeException
-	{
+	public static TernarySPInstruction parseInstruction(String str) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode=parts[0];
 		CPOperand operand1 = new CPOperand(parts[1]);
@@ -54,9 +51,7 @@ public class TernarySPInstruction extends ComputationSPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		JavaPairRDD<MatrixIndexes,MatrixBlock> in1 = !input1.isMatrix() ? null :
 			sec.getBinaryBlockRDDHandleForVariable(input1.getName());
@@ -100,9 +95,7 @@ public class TernarySPInstruction extends ComputationSPInstruction {
 			sec.addLineageRDD(output.getName(), input3.getName());
 	}
 	
-	protected void updateTernaryOutputMatrixCharacteristics(SparkExecutionContext sec) 
-		throws DMLRuntimeException
-	{
+	protected void updateTernaryOutputMatrixCharacteristics(SparkExecutionContext sec) {
 		MatrixCharacteristics mcOut = sec.getMatrixCharacteristics(output.getName());
 		for(CPOperand input : new CPOperand[]{input1, input2, input3})
 			if( input.isMatrix() ) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/Tsmm2SPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/Tsmm2SPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/Tsmm2SPInstruction.java
index 344e002..b5e8d87 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/Tsmm2SPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/Tsmm2SPInstruction.java
@@ -61,28 +61,20 @@ public class Tsmm2SPInstruction extends UnarySPInstruction {
 		_type = type;
 	}
 
-	public static Tsmm2SPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static Tsmm2SPInstruction parseInstruction( String str ) {
 		String parts[] = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
-		
 		//check supported opcode 
-		if ( !opcode.equalsIgnoreCase("tsmm2") ) {
-			throw new DMLRuntimeException("Tsmm2SPInstruction.parseInstruction():: Unknown opcode " + opcode);			
-		}
-			
+		if ( !opcode.equalsIgnoreCase("tsmm2") )
+			throw new DMLRuntimeException("Tsmm2SPInstruction.parseInstruction():: Unknown opcode " + opcode);
 		CPOperand in1 = new CPOperand(parts[1]);
 		CPOperand out = new CPOperand(parts[2]);
 		MMTSJType type = MMTSJType.valueOf(parts[3]);
-		
 		return new Tsmm2SPInstruction(null, in1, out, type, opcode, str);
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//get input
@@ -265,9 +257,8 @@ public class Tsmm2SPInstruction extends UnarySPInstruction {
 	 * @param in input matrix block
 	 * @param out output matrix block
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static MatrixBlock transpose(MatrixBlock in, MatrixBlock out) throws DMLRuntimeException {
+	private static MatrixBlock transpose(MatrixBlock in, MatrixBlock out) {
 		if( out == null )
 			out = new MatrixBlock(in.getNumColumns(), in.getNumRows(), in.getNonZeros());
 		else

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 990ed3f..2897778 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
@@ -44,28 +44,20 @@ public class TsmmSPInstruction extends UnarySPInstruction {
 		_type = type;
 	}
 
-	public static TsmmSPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static TsmmSPInstruction parseInstruction( String str ) {
 		String parts[] = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
-		
 		//check supported opcode 
-		if ( !opcode.equalsIgnoreCase("tsmm") ) {
-			throw new DMLRuntimeException("TsmmSPInstruction.parseInstruction():: Unknown opcode " + opcode);			
-		}
-			
+		if ( !opcode.equalsIgnoreCase("tsmm") )
+			throw new DMLRuntimeException("TsmmSPInstruction.parseInstruction():: Unknown opcode " + opcode);
 		CPOperand in1 = new CPOperand(parts[1]);
 		CPOperand out = new CPOperand(parts[2]);
 		MMTSJType type = MMTSJType.valueOf(parts[3]);
-		
 		return new TsmmSPInstruction(null, in1, out, type, opcode, str);
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//get input

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 a711582..118c1b6 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
@@ -76,9 +76,7 @@ public class UaggOuterChainSPInstruction extends BinarySPInstruction {
 		instString = istr;
 	}
 
-	public static UaggOuterChainSPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static UaggOuterChainSPInstruction parseInstruction( String str ) {
 		String parts[] = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 
@@ -106,9 +104,7 @@ public class UaggOuterChainSPInstruction extends BinarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		boolean rightCached = (_uaggOp.indexFn instanceof ReduceCol || _uaggOp.indexFn instanceof ReduceAll
@@ -186,11 +182,8 @@ public class UaggOuterChainSPInstruction extends BinarySPInstruction {
 			return mcIn.dimsKnown() && mcIn.getRows() <= mcIn.getRowsPerBlock();
 	}
 
-	protected void updateUnaryAggOutputMatrixCharacteristics(SparkExecutionContext sec) 
-		throws DMLRuntimeException
-	{	
+	protected void updateUnaryAggOutputMatrixCharacteristics(SparkExecutionContext sec) {
 		String strInput1Name, strInput2Name;
-		
 		if(_uaggOp.indexFn instanceof ReduceCol) {
 			strInput1Name = input1.getName();
 			strInput2Name = input2.getName();
@@ -198,7 +191,6 @@ public class UaggOuterChainSPInstruction extends BinarySPInstruction {
 			strInput1Name = input2.getName();
 			strInput2Name = input1.getName();
 		}
-				
 		MatrixCharacteristics mc1 = sec.getMatrixCharacteristics(strInput1Name);
 		MatrixCharacteristics mc2 = sec.getMatrixCharacteristics(strInput2Name);
 		MatrixCharacteristics mcOut = sec.getMatrixCharacteristics(output.getName());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/UnaryMatrixSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/UnaryMatrixSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/UnaryMatrixSPInstruction.java
index fb1e626..0ce49bb 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/UnaryMatrixSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/UnaryMatrixSPInstruction.java
@@ -23,7 +23,6 @@ import org.apache.spark.api.java.JavaPairRDD;
 import org.apache.spark.api.java.function.Function;
 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.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -39,7 +38,7 @@ public class UnaryMatrixSPInstruction extends UnarySPInstruction {
 		super(SPType.Unary, op, in, out, opcode, instr);
 	}
 	
-	public static UnarySPInstruction parseInstruction ( String str ) throws DMLRuntimeException {
+	public static UnarySPInstruction parseInstruction ( String str ) {
 		CPOperand in = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand out = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		String opcode = parseUnaryInstruction(str, in, out);
@@ -48,9 +47,7 @@ public class UnaryMatrixSPInstruction extends UnarySPInstruction {
 	}
 
 	@Override 
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//get input

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/UnarySPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/UnarySPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/UnarySPInstruction.java
index 0f58789..86a4bd4 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/UnarySPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/UnarySPInstruction.java
@@ -38,25 +38,22 @@ public abstract class UnarySPInstruction extends ComputationSPInstruction {
 		super(type, op, in1, in2, in3, out, opcode, instr);
 	}
 
-	static String parseUnaryInstruction(String instr, CPOperand in,
-			CPOperand out) throws DMLRuntimeException {
+	static String parseUnaryInstruction(String instr, CPOperand in, CPOperand out) {
 		InstructionUtils.checkNumFields(instr, 2);
 		return parse(instr, in, null, null, out);
 	}
 
-	static String parseUnaryInstruction(String instr, CPOperand in1,
-			CPOperand in2, CPOperand out) throws DMLRuntimeException {
+	static String parseUnaryInstruction(String instr, CPOperand in1, CPOperand in2, CPOperand out) {
 		InstructionUtils.checkNumFields(instr, 3);
 		return parse(instr, in1, in2, null, out);
 	}
 
-	static String parseUnaryInstruction(String instr, CPOperand in1,
-			CPOperand in2, CPOperand in3, CPOperand out) throws DMLRuntimeException {
+	static String parseUnaryInstruction(String instr, CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out) {
 		InstructionUtils.checkNumFields(instr, 4);
 		return parse(instr, in1, in2, in3, out);
 	}
 
-	private static String parse(String instr, CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out) throws DMLRuntimeException {
+	private static String parse(String instr, CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(instr);
 		
 		// first part is the opcode, last part is the output, middle parts are input operands

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 76f8c8f..76fd851 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
@@ -64,9 +64,7 @@ public class WriteSPInstruction extends SPInstruction {
 		formatProperties = null; // set in case of csv
 	}
 
-	public static WriteSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static WriteSPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType ( str );
 		String opcode = parts[0];
 		
@@ -116,9 +114,7 @@ public class WriteSPInstruction extends SPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{			
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext) ec;
 
 		//get filename (literal or variable expression)
@@ -151,7 +147,7 @@ public class WriteSPInstruction extends SPInstruction {
 	}
 
 	protected void processMatrixWriteInstruction(SparkExecutionContext sec, String fname, OutputInfo oi) 
-		throws DMLRuntimeException, IOException
+		throws IOException
 	{
 		//get input rdd
 		JavaPairRDD<MatrixIndexes,MatrixBlock> in1 = sec.getBinaryBlockRDDHandleForVariable( input1.getName() );
@@ -235,7 +231,7 @@ public class WriteSPInstruction extends SPInstruction {
 
 	@SuppressWarnings("unchecked")
 	protected void processFrameWriteInstruction(SparkExecutionContext sec, String fname, OutputInfo oi, ValueType[] schema) 
-		throws DMLRuntimeException, IOException
+		throws IOException
 	{
 		//get input rdd
 		JavaPairRDD<Long,FrameBlock> in1 = (JavaPairRDD<Long,FrameBlock>)sec
@@ -268,9 +264,7 @@ public class WriteSPInstruction extends SPInstruction {
 		MapReduceTool.writeMetaDataFile(fname + ".mtd", input1.getValueType(), schema, DataType.FRAME, mc, oi, formatProperties);	
 	}
 
-	private static void customSaveTextFile(JavaRDD<String> rdd, String fname, boolean inSingleFile) 
-		throws DMLRuntimeException 
-	{
+	private static void customSaveTextFile(JavaRDD<String> rdd, String fname, boolean inSingleFile) {
 		if(inSingleFile) {
 			Random rand = new Random();
 			String randFName = fname + "_" + rand.nextLong() + "_" + rand.nextLong();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 d31dce5..ec0b300 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
@@ -51,9 +51,7 @@ public class ZipmmSPInstruction extends BinarySPInstruction {
 		_tRewrite = tRewrite;
 	}
 
-	public static ZipmmSPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static ZipmmSPInstruction parseInstruction( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 
@@ -70,13 +68,10 @@ public class ZipmmSPInstruction extends BinarySPInstruction {
 		else {
 			throw new DMLRuntimeException("ZipmmSPInstruction.parseInstruction():: Unknown opcode " + opcode);
 		}
-		
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//get rdd inputs (for computing r = t(X)%*%y via r = t(t(y)%*%X))

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBlock.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBlock.java
index c4febbf..ba4660a 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBlock.java
@@ -146,9 +146,7 @@ public class PartitionedBlock<T extends CacheBlock> implements Externalizable
 	}
 
 	@SuppressWarnings("unchecked")
-	public T getBlock(int rowIndex, int colIndex) 
-		throws DMLRuntimeException 
-	{
+	public T getBlock(int rowIndex, int colIndex) {
 		//check for valid block index
 		int nrblks = getNumRowBlocks();
 		int ncblks = getNumColumnBlocks();
@@ -163,9 +161,7 @@ public class PartitionedBlock<T extends CacheBlock> implements Externalizable
 		return (T)_partBlocks[ix];
 	}
 
-	public void setBlock(int rowIndex, int colIndex, T block) 
-		throws DMLRuntimeException
-	{
+	public void setBlock(int rowIndex, int colIndex, T block) {
 		//check for valid block index
 		int nrblks = getNumRowBlocks();
 		int ncblks = getNumColumnBlocks();
@@ -212,12 +208,9 @@ public class PartitionedBlock<T extends CacheBlock> implements Externalizable
 	 * @param cu column upper bound
 	 * @param block block object
 	 * @return block object
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	@SuppressWarnings("unchecked")
-	public T slice(long rl, long ru, long cl, long cu, T block) 
-		throws DMLRuntimeException 
-	{
+	public T slice(long rl, long ru, long cl, long cu, T block) {
 		int lrl = (int) rl;
 		int lru = (int) ru;
 		int lcl = (int) cl;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBroadcast.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBroadcast.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBroadcast.java
index ef5395b..94fcee4 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBroadcast.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/data/PartitionedBroadcast.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.spark.data;
 import java.io.Serializable;
 
 import org.apache.spark.broadcast.Broadcast;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.caching.CacheBlock;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
@@ -79,9 +78,7 @@ public class PartitionedBroadcast<T extends CacheBlock> implements Serializable
 			Math.min(rlen, brlen) / Math.min(clen, bclen));
 	}
 
-	public T getBlock(int rowIndex, int colIndex) 
-		throws DMLRuntimeException 
-	{
+	public T getBlock(int rowIndex, int colIndex) {
 		int pix = 0;
 		if( _pbc.length > 1 ) { //compute partition index
 			int numPerPart = computeBlocksPerPartition(_mc.getRows(),
@@ -93,9 +90,7 @@ public class PartitionedBroadcast<T extends CacheBlock> implements Serializable
 		return _pbc[pix].value().getBlock(rowIndex, colIndex);
 	}
 	
-	public T slice(long rl, long ru, long cl, long cu, T block) 
-		throws DMLRuntimeException 
-	{
+	public T slice(long rl, long ru, long cl, long cu, T block) {
 		T ret = null;
 		for( Broadcast<PartitionedBlock<T>> bc : _pbc ) {
 			PartitionedBlock<T> pm = bc.value();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ComputeBinaryBlockNnzFunction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ComputeBinaryBlockNnzFunction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ComputeBinaryBlockNnzFunction.java
index 7b6daad..293068d 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ComputeBinaryBlockNnzFunction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ComputeBinaryBlockNnzFunction.java
@@ -29,14 +29,12 @@ public class ComputeBinaryBlockNnzFunction implements Function<MatrixBlock,Matri
 	
 	private LongAccumulator _aNnz = null;
 	
-	public ComputeBinaryBlockNnzFunction( LongAccumulator aNnz )
-	{
+	public ComputeBinaryBlockNnzFunction( LongAccumulator aNnz ) {
 		_aNnz = aNnz;
 	}
 
 	@Override
-	public MatrixBlock call(MatrixBlock arg0) throws Exception 
-	{
+	public MatrixBlock call(MatrixBlock arg0) {
 		_aNnz.add( arg0.getNonZeros() );
 		return arg0;
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ConvertMatrixBlockToIJVLines.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ConvertMatrixBlockToIJVLines.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ConvertMatrixBlockToIJVLines.java
index 621fb06..daaf43c 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ConvertMatrixBlockToIJVLines.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ConvertMatrixBlockToIJVLines.java
@@ -39,7 +39,7 @@ public class ConvertMatrixBlockToIJVLines implements FlatMapFunction<Tuple2<Matr
 	}
 	
 	@Override
-	public Iterator<String> call(Tuple2<MatrixIndexes, MatrixBlock> kv) throws Exception {
+	public Iterator<String> call(Tuple2<MatrixIndexes, MatrixBlock> kv) {
 		final BinaryBlockToTextCellConverter converter = new BinaryBlockToTextCellConverter();
 		converter.setBlockSize(brlen, bclen);
 		converter.convert(kv._1, kv._2);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ConvertStringToLongTextPair.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ConvertStringToLongTextPair.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ConvertStringToLongTextPair.java
index 26dbf5e..8ed25d1 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ConvertStringToLongTextPair.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ConvertStringToLongTextPair.java
@@ -29,8 +29,7 @@ public class ConvertStringToLongTextPair implements PairFunction<String, LongWri
 	private static final long serialVersionUID = 6443041051069809479L;
 
 	@Override
-	public Tuple2<LongWritable, Text> call(String arg0) throws Exception {
+	public Tuple2<LongWritable, Text> call(String arg0) {
 		return new Tuple2<>(new LongWritable(1), new Text(arg0));
 	}
-
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ExtractBlockForBinaryReblock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ExtractBlockForBinaryReblock.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ExtractBlockForBinaryReblock.java
index e6042ed..a2a1ce0 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ExtractBlockForBinaryReblock.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ExtractBlockForBinaryReblock.java
@@ -43,9 +43,7 @@ public class ExtractBlockForBinaryReblock implements PairFlatMapFunction<Tuple2<
 	private int out_brlen; 
 	private int out_bclen;
 	
-	public ExtractBlockForBinaryReblock(MatrixCharacteristics mcIn, MatrixCharacteristics mcOut) 
-		throws DMLRuntimeException 
-	{
+	public ExtractBlockForBinaryReblock(MatrixCharacteristics mcIn, MatrixCharacteristics mcOut) {
 		rlen = mcIn.getRows(); 
 		clen = mcIn.getCols();
 		in_brlen = mcIn.getRowsPerBlock(); 

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ReorgMapFunction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ReorgMapFunction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ReorgMapFunction.java
index 111e3b9..8fada07 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ReorgMapFunction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/functions/ReorgMapFunction.java
@@ -39,9 +39,7 @@ public class ReorgMapFunction implements PairFunction<Tuple2<MatrixIndexes, Matr
 	private ReorgOperator _reorgOp = null;
 	private IndexFunction _indexFnObject = null;
 	
-	public ReorgMapFunction(String opcode) 
-			throws DMLRuntimeException 
-	{
+	public ReorgMapFunction(String opcode) {
 		if(opcode.equalsIgnoreCase("r'")) {
 			_indexFnObject = SwapIndex.getSwapIndexFnObject();
 		}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/FrameRDDConverterUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/FrameRDDConverterUtils.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/FrameRDDConverterUtils.java
index ad408a1..05d7791 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/FrameRDDConverterUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/FrameRDDConverterUtils.java
@@ -81,9 +81,7 @@ public class FrameRDDConverterUtils
 
 	public static JavaPairRDD<Long, FrameBlock> csvToBinaryBlock(JavaSparkContext sc,
 			JavaPairRDD<LongWritable, Text> input, MatrixCharacteristics mc, ValueType[] schema,
-			boolean hasHeader, String delim, boolean fill, double fillValue) 
-		throws DMLRuntimeException 
-	{
+			boolean hasHeader, String delim, boolean fill, double fillValue) {
 		//determine unknown dimensions and sparsity if required
 		if( !mc.dimsKnown() ) { //nnz irrelevant here
  			JavaRDD<String> tmp = input.values()
@@ -114,9 +112,7 @@ public class FrameRDDConverterUtils
 
 	public static JavaPairRDD<Long, FrameBlock> csvToBinaryBlock(JavaSparkContext sc,
 			JavaRDD<String> input, MatrixCharacteristics mcOut, ValueType[] schema,
-			boolean hasHeader, String delim, boolean fill, double fillValue) 
-		throws DMLRuntimeException 
-	{
+			boolean hasHeader, String delim, boolean fill, double fillValue) {
 		//convert string rdd to serializable longwritable/text
 		JavaPairRDD<LongWritable, Text> prepinput =
 				input.mapToPair(new StringToSerTextFunction());
@@ -145,21 +141,16 @@ public class FrameRDDConverterUtils
 	// Text cell <--> Binary block
 
 	public static JavaPairRDD<Long, FrameBlock> textCellToBinaryBlock(JavaSparkContext sc,
-			JavaPairRDD<LongWritable, Text> in, MatrixCharacteristics mcOut, ValueType[] schema ) 
-		throws DMLRuntimeException  
-	{
+			JavaPairRDD<LongWritable, Text> in, MatrixCharacteristics mcOut, ValueType[] schema ) {
 		//convert input rdd to serializable long/frame block
 		JavaPairRDD<Long,Text> input = 
 				in.mapToPair(new LongWritableTextToLongTextFunction());
-		
 		//do actual conversion
 		return textCellToBinaryBlockLongIndex(sc, input, mcOut, schema);
 	}
 
 	public static JavaPairRDD<Long, FrameBlock> textCellToBinaryBlockLongIndex(JavaSparkContext sc,
-			JavaPairRDD<Long, Text> input, MatrixCharacteristics mc, ValueType[] schema ) 
-		throws DMLRuntimeException  
-	{
+			JavaPairRDD<Long, Text> input, MatrixCharacteristics mc, ValueType[] schema ) {
 		//prepare default schema if needed
 		if( schema == null || schema.length==1 ) {
 			schema = UtilFunctions.nCopies((int)mc.getCols(), 
@@ -174,9 +165,7 @@ public class FrameRDDConverterUtils
 		return FrameRDDAggregateUtils.mergeByKey( output ); 
 	}
 
-	public static JavaRDD<String> binaryBlockToTextCell(JavaPairRDD<Long, FrameBlock> input, MatrixCharacteristics mcIn) 
-		throws DMLRuntimeException 
-	{
+	public static JavaRDD<String> binaryBlockToTextCell(JavaPairRDD<Long, FrameBlock> input, MatrixCharacteristics mcIn) {
 		//convert frame blocks to ijv string triples  
 		return input.flatMap(new ConvertFrameBlockToIJVLines());
 	}
@@ -185,18 +174,14 @@ public class FrameRDDConverterUtils
 	// Matrix block <--> Binary block
 
 	public static JavaPairRDD<LongWritable, FrameBlock> matrixBlockToBinaryBlock(JavaSparkContext sc,
-			JavaPairRDD<MatrixIndexes, MatrixBlock> input, MatrixCharacteristics mcIn)
-		throws DMLRuntimeException 
-	{
+			JavaPairRDD<MatrixIndexes, MatrixBlock> input, MatrixCharacteristics mcIn) {
 		//convert and map to serializable LongWritable/frame block
 		return matrixBlockToBinaryBlockLongIndex(sc,input, mcIn)
 			.mapToPair(new LongFrameToLongWritableFrameFunction());
 	}
 
 	public static JavaPairRDD<Long, FrameBlock> matrixBlockToBinaryBlockLongIndex(JavaSparkContext sc,
-			JavaPairRDD<MatrixIndexes, MatrixBlock> input, MatrixCharacteristics mcIn)
-		throws DMLRuntimeException 
-	{
+			JavaPairRDD<MatrixIndexes, MatrixBlock> input, MatrixCharacteristics mcIn) {
 		JavaPairRDD<MatrixIndexes, MatrixBlock> in = input;
 		MatrixCharacteristics mc = new MatrixCharacteristics(mcIn);
 		
@@ -230,16 +215,12 @@ public class FrameRDDConverterUtils
 	// DataFrame <--> Binary block
 
 	public static JavaPairRDD<Long, FrameBlock> dataFrameToBinaryBlock(JavaSparkContext sc,
-			Dataset<Row> df, MatrixCharacteristics mc, boolean containsID) 
-		throws DMLRuntimeException 
-	{
+			Dataset<Row> df, MatrixCharacteristics mc, boolean containsID) {
 		return dataFrameToBinaryBlock(sc, df, mc, containsID, new Pair<String[], ValueType[]>());
 	}
 
 	public static JavaPairRDD<Long, FrameBlock> dataFrameToBinaryBlock(JavaSparkContext sc,
-			Dataset<Row> df, MatrixCharacteristics mc, boolean containsID, Pair<String[],ValueType[]> out) 
-		throws DMLRuntimeException 
-	{
+			Dataset<Row> df, MatrixCharacteristics mc, boolean containsID, Pair<String[],ValueType[]> out) {
 		//determine unknown dimensions if required
 		if( !mc.dimsKnown() ) { //nnz are irrelevant here
 			int colVect = getColVectFromDFSchema(df.schema(), containsID);
@@ -646,9 +627,7 @@ public class FrameRDDConverterUtils
 			return fb;
 		}
 
-		private static void flushBlocksToList( Long ix, FrameBlock fb, ArrayList<Tuple2<Long,FrameBlock>> ret ) 
-			throws DMLRuntimeException
-		{
+		private static void flushBlocksToList( Long ix, FrameBlock fb, ArrayList<Tuple2<Long,FrameBlock>> ret ) {
 			if( fb != null && fb.getNumRows()>=0 )
 				ret.add(new Tuple2<>(ix, fb));
 		}
@@ -786,9 +765,7 @@ public class FrameRDDConverterUtils
 			return ret.iterator();
 		}
 
-		private static void flushBlocksToList( Long ix, FrameBlock fb, ArrayList<Tuple2<Long,FrameBlock>> ret ) 
-			throws DMLRuntimeException
-		{
+		private static void flushBlocksToList( Long ix, FrameBlock fb, ArrayList<Tuple2<Long,FrameBlock>> ret ) {
 			if( fb != null && fb.getNumRows()>=0 )
 				ret.add(new Tuple2<>(ix, fb));
 		}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDConverterUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDConverterUtils.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDConverterUtils.java
index 9ed2f00..6e647ee 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDConverterUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDConverterUtils.java
@@ -79,9 +79,7 @@ public class RDDConverterUtils
 	public static final String DF_ID_COLUMN = "__INDEX";
 
 	public static JavaPairRDD<MatrixIndexes, MatrixBlock> textCellToBinaryBlock(JavaSparkContext sc,
-			JavaPairRDD<LongWritable, Text> input, MatrixCharacteristics mcOut, boolean outputEmptyBlocks) 
-		throws DMLRuntimeException  
-	{
+			JavaPairRDD<LongWritable, Text> input, MatrixCharacteristics mcOut, boolean outputEmptyBlocks) {
  		//convert textcell rdd to binary block rdd (w/ partial blocks)
 		JavaPairRDD<MatrixIndexes, MatrixBlock> out = input.values()
 				.mapPartitionsToPair(new TextToBinaryBlockFunction(mcOut));
@@ -99,9 +97,7 @@ public class RDDConverterUtils
 	}
 
 	public static JavaPairRDD<MatrixIndexes, MatrixBlock> binaryCellToBinaryBlock(JavaSparkContext sc,
-			JavaPairRDD<MatrixIndexes, MatrixCell> input, MatrixCharacteristics mcOut, boolean outputEmptyBlocks) 
-		throws DMLRuntimeException 
-	{	
+			JavaPairRDD<MatrixIndexes, MatrixCell> input, MatrixCharacteristics mcOut, boolean outputEmptyBlocks) {
  		//convert binarycell rdd to binary block rdd (w/ partial blocks)
 		JavaPairRDD<MatrixIndexes, MatrixBlock> out = input
 				.mapPartitionsToPair(new BinaryCellToBinaryBlockFunction(mcOut));
@@ -167,9 +163,7 @@ public class RDDConverterUtils
 
 	public static JavaPairRDD<MatrixIndexes, MatrixBlock> csvToBinaryBlock(JavaSparkContext sc,
 			JavaPairRDD<LongWritable, Text> input, MatrixCharacteristics mc, 
-			boolean hasHeader, String delim, boolean fill, double fillValue) 
-		throws DMLRuntimeException 
-	{
+			boolean hasHeader, String delim, boolean fill, double fillValue) {
 		//determine unknown dimensions and sparsity if required
 		if( !mc.dimsKnown(true) ) {
 			LongAccumulator aNnz = sc.sc().longAccumulator("nnz");
@@ -217,12 +211,10 @@ public class RDDConverterUtils
 	 * @param fill if true, fill in empty values with fillValue
 	 * @param fillValue fill value used to fill empty values
 	 * @return matrix as {@code JavaPairRDD<MatrixIndexes, MatrixBlock>}
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static JavaPairRDD<MatrixIndexes, MatrixBlock> csvToBinaryBlock(JavaSparkContext sc,
 			JavaRDD<String> input, MatrixCharacteristics mcOut, 
 			boolean hasHeader, String delim, boolean fill, double fillValue) 
-		throws DMLRuntimeException 
 	{
 		//convert string rdd to serializable longwritable/text
 		JavaPairRDD<LongWritable, Text> prepinput =
@@ -317,11 +309,9 @@ public class RDDConverterUtils
 	 * @param pathX path to binary block output file of features
 	 * @param pathY path to binary block output file of labels
 	 * @param mcOutX matrix characteristics of output matrix X
-	 * @throws DMLRuntimeException if output path not writable or conversion failure
 	 */
 	public static void libsvmToBinaryBlock(JavaSparkContext sc, String pathIn, 
 			String pathX, String pathY, MatrixCharacteristics mcOutX) 
-		throws DMLRuntimeException
 	{
 		if( !mcOutX.dimsKnown() )
 			throw new DMLRuntimeException("Matrix characteristics "
@@ -774,15 +764,13 @@ public class RDDConverterUtils
 		}
 		
 		// Flushes current state of filled column blocks to output list.
-		private static void flushBlocksToList( MatrixIndexes[] ix, MatrixBlock[] mb, ArrayList<Tuple2<MatrixIndexes,MatrixBlock>> ret ) 
-			throws DMLRuntimeException
-		{
-			int len = ix.length;			
+		private static void flushBlocksToList( MatrixIndexes[] ix, MatrixBlock[] mb, ArrayList<Tuple2<MatrixIndexes,MatrixBlock>> ret ) {
+			int len = ix.length;
 			for( int i=0; i<len; i++ )
 				if( mb[i] != null ) {
 					ret.add(new Tuple2<>(ix[i],mb[i]));
 					mb[i].examSparsity(); //ensure right representation
-				}	
+				}
 		}
 	}
 
@@ -891,15 +879,13 @@ public class RDDConverterUtils
 		}
 		
 		// Flushes current state of filled column blocks to output list.
-		private static void flushBlocksToList( MatrixIndexes[] ix, MatrixBlock[] mb, ArrayList<Tuple2<MatrixIndexes,MatrixBlock>> ret ) 
-			throws DMLRuntimeException
-		{
+		private static void flushBlocksToList( MatrixIndexes[] ix, MatrixBlock[] mb, ArrayList<Tuple2<MatrixIndexes,MatrixBlock>> ret ) {
 			int len = ix.length;
 			for( int i=0; i<len; i++ )
 				if( mb[i] != null ) {
 					ret.add(new Tuple2<>(ix[i],mb[i]));
 					mb[i].examSparsity(); //ensure right representation
-				}	
+				}
 		}
 	}
 	
@@ -1125,9 +1111,7 @@ public class RDDConverterUtils
 		}
 		
 		// Flushes current state of filled column blocks to output list.
-		private static void flushBlocksToList( MatrixIndexes[] ix, MatrixBlock[] mb, ArrayList<Tuple2<MatrixIndexes,MatrixBlock>> ret ) 
-			throws DMLRuntimeException
-		{
+		private static void flushBlocksToList( MatrixIndexes[] ix, MatrixBlock[] mb, ArrayList<Tuple2<MatrixIndexes,MatrixBlock>> ret ) {
 			int len = ix.length;
 			for( int i=0; i<len; i++ )
 				if( mb[i] != null ) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDConverterUtilsExt.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDConverterUtilsExt.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDConverterUtilsExt.java
index eddc971..77800e4 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDConverterUtilsExt.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/utils/RDDConverterUtilsExt.java
@@ -93,10 +93,9 @@ public class RDDConverterUtilsExt
 	 * @param mcIn matrix characteristics
 	 * @param outputEmptyBlocks if true, inject empty blocks if necessary
 	 * @return matrix as {@code JavaPairRDD<MatrixIndexes, MatrixBlock>}
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static JavaPairRDD<MatrixIndexes, MatrixBlock> coordinateMatrixToBinaryBlock(JavaSparkContext sc,
-			CoordinateMatrix input, MatrixCharacteristics mcIn, boolean outputEmptyBlocks) throws DMLRuntimeException
+			CoordinateMatrix input, MatrixCharacteristics mcIn, boolean outputEmptyBlocks)
 	{
 		//convert matrix entry rdd to binary block rdd (w/ partial blocks)
 		JavaPairRDD<MatrixIndexes, MatrixBlock> out = input.entries().toJavaRDD()
@@ -115,12 +114,11 @@ public class RDDConverterUtilsExt
 	}
 
 	public static JavaPairRDD<MatrixIndexes, MatrixBlock> coordinateMatrixToBinaryBlock(SparkContext sc,
-			CoordinateMatrix input, MatrixCharacteristics mcIn, boolean outputEmptyBlocks) throws DMLRuntimeException
-	{
+			CoordinateMatrix input, MatrixCharacteristics mcIn, boolean outputEmptyBlocks) {
 		return coordinateMatrixToBinaryBlock(new JavaSparkContext(sc), input, mcIn, true);
 	}
 
-	public static Dataset<Row> projectColumns(Dataset<Row> df, ArrayList<String> columns) throws DMLRuntimeException {
+	public static Dataset<Row> projectColumns(Dataset<Row> df, ArrayList<String> columns) {
 		ArrayList<String> columnToSelect = new ArrayList<String>();
 		for(int i = 1; i < columns.size(); i++) {
 			columnToSelect.add(columns.get(i));
@@ -128,19 +126,19 @@ public class RDDConverterUtilsExt
 		return df.select(columns.get(0), scala.collection.JavaConversions.asScalaBuffer(columnToSelect).toList());
 	}
 
-	public static MatrixBlock convertPy4JArrayToMB(byte [] data, long rlen, long clen) throws DMLRuntimeException {
+	public static MatrixBlock convertPy4JArrayToMB(byte [] data, long rlen, long clen) {
 		return convertPy4JArrayToMB(data, (int)rlen, (int)clen, false);
 	}
 
-	public static MatrixBlock convertPy4JArrayToMB(byte [] data, int rlen, int clen) throws DMLRuntimeException {
+	public static MatrixBlock convertPy4JArrayToMB(byte [] data, int rlen, int clen) {
 		return convertPy4JArrayToMB(data, rlen, clen, false);
 	}
 
-	public static MatrixBlock convertSciPyCOOToMB(byte [] data, byte [] row, byte [] col, long rlen, long clen, long nnz) throws DMLRuntimeException {
+	public static MatrixBlock convertSciPyCOOToMB(byte [] data, byte [] row, byte [] col, long rlen, long clen, long nnz) {
 		return convertSciPyCOOToMB(data, row, col, (int)rlen, (int)clen, (int)nnz);
 	}
 
-	public static MatrixBlock convertSciPyCOOToMB(byte [] data, byte [] row, byte [] col, int rlen, int clen, int nnz) throws DMLRuntimeException {
+	public static MatrixBlock convertSciPyCOOToMB(byte [] data, byte [] row, byte [] col, int rlen, int clen, int nnz) {
 		MatrixBlock mb = new MatrixBlock(rlen, clen, true);
 		mb.allocateSparseRowsBlock(false);
 		ByteBuffer buf1 = ByteBuffer.wrap(data);
@@ -160,7 +158,7 @@ public class RDDConverterUtilsExt
 		return mb;
 	}
 
-	public static MatrixBlock convertPy4JArrayToMB(byte [] data, long rlen, long clen, boolean isSparse) throws DMLRuntimeException {
+	public static MatrixBlock convertPy4JArrayToMB(byte [] data, long rlen, long clen, boolean isSparse) {
 		return convertPy4JArrayToMB(data, (int) rlen, (int) clen, isSparse);
 	}
 
@@ -169,35 +167,35 @@ public class RDDConverterUtilsExt
 		ret.allocateBlock();
 		return ret;
 	}
-	public static MatrixBlock allocateDenseOrSparse(long rlen, long clen, boolean isSparse) throws DMLRuntimeException {
+	public static MatrixBlock allocateDenseOrSparse(long rlen, long clen, boolean isSparse) {
 		if(rlen > Integer.MAX_VALUE || clen > Integer.MAX_VALUE) {
 			throw new DMLRuntimeException("Dimensions of matrix are too large to be passed via NumPy/SciPy:" + rlen + " X " + clen);
 		}
 		return allocateDenseOrSparse(rlen, clen, isSparse);
 	}
 
-	public static void copyRowBlocks(MatrixBlock mb, int rowIndex, MatrixBlock ret, int numRowsPerBlock, int rlen, int clen) throws DMLRuntimeException {
+	public static void copyRowBlocks(MatrixBlock mb, int rowIndex, MatrixBlock ret, int numRowsPerBlock, int rlen, int clen) {
 		copyRowBlocks(mb, (long)rowIndex, ret, (long)numRowsPerBlock, (long)rlen, (long)clen);
 	}
-	public static void copyRowBlocks(MatrixBlock mb, long rowIndex, MatrixBlock ret, int numRowsPerBlock, int rlen, int clen) throws DMLRuntimeException {
+	public static void copyRowBlocks(MatrixBlock mb, long rowIndex, MatrixBlock ret, int numRowsPerBlock, int rlen, int clen) {
 		copyRowBlocks(mb, (long)rowIndex, ret, (long)numRowsPerBlock, (long)rlen, (long)clen);
 	}
-	public static void copyRowBlocks(MatrixBlock mb, int rowIndex, MatrixBlock ret, long numRowsPerBlock, long rlen, long clen) throws DMLRuntimeException {
+	public static void copyRowBlocks(MatrixBlock mb, int rowIndex, MatrixBlock ret, long numRowsPerBlock, long rlen, long clen) {
 		copyRowBlocks(mb, (long)rowIndex, ret, (long)numRowsPerBlock, (long)rlen, (long)clen);
 	}
-	public static void copyRowBlocks(MatrixBlock mb, long rowIndex, MatrixBlock ret, long numRowsPerBlock, long rlen, long clen) throws DMLRuntimeException {
+	public static void copyRowBlocks(MatrixBlock mb, long rowIndex, MatrixBlock ret, long numRowsPerBlock, long rlen, long clen) {
 		// TODO: Double-check if synchronization is required here.
 		// synchronized (RDDConverterUtilsExt.class) {
 			ret.copy((int)(rowIndex*numRowsPerBlock), (int)Math.min((rowIndex+1)*numRowsPerBlock-1, rlen-1), 0, (int)(clen-1), mb, false);
 		// }
 	}
 
-	public static void postProcessAfterCopying(MatrixBlock ret) throws DMLRuntimeException {
+	public static void postProcessAfterCopying(MatrixBlock ret) {
 		ret.recomputeNonZeros();
 		ret.examSparsity();
 	}
 
-	public static MatrixBlock convertPy4JArrayToMB(byte [] data, int rlen, int clen, boolean isSparse) throws DMLRuntimeException {
+	public static MatrixBlock convertPy4JArrayToMB(byte [] data, int rlen, int clen, boolean isSparse) {
 		MatrixBlock mb = new MatrixBlock(rlen, clen, isSparse, -1);
 		if(isSparse) {
 			throw new DMLRuntimeException("Convertion to sparse format not supported");
@@ -219,7 +217,7 @@ public class RDDConverterUtilsExt
 		return mb;
 	}
 
-	public static byte [] convertMBtoPy4JDenseArr(MatrixBlock mb) throws DMLRuntimeException {
+	public static byte [] convertMBtoPy4JDenseArr(MatrixBlock mb) {
 		byte [] ret = null;
 		if(mb.isInSparseFormat()) {
 			mb.sparseToDense();
@@ -290,7 +288,7 @@ public class RDDConverterUtilsExt
 		private static final long serialVersionUID = 4907483236186747224L;
 
 		private IJVToBinaryBlockFunctionHelper helper = null;
-		public MatrixEntryToBinaryBlockFunction(MatrixCharacteristics mc) throws DMLRuntimeException {
+		public MatrixEntryToBinaryBlockFunction(MatrixCharacteristics mc) {
 			helper = new IJVToBinaryBlockFunctionHelper(mc);
 		}
 
@@ -312,19 +310,15 @@ public class RDDConverterUtilsExt
 		private int _brlen = -1;
 		private int _bclen = -1;
 
-		public IJVToBinaryBlockFunctionHelper(MatrixCharacteristics mc) throws DMLRuntimeException
-		{
-			if(!mc.dimsKnown()) {
+		public IJVToBinaryBlockFunctionHelper(MatrixCharacteristics mc) {
+			if(!mc.dimsKnown())
 				throw new DMLRuntimeException("The dimensions need to be known in given MatrixCharacteristics for given input RDD");
-			}
 			_rlen = mc.getRows();
 			_clen = mc.getCols();
 			_brlen = mc.getRowsPerBlock();
 			_bclen = mc.getColsPerBlock();
-
 			//determine upper bounded buffer len
 			_bufflen = (int) Math.min(_rlen*_clen, BUFFER_SIZE);
-
 		}
 
 		// ----------------------------------------------------
@@ -422,12 +416,9 @@ public class RDDConverterUtilsExt
 	 *            dataframe of comma-separated row strings to convert to
 	 *            dataframe of ml.linalg.Vector rows
 	 * @return dataframe of ml.linalg.Vector rows
-	 * @throws DMLRuntimeException
-	 *             if DMLRuntimeException occurs
 	 */
 	public static Dataset<Row> stringDataFrameToVectorDataFrame(SparkSession sparkSession, Dataset<Row> inputDF)
-			throws DMLRuntimeException {
-
+	{
 		StructField[] oldSchema = inputDF.schema().fields();
 		StructField[] newSchema = new StructField[oldSchema.length];
 		for (int i = 0; i < oldSchema.length; i++) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 8571963..ef2bca3 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
@@ -34,7 +34,6 @@ import org.apache.spark.broadcast.Broadcast;
 
 import scala.Tuple2;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.caching.MatrixObject.UpdateType;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
@@ -243,12 +242,10 @@ public class RDDSortUtils
 	 * @param sec spark execution context
 	 * @param r_op reorg operator
 	 * @return data as {@code JavaPairRDD<MatrixIndexes, MatrixBlock>}
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	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
 	{
 		//collect orderby column for in-memory sorting
 		MatrixBlock inMatBlock = SparkExecutionContext

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 b24d56f..546266b 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
@@ -35,7 +35,6 @@ import org.apache.spark.api.java.function.PairFlatMapFunction;
 import org.apache.spark.storage.StorageLevel;
 import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.lops.Checkpoint;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
 import org.apache.sysml.runtime.instructions.spark.functions.CopyBinaryCellFunction;
@@ -165,7 +164,7 @@ public class SparkUtils
 	}
 
 	// This returns RDD with identifier as well as location
-	public static String getStartLineFromSparkDebugInfo(String line) throws DMLRuntimeException {
+	public static String getStartLineFromSparkDebugInfo(String line) {
 		// To remove: (2)  -- Assumption: At max, 9 RDDs as input to transformation/action
 		String withoutPrefix = line.substring(4, line.length());
 		// To remove: [Disk Memory Deserialized 1x Replicated]

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/CleanupMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/CleanupMR.java b/src/main/java/org/apache/sysml/runtime/matrix/CleanupMR.java
index 118016a..1b5607e 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/CleanupMR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/CleanupMR.java
@@ -107,7 +107,7 @@ public class CleanupMR
 	}
 
 	private static void writeCleanupTasksToFile(Path path, int numTasks)
-		throws DMLRuntimeException, IOException
+		throws IOException
 	{
 		FileSystem fs = IOUtilFunctions.getFileSystem(path);
 		try( BufferedWriter br = new BufferedWriter(new OutputStreamWriter(fs.create(path,true))) ) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/DataPartitionMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/DataPartitionMR.java b/src/main/java/org/apache/sysml/runtime/matrix/DataPartitionMR.java
index 762ecde..98b9529 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/DataPartitionMR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/DataPartitionMR.java
@@ -37,7 +37,7 @@ public class DataPartitionMR
 		//prevent instantiation via private constructor
 	}
 	
-	public static JobReturn runJob(MRJobInstruction jobinst, MatrixObject[] inputMatrices, String shuffleInst, byte[] resultIndices, MatrixObject[] outputMatrices, int numReducers, int replication) throws DMLRuntimeException {
+	public static JobReturn runJob(MRJobInstruction jobinst, MatrixObject[] inputMatrices, String shuffleInst, byte[] resultIndices, MatrixObject[] outputMatrices, int numReducers, int replication) {
 		MatrixCharacteristics[] sts = new MatrixCharacteristics[outputMatrices.length];
 		
 		processPartitionInstructions(shuffleInst, inputMatrices, resultIndices, outputMatrices, numReducers, replication, sts);
@@ -46,7 +46,7 @@ public class DataPartitionMR
 		return ret;
 	}
 	
-	private static void processPartitionInstructions(String shuffleInst, MatrixObject[] inputMatrices, byte[] resultIndices, MatrixObject[] outputMatrices, int numReducers, int replication, MatrixCharacteristics[] sts) throws DMLRuntimeException {
+	private static void processPartitionInstructions(String shuffleInst, MatrixObject[] inputMatrices, byte[] resultIndices, MatrixObject[] outputMatrices, int numReducers, int replication, MatrixCharacteristics[] sts) {
 		int i=0;
 		for(String inst : shuffleInst.split(Instruction.INSTRUCTION_DELIM)) {
 			if( InstructionUtils.getOpCode(inst).equalsIgnoreCase("partition") ) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 ae9cfce..d7c7b60 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/GMR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/GMR.java
@@ -35,7 +35,6 @@ import org.apache.sysml.conf.ConfigurationManager;
 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.controlprogram.ParForProgramBlock.PDataPartitionFormat;
 import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
 import org.apache.sysml.runtime.instructions.Instruction;
@@ -314,9 +313,7 @@ public class GMR
 		return new JobReturn(stats, outputInfos, runjob.isSuccessful());
 	}
 
-	private static boolean setupDistributedCache(JobConf job, String instMap, String instRed, String[] inputs, long[] rlens, long[] clens) 
-		throws DMLRuntimeException 
-	{
+	private static boolean setupDistributedCache(JobConf job, String instMap, String instRed, String[] inputs, long[] rlens, long[] clens) {
 		//concatenate mapper and reducer instructions
 		String allInsts = (instMap!=null && !instMap.trim().isEmpty() ) ? instMap : null;
 		if( allInsts==null )
@@ -386,11 +383,8 @@ public class GMR
 	 * @param inst3 instruction 3
 	 * @param inst4 instruction 4
 	 * @return array of byte indexes
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static boolean[] getDistCacheOnlyInputs(byte[] realIndexes, String inst1, String inst2, String inst3, String inst4) 
-		throws DMLRuntimeException
-	{
+	private static boolean[] getDistCacheOnlyInputs(byte[] realIndexes, String inst1, String inst2, String inst3, String inst4) {
 		boolean[] ret = new boolean[realIndexes.length];
 		String[] inst = new String[]{inst1, inst2, inst3, inst4};
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/JobReturn.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/JobReturn.java b/src/main/java/org/apache/sysml/runtime/matrix/JobReturn.java
index 3d846a7..bce2e03 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/JobReturn.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/JobReturn.java
@@ -44,8 +44,7 @@ public class JobReturn
 		}
 	}
 
-	public JobReturn(MatrixCharacteristics[] sts, OutputInfo[] infos,
-			boolean success) throws DMLRuntimeException {
+	public JobReturn(MatrixCharacteristics[] sts, OutputInfo[] infos, boolean success) {
 		successful = success;
 		metadata = new MetaDataFormat[sts.length];
 		for (int i = 0; i < sts.length; i++) {
@@ -53,7 +52,7 @@ public class JobReturn
 		}
 	}
 
-	public JobReturn(MatrixCharacteristics sts, OutputInfo info, boolean success) throws DMLRuntimeException {
+	public JobReturn(MatrixCharacteristics sts, OutputInfo info, boolean success) {
 		successful = success;
 		metadata = new MetaDataFormat[1];
 		metadata[0] = new MetaDataFormat(sts, info, OutputInfo.getMatchingInputInfo(info));
@@ -65,7 +64,7 @@ public class JobReturn
 		metadata[0] = new MetaDataNumItemsByEachReducer(mc, items, partition0, number0s);
 	}
 
-	public boolean checkReturnStatus() throws DMLRuntimeException {
+	public boolean checkReturnStatus() {
 		if( !successful )
 			throw new DMLRuntimeException("Error in executing the DML program.");
 		return successful;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 0fd9f22..1443a8c 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.Arrays;
 import java.util.HashMap;
 
 import org.apache.sysml.lops.MMTSJ.MMTSJType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.mr.AggregateBinaryInstruction;
 import org.apache.sysml.runtime.instructions.mr.AggregateInstruction;
 import org.apache.sysml.runtime.instructions.mr.AggregateUnaryInstruction;
@@ -233,15 +232,11 @@ public class MatrixCharacteristics implements Serializable
 			|| (nonZero < numRows*numColumns - singleBlk);
 	}
 	
-	public static void reorg(MatrixCharacteristics dim, ReorgOperator op, 
-			MatrixCharacteristics dimOut) throws DMLRuntimeException
-	{
+	public static void reorg(MatrixCharacteristics dim, ReorgOperator op, MatrixCharacteristics dimOut) {
 		op.fn.computeDimension(dim, dimOut);
 	}
 	
-	public static void aggregateUnary(MatrixCharacteristics dim, AggregateUnaryOperator op, 
-			MatrixCharacteristics dimOut) throws DMLRuntimeException
-	{
+	public static void aggregateUnary(MatrixCharacteristics dim, AggregateUnaryOperator op, MatrixCharacteristics dimOut) {
 		op.indexFn.computeDimension(dim, dimOut);
 	}
 	
@@ -252,9 +247,7 @@ public class MatrixCharacteristics implements Serializable
 		dimOut.set(dim1.numRows, dim2.numColumns, dim1.numRowsPerBlock, dim2.numColumnsPerBlock);
 	}
 	
-	public static void computeDimension(HashMap<Byte, MatrixCharacteristics> dims, MRInstruction ins) 
-		throws DMLRuntimeException
-	{
+	public static void computeDimension(HashMap<Byte, MatrixCharacteristics> dims, MRInstruction ins) {
 		MatrixCharacteristics dimOut=dims.get(ins.output);
 		if(dimOut==null)
 		{

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/SortMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/SortMR.java b/src/main/java/org/apache/sysml/runtime/matrix/SortMR.java
index d989721..d8b7aed 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/SortMR.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/SortMR.java
@@ -47,7 +47,6 @@ import org.apache.sysml.conf.ConfigurationManager;
 import org.apache.sysml.conf.DMLConfig;
 import org.apache.sysml.lops.Lop;
 import org.apache.sysml.lops.SortKeys;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.instructions.MRJobInstruction;
@@ -308,9 +307,7 @@ public class SortMR
 		}
 	}
 
-	public static MRInstruction parseSortInstruction(String str) 
-		throws DMLRuntimeException 
-	{
+	public static MRInstruction parseSortInstruction(String str) {
 		SortKeys.OperationTypes otype = SortMR.getSortInstructionType(str);
 		if( otype != SortKeys.OperationTypes.Indexes )
 			return (MRInstruction) UnaryInstruction.parseInstruction(str);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 65ef6ec..a2b17ec 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
@@ -51,21 +51,18 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 	
 	@Override
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op,
-			MatrixValue result, int brlen, int bclen, MatrixIndexes indexesIn)
-			throws DMLRuntimeException {
+			MatrixValue result, int brlen, int bclen, MatrixIndexes indexesIn) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 
 	@Override
 	public MatrixValue binaryOperations(BinaryOperator op,
-			MatrixValue thatValue, MatrixValue result)
-			throws DMLRuntimeException {
+			MatrixValue thatValue, MatrixValue result) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 
 	@Override
-	public void binaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue)
-			throws DMLRuntimeException {
+	public void binaryOperationsInPlace(BinaryOperator op, MatrixValue thatValue) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 
@@ -101,15 +98,13 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 
 	@Override
 	public void incrementalAggregate(AggregateOperator aggOp,
-			MatrixValue correction, MatrixValue newWithCorrection)
-			throws DMLRuntimeException {
+			MatrixValue correction, MatrixValue newWithCorrection) {
 		throw new RuntimeException("operation not supported for CM_N_COVCell");
 	}
 	
 	@Override
 	public void incrementalAggregate(AggregateOperator aggOp,
-			MatrixValue newWithCorrection)
-			throws DMLRuntimeException {
+			MatrixValue newWithCorrection) {
 		throw new RuntimeException("operation not supported for CM_N_COVCell");
 	}
 
@@ -125,8 +120,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 DMLRuntimeException {
+			int startRow, int startColumn, int length) {
 		throw new RuntimeException("operation not supported for CM_N_COVCell");
 	}
 
@@ -146,8 +140,7 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 	public void reset(int rl, int cl, double v) {}
 
 	@Override
-	public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result)
-			throws DMLRuntimeException {
+	public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 
@@ -157,8 +150,7 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 	}
 
 	@Override
-	public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result)
-			throws DMLRuntimeException {
+	public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 
@@ -230,72 +222,62 @@ public class CM_N_COVCell extends MatrixValue implements WritableComparable
 	}
 
 	@Override
-	public MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary)
-			throws DMLRuntimeException {
+	public MatrixValue zeroOutOperations(MatrixValue result, IndexRange range, boolean complementary) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 
 	@Override
 	public void ctableOperations(Operator op, MatrixValue that,
-			MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLRuntimeException {
+			MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 
 	@Override
 	public void ctableOperations(Operator op, MatrixValue that,
-			double scalarThat2, boolean ignoreZeros, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLRuntimeException {
+			double scalarThat2, boolean ignoreZeros, CTableMap resultMap, MatrixBlock resultBlock) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 
 	@Override
 	public void ctableOperations(Operator op, double scalarThat,
-			double scalarThat2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLRuntimeException {
+			double scalarThat2, CTableMap resultMap, MatrixBlock resultBlock) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 	
 	@Override
 	public void ctableOperations(Operator op, MatrixIndexes ix1, double scalarThat, boolean left, int brlen,
-			CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLRuntimeException {
+			CTableMap resultMap, MatrixBlock resultBlock) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 
 	@Override
 	public void ctableOperations(Operator op, double scalarThat,
-			MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock)
-			throws DMLRuntimeException {
+			MatrixValue that2, CTableMap resultMap, MatrixBlock resultBlock) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 
 	@Override
 	public void slice(ArrayList<IndexedMatrixValue> outlist,
 			IndexRange range, int rowCut, int colCut, int blockRowFactor,
-			int blockColFactor, int boundaryRlen, int boundaryClen)
-			throws DMLRuntimeException {
+			int blockColFactor, int boundaryRlen, int boundaryClen) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 	
 	@Override
-	public MatrixValue replaceOperations(MatrixValue result, double pattern, double replacement)
-			throws DMLRuntimeException {
+	public MatrixValue replaceOperations(MatrixValue result, double pattern, double replacement) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 
 	@Override
 	public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op,
 			MatrixValue result, int blockingFactorRow, int blockingFactorCol,
-			MatrixIndexes indexesIn, boolean inCP)
-			throws DMLRuntimeException {
+			MatrixIndexes indexesIn, boolean inCP) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 
 	@Override
 	public void append(MatrixValue valueIn2, ArrayList<IndexedMatrixValue> outlist,
-			int blockRowFactor, int blockColFactor, boolean cbind, boolean m2IsLast, int nextNCol)
-	throws DMLRuntimeException   {
+			int blockRowFactor, int blockColFactor, boolean cbind, boolean m2IsLast, int nextNCol) {
 		throw new DMLRuntimeException("operation not supported for CM_N_COVCell");
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/ConvolutionParameters.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/ConvolutionParameters.java b/src/main/java/org/apache/sysml/runtime/matrix/data/ConvolutionParameters.java
index e32b7bc..99d21a2 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/ConvolutionParameters.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/ConvolutionParameters.java
@@ -49,7 +49,7 @@ public class ConvolutionParameters implements Serializable
 	
 	public ConvolutionParameters(long N, long C, long H, long W,
 			long K, long R, long S, long stride_h, long stride_w, 
-			long pad_h, long pad_w, int numThreads) throws DMLRuntimeException {
+			long pad_h, long pad_w, int numThreads) {
 		this.N = convertToInt(N);
 		this.C = convertToInt(C);
 		this.H = convertToInt(H);
@@ -100,7 +100,7 @@ public class ConvolutionParameters implements Serializable
 		this.numThreads = numThreads;
 	}
 	
-	private static int convertToInt(long val) throws DMLRuntimeException {
+	private static int convertToInt(long val) {
 		if( val > Integer.MAX_VALUE )
 			throw new DMLRuntimeException("The value for ConvolutionParameters is too large:" + val);
 		return (int) val;
@@ -123,7 +123,7 @@ public class ConvolutionParameters implements Serializable
 	}
 	
 	public void setIfUnknown(Hop N, Hop C, Hop H, Hop W,
-			Hop K, Hop R, Hop S, Hop stride_h, Hop stride_w, Hop pad_h, Hop pad_w, int numThreads) throws DMLRuntimeException {
+			Hop K, Hop R, Hop S, Hop stride_h, Hop stride_w, Hop pad_h, Hop pad_w, int numThreads) {
 		if(this.N < 0) this.N = convertToInt(Hop.computeSizeInformation(N));
 		if(this.C < 0) this.C = convertToInt(Hop.computeSizeInformation(C));
 		if(this.H < 0) this.H = convertToInt(Hop.computeSizeInformation(H));

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/CudaSupportFunctions.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/CudaSupportFunctions.java b/src/main/java/org/apache/sysml/runtime/matrix/data/CudaSupportFunctions.java
index 52822fe..80e9bec 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/CudaSupportFunctions.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/CudaSupportFunctions.java
@@ -17,7 +17,6 @@
  */
 package org.apache.sysml.runtime.matrix.data;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.gpu.context.GPUContext;
 
 import jcuda.jcublas.cublasHandle;
@@ -81,7 +80,7 @@ public interface CudaSupportFunctions {
 	public int cusparsecsr2dense(cusparseHandle handle, int m, int n, cusparseMatDescr descrA, jcuda.Pointer csrValA, jcuda.Pointer csrRowPtrA, jcuda.Pointer csrColIndA, jcuda.Pointer A, int lda) ;
 	public int cusparsedense2csr(cusparseHandle handle, int m, int n, cusparseMatDescr descrA, jcuda.Pointer A, int lda, jcuda.Pointer nnzPerRow, jcuda.Pointer csrValA, jcuda.Pointer csrRowPtrA, jcuda.Pointer csrColIndA);
 	public int cusparsennz(cusparseHandle handle, int dirA, int m, int n, cusparseMatDescr descrA, jcuda.Pointer A, int lda, jcuda.Pointer nnzPerRowCol, jcuda.Pointer nnzTotalDevHostPtr);
-	public void deviceToHost(GPUContext gCtx, Pointer src, double [] dest, String instName, boolean isEviction) throws DMLRuntimeException;
-	public void hostToDevice(GPUContext gCtx, double [] src,  Pointer dest, String instName) throws DMLRuntimeException;
+	public void deviceToHost(GPUContext gCtx, Pointer src, double [] dest, String instName, boolean isEviction);
+	public void hostToDevice(GPUContext gCtx, double [] src,  Pointer dest, String instName);
 	
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/DoublePrecisionCudaSupportFunctions.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/DoublePrecisionCudaSupportFunctions.java b/src/main/java/org/apache/sysml/runtime/matrix/data/DoublePrecisionCudaSupportFunctions.java
index f31806d..8b7a06f 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/DoublePrecisionCudaSupportFunctions.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/DoublePrecisionCudaSupportFunctions.java
@@ -163,7 +163,7 @@ public class DoublePrecisionCudaSupportFunctions implements CudaSupportFunctions
 	}
 
 	@Override
-	public void deviceToHost(GPUContext gCtx, Pointer src, double[] dest, String instName, boolean isEviction) throws DMLRuntimeException {
+	public void deviceToHost(GPUContext gCtx, Pointer src, double[] dest, String instName, boolean isEviction) {
 		long t1 = DMLScript.FINEGRAINED_STATISTICS  && instName != null? System.nanoTime() : 0;
 		if(src == null)
 			throw new DMLRuntimeException("The source pointer in deviceToHost is null");
@@ -178,7 +178,7 @@ public class DoublePrecisionCudaSupportFunctions implements CudaSupportFunctions
 	}
 
 	@Override
-	public void hostToDevice(GPUContext gCtx, double[] src, Pointer dest, String instName) throws DMLRuntimeException {
+	public void hostToDevice(GPUContext gCtx, double[] src, Pointer dest, String instName) {
 		long t1 = DMLScript.FINEGRAINED_STATISTICS  && instName != null? System.nanoTime() : 0;
 		cudaMemcpy(dest, Pointer.to(src), ((long)src.length)*Sizeof.DOUBLE, cudaMemcpyHostToDevice);
 		if(DMLScript.FINEGRAINED_STATISTICS && instName != null) 


[04/12] systemml git commit: [SYSTEMML-2191] Cleanup exception hierarchy and handling, part 3

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCUDA.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCUDA.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCUDA.java
index 63c57c9..82a76b6 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCUDA.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCUDA.java
@@ -108,9 +108,8 @@ public class LibMatrixCUDA {
 	
 	/**
 	 * Sets the internal state based on the DMLScript.DATA_TYPE
-	 * @throws DMLRuntimeException if error
 	 */
-	public static void resetFloatingPointPrecision() throws DMLRuntimeException {
+	public static void resetFloatingPointPrecision() {
 		if(DMLScript.FLOATING_POINT_PRECISION.equalsIgnoreCase("double")) {
 			LibMatrixCUDA.CUDNN_DATA_TYPE = jcuda.jcudnn.cudnnDataType.CUDNN_DATA_DOUBLE;
 			LibMatrixCUDA.cudaSupportFunctions = new DoublePrecisionCudaSupportFunctions();
@@ -143,19 +142,12 @@ public class LibMatrixCUDA {
 	//***************************** UTILS ********************************/
 	//********************************************************************/
 
-	/*
-	static GPUContext gCtx throws DMLRuntimeException {
-			return GPUContext.gCtx;
-	}
-	 */
-
 	/**
 	 * Utility function to get maximum number of threads supported by the active CUDA device.
 	 * @param gCtx a valid {@link GPUContext}
 	 * @return max threads
-	 * @throws DMLRuntimeException if exception occurs
 	 */
-	static int getMaxThreads(GPUContext gCtx) throws DMLRuntimeException{
+	static int getMaxThreads(GPUContext gCtx){
 		if (_MAX_THREADS == -1){
 			_MAX_THREADS = gCtx.getMaxThreadsPerBlock();
 		}
@@ -166,9 +158,8 @@ public class LibMatrixCUDA {
 	 * Utility function to get maximum number of blocks supported by the active CUDA device.
 	 * @param gCtx a valid {@link GPUContext}
 	 * @return max blocks
-	 * @throws DMLRuntimeException if exception occurs
 	 */
-	static int getMaxBlocks(GPUContext gCtx) throws DMLRuntimeException{
+	static int getMaxBlocks(GPUContext gCtx) {
 		if (_MAX_BLOCKS == -1){
 			_MAX_BLOCKS = gCtx.getMaxBlocks();
 		}
@@ -179,9 +170,8 @@ public class LibMatrixCUDA {
 	 * Utility function to get the warp size supported by the active CUDA device.
 	 * @param gCtx a valid {@link GPUContext}
 	 * @return warp size
-	 * @throws DMLRuntimeException if exception occurs
 	 */
-	static int getWarpSize(GPUContext gCtx) throws DMLRuntimeException {
+	static int getWarpSize(GPUContext gCtx) {
 		if (_WARP_SIZE == -1) {
 			_WARP_SIZE = gCtx.getWarpSize();
 		}
@@ -202,9 +192,8 @@ public class LibMatrixCUDA {
 	 * @param mo matrix object
 	 * @param recomputeDenseNNZ recompute NNZ if dense
 	 * @return number of non-zeroes
-	 * @throws DMLRuntimeException if error
 	 */
-	public static long getNnz(GPUContext gCtx, String instName, MatrixObject mo, boolean recomputeDenseNNZ) throws DMLRuntimeException {
+	public static long getNnz(GPUContext gCtx, String instName, MatrixObject mo, boolean recomputeDenseNNZ) {
 		if(mo.getGPUObject(gCtx) != null && mo.getGPUObject(gCtx).isAllocated()) {
 			return mo.getGPUObject(gCtx).getNnz(instName, recomputeDenseNNZ);
 		}
@@ -214,25 +203,25 @@ public class LibMatrixCUDA {
 	}
 
 
-	protected static cusparseHandle getCusparseHandle(GPUContext gCtx) throws DMLRuntimeException{
+	protected static cusparseHandle getCusparseHandle(GPUContext gCtx) {
 		return gCtx.getCusparseHandle();
 	}
 
-	protected static cublasHandle getCublasHandle(GPUContext gCtx) throws DMLRuntimeException {
+	protected static cublasHandle getCublasHandle(GPUContext gCtx) {
 		return gCtx.getCublasHandle();
 	}
 
-	protected static JCudaKernels getCudaKernels(GPUContext gCtx) throws DMLRuntimeException {
+	protected static JCudaKernels getCudaKernels(GPUContext gCtx) {
 		return gCtx.getKernels();
 	}
 	
-	public static Pointer double2float(GPUContext gCtx, Pointer A, Pointer ret, int numElems) throws DMLRuntimeException {
+	public static Pointer double2float(GPUContext gCtx, Pointer A, Pointer ret, int numElems) {
 		getCudaKernels(gCtx).launchKernel("double2float", ExecutionConfig.getConfigForSimpleVectorOperations(numElems),
 				A, ret, numElems);
 		return ret;
 	}
 	
-	public static Pointer float2double(GPUContext gCtx, Pointer A, Pointer ret, int numElems) throws DMLRuntimeException {
+	public static Pointer float2double(GPUContext gCtx, Pointer A, Pointer ret, int numElems) {
 		getCudaKernels(gCtx).launchKernel("float2double", ExecutionConfig.getConfigForSimpleVectorOperations(numElems),
 				A, ret, numElems);
 		return ret;
@@ -278,9 +267,8 @@ public class LibMatrixCUDA {
 	 * @param input input matrix object
 	 * @param instName  the invoking instruction's name for record {@link Statistics}.
 	 * @return jcuda pointer
-	 * @throws DMLRuntimeException if error occurs while sparse to dense conversion
 	 */
-	protected static Pointer getDensePointer(GPUContext gCtx, MatrixObject input, String instName) throws DMLRuntimeException {
+	protected static Pointer getDensePointer(GPUContext gCtx, MatrixObject input, String instName) {
 		if(isInSparseFormat(gCtx, input)) {
 			input.getGPUObject(gCtx).sparseToDense(instName);
 		}
@@ -293,9 +281,8 @@ public class LibMatrixCUDA {
 	 * @param input input matrix
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @return a sparse matrix pointer
-	 * @throws DMLRuntimeException if error occurs
 	 */
-	protected static CSRPointer getSparsePointer(GPUContext gCtx, MatrixObject input, String instName) throws DMLRuntimeException {
+	protected static CSRPointer getSparsePointer(GPUContext gCtx, MatrixObject input, String instName) {
 		if(!isInSparseFormat(gCtx, input)) {
 			input.getGPUObject(gCtx).denseToSparse();
 		}
@@ -322,9 +309,8 @@ public class LibMatrixCUDA {
 	 * @param input input image
 	 * @param dout  next layer error propogation
 	 * @param outputBlock output
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void reluBackward(GPUContext gCtx, String instName, MatrixObject input, MatrixObject dout, MatrixObject outputBlock) throws DMLRuntimeException {
+	public static void reluBackward(GPUContext gCtx, String instName, MatrixObject input, MatrixObject dout, MatrixObject outputBlock) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : reluBackward" + ", GPUContext=" + gCtx);
 		}
@@ -352,9 +338,8 @@ public class LibMatrixCUDA {
 	 * @param outputBlock output
 	 * @param C number of channels
 	 * @param HW height*width
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void channelSums(GPUContext gCtx, String instName, MatrixObject input, MatrixObject outputBlock, long C, long HW) throws DMLRuntimeException {
+	public static void channelSums(GPUContext gCtx, String instName, MatrixObject input, MatrixObject outputBlock, long C, long HW) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : channelSums" + ", GPUContext=" + gCtx);
 		}
@@ -384,9 +369,8 @@ public class LibMatrixCUDA {
 	 * @param input input image
 	 * @param bias bias
 	 * @param outputBlock output
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void biasMultiply(GPUContext gCtx, String instName, MatrixObject input, MatrixObject bias, MatrixObject outputBlock) throws DMLRuntimeException {
+	public static void biasMultiply(GPUContext gCtx, String instName, MatrixObject input, MatrixObject bias, MatrixObject outputBlock) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : biasMultiply" + ", GPUContext=" + gCtx);
 		}
@@ -425,9 +409,8 @@ public class LibMatrixCUDA {
 	 * @param input input image
 	 * @param bias bias
 	 * @param outputBlock output
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void biasAdd(GPUContext gCtx, String instName, MatrixObject input, MatrixObject bias, MatrixObject outputBlock) throws DMLRuntimeException {
+	public static void biasAdd(GPUContext gCtx, String instName, MatrixObject input, MatrixObject bias, MatrixObject outputBlock) {
 		Pointer imagePointer = getDensePointer(gCtx, input, instName);
 		Pointer biasPointer = getDensePointer(gCtx, bias, instName);
 		Pointer outputPointer = getDensePointer(gCtx, outputBlock, instName);
@@ -453,9 +436,8 @@ public class LibMatrixCUDA {
 	 * @param rows rows in input image
 	 * @param cols cols in input image
 	 * @param k rows in bias
-	 * @throws DMLRuntimeException
 	 */
-	private static void biasAdd(GPUContext gCtx, String instName, Pointer image, Pointer bias, Pointer output, int rows, int cols, int k) throws DMLRuntimeException {
+	private static void biasAdd(GPUContext gCtx, String instName, Pointer image, Pointer bias, Pointer output, int rows, int cols, int k) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : biasAdd" + ", GPUContext=" + gCtx);
 		}
@@ -491,10 +473,9 @@ public class LibMatrixCUDA {
 	 * @param left             input matrix, as in a tsmm expression like A %*% A' or A' %*% A, we just need to check whether the left one is transposed or not, I named it 'left'
 	 * @param outputName       output matrix name
 	 * @param isLeftTransposed if true, left transposed
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static void matmultTSMM(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject left, String outputName,
-			boolean isLeftTransposed) throws DMLRuntimeException {
+			boolean isLeftTransposed) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : matmultTSMM" + ", GPUContext=" + gCtx);
 		}
@@ -550,9 +531,8 @@ public class LibMatrixCUDA {
 	 * @param gCtx     a valid {@link GPUContext}
 	 * @param instName instruction name
 	 * @param ret      upper triangular matrix
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void copyUpperToLowerTriangle(GPUContext gCtx, String instName, MatrixObject ret) throws DMLRuntimeException {
+	private static void copyUpperToLowerTriangle(GPUContext gCtx, String instName, MatrixObject ret) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : copyUpperToLowerTriangle" + ", GPUContext=" + gCtx);
 		}
@@ -589,10 +569,8 @@ public class LibMatrixCUDA {
 	 * @param in1      input matrix
 	 * @param output   output matrix/scalar name
 	 * @param op       Instance of {@link AggregateUnaryOperator} which encapsulates the direction of reduction/aggregation and the reduction operation.
-	 * @throws DMLRuntimeException if {@link DMLRuntimeException} occurs
 	 */
-	public static void unaryAggregate(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String output, AggregateUnaryOperator op)
-			throws DMLRuntimeException {
+	public static void unaryAggregate(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String output, AggregateUnaryOperator op) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		if(LOG.isTraceEnabled()) {
@@ -923,9 +901,8 @@ public class LibMatrixCUDA {
 	 * @param out		output matrix on GPU
 	 * @param rlen	row length
 	 * @param clen	column length
-	 * @throws DMLRuntimeException if error
 	 */
-	private static void squareMatrix(GPUContext gCtx, String instName, Pointer in, Pointer out, int rlen, int clen) throws DMLRuntimeException {
+	private static void squareMatrix(GPUContext gCtx, String instName, Pointer in, Pointer out, int rlen, int clen) {
 		ScalarOperator power2op = new RightScalarOperator(Power.getPowerFnObject(), 2);
 		matrixScalarOp(gCtx, instName, in, 2, rlen, clen, out, power2op);
 	}
@@ -937,9 +914,8 @@ public class LibMatrixCUDA {
 	 * @param in							{@link Pointer} to matrix in device memory
 	 * @param n								size of array
 	 * @return	the reduced value
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static double reduceAll(GPUContext gCtx, String instName, String kernelFunction, Pointer in, int n) throws DMLRuntimeException {
+	private static double reduceAll(GPUContext gCtx, String instName, String kernelFunction, Pointer in, int n) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : reduceAll for " + kernelFunction + ", GPUContext=" + gCtx);
 		}
@@ -981,9 +957,8 @@ public class LibMatrixCUDA {
 	 * @param out							{@link Pointer} to output matrix in device memory (size - rows * 1)
 	 * @param rows						number of rows in input matrix
 	 * @param cols						number of columns in input matrix
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void reduceRow(GPUContext gCtx, String instName, String kernelFunction, Pointer in, Pointer out, int rows, int cols) throws DMLRuntimeException {
+	private static void reduceRow(GPUContext gCtx, String instName, String kernelFunction, Pointer in, Pointer out, int rows, int cols) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : reduceRow for " + kernelFunction + ", GPUContext=" + gCtx);
 		}
@@ -1009,9 +984,8 @@ public class LibMatrixCUDA {
 	 * @param out							{@link Pointer} to output matrix in device memory (size - 1 * cols)
 	 * @param rows						number of rows in input matrix
 	 * @param cols						number of columns in input matrix
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void reduceCol(GPUContext gCtx, String instName, String kernelFunction, Pointer in, Pointer out, int rows, int cols) throws DMLRuntimeException {
+	private static void reduceCol(GPUContext gCtx, String instName, String kernelFunction, Pointer in, Pointer out, int rows, int cols) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : reduceCol for " + kernelFunction + ", GPUContext=" + gCtx);
 		}
@@ -1033,7 +1007,7 @@ public class LibMatrixCUDA {
 	 * @param n size of input array
 	 * @return integer array containing {blocks, threads, shared memory}
 	 */
-	private static int[] getKernelParamsForReduceAll(GPUContext gCtx, int n) throws DMLRuntimeException{
+	private static int[] getKernelParamsForReduceAll(GPUContext gCtx, int n) {
 		final int MAX_THREADS = getMaxThreads(gCtx);
 		final int MAX_BLOCKS = getMaxBlocks(gCtx);
 		final int WARP_SIZE = getWarpSize(gCtx);
@@ -1056,7 +1030,7 @@ public class LibMatrixCUDA {
 	 * @param cols number of columns in input matrix
 	 * @return integer array containing {blocks, threads, shared memory}
 	 */
-	private static int[] getKernelParamsForReduceByRow(GPUContext gCtx, int rows, int cols) throws DMLRuntimeException {
+	private static int[] getKernelParamsForReduceByRow(GPUContext gCtx, int rows, int cols) {
 		final int WARP_SIZE = getWarpSize(gCtx);
 		final int MAX_THREADS = getMaxThreads(gCtx);
 		int threads = (cols < MAX_THREADS *2) ? nextPow2((cols + 1)/ 2) : MAX_THREADS;
@@ -1068,7 +1042,7 @@ public class LibMatrixCUDA {
 		return new int[] {blocks, threads, sharedMemSize};
 	}
 
-	private static int[] getKernelParamsForReduceByCol(GPUContext gCtx, int rows, int cols) throws DMLRuntimeException {
+	private static int[] getKernelParamsForReduceByCol(GPUContext gCtx, int rows, int cols) {
 		final int MAX_THREADS = getMaxThreads(gCtx);
 		final int MAX_BLOCKS = getMaxBlocks(gCtx);
 		final int WARP_SIZE = getWarpSize(gCtx);
@@ -1112,9 +1086,8 @@ public class LibMatrixCUDA {
 	 * @param in         input matrix
 	 * @param outputName output matrix name
 	 * @param op         scalar operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void matrixScalarRelational(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in, String outputName, ScalarOperator op) throws DMLRuntimeException {
+	public static void matrixScalarRelational(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in, String outputName, ScalarOperator op) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		double constant = op.getConstant();
@@ -1149,9 +1122,8 @@ public class LibMatrixCUDA {
 	 * @param outputName        output matrix name
 	 * @param isInputTransposed true if input transposed
 	 * @param op                scalar operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void matrixScalarArithmetic(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in, String outputName, boolean isInputTransposed, ScalarOperator op) throws DMLRuntimeException {
+	public static void matrixScalarArithmetic(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in, String outputName, boolean isInputTransposed, ScalarOperator op) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		double constant = op.getConstant();
@@ -1233,10 +1205,9 @@ public class LibMatrixCUDA {
 	 * @param in2 input matrix 2
 	 * @param outputName output matrix name
 	 * @param op binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static void matrixMatrixRelational(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, MatrixObject in2,
-			String outputName, BinaryOperator op) throws DMLRuntimeException {
+			String outputName, BinaryOperator op) {
 
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
@@ -1270,10 +1241,9 @@ public class LibMatrixCUDA {
 	 * @param isLeftTransposed  true if left-transposed
 	 * @param isRightTransposed true if right-transposed
 	 * @param op                binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static void matrixMatrixArithmetic(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, MatrixObject in2,
-			String outputName, boolean isLeftTransposed, boolean isRightTransposed, BinaryOperator op) throws DMLRuntimeException {
+			String outputName, boolean isLeftTransposed, boolean isRightTransposed, BinaryOperator op) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		boolean isCUDALibAvailable = (op.fn instanceof Plus || op.fn instanceof Minus) && !isSparseAndEmpty(gCtx, in1) && !isSparseAndEmpty(gCtx, in2) && !isVector(in1) && !isVector(in2);
@@ -1309,10 +1279,9 @@ public class LibMatrixCUDA {
 	 * @param outputName        output variable name
 	 * @param isInputTransposed true if input is transposed
 	 * @param op                operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static void matrixScalarOp(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in, String outputName, boolean isInputTransposed,
-			ScalarOperator op) throws DMLRuntimeException {
+			ScalarOperator op) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		if(isInputTransposed)
@@ -1341,9 +1310,8 @@ public class LibMatrixCUDA {
 	 * @param clenA    column lenght of matrix a
 	 * @param c        the dense output matrix
 	 * @param op       operation to perform
-	 * @throws DMLRuntimeException throws runtime exception
 	 */
-	private static void matrixScalarOp(GPUContext gCtx, String instName, Pointer a, double scalar, int rlenA, int clenA, Pointer c, ScalarOperator op) throws DMLRuntimeException {
+	private static void matrixScalarOp(GPUContext gCtx, String instName, Pointer a, double scalar, int rlenA, int clenA, Pointer c, ScalarOperator op) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : matrix_scalar_op" + ", GPUContext=" + gCtx);
 		}
@@ -1369,10 +1337,9 @@ public class LibMatrixCUDA {
 	 * @param isLeftTransposed  true if left matrix is transposed
 	 * @param isRightTransposed true if right matrix is transposed
 	 * @param op                operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	private static void matrixMatrixOp(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, MatrixObject in2,
-			String outputName, boolean isLeftTransposed, boolean isRightTransposed, BinaryOperator op) throws DMLRuntimeException {
+			String outputName, boolean isLeftTransposed, boolean isRightTransposed, BinaryOperator op) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		boolean isEmpty1 = isSparseAndEmpty(gCtx, in1);
@@ -1447,9 +1414,8 @@ public class LibMatrixCUDA {
 	 * @param vecStatusB	if matrix B is a vector
 	 * @param c						output matrix of size (maxRlen, maxClen) allocated on GPU
 	 * @param op					the operation to perform
-	 * @throws DMLRuntimeException
 	 */
-	private static void matrixMatrixOp(GPUContext gCtx, String instName, Pointer a, Pointer b, int maxRlen, int maxClen, int vecStatusA, int vecStatusB, Pointer c, BinaryOperator op) throws DMLRuntimeException {
+	private static void matrixMatrixOp(GPUContext gCtx, String instName, Pointer a, Pointer b, int maxRlen, int maxClen, int vecStatusA, int vecStatusB, Pointer c, BinaryOperator op) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : matrix_matrix_cellwise_op" + ", GPUContext=" + gCtx);
 		}
@@ -1502,7 +1468,7 @@ public class LibMatrixCUDA {
 		return isEmpty1;
 	}
 
-	private static void deviceCopy(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject src, String outputName, boolean isInputTransposed) throws DMLRuntimeException {
+	private static void deviceCopy(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject src, String outputName, boolean isInputTransposed) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		if(!isInputTransposed)
@@ -1518,9 +1484,8 @@ public class LibMatrixCUDA {
 	 * @param instName   the invoking instruction's name for record {@link Statistics}.
 	 * @param src        source matrix
 	 * @param outputName destination variable name
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void deviceCopy(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject src, String outputName) throws DMLRuntimeException {
+	private static void deviceCopy(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject src, String outputName) {
 		Pointer srcPtr = getDensePointer(gCtx, src, instName); // TODO: FIXME: Implement sparse kernel
 		MatrixObject out = ec.getMatrixObject(outputName);
 		getDenseMatrixOutputForGPUInstruction(ec, instName, outputName, toInt(src.getNumRows()), toInt(src.getNumColumns()));	// Allocated the dense output matrix
@@ -1537,9 +1502,8 @@ public class LibMatrixCUDA {
 	 * @param outputName	(internal) name of the matrix that is to be filled
 	 * @param numRows number of rows of output matrix object
 	 * @param numCols number of columns of output matrix object
-	 * @throws DMLRuntimeException if error
 	 */
-	private static void setOutputToConstant(ExecutionContext ec, GPUContext gCtx, String instName, double constant, String outputName, long numRows, long numCols) throws DMLRuntimeException {
+	private static void setOutputToConstant(ExecutionContext ec, GPUContext gCtx, String instName, double constant, String outputName, long numRows, long numCols) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		if(constant == 0) {
@@ -1566,9 +1530,8 @@ public class LibMatrixCUDA {
 	 * @param dest destination matrix
 	 * @param rlen number of rows
 	 * @param clen number of columns
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void deviceCopy(String instName, Pointer src, Pointer dest, int rlen, int clen) throws DMLRuntimeException {
+	private static void deviceCopy(String instName, Pointer src, Pointer dest, int rlen, int clen) {
 		long t0=0;
 		if (DMLScript.FINEGRAINED_STATISTICS) t0 = System.nanoTime();
 		int size = rlen * clen * sizeOfDataType;
@@ -1585,7 +1548,7 @@ public class LibMatrixCUDA {
 	 * 11=min, 12=max, 13=and, 14=or, 15=minus1multiply, 16=minusnz,
 	 * 17=modulus, 18=integer division}
 	 */
-	private static int getBinaryOp(ValueFunction fn) throws DMLRuntimeException {
+	private static int getBinaryOp(ValueFunction fn) {
 		if(fn instanceof Plus) return 0;
 		else if(fn instanceof Minus) return 1;
 		else if(fn instanceof Multiply) return 2;
@@ -1626,10 +1589,9 @@ public class LibMatrixCUDA {
 	 * @param isRightTransposed true if right matrix is transposed
 	 * @param alpha alpha
 	 * @param beta beta
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	private static void dgeam(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, MatrixObject in2, String outputName,
-			boolean isLeftTransposed, boolean isRightTransposed, double alpha, double beta) throws DMLRuntimeException {
+			boolean isLeftTransposed, boolean isRightTransposed, double alpha, double beta) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		if(LOG.isTraceEnabled()) {
@@ -1757,9 +1719,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in input matrix
 	 * @param outputName output matrix name
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void transpose(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in, String outputName) throws DMLRuntimeException {
+	public static void transpose(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in, String outputName) {
 		// C = alpha* op( A ) + beta* op ( B )
 		// = 1.0 * A^T + 0.0 * A^T
 		if (ec.getGPUContext(0) != gCtx)
@@ -1771,7 +1732,7 @@ public class LibMatrixCUDA {
 	//******************* End of Re-org Functions ************************/
 	//********************************************************************/
 
-	public static int toInt(long num) throws DMLRuntimeException {
+	public static int toInt(long num) {
 		if(num >= Integer.MAX_VALUE || num <= Integer.MIN_VALUE) {
 			throw new DMLRuntimeException("GPU : Exceeded supported size " + num);
 		}
@@ -1791,10 +1752,9 @@ public class LibMatrixCUDA {
 	 * @param in1 input matrix object
 	 * @param ixrange index range (0-based)
 	 * @param outputName output matrix object
-	 * @throws DMLRuntimeException if error occurs
 	 */
 	public static void sliceOperations(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1,
-			IndexRange ixrange, String outputName) throws DMLRuntimeException {
+			IndexRange ixrange, String outputName) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException(
 					"GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
@@ -1842,10 +1802,9 @@ public class LibMatrixCUDA {
 	 * @param cl column lower
 	 * @param cu column upper
 	 * @param inClen input number of columns
-	 * @throws DMLRuntimeException if error occurs
 	 */
 	protected static void sliceDenseDense(GPUContext gCtx, String instName, Pointer inPointer, Pointer outPointer, 
-			int rl, int ru, int cl, int cu, int inClen) throws DMLRuntimeException {
+			int rl, int ru, int cl, int cu, int inClen) {
 		long t0 = DMLScript.FINEGRAINED_STATISTICS ? System.nanoTime() : 0;
 		long retClen = cu - cl + 1;
 		if (inClen == retClen) {
@@ -1871,10 +1830,9 @@ public class LibMatrixCUDA {
 	 * @param cl column lower
 	 * @param cu column upper
 	 * @param inClen number of columns of input matrix
-	 * @throws DMLRuntimeException if error
 	 */
 	protected static void sliceSparseDense(GPUContext gCtx, String instName, CSRPointer inPointer, Pointer outPointer, 
-			int rl, int ru, int cl, int cu, int inClen) throws DMLRuntimeException {
+			int rl, int ru, int cl, int cu, int inClen) {
 		int size = getNnz(inPointer, rl, ru);
 		// Return since nnz of the output is 0 as outPointer is expected to be zeroed out.
 		if(size == 0) return;
@@ -1920,7 +1878,7 @@ public class LibMatrixCUDA {
 		return ruPtr[0] - rlPtr[0];
 	}
 
-	public static void cbind(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, MatrixObject in2, String outputName) throws DMLRuntimeException {
+	public static void cbind(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, MatrixObject in2, String outputName) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		if(LOG.isTraceEnabled()) {
@@ -1955,7 +1913,7 @@ public class LibMatrixCUDA {
 
 	}
 
-	public static void rbind(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, MatrixObject in2, String outputName) throws DMLRuntimeException {
+	public static void rbind(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, MatrixObject in2, String outputName) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		if(LOG.isTraceEnabled()) {
@@ -2007,9 +1965,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void exp(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void exp(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : exp" + ", GPUContext=" + gCtx);
 		}
@@ -2024,9 +1981,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void sqrt(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void sqrt(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : sqrt" + ", GPUContext=" + gCtx);
 		}
@@ -2041,9 +1997,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void round(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void round(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : round" + ", GPUContext=" + gCtx);
 		}
@@ -2058,9 +2013,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void abs(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void abs(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : abs" + ", GPUContext=" + gCtx);
 		}
@@ -2075,9 +2029,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void log(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void log(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : log" + ", GPUContext=" + gCtx);
 		}
@@ -2092,9 +2045,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void floor(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void floor(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : floor" + ", GPUContext=" + gCtx);
 		}
@@ -2109,9 +2061,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void ceil(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void ceil(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : ceil" + ", GPUContext=" + gCtx);
 		}
@@ -2126,9 +2077,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void sin(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void sin(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : sin" + ", GPUContext=" + gCtx);
 		}
@@ -2143,9 +2093,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void cos(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void cos(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : cos" + ", GPUContext=" + gCtx);
 		}
@@ -2160,9 +2109,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void tan(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void tan(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : tan" + ", GPUContext=" + gCtx);
 		}
@@ -2177,9 +2125,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void sinh(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void sinh(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : sinh" + ", GPUContext=" + gCtx);
 		}
@@ -2194,9 +2141,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void cosh(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void cosh(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : cosh" + ", GPUContext=" + gCtx);
 		}
@@ -2211,9 +2157,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void tanh(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void tanh(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : tanh" + ", GPUContext=" + gCtx);
 		}
@@ -2228,9 +2173,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void asin(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void asin(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : asin" + ", GPUContext=" + gCtx);
 		}
@@ -2245,9 +2189,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void acos(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void acos(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : acos" + ", GPUContext=" + gCtx);
 		}
@@ -2262,9 +2205,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void atan(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void atan(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : atan" + ", GPUContext=" + gCtx);
 		}
@@ -2279,9 +2221,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void sign(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void sign(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : sign" + ", GPUContext=" + gCtx);
 		}
@@ -2296,9 +2237,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void sigmoid(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void sigmoid(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : sigmoid" + ", GPUContext=" + gCtx);
 		}
@@ -2317,9 +2257,8 @@ public class LibMatrixCUDA {
 	 * @param outputName output matrix name
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param kernelTimer the name of the timer to measure the kernel invocation
-	 * @throws DMLRuntimeException
 	 */
-	private static void unaryOp(ExecutionContext ec, GPUContext gCtx, MatrixObject in1, String kernel, double sparseAndEmptyFillValue, String outputName, String instName, String kernelTimer) throws DMLRuntimeException {
+	private static void unaryOp(ExecutionContext ec, GPUContext gCtx, MatrixObject in1, String kernel, double sparseAndEmptyFillValue, String outputName, String instName, String kernelTimer) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		GPUObject in = in1.getGPUObject(gCtx);
@@ -2352,10 +2291,9 @@ public class LibMatrixCUDA {
 	 * @param in2 input matrix 2
 	 * @param outputName output matrix name
 	 * @param constant pointer constant
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static void axpy(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, MatrixObject in2,
-			String outputName,  double constant) throws DMLRuntimeException {
+			String outputName,  double constant) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		Pointer A = getDensePointer(gCtx, in1, instName);
@@ -2412,9 +2350,8 @@ public class LibMatrixCUDA {
 	 * @param in1        input matrix A
 	 * @param in2        input matrix B
 	 * @param outputName name of the output matrix
-	 * @throws DMLRuntimeException if an error occurs
 	 */
-	public static void solve(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, MatrixObject in2, String outputName) throws DMLRuntimeException {
+	public static void solve(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, MatrixObject in2, String outputName) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 
@@ -2533,9 +2470,8 @@ public class LibMatrixCUDA {
 	 * @param numRows number of rows of output matrix object
 	 * @param numCols number of columns of output matrix object
 	 * @return	the matrix object
-	 * @throws DMLRuntimeException	if an error occurs
 	 */
-	protected static MatrixObject getDenseMatrixOutputForGPUInstruction(ExecutionContext ec, String instName, String name, long numRows, long numCols) throws DMLRuntimeException {
+	protected static MatrixObject getDenseMatrixOutputForGPUInstruction(ExecutionContext ec, String instName, String name, long numRows, long numCols) {
 		long t0=0;
 		if (DMLScript.FINEGRAINED_STATISTICS) t0 = System.nanoTime();
 		Pair<MatrixObject, Boolean> mb = ec.getDenseMatrixOutputForGPUInstruction(name, numRows, numCols);
@@ -2555,9 +2491,8 @@ public class LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param name	name of input matrix (that the {@link ExecutionContext} is aware of)
 	 * @return	the matrix object
-	 * @throws DMLRuntimeException	if an error occurs
 	 */
-	private static MatrixObject getSparseMatrixOutputForGPUInstruction(ExecutionContext ec, long numRows, long numCols, long nnz, String instName, String name) throws DMLRuntimeException {
+	private static MatrixObject getSparseMatrixOutputForGPUInstruction(ExecutionContext ec, long numRows, long numCols, long nnz, String instName, String name) {
 		long t0=0;
 		if (DMLScript.FINEGRAINED_STATISTICS) t0 = System.nanoTime();
 		Pair<MatrixObject, Boolean> mb = ec.getSparseMatrixOutputForGPUInstruction(name, numRows, numCols, nnz);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNN.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNN.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNN.java
index 6642ee0..26a4d2e 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNN.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNN.java
@@ -72,7 +72,7 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	protected static int CONVOLUTION_PREFERENCE = cudnnConvolutionFwdPreference.CUDNN_CONVOLUTION_FWD_NO_WORKSPACE;
 	private static final Log LOG = LogFactory.getLog(LibMatrixCuDNN.class.getName());
 
-	protected static cudnnHandle getCudnnHandle(GPUContext gCtx) throws DMLRuntimeException {
+	protected static cudnnHandle getCudnnHandle(GPUContext gCtx) {
 		return gCtx.getCudnnHandle();
 	}
 	
@@ -99,11 +99,9 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param P        output height
 	 * @param Q        output width
 	 * @param intermediateMemoryBudget intermediate memory budget
-	 * @throws DMLRuntimeException if error
 	 */
 	public static void conv2dBiasAdd(GPUContext gCtx, String instName, MatrixObject image, MatrixObject bias, MatrixObject filter, MatrixObject output, int N, int C, int H, int W,
-			int K, int R, int S, int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, double intermediateMemoryBudget)
-					throws DMLRuntimeException {
+			int K, int R, int S, int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, double intermediateMemoryBudget) {
 		conv2d(gCtx, instName, image, filter, output, N, C, H, W, K, R, S, pad_h, pad_w, stride_h, stride_w, P, Q, intermediateMemoryBudget);
 		//cudaDeviceSynchronize;
 		biasAdd(gCtx, instName, output, bias, output);
@@ -129,10 +127,9 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param P        output height
 	 * @param Q        output width
 	 * @return output im2col pointer (the caller is expected to free this pointer) or null if image is an empty matrix
-	 * @throws DMLRuntimeException if error
 	 */
 	private static Pointer denseIm2col(GPUContext gCtx, String instName, MatrixObject image, boolean isSparseImage, long N, long C, long H, long W,
-			int R, int S, int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q) throws DMLRuntimeException {
+			int R, int S, int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q) {
 		Pointer im2colPointer = null;
 		long t1 = DMLScript.FINEGRAINED_STATISTICS ? System.nanoTime() : 0;
 		if(isSparseImage) {
@@ -185,10 +182,9 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param P        output height
 	 * @param Q        output width
 	 * @param intermediateMemoryBudget intermediate memory budget
-	 * @throws DMLRuntimeException if error
 	 */
 	public static void conv2d(GPUContext gCtx, String instName, MatrixObject image, MatrixObject filter, MatrixObject outputBlock, int N, int C, int H, int W,
-			int K, int R, int S, int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, double intermediateMemoryBudget) throws DMLRuntimeException {
+			int K, int R, int S, int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, double intermediateMemoryBudget) {
 
 		long CHW = C*H*W; long KPQ = K*P*Q; long CRS = C*R*S; 
 		long NCHW = N*CHW; long NKPQ = N*KPQ; long KCRS = K*CRS;
@@ -272,9 +268,8 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in1	input matrix
 	 * @param outputName	output matrix name
-	 * @throws DMLRuntimeException	if DMLRuntimeException occurs
 	 */
-	public static void softmax(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) throws DMLRuntimeException {
+	public static void softmax(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in1, String outputName) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : softmax" + ", GPUContext=" + gCtx);
 		}
@@ -297,9 +292,8 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param H height
 	 * @param W width
 	 * @return cudnn tensor descriptor
-	 * @throws DMLRuntimeException if the input descriptor and matrix dimensions don't match
 	 */
-	private static cudnnTensorDescriptor allocateTensorDescriptor(int N, int C, int H, int W) throws DMLRuntimeException {
+	private static cudnnTensorDescriptor allocateTensorDescriptor(int N, int C, int H, int W) {
 		cudnnTensorDescriptor tensorDescriptor = new cudnnTensorDescriptor();
 		cudnnCreateTensorDescriptor(tensorDescriptor);
 		cudnnSetTensor4dDescriptor(tensorDescriptor, CUDNN_TENSOR_NCHW, LibMatrixCUDA.CUDNN_DATA_TYPE, N, C, H, W);
@@ -316,9 +310,8 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param dim4 input2 number of columns
 	 * @param dim5 output number of rows
 	 * @param dim6 output number of columns
-	 * @throws DMLRuntimeException the exception with the appropriate message
 	 */
-	private static void throwCuDNNDimensionError(long dim1, long dim2, long dim3, long dim4) throws DMLRuntimeException {
+	private static void throwCuDNNDimensionError(long dim1, long dim2, long dim3, long dim4) {
 		throw new DMLRuntimeException("The dimensions of input/output matrices is too large to execute a CuDNN kernel. "
 				+ "Max CuDNN matrix size:" + maxNumElementsOfCuDNNTensor + ". "
 				+ "Given input matrix dimensions: [" + dim1 + "," + dim2 + "]. Output dimension:  [" + dim3 + "," + dim4 + "].");
@@ -333,9 +326,8 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param dim4 input2 number of columns
 	 * @param dim5 output number of rows
 	 * @param dim6 output number of columns
-	 * @throws DMLRuntimeException the exception with the appropriate message
 	 */
-	private static void throwCuDNNDimensionError(long dim1, long dim2, long dim3, long dim4, long dim5, long dim6) throws DMLRuntimeException {
+	private static void throwCuDNNDimensionError(long dim1, long dim2, long dim3, long dim4, long dim5, long dim6) {
 		throw new DMLRuntimeException("The dimensions of input/output matrices is too large to execute a CuDNN kernel. "
 				+ "Max CuDNN matrix size:" + maxNumElementsOfCuDNNTensor + ". "
 				+ "Given input matrix dimensions: [" + dim1 + "," + dim2 + "], [" + dim3 + "," + dim4 + "]. Output dimension: [" + dim5 + "," + dim6 + "]");
@@ -352,11 +344,9 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param filter   the filter allocated on the GPU
 	 * @param output   the output matrix allocated on the GPU
 	 * @param algo     cudnn algorithm wrapper
-	 * @throws DMLRuntimeException if error
 	 */
 	private static void cudnnConv2d(GPUContext gCtx, String instName, Pointer image, Pointer filter, Pointer output, 
-			LibMatrixCuDNNConvolutionAlgorithm algo)
-					throws DMLRuntimeException {
+			LibMatrixCuDNNConvolutionAlgorithm algo) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : conv2d" + ", GPUContext=" + gCtx);
 		}
@@ -400,12 +390,11 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param P output activation height
 	 * @param Q output activation width
 	 * @param intermediateMemoryBudget intermediate memory budget
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static void conv2dBackwardFilter(GPUContext gCtx, String instName, MatrixObject image, MatrixObject dout,
 			MatrixObject outputBlock, int N, int C, int H, int W, int K, int R,
 			int S, int pad_h, int pad_w, int stride_h, int stride_w, int P,
-			int Q, double intermediateMemoryBudget) throws DMLRuntimeException {
+			int Q, double intermediateMemoryBudget) {
 		long CHW = C*H*W; long KPQ = K*P*Q; long CRS = C*R*S; 
 		long NCHW = N*CHW; long NKPQ = N*KPQ; long KCRS = K*CRS;
 		
@@ -474,10 +463,9 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param doutPointer pointer to errors from next layer
 	 * @param dwPointer  output errors
 	 * @param algo     cudnn algorithm wrapper
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	private static void cudnnConv2dBackwardFilter(GPUContext gCtx, String instName, Pointer imagePointer, Pointer doutPointer,
-			Pointer dwPointer, LibMatrixCuDNNConvolutionAlgorithm algo) throws DMLRuntimeException {
+			Pointer dwPointer, LibMatrixCuDNNConvolutionAlgorithm algo) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : conv2dBackwardFilter" + ", GPUContext=" + gCtx);
 		}
@@ -517,12 +505,11 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param P output activation height
 	 * @param Q output activation width
 	 * @param intermediateMemoryBudget intermediate memory budget
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static void conv2dBackwardData(GPUContext gCtx, String instName, MatrixObject filter, MatrixObject dout,
 			MatrixObject output, int N, int C, int H, int W, int K, int R,
 			int S, int pad_h, int pad_w, int stride_h, int stride_w, int P,
-			int Q, double intermediateMemoryBudget) throws DMLRuntimeException {
+			int Q, double intermediateMemoryBudget) {
 		long CHW = C*H*W; long KPQ = K*P*Q; long CRS = C*R*S; 
 		long NCHW = N*CHW; long NKPQ = N*KPQ; long KCRS = K*CRS;
 
@@ -579,10 +566,9 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param dy pointer to errors from next layer
 	 * @param dx pointer to  output errors
 	 * @param algo cudnn algorithm wrapper
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	private static void cudnnConv2dBackwardData(GPUContext gCtx, String instName, Pointer w, Pointer dy,
-			Pointer dx, LibMatrixCuDNNConvolutionAlgorithm algo) throws DMLRuntimeException {
+			Pointer dx, LibMatrixCuDNNConvolutionAlgorithm algo) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : conv2dBackwardData" + ", GPUContext=" + gCtx);
 		}
@@ -621,12 +607,11 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param Q				(W - S + 1 + 2*pad_w)/stride_w
 	 * @param poolingType	type of pooling
 	 * @param intermediateMemoryBudget intermediate memory budget
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static void pooling(GPUContext gCtx, String instName, MatrixObject image,
 			MatrixObject outputBlock, int N, int C, int H, int W, int K, int R,
 			int S, int pad_h, int pad_w, int stride_h, int stride_w, int P,
-			int Q, PoolingType poolingType, double intermediateMemoryBudget) throws DMLRuntimeException {
+			int Q, PoolingType poolingType, double intermediateMemoryBudget) {
 		long CHW = C*H*W; long CPQ = C*P*Q;  
 		long NCHW = N*CHW; long NCPQ = N*CPQ; 
 
@@ -654,7 +639,7 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	private static void cudnnPoolingHelper(GPUContext gCtx, String instName, Pointer x,
 			Pointer y, int N, int C, int H, int W, int K, int R,
 			int S, int pad_h, int pad_w, int stride_h, int stride_w, int P,
-			int Q, PoolingType poolingType) throws DMLRuntimeException {
+			int Q, PoolingType poolingType) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : perform pooling" + ", GPUContext=" + gCtx);
 		}
@@ -700,12 +685,11 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param Q				(W - S + 1 + 2*pad_w)/stride_w
 	 * @param poolingType	type of pooling
 	 * @param intermediateMemoryBudget intermediate memory budget
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static void poolingBackward(GPUContext gCtx, String instName, MatrixObject image, MatrixObject dout,
 			MatrixObject maxpoolOutput, MatrixObject outputBlock, int N, int C, int H, int W, int K, int R,
 			int S, int pad_h, int pad_w, int stride_h, int stride_w, int P,
-			int Q, PoolingType poolingType, double intermediateMemoryBudget) throws DMLRuntimeException {
+			int Q, PoolingType poolingType, double intermediateMemoryBudget) {
 		long CHW = C*H*W; long CPQ = C*P*Q;  
 		long NCHW = N*CHW; long NCPQ = N*CPQ; 
 
@@ -750,7 +734,7 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 			Pointer x, Pointer dy, Pointer y, Pointer dx, 
 			int N, int C, int H, int W, int K, int R,
 			int S, int pad_h, int pad_w, int stride_h, int stride_w, int P,
-			int Q, PoolingType poolingType) throws DMLRuntimeException {
+			int Q, PoolingType poolingType) {
 		if(LOG.isTraceEnabled()) {
 			LOG.trace("GPU : maxpoolingBackward" + ", GPUContext=" + gCtx);
 		}
@@ -793,7 +777,7 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 		}
 	}
 
-	private static void cudnnReLU(GPUContext gCtx, String instName, MatrixObject in, Pointer dstData, cudnnTensorDescriptor srcTensorDesc) throws DMLRuntimeException {
+	private static void cudnnReLU(GPUContext gCtx, String instName, MatrixObject in, Pointer dstData, cudnnTensorDescriptor srcTensorDesc) {
 		long t0=0;
 		try {
 			if(LOG.isTraceEnabled()) {
@@ -828,9 +812,8 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param instName the invoking instruction's name for record {@link Statistics}.
 	 * @param in input matrix
 	 * @param outputName	name of the output matrix
-	 * @throws DMLRuntimeException	if an error occurs
 	 */
-	public static void relu(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in, String outputName) throws DMLRuntimeException {
+	public static void relu(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject in, String outputName) {
 		if (ec.getGPUContext(0) != gCtx)
 			throw new DMLRuntimeException("GPU : Invalid internal state, the GPUContext set with the ExecutionContext is not the same used to run this LibMatrixCUDA function");
 		long N = in.getNumRows();
@@ -867,9 +850,8 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * @param image input matrix object
 	 * @param instName name of the instruction
 	 * @return jcuda pointer
-	 * @throws DMLRuntimeException if error occurs while sparse to dense conversion
 	 */
-	protected static Pointer getDensePointerForCuDNN(GPUContext gCtx, MatrixObject image, String instName) throws DMLRuntimeException {
+	protected static Pointer getDensePointerForCuDNN(GPUContext gCtx, MatrixObject image, String instName) {
 		long numElems = image.getNumRows()*image.getNumColumns();
 		if(numElems > maxNumElementsOfCuDNNTensor) {
 			throw new DMLRuntimeException("CuDNN restriction: the size of input tensor cannot have greater than 2 giga-elements, but has " + numElems + " (i.e. [" + image.getNumRows() + " X " + image.getNumColumns() + "]). Hint: try reducing the mini-batch size.");
@@ -881,9 +863,8 @@ public class LibMatrixCuDNN extends LibMatrixCUDA {
 	 * Convenience method for checking the status of CuDNN kernel.
 	 *
 	 * @param status status returned by CuDNN
-	 * @throws DMLRuntimeException if status is not CUDNN_STATUS_SUCCESS
 	 */
-	protected static void checkStatus(int status) throws DMLRuntimeException {
+	protected static void checkStatus(int status) {
 		if(status != cudnnStatus.CUDNN_STATUS_SUCCESS)
 			throw new DMLRuntimeException("Error status returned by CuDNN:" + jcuda.jcudnn.cudnnStatus.stringFor(status));
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNConvolutionAlgorithm.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNConvolutionAlgorithm.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNConvolutionAlgorithm.java
index 835cb15..574e332 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNConvolutionAlgorithm.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNConvolutionAlgorithm.java
@@ -69,7 +69,7 @@ public class LibMatrixCuDNNConvolutionAlgorithm implements java.lang.AutoCloseab
 	GPUContext gCtx = null; String instName = null;
 	
 	private LibMatrixCuDNNConvolutionAlgorithm(GPUContext gCtx, String instName, int N, int C, int H, int W, int K, int R, int S, 
-			int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q) throws DMLRuntimeException {
+			int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q) {
 		int padding[] = {pad_h, pad_w};
 		int strides[] = {stride_h, stride_w};
 		convDesc = allocateConvolutionDescriptor(padding, strides);
@@ -126,11 +126,10 @@ public class LibMatrixCuDNNConvolutionAlgorithm implements java.lang.AutoCloseab
 	 * @param Q        output width
 	 * @param workspaceLimit maximum intermediate memory to use
 	 * @return algorithm wrapper
-	 * @throws DMLRuntimeException if error occurs
 	 */
 	public static LibMatrixCuDNNConvolutionAlgorithm cudnnGetConvolutionForwardAlgorithm(
 			GPUContext gCtx, String instName, int N, int C, int H, int W, int K, int R, int S, 
-			int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, long workspaceLimit) throws DMLRuntimeException {
+			int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, long workspaceLimit) {
 		long t1 = DMLScript.FINEGRAINED_STATISTICS ? System.nanoTime() : 0;
 		LibMatrixCuDNNConvolutionAlgorithm ret = new LibMatrixCuDNNConvolutionAlgorithm(gCtx, instName, N, C, H, W, K, R, S, 
 				pad_h, pad_w, stride_h, stride_w, P, Q);
@@ -170,11 +169,10 @@ public class LibMatrixCuDNNConvolutionAlgorithm implements java.lang.AutoCloseab
 	 * @param Q        output width
 	 * @param workspaceLimit maximum intermediate memory to use
 	 * @return algorithm wrapper
-	 * @throws DMLRuntimeException if error occurs
 	 */
 	public static LibMatrixCuDNNConvolutionAlgorithm cudnnGetConvolutionBackwardFilterAlgorithm(
 			GPUContext gCtx, String instName, int N, int C, int H, int W, int K, int R, int S, 
-			int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, long workspaceLimit) throws DMLRuntimeException {
+			int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, long workspaceLimit) {
 		long t1 = DMLScript.FINEGRAINED_STATISTICS ? System.nanoTime() : 0;
 		LibMatrixCuDNNConvolutionAlgorithm ret = new LibMatrixCuDNNConvolutionAlgorithm(gCtx, instName, N, C, H, W, K, R, S, 
 				pad_h, pad_w, stride_h, stride_w, P, Q);
@@ -217,11 +215,10 @@ public class LibMatrixCuDNNConvolutionAlgorithm implements java.lang.AutoCloseab
 	 * @param Q        output width
 	 * @param workspaceLimit maximum intermediate memory to use
 	 * @return algorithm wrapper
-	 * @throws DMLRuntimeException if error occurs
 	 */
 	public static LibMatrixCuDNNConvolutionAlgorithm cudnnGetConvolutionBackwardDataAlgorithm(
 			GPUContext gCtx, String instName, int N, int C, int H, int W, int K, int R, int S, 
-			int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, long workspaceLimit) throws DMLRuntimeException {
+			int pad_h, int pad_w, int stride_h, int stride_w, int P, int Q, long workspaceLimit) {
 		LibMatrixCuDNNConvolutionAlgorithm ret = new LibMatrixCuDNNConvolutionAlgorithm(gCtx, instName, N, C, H, W, K, R, S, 
 				pad_h, pad_w, stride_h, stride_w, P, Q);
 		if(H == R || W == S) {
@@ -258,9 +255,8 @@ public class LibMatrixCuDNNConvolutionAlgorithm implements java.lang.AutoCloseab
 	 * @param H height
 	 * @param W width
 	 * @return cudnn tensor descriptor
-	 * @throws DMLRuntimeException if the input descriptor and matrix dimensions don't match
 	 */
-	private static cudnnTensorDescriptor allocateTensorDescriptor(int N, int C, int H, int W) throws DMLRuntimeException {
+	private static cudnnTensorDescriptor allocateTensorDescriptor(int N, int C, int H, int W) {
 		cudnnTensorDescriptor tensorDescriptor = new cudnnTensorDescriptor();
 		cudnnCreateTensorDescriptor(tensorDescriptor);
 		cudnnSetTensor4dDescriptor(tensorDescriptor, CUDNN_TENSOR_NCHW, LibMatrixCUDA.CUDNN_DATA_TYPE, N, C, H, W);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNInputRowFetcher.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNInputRowFetcher.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNInputRowFetcher.java
index 33f2cb5..f52da30 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNInputRowFetcher.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNInputRowFetcher.java
@@ -43,9 +43,8 @@ public class LibMatrixCuDNNInputRowFetcher extends LibMatrixCUDA implements java
 	 * @param gCtx current gpu context
 	 * @param instName name of the instruction
 	 * @param image input matrix object.
-	 * @throws DMLRuntimeException if error
 	 */
-	public LibMatrixCuDNNInputRowFetcher(GPUContext gCtx, String instName, MatrixObject image) throws DMLRuntimeException {
+	public LibMatrixCuDNNInputRowFetcher(GPUContext gCtx, String instName, MatrixObject image) {
 		this.gCtx = gCtx; this.instName = instName;
 		numColumns = LibMatrixCUDA.toInt(image.getNumColumns());
 		isInputInSparseFormat = LibMatrixCUDA.isInSparseFormat(gCtx, image);
@@ -56,9 +55,8 @@ public class LibMatrixCuDNNInputRowFetcher extends LibMatrixCUDA implements java
 	 * Copy the nth row and return the dense pointer
 	 * @param n zero-based row index
 	 * @return dense pointer containing the nth row. This row is reused in the next iteration
-	 * @throws DMLRuntimeException ?
 	 */
-	public Pointer getNthRow(int n) throws DMLRuntimeException {
+	public Pointer getNthRow(int n) {
 		if(isInputInSparseFormat) {
 			jcuda.runtime.JCuda.cudaDeviceSynchronize();
 			long t0 = DMLScript.FINEGRAINED_STATISTICS ? System.nanoTime() : 0;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNPoolingDescriptors.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNPoolingDescriptors.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNPoolingDescriptors.java
index 8c9dea4..ffa7c22 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNPoolingDescriptors.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuDNNPoolingDescriptors.java
@@ -29,7 +29,6 @@ import static jcuda.jcudnn.cudnnPoolingMode.CUDNN_POOLING_MAX;
 import static jcuda.jcudnn.cudnnPoolingMode.CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING;
 import static jcuda.jcudnn.cudnnTensorFormat.CUDNN_TENSOR_NCHW;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.instructions.gpu.context.GPUContext;
 import org.apache.sysml.runtime.matrix.data.LibMatrixDNN.PoolingType;
 
@@ -84,12 +83,11 @@ public class LibMatrixCuDNNPoolingDescriptors implements java.lang.AutoCloseable
 	 * @param Q				(W - S + 1 + 2*pad_w)/stride_w
 	 * @param poolingType	type of pooling
 	 * @return decriptor wrapper
-	 * @throws DMLRuntimeException if error occurs
 	 */
 	public static LibMatrixCuDNNPoolingDescriptors cudnnPoolingBackwardDescriptors(GPUContext gCtx, 
 			String instName, int N, int C, int H, int W, int K, int R,
 			int S, int pad_h, int pad_w, int stride_h, int stride_w, int P,
-			int Q, PoolingType poolingType) throws DMLRuntimeException {
+			int Q, PoolingType poolingType) {
 		LibMatrixCuDNNPoolingDescriptors ret = new LibMatrixCuDNNPoolingDescriptors();
 		ret.xDesc = allocateTensorDescriptor(N, C, H, W);
 		ret.yDesc = allocateTensorDescriptor(N, C, P, Q);
@@ -119,12 +117,11 @@ public class LibMatrixCuDNNPoolingDescriptors implements java.lang.AutoCloseable
 	 * @param Q				(W - S + 1 + 2*pad_w)/stride_w
 	 * @param poolingType 	type of pooling
 	 * @return decriptor wrapper
-	 * @throws DMLRuntimeException if error occurs
 	 */
 	public static LibMatrixCuDNNPoolingDescriptors cudnnPoolingDescriptors(GPUContext gCtx, 
 			String instName, int N, int C, int H, int W, int K, int R,
 			int S, int pad_h, int pad_w, int stride_h, int stride_w, int P,
-			int Q, PoolingType poolingType) throws DMLRuntimeException {
+			int Q, PoolingType poolingType) {
 		LibMatrixCuDNNPoolingDescriptors ret = new LibMatrixCuDNNPoolingDescriptors();
 		ret.xDesc = allocateTensorDescriptor(N, C, H, W);
 		ret.yDesc = allocateTensorDescriptor(N, C, P, Q);
@@ -139,9 +136,8 @@ public class LibMatrixCuDNNPoolingDescriptors implements java.lang.AutoCloseable
 	 * @param H height
 	 * @param W width
 	 * @return cudnn tensor descriptor
-	 * @throws DMLRuntimeException if the input descriptor and matrix dimensions don't match
 	 */
-	private static cudnnTensorDescriptor allocateTensorDescriptor(int N, int C, int H, int W) throws DMLRuntimeException {
+	private static cudnnTensorDescriptor allocateTensorDescriptor(int N, int C, int H, int W) {
 		cudnnTensorDescriptor tensorDescriptor = new cudnnTensorDescriptor();
 		cudnnCreateTensorDescriptor(tensorDescriptor);
 		cudnnSetTensor4dDescriptor(tensorDescriptor, CUDNN_TENSOR_NCHW, LibMatrixCUDA.CUDNN_DATA_TYPE, N, C, H, W);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuMatMult.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuMatMult.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuMatMult.java
index 21d9fd1..f476dfe 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuMatMult.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCuMatMult.java
@@ -70,7 +70,7 @@ public class LibMatrixCuMatMult extends LibMatrixCUDA {
 		private boolean isRightTransposed; // is op(B) = t(B)
 
 		public CuMatMultParameters(long leftNumRows1, long leftNumCols1, long rightNumRows1, long rightNumCols1,
-				boolean isLeftTransposed1, boolean isRightTransposed1) throws DMLRuntimeException {
+				boolean isLeftTransposed1, boolean isRightTransposed1) {
 			leftNumRows = leftNumRows1;
 			leftNumCols = leftNumCols1;
 			rightNumRows = rightNumRows1;
@@ -80,7 +80,7 @@ public class LibMatrixCuMatMult extends LibMatrixCUDA {
 			setDimensions();
 		}
 
-		public void rowToColumnMajor() throws DMLRuntimeException {
+		public void rowToColumnMajor() {
 			// To compensate for the input matrices being in row-major format
 			// instead of column-major (the way cublas expects)
 			isRightTransposed = swap(isLeftTransposed, isLeftTransposed = isRightTransposed);
@@ -89,7 +89,7 @@ public class LibMatrixCuMatMult extends LibMatrixCUDA {
 			setDimensions();
 		}
 
-		private void validate() throws DMLRuntimeException {
+		private void validate() {
 			int k1 = toInt(isRightTransposed ? rightNumCols : rightNumRows);
 			if (k != k1)
 				throw new DMLRuntimeException("Dimension mismatch: " + k + " != " + k1 + " [" + leftNumRows + ","
@@ -97,7 +97,7 @@ public class LibMatrixCuMatMult extends LibMatrixCUDA {
 						+ isRightTransposed);
 		}
 
-		private void setDimensions() throws DMLRuntimeException {
+		private void setDimensions() {
 			// Validate the dimensions
 			m = toInt(isLeftTransposed ? leftNumCols : leftNumRows);
 			n = toInt(isRightTransposed ? rightNumRows : rightNumCols);
@@ -134,13 +134,10 @@ public class LibMatrixCuMatMult extends LibMatrixCUDA {
 	 *            op for A, transposed or not
 	 * @param isRightTransposed
 	 *            op for B, tranposed or not
-	 * @throws DMLRuntimeException
-	 *             if DMLRuntimeException occurs
 	 * @return output of matrix multiply
 	 */
 	public static MatrixObject matmult(ExecutionContext ec, GPUContext gCtx, String instName, MatrixObject left,
-			MatrixObject right, String outputName, boolean isLeftTransposed, boolean isRightTransposed)
-			throws DMLRuntimeException {
+			MatrixObject right, String outputName, boolean isLeftTransposed, boolean isRightTransposed) {
 		boolean isM1Sparse = isInSparseFormat(gCtx, left);
 		boolean isM2Sparse = isInSparseFormat(gCtx, right);
 		MatrixObject output = ec.getMatrixObject(outputName);
@@ -265,12 +262,10 @@ public class LibMatrixCuMatMult extends LibMatrixCUDA {
 	 *            is op(A) = t(A)
 	 * @param isRightTransposed
 	 *            is op(B) = t(B)
-	 * @throws DMLRuntimeException
-	 *             if error
 	 */
 	static void sparseDenseMatMult(GPUContext gCtx, String instName, Pointer C, CSRPointer A, Pointer B,
 			long leftNumRows, long leftNumColumns, long rightNumRows, long rightNumColumns, long outRLen, long outCLen,
-			boolean isLeftTransposed, boolean isRightTransposed) throws DMLRuntimeException {
+			boolean isLeftTransposed, boolean isRightTransposed) {
 		// t(C) = t(B) %*% t(A)
 		Pointer output = null;
 		if (outRLen != 1 && outCLen != 1) {
@@ -314,11 +309,9 @@ public class LibMatrixCuMatMult extends LibMatrixCUDA {
 	 *            right matrix pointer
 	 * @param param
 	 *            BLAS parameters
-	 * @throws DMLRuntimeException
-	 *             if error
 	 */
 	private static void denseSparseMatMult(cusparseHandle handle, String instName, Pointer C, Pointer A, CSRPointer B,
-			CuMatMultParameters param) throws DMLRuntimeException {
+			CuMatMultParameters param) {
 		long t0 = DMLScript.FINEGRAINED_STATISTICS ? System.nanoTime() : 0;
 		String kernel = GPUInstruction.MISC_TIMER_SPARSE_MATRIX_DENSE_MATRIX_LIB;
 		// Ignoring sparse vector dense matrix multiplication and dot product
@@ -365,11 +358,9 @@ public class LibMatrixCuMatMult extends LibMatrixCUDA {
 	 *            right matrix pointer
 	 * @param param
 	 *            BLAS parameters
-	 * @throws DMLRuntimeException
-	 *             if error
 	 */
 	private static void denseDenseMatMult(cublasHandle handle, String instName, Pointer C, Pointer A, Pointer B,
-			CuMatMultParameters param) throws DMLRuntimeException {
+			CuMatMultParameters param) {
 		long t0 = DMLScript.FINEGRAINED_STATISTICS ? System.nanoTime() : 0;
 		String kernel = null;
 		param.rowToColumnMajor();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNN.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNN.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNN.java
index 4cb154b..17dbdc0 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNN.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNN.java
@@ -140,9 +140,8 @@ public class LibMatrixDNN {
 	 * @param filter filter
 	 * @param outputBlock output of convolution
 	 * @param params convolution parameters
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void conv2d(MatrixBlock input, MatrixBlock filter, MatrixBlock outputBlock, ConvolutionParameters params) throws DMLRuntimeException {
+	public static void conv2d(MatrixBlock input, MatrixBlock filter, MatrixBlock outputBlock, ConvolutionParameters params) {
 		LibMatrixDNN.checkInputsConv2d(input, filter, outputBlock, params);
 		if(params.bias != null && params.bias.isInSparseFormat())
 			params.bias.sparseToDense(); // Since bias is extremely small array
@@ -161,9 +160,9 @@ public class LibMatrixDNN {
 	 * @param dout errors from next layer
 	 * @param outputBlock  output errors
 	 * @param params convolution parameters
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
-	 */
-	public static void conv2dBackwardData(MatrixBlock filter, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params) throws DMLRuntimeException {
+	 
+*/
+	public static void conv2dBackwardData(MatrixBlock filter, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params) {
 		checkInputsConv2dBackwardData(filter, dout, outputBlock, params);
 		
 		long nnz = execute(LibMatrixDNNConv2d.getConv2dBackwardDataWorkers(params), params);
@@ -180,9 +179,8 @@ public class LibMatrixDNN {
 	 * @param dout errors from next layer
 	 * @param outputBlock  output errors
 	 * @param params convolution parameters
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void conv2dBackwardFilter(MatrixBlock input, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params) throws DMLRuntimeException {
+	public static void conv2dBackwardFilter(MatrixBlock input, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params) {
 		checkInputsConv2dBackwardFilter(input, dout, outputBlock, params);
 		
 		execute(LibMatrixDNNConv2d.getConv2dBackwardFilterWorkers(params), params);
@@ -192,7 +190,7 @@ public class LibMatrixDNN {
 		outputBlock.examSparsity();
 	}
 	
-	public static void pooling(MatrixBlock input, MatrixBlock output, ConvolutionParameters params, PoolingType poolType) throws DMLRuntimeException {
+	public static void pooling(MatrixBlock input, MatrixBlock output, ConvolutionParameters params, PoolingType poolType) {
 		params.input1 = input;
 		params.output = output;
 		
@@ -222,10 +220,9 @@ public class LibMatrixDNN {
 	 * @param params convolution parameters
 	 * @param performReluBackward perform ReLU backward
 	 * @param poolType type of pooling
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	public static void poolingBackward(MatrixBlock input, MatrixBlock dout, MatrixBlock outputBlock, 
-			ConvolutionParameters params, boolean performReluBackward, PoolingType poolType) throws DMLRuntimeException {
+			ConvolutionParameters params, boolean performReluBackward, PoolingType poolType) {
 		params.input1 = input;
 		params.input2 = dout;
 		params.output = outputBlock;
@@ -269,9 +266,8 @@ public class LibMatrixDNN {
 	 * @param dout errors from next layer
 	 * @param outputBlock output matrix
 	 * @param numThreads number of threads
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void reluBackward(MatrixBlock input, MatrixBlock dout, MatrixBlock outputBlock, int numThreads) throws DMLRuntimeException {
+	public static void reluBackward(MatrixBlock input, MatrixBlock dout, MatrixBlock outputBlock, int numThreads) {
 		int N = input.getNumRows();
 		ConvolutionParameters params = new ConvolutionParameters(N, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, numThreads);
 		params.input1 = input;
@@ -299,9 +295,8 @@ public class LibMatrixDNN {
 	 * @param bias bias matrix
 	 * @param outputBlock output matrix
 	 * @param numThreads number of threads
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void biasAdd(MatrixBlock input, MatrixBlock bias, MatrixBlock outputBlock, int numThreads) throws DMLRuntimeException {
+	public static void biasAdd(MatrixBlock input, MatrixBlock bias, MatrixBlock outputBlock, int numThreads) {
 		int N = input.getNumRows();
 		int K = bias.getNumRows();
 		int PQ = input.getNumColumns() / K;
@@ -348,9 +343,8 @@ public class LibMatrixDNN {
 	 * @param bias bias matrix
 	 * @param outputBlock output matrix
 	 * @param numThreads number of threads
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void biasMultiply(MatrixBlock input, MatrixBlock bias, MatrixBlock outputBlock, int numThreads) throws DMLRuntimeException {
+	public static void biasMultiply(MatrixBlock input, MatrixBlock bias, MatrixBlock outputBlock, int numThreads) {
 		int N = input.getNumRows();
 		int K = bias.getNumRows();
 		int PQ = input.getNumColumns() / K;
@@ -423,9 +417,8 @@ public class LibMatrixDNN {
 	 *  
 	 * @param tasks deep learning related tasks
 	 * @param params convolution parameters
-	 * @throws DMLRuntimeException if the error occurs
 	 */
-	private static long execute(ArrayList<Callable<Long>> tasks, ConvolutionParameters params) throws DMLRuntimeException {
+	private static long execute(ArrayList<Callable<Long>> tasks, ConvolutionParameters params) {
 		int k = OptimizerUtils.getConstrainedNumThreads(params.numThreads);
 		long lnnz = 0;
 		try {
@@ -451,16 +444,16 @@ public class LibMatrixDNN {
 		return lnnz;
 	}
 	
-	private static void checkOrThrowException(String msg, long lhs, long rhs) throws DMLRuntimeException {
+	private static void checkOrThrowException(String msg, long lhs, long rhs) {
 		if(lhs != rhs)
 			throw new DMLRuntimeException(msg + ":" + lhs + " != " + rhs);
 	}
-	private static void checkOrThrowException(String msg, long lhs, long rhs1, long rhs2, long rhs3) throws DMLRuntimeException {
+	private static void checkOrThrowException(String msg, long lhs, long rhs1, long rhs2, long rhs3) {
 		if(lhs != (rhs1*rhs2*rhs3))
 			throw new DMLRuntimeException(msg + ":" + lhs + " != (" + rhs1 + " * " + rhs2 + " * " + rhs3);
 	}
 	
-	static void checkInputsConv2dBackwardData(MatrixBlock filter, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params)  throws DMLRuntimeException {
+	static void checkInputsConv2dBackwardData(MatrixBlock filter, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params) {
 		params.input1 = filter;
 		params.input2 = dout;
 		params.output = outputBlock;
@@ -485,7 +478,7 @@ public class LibMatrixDNN {
 		}
 	}
 	
-	static void checkInputsConv2dBackwardFilter(MatrixBlock input, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params)  throws DMLRuntimeException {
+	static void checkInputsConv2dBackwardFilter(MatrixBlock input, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params) {
 		params.input1 = input;
 		params.input2 = dout;
 		params.output = outputBlock;
@@ -510,7 +503,7 @@ public class LibMatrixDNN {
 		}
 	}
 	
-	static void checkInputsConv2d(MatrixBlock input, MatrixBlock filter, MatrixBlock outputBlock, ConvolutionParameters params) throws DMLRuntimeException {
+	static void checkInputsConv2d(MatrixBlock input, MatrixBlock filter, MatrixBlock outputBlock, ConvolutionParameters params) {
 		params.input1 = input;
 		params.input2 = filter;
 		params.output = outputBlock;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNConv2d.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNConv2d.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNConv2d.java
index 436735e..4221ace 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNConv2d.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNConv2d.java
@@ -39,9 +39,8 @@ public class LibMatrixDNNConv2d
 	 * 
 	 * @param params convolution parameters
 	 * @return list of callable tasks for performing conv2d
-	 * @throws DMLRuntimeException if error occurs
 	 */
-	public static ArrayList<Callable<Long>> getConv2dWorkers(ConvolutionParameters params) throws DMLRuntimeException {
+	public static ArrayList<Callable<Long>> getConv2dWorkers(ConvolutionParameters params) {
 		ArrayList<Callable<Long>> ret = new ArrayList<>();
 		
 		// Try to create twice as many tasks as threads for improved load balance
@@ -85,9 +84,8 @@ public class LibMatrixDNNConv2d
 	 * 
 	 * @param params convolution parameters
 	 * @return list of callable tasks for performing conv2d backward filter
-	 * @throws DMLRuntimeException if error occurs
 	 */
-	public static ArrayList<Callable<Long>> getConv2dBackwardFilterWorkers(ConvolutionParameters params) throws DMLRuntimeException {
+	public static ArrayList<Callable<Long>> getConv2dBackwardFilterWorkers(ConvolutionParameters params) {
 		ArrayList<Callable<Long>> ret = new ArrayList<>();
 		// Try to create as many tasks as threads. 
 		// Creating more tasks will help in tail, but would have additional overhead of maintaining the intermediate
@@ -122,9 +120,8 @@ public class LibMatrixDNNConv2d
 	 * 
 	 * @param params convolution parameters
 	 * @return list of callable tasks for performing conv2d backward data
-	 * @throws DMLRuntimeException if error occurs
 	 */
-	public static ArrayList<Callable<Long>> getConv2dBackwardDataWorkers(ConvolutionParameters params) throws DMLRuntimeException {
+	public static ArrayList<Callable<Long>> getConv2dBackwardDataWorkers(ConvolutionParameters params) {
 		ArrayList<Callable<Long>> ret = new ArrayList<>();
 		
 		// Try to create as many tasks as threads. 
@@ -619,7 +616,7 @@ public class LibMatrixDNNConv2d
 		}
 	}
 	
-	private static void getRowInDenseFormat(MatrixBlock input, int n, double []  ret) throws DMLRuntimeException {
+	private static void getRowInDenseFormat(MatrixBlock input, int n, double []  ret) {
 		if(input.getNumColumns() != ret.length) {
 			throw new DMLRuntimeException("Invalid parameters");
 		}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNHelper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNHelper.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNHelper.java
index b985c42..6d92313 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNHelper.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNHelper.java
@@ -19,7 +19,6 @@
 package org.apache.sysml.runtime.matrix.data;
 
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.utils.NativeHelper;
 
 
@@ -58,7 +57,7 @@ public class LibMatrixDNNHelper
 	}
 	
 	protected static void singleThreadedMatMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, 
-		boolean recomputeNNZM1, boolean recomputeNNZM2, ConvolutionParameters params) throws DMLRuntimeException {
+		boolean recomputeNNZM1, boolean recomputeNNZM2, ConvolutionParameters params) {
 		if( !params.enableNative || m1.sparse || m2.sparse ) {
 			prepNonZerosForMatrixMult(m1, recomputeNNZM1);
 			prepNonZerosForMatrixMult(m2, recomputeNNZM2);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNIm2Col.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNIm2Col.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNIm2Col.java
index 5c72c4e..65f53d9 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNIm2Col.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixDNNIm2Col.java
@@ -193,7 +193,7 @@ public class LibMatrixDNNIm2Col
 	// Therefore, it is provided as utility function rather than an operator (like im2col or rotate180)
 	
 	//Converts input: PQ X CRS matrix and writes to 1 X CHW
-	public static void col2imOverSingleImage(int outputN, MatrixBlock input, ConvolutionParameters params) throws DMLRuntimeException {
+	public static void col2imOverSingleImage(int outputN, MatrixBlock input, ConvolutionParameters params) {
 		if(input.rlen != params.P*params.Q || input.clen != params.C*params.R*params.S) {
 			throw new DMLRuntimeException("Incorrect input dimensions");
 		}
@@ -242,7 +242,7 @@ public class LibMatrixDNNIm2Col
 	
 	// Converts input: PQ X CRS matrix and writes to 1 X CHW if inputN == 0
 	// Or converts input: NPQ X CRS matrix and writes to N X CHW 
-	private static void col2IMDenseInput(int inputN, int outputN, double [] inputArray, double [] outputArray, ConvolutionParameters params) throws DMLRuntimeException {
+	private static void col2IMDenseInput(int inputN, int outputN, double [] inputArray, double [] outputArray, ConvolutionParameters params) {
 		final int outputNOffset = outputN*params.C*params.H*params.W;
 		final int HW = params.H*params.W;
 		final int inputNPQ = inputN*params.P*params.Q;


[05/12] systemml git commit: [SYSTEMML-2191] Cleanup exception hierarchy and handling, part 3

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/FrameBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/FrameBlock.java b/src/main/java/org/apache/sysml/runtime/matrix/data/FrameBlock.java
index ff720a2..87c6aca 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/FrameBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/FrameBlock.java
@@ -793,17 +793,13 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
 	///////
 	// indexing and append operations
 	
-	public FrameBlock leftIndexingOperations(FrameBlock rhsFrame, IndexRange ixrange, FrameBlock ret)
-		throws DMLRuntimeException
-	{
+	public FrameBlock leftIndexingOperations(FrameBlock rhsFrame, IndexRange ixrange, FrameBlock ret) {
 		return leftIndexingOperations(rhsFrame, 
 				(int)ixrange.rowStart, (int)ixrange.rowEnd, 
 				(int)ixrange.colStart, (int)ixrange.colEnd, ret);
 	}
 
-	public FrameBlock leftIndexingOperations(FrameBlock rhsFrame, int rl, int ru, int cl, int cu, FrameBlock ret)
-		throws DMLRuntimeException
-	{
+	public FrameBlock leftIndexingOperations(FrameBlock rhsFrame, int rl, int ru, int cl, int cu, FrameBlock ret) {
 		// check the validity of bounds
 		if (   rl < 0 || rl >= getNumRows() || ru < rl || ru >= getNumRows()
 			|| cl < 0 || cu >= getNumColumns() || cu < cl || cu >= getNumColumns() ) {
@@ -848,9 +844,7 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
 		return ret;
 	}
 
-	public FrameBlock slice(IndexRange ixrange, FrameBlock ret) 
-		throws DMLRuntimeException
-	{
+	public FrameBlock slice(IndexRange ixrange, FrameBlock ret) {
 		return slice(
 				(int)ixrange.rowStart, (int)ixrange.rowEnd,
 				(int)ixrange.colStart, (int)ixrange.colEnd, ret);
@@ -866,11 +860,8 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
 	 * @param cu column upper index, inclusive, 0-based
 	 * @param retCache cache block
 	 * @return frame block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public FrameBlock slice(int rl, int ru, int cl, int cu, CacheBlock retCache) 
-		throws DMLRuntimeException
-	{
+	public FrameBlock slice(int rl, int ru, int cl, int cu, CacheBlock retCache) {
 		FrameBlock ret = (FrameBlock)retCache;
 		// check the validity of bounds
 		if (   rl < 0 || rl >= getNumRows() || ru < rl || ru >= getNumRows()
@@ -966,11 +957,8 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
 	 * @param ret frame block to return, can be null
 	 * @param cbind if true, column append
 	 * @return frame block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public FrameBlock append( FrameBlock that, FrameBlock ret, boolean cbind )
-		throws DMLRuntimeException
-	{
+	public FrameBlock append( FrameBlock that, FrameBlock ret, boolean cbind ) {
 		if( cbind ) //COLUMN APPEND
 		{
 			//sanity check row dimension mismatch
@@ -1087,15 +1075,11 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
 		return map;
 	}
 
-	public void merge(CacheBlock that, boolean bDummy) 
-			throws DMLRuntimeException
-	{
+	public void merge(CacheBlock that, boolean bDummy) {
 		merge((FrameBlock)that);
 	}
 
-	public void merge(FrameBlock that) 
-		throws DMLRuntimeException
-	{
+	public void merge(FrameBlock that) {
 		//check for empty input source (nothing to merge)
 		if( that == null || that.getNumRows() == 0 )
 			return;
@@ -1140,11 +1124,8 @@ public class FrameBlock implements Writable, CacheBlock, Externalizable
 	 * @param brlen ?
 	 * @param iMaxRowsToCopy ?
 	 * @return frame block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public FrameBlock zeroOutOperations(FrameBlock result, IndexRange range, boolean complementary, int iRowStartSrc, int iRowStartDest, int brlen, int iMaxRowsToCopy)
-			throws DMLRuntimeException 
-	{
+	public FrameBlock zeroOutOperations(FrameBlock result, IndexRange range, boolean complementary, int iRowStartSrc, int iRowStartDest, int brlen, int iMaxRowsToCopy) {
 		int clen = getNumColumns();
 		
 		if(result==null)

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/InputInfo.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/InputInfo.java b/src/main/java/org/apache/sysml/runtime/matrix/data/InputInfo.java
index e736b43..2bbad62 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/InputInfo.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/InputInfo.java
@@ -83,7 +83,7 @@ public class InputInfo implements Serializable
 	public static final InputInfo CSVInputInfo=new InputInfo(TextInputFormat.class, 
 			 LongWritable.class, Text.class);
 	
-	public static OutputInfo getMatchingOutputInfo(InputInfo ii) throws DMLRuntimeException {
+	public static OutputInfo getMatchingOutputInfo(InputInfo ii) {
 		if ( ii == InputInfo.BinaryBlockInputInfo )
 			return OutputInfo.BinaryBlockOutputInfo;
 		else if ( ii == InputInfo.MatrixMarketInputInfo)
@@ -140,9 +140,7 @@ public class InputInfo implements Serializable
 		return null;
 	}
 	
-	public static String inputInfoToString (InputInfo ii) 
-		throws DMLRuntimeException 
-	{
+	public static String inputInfoToString (InputInfo ii) {
 		if ( ii == TextCellInputInfo )
 			return "textcell";
 		else if ( ii == BinaryCellInputInfo )

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibCommonsMath.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibCommonsMath.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibCommonsMath.java
index 2755c28..4efc3aa 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibCommonsMath.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibCommonsMath.java
@@ -56,9 +56,7 @@ public class LibCommonsMath
 		return ( opcode.equals("solve") );
 	}
 		
-	public static MatrixBlock unaryOperations(MatrixObject inj, String opcode) 
-		throws DMLRuntimeException 
-	{
+	public static MatrixBlock unaryOperations(MatrixObject inj, String opcode) {
 		Array2DRowRealMatrix matrixInput = DataConverter.convertToArray2DRowRealMatrix(inj);
 		if(opcode.equals("inverse"))
 			return computeMatrixInverse(matrixInput);
@@ -67,9 +65,7 @@ public class LibCommonsMath
 		return null;
 	}
 	
-	public static MatrixBlock[] multiReturnOperations(MatrixObject in, String opcode) 
-		throws DMLRuntimeException 
-	{
+	public static MatrixBlock[] multiReturnOperations(MatrixObject in, String opcode) {
 		if(opcode.equals("qr"))
 			return computeQR(in);
 		else if (opcode.equals("lu"))
@@ -81,9 +77,7 @@ public class LibCommonsMath
 		return null;
 	}
 	
-	public static MatrixBlock matrixMatrixOperations(MatrixObject in1, MatrixObject in2, String opcode) 
-		throws DMLRuntimeException 
-	{
+	public static MatrixBlock matrixMatrixOperations(MatrixObject in1, MatrixObject in2, String opcode) {
 		if(opcode.equals("solve"))
 			return computeSolve(in1, in2);
 		return null;
@@ -95,11 +89,8 @@ public class LibCommonsMath
 	 * @param in1 matrix object 1
 	 * @param in2 matrix object 2
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static MatrixBlock computeSolve(MatrixObject in1, MatrixObject in2) 
-		throws DMLRuntimeException 
-	{
+	private static MatrixBlock computeSolve(MatrixObject in1, MatrixObject in2) {
 		Array2DRowRealMatrix matrixInput = DataConverter.convertToArray2DRowRealMatrix(in1);
 		Array2DRowRealMatrix vectorInput = DataConverter.convertToArray2DRowRealMatrix(in2);
 		
@@ -121,11 +112,8 @@ public class LibCommonsMath
 	 * 
 	 * @param in matrix object
 	 * @return array of matrix blocks
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static MatrixBlock[] computeQR(MatrixObject in) 
-		throws DMLRuntimeException 
-	{
+	private static MatrixBlock[] computeQR(MatrixObject in) {
 		Array2DRowRealMatrix matrixInput = DataConverter.convertToArray2DRowRealMatrix(in);
 		
 		// Perform QR decomposition
@@ -145,11 +133,8 @@ public class LibCommonsMath
 	 * 
 	 * @param in matrix object
 	 * @return array of matrix blocks
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static MatrixBlock[] computeLU(MatrixObject in) 
-		throws DMLRuntimeException 
-	{
+	private static MatrixBlock[] computeLU(MatrixObject in) {
 		if ( in.getNumRows() != in.getNumColumns() ) {
 			throw new DMLRuntimeException("LU Decomposition can only be done on a square matrix. Input matrix is rectangular (rows=" + in.getNumRows() + ", cols="+ in.getNumColumns() +")");
 		}
@@ -176,11 +161,8 @@ public class LibCommonsMath
 	 * 
 	 * @param in matrix object
 	 * @return array of matrix blocks
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static MatrixBlock[] computeEigen(MatrixObject in)
-		throws DMLRuntimeException 
-	{
+	private static MatrixBlock[] computeEigen(MatrixObject in) {
 		if ( in.getNumRows() != in.getNumColumns() ) {
 			throw new DMLRuntimeException("Eigen Decomposition can only be done on a square matrix. Input matrix is rectangular (rows=" + in.getNumRows() + ", cols="+ in.getNumColumns() +")");
 		}
@@ -230,9 +212,8 @@ public class LibCommonsMath
 	 * 
 	 * @param in Input matrix
 	 * @return An array containing U, Sigma & V
-	 * @throws DMLRuntimeException
 	 */
-	private static MatrixBlock[] computeSvd(MatrixObject in) throws DMLRuntimeException {
+	private static MatrixBlock[] computeSvd(MatrixObject in) {
 		Array2DRowRealMatrix matrixInput = DataConverter.convertToArray2DRowRealMatrix(in);
 
 		SingularValueDecomposition svd = new SingularValueDecomposition(matrixInput);
@@ -252,11 +233,8 @@ public class LibCommonsMath
 	 * 
 	 * @param in commons-math3 Array2DRowRealMatrix
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static MatrixBlock computeMatrixInverse(Array2DRowRealMatrix in) 
-		throws DMLRuntimeException 
-	{	
+	private static MatrixBlock computeMatrixInverse(Array2DRowRealMatrix in) {
 		if ( !in.isSquare() )
 			throw new DMLRuntimeException("Input to inv() must be square matrix -- given: a " + in.getRowDimension() + "x" + in.getColumnDimension() + " matrix.");
 		
@@ -273,18 +251,13 @@ public class LibCommonsMath
 	 * 
 	 * @param in commons-math3 Array2DRowRealMatrix
 	 * @return matrix block
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static MatrixBlock computeCholesky(Array2DRowRealMatrix in) 
-		throws DMLRuntimeException 
-	{	
+	private static MatrixBlock computeCholesky(Array2DRowRealMatrix in) {
 		if ( !in.isSquare() )
 			throw new DMLRuntimeException("Input to cholesky() must be square matrix -- given: a " + in.getRowDimension() + "x" + in.getColumnDimension() + " matrix.");
-
 		CholeskyDecomposition cholesky = new CholeskyDecomposition(in, 1e-14,
 			CholeskyDecomposition.DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLD);
 		RealMatrix rmL = cholesky.getL();
-		
 		return DataConverter.convertToMatrixBlock(rmL.getData());
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 85d5654..f99accb 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
@@ -118,11 +118,8 @@ public class LibMatrixAgg
 	 * @param in input matrix
 	 * @param aggVal current aggregate values (in/out)
 	 * @param aggCorr current aggregate correction (in/out)
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void aggregateBinaryMatrix(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr) 
-		throws DMLRuntimeException
-	{
+	public static void aggregateBinaryMatrix(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr) {
 		//Timing time = new Timing(true);
 		//boolean saggVal = aggVal.sparse, saggCorr = aggCorr.sparse;
 		//long naggVal = aggVal.nonZeros, naggCorr = aggCorr.nonZeros;
@@ -154,11 +151,8 @@ public class LibMatrixAgg
 	 * @param in matrix block
 	 * @param aggVal aggregate operator
 	 * @param aop aggregate operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void aggregateBinaryMatrix(MatrixBlock in, MatrixBlock aggVal, AggregateOperator aop) 
-		throws DMLRuntimeException
-	{	
+	public static void aggregateBinaryMatrix(MatrixBlock in, MatrixBlock aggVal, AggregateOperator aop) {
 		//sanity check matching dimensions 
 		if( in.getNumRows()!=aggVal.getNumRows() || in.getNumColumns()!=aggVal.getNumColumns() )
 			throw new DMLRuntimeException("Dimension mismatch on aggregate: "+in.getNumRows()+"x"+in.getNumColumns()+
@@ -182,9 +176,7 @@ public class LibMatrixAgg
 		//                   "("+aggVal.getNonZeros()+","+aggVal.isInSparseFormat()+") in "+time.stop()+"ms.");
 	}
 
-	public static void aggregateUnaryMatrix(MatrixBlock in, MatrixBlock out, AggregateUnaryOperator uaop) 
-		throws DMLRuntimeException
-	{
+	public static void aggregateUnaryMatrix(MatrixBlock in, MatrixBlock out, AggregateUnaryOperator uaop) {
 		//prepare meta data 
 		AggType aggtype = getAggType(uaop);
 		final int m = in.rlen;
@@ -215,9 +207,7 @@ public class LibMatrixAgg
 		//System.out.println("uagg ("+in.rlen+","+in.clen+","+in.sparse+") in "+time.stop()+"ms.");
 	}
 
-	public static void aggregateUnaryMatrix(MatrixBlock in, MatrixBlock out, AggregateUnaryOperator uaop, int k) 
-		throws DMLRuntimeException
-	{
+	public static void aggregateUnaryMatrix(MatrixBlock in, MatrixBlock out, AggregateUnaryOperator uaop, int k) {
 		//fall back to sequential version if necessary
 		if(    k <= 1 || (long)in.nonZeros < PAR_NUMCELL_THRESHOLD || in.rlen <= k/2
 			|| (!(uaop.indexFn instanceof ReduceCol) &&  out.clen*8*k > PAR_INTERMEDIATE_SIZE_THRESHOLD ) || 
@@ -277,9 +267,7 @@ public class LibMatrixAgg
 		//System.out.println("uagg k="+k+" ("+in.rlen+","+in.clen+","+in.sparse+") in "+time.stop()+"ms.");
 	}
 
-	public static MatrixBlock cumaggregateUnaryMatrix(MatrixBlock in, MatrixBlock out, UnaryOperator uop) 
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock cumaggregateUnaryMatrix(MatrixBlock in, MatrixBlock out, UnaryOperator uop) {
 		//prepare meta data 
 		AggType aggtype = getAggType(uop);
 		final int m = in.rlen;
@@ -311,9 +299,7 @@ public class LibMatrixAgg
 		return out;
 	}
 
-	public static MatrixBlock cumaggregateUnaryMatrix(MatrixBlock in, MatrixBlock out, UnaryOperator uop, int k) 
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock cumaggregateUnaryMatrix(MatrixBlock in, MatrixBlock out, UnaryOperator uop, int k) {
 		AggregateUnaryOperator uaop = InstructionUtils.parseBasicCumulativeAggregateUnaryOperator(uop);
 		
 		//fall back to sequential if necessary or agg not supported
@@ -392,9 +378,7 @@ public class LibMatrixAgg
 		return out;
 	}
 
-	public static MatrixBlock aggregateTernary(MatrixBlock in1, MatrixBlock in2, MatrixBlock in3, MatrixBlock ret, AggregateTernaryOperator op) 
-		throws DMLRuntimeException
-	{
+	public static MatrixBlock aggregateTernary(MatrixBlock in1, MatrixBlock in2, MatrixBlock in3, MatrixBlock ret, AggregateTernaryOperator op) {
 		//early abort if any block is empty
 		if( in1.isEmptyBlock(false) || in2.isEmptyBlock(false) || in3!=null&&in3.isEmptyBlock(false) ) {
 			return ret;
@@ -421,9 +405,7 @@ public class LibMatrixAgg
 		return ret;
 	}
 
-	public static MatrixBlock aggregateTernary(MatrixBlock in1, MatrixBlock in2, MatrixBlock in3, MatrixBlock ret, AggregateTernaryOperator op, int k) 
-		throws DMLRuntimeException
-	{		
+	public static MatrixBlock aggregateTernary(MatrixBlock in1, MatrixBlock in2, MatrixBlock in3, MatrixBlock ret, AggregateTernaryOperator op, int k) {
 		//fall back to sequential version if necessary
 		if( k <= 1 || in1.nonZeros+in2.nonZeros < PAR_NUMCELL_THRESHOLD || in1.rlen <= k/2 
 			|| (!(op.indexFn instanceof ReduceCol) &&  ret.clen*8*k > PAR_INTERMEDIATE_SIZE_THRESHOLD) ) {
@@ -464,9 +446,7 @@ public class LibMatrixAgg
 		return ret;
 	}
 
-	public static void groupedAggregate(MatrixBlock groups, MatrixBlock target, MatrixBlock weights, MatrixBlock result, int numGroups, Operator op) 
-		throws DMLRuntimeException
-	{
+	public static void groupedAggregate(MatrixBlock groups, MatrixBlock target, MatrixBlock weights, MatrixBlock result, int numGroups, Operator op) {
 		if( !(op instanceof CMOperator || op instanceof AggregateOperator) ) {
 			throw new DMLRuntimeException("Invalid operator (" + op + ") encountered while processing groupedAggregate.");
 		}
@@ -496,7 +476,6 @@ public class LibMatrixAgg
 	}
 
 	public static void groupedAggregate(MatrixBlock groups, MatrixBlock target, MatrixBlock weights, MatrixBlock result, int numGroups, Operator op, int k) 
-		throws DMLRuntimeException
 	{
 		//fall back to sequential version if necessary
 		boolean rowVector = (target.getNumRows()==1 && target.getNumColumns()>1);
@@ -646,9 +625,7 @@ public class LibMatrixAgg
 		return AggType.INVALID;
 	}
 
-	private static void aggregateFinalResult( AggregateOperator aop, MatrixBlock out, MatrixBlock partout ) 
-		throws DMLRuntimeException
-	{
+	private static void aggregateFinalResult( AggregateOperator aop, MatrixBlock out, MatrixBlock partout ) {
 		AggregateOperator laop = aop;
 		
 		//special handling for mean where the final aggregate operator (kahan plus)
@@ -786,11 +763,8 @@ public class LibMatrixAgg
 	 * @param aggop aggregate operator
 	 * @param cl column lower index
 	 * @param cu column upper index
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void groupedAggregateKahanPlus( MatrixBlock groups, MatrixBlock target, MatrixBlock weights, MatrixBlock result, int numGroups, AggregateOperator aggop, int cl, int cu ) 
-		throws DMLRuntimeException
-	{
+	private static void groupedAggregateKahanPlus( MatrixBlock groups, MatrixBlock target, MatrixBlock weights, MatrixBlock result, int numGroups, AggregateOperator aggop, int cl, int cu ) {
 		boolean rowVector = (target.getNumRows()==1 && target.getNumColumns()>1);
 		double w = 1; //default weight
 		
@@ -904,9 +878,7 @@ public class LibMatrixAgg
 				result.appendValue(i, j+cl, buffer[i][j]._sum);
 	}
 
-	private static void groupedAggregateCM( MatrixBlock groups, MatrixBlock target, MatrixBlock weights, MatrixBlock result, int numGroups, CMOperator cmOp, int cl, int cu ) 
-		throws DMLRuntimeException
-	{
+	private static void groupedAggregateCM( MatrixBlock groups, MatrixBlock target, MatrixBlock weights, MatrixBlock result, int numGroups, CMOperator cmOp, int cl, int cu ) {
 		CM cmFn = CM.getCMFnObject(((CMOperator) cmOp).getAggOpType());
 		double w = 1; //default weight
 		
@@ -974,9 +946,7 @@ public class LibMatrixAgg
 			}
 	}
 
-	private static void groupedAggregateVecCount( MatrixBlock groups, MatrixBlock result, int numGroups ) 
-		throws DMLRuntimeException
-	{
+	private static void groupedAggregateVecCount( MatrixBlock groups, MatrixBlock result, int numGroups ) {
 		//note: groups are always dense because 0 invalid
 		if( groups.isInSparseFormat() || groups.isEmptyBlock(false) )
 			throw new DMLRuntimeException("Unsupported sparse input for aggregate-count on group vector.");
@@ -999,9 +969,7 @@ public class LibMatrixAgg
 		}
 	}
 
-	private static void aggregateBinaryMatrixAllDense(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr) 
-			throws DMLRuntimeException
-	{
+	private static void aggregateBinaryMatrixAllDense(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr) {
 		if( in.denseBlock==null || in.isEmptyBlock(false) )
 			return;
 		
@@ -1035,9 +1003,7 @@ public class LibMatrixAgg
 		aggCorr.nonZeros = nnzCC;
 	}
 
-	private static void aggregateBinaryMatrixSparseDense(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr) 
-			throws DMLRuntimeException
-	{
+	private static void aggregateBinaryMatrixSparseDense(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr) {
 		if( in.isEmptyBlock(false) )
 			return;
 		
@@ -1081,9 +1047,7 @@ public class LibMatrixAgg
 		aggCorr.recomputeNonZeros(); 
 	}
 
-	private static void aggregateBinaryMatrixSparseGeneric(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr) 
-			throws DMLRuntimeException
-	{
+	private static void aggregateBinaryMatrixSparseGeneric(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr) {
 		if( in.isEmptyBlock(false) )
 			return;
 		
@@ -1123,9 +1087,7 @@ public class LibMatrixAgg
 			aggCorr.examSparsity(false);
 	}
 
-	private static void aggregateBinaryMatrixDenseGeneric(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr) 
-		throws DMLRuntimeException
-	{
+	private static void aggregateBinaryMatrixDenseGeneric(MatrixBlock in, MatrixBlock aggVal, MatrixBlock aggCorr) {
 		if( in.denseBlock==null || in.isEmptyBlock(false) )
 			return;
 		
@@ -1155,9 +1117,7 @@ public class LibMatrixAgg
 			aggCorr.examSparsity(false);
 	}
 
-	private static void aggregateBinaryMatrixLastRowDenseGeneric(MatrixBlock in, MatrixBlock aggVal) 
-			throws DMLRuntimeException
-	{
+	private static void aggregateBinaryMatrixLastRowDenseGeneric(MatrixBlock in, MatrixBlock aggVal) {
 		if( in.denseBlock==null || in.isEmptyBlock(false) )
 			return;
 		
@@ -1185,9 +1145,7 @@ public class LibMatrixAgg
 		aggVal.examSparsity();
 	}
 
-	private static void aggregateBinaryMatrixLastRowSparseGeneric(MatrixBlock in, MatrixBlock aggVal) 
-			throws DMLRuntimeException
-	{
+	private static void aggregateBinaryMatrixLastRowSparseGeneric(MatrixBlock in, MatrixBlock aggVal) {
 		//sparse-safe operation
 		if( in.isEmptyBlock(false) )
 			return;
@@ -1226,9 +1184,7 @@ public class LibMatrixAgg
 		aggVal.examSparsity(); 
 	}
 
-	private static void aggregateBinaryMatrixLastColDenseGeneric(MatrixBlock in, MatrixBlock aggVal) 
-			throws DMLRuntimeException
-	{
+	private static void aggregateBinaryMatrixLastColDenseGeneric(MatrixBlock in, MatrixBlock aggVal) {
 		if( in.denseBlock==null || in.isEmptyBlock(false) )
 			return;
 		
@@ -1255,9 +1211,7 @@ public class LibMatrixAgg
 		aggVal.examSparsity();
 	}
 
-	private static void aggregateBinaryMatrixLastColSparseGeneric(MatrixBlock in, MatrixBlock aggVal) 
-			throws DMLRuntimeException
-	{
+	private static void aggregateBinaryMatrixLastColSparseGeneric(MatrixBlock in, MatrixBlock aggVal) {
 		//sparse-safe operation
 		if( in.isEmptyBlock(false) )
 			return;
@@ -1297,9 +1251,7 @@ public class LibMatrixAgg
 		aggVal.examSparsity(); 
 	}
 
-	private static void aggregateUnaryMatrixDense(MatrixBlock in, MatrixBlock out, AggType optype, ValueFunction vFn, IndexFunction ixFn, int rl, int ru) 
-			throws DMLRuntimeException
-	{
+	private static void aggregateUnaryMatrixDense(MatrixBlock in, MatrixBlock out, AggType optype, ValueFunction vFn, IndexFunction ixFn, int rl, int ru) {
 		final int n = in.clen;
 		
 		//note: due to corrections, even the output might be a large dense block
@@ -1400,9 +1352,7 @@ public class LibMatrixAgg
 		}
 	}
 
-	private static void aggregateUnaryMatrixSparse(MatrixBlock in, MatrixBlock out, AggType optype, ValueFunction vFn, IndexFunction ixFn, int rl, int ru) 
-			throws DMLRuntimeException
-	{
+	private static void aggregateUnaryMatrixSparse(MatrixBlock in, MatrixBlock out, AggType optype, ValueFunction vFn, IndexFunction ixFn, int rl, int ru) {
 		final int m = in.rlen;
 		final int n = in.clen;
 		
@@ -1504,9 +1454,7 @@ public class LibMatrixAgg
 		}
 	}
 
-	private static void cumaggregateUnaryMatrixDense(MatrixBlock in, MatrixBlock out, AggType optype, ValueFunction vFn, double[] agg, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void cumaggregateUnaryMatrixDense(MatrixBlock in, MatrixBlock out, AggType optype, ValueFunction vFn, double[] agg, int rl, int ru) {
 		final int n = in.clen;
 		
 		DenseBlock da = in.getDenseBlock();
@@ -1536,9 +1484,7 @@ public class LibMatrixAgg
 		}
 	}
 
-	private static void cumaggregateUnaryMatrixSparse(MatrixBlock in, MatrixBlock out, AggType optype, ValueFunction vFn, double[] agg, int rl, int ru) 
-			throws DMLRuntimeException
-	{
+	private static void cumaggregateUnaryMatrixSparse(MatrixBlock in, MatrixBlock out, AggType optype, ValueFunction vFn, double[] agg, int rl, int ru) {
 		final int m = in.rlen;
 		final int n = in.clen;
 		
@@ -1568,9 +1514,7 @@ public class LibMatrixAgg
 		}
 	}
 
-	private static MatrixBlock aggregateUnaryMatrixEmpty(MatrixBlock in, MatrixBlock out, AggType optype, IndexFunction ixFn) 
-		throws DMLRuntimeException
-	{
+	private static MatrixBlock aggregateUnaryMatrixEmpty(MatrixBlock in, MatrixBlock out, AggType optype, IndexFunction ixFn) {
 		//handle all full aggregates over matrices with zero rows or columns
 		if( ixFn instanceof ReduceAll && (in.getNumRows() == 0 || in.getNumColumns() == 0) ) {
 			double val = Double.NaN;
@@ -2047,11 +1991,8 @@ public class LibMatrixAgg
 	 *           calculation.
 	 * @param rl Lower row limit.
 	 * @param ru Upper row limit.
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void d_uavar(DenseBlock a, DenseBlock c, int n, CM_COV_Object cbuff, CM cm, int rl, int ru) 
-		throws DMLRuntimeException
-	{
+	private static void d_uavar(DenseBlock a, DenseBlock c, int n, CM_COV_Object cbuff, CM cm, int rl, int ru) {
 		final int bil = a.index(rl);
 		final int biu = a.index(ru-1);
 		for(int bi=bil; bi<=biu; bi++) {
@@ -2081,11 +2022,8 @@ public class LibMatrixAgg
 	 *           calculation.
 	 * @param rl Lower row limit.
 	 * @param ru Upper row limit.
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void d_uarvar(DenseBlock a, DenseBlock c, int n, CM_COV_Object cbuff, CM cm, int rl, int ru)
-		throws DMLRuntimeException
-	{
+	private static void d_uarvar(DenseBlock a, DenseBlock c, int n, CM_COV_Object cbuff, CM cm, int rl, int ru) {
 		// calculate variance for each row
 		for (int i=rl; i<ru; i++) {
 			cbuff.reset(); // reset buffer for each row
@@ -2113,11 +2051,8 @@ public class LibMatrixAgg
 	 *           calculation.
 	 * @param rl Lower row limit.
 	 * @param ru Upper row limit.
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void d_uacvar(DenseBlock a, DenseBlock c, int n, CM_COV_Object cbuff, CM cm, int rl, int ru)
-		throws DMLRuntimeException
-	{
+	private static void d_uacvar(DenseBlock a, DenseBlock c, int n, CM_COV_Object cbuff, CM cm, int rl, int ru) {
 		// calculate variance for each column incrementally
 		for (int i=rl; i<ru; i++)
 			varAgg(a.values(i), c, a.pos(i), n, cbuff, cm);
@@ -2745,11 +2680,8 @@ public class LibMatrixAgg
 	 *           calculation.
 	 * @param rl Lower row limit.
 	 * @param ru Upper row limit.
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void s_uavar(SparseBlock a, DenseBlock c, int n, CM_COV_Object cbuff, CM cm, int rl, int ru)
-		throws DMLRuntimeException
-	{
+	private static void s_uavar(SparseBlock a, DenseBlock c, int n, CM_COV_Object cbuff, CM cm, int rl, int ru) {
 		// compute and store count of empty cells before aggregation
 		int count = (ru-rl)*n - (int)a.size(rl, ru);
 		cbuff.w = count;
@@ -2784,11 +2716,8 @@ public class LibMatrixAgg
 	 *           calculation.
 	 * @param rl Lower row limit.
 	 * @param ru Upper row limit.
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void s_uarvar(SparseBlock a, DenseBlock c, int n, CM_COV_Object cbuff, CM cm, int rl, int ru)
-		throws DMLRuntimeException
-	{
+	private static void s_uarvar(SparseBlock a, DenseBlock c, int n, CM_COV_Object cbuff, CM cm, int rl, int ru) {
 		// calculate aggregated variance for each row
 		for( int i=rl; i<ru; i++ ) {
 			cbuff.reset(); // reset buffer for each row
@@ -2819,11 +2748,8 @@ public class LibMatrixAgg
 	 *           calculation.
 	 * @param rl Lower row limit.
 	 * @param ru Upper row limit.
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void s_uacvar(SparseBlock a, DenseBlock c, int n, CM_COV_Object cbuff, CM cm, int rl, int ru)
-		throws DMLRuntimeException
-	{
+	private static void s_uacvar(SparseBlock a, DenseBlock c, int n, CM_COV_Object cbuff, CM cm, int rl, int ru) {
 		// compute and store counts of empty cells per column before aggregation
 		// note: column results are { var | mean, count, m2 correction, mean correction }
 		// - first, store total possible column counts in 3rd row of output
@@ -2989,14 +2915,12 @@ public class LibMatrixAgg
 		}
 	}
 
-	private static void var(double[] a, int ai, final int len, CM_COV_Object cbuff, CM cm) throws DMLRuntimeException {
+	private static void var(double[] a, int ai, final int len, CM_COV_Object cbuff, CM cm) {
 		for(int i=0; i<len; i++, ai++)
 			cbuff = (CM_COV_Object) cm.execute(cbuff, a[ai]);
 	}
 
-	private static void varAgg(double[] a, DenseBlock c, int ai, final int len, CM_COV_Object cbuff, CM cm)
-		throws DMLRuntimeException
-	{
+	private static void varAgg(double[] a, DenseBlock c, int ai, final int len, CM_COV_Object cbuff, CM cm) {
 		//note: output might span multiple physical blocks
 		double[] var = c.values(0);
 		double[] mean = c.values(1);
@@ -3024,7 +2948,6 @@ public class LibMatrixAgg
 	}
 
 	private static void varAgg(double[] a, DenseBlock c, int[] aix, int ai, final int len, final int n, CM_COV_Object cbuff, CM cm)
-		throws DMLRuntimeException
 	{
 		//note: output might span multiple physical blocks
 		double[] var = c.values(0);
@@ -3152,7 +3075,7 @@ public class LibMatrixAgg
 		}
 		
 		@Override
-		public Object call() throws DMLRuntimeException {
+		public Object call() {
 			if( !_in.sparse )
 				aggregateUnaryMatrixDense(_in, _ret, _aggtype, _uaop.aggOp.increOp.fn, _uaop.indexFn, _rl, _ru);
 			else
@@ -3170,10 +3093,8 @@ public class LibMatrixAgg
 		private int _rl = -1;
 		private int _ru = -1;
 
-		protected PartialAggTask( MatrixBlock in, MatrixBlock ret, AggType aggtype, AggregateUnaryOperator uaop, int rl, int ru ) 
-			throws DMLRuntimeException
-		{
-			_in = in;	
+		protected PartialAggTask( MatrixBlock in, MatrixBlock ret, AggType aggtype, AggregateUnaryOperator uaop, int rl, int ru ) {
+			_in = in;
 			_ret = ret;
 			_aggtype = aggtype;
 			_uaop = uaop;
@@ -3182,8 +3103,7 @@ public class LibMatrixAgg
 		}
 		
 		@Override
-		public Object call() throws DMLRuntimeException
-		{
+		public Object call() {
 			//thead-local allocation for partial aggregation
 			_ret = new MatrixBlock(_ret.rlen, _ret.clen, false);
 			_ret.allocateDenseBlock();
@@ -3214,9 +3134,7 @@ public class LibMatrixAgg
 		private int _rl = -1;
 		private int _ru = -1;
 
-		protected CumAggTask( MatrixBlock in, double[] agg, MatrixBlock ret, AggType aggtype, UnaryOperator uop, int rl, int ru ) 
-			throws DMLRuntimeException
-		{
+		protected CumAggTask( MatrixBlock in, double[] agg, MatrixBlock ret, AggType aggtype, UnaryOperator uop, int rl, int ru ) {
 			_in = in;
 			_agg = agg;
 			_ret = ret;
@@ -3227,14 +3145,12 @@ public class LibMatrixAgg
 		}
 		
 		@Override
-		public Long call() throws DMLRuntimeException
-		{
+		public Long call() {
 			//compute partial cumulative aggregate
 			if( !_in.sparse )
 				cumaggregateUnaryMatrixDense(_in, _ret, _aggtype, _uop.fn, _agg, _rl, _ru);
 			else
 				cumaggregateUnaryMatrixSparse(_in, _ret, _aggtype, _uop.fn, _agg, _rl, _ru);
-			
 			//recompute partial non-zeros (ru exlusive)
 			return _ret.recomputeNonZeros(_rl, _ru-1, 0, _ret.getNumColumns()-1);
 		}
@@ -3250,9 +3166,7 @@ public class LibMatrixAgg
 		private final int _rl;
 		private final int _ru;
 
-		protected AggTernaryTask( MatrixBlock in1, MatrixBlock in2, MatrixBlock in3, MatrixBlock ret, IndexFunction ixFn, int rl, int ru ) 
-			throws DMLRuntimeException
-		{
+		protected AggTernaryTask( MatrixBlock in1, MatrixBlock in2, MatrixBlock in3, MatrixBlock ret, IndexFunction ixFn, int rl, int ru ) {
 			_in1 = in1;
 			_in2 = in2;
 			_in3 = in3;
@@ -3263,8 +3177,7 @@ public class LibMatrixAgg
 		}
 		
 		@Override
-		public MatrixBlock call() throws DMLRuntimeException
-		{
+		public MatrixBlock call() {
 			//thead-local allocation for partial aggregation
 			_ret = new MatrixBlock(_ret.rlen, _ret.clen, false);
 			_ret.allocateDenseBlock();
@@ -3292,9 +3205,7 @@ public class LibMatrixAgg
 		private int _cl = -1;
 		private int _cu = -1;
 
-		protected GrpAggTask( MatrixBlock groups, MatrixBlock target, MatrixBlock weights, MatrixBlock ret, int numGroups, Operator op, int cl, int cu ) 
-			throws DMLRuntimeException
-		{
+		protected GrpAggTask( MatrixBlock groups, MatrixBlock target, MatrixBlock weights, MatrixBlock ret, int numGroups, Operator op, int cl, int cu ) {
 			_groups = groups;
 			_target = target;
 			_weights = weights;
@@ -3306,8 +3217,7 @@ public class LibMatrixAgg
 		}
 		
 		@Override
-		public Object call() throws DMLRuntimeException
-		{
+		public Object call() {
 			//CM operator for count, mean, variance
 			//note: current support only for column vectors
 			if( _op instanceof CMOperator ) {
@@ -3320,7 +3230,6 @@ public class LibMatrixAgg
 				AggregateOperator aggop = (AggregateOperator) _op;
 				groupedAggregateKahanPlus(_groups, _target, _weights, _ret, _numGroups, aggop, _cl, _cu);
 			}
-			
 			return null;
 		}
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixBincell.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixBincell.java b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixBincell.java
index 224221b..5a93508 100644
--- a/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixBincell.java
+++ b/src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixBincell.java
@@ -82,11 +82,8 @@ public class LibMatrixBincell
 	 * @param m1 input matrix
 	 * @param ret result matrix
 	 * @param op scalar operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void bincellOp(MatrixBlock m1, MatrixBlock ret, ScalarOperator op) 
-		throws DMLRuntimeException
-	{
+	public static void bincellOp(MatrixBlock m1, MatrixBlock ret, ScalarOperator op) {
 		//check internal assumptions 
 		if(   (op.sparseSafe && m1.isInSparseFormat()!=ret.isInSparseFormat())
 			||(!op.sparseSafe && ret.isInSparseFormat()) ) {
@@ -112,11 +109,8 @@ public class LibMatrixBincell
 	 * @param m2 input matrix 2
 	 * @param ret result matrix
 	 * @param op binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void bincellOp(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) 
-		throws DMLRuntimeException
-	{
+	public static void bincellOp(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) {
 		//execute binary cell operations
 		if(op.sparseSafe || isSparseSafeDivide(op, m2))
 			safeBinary(m1, m2, ret, op);
@@ -135,11 +129,8 @@ public class LibMatrixBincell
 	 * @param m1ret result matrix
 	 * @param m2 matrix block
 	 * @param op binary operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void bincellOpInPlace(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) 
-		throws DMLRuntimeException
-	{
+	public static void bincellOpInPlace(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) {
 		//execute binary cell operations
 		if(op.sparseSafe || isSparseSafeDivide(op, m2))
 			safeBinaryInPlace(m1ret, m2, op);
@@ -200,9 +191,7 @@ public class LibMatrixBincell
 	// private sparse-safe/sparse-unsafe implementations
 	///////////////////////////////////
 
-	private static void safeBinary(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinary(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) {
 		boolean skipEmpty = (op.fn instanceof Multiply 
 			|| isSparseSafeDivide(op, m2) );
 		
@@ -253,9 +242,7 @@ public class LibMatrixBincell
 		}
 	}
 
-	private static void safeBinaryMVDense(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinaryMVDense(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) {
 		boolean isMultiply = (op.fn instanceof Multiply);
 		boolean skipEmpty = (isMultiply);
 		BinaryAccessType atype = getBinaryAccessType(m1, m2);
@@ -346,9 +333,7 @@ public class LibMatrixBincell
 		ret.nonZeros = nnz;
 	}
 
-	private static void safeBinaryMVSparse(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinaryMVSparse(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) {
 		boolean isMultiply = (op.fn instanceof Multiply);
 		boolean skipEmpty = (isMultiply);
 		
@@ -455,9 +440,7 @@ public class LibMatrixBincell
 		//no need to recomputeNonZeros since maintained in append value
 	}
 
-	private static void safeBinaryMVGeneric(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinaryMVGeneric(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) {
 		boolean isMultiply = (op.fn instanceof Multiply);
 		boolean skipEmpty = (isMultiply);
 		int rlen = m1.rlen;
@@ -535,9 +518,7 @@ public class LibMatrixBincell
 		//no need to recomputeNonZeros since maintained in append value
 	}
 	
-	private static void safeBinaryVVGeneric(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinaryVVGeneric(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) {
 		int rlen = m1.rlen;
 		int clen = m2.clen;
 		
@@ -563,9 +544,7 @@ public class LibMatrixBincell
 		//no need to recomputeNonZeros since maintained in append value
 	}
 	
-	private static void safeBinaryMMSparseSparse(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinaryMMSparseSparse(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) {
 		final int rlen = m1.rlen;
 		if(ret.sparse)
 			ret.allocateSparseRowsBlock();
@@ -635,9 +614,7 @@ public class LibMatrixBincell
 		}
 	}
 	
-	private static void safeBinaryMMSparseDenseDense(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinaryMMSparseDenseDense(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) {
 		//specific case in order to prevent binary search on sparse inputs (see quickget and quickset)
 		ret.allocateDenseBlock();
 		final int n = ret.clen;
@@ -719,9 +696,7 @@ public class LibMatrixBincell
 		ret.setNonZeros(lnnz);
 	}
 	
-	private static void safeBinaryMMDenseDenseDense(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinaryMMDenseDenseDense(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) {
 		ret.allocateDenseBlock();
 		DenseBlock da = m1.getDenseBlock();
 		DenseBlock db = m2.getDenseBlock();
@@ -743,9 +718,7 @@ public class LibMatrixBincell
 		ret.setNonZeros(lnnz);
 	}
 	
-	private static void safeBinaryMMSparseDenseSkip(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinaryMMSparseDenseSkip(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) {
 		SparseBlock a = m1.sparse ? m1.sparseBlock : m2.sparseBlock;
 		if( a == null )
 			return;
@@ -771,9 +744,7 @@ public class LibMatrixBincell
 		}
 	}
 	
-	private static void safeBinaryMMGeneric(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinaryMMGeneric(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) {
 		int rlen = m1.rlen;
 		int clen = m2.clen;
 		for(int r=0; r<rlen; r++)
@@ -796,9 +767,7 @@ public class LibMatrixBincell
 	 * @param bOp binary operator
 	 * 
 	 */
-	private static void performBinOuterOperation(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator bOp) 
-		throws DMLRuntimeException
-	{
+	private static void performBinOuterOperation(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator bOp) {
 		int rlen = m1.rlen;
 		int clen = ret.clen;
 		double b[] = DataConverter.convertToDoubleVector(m2);
@@ -846,9 +815,7 @@ public class LibMatrixBincell
 		ret.examSparsity();
 	}
 
-	private static void unsafeBinary(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void unsafeBinary(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret, BinaryOperator op) {
 		int rlen = m1.rlen;
 		int clen = m1.clen;
 		BinaryAccessType atype = getBinaryAccessType(m1, m2);
@@ -924,9 +891,7 @@ public class LibMatrixBincell
 		}
 	}
 
-	private static void safeBinaryScalar(MatrixBlock m1, MatrixBlock ret, ScalarOperator op)
-		throws DMLRuntimeException
-	{
+	private static void safeBinaryScalar(MatrixBlock m1, MatrixBlock ret, ScalarOperator op) {
 		//early abort possible since sparsesafe
 		if( m1.isEmptyBlock(false) ) {
 			return;
@@ -994,11 +959,8 @@ public class LibMatrixBincell
 	 * @param m1 input matrix
 	 * @param ret result matrix
 	 * @param op scalar operator
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private static void unsafeBinaryScalar(MatrixBlock m1, MatrixBlock ret, ScalarOperator op)
-		throws DMLRuntimeException
-	{
+	private static void unsafeBinaryScalar(MatrixBlock m1, MatrixBlock ret, ScalarOperator op) {
 		//early abort possible since sparsesafe
 		if( m1.isEmptyBlock(false) ) {
 			//compute 0 op constant once and set into dense output
@@ -1053,9 +1015,7 @@ public class LibMatrixBincell
 		}
 	}
 
-	private static void denseBinaryScalar(MatrixBlock m1, MatrixBlock ret, ScalarOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void denseBinaryScalar(MatrixBlock m1, MatrixBlock ret, ScalarOperator op) {
 		//allocate dense block (if necessary), incl clear nnz
 		ret.allocateDenseBlock(true);
 		
@@ -1076,9 +1036,7 @@ public class LibMatrixBincell
 		ret.nonZeros = nnz;
 	}
 
-	private static void safeBinaryInPlace(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinaryInPlace(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) {
 		//early abort on skip and empty 
 		if( m1ret.isEmptyBlock(false) && m2.isEmptyBlock(false) )
 			return; // skip entire empty block
@@ -1096,9 +1054,7 @@ public class LibMatrixBincell
 			safeBinaryInPlaceGeneric(m1ret, m2, op);
 	}
 	
-	private static void safeBinaryInPlaceSparse(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinaryInPlaceSparse(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) {
 		if(m1ret.sparseBlock!=null)
 			m1ret.allocateSparseRowsBlock(false);
 		if(m2.sparseBlock!=null)
@@ -1173,9 +1129,7 @@ public class LibMatrixBincell
 		m1ret.recomputeNonZeros();
 	}
 
-	private static void safeBinaryInPlaceDense(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinaryInPlaceDense(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) {
 		//prepare outputs
 		m1ret.allocateDenseBlock();
 		DenseBlock a = m1ret.getDenseBlock();
@@ -1206,9 +1160,7 @@ public class LibMatrixBincell
 		m1ret.setNonZeros(lnnz);
 	}
 	
-	private static void safeBinaryInPlaceGeneric(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) 
-		throws DMLRuntimeException 
-	{
+	private static void safeBinaryInPlaceGeneric(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) {
 		final int rlen = m1ret.rlen;
 		final int clen = m1ret.clen;
 		
@@ -1240,7 +1192,7 @@ public class LibMatrixBincell
 		}
 	}
 	
-	private static void unsafeBinaryInPlace(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op) throws DMLRuntimeException 
+	private static void unsafeBinaryInPlace(MatrixBlock m1ret, MatrixBlock m2, BinaryOperator op)
 	{
 		int rlen = m1ret.rlen;
 		int clen = m1ret.clen;
@@ -1281,9 +1233,7 @@ public class LibMatrixBincell
 	}
 	
 	private static void mergeForSparseBinary(BinaryOperator op, double[] values1, int[] cols1, int pos1, int size1, 
-			double[] values2, int[] cols2, int pos2, int size2, int resultRow, MatrixBlock result) 
-		throws DMLRuntimeException
-	{
+			double[] values2, int[] cols2, int pos2, int size2, int resultRow, MatrixBlock result) {
 		int p1 = 0, p2 = 0;
 		if( op.fn instanceof Multiply ) { //skip empty
 			//skip empty: merge-join (with inner join semantics)
@@ -1328,9 +1278,7 @@ public class LibMatrixBincell
 	}
 
 	private static void appendLeftForSparseBinary(BinaryOperator op, double[] values1, int[] cols1, int pos1, int size1, 
-				int pos, int resultRow, MatrixBlock result) 
-		throws DMLRuntimeException
-	{
+				int pos, int resultRow, MatrixBlock result) {
 		for(int j=pos1+pos; j<pos1+size1; j++) {
 			double v = op.fn.execute(values1[j], 0);
 			result.appendValue(resultRow, cols1[j], v);
@@ -1338,8 +1286,7 @@ public class LibMatrixBincell
 	}
 
 	private static void appendRightForSparseBinary(BinaryOperator op, double[] values2, int[] cols2, int pos2, int size2, 
-		int pos, int resultRow, MatrixBlock result) throws DMLRuntimeException
-	{
+			int pos, int resultRow, MatrixBlock result) {
 		for( int j=pos2+pos; j<pos2+size2; j++ ) {
 			double v = op.fn.execute(0, values2[j]);
 			result.appendValue(resultRow, cols2[j], v);


[10/12] systemml git commit: [SYSTEMML-2191] Cleanup exception hierarchy and handling, part 3

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 7a2053b..f8f6dc7 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
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.lops.runtime.RunMRJobs;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.CPInstructionParser;
 import org.apache.sysml.runtime.instructions.Instruction;
@@ -88,24 +87,18 @@ public abstract class CPInstruction extends Instruction
 	}
 
 	@Override
-	public Instruction preprocessInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public Instruction preprocessInstruction(ExecutionContext ec) {
 		//default preprocess behavior (e.g., debug state)
 		Instruction tmp = super.preprocessInstruction(ec);
-		
 		//instruction patching
-		if( tmp.requiresLabelUpdate() ) //update labels only if required
-		{
+		if( tmp.requiresLabelUpdate() ) { //update labels only if required
 			//note: no exchange of updated instruction as labels might change in the general case
 			String updInst = RunMRJobs.updateLabels(tmp.toString(), ec.getVariables());
 			tmp = CPInstructionParser.parseSingleInstruction(updInst);
 		}
-
 		return tmp;
 	}
 
 	@Override 
-	public abstract void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException;
+	public abstract void processInstruction(ExecutionContext ec);
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 1bd5b60..1fcb5bc 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
@@ -36,9 +36,7 @@ public class CentralMomentCPInstruction extends AggregateUnaryCPInstruction {
 		super(cm, in1, in2, in3, out, AUType.DEFAULT, opcode, str);
 	}
 
-	public static CentralMomentCPInstruction parseInstruction(String str)
-		throws DMLRuntimeException 
-	{
+	public static CentralMomentCPInstruction parseInstruction(String str) {
 		CPOperand in1 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand in2 = null; 
 		CPOperand in3 = null; 
@@ -89,9 +87,7 @@ public class CentralMomentCPInstruction extends AggregateUnaryCPInstruction {
 	}
 	
 	@Override
-	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException
-	{
+	public void processInstruction( ExecutionContext ec ) {
 		String output_name = output.getName();
 
 		/*

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/CompressionCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/CompressionCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/CompressionCPInstruction.java
index b676a64..50d8bf0 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/CompressionCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/CompressionCPInstruction.java
@@ -20,7 +20,6 @@
 package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.hops.OptimizerUtils;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.compress.CompressedMatrixBlock;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.Instruction;
@@ -34,28 +33,21 @@ public class CompressionCPInstruction extends ComputationCPInstruction {
 		super(CPType.Compression, op, in, null, null, out, opcode, istr);
 	}
 
-	public static Instruction parseInstruction(String str)
-		throws DMLRuntimeException 
-	{
+	public static Instruction parseInstruction(String str) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 		CPOperand in1 = new CPOperand(parts[1]);
 		CPOperand out = new CPOperand(parts[2]);
-		
 		return new CompressionCPInstruction(null, in1, out, opcode, str);
 	}
 	
 	@Override
-	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException
-	{
+	public void processInstruction( ExecutionContext ec ) {
 		//get matrix block input
 		MatrixBlock in = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
-		
 		//compress the matrix block
 		MatrixBlock out = new CompressedMatrixBlock(in)
 			.compress(OptimizerUtils.getConstrainedNumThreads(-1));
-		
 		//set output and release input
 		ec.releaseMatrixInput(input1.getName(), getExtendedOpcode());
 		ec.setMatrixOutput(output.getName(), out, getExtendedOpcode());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/ConvolutionCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/ConvolutionCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/ConvolutionCPInstruction.java
index 5d4deb2..f1c313b 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/ConvolutionCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/ConvolutionCPInstruction.java
@@ -65,14 +65,14 @@ public class ConvolutionCPInstruction extends UnaryCPInstruction {
 		_intermediateMemoryBudget = intermediateMemoryBudget;
 	}
 	
-	public ConvolutionCPInstruction(CPOperand in, CPOperand in2, CPOperand out, String opcode, String istr, int numThreads, double intermediateMemoryBudget) throws DMLRuntimeException {
+	public ConvolutionCPInstruction(CPOperand in, CPOperand in2, CPOperand out, String opcode, String istr, int numThreads, double intermediateMemoryBudget) {
 		this(in, in2, null, out, null, null, null, null, numThreads, intermediateMemoryBudget, opcode, istr);
 		if( !(opcode.equals("bias_add") || opcode.equals("relu_backward") || opcode.equals("bias_multiply") ) ) {
 			throw new DMLRuntimeException("Incorrect usage. Expected the opcode to be bias_add or bias_multiply or relu_backward, but found " + opcode);
 		}
 	}
 	
-	public ConvolutionCPInstruction(CPOperand in, CPOperand in2, CPOperand in3, CPOperand out, String opcode, String istr, int numThreads, double intermediateMemoryBudget) throws DMLRuntimeException {
+	public ConvolutionCPInstruction(CPOperand in, CPOperand in2, CPOperand in3, CPOperand out, String opcode, String istr, int numThreads, double intermediateMemoryBudget) {
 		this(in, in2, in3, out, null, null, null, null, numThreads, intermediateMemoryBudget, opcode, istr);
 		if( !opcode.equals("channel_sums") ) {
 			throw new DMLRuntimeException("Incorrect usage. Expected the opcode to be channel_sums, but found " + opcode);
@@ -99,8 +99,7 @@ public class ConvolutionCPInstruction extends UnaryCPInstruction {
 		this(in, in2, in3, out, stride, padding, input_shape, filter_shape, numThreads, intermediateMemoryBudget, opcode, istr);
 	}
 
-	public static ConvolutionCPInstruction parseInstruction(String str)
-			throws DMLRuntimeException {
+	public static ConvolutionCPInstruction parseInstruction(String str) {
 
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
@@ -220,13 +219,12 @@ public class ConvolutionCPInstruction extends UnaryCPInstruction {
 		}
 	}
 
-	private static int getScalarInput(ExecutionContext ec, ArrayList<CPOperand> aL, int index) 
-			throws DMLRuntimeException {
+	private static int getScalarInput(ExecutionContext ec, ArrayList<CPOperand> aL, int index) {
 		return (int) ec.getScalarInput(aL.get(index).getName(),
 			aL.get(index).getValueType(), aL.get(index).isLiteral()).getLongValue();
 	}
 	
-	public void processReluBackwardInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processReluBackwardInstruction(ExecutionContext ec) {
 		// (X > 0) * dout
 		MatrixBlock input = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 		MatrixBlock dout = ec.getMatrixInput(_in2.getName(), getExtendedOpcode());
@@ -244,7 +242,7 @@ public class ConvolutionCPInstruction extends UnaryCPInstruction {
 		ec.setMatrixOutput(getOutputVariableName(), outputBlock, getExtendedOpcode());
 	}
 	
-	public void processBiasAddInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processBiasAddInstruction(ExecutionContext ec) {
 		MatrixBlock input = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 		MatrixBlock bias = ec.getMatrixInput(_in2.getName(), getExtendedOpcode());
 		MatrixBlock outputBlock = null;
@@ -272,7 +270,7 @@ public class ConvolutionCPInstruction extends UnaryCPInstruction {
 		ec.setMatrixOutput(getOutputVariableName(), outputBlock, getExtendedOpcode());
 	}
 	
-	public void processBiasMultiplyInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processBiasMultiplyInstruction(ExecutionContext ec) {
 		MatrixBlock input = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 		MatrixBlock bias = ec.getMatrixInput(_in2.getName(), getExtendedOpcode());
 		MatrixBlock outputBlock = null;
@@ -298,7 +296,7 @@ public class ConvolutionCPInstruction extends UnaryCPInstruction {
 		ec.setMatrixOutput(getOutputVariableName(), outputBlock, getExtendedOpcode());
 	}
 	
-	public void processChannelSumsInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processChannelSumsInstruction(ExecutionContext ec) {
 		MatrixBlock input = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 		int C = (int) ec.getScalarInput(_in2.getName(), _in2.getValueType(), _in2.isLiteral()).getLongValue();
 		int HW = (int) ec.getScalarInput(_in3.getName(), _in3.getValueType(), _in3.isLiteral()).getLongValue();
@@ -359,7 +357,7 @@ public class ConvolutionCPInstruction extends UnaryCPInstruction {
 	
 	// Assumption: enableNative && NativeHelper.isNativeLibraryLoaded() is true
 	// This increases the number of native calls. For example:the cases where filter is sparse but input is dense
-	private static boolean isFilterSparse(MatrixBlock filter) throws DMLRuntimeException {
+	private static boolean isFilterSparse(MatrixBlock filter) {
 		long numElems = filter.getNumRows()*filter.getNumColumns();
 		// if filter is less than 10 MB in dense format (which handles almost all the cases).
 		// In fact, using threshold of 1 MB is still sufficient for common CNNs.
@@ -370,8 +368,7 @@ public class ConvolutionCPInstruction extends UnaryCPInstruction {
 	
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException {
+	public void processInstruction(ExecutionContext ec) {
 		if (instOpcode.equalsIgnoreCase("bias_add")) {
 			processBiasAddInstruction(ec);
 			return;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 699572f..f4e7df3 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
@@ -41,8 +41,7 @@ public class CovarianceCPInstruction extends BinaryCPInstruction {
 		super(CPType.AggregateBinary, op, in1, in2, in3, out, opcode, istr);
 	}
 
-	public static CovarianceCPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
+	public static CovarianceCPInstruction parseInstruction( String str )
 	{
 		CPOperand in1 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand in2 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
@@ -73,28 +72,24 @@ public class CovarianceCPInstruction extends BinaryCPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec)
+	{
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
-        MatrixBlock matBlock2 = ec.getMatrixInput(input2.getName(), getExtendedOpcode());
+		MatrixBlock matBlock2 = ec.getMatrixInput(input2.getName(), getExtendedOpcode());
 		String output_name = output.getName(); 
-		
 		COVOperator cov_op = (COVOperator)_optr;
 		CM_COV_Object covobj = new CM_COV_Object();
-			
-		if ( input3 == null ) 
-		{
+		
+		if ( input3 == null ) {
 			// Unweighted: cov.mvar0.mvar1.out
 			covobj = matBlock1.covOperations(cov_op, matBlock2);
 			
 			ec.releaseMatrixInput(input1.getName(), getExtendedOpcode());
 			ec.releaseMatrixInput(input2.getName(), getExtendedOpcode());
 		}
-		else 
-		{
+		else {
 			// Weighted: cov.mvar0.mvar1.weights.out
-	        MatrixBlock wtBlock = ec.getMatrixInput(input3.getName(), getExtendedOpcode());
+			MatrixBlock wtBlock = ec.getMatrixInput(input3.getName(), getExtendedOpcode());
 			
 			covobj = matBlock1.covOperations(cov_op, matBlock2, wtBlock);
 			

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/CtableCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/CtableCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/CtableCPInstruction.java
index 0879b81..6811f99 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/CtableCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/CtableCPInstruction.java
@@ -53,8 +53,7 @@ public class CtableCPInstruction extends ComputationCPInstruction {
 		_ignoreZeros = ignoreZeros;
 	}
 
-	public static CtableCPInstruction parseInstruction(String inst) 
-		throws DMLRuntimeException
+	public static CtableCPInstruction parseInstruction(String inst)
 	{
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(inst);
 		InstructionUtils.checkNumFields ( parts, 7 );
@@ -91,9 +90,7 @@ public class CtableCPInstruction extends ComputationCPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException {
-		
+	public void processInstruction(ExecutionContext ec) {
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 		MatrixBlock matBlock2=null, wtBlock=null;
 		double cst1, cst2;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/Data.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/Data.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/Data.java
index 3b15b9e..ffc15be 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/Data.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/Data.java
@@ -51,19 +51,19 @@ public abstract class Data implements Serializable
 		return valueType;
 	}
 
-	public void setMetaData(MetaData md) throws DMLRuntimeException {
+	public void setMetaData(MetaData md) {
 		throw new DMLRuntimeException("This method in the base class should never be invoked.");
 	}
 	
-	public MetaData getMetaData() throws DMLRuntimeException {
+	public MetaData getMetaData() {
 		throw new DMLRuntimeException("This method in the base class should never be invoked.");
 	}
 
-	public void removeMetaData() throws DMLRuntimeException {
+	public void removeMetaData() {
 		throw new DMLRuntimeException("This method in the base class should never be invoked.");
 	}
 
-	public void updateMatrixCharacteristics(MatrixCharacteristics mc) throws DMLRuntimeException {
+	public void updateMatrixCharacteristics(MatrixCharacteristics mc) {
 		throw new DMLRuntimeException("This method in the base class should never be invoked.");
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/DataGenCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/DataGenCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/DataGenCPInstruction.java
index c7cf2bc..7e0d5c1 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/DataGenCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/DataGenCPInstruction.java
@@ -122,8 +122,7 @@ public class DataGenCPInstruction extends UnaryCPInstruction {
 		return sparsity;
 	}
 
-	public static DataGenCPInstruction parseInstruction(String str) 
-		throws DMLRuntimeException 
+	public static DataGenCPInstruction parseInstruction(String str)
 	{
 		DataGenMethod method = DataGenMethod.INVALID;
 
@@ -200,7 +199,6 @@ public class DataGenCPInstruction extends UnaryCPInstruction {
 	
 	@Override
 	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException
 	{
 		MatrixBlock soresBlock = null;
 		
@@ -259,7 +257,7 @@ public class DataGenCPInstruction extends UnaryCPInstruction {
 		ec.setMatrixOutput(output.getName(), soresBlock, getExtendedOpcode());
 	}
 	
-	private static void checkValidDimensions(long rows, long cols) throws DMLRuntimeException {
+	private static void checkValidDimensions(long rows, long cols) {
 		//check valid for integer dimensions (we cannot even represent empty blocks with larger dimensions)
 		if( rows > Integer.MAX_VALUE || cols > Integer.MAX_VALUE )
 			throw new DMLRuntimeException("DataGenCPInstruction does not "

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 50fad3b..e7caa68 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
@@ -46,17 +46,13 @@ public class DataPartitionCPInstruction extends UnaryCPInstruction {
 		_pformat = pformat;
 	}
 
-	public static DataPartitionCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static DataPartitionCPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields( parts, 3 );
-		
 		String opcode = parts[0];
 		CPOperand in1 = new CPOperand(parts[1]);
 		CPOperand out = new CPOperand(parts[2]);
 		PDataPartitionFormat pformat = PDataPartitionFormat.valueOf(parts[3]);
-		 
 		if(!opcode.equalsIgnoreCase("partition"))
 			throw new DMLRuntimeException("Unknown opcode while parsing an DataPartitionCPInstruction: " + str);
 		else
@@ -64,9 +60,7 @@ public class DataPartitionCPInstruction extends UnaryCPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		//get input
 		MatrixObject moIn = ec.getMatrixObject(input1.getName());
 		MatrixBlock mb = moIn.acquireRead();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/EvalNaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/EvalNaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/EvalNaryCPInstruction.java
index 39f9755..02826ca 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/EvalNaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/EvalNaryCPInstruction.java
@@ -42,7 +42,7 @@ public class EvalNaryCPInstruction extends BuiltinNaryCPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processInstruction(ExecutionContext ec) {
 		//1. get the namespace and func
 		String funcName = ec.getScalarInput(inputs[0]).getStringValue();
 		if( funcName.contains(Program.KEY_DELIM) )

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 255dfd0..817b29b 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
@@ -33,7 +33,6 @@ public final class FrameAppendCPInstruction extends AppendCPInstruction {
 
 	@Override
 	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
 	{
 		//get inputs
 		FrameBlock fin1 = ec.getFrameInput(input1.getName());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 967b168..7cd8848 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
@@ -41,19 +41,16 @@ public final class FrameIndexingCPInstruction extends IndexingCPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		String opcode = getOpcode();
 		IndexRange ixrange = getIndexRange(ec);
 		
 		//right indexing
-		if( opcode.equalsIgnoreCase(RightIndex.OPCODE) )
-		{
+		if( opcode.equalsIgnoreCase(RightIndex.OPCODE) ) {
 			//execute right indexing operation
 			FrameBlock in = ec.getFrameInput(input1.getName());
-			FrameBlock out = in.slice(ixrange, new FrameBlock());	
-				
+			FrameBlock out = in.slice(ixrange, new FrameBlock());
+			
 			//unpin rhs input
 			ec.releaseFrameInput(input1.getName());
 			
@@ -61,8 +58,7 @@ public final class FrameIndexingCPInstruction extends IndexingCPInstruction {
 			ec.setFrameOutput(output.getName(), out);
 		}
 		//left indexing
-		else if ( opcode.equalsIgnoreCase(LeftIndex.OPCODE))
-		{
+		else if ( opcode.equalsIgnoreCase(LeftIndex.OPCODE)) {
 			FrameBlock lin = ec.getFrameInput(input1.getName());
 			FrameBlock out = null;
 			

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 eb44f81..588d2ff 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
@@ -63,9 +63,7 @@ public class FunctionCallCPInstruction extends CPInstruction {
 		return _namespace;
 	}
 	
-	public static FunctionCallCPInstruction parseInstruction(String str) 
-		throws DMLRuntimeException 
-	{
+	public static FunctionCallCPInstruction parseInstruction(String str) {
 		//schema: extfunct, fname, num inputs, num outputs, inputs, outputs
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType ( str );
 		String namespace = parts[1];
@@ -86,28 +84,20 @@ public class FunctionCallCPInstruction extends CPInstruction {
 	}
 	
 	@Override
-	public Instruction preprocessInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public Instruction preprocessInstruction(ExecutionContext ec) {
 		//default pre-process behavior
 		Instruction tmp = super.preprocessInstruction(ec);
-		
 		//maintain debug state (function call stack) 
-		if( DMLScript.ENABLE_DEBUG_MODE ) {
+		if( DMLScript.ENABLE_DEBUG_MODE )
 			ec.handleDebugFunctionEntry((FunctionCallCPInstruction) tmp);
-		}
-
 		return tmp;
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		if( LOG.isTraceEnabled() ){
 			LOG.trace("Executing instruction : " + this.toString());
 		}
-		
 		// get the function program block (stored in the Program object)
 		FunctionProgramBlock fpb = ec.getProgram().getFunctionProgramBlock(_namespace, _functionName);
 		
@@ -206,14 +196,10 @@ public class FunctionCallCPInstruction extends CPInstruction {
 	}
 
 	@Override
-	public void postprocessInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void postprocessInstruction(ExecutionContext ec) {
 		//maintain debug state (function call stack) 
-		if (DMLScript.ENABLE_DEBUG_MODE ) {
+		if (DMLScript.ENABLE_DEBUG_MODE )
 			ec.handleDebugFunctionExit( this );
-		}
-		
 		//default post-process behavior
 		super.postprocessInstruction(ec);
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/IndexingCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/IndexingCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/IndexingCPInstruction.java
index 20fd852..189631e 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/IndexingCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/IndexingCPInstruction.java
@@ -50,17 +50,15 @@ public abstract class IndexingCPInstruction extends UnaryCPInstruction {
 		colUpper = cu;
 	}
 
-	protected IndexRange getIndexRange(ExecutionContext ec) throws DMLRuntimeException {
+	protected IndexRange getIndexRange(ExecutionContext ec) {
 		return new IndexRange( //rl, ru, cl, ru
 			(int)(ec.getScalarInput(rowLower.getName(), rowLower.getValueType(), rowLower.isLiteral()).getLongValue()-1),
 			(int)(ec.getScalarInput(rowUpper.getName(), rowUpper.getValueType(), rowUpper.isLiteral()).getLongValue()-1),
 			(int)(ec.getScalarInput(colLower.getName(), colLower.getValueType(), colLower.isLiteral()).getLongValue()-1),
-			(int)(ec.getScalarInput(colUpper.getName(), colUpper.getValueType(), colUpper.isLiteral()).getLongValue()-1));		
+			(int)(ec.getScalarInput(colUpper.getName(), colUpper.getValueType(), colUpper.isLiteral()).getLongValue()-1));
 	}
 
-	public static IndexingCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{	
+	public static IndexingCPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 b69772b..711db31 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
@@ -20,7 +20,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.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -38,9 +37,7 @@ public class MMChainCPInstruction extends UnaryCPInstruction {
 		_numThreads = k;
 	}
 
-	public static MMChainCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static MMChainCPInstruction parseInstruction ( String str ) {
 		//parse instruction parts (without exec type)
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType( str );
 		InstructionUtils.checkNumFields( parts, 5, 6 );
@@ -69,18 +66,14 @@ public class MMChainCPInstruction extends UnaryCPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		//get inputs
 		MatrixBlock X = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 		MatrixBlock v = ec.getMatrixInput(input2.getName(), getExtendedOpcode());
 		MatrixBlock w = (_type==ChainType.XtwXv || _type==ChainType.XtXvy) ? 
-				ec.getMatrixInput(input3.getName(), getExtendedOpcode()) : null;
-
+			ec.getMatrixInput(input3.getName(), getExtendedOpcode()) : null;
 		//execute mmchain operation 
 		 MatrixBlock out = (MatrixBlock) X.chainMatrixMultOperations(v, w, new MatrixBlock(), _type, _numThreads);
-				
 		//set output and release inputs
 		ec.setMatrixOutput(output.getName(), out, getExtendedOpcode());
 		ec.releaseMatrixInput(input1.getName(), getExtendedOpcode());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 edd420a..090d478 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
@@ -37,9 +37,7 @@ public class MMTSJCPInstruction extends UnaryCPInstruction {
 		_numThreads = k;
 	}
 
-	public static MMTSJCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static MMTSJCPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields ( parts, 4 );
 		
@@ -56,9 +54,7 @@ public class MMTSJCPInstruction extends UnaryCPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		//get inputs
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 420535b..ae6a0e0 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
@@ -32,13 +32,10 @@ public final class MatrixAppendCPInstruction extends AppendCPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		//get inputs
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 		MatrixBlock matBlock2 = ec.getMatrixInput(input2.getName(), getExtendedOpcode());
-	
 		//check input dimensions
 		if( _type == AppendType.CBIND && matBlock1.getNumRows() != matBlock2.getNumRows() ) {
 			throw new DMLRuntimeException("Append-cbind is not possible for input matrices " + input1.getName() + " and " + input2.getName()
@@ -47,11 +44,9 @@ public final class MatrixAppendCPInstruction extends AppendCPInstruction {
 		else if( _type == AppendType.RBIND && matBlock1.getNumColumns() != matBlock2.getNumColumns()) {
 			throw new DMLRuntimeException("Append-rbind is not possible for input matrices " + input1.getName() + " and " + input2.getName()
 					+ " with different number of columns: "+matBlock1.getNumColumns()+" vs "+matBlock2.getNumColumns());
-		} 
-			
+		}
 		//execute append operations (append both inputs to initially empty output)
 		MatrixBlock ret = matBlock1.append(matBlock2, new MatrixBlock(), _type==AppendType.CBIND);
-		
 		//set output and release inputs 
 		ec.setMatrixOutput(output.getName(), ret, getExtendedOpcode());
 		ec.releaseMatrixInput(input1.getName(), getExtendedOpcode());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixBuiltinNaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixBuiltinNaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixBuiltinNaryCPInstruction.java
index 4e4fb95..3f16447 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixBuiltinNaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/MatrixBuiltinNaryCPInstruction.java
@@ -31,7 +31,7 @@ public class MatrixBuiltinNaryCPInstruction extends BuiltinNaryCPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processInstruction(ExecutionContext ec) {
 		//pin input matrix blocks
 		MatrixBlock in1 = ec.getMatrixInput(inputs[0].getName());
 		MatrixBlock[] in2 = new MatrixBlock[inputs.length-1];

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 2eeade3..10a10d5 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
@@ -46,9 +46,7 @@ public final class MatrixIndexingCPInstruction extends IndexingCPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		String opcode = getOpcode();
 		IndexRange ixrange = getIndexRange(ec);
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 d13f97c..cd8d5dc 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
@@ -41,19 +41,15 @@ public class MatrixReshapeCPInstruction extends UnaryCPInstruction {
 		_opByRow = in4;
 	}
 
-	public static MatrixReshapeCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static MatrixReshapeCPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields( parts, 5 );
-		
 		String opcode = parts[0];
 		CPOperand in1 = new CPOperand(parts[1]);
 		CPOperand in2 = new CPOperand(parts[2]);
 		CPOperand in3 = new CPOperand(parts[3]);
 		CPOperand in4 = new CPOperand(parts[4]);
 		CPOperand out = new CPOperand(parts[5]);
-			 
 		if(!opcode.equalsIgnoreCase("rshape"))
 			throw new DMLRuntimeException("Unknown opcode while parsing an MatrixReshapeInstruction: " + str);
 		else
@@ -61,9 +57,7 @@ public class MatrixReshapeCPInstruction extends UnaryCPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		//get inputs
 		MatrixBlock in = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 		int rows = (int)ec.getScalarInput(_opRows.getName(), _opRows.getValueType(), _opRows.isLiteral()).getLongValue(); //save cast

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 343a821..2aa04d8 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
@@ -45,9 +45,7 @@ public class MultiReturnBuiltinCPInstruction extends ComputationCPInstruction {
 		return _outputs.get(i);
 	}
 	
-	public static MultiReturnBuiltinCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static MultiReturnBuiltinCPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		ArrayList<CPOperand> outputs = new ArrayList<>();
 		// first part is always the opcode
@@ -99,9 +97,7 @@ public class MultiReturnBuiltinCPInstruction extends ComputationCPInstruction {
 	}
 
 	@Override 
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		String opcode = getOpcode();
 		MatrixObject mo = ec.getMatrixObject(input1.getName());
 		MatrixBlock[] out = null;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/MultiReturnParameterizedBuiltinCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/MultiReturnParameterizedBuiltinCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/MultiReturnParameterizedBuiltinCPInstruction.java
index c4f61bb..8afa9d7 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/MultiReturnParameterizedBuiltinCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/MultiReturnParameterizedBuiltinCPInstruction.java
@@ -45,9 +45,7 @@ public class MultiReturnParameterizedBuiltinCPInstruction extends ComputationCPI
 		return _outputs.get(i);
 	}
 
-	public static MultiReturnParameterizedBuiltinCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static MultiReturnParameterizedBuiltinCPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		ArrayList<CPOperand> outputs = new ArrayList<>();
 		String opcode = parts[0];
@@ -67,9 +65,7 @@ public class MultiReturnParameterizedBuiltinCPInstruction extends ComputationCPI
 	}
 
 	@Override 
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		//obtain and pin input frame
 		FrameBlock fin = ec.getFrameInput(input1.getName());
 		String spec = ec.getScalarInput(input2.getName(), input2.getValueType(), input2.isLiteral()).getStringValue();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 bb0cb2a..93742dd 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
@@ -35,19 +35,15 @@ public class PMMJCPInstruction extends ComputationCPInstruction {
 		_numThreads = k;
 	}
 
-	public static PMMJCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static PMMJCPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields ( parts, 5 );
-		
 		String opcode = parts[0];
 		CPOperand in1 = new CPOperand(parts[1]);
 		CPOperand in2 = new CPOperand(parts[2]);
 		CPOperand in3 = new CPOperand(parts[3]);
 		CPOperand out = new CPOperand(parts[4]);
 		int k = Integer.parseInt(parts[5]);
-		
 		if(!opcode.equalsIgnoreCase("pmm"))
 			throw new DMLRuntimeException("Unknown opcode while parsing an PMMJCPInstruction: " + str);
 		else
@@ -55,18 +51,14 @@ public class PMMJCPInstruction extends ComputationCPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		//get inputs
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 		MatrixBlock matBlock2 = ec.getMatrixInput(input2.getName(), getExtendedOpcode());
 		int rlen = (int)ec.getScalarInput(input3.getName(), input3.getValueType(), input3.isLiteral()).getLongValue();
-		
 		//execute operations
 		MatrixBlock ret = new MatrixBlock(rlen, matBlock2.getNumColumns(), matBlock2.isInSparseFormat());
 		matBlock1.permutationMatrixMultOperations(matBlock2, ret, null, _numThreads);
-		
 		//set output and release inputs
 		ec.setMatrixOutput(output.getName(), ret, getExtendedOpcode());
 		ec.releaseMatrixInput(input1.getName(), getExtendedOpcode());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 f7a491e..c5909ac 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
@@ -85,9 +85,7 @@ public class ParameterizedBuiltinCPInstruction extends ComputationCPInstruction
 		return paramMap;
 	}
 	
-	public static ParameterizedBuiltinCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static ParameterizedBuiltinCPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		// first part is always the opcode
 		String opcode = parts[0];
@@ -151,13 +149,9 @@ public class ParameterizedBuiltinCPInstruction extends ComputationCPInstruction
 	}
 
 	@Override 
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{
-		
+	public void processInstruction(ExecutionContext ec) {
 		String opcode = getOpcode();
 		ScalarObject sores = null;
-		
 		if ( opcode.equalsIgnoreCase("cdf")) {
 			SimpleOperator op = (SimpleOperator) _optr;
 			double result =  op.fn.execute(params);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 2950a1c..62ebfe1 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
@@ -51,20 +51,13 @@ public class QuantilePickCPInstruction extends BinaryCPInstruction {
 		_inmem = inmem;
 	}
 
-	public static QuantilePickCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static QuantilePickCPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
-		
-		//sanity check opcode
-		if ( !opcode.equalsIgnoreCase("qpick") ) {
+		if ( !opcode.equalsIgnoreCase("qpick") )
 			throw new DMLRuntimeException("Unknown opcode while parsing a QuantilePickCPInstruction: " + str);
-		}
-		
 		//instruction parsing
-		if( parts.length == 4 )
-		{
+		if( parts.length == 4 ) {
 			//instructions of length 4 originate from unary - mr-iqm
 			//TODO this should be refactored to use pickvaluecount lops
 			CPOperand in1 = new CPOperand(parts[1]);
@@ -72,18 +65,16 @@ public class QuantilePickCPInstruction extends BinaryCPInstruction {
 			CPOperand out = new CPOperand(parts[3]);
 			OperationTypes ptype = OperationTypes.IQM;
 			boolean inmem = false;
-			return new QuantilePickCPInstruction(null, in1, in2, out, ptype, inmem, opcode, str);			
+			return new QuantilePickCPInstruction(null, in1, in2, out, ptype, inmem, opcode, str);
 		}
-		else if( parts.length == 5 )
-		{
+		else if( parts.length == 5 ) {
 			CPOperand in1 = new CPOperand(parts[1]);
 			CPOperand out = new CPOperand(parts[2]);
 			OperationTypes ptype = OperationTypes.valueOf(parts[3]);
 			boolean inmem = Boolean.parseBoolean(parts[4]);
 			return new QuantilePickCPInstruction(null, in1, out, ptype, inmem, opcode, str);
 		}
-		else if( parts.length == 6 )
-		{
+		else if( parts.length == 6 ) {
 			CPOperand in1 = new CPOperand(parts[1]);
 			CPOperand in2 = new CPOperand(parts[2]);
 			CPOperand out = new CPOperand(parts[3]);
@@ -91,14 +82,11 @@ public class QuantilePickCPInstruction extends BinaryCPInstruction {
 			boolean inmem = Boolean.parseBoolean(parts[5]);
 			return new QuantilePickCPInstruction(null, in1, in2, out, ptype, inmem, opcode, str);
 		}
-		
 		return null;
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		switch( _type ) 
 		{
 			case VALUEPICK: 
@@ -118,7 +106,7 @@ public class QuantilePickCPInstruction extends BinaryCPInstruction {
 						ec.releaseMatrixInput(input2.getName(), getExtendedOpcode());
 						ec.setMatrixOutput(output.getName(), resultBlock, getExtendedOpcode());
 					}
-					ec.releaseMatrixInput(input1.getName(), getExtendedOpcode());										
+					ec.releaseMatrixInput(input1.getName(), getExtendedOpcode());
 				}
 				else //MR VALUEPICK
 				{
@@ -138,7 +126,7 @@ public class QuantilePickCPInstruction extends BinaryCPInstruction {
 					else {
 						throw new DMLRuntimeException("Unexpected error while executing ValuePickCP: otherMetaData for file (" + fname + ") not found." );
 					}
-				}				
+				}
 				break;
 
 			case MEDIAN:

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 b7a5254..bf7e3e4 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
@@ -48,9 +48,7 @@ public class QuantileSortCPInstruction extends UnaryCPInstruction {
 		super(CPType.QSort, op, in1, in2, out, opcode, istr);
 	}
 
-	public static QuantileSortCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static QuantileSortCPInstruction parseInstruction ( String str ) {
 		CPOperand in1 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand in2 = null;
 		CPOperand out = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
@@ -80,9 +78,7 @@ public class QuantileSortCPInstruction extends UnaryCPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		//acquire inputs matrices
 		MatrixBlock matBlock = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 		MatrixBlock wtBlock = null;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 ce6dd47..85d2422 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
@@ -44,9 +44,7 @@ public class QuaternaryCPInstruction extends ComputationCPInstruction {
 		_numThreads = k;
 	}
 
-	public static QuaternaryCPInstruction parseInstruction(String inst) 
-		throws DMLRuntimeException
-	{	
+	public static QuaternaryCPInstruction parseInstruction(String inst) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(inst);
 		String opcode = parts[0];
 		
@@ -100,9 +98,7 @@ public class QuaternaryCPInstruction extends ComputationCPInstruction {
 
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{
+	public void processInstruction(ExecutionContext ec) {
 		QuaternaryOperator qop = (QuaternaryOperator) _optr;
 		
 		MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName(), getExtendedOpcode());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 96b4644..af4c12e 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
@@ -85,9 +85,7 @@ public class ReorgCPInstruction extends UnaryCPInstruction {
 		_ixret = ixret;
 	}
 
-	public static ReorgCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static ReorgCPInstruction parseInstruction ( String str ) {
 		CPOperand in = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand out = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		
@@ -125,9 +123,7 @@ public class ReorgCPInstruction extends UnaryCPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		//acquire inputs
 		MatrixBlock matBlock = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 		ReorgOperator r_op = (ReorgOperator) _optr;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 cbcf7e2..85e290b 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
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.runtime.instructions.cp;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.operators.Operator;
 
@@ -31,25 +30,18 @@ public final class ScalarAppendCPInstruction extends AppendCPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
-		//Append type: STRING
-		
+	public void processInstruction(ExecutionContext ec) {
 		//get input strings (vars or literals)
 		ScalarObject so1 = ec.getScalarInput( input1.getName(), input1.getValueType(), input1.isLiteral() );
 		ScalarObject so2 = ec.getScalarInput( input2.getName(), input2.getValueType(), input2.isLiteral() );
-		
 		//pre-checks
 		String val1 = so1.getStringValue();
 		String val2 = so2.getStringValue();
 		StringObject.checkMaxStringLength( val1.length()+val2.length() );
-		
 		//core execution
-		String outString = val1 + "\n" + val2;			
+		String outString = val1 + "\n" + val2;
 		ScalarObject sores = new StringObject(outString);
-		
 		//set output
-		ec.setScalarOutput(output.getName(), sores);		
+		ec.setScalarOutput(output.getName(), sores);
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarBuiltinNaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarBuiltinNaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarBuiltinNaryCPInstruction.java
index 04408a8..85eec77 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarBuiltinNaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/ScalarBuiltinNaryCPInstruction.java
@@ -43,7 +43,7 @@ public class ScalarBuiltinNaryCPInstruction extends BuiltinNaryCPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	public void processInstruction(ExecutionContext ec) {
 		if (Nary.OperationType.PRINTF.toString().equalsIgnoreCase(getOpcode())) {
 			List<ScalarObject> scalarObjects = new ArrayList<>();
 			for (CPOperand input : inputs) {

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/SpoofCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/SpoofCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/SpoofCPInstruction.java
index 16ab1a4..76c6b02 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/SpoofCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/SpoofCPInstruction.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.instructions.cp;
 import java.util.ArrayList;
 
 import org.apache.sysml.parser.Expression.DataType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.codegen.CodegenUtils;
 import org.apache.sysml.runtime.codegen.SpoofOperator;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
@@ -48,9 +47,7 @@ public class SpoofCPInstruction extends ComputationCPInstruction {
 		return _class;
 	}
 
-	public static SpoofCPInstruction parseInstruction(String str) 
-		throws DMLRuntimeException 
-	{
+	public static SpoofCPInstruction parseInstruction(String str) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		
 		ArrayList<CPOperand> inlist = new ArrayList<>();
@@ -67,9 +64,7 @@ public class SpoofCPInstruction extends ComputationCPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		//get input matrices and scalars, incl pinning of matrices
 		ArrayList<MatrixBlock> inputs = new ArrayList<>();
 		ArrayList<ScalarObject> scalars = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/StringInitCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/StringInitCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/StringInitCPInstruction.java
index 93e02b9..2e82ab2 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/StringInitCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/StringInitCPInstruction.java
@@ -52,32 +52,24 @@ public class StringInitCPInstruction extends UnaryCPInstruction {
 		return _clen;
 	}
 
-	public static StringInitCPInstruction parseInstruction(String str) 
-		throws DMLRuntimeException 
-	{
+	public static StringInitCPInstruction parseInstruction(String str) {
 		String opcode = InstructionUtils.getOpCode(str);
 		if( !opcode.equals(DataGen.SINIT_OPCODE) )
 			throw new DMLRuntimeException("Unsupported opcode: "+opcode);
-		
 		//parse instruction
 		String[] s = InstructionUtils.getInstructionPartsWithValueType ( str );
 		InstructionUtils.checkNumFields( s, 6 );
-		
 		CPOperand out = new CPOperand(s[s.length-1]); // output is specified by the last operand
-
 		long rows = (s[1].contains( Lop.VARIABLE_NAME_PLACEHOLDER)?-1:Double.valueOf(s[1]).longValue());
 		long cols = (s[2].contains( Lop.VARIABLE_NAME_PLACEHOLDER)?-1:Double.valueOf(s[2]).longValue());
-        int rpb = Integer.parseInt(s[3]);
+		int rpb = Integer.parseInt(s[3]);
 		int cpb = Integer.parseInt(s[4]);
 		String data = s[5];
-		
 		return new StringInitCPInstruction(null, null, out, rows, cols, rpb, cpb, data, opcode, str);
 	}
 	
 	@Override
-	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException
-	{
+	public void processInstruction( ExecutionContext ec ) {
 		//setup output matrix
 		String outName = output.getName();
 		MatrixBlock outBlk = new MatrixBlock((int)_rlen, (int)_clen, false);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 e099a3c..b228220 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
@@ -60,9 +60,7 @@ public class StringObject extends ScalarObject
 		return _value;
 	}
 
-	public static void checkMaxStringLength( long len ) 
-		throws DMLRuntimeException
-	{
+	public static void checkMaxStringLength( long len ) {
 		if( len > MAX_STRING_SIZE ) {
 			throw new DMLRuntimeException("Output string length exceeds maximum "
 				+ "scalar string length ("+len+" > "+MAX_STRING_SIZE+").");

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 4f8aeb0..8823296 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
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.runtime.instructions.cp;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -44,9 +43,7 @@ public class TernaryCPInstruction extends ComputationCPInstruction {
 	}
 	
 	@Override
-	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException
-	{
+	public void processInstruction( ExecutionContext ec ) {
 		if( input1.isMatrix() || input2.isMatrix() || input3.isMatrix() )
 		{
 			//get all inputs as matrix blocks

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 d6fb334..908e5bd 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
@@ -43,9 +43,7 @@ public class UaggOuterChainCPInstruction extends UnaryCPInstruction {
 		_bOp = bop;
 	}
 
-	public static UaggOuterChainCPInstruction parseInstruction(String str)
-		throws DMLRuntimeException 
-	{
+	public static UaggOuterChainCPInstruction parseInstruction(String str) {
 		String parts[] = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 
@@ -72,9 +70,7 @@ public class UaggOuterChainCPInstruction extends UnaryCPInstruction {
 	
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		boolean rightCached = (_uaggOp.indexFn instanceof ReduceCol || _uaggOp.indexFn instanceof ReduceAll
 				|| !LibMatrixOuterAgg.isSupportedUaggOp(_uaggOp, _bOp));
 

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryCPInstruction.java
index fa9200f..07be2a7 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryCPInstruction.java
@@ -47,9 +47,7 @@ public abstract class UnaryCPInstruction extends ComputationCPInstruction {
 		super(type, op, in1, in2, in3, out, opcode, instr);
 	}
 	
-	public static UnaryCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException
-	{
+	public static UnaryCPInstruction parseInstruction ( String str ) {
 		CPOperand in = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand out = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		
@@ -82,25 +80,22 @@ public abstract class UnaryCPInstruction extends ComputationCPInstruction {
 		return null;
 	}
 
-	static String parseUnaryInstruction(String instr, CPOperand in,
-			CPOperand out) throws DMLRuntimeException {
+	static String parseUnaryInstruction(String instr, CPOperand in, CPOperand out) {
 		InstructionUtils.checkNumFields(instr, 2);
 		return parse(instr, in, null, null, out);
 	}
 
-	static String parseUnaryInstruction(String instr, CPOperand in1,
-			CPOperand in2, CPOperand out) throws DMLRuntimeException {
+	static String parseUnaryInstruction(String instr, CPOperand in1, CPOperand in2, CPOperand out) {
 		InstructionUtils.checkNumFields(instr, 3);
 		return parse(instr, in1, in2, null, out);
 	}
 
-	static String parseUnaryInstruction(String instr, CPOperand in1,
-			CPOperand in2, CPOperand in3, CPOperand out) throws DMLRuntimeException {
+	static String parseUnaryInstruction(String instr, CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out) {
 		InstructionUtils.checkNumFields(instr, 4);
 		return parse(instr, in1, in2, in3, out);
 	}
 
-	private static String parse(String instr, CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out) throws DMLRuntimeException {
+	private static String parse(String instr, CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(instr);
 		
 		// first part is the opcode, last part is the output, middle parts are input operands

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryMatrixCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryMatrixCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryMatrixCPInstruction.java
index e57d0e6..2855246 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryMatrixCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryMatrixCPInstruction.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.runtime.instructions.cp;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.data.LibCommonsMath;
 import org.apache.sysml.runtime.matrix.data.MatrixBlock;
@@ -32,11 +31,8 @@ public class UnaryMatrixCPInstruction extends UnaryCPInstruction {
 	}
 
 	@Override 
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		String output_name = output.getName();
-		
 		String opcode = getOpcode();
 		if(LibCommonsMath.isSupportedUnaryOperation(opcode)) {
 			MatrixBlock retBlock = LibCommonsMath.unaryOperations(ec.getMatrixObject(input1.getName()),getOpcode());
@@ -46,14 +42,10 @@ public class UnaryMatrixCPInstruction extends UnaryCPInstruction {
 			UnaryOperator u_op = (UnaryOperator) _optr;
 			MatrixBlock inBlock = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
 			MatrixBlock retBlock = (MatrixBlock) (inBlock.unaryOperations(u_op, new MatrixBlock()));
-		
 			ec.releaseMatrixInput(input1.getName(), getExtendedOpcode());
-			
 			// Ensure right dense/sparse output representation (guarded by released input memory)
-			if( checkGuardedRepresentationChange(inBlock, retBlock) ) {
+			if( checkGuardedRepresentationChange(inBlock, retBlock) )
 	 			retBlock.examSparsity();
-	 		}
-			
 			ec.setMatrixOutput(output_name, retBlock, getExtendedOpcode());
 		}
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryScalarCPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryScalarCPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryScalarCPInstruction.java
index fd15b80..2773084 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryScalarCPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/cp/UnaryScalarCPInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.cp;
 
 import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.parser.Expression.ValueType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.DMLScriptException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -34,9 +33,7 @@ public class UnaryScalarCPInstruction extends UnaryMatrixCPInstruction {
 	}
 
 	@Override 
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		String opcode = getOpcode();
 		ScalarObject sores = null;
 		ScalarObject so = null;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 9e81b50..99292ec 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
@@ -148,7 +148,7 @@ public class VariableCPInstruction extends CPInstruction {
 		this(op, in1, in2, in3, null, md, formatProperties, schema, updateType, sopcode, istr);
 	}
 
-	private static VariableOperationCode getVariableOperationCode ( String str ) throws DMLRuntimeException {
+	private static VariableOperationCode getVariableOperationCode ( String str ) {
 		
 		if ( str.equalsIgnoreCase("createvar"))
 			return VariableOperationCode.CreateVariable;
@@ -279,9 +279,7 @@ public class VariableCPInstruction extends CPInstruction {
 		}
 	}
 	
-	public static VariableCPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static VariableCPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType ( str );
 		String opcode = parts[0];
 		VariableOperationCode voc = getVariableOperationCode(opcode);
@@ -467,9 +465,7 @@ public class VariableCPInstruction extends CPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		switch ( opcode ) 
 		{ 
 		case CreateVariable:
@@ -682,10 +678,9 @@ public class VariableCPInstruction extends CPInstruction {
 	 * Currently, applicable only when format=binaryblock.
 	 *  
 	 * @param ec execution context
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	@SuppressWarnings("rawtypes")
-	private void processMoveInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	private void processMoveInstruction(ExecutionContext ec) {
 		
 		if ( getInput3() == null ) {
 			// example: mvvar tempA A
@@ -741,11 +736,10 @@ public class VariableCPInstruction extends CPInstruction {
 	 * Example: cpvar &lt;srcvar&gt; &lt;destvar&gt;
 	 * 
 	 * @param ec execution context
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private void processCopyInstruction(ExecutionContext ec) throws DMLRuntimeException {
+	private void processCopyInstruction(ExecutionContext ec) {
 		// get source variable 
-		Data dd = ec.getVariable(getInput1().getName());		
+		Data dd = ec.getVariable(getInput1().getName());
 			
 		if ( dd == null ) 
 			throw new DMLRuntimeException("Unexpected error: could not find a data object for variable name:" + getInput1().getName() + ", while processing instruction " +this.toString());
@@ -770,11 +764,8 @@ public class VariableCPInstruction extends CPInstruction {
 	 * the format given by the corresponding symbol table entry.
 	 * 
 	 * @param ec execution context
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private void processWriteInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{
+	private void processWriteInstruction(ExecutionContext ec) {
 		//get filename (literal or variable expression)
 		String fname = ec.getScalarInput(getInput2().getName(), ValueType.STRING, getInput2().isLiteral()).getStringValue();
 		String desc = ec.getScalarInput(getInput4().getName(), ValueType.STRING, getInput4().isLiteral()).getStringValue();
@@ -808,17 +799,12 @@ public class VariableCPInstruction extends CPInstruction {
 	 * 
 	 * @param ec execution context
 	 * @param varname variable name
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	public static void processRemoveVariableInstruction( ExecutionContext ec, String varname ) 
-		throws DMLRuntimeException
-	{
+	public static void processRemoveVariableInstruction( ExecutionContext ec, String varname ) {
 		// remove variable from symbol table
 		Data input1_data = ec.removeVariable(varname);
-		
 		if ( input1_data == null )
 			throw new DMLRuntimeException("Unexpected error: could not find a data object for variable name:" + varname + ", while processing rmvar instruction.");
-
 		//cleanup matrix data on fs/hdfs (if necessary)
 		if ( input1_data instanceof CacheableData ) {
 			ec.cleanupCacheableData( (CacheableData<?>) input1_data );
@@ -830,11 +816,8 @@ public class VariableCPInstruction extends CPInstruction {
 	 * 
 	 * @param ec execution context
 	 * @param fname file name
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private void writeCSVFile(ExecutionContext ec, String fname) 
-		throws DMLRuntimeException 
-	{
+	private void writeCSVFile(ExecutionContext ec, String fname) {
 		MatrixObject mo = ec.getMatrixObject(getInput1().getName());
 		String outFmt = "csv";
 		
@@ -871,11 +854,8 @@ public class VariableCPInstruction extends CPInstruction {
 	 * 
 	 * @param ec execution context
 	 * @param fname file name
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private void writeMMFile(ExecutionContext ec, String fname) 
-		throws DMLRuntimeException 
-	{
+	private void writeMMFile(ExecutionContext ec, String fname) {
 		MatrixObject mo = ec.getMatrixObject(getInput1().getName());
 		String outFmt = "matrixmarket";
 		if(mo.isDirty()) {
@@ -907,11 +887,8 @@ public class VariableCPInstruction extends CPInstruction {
 	 * 
 	 * @param ec execution context
 	 * @param fname file name
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private void writeScalarToHDFS(ExecutionContext ec, String fname) 
-		throws DMLRuntimeException 
-	{
+	private void writeScalarToHDFS(ExecutionContext ec, String fname) {
 		try {
 			ScalarObject scalar = ec.getScalarInput(getInput1().getName(), 
 				getInput1().getValueType(), getInput1().isLiteral());
@@ -929,9 +906,7 @@ public class VariableCPInstruction extends CPInstruction {
 		}
 	}
 	
-	private static void cleanDataOnHDFS(MatrixObject mo) 
-		throws DMLRuntimeException 
-	{
+	private static void cleanDataOnHDFS(MatrixObject mo) {
 		try {
 			String fpath = mo.getFileName();
 			if (fpath != null) {
@@ -952,17 +927,10 @@ public class VariableCPInstruction extends CPInstruction {
 			sb.append(Lop.OPERAND_DELIMITOR);
 			sb.append(varName);
 		}
-		String str = sb.toString();
-		
-		try {
-			return parseInstruction(str);
-		} 
-		catch (DMLRuntimeException ex) {
-			throw new RuntimeException(ex);
-		}
+		return parseInstruction(sb.toString());
 	}
 	
-	public static Instruction prepareCopyInstruction(String srcVar, String destVar) throws DMLRuntimeException {
+	public static Instruction prepareCopyInstruction(String srcVar, String destVar) {
 		StringBuilder sb = new StringBuilder();
 		sb.append("CP");
 		sb.append(Lop.OPERAND_DELIMITOR);
@@ -971,12 +939,10 @@ public class VariableCPInstruction extends CPInstruction {
 		sb.append(srcVar);
 		sb.append(Lop.OPERAND_DELIMITOR);
 		sb.append(destVar);
-		String str = sb.toString();
-
-		return parseInstruction(str);
+		return parseInstruction(sb.toString());
 	}
 	
-	public static Instruction prepareMoveInstruction(String srcVar, String destFileName, String format) throws DMLRuntimeException {
+	public static Instruction prepareMoveInstruction(String srcVar, String destFileName, String format) {
 		StringBuilder sb = new StringBuilder();
 		sb.append("CP");
 		sb.append(Lop.OPERAND_DELIMITOR);
@@ -988,11 +954,10 @@ public class VariableCPInstruction extends CPInstruction {
 		sb.append(Lop.OPERAND_DELIMITOR);
 		sb.append(format);
 		String str = sb.toString();
-
 		return parseInstruction(str);
 	}
 	
-	public static Instruction prepareMoveInstruction(String srcVar, String destVar) throws DMLRuntimeException {
+	public static Instruction prepareMoveInstruction(String srcVar, String destVar) {
 		// example: mvvar tempA A 
 		StringBuilder sb = new StringBuilder();
 		sb.append("CP");
@@ -1003,7 +968,6 @@ public class VariableCPInstruction extends CPInstruction {
 		sb.append(Lop.OPERAND_DELIMITOR);
 		sb.append(destVar);
 		String str = sb.toString();
-
 		return parseInstruction(str);
 	}
 	
@@ -1031,11 +995,11 @@ public class VariableCPInstruction extends CPInstruction {
 		return sb.toString();
 	}
 	
-	public static Instruction prepareCreateMatrixVariableInstruction(String varName, String fileName, boolean fNameOverride, String format) throws DMLRuntimeException {
+	public static Instruction prepareCreateMatrixVariableInstruction(String varName, String fileName, boolean fNameOverride, String format) {
 		return parseInstruction(getBasicCreateVarString(varName, fileName, fNameOverride, DataType.MATRIX, format));
 	}
 
-	public static Instruction prepareCreateVariableInstruction(String varName, String fileName, boolean fNameOverride, DataType dt, String format, MatrixCharacteristics mc, UpdateType update) throws DMLRuntimeException {
+	public static Instruction prepareCreateVariableInstruction(String varName, String fileName, boolean fNameOverride, DataType dt, String format, MatrixCharacteristics mc, UpdateType update) {
 		StringBuilder sb = new StringBuilder();
 		sb.append(getBasicCreateVarString(varName, fileName, fNameOverride, dt, format));
 		
@@ -1057,7 +1021,7 @@ public class VariableCPInstruction extends CPInstruction {
 		return parseInstruction(str);
 	}	
 	
-	public static Instruction prepareCreateVariableInstruction(String varName, String fileName, boolean fNameOverride, DataType dt, String format, MatrixCharacteristics mc, UpdateType update, boolean hasHeader, String delim, boolean sparse) throws DMLRuntimeException {
+	public static Instruction prepareCreateVariableInstruction(String varName, String fileName, boolean fNameOverride, DataType dt, String format, MatrixCharacteristics mc, UpdateType update, boolean hasHeader, String delim, boolean sparse) {
 		StringBuilder sb = new StringBuilder();
 		sb.append(getBasicCreateVarString(varName, fileName, fNameOverride, dt, format));
 		
@@ -1087,9 +1051,7 @@ public class VariableCPInstruction extends CPInstruction {
 	}	
 	
 	@Override
-	public void updateInstructionThreadID(String pattern, String replace)
-		throws DMLRuntimeException
-	{
+	public void updateInstructionThreadID(String pattern, String replace) {
 		if(    opcode == VariableOperationCode.CreateVariable
 			|| opcode == VariableOperationCode.SetFileName )
 		{

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 6ebdbf6..4503553 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
@@ -50,9 +50,7 @@ public final class MatrixIndexingCPFileInstruction extends IndexingCPInstruction
 		super(op, in, rl, ru, cl, cu, out, opcode, istr);
 	}
 
-	public static MatrixIndexingCPFileInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{		
+	public static MatrixIndexingCPFileInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 		
@@ -82,9 +80,7 @@ public final class MatrixIndexingCPFileInstruction extends IndexingCPInstruction
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		String opcode = getOpcode();
 		IndexRange ixrange = getIndexRange(ec).add(1);
 		MatrixObject mo = ec.getMatrixObject(input1.getName());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 f656216..f9596b0 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
@@ -80,9 +80,7 @@ public class ParameterizedBuiltinCPFileInstruction extends ParameterizedBuiltinC
 		super(op, paramsMap, out, opcode, istr);
 	}
 
-	public static ParameterizedBuiltinCPFileInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static ParameterizedBuiltinCPFileInstruction parseInstruction( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		// first part is always the opcode
 		String opcode = parts[0];
@@ -104,9 +102,7 @@ public class ParameterizedBuiltinCPFileInstruction extends ParameterizedBuiltinC
 	}
 	
 	@Override 
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		String opcode = getOpcode();
 		
 		if ( opcode.equalsIgnoreCase("rmempty") ) 
@@ -149,12 +145,7 @@ public class ParameterizedBuiltinCPFileInstruction extends ParameterizedBuiltinC
 			_out = out;
 		}
 
-		public MatrixObject execute() 
-			throws DMLRuntimeException 
-		{
-			//Timing time = new Timing();
-			//time.start();
-			
+		public MatrixObject execute() {
 			//initial setup
 			String fnameOld = _src.getFileName();
 			String fnameNew = _out.getFileName();
@@ -212,9 +203,7 @@ public class ParameterizedBuiltinCPFileInstruction extends ParameterizedBuiltinC
 				return createNewOutputObject(_src, _out, mc.getRows(), ret );
 		}
 
-		private static MatrixObject createNewOutputObject( MatrixObject src, MatrixObject out, long rows, long cols ) 
-			throws DMLRuntimeException
-		{
+		private static MatrixObject createNewOutputObject( MatrixObject src, MatrixObject out, long rows, long cols ) {
 			String fName = out.getFileName();
 			MetaDataFormat metadata = (MetaDataFormat) src.getMetaData();
 			MatrixObject moNew = new MatrixObject(src.getValueType(), fName);
@@ -348,11 +337,10 @@ public class ParameterizedBuiltinCPFileInstruction extends ParameterizedBuiltinC
 		 * @param stagingDir staging directory
 		 * @return true if diag
 		 * @throws IOException if IOException occurs
-		 * @throws DMLRuntimeException if DMLRuntimeException occurs
 		 */
 		@SuppressWarnings("deprecation")
 		public boolean createBinaryBlockStagingFile( String fnameOld, String stagingDir ) 
-			throws IOException, DMLRuntimeException
+			throws IOException
 		{
 			//prepare input
 			JobConf job = new JobConf(ConfigurationManager.getCachedJobConf());	
@@ -389,33 +377,25 @@ public class ParameterizedBuiltinCPFileInstruction extends ParameterizedBuiltinC
 			return diagBlocks;
 		}
 
-		private static void appendCellBufferToStagingArea( String dir, LinkedList<Cell> buffer, int brlen, int bclen ) 
-			throws DMLRuntimeException, IOException
-		{
+		private static void appendCellBufferToStagingArea( String dir, LinkedList<Cell> buffer, int brlen, int bclen ) throws IOException {
 			HashMap<String,LinkedList<Cell>> sortedBuffer = new HashMap<>();
-			
 			//sort cells in buffer wrt key
 			String key = null;
-			for( Cell c : buffer )
-			{
+			for( Cell c : buffer ) {
 				key = (c.getRow()/brlen+1) +"_"+(c.getCol()/bclen+1);
-				
 				if( !sortedBuffer.containsKey(key) )
 					sortedBuffer.put(key, new LinkedList<Cell>());
 				sortedBuffer.get(key).addLast(c);
-			}	
-			
+			}
 			//write lists of cells to local files
-			for( Entry<String,LinkedList<Cell>> e : sortedBuffer.entrySet() )
-			{
-				
+			for( Entry<String,LinkedList<Cell>> e : sortedBuffer.entrySet() ) {
 				String pfname = dir + "/" + e.getKey();
 				StagingFileUtils.writeCellListToLocal(pfname, e.getValue());
 			}
-		}	
+		}
 
 		private long createKeyMapping( String stagingDir, long rlen, long clen, int brlen, int bclen, InputInfo ii) 
-			throws FileNotFoundException, IOException, DMLRuntimeException 
+			throws FileNotFoundException, IOException 
 		{
 			String metaOut = stagingDir+"/meta";
 			


[07/12] systemml git commit: [SYSTEMML-2191] Cleanup exception hierarchy and handling, part 3

Posted by mb...@apache.org.
http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 7860600..11edbaa 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
@@ -38,9 +38,7 @@ public abstract class AppendMSPInstruction extends BinarySPInstruction {
 		_cbind = cbind;
 	}
 
-	public static AppendMSPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static AppendMSPInstruction parseInstruction( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields (parts, 5);
 		
@@ -59,7 +57,7 @@ public abstract class AppendMSPInstruction extends BinarySPInstruction {
 			return new MatrixAppendMSPInstruction(new ReorgOperator(OffsetColumnIndex
 					.getOffsetColumnIndexFnObject(-1)), in1, in2, offset, out, cbind, opcode, str);
 		}
-		else { //frame			
+		else { //frame
 			return new FrameAppendMSPInstruction(new ReorgOperator(OffsetColumnIndex
 					.getOffsetColumnIndexFnObject(-1)), in1, in2, offset, out, cbind, opcode, str);
 		}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 1903081..1a27440 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
@@ -34,9 +34,7 @@ public abstract class AppendRSPInstruction extends BinarySPInstruction {
 		_cbind = cbind;
 	}
 
-	public static AppendRSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{	
+	public static AppendRSPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields (parts, 4);
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 a029fa4..dca17ee 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
@@ -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.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -45,26 +44,20 @@ public class BinUaggChainSPInstruction extends UnarySPInstruction {
 
 	}
 
-	public static BinUaggChainSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static BinUaggChainSPInstruction parseInstruction ( String str ) {
 		//parse instruction parts (without exec type)
-		String[] parts = InstructionUtils.getInstructionPartsWithValueType( str );		
+		String[] parts = InstructionUtils.getInstructionPartsWithValueType( str );
 		InstructionUtils.checkNumFields( parts, 4 );
-		
 		String opcode = parts[0];
 		BinaryOperator bop = InstructionUtils.parseBinaryOperator(parts[1]);
 		AggregateUnaryOperator uaggop = InstructionUtils.parseBasicAggregateUnaryOperator(parts[2]);
 		CPOperand in = new CPOperand(parts[3]);
 		CPOperand out = new CPOperand(parts[4]);
-		
 		return new BinUaggChainSPInstruction(in, out, bop, uaggop, opcode, str);
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//get input

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixBVectorSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixBVectorSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixBVectorSPInstruction.java
index 4317be5..6073ab8 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixBVectorSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixBVectorSPInstruction.java
@@ -20,7 +20,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.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -29,15 +28,13 @@ public class BinaryMatrixBVectorSPInstruction extends BinarySPInstruction {
 	private VectorType _vtype = null;
 
 	protected BinaryMatrixBVectorSPInstruction(Operator op, CPOperand in1, CPOperand in2, CPOperand out,
-			VectorType vtype, String opcode, String istr) throws DMLRuntimeException {
+			VectorType vtype, String opcode, String istr) {
 		super(SPType.Binary, op, in1, in2, out, opcode, istr);
 		_vtype = vtype;
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		//common binary matrix-broadcast vector process instruction
 		super.processMatrixBVectorBinaryInstruction(ec, _vtype);
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixMatrixSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixMatrixSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixMatrixSPInstruction.java
index 8a122af..dd37f33 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixMatrixSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixMatrixSPInstruction.java
@@ -19,22 +19,18 @@
 
 package org.apache.sysml.runtime.instructions.spark;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.operators.Operator;
 
 public class BinaryMatrixMatrixSPInstruction extends BinarySPInstruction {
 
-	protected BinaryMatrixMatrixSPInstruction(Operator op, CPOperand in1, CPOperand in2, CPOperand out,
-			String opcode, String istr) throws DMLRuntimeException {
+	protected BinaryMatrixMatrixSPInstruction(Operator op, CPOperand in1, CPOperand in2, CPOperand out, String opcode, String istr) {
 		super(SPType.Binary, op, in1, in2, out, opcode, istr);
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{
+	public void processInstruction(ExecutionContext ec) {
 		//common binary matrix-matrix process instruction
 		super.processMatrixMatrixBinaryInstruction(ec);
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixScalarSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixScalarSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixScalarSPInstruction.java
index cbce94e..baa6891 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixScalarSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/BinaryMatrixScalarSPInstruction.java
@@ -19,7 +19,6 @@
 
 package org.apache.sysml.runtime.instructions.spark;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
 import org.apache.sysml.runtime.matrix.operators.Operator;
@@ -32,9 +31,7 @@ public class BinaryMatrixScalarSPInstruction extends BinarySPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{
+	public void processInstruction(ExecutionContext ec) {
 		//common binary matrix-scalar process instruction
 		super.processMatrixScalarBinaryInstruction(ec);
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 1560545..6993929 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
@@ -50,9 +50,7 @@ public abstract class BinarySPInstruction extends ComputationSPInstruction {
 		super(type, op, in1, in2, out, opcode, istr);
 	}
 	
-	public static BinarySPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static BinarySPInstruction parseInstruction ( String str ) {
 		CPOperand in1 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand in2 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand out = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
@@ -93,32 +91,24 @@ public abstract class BinarySPInstruction extends ComputationSPInstruction {
 		return null;
 	}
 
-	protected static String parseBinaryInstruction(String instr, CPOperand in1, CPOperand in2, CPOperand out)
-		throws DMLRuntimeException
-	{	
+	protected static String parseBinaryInstruction(String instr, CPOperand in1, CPOperand in2, CPOperand out) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(instr);
 		InstructionUtils.checkNumFields ( parts, 3 );
-		
 		String opcode = parts[0];
 		in1.split(parts[1]);
 		in2.split(parts[2]);
 		out.split(parts[3]);
-		
 		return opcode;
 	}
 	
-	protected static String parseBinaryInstruction(String instr, CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out)
-		throws DMLRuntimeException
-	{
+	protected static String parseBinaryInstruction(String instr, CPOperand in1, CPOperand in2, CPOperand in3, CPOperand out) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(instr);
 		InstructionUtils.checkNumFields ( parts, 4 );
-		
 		String opcode = parts[0];
 		in1.split(parts[1]);
 		in2.split(parts[2]);
 		in3.split(parts[3]);
 		out.split(parts[4]);
-		
 		return opcode;
 	}
 
@@ -126,10 +116,8 @@ public abstract class BinarySPInstruction extends ComputationSPInstruction {
 	 * Common binary matrix-matrix process instruction
 	 * 
 	 * @param ec execution context
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
 	protected void processMatrixMatrixBinaryInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
@@ -171,7 +159,6 @@ public abstract class BinarySPInstruction extends ComputationSPInstruction {
 	}
 
 	protected void processMatrixBVectorBinaryInstruction(ExecutionContext ec, VectorType vtype) 
-		throws DMLRuntimeException
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
@@ -211,7 +198,6 @@ public abstract class BinarySPInstruction extends ComputationSPInstruction {
 	}
 
 	protected void processMatrixScalarBinaryInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
 	{
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 	
@@ -235,7 +221,6 @@ public abstract class BinarySPInstruction extends ComputationSPInstruction {
 	}
 
 	protected MatrixCharacteristics updateBinaryMMOutputMatrixCharacteristics(SparkExecutionContext sec, boolean checkCommonDim) 
-		throws DMLRuntimeException
 	{
 		MatrixCharacteristics mc1 = sec.getMatrixCharacteristics(input1.getName());
 		MatrixCharacteristics mc2 = sec.getMatrixCharacteristics(input2.getName());
@@ -255,7 +240,6 @@ public abstract class BinarySPInstruction extends ComputationSPInstruction {
 	}
 
 	protected void updateBinaryAppendOutputMatrixCharacteristics(SparkExecutionContext sec, boolean cbind) 
-		throws DMLRuntimeException
 	{
 		MatrixCharacteristics mc1 = sec.getMatrixCharacteristics(input1.getName());
 		MatrixCharacteristics mc2 = sec.getMatrixCharacteristics(input2.getName());
@@ -297,7 +281,6 @@ public abstract class BinarySPInstruction extends ComputationSPInstruction {
 	}
 
 	protected void checkMatrixMatrixBinaryCharacteristics(SparkExecutionContext sec) 
-		throws DMLRuntimeException 
 	{
 		MatrixCharacteristics mc1 = sec.getMatrixCharacteristics(input1.getName());
 		MatrixCharacteristics mc2 = sec.getMatrixCharacteristics(input2.getName());
@@ -325,7 +308,6 @@ public abstract class BinarySPInstruction extends ComputationSPInstruction {
 	}
 
 	protected void checkBinaryAppendInputCharacteristics(SparkExecutionContext sec, boolean cbind, boolean checkSingleBlk, boolean checkAligned) 
-		throws DMLRuntimeException
 	{
 		MatrixCharacteristics mc1 = sec.getMatrixCharacteristics(input1.getName());
 		MatrixCharacteristics mc2 = sec.getMatrixCharacteristics(input2.getName());

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinNarySPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinNarySPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinNarySPInstruction.java
index ea09a67..583fe96 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinNarySPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/BuiltinNarySPInstruction.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions.spark;
 
 import org.apache.spark.api.java.JavaPairRDD;
 import org.apache.spark.api.java.function.PairFunction;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -47,9 +46,7 @@ public class BuiltinNarySPInstruction extends SPInstruction
 		output = out;
 	}
 
-	public static BuiltinNarySPInstruction parseInstruction ( String str ) 
-			throws DMLRuntimeException 
-	{
+	public static BuiltinNarySPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 		CPOperand output = new CPOperand(parts[parts.length - 1]);
@@ -61,9 +58,7 @@ public class BuiltinNarySPInstruction extends SPInstruction
 	}
 
 	@Override 
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		boolean cbind = getOpcode().equals("cbind");
 		
@@ -95,9 +90,7 @@ public class BuiltinNarySPInstruction extends SPInstruction
 			sec.addLineageRDD(output.getName(), input.getName());
 	}
 	
-	private static MatrixCharacteristics computeOutputMatrixCharacteristics(SparkExecutionContext sec, CPOperand[] inputs, boolean cbind) 
-		throws DMLRuntimeException 
-	{
+	private static MatrixCharacteristics computeOutputMatrixCharacteristics(SparkExecutionContext sec, CPOperand[] inputs, boolean cbind) {
 		MatrixCharacteristics mcIn1 = sec.getMatrixCharacteristics(inputs[0].getName());
 		MatrixCharacteristics mcOut = new MatrixCharacteristics(
 			0, 0, mcIn1.getRowsPerBlock(), mcIn1.getColsPerBlock(), 0);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 be6c712..e329e3d 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
@@ -61,9 +61,7 @@ public class CSVReblockSPInstruction extends UnarySPInstruction {
 		_fillValue = fillValue;
 	}
 
-	public static CSVReblockSPInstruction parseInstruction(String str)
-			throws DMLRuntimeException 
-	{
+	public static CSVReblockSPInstruction parseInstruction(String str) {
 		String opcode = InstructionUtils.getOpCode(str);
 		if( !opcode.equals("csvrblk") )
 			throw new DMLRuntimeException("Incorrect opcode for CSVReblockSPInstruction:" + opcode);
@@ -87,9 +85,7 @@ public class CSVReblockSPInstruction extends UnarySPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext) ec;
 
 		//sanity check input info
@@ -127,9 +123,7 @@ public class CSVReblockSPInstruction extends UnarySPInstruction {
 	}
 
 	@SuppressWarnings("unchecked")
-	protected JavaPairRDD<MatrixIndexes,MatrixBlock> processMatrixCSVReblockInstruction(SparkExecutionContext sec, MatrixCharacteristics mcOut) 
-		throws DMLRuntimeException
-	{
+	protected JavaPairRDD<MatrixIndexes,MatrixBlock> processMatrixCSVReblockInstruction(SparkExecutionContext sec, MatrixCharacteristics mcOut) {
 		//get input rdd (needs to be longwritable/text for consistency with meta data, in case of
 		//serialization issues create longwritableser/textser as serializable wrappers
 		JavaPairRDD<LongWritable, Text> in = (JavaPairRDD<LongWritable, Text>) 
@@ -141,9 +135,7 @@ public class CSVReblockSPInstruction extends UnarySPInstruction {
 	}
 
 	@SuppressWarnings("unchecked")
-	protected JavaPairRDD<Long,FrameBlock> processFrameCSVReblockInstruction(SparkExecutionContext sec, MatrixCharacteristics mcOut, ValueType[] schema) 
-		throws DMLRuntimeException
-	{
+	protected JavaPairRDD<Long,FrameBlock> processFrameCSVReblockInstruction(SparkExecutionContext sec, MatrixCharacteristics mcOut, ValueType[] schema) {
 		//get input rdd (needs to be longwritable/text for consistency with meta data, in case of
 		//serialization issues create longwritableser/textser as serializable wrappers
 		JavaPairRDD<LongWritable, Text> in = (JavaPairRDD<LongWritable, Text>) 

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/CastSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/CastSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/CastSPInstruction.java
index 10211c1..ccff1bc 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/CastSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/CastSPInstruction.java
@@ -43,24 +43,18 @@ public class CastSPInstruction extends UnarySPInstruction {
 		super(SPType.Cast, op, in, out, opcode, istr);
 	}
 
-	public static CastSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static CastSPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields(parts, 2);
-		
 		String opcode = parts[0];
 		CPOperand in = new CPOperand(parts[1]);
 		CPOperand out = new CPOperand(parts[2]);
-
 		return new CastSPInstruction(null, in, out, opcode, str);
 	}
 	
 	@Override
 	@SuppressWarnings("unchecked")
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		String opcode = getOpcode();
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 cdfa41a..f25899f 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
@@ -47,9 +47,7 @@ public class CentralMomentSPInstruction extends UnarySPInstruction {
 		super(SPType.CentralMoment, op, in1, in2, in3, out, opcode, str);
 	}
 
-	public static CentralMomentSPInstruction parseInstruction(String str)
-		throws DMLRuntimeException 
-	{
+	public static CentralMomentSPInstruction parseInstruction(String str) {
 		CPOperand in1 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand in2 = null; 
 		CPOperand in3 = null; 
@@ -98,9 +96,7 @@ public class CentralMomentSPInstruction extends UnarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException
-	{
+	public void processInstruction( ExecutionContext ec ) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//parse 'order' input argument 

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 6f8a08e..ccd7319 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
@@ -24,7 +24,6 @@ import org.apache.spark.storage.StorageLevel;
 import org.apache.sysml.hops.OptimizerUtils;
 import org.apache.sysml.lops.Checkpoint;
 import org.apache.sysml.parser.Expression.DataType;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.caching.CacheableData;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
@@ -52,9 +51,7 @@ public class CheckpointSPInstruction extends UnarySPInstruction {
 		_level = level;
 	}
 
-	public static CheckpointSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static CheckpointSPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields(parts, 3);
 		
@@ -68,9 +65,7 @@ public class CheckpointSPInstruction extends UnarySPInstruction {
 	
 	@Override
 	@SuppressWarnings("unchecked")
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		// Step 1: early abort on non-existing or in-memory (cached) inputs

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/CompressionSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/CompressionSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/CompressionSPInstruction.java
index ef04571..72da510 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/CompressionSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/CompressionSPInstruction.java
@@ -21,7 +21,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.compress.CompressedMatrixBlock;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
@@ -37,9 +36,7 @@ public class CompressionSPInstruction extends UnarySPInstruction {
 		super(SPType.Compression, op, in, out, opcode, istr);
 	}
 
-	public static CompressionSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException
-	{
+	public static CompressionSPInstruction parseInstruction ( String str ) {
 		InstructionUtils.checkNumFields(str, 2);
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		return new CompressionSPInstruction(null,
@@ -47,9 +44,7 @@ public class CompressionSPInstruction extends UnarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//get input rdd handle

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/ComputationSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/ComputationSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/ComputationSPInstruction.java
index 37b886e..f726da2 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/ComputationSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/ComputationSPInstruction.java
@@ -53,15 +53,11 @@ public abstract class ComputationSPInstruction extends SPInstruction {
 		return output.getName();
 	}
 
-	protected void updateUnaryOutputMatrixCharacteristics(SparkExecutionContext sec) 
-		throws DMLRuntimeException
-	{
+	protected void updateUnaryOutputMatrixCharacteristics(SparkExecutionContext sec) {
 		updateUnaryOutputMatrixCharacteristics(sec, input1.getName(), output.getName());
 	}
 
-	protected void updateUnaryOutputMatrixCharacteristics(SparkExecutionContext sec, String nameIn, String nameOut) 
-		throws DMLRuntimeException
-	{
+	protected void updateUnaryOutputMatrixCharacteristics(SparkExecutionContext sec, String nameIn, String nameOut) {
 		MatrixCharacteristics mc1 = sec.getMatrixCharacteristics(nameIn);
 		MatrixCharacteristics mcOut = sec.getMatrixCharacteristics(nameOut);
 		if(!mcOut.dimsKnown()) {
@@ -72,9 +68,7 @@ public abstract class ComputationSPInstruction extends SPInstruction {
 		}
 	}
 
-	protected void updateBinaryOutputMatrixCharacteristics(SparkExecutionContext sec) 
-		throws DMLRuntimeException
-	{
+	protected void updateBinaryOutputMatrixCharacteristics(SparkExecutionContext sec) {
 		MatrixCharacteristics mcIn1 = sec.getMatrixCharacteristics(input1.getName());
 		MatrixCharacteristics mcIn2 = sec.getMatrixCharacteristics(input2.getName());
 		MatrixCharacteristics mcOut = sec.getMatrixCharacteristics(output.getName());
@@ -90,9 +84,7 @@ public abstract class ComputationSPInstruction extends SPInstruction {
 		}
 	}
 	
-	protected void updateUnaryAggOutputMatrixCharacteristics(SparkExecutionContext sec, IndexFunction ixFn) 
-		throws DMLRuntimeException
-	{
+	protected void updateUnaryAggOutputMatrixCharacteristics(SparkExecutionContext sec, IndexFunction ixFn) {
 		MatrixCharacteristics mc1 = sec.getMatrixCharacteristics(input1.getName());
 		MatrixCharacteristics mcOut = sec.getMatrixCharacteristics(output.getName());
 		if( mcOut.dimsKnown() )

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/ConvolutionSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/ConvolutionSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/ConvolutionSPInstruction.java
index 0ec5595..da24b6d 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/ConvolutionSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/ConvolutionSPInstruction.java
@@ -97,7 +97,7 @@ public class ConvolutionSPInstruction extends UnarySPInstruction {
 		_in2 = in2;
 	}
 
-	public static ConvolutionSPInstruction parseInstruction( String str ) throws DMLRuntimeException {
+	public static ConvolutionSPInstruction parseInstruction( String str ) {
 		CPOperand in = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand out = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 
@@ -209,7 +209,7 @@ public class ConvolutionSPInstruction extends UnarySPInstruction {
 		}
 	}
 	
-	private static JavaPairRDD<MatrixIndexes,MatrixBlock> reblockAsRectangularMatrices(SparkExecutionContext sec, String name, int numRowsPerBlock) throws DMLRuntimeException {
+	private static JavaPairRDD<MatrixIndexes,MatrixBlock> reblockAsRectangularMatrices(SparkExecutionContext sec, String name, int numRowsPerBlock) {
 		JavaPairRDD<MatrixIndexes,MatrixBlock> in1 = sec.getBinaryBlockRDDHandleForVariable( name );
 		MatrixCharacteristics mcRdd = sec.getMatrixCharacteristics(name);
 		if(mcRdd.getColsPerBlock() < mcRdd.getCols() || mcRdd.getRowsPerBlock() != 1) {
@@ -224,15 +224,14 @@ public class ConvolutionSPInstruction extends UnarySPInstruction {
 		return in1;
 	}
 	
-	private Broadcast<MatrixBlock> getBroadcast(SparkExecutionContext sec, String name) throws DMLRuntimeException {
+	private Broadcast<MatrixBlock> getBroadcast(SparkExecutionContext sec, String name) {
 		MatrixBlock mb = sec.getMatrixInput( name, getExtendedOpcode() );
 		sec.releaseMatrixInput(name, getExtendedOpcode());
 		return sec.getSparkContext().broadcast(mb);
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException {
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		if(instOpcode.equalsIgnoreCase("conv2d") || instOpcode.equalsIgnoreCase("conv2d_bias_add")
 			|| instOpcode.equalsIgnoreCase("maxpooling") || instOpcode.equalsIgnoreCase("relu_maxpooling")) {
@@ -294,8 +293,7 @@ public class ConvolutionSPInstruction extends UnarySPInstruction {
 		}
 	}
 
-	private static int getScalarInput(ExecutionContext ec, ArrayList<CPOperand> aL, int index) 
-			throws DMLRuntimeException {
+	private static int getScalarInput(ExecutionContext ec, ArrayList<CPOperand> aL, int index) {
 		return (int) ec.getScalarInput(aL.get(index).getName(),
 			aL.get(index).getValueType(), aL.get(index).isLiteral()).getLongValue();
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 d69d617..dd6fc44 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
@@ -50,7 +50,6 @@ public class CovarianceSPInstruction extends BinarySPInstruction {
 	}
 
 	public static CovarianceSPInstruction parseInstruction(String str)
-		throws DMLRuntimeException 
 	{
 		CPOperand in1 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand in2 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
@@ -81,31 +80,26 @@ public class CovarianceSPInstruction extends BinarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException
-	{
+	public void processInstruction( ExecutionContext ec ) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		COVOperator cop = ((COVOperator)_optr); 
 		
 		//get input
 		JavaPairRDD<MatrixIndexes,MatrixBlock> in1 = sec.getBinaryBlockRDDHandleForVariable( input1.getName() );
 		JavaPairRDD<MatrixIndexes,MatrixBlock> in2 = sec.getBinaryBlockRDDHandleForVariable( input2.getName() );
-				
+		
 		//process central moment instruction
 		CM_COV_Object cmobj = null; 
-		if( input3 == null ) //w/o weights
-		{
+		if( input3 == null ) { //w/o weights
 			cmobj = in1.join( in2 )
-					   .values().map(new RDDCOVFunction(cop))
-			           .fold(new CM_COV_Object(), new RDDCOVReduceFunction(cop));
+				.values().map(new RDDCOVFunction(cop))
+				.fold(new CM_COV_Object(), new RDDCOVReduceFunction(cop));
 		}
-		else //with weights
-		{
+		else { //with weights
 			JavaPairRDD<MatrixIndexes,MatrixBlock> in3 = sec.getBinaryBlockRDDHandleForVariable( input3.getName() );
-			cmobj = in1.join( in2 )
-					   .join( in3 )
-					   .values().map(new RDDCOVWeightsFunction(cop))
-			           .fold(new CM_COV_Object(), new RDDCOVReduceFunction(cop));
+			cmobj = in1.join( in2 ).join( in3 )
+				.values().map(new RDDCOVWeightsFunction(cop))
+				.fold(new CM_COV_Object(), new RDDCOVReduceFunction(cop));
 		}
 
 		//create scalar output (no lineage information required)

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 adac2fc..376cf5b 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
@@ -60,15 +60,11 @@ public class CpmmSPInstruction extends BinarySPInstruction {
 		_aggtype = aggtype;
 	}
 
-	public static CpmmSPInstruction parseInstruction( String str )
-		throws DMLRuntimeException 
-	{
+	public static CpmmSPInstruction parseInstruction( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
-		
 		if ( !opcode.equalsIgnoreCase("cpmm"))
 			throw new DMLRuntimeException("CpmmSPInstruction.parseInstruction(): Unknown opcode " + opcode);
-		
 		CPOperand in1 = new CPOperand(parts[1]);
 		CPOperand in2 = new CPOperand(parts[2]);
 		CPOperand out = new CPOperand(parts[3]);
@@ -79,9 +75,7 @@ public class CpmmSPInstruction extends BinarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//get rdd inputs

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/CtableSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/CtableSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/CtableSPInstruction.java
index 001e7b6..8cb156c 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/CtableSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/CtableSPInstruction.java
@@ -73,9 +73,7 @@ public class CtableSPInstruction extends ComputationSPInstruction {
 		_ignoreZeros = ignoreZeros;
 	}
 
-	public static CtableSPInstruction parseInstruction(String inst) 
-		throws DMLRuntimeException
-	{	
+	public static CtableSPInstruction parseInstruction(String inst) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(inst);
 		InstructionUtils.checkNumFields ( parts, 7 );
 		
@@ -105,9 +103,7 @@ public class CtableSPInstruction extends ComputationSPInstruction {
 
 
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 	
 		//get input rdd handle

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 74c493c..bf99add 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
@@ -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.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.InstructionUtils;
@@ -43,9 +42,7 @@ public class CumulativeAggregateSPInstruction extends AggregateUnarySPInstructio
 		super(SPType.CumsumAggregate, op, null, in1, out, null, opcode, istr);
 	}
 
-	public static CumulativeAggregateSPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static CumulativeAggregateSPInstruction parseInstruction( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType( str );
 		InstructionUtils.checkNumFields ( parts, 2 );
 		
@@ -59,9 +56,7 @@ public class CumulativeAggregateSPInstruction extends AggregateUnarySPInstructio
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		MatrixCharacteristics mc = sec.getMatrixCharacteristics(input1.getName());
 		long rlen = mc.getRows();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 cbe6282..05b827f 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.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.functionobjects.Builtin;
@@ -68,25 +67,19 @@ public class CumulativeOffsetSPInstruction extends BinarySPInstruction {
 		_initValue = init;
 	}
 
-	public static CumulativeOffsetSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static CumulativeOffsetSPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType( str );
 		InstructionUtils.checkNumFields ( parts, 4 );
-		
 		String opcode = parts[0];
 		CPOperand in1 = new CPOperand(parts[1]);
 		CPOperand in2 = new CPOperand(parts[2]);
 		CPOperand out = new CPOperand(parts[3]);
 		double init = Double.parseDouble(parts[4]);
-		
 		return new CumulativeOffsetSPInstruction(null, in1, in2, out, init, opcode, str);
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		MatrixCharacteristics mc = sec.getMatrixCharacteristics(input2.getName());
 		long rlen = mc.getRows();

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameAppendMSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameAppendMSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameAppendMSPInstruction.java
index 081db1f..098b9a8 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameAppendMSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameAppendMSPInstruction.java
@@ -44,9 +44,7 @@ public class FrameAppendMSPInstruction extends AppendMSPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		// map-only append (rhs must be vector and fit in mapper mem)
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		checkBinaryAppendInputCharacteristics(sec, _cbind, false, false);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameAppendRSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameAppendRSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameAppendRSPInstruction.java
index eca944f..dd539a3 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameAppendRSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameAppendRSPInstruction.java
@@ -26,7 +26,6 @@ import org.apache.spark.api.java.function.PairFunction;
 import scala.Tuple2;
 
 import org.apache.sysml.hops.OptimizerUtils;
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
@@ -42,9 +41,7 @@ public class FrameAppendRSPInstruction extends AppendRSPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		JavaPairRDD<Long,FrameBlock> in1 = sec.getFrameBinaryBlockRDDHandleForVariable( input1.getName() );
 		JavaPairRDD<Long,FrameBlock> in2 = sec.getFrameBinaryBlockRDDHandleForVariable( input2.getName() );
@@ -52,10 +49,10 @@ public class FrameAppendRSPInstruction extends AppendRSPInstruction {
 		long leftRows = sec.getMatrixCharacteristics(input1.getName()).getRows();
 		
 		if(_cbind) {
-			JavaPairRDD<Long,FrameBlock> in1Aligned = in1.mapToPair(new ReduceSideAppendAlignFunction(leftRows));			
-			in1Aligned = FrameRDDAggregateUtils.mergeByKey(in1Aligned);			
+			JavaPairRDD<Long,FrameBlock> in1Aligned = in1.mapToPair(new ReduceSideAppendAlignFunction(leftRows));
+			in1Aligned = FrameRDDAggregateUtils.mergeByKey(in1Aligned);
 			JavaPairRDD<Long,FrameBlock> in2Aligned = in2.mapToPair(new ReduceSideAppendAlignFunction(leftRows));
-			in2Aligned = FrameRDDAggregateUtils.mergeByKey(in2Aligned);			
+			in2Aligned = FrameRDDAggregateUtils.mergeByKey(in2Aligned);
 			
 			out = in1Aligned.join(in2Aligned).mapValues(new ReduceSideColumnsFunction(_cbind));
 		} else {	//rbind
@@ -67,7 +64,7 @@ public class FrameAppendRSPInstruction extends AppendRSPInstruction {
 		updateBinaryAppendOutputMatrixCharacteristics(sec, _cbind);
 		sec.setRDDHandleForVariable(output.getName(), out);
 		sec.addLineageRDD(output.getName(), input1.getName());
-		sec.addLineageRDD(output.getName(), input2.getName());		
+		sec.addLineageRDD(output.getName(), input2.getName());
 		
 		//update schema of output with merged input schemas
 		sec.getFrameObject(output.getName()).setSchema(
@@ -86,12 +83,9 @@ public class FrameAppendRSPInstruction extends AppendRSPInstruction {
 		}
 		
 		@Override
-		public FrameBlock call(Tuple2<FrameBlock, FrameBlock> arg0)
-			throws Exception 
-		{
+		public FrameBlock call(Tuple2<FrameBlock, FrameBlock> arg0) {
 			FrameBlock left = arg0._1();
 			FrameBlock right = arg0._2();
-			
 			return left.append(right, new FrameBlock(), _cbind);
 		}
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameIndexingSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameIndexingSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameIndexingSPInstruction.java
index 0f338d7..f2c20a3 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameIndexingSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/FrameIndexingSPInstruction.java
@@ -66,9 +66,7 @@ public class FrameIndexingSPInstruction extends IndexingSPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		String opcode = getOpcode();
 		
@@ -169,9 +167,7 @@ public class FrameIndexingSPInstruction extends IndexingSPInstruction {
 			(ixrange.rowStart==1 && ixrange.rowEnd==mcIn.getRows() ));   //Entire Column/s
 	}
 
-	private static void checkValidOutputDimensions(MatrixCharacteristics mcOut) 
-		throws DMLRuntimeException
-	{
+	private static void checkValidOutputDimensions(MatrixCharacteristics mcOut) {
 		if(!mcOut.dimsKnown()) {
 			throw new DMLRuntimeException("FrameIndexingSPInstruction: The updated output dimensions are invalid: " + mcOut);
 		}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/IndexingSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/IndexingSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/IndexingSPInstruction.java
index 3f44aa6..f31a989 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/IndexingSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/IndexingSPInstruction.java
@@ -56,9 +56,7 @@ public abstract class IndexingSPInstruction extends UnarySPInstruction {
 		colUpper = cu;
 	}
 
-	public static IndexingSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{	
+	public static IndexingSPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 345388f..c9566a2 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
@@ -63,9 +63,7 @@ public class MapmmChainSPInstruction extends SPInstruction {
 		_chainType = type;
 	}
 
-	public static MapmmChainSPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static MapmmChainSPInstruction parseInstruction( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType( str );	
 		InstructionUtils.checkNumFields ( parts, 4, 5 );
 		String opcode = parts[0];
@@ -97,9 +95,7 @@ public class MapmmChainSPInstruction extends SPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//get rdd and broadcast inputs
@@ -134,19 +130,14 @@ public class MapmmChainSPInstruction extends SPInstruction {
 
 		private PartitionedBroadcast<MatrixBlock> _pmV = null;
 		
-		public RDDMapMMChainFunction( PartitionedBroadcast<MatrixBlock> bV) 
-			throws DMLRuntimeException
-		{			
+		public RDDMapMMChainFunction( PartitionedBroadcast<MatrixBlock> bV) {
 			//get first broadcast vector (always single block)
 			_pmV = bV;
 		}
 		
 		@Override
-		public MatrixBlock call( MatrixBlock arg0 ) 
-			throws Exception 
-		{
+		public MatrixBlock call( MatrixBlock arg0 ) {
 			MatrixBlock pmV = _pmV.getBlock(1, 1);
-			
 			//execute mapmmchain operation
 			return arg0.chainMatrixMultOperations(pmV, 
 					null, new MatrixBlock(), ChainType.XtXv);
@@ -165,9 +156,7 @@ public class MapmmChainSPInstruction extends SPInstruction {
 		private PartitionedBroadcast<MatrixBlock> _pmW = null;
 		private ChainType _chainType = null;
 		
-		public RDDMapMMChainFunction2( PartitionedBroadcast<MatrixBlock> bV, PartitionedBroadcast<MatrixBlock> bW, ChainType chain) 
-			throws DMLRuntimeException
-		{			
+		public RDDMapMMChainFunction2( PartitionedBroadcast<MatrixBlock> bV, PartitionedBroadcast<MatrixBlock> bW, ChainType chain) {
 			//get both broadcast vectors (first always single block)
 			_pmV = bV;
 			_pmW = bW;
@@ -175,15 +164,11 @@ public class MapmmChainSPInstruction extends SPInstruction {
 		}
 		
 		@Override
-		public MatrixBlock call( Tuple2<MatrixIndexes, MatrixBlock> arg0 ) 
-			throws Exception 
-		{
+		public MatrixBlock call( Tuple2<MatrixIndexes, MatrixBlock> arg0 ) {
 			MatrixBlock pmV = _pmV.getBlock(1, 1);
-			
 			MatrixIndexes ixIn = arg0._1();
 			MatrixBlock blkIn = arg0._2();
 			int rowIx = (int)ixIn.getRowIndex();
-			
 			//execute mapmmchain operation
 			return blkIn.chainMatrixMultOperations(pmV, 
 					_pmW.getBlock(rowIx,1), new MatrixBlock(), _chainType);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 f882885..8f8f576 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
@@ -68,9 +68,7 @@ public class MapmmSPInstruction extends BinarySPInstruction {
 		_aggtype = aggtype;
 	}
 
-	public static MapmmSPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static MapmmSPInstruction parseInstruction( String str ) {
 		String parts[] = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 
@@ -90,9 +88,7 @@ public class MapmmSPInstruction extends BinarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec)  {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		CacheType type = _type;

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixAppendMSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixAppendMSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixAppendMSPInstruction.java
index 8ada4e8..3019a78 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixAppendMSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixAppendMSPInstruction.java
@@ -27,7 +27,6 @@ import org.apache.spark.api.java.function.PairFlatMapFunction;
 
 import scala.Tuple2;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
@@ -49,9 +48,7 @@ public class MatrixAppendMSPInstruction extends AppendMSPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		// map-only append (rhs must be vector and fit in mapper mem)
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		checkBinaryAppendInputCharacteristics(sec, _cbind, false, false);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixAppendRSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixAppendRSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixAppendRSPInstruction.java
index efe4f9d..e9abca3 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixAppendRSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MatrixAppendRSPInstruction.java
@@ -24,7 +24,6 @@ import org.apache.spark.api.java.function.Function;
 
 import scala.Tuple2;
 
-import org.apache.sysml.runtime.DMLRuntimeException;
 import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
 import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
 import org.apache.sysml.runtime.instructions.cp.CPOperand;
@@ -40,9 +39,7 @@ public class MatrixAppendRSPInstruction extends AppendRSPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		// reduce-only append (output must have at most one column block)
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		checkBinaryAppendInputCharacteristics(sec, _cbind, true, false);

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 b6df075..a26a6f1 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
@@ -79,9 +79,7 @@ public class MatrixIndexingSPInstruction extends IndexingSPInstruction {
 	}
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		String opcode = getOpcode();
 		
@@ -177,7 +175,7 @@ public class MatrixIndexingSPInstruction extends IndexingSPInstruction {
 
 
 	public static MatrixBlock inmemoryIndexing(JavaPairRDD<MatrixIndexes,MatrixBlock> in1, 
-			 MatrixCharacteristics mcIn, MatrixCharacteristics mcOut, IndexRange ixrange) throws DMLRuntimeException {
+			 MatrixCharacteristics mcIn, MatrixCharacteristics mcOut, IndexRange ixrange) {
 		if( isSingleBlockLookup(mcIn, ixrange) ) {
 			return singleBlockIndexing(in1, mcIn, mcOut, ixrange);
 		}
@@ -189,7 +187,7 @@ public class MatrixIndexingSPInstruction extends IndexingSPInstruction {
 	}
 	
 	private static MatrixBlock multiBlockIndexing(JavaPairRDD<MatrixIndexes,MatrixBlock> in1, 
-			 MatrixCharacteristics mcIn, MatrixCharacteristics mcOut, IndexRange ixrange) throws DMLRuntimeException {
+			 MatrixCharacteristics mcIn, MatrixCharacteristics mcOut, IndexRange ixrange) {
 		//create list of all required matrix indexes
 		List<MatrixIndexes> filter = new ArrayList<>();
 		long rlix = UtilFunctions.computeBlockIndex(ixrange.rowStart, mcIn.getRowsPerBlock());
@@ -212,7 +210,7 @@ public class MatrixIndexingSPInstruction extends IndexingSPInstruction {
 	}
 	
 	private static MatrixBlock singleBlockIndexing(JavaPairRDD<MatrixIndexes,MatrixBlock> in1, 
-			 MatrixCharacteristics mcIn, MatrixCharacteristics mcOut, IndexRange ixrange) throws DMLRuntimeException {
+			 MatrixCharacteristics mcIn, MatrixCharacteristics mcOut, IndexRange ixrange) {
 		//single block output via lookup (on partitioned inputs, this allows for single partition
 		//access to avoid a full scan of the input; note that this is especially important for 
 		//out-of-core datasets as entire partitions are read, not just keys as in the in-memory setting.
@@ -254,9 +252,7 @@ public class MatrixIndexingSPInstruction extends IndexingSPInstruction {
 		return out;
 	}
 	
-	private static void checkValidOutputDimensions(MatrixCharacteristics mcOut) 
-		throws DMLRuntimeException
-	{
+	private static void checkValidOutputDimensions(MatrixCharacteristics mcOut) {
 		if(!mcOut.dimsKnown()) {
 			throw new DMLRuntimeException("MatrixIndexingSPInstruction: The updated output dimensions are invalid: " + mcOut);
 		}

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 5a80aac..42b4dd9 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
@@ -56,9 +56,7 @@ public class MatrixReshapeSPInstruction extends UnarySPInstruction {
 		_opByRow = in4;
 	}
 
-	public static MatrixReshapeSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static MatrixReshapeSPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		InstructionUtils.checkNumFields( parts, 5 );
 		
@@ -76,9 +74,7 @@ public class MatrixReshapeSPInstruction extends UnarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//get parameters

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/MultiReturnParameterizedBuiltinSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/MultiReturnParameterizedBuiltinSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/MultiReturnParameterizedBuiltinSPInstruction.java
index 5d6c9e8..cd5e2ba 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/MultiReturnParameterizedBuiltinSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/MultiReturnParameterizedBuiltinSPInstruction.java
@@ -76,9 +76,7 @@ public class MultiReturnParameterizedBuiltinSPInstruction extends ComputationSPI
 		_outputs = outputs;
 	}
 
-	public static MultiReturnParameterizedBuiltinSPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static MultiReturnParameterizedBuiltinSPInstruction parseInstruction( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		ArrayList<CPOperand> outputs = new ArrayList<>();
 		String opcode = parts[0];
@@ -99,9 +97,7 @@ public class MultiReturnParameterizedBuiltinSPInstruction extends ComputationSPI
 
 	@Override 
 	@SuppressWarnings("unchecked")
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext) ec;
 		
 		try

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 55c84f4..2e7ac11 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
@@ -62,9 +62,7 @@ public class PMapmmSPInstruction extends BinarySPInstruction {
 		super(SPType.PMAPMM, op, in1, in2, out, opcode, istr);
 	}
 
-	public static PMapmmSPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static PMapmmSPInstruction parseInstruction( String str ) {
 		String parts[] = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 
@@ -83,9 +81,7 @@ public class PMapmmSPInstruction extends BinarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//get inputs

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 425739d..0b37bd8 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
@@ -111,9 +111,7 @@ public class ParameterizedBuiltinSPInstruction extends ComputationSPInstruction
 		return paramMap;
 	}
 	
-	public static ParameterizedBuiltinSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static ParameterizedBuiltinSPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		// first part is always the opcode
 		String opcode = parts[0];
@@ -183,9 +181,7 @@ public class ParameterizedBuiltinSPInstruction extends ComputationSPInstruction
 
 	@Override 
 	@SuppressWarnings("unchecked")
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		String opcode = getOpcode();
 		
@@ -194,7 +190,7 @@ public class ParameterizedBuiltinSPInstruction extends ComputationSPInstruction
 		{		
 			//get input rdd handle
 			String targetVar = params.get(Statement.GAGG_TARGET);
-			String groupsVar = params.get(Statement.GAGG_GROUPS);			
+			String groupsVar = params.get(Statement.GAGG_GROUPS);
 			JavaPairRDD<MatrixIndexes,MatrixBlock> target = sec.getBinaryBlockRDDHandleForVariable(targetVar);
 			PartitionedBroadcast<MatrixBlock> groups = sec.getBroadcastForVariable(groupsVar);
 			MatrixCharacteristics mc1 = sec.getMatrixCharacteristics( targetVar );
@@ -874,9 +870,7 @@ public class ParameterizedBuiltinSPInstruction extends ComputationSPInstruction
 		}
 	}
 
-	public void setOutputCharacteristicsForGroupedAgg(MatrixCharacteristics mc1, MatrixCharacteristics mcOut, JavaPairRDD<MatrixIndexes, MatrixCell> out) 
-		throws DMLRuntimeException 
-	{
+	public void setOutputCharacteristicsForGroupedAgg(MatrixCharacteristics mc1, MatrixCharacteristics mcOut, JavaPairRDD<MatrixIndexes, MatrixCell> out) {
 		if(!mcOut.dimsKnown()) {
 			if(!mc1.dimsKnown()) {
 				throw new DMLRuntimeException("The output dimensions are not specified for grouped aggregate");

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 313e2e2..3914c55 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
@@ -59,32 +59,26 @@ public class PmmSPInstruction extends BinarySPInstruction {
 		_nrow = nrow;
 	}
 
-	public static PmmSPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static PmmSPInstruction parseInstruction( String str ) {
 		String parts[] = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = InstructionUtils.getOpCode(str);
-
 		if ( opcode.equalsIgnoreCase(PMMJ.OPCODE)) {
 			CPOperand in1 = new CPOperand(parts[1]);
 			CPOperand in2 = new CPOperand(parts[2]);
 			CPOperand nrow = new CPOperand(parts[3]);
 			CPOperand out = new CPOperand(parts[4]);
 			CacheType type = CacheType.valueOf(parts[5]);
-			
 			AggregateOperator agg = new AggregateOperator(0, Plus.getPlusFnObject());
 			AggregateBinaryOperator aggbin = new AggregateBinaryOperator(Multiply.getMultiplyFnObject(), agg);
 			return new PmmSPInstruction(aggbin, in1, in2, out, nrow, type, opcode, str);
 		} 
 		else {
 			throw new DMLRuntimeException("PmmSPInstruction.parseInstruction():: Unknown opcode " + opcode);
-		}	
+		}
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		String rddVar = (_type==CacheType.LEFT) ? input2.getName() : input1.getName();
@@ -118,18 +112,14 @@ public class PmmSPInstruction extends BinarySPInstruction {
 		private long _rlen = -1;
 		private int _brlen = -1;
 		
-		public RDDPMMFunction( CacheType type, PartitionedBroadcast<MatrixBlock> binput, long rlen, int brlen ) 
-			throws DMLRuntimeException
-		{
+		public RDDPMMFunction( CacheType type, PartitionedBroadcast<MatrixBlock> binput, long rlen, int brlen ) {
 			_brlen = brlen;
 			_rlen = rlen;
 			_pmV = binput;
 		}
 		
 		@Override
-		public Iterator<Tuple2<MatrixIndexes, MatrixBlock>> call( Tuple2<MatrixIndexes, MatrixBlock> arg0 ) 
-			throws Exception 
-		{
+		public Iterator<Tuple2<MatrixIndexes, MatrixBlock>> call( Tuple2<MatrixIndexes, MatrixBlock> arg0 ) {
 			ArrayList<Tuple2<MatrixIndexes,MatrixBlock>> ret = new ArrayList<>();
 			MatrixIndexes ixIn = arg0._1();
 			MatrixBlock mb2 = arg0._2();
@@ -170,5 +160,4 @@ public class PmmSPInstruction extends BinarySPInstruction {
 			return ret.iterator();
 		}
 	}
-	
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 0aa5c9d..18f0bef 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
@@ -62,9 +62,7 @@ public class QuantilePickSPInstruction extends BinarySPInstruction {
 		_type = type;
 	}
 
-	public static QuantilePickSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static QuantilePickSPInstruction parseInstruction ( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 		
@@ -102,9 +100,7 @@ public class QuantilePickSPInstruction extends BinarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//get input rdds
@@ -154,10 +150,8 @@ public class QuantilePickSPInstruction extends BinarySPInstruction {
 	 * @param mc matrix characteristics
 	 * @param quantiles one or more quantiles between 0 and 1.
 	 * @return a summary of weighted quantiles
-	 * @throws DMLRuntimeException 
 	 */
 	private static double[] getWeightedQuantileSummary(JavaPairRDD<MatrixIndexes,MatrixBlock> w, MatrixCharacteristics mc, Double... quantiles)
-		throws DMLRuntimeException 
 	{
 		double[] ret = new double[3*quantiles.length + 1];
 		if( mc.getCols()==2 ) //weighted 
@@ -216,9 +210,7 @@ public class QuantilePickSPInstruction extends BinarySPInstruction {
 		return ret;
 	}
 
-	private static double lookupKey(JavaPairRDD<MatrixIndexes,MatrixBlock> in, long key, int brlen)
-		throws DMLRuntimeException
-	{
+	private static double lookupKey(JavaPairRDD<MatrixIndexes,MatrixBlock> in, long key, int brlen) {
 		long rix = UtilFunctions.computeBlockIndex(key, brlen);
 		long pos = UtilFunctions.computeCellInBlock(key, brlen);
 		List<MatrixBlock> val = in.lookup(new MatrixIndexes(rix,1));

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 5088491..313d79c 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
@@ -55,8 +55,7 @@ public class QuantileSortSPInstruction extends UnarySPInstruction {
 		super(SPType.QSort, op, in1, in2, out, opcode, istr);
 	}
 
-	public static QuantileSortSPInstruction parseInstruction ( String str ) 
-		throws DMLRuntimeException {
+	public static QuantileSortSPInstruction parseInstruction ( String str ) {
 		CPOperand in1 = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
 		CPOperand in2 = null;
 		CPOperand out = new CPOperand("", ValueType.UNKNOWN, DataType.UNKNOWN);
@@ -86,9 +85,7 @@ public class QuantileSortSPInstruction extends UnarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec)
-			throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		boolean weighted = (input2 != null);
 		

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 96b37d2..a5a5d94 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
@@ -72,9 +72,7 @@ public class QuaternarySPInstruction extends ComputationSPInstruction {
 		_cacheV = cacheV;
 	}
 
-	public static QuaternarySPInstruction parseInstruction( String str ) 
-		throws DMLRuntimeException 
-	{
+	public static QuaternarySPInstruction parseInstruction( String str ) {
 		String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 		
@@ -191,9 +189,7 @@ public class QuaternarySPInstruction extends ComputationSPInstruction {
 	}
 	
 	@Override
-	public void processInstruction(ExecutionContext ec) 
-		throws DMLRuntimeException
-	{	
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		QuaternaryOperator qop = (QuaternaryOperator) _optr;
 		
@@ -314,22 +310,19 @@ public class QuaternarySPInstruction extends ComputationSPInstruction {
 		}
 	}
 
-	private void updateOutputMatrixCharacteristics(SparkExecutionContext sec, QuaternaryOperator qop) 
-		throws DMLRuntimeException
-	{
+	private void updateOutputMatrixCharacteristics(SparkExecutionContext sec, QuaternaryOperator qop) {
 		MatrixCharacteristics mcIn1 = sec.getMatrixCharacteristics(input1.getName());
 		MatrixCharacteristics mcIn2 = sec.getMatrixCharacteristics(input2.getName());
 		MatrixCharacteristics mcIn3 = sec.getMatrixCharacteristics(input3.getName());
 		MatrixCharacteristics mcOut = sec.getMatrixCharacteristics(output.getName());
-		
 		if( qop.wtype2 != null || qop.wtype5 != null ) {
 			//output size determined by main input
 			mcOut.set(mcIn1.getRows(), mcIn1.getCols(), mcIn1.getRowsPerBlock(), mcIn1.getColsPerBlock());
 		}
 		else if(qop.wtype3 != null ) { //wdivmm
 			long rank = qop.wtype3.isLeft() ? mcIn3.getCols() : mcIn2.getCols();
-			MatrixCharacteristics mcTmp = qop.wtype3.computeOutputCharacteristics(mcIn1.getRows(), mcIn1.getCols(), rank);		
-			mcOut.set(mcTmp.getRows(), mcTmp.getCols(), mcIn1.getRowsPerBlock(), mcIn1.getColsPerBlock());		
+			MatrixCharacteristics mcTmp = qop.wtype3.computeOutputCharacteristics(mcIn1.getRows(), mcIn1.getCols(), rank);
+			mcOut.set(mcTmp.getRows(), mcTmp.getCols(), mcIn1.getRowsPerBlock(), mcIn1.getColsPerBlock());
 		}
 	}
 
@@ -342,17 +335,16 @@ public class QuaternarySPInstruction extends ComputationSPInstruction {
 		protected PartitionedBroadcast<MatrixBlock> _pmV = null;
 		
 		public RDDQuaternaryBaseFunction( QuaternaryOperator qop, PartitionedBroadcast<MatrixBlock> bcU, PartitionedBroadcast<MatrixBlock> bcV ) {
-			_qop = qop;		
+			_qop = qop;
 			_pmU = bcU;
 			_pmV = bcV;
 		}
 
-		protected MatrixIndexes createOutputIndexes(MatrixIndexes in) 
-		{
+		protected MatrixIndexes createOutputIndexes(MatrixIndexes in) {
 			if( _qop.wtype3 != null && !_qop.wtype3.isBasic() ){ //key change
 				boolean left = _qop.wtype3.isLeft();
 				return new MatrixIndexes(left?in.getColumnIndex():in.getRowIndex(), 1);
-			}				
+			}
 			return in;
 		}
 	}
@@ -362,16 +354,12 @@ public class QuaternarySPInstruction extends ComputationSPInstruction {
 	{
 		private static final long serialVersionUID = -8209188316939435099L;
 		
-		public RDDQuaternaryFunction1( QuaternaryOperator qop, PartitionedBroadcast<MatrixBlock> bcU, PartitionedBroadcast<MatrixBlock> bcV ) 
-			throws DMLRuntimeException
-		{
+		public RDDQuaternaryFunction1( QuaternaryOperator qop, PartitionedBroadcast<MatrixBlock> bcU, PartitionedBroadcast<MatrixBlock> bcV ) {
 			super(qop, bcU, bcV);
 		}
 	
 		@Override
-		public LazyIterableIterator<Tuple2<MatrixIndexes, MatrixBlock>> call(Iterator<Tuple2<MatrixIndexes, MatrixBlock>> arg)
-			throws Exception 
-		{
+		public LazyIterableIterator<Tuple2<MatrixIndexes, MatrixBlock>> call(Iterator<Tuple2<MatrixIndexes, MatrixBlock>> arg) {
 			return new RDDQuaternaryPartitionIterator(arg);
 		}
 		
@@ -382,13 +370,10 @@ public class QuaternarySPInstruction extends ComputationSPInstruction {
 			}
 			
 			@Override
-			protected Tuple2<MatrixIndexes, MatrixBlock> computeNext(Tuple2<MatrixIndexes, MatrixBlock> arg) 
-				throws Exception 
-			{
+			protected Tuple2<MatrixIndexes, MatrixBlock> computeNext(Tuple2<MatrixIndexes, MatrixBlock> arg) {
 				MatrixIndexes ixIn = arg._1();
 				MatrixBlock blkIn = arg._2();
 				MatrixBlock blkOut = new MatrixBlock();
-				
 				MatrixBlock mbU = _pmU.getBlock((int)ixIn.getRowIndex(), 1);
 				MatrixBlock mbV = _pmV.getBlock((int)ixIn.getColumnIndex(), 1);
 				
@@ -399,7 +384,6 @@ public class QuaternarySPInstruction extends ComputationSPInstruction {
 				MatrixIndexes ixOut = createOutputIndexes(ixIn);
 				return new Tuple2<>(ixOut, blkOut);
 			}
-			
 		}
 	}
 
@@ -408,21 +392,16 @@ public class QuaternarySPInstruction extends ComputationSPInstruction {
 	{
 		private static final long serialVersionUID = 7493974462943080693L;
 		
-		public RDDQuaternaryFunction2( QuaternaryOperator qop, PartitionedBroadcast<MatrixBlock> bcU, PartitionedBroadcast<MatrixBlock> bcV ) 
-			throws DMLRuntimeException
-		{
+		public RDDQuaternaryFunction2( QuaternaryOperator qop, PartitionedBroadcast<MatrixBlock> bcU, PartitionedBroadcast<MatrixBlock> bcV ) {
 			super(qop, bcU, bcV);
 		}
 
 		@Override
-		public Tuple2<MatrixIndexes, MatrixBlock> call(Tuple2<MatrixIndexes, Tuple2<MatrixBlock, MatrixBlock>> arg0)
-			throws Exception 
-		{
+		public Tuple2<MatrixIndexes, MatrixBlock> call(Tuple2<MatrixIndexes, Tuple2<MatrixBlock, MatrixBlock>> arg0) {
 			MatrixIndexes ixIn = arg0._1();
 			MatrixBlock blkIn1 = arg0._2()._1();
 			MatrixBlock blkIn2 = arg0._2()._2();
 			MatrixBlock blkOut = new MatrixBlock();
-			
 			MatrixBlock mbU = (_pmU!=null)?_pmU.getBlock((int)ixIn.getRowIndex(), 1) : blkIn2;
 			MatrixBlock mbV = (_pmV!=null)?_pmV.getBlock((int)ixIn.getColumnIndex(), 1) : blkIn2;
 			MatrixBlock mbW = (_qop.hasFourInputs()) ? blkIn2 : null;
@@ -441,23 +420,17 @@ public class QuaternarySPInstruction extends ComputationSPInstruction {
 	{
 		private static final long serialVersionUID = -2294086455843773095L;
 		
-		public RDDQuaternaryFunction3( QuaternaryOperator qop, PartitionedBroadcast<MatrixBlock> bcU, PartitionedBroadcast<MatrixBlock> bcV ) 
-			throws DMLRuntimeException
-		{
+		public RDDQuaternaryFunction3( QuaternaryOperator qop, PartitionedBroadcast<MatrixBlock> bcU, PartitionedBroadcast<MatrixBlock> bcV ) {
 			super(qop, bcU, bcV);
 		}
 
 		@Override
-		public Tuple2<MatrixIndexes, MatrixBlock> call(Tuple2<MatrixIndexes, Tuple2<Tuple2<MatrixBlock, MatrixBlock>, MatrixBlock>> arg0)
-			throws Exception 
-		{
+		public Tuple2<MatrixIndexes, MatrixBlock> call(Tuple2<MatrixIndexes, Tuple2<Tuple2<MatrixBlock, MatrixBlock>, MatrixBlock>> arg0) {
 			MatrixIndexes ixIn = arg0._1();
 			MatrixBlock blkIn1 = arg0._2()._1()._1();
 			MatrixBlock blkIn2 = arg0._2()._1()._2();
 			MatrixBlock blkIn3 = arg0._2()._2();
-			
 			MatrixBlock blkOut = new MatrixBlock();
-			
 			MatrixBlock mbU = (_pmU!=null)?_pmU.getBlock((int)ixIn.getRowIndex(), 1) : blkIn2;
 			MatrixBlock mbV = (_pmV!=null)?_pmV.getBlock((int)ixIn.getColumnIndex(), 1) : 
 				              (_pmU!=null)? blkIn2 : blkIn3;
@@ -480,15 +453,12 @@ public class QuaternarySPInstruction extends ComputationSPInstruction {
 	{
 		private static final long serialVersionUID = 7328911771600289250L;
 		
-		public RDDQuaternaryFunction4( QuaternaryOperator qop ) 
-			throws DMLRuntimeException
-		{ 
-			super(qop, null, null);		
+		public RDDQuaternaryFunction4( QuaternaryOperator qop ) {
+			super(qop, null, null);
 		}
 
 		@Override
 		public Tuple2<MatrixIndexes, MatrixBlock> call(Tuple2<MatrixIndexes, Tuple2<Tuple2<Tuple2<MatrixBlock, MatrixBlock>, MatrixBlock>, MatrixBlock>> arg0)
-			throws Exception 
 		{
 			MatrixIndexes ixIn1 = arg0._1();
 			MatrixBlock blkIn1 = arg0._2()._1()._1()._1();
@@ -511,9 +481,7 @@ public class QuaternarySPInstruction extends ComputationSPInstruction {
 		private static final long serialVersionUID = -2571724736131823708L;
 		
 		@Override
-		public Tuple2<MatrixIndexes, MatrixBlock> call( Tuple2<MatrixIndexes, MatrixBlock> arg0 ) 
-			throws Exception 
-		{
+		public Tuple2<MatrixIndexes, MatrixBlock> call( Tuple2<MatrixIndexes, MatrixBlock> arg0 ) {
 			MatrixIndexes ixIn = arg0._1();
 			MatrixBlock blkIn = arg0._2();
 

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/instructions/spark/RandSPInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/spark/RandSPInstruction.java b/src/main/java/org/apache/sysml/runtime/instructions/spark/RandSPInstruction.java
index 926e229..3ec3e6b 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/spark/RandSPInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/spark/RandSPInstruction.java
@@ -153,9 +153,7 @@ public class RandSPInstruction extends UnarySPInstruction {
 		return sparsity;
 	}
 
-	public static RandSPInstruction parseInstruction(String str) 
-		throws DMLRuntimeException 
-	{
+	public static RandSPInstruction parseInstruction(String str) {
 		String[] s = InstructionUtils.getInstructionPartsWithValueType ( str );
 		String opcode = s[0];
 		
@@ -229,9 +227,7 @@ public class RandSPInstruction extends UnarySPInstruction {
 	}
 	
 	@Override
-	public void processInstruction( ExecutionContext ec )
-		throws DMLRuntimeException
-	{
+	public void processInstruction( ExecutionContext ec ){
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 		
 		//process specific datagen operator
@@ -244,9 +240,7 @@ public class RandSPInstruction extends UnarySPInstruction {
 		}
 	}
 
-	private void generateRandData(SparkExecutionContext sec) 
-		throws DMLRuntimeException
-	{
+	private void generateRandData(SparkExecutionContext sec) {
 		long lrows = sec.getScalarInput(rows).getLongValue();
 		long lcols = sec.getScalarInput(cols).getLongValue();
 		
@@ -352,9 +346,7 @@ public class RandSPInstruction extends UnarySPInstruction {
 		sec.setRDDHandleForVariable(output.getName(), out);
 	}
 
-	private void generateSequence(SparkExecutionContext sec) 
-		throws DMLRuntimeException
-	{
+	private void generateSequence(SparkExecutionContext sec) {
 		double lfrom = sec.getScalarInput(seq_from).getDoubleValue();
 		double lto = sec.getScalarInput(seq_to).getDoubleValue();
 		double lincr = sec.getScalarInput(seq_incr).getDoubleValue();
@@ -439,11 +431,8 @@ public class RandSPInstruction extends UnarySPInstruction {
 	 * Helper function to construct a sample.
 	 * 
 	 * @param sec spark execution context
-	 * @throws DMLRuntimeException if DMLRuntimeException occurs
 	 */
-	private void generateSample(SparkExecutionContext sec) 
-		throws DMLRuntimeException 
-	{
+	private void generateSample(SparkExecutionContext sec) {
 		long lrows = sec.getScalarInput(rows).getLongValue();
 		if ( maxValue < lrows && !replace )
 			throw new DMLRuntimeException("Sample (size=" + rows + ") larger than population (size=" + maxValue + ") can only be generated with replacement.");

http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/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 7f97d04..a227425 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
@@ -59,8 +59,7 @@ public class ReblockSPInstruction extends UnarySPInstruction {
 		outputEmptyBlocks = emptyBlocks;
 	}
 
-	public static ReblockSPInstruction parseInstruction(String str)  throws DMLRuntimeException 
-	{
+	public static ReblockSPInstruction parseInstruction(String str) {
 		String parts[] = InstructionUtils.getInstructionPartsWithValueType(str);
 		String opcode = parts[0];
 		
@@ -77,12 +76,9 @@ public class ReblockSPInstruction extends UnarySPInstruction {
 		Operator op = null; // no operator for ReblockSPInstruction
 		return new ReblockSPInstruction(op, in, out, brlen, bclen, outputEmptyBlocks, opcode, str);
 	}
-	
 
 	@Override
-	public void processInstruction(ExecutionContext ec)
-		throws DMLRuntimeException 
-	{
+	public void processInstruction(ExecutionContext ec) {
 		SparkExecutionContext sec = (SparkExecutionContext)ec;
 
 		//set the output characteristics
@@ -114,9 +110,7 @@ public class ReblockSPInstruction extends UnarySPInstruction {
 	}
 
 	@SuppressWarnings("unchecked")
-	protected void processMatrixReblockInstruction(SparkExecutionContext sec, InputInfo iinfo) 
-		throws DMLRuntimeException
-	{
+	protected void processMatrixReblockInstruction(SparkExecutionContext sec, InputInfo iinfo) {
 		MatrixObject mo = sec.getMatrixObject(input1.getName());
 		MatrixCharacteristics mc = sec.getMatrixCharacteristics(input1.getName());
 		MatrixCharacteristics mcOut = sec.getMatrixCharacteristics(output.getName());
@@ -191,7 +185,6 @@ public class ReblockSPInstruction extends UnarySPInstruction {
 
 	@SuppressWarnings("unchecked")
 	protected void processFrameReblockInstruction(SparkExecutionContext sec, InputInfo iinfo) 
-		throws DMLRuntimeException
 	{
 		FrameObject fo = sec.getFrameObject(input1.getName());
 		MatrixCharacteristics mcOut = sec.getMatrixCharacteristics(output.getName());