Hello Steve,
Thanks for your post. Can you please tell me where to look for information
about TBB tuning in the documentation?
Julien.
2010/10/25 McKay, Steve F. <Steve.F.McKay@ssa.gov>
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.
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.
Steve McKay
Steve.F.McKay@ssa.gov
Social Security Administration
Baltimore, Maryland 21235
*From:* boost-users-bounces@lists.boost.org [mailto:
boost-users-bounces@lists.boost.org] *On Behalf Of *Julien Martin
*Sent:* Monday, October 25, 2010 10:25 AM
*To:* boost-users@lists.boost.org
*Subject:* Re: [Boost-users] General design question about
threading/concurrency
Ok. I will try that!
Thank you,
J.
2010/10/25 gast128 <gast128@hotmail.com>
Julien Martin <balteo <at> gmail.com> writes:
Thanks gast128,I just installed TBB. Can you please tell me what to look
for
(which class, method or concept) in TBB? It is pretty vast...J.
2010/10/25 gast128 <gast128 <at> hotmail.com>If u stay on the same
computer
processors), I would recommend Intel's TBB, which splits up tasks
automatically and tries to keep the processor busy.
It would be nice if Boost / std C++ would have such a parallellism
(i.e. plain x86 PC with multi cores or multi
library
because it is an addition to using threads.
Hello,
tbb::parallel_for is probably where u will be interested in if the
individual
tasks are truely independent.
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users