Hello Steve,<br>Thanks for your post. Can you please tell me where to look for information about TBB tuning in the documentation?<br>Julien.<br><br><div class="gmail_quote">2010/10/25 McKay, Steve F. <span dir="ltr"><<a href="mailto:Steve.F.McKay@ssa.gov">Steve.F.McKay@ssa.gov</a>></span><br> <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">We have used Intel TBB in a situation similar to yours. We simulate the U.S. population on 0.1 percent basis (about 300,000 people). We had attempted to use raw threads before the TBB package became available, but it was just too hard. The TBB package more or less automatically figures out how many threads to use, creates the threads, and doles the work out to the threads, using parallel_for. The biggest hurdle for us was learning how to create function objects, since that is what parallel_for is set up to use. But once you get the hang of it, writing your code that way actually helps you write good code. You may have to do some things differently, or break things down into smaller steps.</span></p> <p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">�</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Once you start using TBB, you will find other parts of it that are also useful, such as parallel_reduce. Also note that, even though TBB is mostly automatic, you should do some tuning because TBB may not have set the block size well (how many people, or whatever you are simulating, it allocates to a thread at one time). It may appear that TBB is not helping to reduce run time, until you do some tuning. Read the tutorial.</span></p> <p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">�</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Steve McKay</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><a href="mailto:Steve.F.McKay@ssa.gov" target="_blank">Steve.F.McKay@ssa.gov</a></span></p> <p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Social Security Administration</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Baltimore, Maryland 21235</span></p> <p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">�</span></p><p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:boost-users-bounces@lists.boost.org" target="_blank">boost-users-bounces@lists.boost.org</a> [mailto:<a href="mailto:boost-users-bounces@lists.boost.org" target="_blank">boost-users-bounces@lists.boost.org</a>] <b>On Behalf Of </b>Julien Martin<br> <b>Sent:</b> Monday, October 25, 2010 10:25 AM<br><b>To:</b> <a href="mailto:boost-users@lists.boost.org" target="_blank">boost-users@lists.boost.org</a><br><b>Subject:</b> Re: [Boost-users] General design question about threading/concurrency</span></p> <div><div></div><div class="h5"><p class="MsoNormal">�</p><p class="MsoNormal" style="margin-bottom: 12pt;">Ok. I will try that!<br>Thank you,<br>J.</p><div><p class="MsoNormal">2010/10/25 gast128 <<a href="mailto:gast128@hotmail.com" target="_blank">gast128@hotmail.com</a>></p> <div><p class="MsoNormal">Julien Martin <balteo <at> <a href="http://gmail.com" target="_blank">gmail.com</a>> writes:<br><br>> Thanks gast128,I just installed TBB. Can you please tell me what to look for<br> (which class, method or concept) in TBB? It is pretty vast...J.</p></div><p class="MsoNormal">> 2010/10/25 gast128 <gast128 <at> <a href="http://hotmail.com" target="_blank">hotmail.com</a>>If u stay on the same computer</p> <div><p class="MsoNormal" style="margin-bottom: 12pt;">(i.e. plain x86 PC with multi cores or multi<br>> processors), I would recommend Intel's TBB, which splits up tasks<br>> automatically and tries to keep the processor busy.<br> > It would be nice if Boost / std C++ would have such a parallellism library<br>> because it is an addition to using threads.</p></div><p class="MsoNormal">Hello,<br><br>tbb::parallel_for is probably where u will be interested in if the individual<br> tasks are truely independent.</p><div><div><p class="MsoNormal"><br><br>_______________________________________________<br>Boost-users mailing list<br><a href="mailto:Boost-users@lists.boost.org" target="_blank">Boost-users@lists.boost.org</a><br> <a href="http://lists.boost.org/mailman/listinfo.cgi/boost-users" target="_blank">http://lists.boost.org/mailman/listinfo.cgi/boost-users</a></p></div></div></div><p class="MsoNormal">�</p></div></div></div></div></blockquote> </div><br>