Search in sources :

Example 26 with RUNTIME_PLATFORM

use of org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM in project incubator-systemml by apache.

the class UnboundedScalarRightIndexingTest method runRightIndexingTest.

/**
 * @param et
 */
public void runRightIndexingTest(ExecType et, int val) {
    RUNTIME_PLATFORM platformOld = rtplatform;
    switch(et) {
        case MR:
            rtplatform = RUNTIME_PLATFORM.HADOOP;
            break;
        case SPARK:
            rtplatform = RUNTIME_PLATFORM.SPARK;
            break;
        default:
            rtplatform = RUNTIME_PLATFORM.HYBRID;
            break;
    }
    boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG;
    if (rtplatform == RUNTIME_PLATFORM.SPARK)
        DMLScript.USE_LOCAL_SPARK_CONFIG = true;
    try {
        TestConfiguration config = getTestConfiguration(TEST_NAME);
        loadTestConfiguration(config);
        String RI_HOME = SCRIPT_DIR + TEST_DIR;
        fullDMLScriptName = RI_HOME + TEST_NAME + ".dml";
        programArgs = new String[] { "-args", String.valueOf(val) };
        fullRScriptName = RI_HOME + TEST_NAME + ".R";
        // run test (expected runtime exception)
        runTest(true, true, DMLException.class, -1);
    } finally {
        rtplatform = platformOld;
        DMLScript.USE_LOCAL_SPARK_CONFIG = sparkConfigOld;
    }
}
Also used : RUNTIME_PLATFORM(org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM) TestConfiguration(org.apache.sysml.test.integration.TestConfiguration)

Example 27 with RUNTIME_PLATFORM

use of org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM in project incubator-systemml by apache.

the class CSVParametersTest method testCSVParametersSparseCP.

@Test
public void testCSVParametersSparseCP() {
    setup();
    sparsity = 0.1;
    RUNTIME_PLATFORM old_platform = rtplatform;
    rtplatform = RUNTIME_PLATFORM.SINGLE_NODE;
    csvParameterTest(rtplatform, sparsity);
    rtplatform = old_platform;
}
Also used : RUNTIME_PLATFORM(org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM) Test(org.junit.Test)

Example 28 with RUNTIME_PLATFORM

use of org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM in project incubator-systemml by apache.

the class CSVParametersTest method testCSVParametersDenseMR.

@Test
public void testCSVParametersDenseMR() {
    setup();
    sparsity = 1.0;
    RUNTIME_PLATFORM old_platform = rtplatform;
    rtplatform = RUNTIME_PLATFORM.HADOOP;
    csvParameterTest(rtplatform, sparsity);
    rtplatform = old_platform;
}
Also used : RUNTIME_PLATFORM(org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM) Test(org.junit.Test)

Example 29 with RUNTIME_PLATFORM

use of org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM in project incubator-systemml by apache.

the class CSVParametersTest method testCSVParametersDenseHybrid.

@Test
public void testCSVParametersDenseHybrid() {
    setup();
    sparsity = 1.0;
    RUNTIME_PLATFORM old_platform = rtplatform;
    rtplatform = RUNTIME_PLATFORM.HYBRID;
    csvParameterTest(rtplatform, sparsity);
    rtplatform = old_platform;
}
Also used : RUNTIME_PLATFORM(org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM) Test(org.junit.Test)

Example 30 with RUNTIME_PLATFORM

use of org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM in project incubator-systemml by apache.

the class CSVParametersTest method testCSVParametersSparseHybrid.

@Test
public void testCSVParametersSparseHybrid() {
    setup();
    sparsity = 0.1;
    RUNTIME_PLATFORM old_platform = rtplatform;
    rtplatform = RUNTIME_PLATFORM.HYBRID;
    csvParameterTest(rtplatform, sparsity);
    rtplatform = old_platform;
}
Also used : RUNTIME_PLATFORM(org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM) Test(org.junit.Test)

Aggregations

RUNTIME_PLATFORM (org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM)248 CellIndex (org.apache.sysml.runtime.matrix.data.MatrixValue.CellIndex)173 TestConfiguration (org.apache.sysml.test.integration.TestConfiguration)171 MatrixCharacteristics (org.apache.sysml.runtime.matrix.MatrixCharacteristics)42 Test (org.junit.Test)17 FrameBlock (org.apache.sysml.runtime.matrix.data.FrameBlock)16 IOException (java.io.IOException)14 MatrixBlock (org.apache.sysml.runtime.matrix.data.MatrixBlock)13 CSVFileFormatProperties (org.apache.sysml.runtime.matrix.data.CSVFileFormatProperties)9 FrameReader (org.apache.sysml.runtime.io.FrameReader)8 Random (java.util.Random)7 Row (org.apache.spark.sql.Row)5 ValueType (org.apache.sysml.parser.Expression.ValueType)5 HashMap (java.util.HashMap)4 DMLScript (org.apache.sysml.api.DMLScript)4 Script (org.apache.sysml.api.mlcontext.Script)4 DMLRuntimeException (org.apache.sysml.runtime.DMLRuntimeException)4 Matrix (org.apache.sysml.api.mlcontext.Matrix)3 InputInfo (org.apache.sysml.runtime.matrix.data.InputInfo)3 MatrixIndexes (org.apache.sysml.runtime.matrix.data.MatrixIndexes)3