A Domain-Specific Language to Let Groovy Go Parallel
Groovy is an agile dynamic language for the Java Platform. It runs on the JVM (Java Virtual Machine). It supports Domain-Specific Languages (DSLs). Last week, GParallelizer 0.7 release added exciting intuitive ways to handle tasks, actors and message. Great news for the Groovy community in order to go parallel.
I'm going to borrow some paragraphs from Lewis Carroll's "Alice's Adventures in Wonderland", also known as "Alice in Wonderland":
"Chelshire Puss", she began, rather timidly, as she did not at all know whether it would like the name: however, it only grinned a little wider. "Come, it's pleased so far", thought Alice, and she went on. "Would you tell me, please, which way I ought to go from here?"
"That depends a good deal on where you want to get to," said the cat.
If you're working with Groovy or you're planning to move to Groovy, you must take a look at GParallelizer 0.7. If you want to go parallel with Groovy, GParallelizer will help you to find your way. You want to go parallel, don't you?
I'm always testing new tools, libraries, frameworks, languages and DSLs trying to simplify parallel programming and concurrency. I've been testing GParallelizer since its first release. It was in its very early stages. However, the last release offers many interesting improvements.
Groovy offers a dynamic, agile, powerful and modern language to the Java Platform. However, you want to exploit multicore microprocessors and to develop applications that take full advantage of parallel processing capabilities. GParallelizer extends Groovy to provide mechanisms to declare which parts of the code should be performed in parallel.
It offers Groovy developers the possibility to work with Scala-like actors. The good news is that these actors can be both thread-bound and thread-pool bound ones. The thread-pool bound actors feature appeared in GParallelizer 0.6 and allows the creation of event-driven actors. They are really useful to implement complex parallel designs using Groovy + GParallelizer.
Using actor groups and multiple thread pools, you can take full advantage of modern multicore microprocessors. The language extensions are very easy to learn (a few hours are enough) and the possibilities to work with multiple messages and closures with multiple parameters really simplify coding highly parallelized algorithms.
If you want to implement a design with concurrent actors (entities) and using a task-based programming using messages to coordinate concurrent activities, you'll find GParallelizer extensions really helpful.
There are future plans to switch completely to the fork-join framework to implement most of the features instead of trusting in current Java Executors for some of them. Therefore, we will see GParallelizer evolving with both Java and Groovy. However, some features already use JSR-166y (the fork-join framework) like the ParallelArray. It uses the concurrent collections provided by JSR-166y.
In the next months, expect to see new Domain-Specific Languages appearing to simplify parallel programming for many languages. However, you do not have to forget about parallel programming principles and efficient designs in order to take full advantage of these extensions.
For more information, visit GParallelizer Wiki.
This Week's Multicore Reading List
MATLAB and Google App Engine
Logging In C++ : Part 2
Improving log granularityA Conversation with BitMagic's Developer
Prefer Structured Lifetimes: Local, Nested, Bounded, Deterministic
- Intel Parallel Studio; Download the free eval today!
- Parallelism Breakthrough Video Series; Watch and learn more about Intel® Parallel Studio
- 2009 Intel Software Webinar Series; View On-Demand webinars
- Coding for Multi-core Processes; Intel® Compiler Pro eBook
- Performance Through Parallelism; Intel® Tuning for Vista eBook
- Intel® Software Network; Connect with developers and Intel engineers
-
November 17, 2009
Visual Effects for Animation - presented by DreamWorks Animation
Speaker: Ron Henderson (Bio)Ron Henderson manages the FX Tools group at DreamWorks Animation, where he is responsible for developing physical simulation and procedural modeling tools. These systems have been used for key visual effects in recent films such as Kung Fu Panda and Monsters vs. Aliens (March 2009).
Prior to joining DreamWorks in 2002 he was a senior scientist at Caltech with a joint appointment to the Applied Math and Aeronautics departments, where he worked on efficient techniques for the direct numerical simulation of fluid turbulence.Abstract:
In this webinar, Ron Henderson will show examples of visual effects, from hair and feathers to smoke and fire, from a variety of DreamWorks Animation feature films. He will discuss in general terms the kinds of techniques used to achieve particular visual effects. Finally, Henderson will show a detailed breakdown of the dam-breaking scene from Madagascar: Escape 2 Africa, demonstrating how different elements of key frame animation, simulation, and rendering are combined in a real production shot. -
December 1, 2009
A Quick and Easy Way to Parallelize a Legacy Codebase with Intel® Threading Building Blocks (TBBs)
Speaker: Bernard Laberge, Avid, Senior Principal Engineer (Bio)Bernard Laberge is a senior principal engineer in the video editors division at Avid. During his seven years with the company he has been actively involved in the replacement of the legacy video processing engines used by Avid editors with a common hardware-abstracted, component-based video processing engine currently running on the CPU with SIMD optimized code, GPU, and dedicated hardware.
Abstract:
Learn how to overcome the limitations of a thread-based scheduler, including dealing with the absence of recursive parallelism support and the inefficient handling of unbalanced processing load. Bernard Laberge addresses how Avid resolved the expensive refactoring of their thread-based scheduler into a task-based solution by choosing Intel® Threading Building Blocks (TBBs). He explores how Avid was able to easily integrate the Intel TBBs into their video editor applications and more than 5 million lines of code. -
December 15, 2009
How to Use Intel® Parallel Studio to Streamline Code Development in a Multicore Environment
Speaker: Matt Dunbar, Director for Performance Technology, SIMULIA (Bio)Matt Dunbar is the director for performance technology at SIMULIA. Since joining the company in 1993, he has worked on parallelization of the Abaqus suite of products, initially for shared memory architectures and more recently for distributed memory architectures. Dunbar has also been intimately involved in selecting both the hardware and software tools used in the development of the Abaqus product line.
Abstract:
Resolve elusive, costly multithreading errors quickly and efficiently with Intel® Parallel Studio. While many coding problems that lead to bugs in software applications are typically straightforward logic errors, errors in managing memory and in multithreading code can sometimes take weeks to months to diagnose and fix. Matt Dunbar explores how and why taking advantage of multicore processors through multithreaded code is critical for compute-intensive applications. While spotlighting his work on SIMULIA's Abaqus finite element solver, Dunbar addresses the need for multicore execution and shares his experiences using Intel Parallel Studio to streamline code development in a multicore environment.



