|
Boost Users : |
Subject: Re: [Boost-users] General design question about threading/concurrency
From: Julien Martin (balteo_at_[hidden])
Date: 2010-10-26 12:22:54
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_at_[hidden]>
> 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_at_[hidden]
>
> Social Security Administration
>
> Baltimore, Maryland 21235
>
>
>
> *From:* boost-users-bounces_at_[hidden] [mailto:
> boost-users-bounces_at_[hidden]] *On Behalf Of *Julien Martin
> *Sent:* Monday, October 25, 2010 10:25 AM
> *To:* boost-users_at_[hidden]
> *Subject:* Re: [Boost-users] General design question about
> threading/concurrency
>
>
>
> Ok. I will try that!
> Thank you,
> J.
>
> 2010/10/25 gast128 <gast128_at_[hidden]>
>
> 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
>
> (i.e. plain x86 PC with multi cores or multi
> > 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
> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net