Phoronix Forums  

Go Back   Phoronix Forums > Phoronix > Phoronix Test Suite

Phoronix Test Suite Discussion & collaboration on the Phoronix Test Suite software and specification.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2008, 08:08 PM
uncle_fungus uncle_fungus is offline
Phoronix Test Suite
 
Join Date: Apr 2008
Location: York, UK
Posts: 134
Default sunflow test parser bug

I've just been running the universe test on one of my machines and I've noticed a bug in the parser which is similar to the scale problem identified in the md-gromacs test-set.

On fast machines, the result given isn't in seconds anymore, it's in milliseconds.
This leads to some stupid results for fast machines like the one I tested on. It reported times of 7000ms which the parser interprets as 7000s.

I'm looking into the parser now to work out how best to fix it.
Reply With Quote
  #2  
Old 05-08-2008, 09:01 PM
uncle_fungus uncle_fungus is offline
Phoronix Test Suite
 
Join Date: Apr 2008
Location: York, UK
Posts: 134
Default

OK, this patch should fix the parser:

Code:
diff --git a/pts/test-resources/sunflow/parse-results.php b/pts/test-resources/sunflow/parse-results.php
index d2332d2..f4a3c1e 100644
--- a/pts/test-resources/sunflow/parse-results.php
+++ b/pts/test-resources/sunflow/parse-results.php
@@ -2,6 +2,11 @@

 $BENCHMARK_RESULTS = substr($argv[1], strpos($argv[1], "Average:"));
 $BENCHMARK_RESULTS = substr($BENCHMARK_RESULTS, 0, strpos($BENCHMARK_RESULTS, "\n"));
-echo trim(substr($BENCHMARK_RESULTS, strrpos($BENCHMARK_RESULTS, ':') + 1));
+preg_match( '/([0-9\.:]*)(.{0,2})/', trim(substr($BENCHMARK_RESULTS, strrpos($BENCHMARK_RESULTS, ':') + 1)), $match);
+
+if($match[2] == 'ms')
+       echo $match[1] / 1000;
+else
+       echo $match[1];

 ?>
Reply With Quote
  #3  
Old 05-08-2008, 10:42 PM
Michael Michael is offline
Phoronix
 
Join Date: Jun 2006
Location: United States
Posts: 4,559
Default

Fixed in git, thanks!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:20 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2009 by Phoronix Media.