You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by gw...@apache.org on 2017/10/01 21:08:47 UTC

systemml git commit: [SYSTEMML-1942] Enable conditional spark tests

Repository: systemml
Updated Branches:
  refs/heads/master 5dce90b3b -> 0b51bb18c


[SYSTEMML-1942] Enable conditional spark tests

Removed condition to run multiple spark tests in functions.unary.matrix
package.

Closes #677.


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

Branch: refs/heads/master
Commit: 0b51bb18c6dac5095ab28e613ab2ae97f5a5ae74
Parents: 5dce90b
Author: Glenn Weidner <gw...@us.ibm.com>
Authored: Sun Oct 1 14:05:14 2017 -0700
Committer: Glenn Weidner <gw...@us.ibm.com>
Committed: Sun Oct 1 14:05:14 2017 -0700

----------------------------------------------------------------------
 .../unary/matrix/EigenFactorizeTest.java        |  46 +++-----
 .../functions/unary/matrix/LUFactorizeTest.java |  50 ++++-----
 .../unary/matrix/MatrixInverseTest.java         |  40 +++----
 .../functions/unary/matrix/MinusTest.java       |  41 +++----
 .../functions/unary/matrix/QRSolverTest.java    |  37 ++++---
 .../functions/unary/matrix/RoundTest.java       | 110 ++++++++++++-------
 6 files changed, 163 insertions(+), 161 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/systemml/blob/0b51bb18/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/EigenFactorizeTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/EigenFactorizeTest.java b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/EigenFactorizeTest.java
index a8c1b86..f64b734 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/EigenFactorizeTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/EigenFactorizeTest.java
@@ -20,7 +20,7 @@
 package org.apache.sysml.test.integration.functions.unary.matrix;
 
 import org.junit.Test;
-
+import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.test.integration.AutomatedTestBase;
@@ -28,7 +28,6 @@ import org.apache.sysml.test.integration.TestConfiguration;
 
 public class EigenFactorizeTest extends AutomatedTestBase 
 {
-	
 	private final static String TEST_NAME1 = "eigen";
 	private final static String TEST_DIR = "functions/unary/matrix/";
 	private static final String TEST_CLASS_DIR = TEST_DIR + EigenFactorizeTest.class.getSimpleName() + "/";
@@ -39,61 +38,48 @@ public class EigenFactorizeTest extends AutomatedTestBase
 	private final static int numEigenValuesToEvaluate = 15;
 	
 	@Override
-	public void setUp() 
-	{
-		addTestConfiguration(
-				TEST_NAME1, 
-				new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1, 
-				new String[] { "D" })   ); 
+	public void setUp() {
+		addTestConfiguration(TEST_NAME1, 
+			new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1, new String[] { "D" })   );
 	}
 	
 	@Test
