Darryl Gove's blog

Tuesday Apr 29, 2008

Multicore expo available - Microparallelisation

My presentation "Strategies for improving the performance of single threaded codes on a CMT system" has been made available on the OpenSPARC site.

The presentation discusses "microparallelisation", in the the context of parallelising an example loop. Microparallelisation is the aim of obtaining parallelism through assigning small chunks of work to discrete processors. Taking a step back...

With traditional parallelisation the idea is to identify large chunks of work that can be split between multiple processors. The chunks of work need to be large to amortise the synchronisation costs. This usually means that the loops have a huge trip count.

The synchronisation costs are derived from the time it takes to signal that a core has completed its work. The lower the synchronisation costs, the smaller amount of work is needed to make parallelisation profitable.

Now, a CMT processor has two big advantages here. First of all it has many threads. Secondly these threads have low latency access to a shared level of cache. The result of this is that the cost of synchronisation between threads is greatly reduced, and therefore each thread is free to do a smaller chunk of work in a parallel region.

All that's great in theory, the presentation uses some example code to try this out, and discovers, rather fortunately, that the idea also works in practice!

The presentation also covers using atomic operations rather that microparallelisation.

In summary the presentation is more research than solid science, but I hoped that presenting it would get some people thinking about non-traditional ways to extract parallelism from applications. I'm not alone in this area of work, Lawrence Spracklen is also working on it. We're both at presenting CommunityOne next week.

Monday Apr 28, 2008

static and inline functions

Hit a problem when compiling a library. The problem is with mixing static and inline functions, which is not allowed by the standard, but is allowed by gcc. Example code looks like:

char * c;

static void foo(char *);

inline void work()
{
  foo(c);
}

void foo(char* c)
{
} 

When this code is compiled it generates the following error:

% cc s.c
"s.c", line 7: reference to static identifier "foo" in extern inline function
cc: acomp failed for s.c

It turns out that there is a workaround for this problem, which is the flag -features=no%extinl. Douglas Walls describes the issue in much more detail.

Thursday Apr 24, 2008

Second life slides and script

Just completed the Second Life presentation. It appeared well attended, and I got a bundle of great questions at the end. If you were there, thank you! I've uploaded a screen shot that I managed to get before the presentation started. Unfortunately, I didn't get a picture of the stage setup with the life-size books, a very nice touch.

[Read More]

Wednesday Apr 23, 2008

Time and location for CommunityOne

I've just had a mail giving time and location for my presentation at CommunityOne.

Session ID: S297077
Session Title: Techniques for Utilizing CMT
Track: Chip Multithreading (CMT): OpenSPARCâ„¢
Room: Esplanade 302
Date: 2008-05-05
Start Time: 11:00

See you there!

Presentation and Q&A in second life tomorrow

I'll be in Second Life tomorrow talking about the book. The session is at 9am PST in the Andromeda Theatre. I've got a small set of slides describing the contents of the book (Here's the full ToC for the book). After the slides I'll be sticking around to answer questions.

Thursday Apr 10, 2008

Solaris Grid Compiler

I've only just heard that the the Solaris Grid Compiler has been released as a cooltool! The idea of this is to set up a batch of machines as a compiler grid - so large compilations can be dispatched to the grid to better utilise the machines, and reduce compilation time.

Monday Apr 07, 2008

Congratulations Will, and thank you!

Will Zhang just received an SDN award for leading the effort to translate Solaris Application Programming into Chinese. Thanks, Will!

Friday Apr 04, 2008

Atomic operations and memory ordering

Nice article on the developer portal that discusses memory ordering and atomic operations. It's worth noting that Solaris 10 has a number of atomic operations implemented in libc.

Calendar

Search this blog

About

Solaris Application Programming

Book resources

Recent entries

Custom search

Tag cloud

ats bit book c++ cmt communityone compiler cooltools cpu2006 developers dtrace gccfss hpc multithreading openmp opensparc parallelisation parallelization performance performanceanalyzer secondlife solaris solarisapplicationprogramming sparc spot sunstudio t2 ultrasparc ultrasparct2 x86

Links

Webcasts

Articles

Presentations

Navigation

Referers

Feeds