Author's Blogs

n-bodies: a parallel TBB solution: parallel code with parallel_invoke: will it run faster?
By robert-reed Posted on 07/23/10 2
Earlier in the month I fleshed out a spatially arranged subdivision method I learned from Matteo Frigo but didn’t have time to actually run it and compare against my baselines.  And in the meantime my test machine has been regrooved into a Windows 7 box, so my first order of business is to retest...
n-bodies: a parallel TBB solution: parallel code: balanced recursive parallelism with parallel_invoke
By robert-reed Posted on 07/01/10 0
Last time, after struggling with different lock configurations to reduce synchronization overhead managing the interactions of n-squared bodies, I changed perspectives on the problem by spatially representing the interactions between all the bodies and (re-)discovering in that view a means to gro...
n-bodies: a parallel TBB solution: parallel code: a fresh look using recursive parallelism
By robert-reed Posted on 07/01/10 0
When last I had a chance to play with this code, I experimented with using multiple locks to enable multiple simultaneous (and disjoint) interactions between pairs of bodies.  It helped but performance still didn’t cross the base line using only one thread.  Overhead in the loop could be reduced ...
n-bodies: a parallel TBB solution: parallel code: spreading the “fix” around
By robert-reed Posted on 06/04/10 0
Last time I was able to make the n-bodies acceleration code at least thread safe by employing a scoped lock, at a disastrous cost in performance.  If you think about it, it’s a bad way to manage the eight HW threads my test machine has available.  The obvious alternative is to have a lock per bod...
n-bodies: a parallel TBB solution: parallel code: so what does TBB_USE_THREADING_TOOLS do?
By robert-reed Posted on 04/08/10 0
Our East coast Parallelism Road Show was a success, and having finally caught up with some of the work that piled up while I was gone, I’ll squeeze enough time at least to add a footnote to a previous rambling. In my last bumbling about, I tried defining the TBB_USE_THREADING_TOOLS macro as a sta...
n-bodies: a parallel TBB solution: parallel code: first run’s fatal flaw
By robert-reed Posted on 02/23/10 5
Last time when I resumed the exploration of my simple n-body gravitational simulator, I produced some performance numbers and revealed that there is a flaw in the first parallel version of the algorithm.  But then Intel® Parallel Composer Update 5 was released last week, so I updated my tools.  T...
n-bodies: a parallel TBB solution: parallel code, a first attempt
By robert-reed Posted on 11/13/09 2
It’s been a busy month preparing for SuperComputing ‘09 and booth duty (I’ll be hanging out in the Intel booth on Tuesday and Thursday and giving a talk there on Wednesday), and refining materials for a Parallelism Road Show we’re planning for next February and March (more details later). (Not to...
n-bodies: a parallel TBB solution: serial body forces one more time
By robert-reed Posted on 10/23/09 1
My plan to go parallel this time was thwarted by concerns that I may still have left some serial performance on the table. So I’ll take one more look (OK, well, no more than three). Leading the contenders was Jim Dempsey’s suggestion that accumulating forces instead of accelerations would save so...
n-bodies: a parallel TBB solution: serial body drill-down
By robert-reed Posted on 10/14/09 6
Having discovered which function consumes most of the time in the serial algorithm last time, there’s still more to discover by narrowing the focus to a specific function of interest. Our function, shown last time and below, is addAcc. Expanding the view to show the function in detail is often ca...
n-bodies: a parallel TBB solution: serial body hot spots
By robert-reed Posted on 10/05/09 3
In my last venture I got the n-bodies program to compile and ran a test series with the serial algorithm, showing the n-squared nature of the basic problem. I mean to write a parallel version of this (heh, heh, heh) but first I need to know what is taking up the time. By the dictates of Amdahl’s ...