-	public void testEigenFactorizeDenseCP() 
-	{
+	public void testEigenFactorizeDenseCP() {
 		runTestEigenFactorize( rows1, RUNTIME_PLATFORM.SINGLE_NODE );
 	}
 	
 	@Test
-	public void testEigenFactorizeDenseSP() 
-	{
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
+	public void testEigenFactorizeDenseSP() {
 		runTestEigenFactorize( rows1, RUNTIME_PLATFORM.SPARK );
 	}
 	
 	@Test
-	public void testEigenFactorizeDenseMR() 
-	{
+	public void testEigenFactorizeDenseMR() {
 		runTestEigenFactorize( rows1, RUNTIME_PLATFORM.HADOOP );
 	}
 	
 	@Test
-	public void testEigenFactorizeDenseHybrid() 
-	{
+	public void testEigenFactorizeDenseHybrid() {
 		runTestEigenFactorize( rows1, RUNTIME_PLATFORM.HYBRID );
 	}
 	
 	@Test
-	public void testLargeEigenFactorizeDenseCP() 
-	{
+	public void testLargeEigenFactorizeDenseCP() {
 		runTestEigenFactorize( rows2, RUNTIME_PLATFORM.SINGLE_NODE );
 	}
 	
 	@Test
-	public void testLargeEigenFactorizeDenseSP() 
-	{
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
+	public void testLargeEigenFactorizeDenseSP() {
 		runTestEigenFactorize( rows2, RUNTIME_PLATFORM.SPARK );
 	}
 	
 	@Test
-	public void testLargeEigenFactorizeDenseMR() 
-	{
+	public void testLargeEigenFactorizeDenseMR() {
 		runTestEigenFactorize( rows2, RUNTIME_PLATFORM.HADOOP );
 	}
 	
 	@Test
-	public void testLargeEigenFactorizeDenseHybrid() 
-	{
+	public void testLargeEigenFactorizeDenseHybrid() {
 		runTestEigenFactorize( rows2, RUNTIME_PLATFORM.HYBRID );
 	}
 	
@@ -102,6 +88,10 @@ public class EigenFactorizeTest extends AutomatedTestBase
 		RUNTIME_PLATFORM rtold = rtplatform;
 		rtplatform = rt;
 		
+		boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
+		if( rtplatform == RUNTIME_PLATFORM.SPARK )
+			DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+		
 		try
 		{
 			getAndLoadTestConfiguration(TEST_NAME1);
@@ -126,8 +116,8 @@ public class EigenFactorizeTest extends AutomatedTestBase
 			runTest(true, exceptionExpected, null, -1);
 			compareResults(1e-8);
 		}
-		finally
-		{
+		finally {
+			DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
 			rtplatform = rtold;
 		}
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/0b51bb18/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/LUFactorizeTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/LUFactorizeTest.java b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/LUFactorizeTest.java
index cde3264..5452b23 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/LUFactorizeTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/LUFactorizeTest.java
@@ -20,7 +20,7 @@
 package org.apache.sysml.test.integration.functions.unary.matrix;
 
 import org.junit.Test;
-
+import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.test.integration.AutomatedTestBase;
@@ -28,7 +28,6 @@ import org.apache.sysml.test.integration.TestConfiguration;
 
 public class LUFactorizeTest extends AutomatedTestBase 
 {
-	
 	private final static String TEST_NAME1 = "lu";
 	private final static String TEST_DIR = "functions/unary/matrix/";
 	private static final String TEST_CLASS_DIR = TEST_DIR + LUFactorizeTest.class.getSimpleName() + "/";
@@ -38,61 +37,48 @@ public class LUFactorizeTest extends AutomatedTestBase
 	private final static double sparsity = 0.9;
 	
 	@Override
-	public void setUp() 
-	{
-		addTestConfiguration(
-				TEST_NAME1, 
-				new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1, 
-				new String[] { "D" })   ); 
+	public void setUp() {
+		addTestConfiguration( TEST_NAME1, 
+			new TestConfiguration(TEST_CLASS_DIR, TEST_NAME1, new String[] { "D" })   ); 
 	}
 	
 	@Test
-	public void testLUFactorizeDenseCP() 
-	{
+	public void testLUFactorizeDenseCP() {
 		runTestLUFactorize( rows1, RUNTIME_PLATFORM.SINGLE_NODE );
 	}
 	
 	@Test
-	public void testLUFactorizeDenseSP() 
-	{
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
-			runTestLUFactorize( rows1, RUNTIME_PLATFORM.SPARK );
+	public void testLUFactorizeDenseSP() {
+		runTestLUFactorize( rows1, RUNTIME_PLATFORM.SPARK );
 	}
 	
 	@Test
-	public void testLUFactorizeDenseMR() 
-	{
+	public void testLUFactorizeDenseMR() {
 		runTestLUFactorize( rows1, RUNTIME_PLATFORM.HADOOP );
 	}
 	
 	@Test
-	public void testLUFactorizeDenseHybrid() 
-	{
+	public void testLUFactorizeDenseHybrid() {
 		runTestLUFactorize( rows1, RUNTIME_PLATFORM.HYBRID );
 	}
 	
 	@Test
-	public void testLargeLUFactorizeDenseCP() 
-	{
+	public void testLargeLUFactorizeDenseCP() {
 		runTestLUFactorize( rows2, RUNTIME_PLATFORM.SINGLE_NODE );
 	}
 	
 	@Test
-	public void testLargeLUFactorizeDenseSP() 
-	{
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
-			runTestLUFactorize( rows2, RUNTIME_PLATFORM.SPARK );
+	public void testLargeLUFactorizeDenseSP() {
+		runTestLUFactorize( rows2, RUNTIME_PLATFORM.SPARK );
 	}
 	
 	@Test
-	public void testLargeLUFactorizeDenseMR() 
-	{
+	public void testLargeLUFactorizeDenseMR() {
 		runTestLUFactorize( rows2, RUNTIME_PLATFORM.HADOOP );
 	}
 	
 	@Test
-	public void testLargeLUFactorizeDenseHybrid() 
-	{
+	public void testLargeLUFactorizeDenseHybrid() {
 		runTestLUFactorize( rows2, RUNTIME_PLATFORM.HYBRID );
 	}
 	
@@ -101,6 +87,10 @@ public class LUFactorizeTest extends AutomatedTestBase
 		RUNTIME_PLATFORM rtold = rtplatform;
 		rtplatform = rt;
 		
+		boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
+		if( rtplatform == RUNTIME_PLATFORM.SPARK )
+			DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+		
 		try
 		{
 			getAndLoadTestConfiguration(TEST_NAME1);
@@ -122,8 +112,8 @@ public class LUFactorizeTest extends AutomatedTestBase
 			runTest(true, exceptionExpected, null, -1);
 			compareResults(1e-8);
 		}
-		finally
-		{
+		finally {
+			DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
 			rtplatform = rtold;
 		}
 	}

http://git-wip-us.apache.org/repos/asf/systemml/blob/0b51bb18/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MatrixInverseTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MatrixInverseTest.java b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MatrixInverseTest.java
index ded9f3f..a106395 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MatrixInverseTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MatrixInverseTest.java
@@ -20,7 +20,7 @@
 package org.apache.sysml.test.integration.functions.unary.matrix;
 
 import org.junit.Test;
-
+import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.test.integration.AutomatedTestBase;
@@ -61,42 +61,44 @@ public class MatrixInverseTest extends AutomatedTestBase
 	}
 	
 	@Test
-	public void testInverseCP() 
-	{
+	public void testInverseCP() {
 		runTestMatrixInverse( RUNTIME_PLATFORM.SINGLE_NODE );
 	}
 	
 	@Test
-	public void testInverseSP() 
-	{
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
-			runTestMatrixInverse( RUNTIME_PLATFORM.SPARK );
+	public void testInverseSP() {
+		runTestMatrixInverse( RUNTIME_PLATFORM.SPARK );
 	}
 	
 	@Test
-	public void testInverseMR() 
-	{
+	public void testInverseMR() {
 		runTestMatrixInverse( RUNTIME_PLATFORM.HADOOP );
 	}
 	
 	@Test
-	public void testInverseHybrid() 
-	{
+	public void testInverseHybrid() {
 		runTestMatrixInverse( RUNTIME_PLATFORM.HYBRID );
 	}
 	
 	private void runTestMatrixInverse( RUNTIME_PLATFORM rt )
-	{		
-
+	{
 		RUNTIME_PLATFORM rtold = rtplatform;
 		rtplatform = rt;
 		
-		boolean exceptionExpected = false;
-		runTest(true, exceptionExpected, null, -1);
-		runRScript(true);
-	
-		compareResultsWithR(1e-5);
+		boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
+		if( rtplatform == RUNTIME_PLATFORM.SPARK )
+			DMLScript.USE_LOCAL_SPARK_CONFIG = true;
 		
-		rtplatform = rtold;
+		try {
+			boolean exceptionExpected = false;
+			runTest(true, exceptionExpected, null, -1);
+			runRScript(true);
+	
+			compareResultsWithR(1e-5);
+		}
+		finally {
+			DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
+			rtplatform = rtold;
+		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/systemml/blob/0b51bb18/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MinusTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MinusTest.java b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MinusTest.java
index a0ae72a..150d81b 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MinusTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/MinusTest.java
@@ -24,7 +24,7 @@ import java.util.HashMap;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
-
+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.matrix.data.MatrixValue.CellIndex;
@@ -58,64 +58,55 @@ public class MinusTest extends AutomatedTestBase
 	}
 
 	@BeforeClass
-	public static void init()
-	{
+	public static void init() {
 		TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
 	}
 
 	@AfterClass
-	public static void cleanUp()
-	{
+	public static void cleanUp() {
 		if (TEST_CACHE_ENABLED) {
 			TestUtils.clearDirectory(TEST_DATA_DIR + TEST_CLASS_DIR);
 		}
 	}
 	
 	@Test
-	public void testMinusDenseCP() 
-	{
+	public void testMinusDenseCP() {
 		runTestMinus( false, ExecType.CP );
 	}
 	
 	@Test
-	public void testMinusSparseCP() 
-	{
+	public void testMinusSparseCP() {
 		runTestMinus( true, ExecType.CP );
 	}
 	
 	@Test
-	public void testMinusDenseSP() 
-	{
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
+	public void testMinusDenseSP() {
 		runTestMinus( false, ExecType.SPARK );
 	}
 	
 	@Test
-	public void testMinusSparseSP() 
-	{
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
+	public void testMinusSparseSP() {
 		runTestMinus( true, ExecType.SPARK );
 	}
 	
 	@Test
-	public void testMinusDenseMR() 
-	{
+	public void testMinusDenseMR() {
 		runTestMinus( false, ExecType.MR );
 	}
 	
 	@Test
-	public void testMinusSparseMR() 
-	{
+	public void testMinusSparseMR() {
 		runTestMinus( true, ExecType.MR );
 	}
-		
 	
 	private void runTestMinus( boolean sparse, ExecType et )
 	{		
 		//handle rows and cols
 		RUNTIME_PLATFORM platformOld = rtplatform;
-		if(et == ExecType.SPARK) {
+		boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
+		if( et == ExecType.SPARK ) {
 	    	rtplatform = RUNTIME_PLATFORM.SPARK;
+			DMLScript.USE_LOCAL_SPARK_CONFIG = true;
 	    }
 		else {
 	    	rtplatform = (et==ExecType.MR)? RUNTIME_PLATFORM.HADOOP : RUNTIME_PLATFORM.SINGLE_NODE;
@@ -129,8 +120,7 @@ public class MinusTest extends AutomatedTestBase
 			config.addVariable("cols", cols);
 			
 			String TEST_CACHE_DIR = "";
-			if (TEST_CACHE_ENABLED)
-			{
+			if (TEST_CACHE_ENABLED) {
 				TEST_CACHE_DIR = sparse + "/";
 			}
 			
@@ -157,8 +147,9 @@ public class MinusTest extends AutomatedTestBase
 			HashMap<CellIndex, Double> rfile  = readRMatrixFromFS("Y");
 			TestUtils.compareMatrices(dmlfile, rfile, 1e-12, "Stat-DML", "Stat-R");
 		}
-		finally
-		{
+		finally {
+			DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
+			
 			//reset platform for additional tests
 			rtplatform = platformOld;
 		}

http://git-wip-us.apache.org/repos/asf/systemml/blob/0b51bb18/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/QRSolverTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/QRSolverTest.java b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/QRSolverTest.java
index df66ca3..f21db74 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/QRSolverTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/QRSolverTest.java
@@ -20,7 +20,7 @@
 package org.apache.sysml.test.integration.functions.unary.matrix;
 
 import org.junit.Test;
-
+import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
 import org.apache.sysml.test.integration.AutomatedTestBase;
@@ -81,27 +81,22 @@ public class QRSolverTest extends AutomatedTestBase
 	}
 	
 	@Test
-	public void testQRSolveCP() 
-	{
+	public void testQRSolveCP() {
 		runTestQRSolve( RUNTIME_PLATFORM.SINGLE_NODE );
 	}
 	
 	@Test
-	public void testQRSolveSP() 
-	{
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
-			runTestQRSolve( RUNTIME_PLATFORM.SPARK );
+	public void testQRSolveSP() {
+		runTestQRSolve( RUNTIME_PLATFORM.SPARK );
 	}
 	
 	@Test
-	public void testQRSolveMR() 
-	{
+	public void testQRSolveMR() {
 		runTestQRSolve( RUNTIME_PLATFORM.HADOOP );
 	}
 	
 	@Test
-	public void testQRSolveHybrid() 
-	{
+	public void testQRSolveHybrid() {
 		runTestQRSolve( RUNTIME_PLATFORM.HYBRID );
 	}
 	
@@ -110,12 +105,20 @@ public class QRSolverTest extends AutomatedTestBase
 		RUNTIME_PLATFORM rtold = rtplatform;
 		rtplatform = rt;
 		
-		boolean exceptionExpected = false;
-		runTest(true, exceptionExpected, null, -1);
-		runRScript(true);
-	
-		compareResultsWithR(1e-5);
+		boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
+		if( rtplatform == RUNTIME_PLATFORM.SPARK )
+			DMLScript.USE_LOCAL_SPARK_CONFIG = true;
+		
+		try {
+			boolean exceptionExpected = false;
+			runTest(true, exceptionExpected, null, -1);
+			runRScript(true);
 		
-		rtplatform = rtold;
+			compareResultsWithR(1e-5);			
+		}
+		finally {
+			DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
+			rtplatform = rtold;
+		}
 	}	
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/systemml/blob/0b51bb18/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RoundTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RoundTest.java b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RoundTest.java
index f1c899c..6f140c8 100644
--- a/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RoundTest.java
+++ b/src/test/java/org/apache/sysml/test/integration/functions/unary/matrix/RoundTest.java
@@ -20,17 +20,14 @@
 package org.apache.sysml.test.integration.functions.unary.matrix;
 
 import org.junit.Test;
-
+import org.apache.sysml.api.DMLScript;
 import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM;
 import org.apache.sysml.test.integration.AutomatedTestBase;
 import org.apache.sysml.test.integration.TestConfiguration;
 import org.apache.sysml.test.utils.TestUtils;
 
-
-
 public class RoundTest extends AutomatedTestBase 
 {
-	
 	private enum TEST_TYPE { 
 		ROUND ("RoundTest"), 
 		FLOOR ("Floor"),
@@ -306,225 +303,253 @@ public class RoundTest extends AutomatedTestBase
 	
 	@Test
 	public void testRound1_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.ROUND, rows1, cols1, sparsity1);
 	}
 	
 	@Test
 	public void testRound2_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.ROUND, rows1, cols1, sparsity2);
 	}
 	
 	@Test
 	public void testRound3_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.ROUND, rows1, cols1, sparsity3);
 	}
 	
 	@Test
 	public void testRound4_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.ROUND, rows2, cols2, sparsity1);
 	}
 	
 	@Test
 	public void testRound5_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.ROUND, rows2, cols2, sparsity2);
 	}
 	
 	@Test
 	public void testRound6_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.ROUND, rows2, cols2, sparsity3);
 	}
 	
 	@Test
 	public void testFloor1_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.FLOOR, rows1, cols1, sparsity1);
 	}
 	
 	@Test
 	public void testFloor2_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.FLOOR, rows1, cols1, sparsity2);
 	}
 	
 	@Test
 	public void testFloor3_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.FLOOR, rows1, cols1, sparsity3);
 	}
 	
 	@Test
 	public void testFloor4_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.FLOOR, rows2, cols2, sparsity1);
 	}
 	
 	@Test
 	public void testFloor5_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.FLOOR, rows2, cols2, sparsity2);
 	}
 	
 	@Test
 	public void testFloor6_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.FLOOR, rows2, cols2, sparsity3);
 	}
 	
 	@Test
 	public void testCeil1_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEIL, rows1, cols1, sparsity1);
 	}
 	
 	@Test
 	public void testCeil2_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEIL, rows1, cols1, sparsity2);
 	}
 	
 	@Test
 	public void testCeil3_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEIL, rows1, cols1, sparsity3);
 	}
 	
 	@Test
 	public void testCeil4_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEIL, rows2, cols2, sparsity1);
 	}
 	
 	@Test
 	public void testCeil5_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEIL, rows2, cols2, sparsity2);
 	}
 	
 	@Test
 	public void testCeil6_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEIL, rows2, cols2, sparsity3);
 	}
 	
 	@Test
+	public void testCeiling1_SP() {
+		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEILING, rows1, cols1, sparsity1);
+	}
+	
+	@Test
+	public void testCeiling2_SP() {
+		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEILING, rows1, cols1, sparsity2);
+	}
+	
+	@Test
+	public void testCeiling3_SP() {
+		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEILING, rows1, cols1, sparsity3);
+	}
+	
+	@Test
+	public void testCeiling4_SP() {
+		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEILING, rows2, cols2, sparsity1);
+	}
+	
+	@Test
+	public void testCeiling5_SP() {
+		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEILING, rows2, cols2, sparsity2);
+	}
+	
+	@Test
+	public void testCeiling6_SP() {
+		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEILING, rows2, cols2, sparsity3);
+	}
+	
+	@Test
 	public void testRoundMR1_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.ROUND, rows1, cols1, sparsity1);
 	}
 	
 	@Test
 	public void testRoundMR2_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.ROUND, rows1, cols1, sparsity2);
 	}
 	
 	@Test
 	public void testRoundMR3_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.ROUND, rows1, cols1, sparsity3);
 	}
 	
 	@Test
 	public void testRoundMR4_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.ROUND, rows2, cols2, sparsity1);
 	}
 	
 	@Test
 	public void testRoundMR5_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.ROUND, rows2, cols2, sparsity2);
 	}
 	
 	@Test
 	public void testRoundMR6_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.ROUND, rows2, cols2, sparsity3);
 	}
 	
 	@Test
 	public void testFloorMR1_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.FLOOR, rows1, cols1, sparsity1);
 	}
 	
 	@Test
 	public void testFloorMR2_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.FLOOR, rows1, cols1, sparsity2);
 	}
 	
 	@Test
 	public void testFloorMR3_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.FLOOR, rows1, cols1, sparsity3);
 	}
 	
 	@Test
 	public void testFloorMR4_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.FLOOR, rows2, cols2, sparsity1);
 	}
 	
 	@Test
 	public void testFloorMR5_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.FLOOR, rows2, cols2, sparsity2);
 	}
 	
 	@Test
 	public void testFloorMR6_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.FLOOR, rows2, cols2, sparsity3);
 	}
 	
 	@Test
 	public void testCeilMR1_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEIL, rows1, cols1, sparsity1);
 	}
 	
 	@Test
 	public void testCeilMR2_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEIL, rows1, cols1, sparsity2);
 	}
 	
 	@Test
 	public void testCeilMR3_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEIL, rows1, cols1, sparsity3);
 	}
 	
 	@Test
 	public void testCeilMR4_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEIL, rows2, cols2, sparsity1);
 	}
 	
 	@Test
 	public void testCeilMR5_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEIL, rows2, cols2, sparsity2);
 	}
 	
 	@Test
 	public void testCeilMR6_SP() {
-		if(rtplatform == RUNTIME_PLATFORM.SPARK)
 		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEIL, rows2, cols2, sparsity3);
 	}
 	
