Haskell.org and Sun Microsystems are proud to announce a joint project to exploit the high performance capabilities of Sun's latest multi-core OpenSPARC systems via Haskell!
Sun has donated a powerful 8 core SPARC Enterprise T5120 Server to the Haskell community, and $10,000 to fund a student, to further develop support for high performance Haskell on the SPARC.
The aim of the project is to improve the SPARC native code generator in GHC and to demonstrate and improve the results of parallel Haskell benchmarks. The student will work with a mentor from Haskell.org and an adviser from Sun's SPARC compiler team.
Applications are now closed
Ben Lippmeier is now working on the project. You can follow his progress on his project blog.
The latest generation of multi-core machines pose a number of problems for traditional languages and parallel programming techniques. Haskell, in contrast, supports a wealth of approaches for writing correct parallel programs: traditional explicit threads and locks (forkIO and MVars), pure parallel evaluation strategies (par) and also Software Transactional Memory (STM).
GHC has supported lightweight preemptable threads for a long time, and for the last couple of years it has been able to take advantage of machines with multiple CPUs or CPU cores. The GHC runtime has also recently gained a parallel garbage collector.

We think the UltraSPARC T1/T2 architecture is a very interesting platform for Haskell. In particular the way that each core multiplexes many threads as a way of hiding memory latency. Memory latency is a performance bottleneck for Haskell code because the execution model uses a lot of memory indirections.
Essentially, when one thread blocks due to a main memory read, the next thread is able to continue. This is in contrast to traditional architectures where the CPU core would stall until the result of the memory read was available. This approach can achieve high utilisation as long as there is enough parallelism available.
GHC is increasingly relying on its native code backend for high performance. Respectable single-threaded performance is a prerequisite for decent parallel performance. The first stage of the project therefore is to implement a new SPARC native code generator, taking advantage of the recent and ongoing infrastructure improvements in the C-- and native layers of the GHC backend. There is some existing support for SPARC in the native code generator but it has not kept up with changes in the GHC backend in the last few years.
Once the code generator is working we will want to get a range of single threaded and parallel benchmarks running and look for various opportunities for improvement. There is plenty of ongoing work on the generic parts of the GHC backend and run-time system so the project will focus on SPARC-specific aspects.
The UltraSPARC T1/T2 architecture supports very fast thread synchronisation (by taking advantage of the fact that all threads share the same L2 cache). We would like to optimise the synchronisation primitives in the GHC libraries and run-time system to take advantage of this. This should provide the basis for exploring whether the lower synchronisation costs make it advantageous to use more fine-grained parallelism.
The T5120 server has a T2 UltraSPARC processor with 8 cores running at 1.2GHz. Each core multiplexes 8 threads giving 64 hardware threads overall. It comes equipped with 32GB of memory. It also has two 146GB 10k RPM SAS disks.

This server is a donation to the whole Haskell community. We will make accounts available on the same basis as the existing community server as soon as is practical. Our friends at Chalmers University of Technology are kindly hosting the server on our behalf.
We will encourage people to use the server for building, testing and benchmarking their Haskell software on SPARC, under both Solaris and Linux.