How do I know that my flow-graph is executing in thread per block mode? As far as I can tell my only 1 core out of the 8 is being used when I run my flow-graphs. This is what I see when I run the performance monitor (or whatever it is called) in Ubuntu.
I am currently using gnuradio 3.3.0 as my version. So can I parallelize my block without having to create a meta-block as you say? I have a lot of for-loops and vector calculations that need to be optimized (adaptive fir filters). Michael Dickens-3 wrote: > > Assuming you're using a reasonably recent GIT checkout, then your > flow-graph should be executing in "thread per block" mode by default -- > each block you create in your flow-graph will reside in its own unique > thread. You can manually override this setting to be in "single threaded > scheduler" mode instead, where all blocks are executed within a single > thread in a round-robin fashion (roughly; no need for its complexities > here). Those are your 2 choices when using GNU Radio (without rewriting > the scheduler yourself). IIRC the latter (STS) is being deprecated "real > soon now" -- someone please correct me if I'm remembering incorrectly. > > Generally, you shouldn't need to further parallelize beyond what's already > provided. A specific case where one would want do add another thread is > when data must be transferred non-synchronously (e.g., async or isync) -- > for example, the native USB driver for Mac OS X spawns a new thread to > handle the OS-interface part. Otherwise, you can probably find a clever > way to create a "meta-block" that encloses a number of actual blocks, and > then let the "thread per block" scheduler handle them. GNU Radio uses > Intel's TBB already, so if you feel for some reason that your particular > block(s) need more parallelization, then that's probably the best way to > go. > > My US$0.02, for what it's worth. - MLD > > On Jan 10, 2011, at 10:52 AM, sirjanselot wrote: >> I've been writing my own signal processing blocks and I noticed that >> gnuradio only uses one of my cores. >> >> I'm not sure if it is using just one core for my blocks or for all >> processing. >> >> Is gnuradio written to take advantage of multicore processing? >> >> I have been writing my blocks in generic c++ code, but now I am looking >> to >> write my blocks using multithreading/multicore processing. However, I am >> new to this and would like some advice on how to approach this. >> >> I have an Intel 8-Core Xenon in my PC (I don't know the exact model but I >> believe the clock rate works around 2.8 Ghz). What libraries should I >> use? >> I have been looking into Intel Thread Building Blocks, but I am wondering >> what people mainly use for gnuradio. > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > http://lists.gnu.org/mailman/listinfo/discuss-gnuradio > > -- View this message in context: http://old.nabble.com/Parallel-programming-tp30634902p30636613.html Sent from the GnuRadio mailing list archive at Nabble.com. _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio