S
ince this little program behaves differently on different machines, I thought I'd post a small video of it running on an 8-core Mac Pro. It's a simple charged particle simulation. Controls for it are shown below at full-size. Arrows coming out of the spheres indicate the strength and direction of the field is (the field's gradient). Purely for visual fun enjoyment, the program optionally wraps the spheres in NASA planet images (Earth and Venus, in this case), and you can also follow around a randomly-chosen sphere.
A perhaps more interesting part lies in using OpenMP in a Cocoa program to throttle how many cores are utilized, and how to let the user dynamically control it. To this end, there is a Core selector at the top which dynamically detects the number of cores on the machine, sets up a tick-based slider with that many tick marks (1 core = far left, more cores = further right).
After showing off the planet wrapping and the follow-a-charge function, the demo slowly turns on more cores to crunch the interaction force calculations. Since this is often too gradual a way to notice any difference in the speed of the simulation it ends by toggling between 1 and 8 cores. It's easiest to notice when just staring at the simulation and not at the controls.
There is a more pronounced speed-up when all cores are selected than shown here, because the screen-recording software was taking up a lot of cpu overhead as well.
(It's also my first iMovie, despite owning it in various forms for many years.)