Required help for Test_id=ojalgo_MultTranB_100_20 test failure

9 views
Skip to first unread message

Chinna Rao Lalam

unread,
May 11, 2018, 4:11:56 AM5/11/18
to java-matrix-benchmark-discuss

When i am running the JMatBench with JIT enabled (VM_ARGS=-Xusejit:true), Test_id=ojalgo_MultTranB_100_20 this testcase is failing. When i do the initial analysis.

 

When JIT enabled test-case executed very fast compared to JIT disabled. When elapsed time is very less numTrails becomes 2 (My case elapsedtime < goalduration ) as per the logic in jmbench.tools.runtime.RuntimeEvaluationTest.evaluate().

When numTrails=2 below loop is running for 2 iterations, for first run correct result is produced but it was overwritten with second run result which is not the expected result in test assertion.

 

In jmbench.impl.runtime.OjAlgoAlgorithmFactory.OpMultTransB() method

           for (long i = 0; i < numTrials; i++) {

                result.fillByMultiplying(matA, matBT);

            }

 

When JIT disabled testcase took more time and elapsedtime < goalduration  so this loop is executing one time only, and produced expected value.

In failed case numTrials becomes 2 and passed case numTrials is one.

if elapsedTime < goalDuration  as per the calculation numTrials is more than or equal 2.

 

Can you help me to fix this issue.

 

 

 

 

 

These are trace msgs which are added to debug jmbench.impl.runtime.OjAlgoAlgorithmFactory.OpMultTransB()

 

In OjAlgoAlgorithmFactory.OpMultTransB() WHILE Loop numTrails : 2

 

NumTrails value : 2 i : 0

Input Values:

6898725549061005648 , 6739791592747404360

 

Result Values :

-1702889168242773212

 

NumTrails value : 2 i : 1

Input Values:

6898725549061005648 , 6739791592747404360

 

Result Values :

6439618958043074220

 

goal duration : 1000000, elapsed time : 1737600

 

Test results: 6439618958043074220 Expected Test result : -1702889168242773212

Chinna Rao Lalam

unread,
May 17, 2018, 3:47:48 AM5/17/18
to java-matrix-benchmark-discuss
Hi,

I have attached the patch for the below issue. Can some one review this.

Patch details:

With the same inputs if it called 2 times, result is different for each run. So before going for 2nd run initialize the result object also, then stale data will be cleared and we can expect same result for same inputs. This fix will add initialization cost for every run but functionality wise it won’t break anything.

jmatbenchfix.patch

Peter A

unread,
May 20, 2018, 5:25:48 PM5/20/18
to java-matrix-be...@googlegroups.com
Hi Chinna,

Sorry for being slow to respond. Could you create an issue on github for this? Do you think ojalgo detects that it the matrix input has not changed and if it has already performed the multiplication and skips the operation? Otherwise it's probably a bug. I'll loop in the author of ojalgo. Moving the matrix declaration inside of the loop will prevent OjAlgo from recycling memory and make it run much slower.

Cheers,
- Peter

P.S. I just posted an update to the benchmark on github. It's now more clear what min/max time parameters mean. Plus some changes to how the warm up is done.


--
You received this message because you are subscribed to the Google Groups "java-matrix-benchmark-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-matrix-benchmark-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
"Now, now my good man, this is no time for making enemies."    — Voltaire (1694-1778), on his deathbed in response to a priest asking that he renounce Satan.
Reply all
Reply to author
Forward
0 new messages