Subjects » Programming » OpenMP
Wed, Mar 19, 2008, 4:06pm OpenMP/GL Particle Demo
Since 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). [Read more…]
(3 comments, in Programming » OpenMP)
Tue, Feb 26, 2008, 3:43am First dip into the OpenMP world
So my first bit of fun in OpenMP land was adding one line to a C program that just multiplies a n-by-m matrix with an n-vector. It's the first example program in the Using OpenMP book I'm reading. It's just a basic hello-world-type program, but it's important to get that first program compiled and running. The listing is here, which is only a slight deviation from what's in the book. [Read more…]