Archives

Posts from Robert Reed (Intel) RSS

Robert Reed (Intel)

Robert started playing with computers in high school back in the 60s when that was a rare occupation, and has never stopped playing. Currently he is employed as a technical consulting engineer for such products as Intel® Threading Building Blocks and Intel® Parallel Studio XE. a job in which he uses his computer graphics experience and programming/analysis skills, mostly developed at Tektronix, to help solve his customers' performance problems. Robert likes tinkering with code and regularly shares insights and discoveries with the community. When not playing with or on computers, Robert tends towards arcane dress and hanging out at local Renaissance Faires.

n-bodies: a parallel TBB solution: parallel code with parallel_invoke: will it run faster?

By Robert Reed (Intel) (33 posts) on July 23, 2010 at 7:19 pm
Comments (2)

Robert finally brings this story to a close by demonstrating that withl a sufficient threshold in the partitioning process, the combinatorial subdivision algorithm using parallel_invoke can run circles around the serial implementation of the n-body interaction problem.

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , , , , , ,

n-bodies: a parallel TBB solution: parallel code: balanced recursive parallelism with parallel_invoke

By Robert Reed (Intel) (33 posts) on July 1, 2010 at 4:37 pm
Comments (0)

Having sketched out a new way of looking at the interactions of the n-body problem, Robert realizes the method with some C++ code using parallel_invoke from Intel Threading Building Blocks.

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , , , , , , ,

n-bodies: a parallel TBB solution: parallel code: a fresh look using recursive parallelism

By Robert Reed (Intel) (33 posts) on July 1, 2010 at 10:33 am
Comments (0)

After beating his head against various configurations of locks, none successful at beating serial performance, Robert switches tactics and looks at another way to look at the n-body interaction problem, sketching out an alternative that uses balanced, recursive parallelism

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , , , , ,

n-bodies: a parallel TBB solution: parallel code: spreading the “fix” around

By Robert Reed (Intel) (33 posts) on June 4, 2010 at 3:42 pm
Comments (0)

If one lock is a bottleneck to interacting bodies, what about a lock per body?

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , , , ,

n-bodies: a parallel TBB solution: parallel code: finding a fix for the leaky adds

By Robert Reed (Intel) (33 posts) on May 5, 2010 at 5:13 pm
Comments (0)

Wherein Robert does the simplest thing to make the body interaction code safe, and looks at TBB scoped locks in the process. Sometimes the simplest thing is not the fastest.

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , , , , , ,

n-bodies: a parallel TBB solution: parallel code: so what does TBB_USE_THREADING_TOOLS do?

By Robert Reed (Intel) (33 posts) on April 8, 2010 at 3:34 pm
Comments (0)

Take a peek at an example of TBB_USE_THREADING_TOOLS, a compile-time switch used in TBB to hide code that might look suspect to Intel Parallel Inspector.

Continued ›

Category: Open Source, Parallel Programming, Software Tools
Tags: , , , , , , ,

n-bodies: a parallel TBB solution: parallel code: first run’s fatal flaw

By Robert Reed (Intel) (33 posts) on February 23, 2010 at 1:37 am
Comments (5)

Robert tries Intel Parallel Composer update 5 on NBodies and shows (eventually) the data race in the dead simple parallel version of recomputing accelerations.

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , , , , ,

n-bodies: a parallel TBB solution: parallel code: first runs

By Robert Reed (Intel) (33 posts) on February 8, 2010 at 3:23 pm
Comments (1)

After getting lost in the twisty passages of compiler inter-procedural optimization, Robert returns to the simple path and shows a practical example of why it's important to optimize your serial code before parallelizing it.

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , , , ,

n-bodies: a parallel TBB solution: parallel code, a first attempt

By Robert Reed (Intel) (33 posts) on November 13, 2009 at 5:44 pm
Comments (2)

On the way to composing a first thread-parallel version of n-body code, Robert points out parallelization has already been occuring, using the Intel compiler and its vectorization of simple loops.

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , , , , , ,

n-bodies: a parallel TBB solution: serial body forces one more time

By Robert Reed (Intel) (33 posts) on October 23, 2009 at 11:58 am
Comments (1)

Forced to revisit the question of accumulating forces one more time, Robert tests addForce(i,j) and discovers that while accelerations are a little faster, it's not much and a much more complicated story than he realized.

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , , , ,

n-bodies: a parallel TBB solution: serial body drill-down

By Robert Reed (Intel) (33 posts) on October 14, 2009 at 2:15 pm
Comments (6)

Having found the function that consumes the most time, this episode shows the process of drilling down into the hot source and optimizing it BEFORE going parallel.

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , , , , , ,

