For those who have some free leisure time this weekend and would like to explore a bit ParallelFx in a didactic manner I ported to Linux a Sudoku game coming from ParallelFx CTP samples which optionally uses ParallelFx to generate Sudoku grids.
For screenshot fans that’s how it looks like :
You can enable the use of [...]
Following Marek’s annoucement about Mono’s compiler getting full C# 3.0 support and his proof-of-concept which none other than Luke Hoban LINQ-ified Ray tracer, I’m happy to say that by using Mono’s PLINQ and with as little modifications as this :
[sourcecode language='csharp']— linq-sequential.cs 2008-07-25 11:38:53.000000000 +0200
+++ plinq-parallel.cs 2008-07-25 11:39:04.000000000 +0200
@@ -1,9 +1,9 @@
-internal void RenderSequential(Scene scene)
+internal void RenderParallel(Scene [...]
As described in the roadmap, PLinq implementation work has started a week ago. Some good bits are already there like what I consider to be the 3 most important operators (because most of the others can be expressed using these ones) : Select, Where and Aggregate. Following is a discussion on the specificities of PLinq, [...]
After much RSS problems (and there are still some in fact), I’m now on Monologue. Thanks to Miguel and Michael for adding me
.
Now for the usual presentation : my name is Jérémie Laval, I’m a french student participating in this year edition of Google Summer of Code for the Mono Project. The detail of my submission can be found in an older blog post.
To summarize, I’m doing an open-source implementation of ParallelFx, a framework designed to ease the development of parallel application on CLR platform. You can see the current results of my work here and here.
Apart from Mono and Summer of Code, I’m also working on two pet projects : D-Bus Explorer and Circ.
Finally, for more general informations, you can take a look at my « About » page.
So, as I said previously, I went to Google Zurich last Thursday. It was really fun, I indeed met a cool bunch of people and GSoC colleagues. It was really interesting to discuss with Petr (gda2tiles), Peter (Mercurial mentor), Arthur (aptitude-gtk) and the physicist guy whose name I forgot (so sorry
). By the way, thanks a ton to him for the laptop lend
.
My presentation went smoothly and people seemed interested (you can’t really tell for sure
). At least it sparkled some interesting questions. If you want the slides here they are : ParallelFx presentation. The other talks were both diverse and interesting too.
Of course, Google in itself was a blast. Unfortunately I had to catch the train so I wasn’t able to visit the whole building like the others but, even with the short glimpse I had, I’m pretty sure it must be fun to work at Google
. Still, I managed to retrieve a nice-looking Google tee-shirt. It’s rather funny to see that GSoC is the way to go if you want to freshen up your clothes stock
.
This weekend I played with the Microsoft ParallelFx CTP’s samples, adapting and running them on current Mono ParallelFx implementation. I’m going to show you two of them and the results. I used the same computer than previously for running the samples.
Image Colorizer
The first one is an image colorizer. For the test, I used a .jpg file weighting 8,3 Mio and containing 13273085 pixels (4207×3155). The result of the processing is below :

For the same color region, the parallel-enabled processing was 1.77x faster than the synchronous one (parallel time : 4.3368363s, non-parallel time : 7.6746839s).
As can be seen on the two following cpu graphs, the parallel version take advantages of both core in my CPU :
(Parallel version running)

(Non-parallel version running)
Benchmark sample
The second sample is a benchmark program containing a bunch of test. Each test uses one of the available API in ParallelFx. For the run, I enabled the 3 following benchmarks :
- Matrix multiplication : two random-filled matrix are multiplied together. Both are 500 by 500 matrix.
- Tree sum : all nodes of a binary-tree are added together. I set tree depth to 24 and each node’s value was randomly chosen.
- Searching : a random word is searched among all files present in a directory. I used a novel with each chapter split in a distinct .html file. The content of the directory was duplicated so that its total size was 12,6 Mio.
Each of these tests were run 7 times by the program and the time given back was the average of each run with the two extreme values being removed. Following are the results with, in parentheses, the ParallelFx API used by the test.
- Matrix multiplication : 2,25x speedup (Parallel.For).
- Tree sum : 1,58x speedup (Future).
- Searching : 1,37x speedup (Parallel.ForEach).
Conclusion
So we can see that ParallelFx always provide a boost but that the overall improvement seems to depend on the component used and how it is used. It would be interesting to compare these results with the ones yielded by Microsoft implementation and by the Mono implementation but running on .NET. I will probably do that at the end of GSoC as a conclusion of the work put during the summer
.
In addition these samples showed some bugs. Indeed, I had to disable two tests in the benchmark sample because one of them returned different results between parallel/non-parallel version and the other was causing a stack overflow in Mono runtime (I still need to find out if it’s Mono fault or mine).
Damned exceptions that are not propagated through threads…
Tomorrow I will attend GSoC Jam at Google office in Zurich. Looking forward to meet a cool bunch of people .
Normally, I will also give a lightning talk about ParallelFX and its current status during the meetup so if you are interested be sure to come by (registration page given in [...]
I think I pretty much arrived to the point where my work is starting to get useful. With yesterday basic Tasks implementation and today Parallel.For work I was able to run a parallelized version of Luke’s C# RayTracer. There was already a version using ParallelFx in the CTP samples but I preferred to made my [...]
So guess my surprise when the postman brought me yesterday a box with « Novell » and « Promotional Tee-shirt » written on it :
(Hehe, I’m so grim faced on this one )
Now I can hack away with all the goodies and a Rupert boss watching over me :
(When will it be able to bark [...]