Parallel programming for sequential programmers

Our very own Jacob Sparre Andersen is doing a course on Parallel Ada programming for sequential programmers at Open Source Days 2013:

Assuming you already know sequential programming in a procedural programming language, this course can get you started writing parallel programs using the Ada programming language.

Short and sweet. The course contents are as follows.

  1. A quick introduction to the basics of sequential programming in Ada. — Just enough to allow you to map your existing programming knowledge to Ada. 45 minutes lecture + 45 minutes exercises.
  2. Creating and understanding basic tasks (parallel threads of execution) with Ada. — I.e. parallel programming without interaction. 45 minutes lecture + 45 minutes exercises
  3. Communication between tasks using safe, shared objects. One kind of interaction between tasks. 45 minutes lecture + 45 minutes exercises
  4. Direct communication between tasks using rendezvous. — Another kind of interaction between tasks. 45 minutes lecture + 45 minutes exercises
  5. Patterns for implementing parallel execution. 45 minutes lecture

I’m so going. Next step: Getting an Open Source Days 2013 ticket.

High Performance Multi-core Programming Using Ada

There are two new, and very interesting, AdaCore Gems available on the AdaCore website:

In case it’s not obvious what they are about, here’s the abstract:

This Gem introduces an Ada implementation of “Chameneos-Redux,” a benchmark program that compares the performance of threaded applications on a multi-core machine. In this series we explore the design and implementation techniques used to make a high-performance version of the program in Ada.

These two gems are written by Pat Rogers, who is both an Ada expert and a 3rd. dan black belt in Tae Kwon Do. Very interesting combination.

Magpie 0.10 Utilities for multi-core execution

From Marc A. Criley we get the first release of his Magpie framework. Magpie is an:

Ada framework providing work sharing/seeking services for distributing work amongst CPU cores on multi-core machines.

Or as stated in the release announcement:

Magpie is a collection of generic procedures that distributes subranges of iterative application-defined processing across the processors of a multi-core CPU to achieve true concurrency and therefore increased application performance.

Magpie depends on an Ada 2012 feature (processor-affinity), so it is currently restricted to compilers that support this specific feature. At the time of writing known compilers are:

  • GNAT for Linux
  • GNAT-AUX for the *BSD’s

If I’ve missed some, please let me know, and I’ll update accordingly.