Hi,

o7p9bxbnyj has left the following comment at Fix any failing unit test #9 http://www.google-melange.com/gci/task/view/google/gci2014/6370679909777408:


Test fixing approach


parallel_test() calculates the number that the counter should eventually be incremented to by multiplying the number that each thread increments it by and the number of threads started. However, when not in debug mode, bu_parallel() limits the number of threads that it creates to be at most the number of cpus available to the system. This means that when the test tries to run with more threads than there are available cpus (without the debug flag, previous to this patch), the actual number that the counter would be incremented by would be avail_cpus * reps instead of ncpus * reps. Setting the debug flag, as this patch does, tells bu_parallel to use the requested number of threads even when that number is more than the number of available cpus; this is better than having the test simply calculate the number of additions that would be performed by looking at the number of available cpus because it causes the test to be able to test the code paths used for multiple threads.


Greetings,
The Google Open Source Programs Team


---
You are receiving this message because you are subscribed to Fix any failing unit test #9. To stop receiving these messages, go to: http://www.google-melange.com/gci/task/view/google/gci2014/6370679909777408.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Tracker mailing list
brlcad-tracker@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-tracker

Reply via email to