@@ -72,34 +72,33 @@ private void runTestLeftIndexing(ExecType et, LeftIndexingOp.LeftIndexingMethod
7272 }
7373
7474 if (et == ExecType .SPARK ) {
75- rtplatform = ExecMode .SPARK ;
76- }
75+ rtplatform = ExecMode .SPARK ;
76+ }
7777 else {
7878 // rtplatform = (et==ExecType.MR)? ExecMode.HADOOP : ExecMode.SINGLE_NODE;
79- rtplatform = ExecMode .HYBRID ;
79+ rtplatform = ExecMode .HYBRID ;
8080 }
8181 if ( rtplatform == ExecMode .SPARK )
8282 DMLScript .USE_LOCAL_SPARK_CONFIG = true ;
8383
84-
85- config .addVariable ("rows" , rows );
86- config .addVariable ("cols" , cols );
87-
88- long rowstart =816 , rowend =1229 , colstart =967 , colend =1009 ;
89- // long rowstart=2, rowend=4, colstart=9, colend=10;
90- /*
91- Random rand=new Random(System.currentTimeMillis());
92- rowstart=(long)(rand.nextDouble()*((double)rows))+1;
93- rowend=(long)(rand.nextDouble()*((double)(rows-rowstart+1)))+rowstart;
94- colstart=(long)(rand.nextDouble()*((double)cols))+1;
95- colend=(long)(rand.nextDouble()*((double)(cols-colstart+1)))+colstart;
96- */
97- config .addVariable ("rowstart" , rowstart );
98- config .addVariable ("rowend" , rowend );
99- config .addVariable ("colstart" , colstart );
100- config .addVariable ("colend" , colend );
84+ config .addVariable ("rows" , rows );
85+ config .addVariable ("cols" , cols );
86+
87+ long rowstart =816 , rowend =1229 , colstart =967 , colend =1009 ;
88+ // long rowstart=2, rowend=4, colstart=9, colend=10;
89+ /*
90+ Random rand=new Random(System.currentTimeMillis());
91+ rowstart=(long)(rand.nextDouble()*((double)rows))+1;
92+ rowend=(long)(rand.nextDouble()*((double)(rows-rowstart+1)))+rowstart;
93+ colstart=(long)(rand.nextDouble()*((double)cols))+1;
94+ colend=(long)(rand.nextDouble()*((double)(cols-colstart+1)))+colstart;
95+ */
96+ config .addVariable ("rowstart" , rowstart );
97+ config .addVariable ("rowend" , rowend );
98+ config .addVariable ("colstart" , colstart );
99+ config .addVariable ("colend" , colend );
101100 loadTestConfiguration (config );
102-
101+
103102 /* This is for running the junit test the new way, i.e., construct the arguments directly */
104103 String LI_HOME = SCRIPT_DIR + TEST_DIR ;
105104 fullDMLScriptName = LI_HOME + "LeftIndexingTest" + ".dml" ;
@@ -118,31 +117,31 @@ private void runTestLeftIndexing(ExecType et, LeftIndexingOp.LeftIndexingMethod
118117 inputDir () + " " + rowstart + " " + rowend + " " + colstart + " " + colend + " " + expectedDir ();
119118
120119 double sparsity =1.0 ;//rand.nextDouble();
121- double [][] A = getRandomMatrix (rows , cols , min , max , sparsity , System .currentTimeMillis ());
122- writeInputMatrix ("A" , A , true );
123-
124- sparsity =0.1 ;//rand.nextDouble();
125- double [][] B = getRandomMatrix ((int )(rowend -rowstart +1 ), (int )(colend -colstart +1 ), min , max , sparsity , System .currentTimeMillis ());
126- writeInputMatrix ("B" , B , true );
127-
128- sparsity =0.5 ;//rand.nextDouble();
129- double [][] C = getRandomMatrix ((int )(rowend ), (int )(cols -colstart +1 ), min , max , sparsity , System .currentTimeMillis ());
130- writeInputMatrix ("C" , C , true );
131-
132- sparsity =0.01 ;//rand.nextDouble();
133- double [][] D = getRandomMatrix (rows , (int )(colend -colstart +1 ), min , max , sparsity , System .currentTimeMillis ());
134- writeInputMatrix ("D" , D , true );
135-
120+ double [][] A = getRandomMatrix (rows , cols , min , max , sparsity , System .currentTimeMillis ());
121+ writeInputMatrix ("A" , A , true );
122+
123+ sparsity =0.1 ;//rand.nextDouble();
124+ double [][] B = getRandomMatrix ((int )(rowend -rowstart +1 ), (int )(colend -colstart +1 ), min , max , sparsity , System .currentTimeMillis ());
125+ writeInputMatrix ("B" , B , true );
126+
127+ sparsity =0.5 ;//rand.nextDouble();
128+ double [][] C = getRandomMatrix ((int )(rowend ), (int )(cols -colstart +1 ), min , max , sparsity , System .currentTimeMillis ());
129+ writeInputMatrix ("C" , C , true );
130+
131+ sparsity =0.01 ;//rand.nextDouble();
132+ double [][] D = getRandomMatrix (rows , (int )(colend -colstart +1 ), min , max , sparsity , System .currentTimeMillis ());
133+ writeInputMatrix ("D" , D , true );
134+
136135 /*
137136 * Expected number of jobs:
138137 * Reblock - 1 job
139138 * While loop iteration - 10 jobs
140139 * Final output write - 1 job
141140 */
142- //boolean exceptionExpected = false;
141+ //boolean exceptionExpected = false;
143142 //int expectedNumberOfJobs = 12;
144143 //runTest(exceptionExpected, null, expectedNumberOfJobs);
145- boolean exceptionExpected = false ;
144+ boolean exceptionExpected = false ;
146145 int expectedNumberOfJobs = -1 ;
147146 runTest (true , exceptionExpected , null , expectedNumberOfJobs );
148147 }
0 commit comments