n-bodies: a parallel TBB solution: serial body hot spots

By Robert Reed (Intel) (33 posts) on October 5, 2009 at 3:13 pm
Comments (3)

Robert finds the hot function in the serial n-bodies code, but only after discovering what a good job of function inlining the Intel C++ Compiler does.

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , , , , ,

n-bodies: a parallel TBB solution: serial bodies test run

By Robert Reed (Intel) (33 posts) on September 29, 2009 at 3:53 pm
Comments (0)

Wherein Robert attempts to compile his program and remembers eventually to switch to the Intel C++ compiler to accommodate C++0x features used by the program.

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , , , ,

n-bodies: a parallel TBB solution: realizing addAcc(i,j)

By Robert Reed (Intel) (33 posts) on September 25, 2009 at 3:42 pm
Comments (0)

Putting together the function to apply accelerations between a pair of gravitational bodies.

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , ,

n-bodies: a parallel TBB solution: computing accelerations? or forces?

By Robert Reed (Intel) (33 posts) on September 22, 2009 at 1:07 am
Comments (0)

Robert finally deals with the eternal question, forces or accelerations? Which is it more efficient to accumulate?

Continued ›

Category: Open Source, Parallel Programming, Software Tools
Tags: , , ,

n-bodies: a parallel TBB solution: computing accelerations

By Robert Reed (Intel) (33 posts) on September 14, 2009 at 3:49 pm
Comments (0)

Fleshing out how to interact between pairs of bodies.

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , , ,

n-bodies: a parallel TBB solution: basic simulation loop

By Robert Reed (Intel) (33 posts) on September 11, 2009 at 3:11 pm
Comments (0)

Simulation technology has become quite complex in order to mimic the real world but it starts with some basic principles. Dynamic simulation using a fixed time step is a simple place to start. Last time I took a first stab at a data structure; this time I'll make use of it. for (double s = [...]

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , ,

n-bodies: a parallel TBB solution: body data

By Robert Reed (Intel) (33 posts) on September 5, 2009 at 8:18 pm
Comments (3)

In considering a parallel solution to the n-body gravitational problem, it's important to carefully design your data.

Continued ›

Category: Parallel Programming, Software Tools
Tags: , , ,

n-bodies: a parallel TBB solution: the basic problem

By Robert Reed (Intel) (33 posts) on September 3, 2009 at 2:16 pm
Comments (2)

I could dwell on the best laid plans but I’m starting to sound like a broken record, so rather than wasting any more time, let’s get on with it. We have n bodies we want to manage. Gravitation and the laws of motion give us some basic tools for approaching the solution but there are [...]

Continued ›

Category: Parallel Programming, Software Tools
Tags: , ,

n-bodies: exploring a parallel TBB solution, intro and peek ahead

By Robert Reed (Intel) (33 posts) on August 19, 2009 at 11:28 am
Comments (0)

My vacation weeks have come and gone, plus a few intense weeks of playing catch-up on the work that accumulated while I was away.   Finally though, I have a chance to deliver on a promise made a month ago to share some details on parallelizing the n-body gravitational problem.  I've produced a series of refined versions of [...]

Continued ›

Category: Parallel Programming, Software Tools
Tags: , ,

n-bodies: implementing a parallel solution in Intel TBB

By Robert Reed (Intel) (33 posts) on July 9, 2009 at 12:34 pm
Comments (6)

With the growing interest in parallel code, a quest has arisen for parallel algorithms and parallelizable algorithms to feed the beast of multi-core. This post marks the start of a series exploring at least the rudiments of the n-body gravitational problem and a recursive parallel algorithm from Matteo Frigo that orders the chaos.

Continued ›

Category: Game Development, Parallel Programming, Software Tools
Tags: , , , ,

Under the hood: can you tell the partitioners apart?

By Robert Reed (Intel) (33 posts) on December 24, 2008 at 6:17 pm
Comments (0)

Last time I laid out my plan for studying the partitioners. All that was left was to run the tests, collect and organize the data. Must have been a busy several months. It all went by in a blur.  So here I sit, snowed in on my Christmas break and I finally have a chance [...]

Continued ›

Category: Open Source, Software Tools
Tags:

Under the hood: watching TBB task scheduler partitioning

By Robert Reed (Intel) (33 posts) on October 29, 2008 at 4:29 pm
Comments (1)

I thought my tools were in order to dig inside the TBB task scheduler, but rethought the approach to come up with a new and improved way to look at my nested parallel_for concurrency by seeing how task stealing partitions the work

Continued ›

Category: Open Source, Parallel Programming, Software Tools
Tags:

Under the hood: watching TBB task scheduler do recursive range splitting