+	@Test
+	public void testCeilingMR1_SP() {
+		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEILING, rows1, cols1, sparsity1);
+	}
+	
+	@Test
+	public void testCeilingMR2_SP() {
+		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEILING, rows1, cols1, sparsity2);
+	}
+	
+	@Test
+	public void testCeilingMR3_SP() {
+		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEILING, rows1, cols1, sparsity3);
+	}
+	
+	@Test
+	public void testCeilingMR4_SP() {
+		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEILING, rows2, cols2, sparsity1);
+	}
+	
+	@Test
+	public void testCeilingMR5_SP() {
+		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEILING, rows2, cols2, sparsity2);
+	}
+	
+	@Test
+	public void testCeilingMR6_SP() {
+		runTest(RUNTIME_PLATFORM.SPARK, TEST_TYPE.CEILING, rows2, cols2, sparsity3);
+	}
+	
 	// -----------------------------------------------------------------------------
 	
 	private void runTest(RUNTIME_PLATFORM rt, TEST_TYPE test, int rows, int cols, double sparsity) {
 		RUNTIME_PLATFORM rtOld = rtplatform;
 		rtplatform = rt;
+		
+		boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
+		if( rtplatform == RUNTIME_PLATFORM.SPARK )
+			DMLScript.USE_LOCAL_SPARK_CONFIG = true;
 	
 		try
 		{
@@ -550,8 +575,9 @@ public class RoundTest extends AutomatedTestBase
 	
 			TestUtils.compareDMLHDFSFileWithRFile(expected("R"), output("R"), 1e-9);
 		}
-		finally
-		{
+		finally {
+			DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
+			
 			//reset runtime platform
 			rtplatform = rtOld;
 		}