By Robert Reed (Intel) (33 posts) on August 10, 2008 at 8:57 am
Comments (0)

Wow, time flies around here.  I was thinking it’s been a while since I last looked at my task scheduler experiments: a little vacation here, teaching at the O’Reilly Open Source convention there, and a little customer work stuffed around the edges can put a project completely out of mind. So let me recall and [...]

Continued ›

Category: Open Source, Parallel Programming, Software Tools
Tags:

Under the hood: Employing hooks to explore TBB task scheduler

By Robert Reed (Intel) (33 posts) on June 16, 2008 at 11:10 am
Comments (0)

On a quest to understand the TBB scheduler and how it might be used to schedule tasks with order dependencies (i.e., a place where you’d like to block access to an object until it can get built), I’ve been building up tools to take a peek.  Last time I showed a technique to use thread [...]

Continued ›

Category: Open Source, Parallel Programming, Software Tools
Tags:

Under the hood: Building hooks to explore TBB task scheduler

By Robert Reed (Intel) (33 posts) on May 19, 2008 at 2:42 pm
Comments (2)

Little did I suspect as I was introducing the topic of blocking in parallel computation in my last post that it would generate such interest, even though it seemed a common problem I’d been working on privately with several Intel customers.  Charles Leiserson amplified the pitfalls of employing blocking in a multi-threaded architecture and offered [...]

Continued ›

Category: Parallel Programming, Software Tools
Tags:

Under the hood: Learning more about task scheduling

By Robert Reed (Intel) (33 posts) on May 6, 2008 at 4:24 pm
Comments (13)

I’m back with another challenge, encountered during my support work for Intel® Threading Building Blocks.  I’ve been working with several TBB users who appreciate the general philosophy of Cilk task scheduling embodied in TBB but have run into some practical challenges applying it to their applications.  Often the issue revolves around the need to block [...]

Continued ›

Category: Parallel Programming, Software Tools
Tags:

Under the hood: count_strings

By Robert Reed (Intel) (33 posts) on February 24, 2008 at 12:47 am
Comments (0)

It’s been a while since I’ve had a chance to play, but I’ve been curious what I might discover by applying Intel® Thread Profiler with user events to other TBB structures besides pipelines. I tried checking out Conway’s Game of Life but the source download page wouldn’t reveal its sourcey goodness, so I moved onto [...]

Continued ›

Category: Software Tools
Tags:

Overlapping I/O and processing in a TBB pipeline, final(ly)

By Robert Reed (Intel) (33 posts) on October 26, 2007 at 4:24 pm
Comments (0)

Concluding the series on I/O pipeline flow, we show an additional parameter change and the analysis that led to it, resulting in a near linear scaling of this test code out to 8 processors.

Continued ›

Category: Software Tools
Tags:

Overlapping I/O and processing in a TBB pipeline, part 2

By Robert Reed (Intel) (33 posts) on August 28, 2007 at 11:34 am
Comments (0)

Last time I showed what happened when I tried to run a parallel I/O prototype using the TBB pipeline construct: Since the green patches indicate doing work and the green stripy ones are just spinning, this represents very poor parallel performance. Using the regular facilities of Intel® Thread Profiler, I can zero in on one [...]

Continued ›

Category: Software Tools
Tags:

Overlapping I/O and processing in a pipeline

By Robert Reed (Intel) (33 posts) on August 23, 2007 at 11:57 pm
Comments (2)

I've been experimenting with TBB pipelines as a means to overlap I/O and processing on a multi-core system, trying to understand how they work.  Having a copy of Intel® Thread Profiler has been a wonderful aid to understand what is going on, but there's some tricks I learned to use that add even more power [...]

Continued ›

Category: Software Tools
Tags:

Scale testing

By Robert Reed (Intel) (33 posts) on August 3, 2007 at 2:51 am
Comments (0)

Whew! I just finished teaching a two-day class in parallel programming on Linux which was also a first attempt to use dual-core laptops with simultaneous Linux and Windows partitions operating under a virtual monitor. Lots of challenges, things that almost worked or just didn't. But the students were great and we had a good time. And I managed [...]

Continued ›

Category: Software Tools
Tags:

Another voice on TBB

By Robert Reed (Intel) (33 posts) on July 27, 2007 at 8:20 pm
Comments (3)

Thanks, Kevin, for leading the way in this budding Threading Building Blocks community with your prolific posts.  Now that the responsibilities of OSCON have passed, I hope to follow in his example to explore and share my discoveries about Threading Building Blocks.  I work as a technical consulting engineer at Intel, one of the people [...]

Continued ›

Category: Software Tools
Tags: