GHC on Cray XMT?

Duncan Coutts duncan.coutts at
Mon Feb 26 19:39:48 EST 2007

On Mon, 2007-02-26 at 13:33 -0800, Chad Scherrer wrote:
> The new Cray XMT seems to target exactly the same kind of analytic
> problems where Haskell excels:
> I'm not a hardware guy, but this seems like a natural fit with the
> recent advances in SMP Haskell. I know some compiler experts, but none
> of them have experience with Haskell.
> Can anyone tell me how big an undertaking it would this be to get GHC
> going on one of these? It seems to me like the fact that the absence
> of cache on XMT processors should simplify things, since there are
> less issues reasoning about locality.

This sounds very much like the machines that Tera tried to build before
they took over Cray. I was an intern at Cray for a summer and was
introduced to these things. The idea was to go massively multi-threaded
on a single core with many functional unit. It could switch thread in a
single clock cycle and use this to hide memory latency and keep the
functional units well utilised. Their main practical problem was in
finding enough parallelism in traditional codes to make use of that many
threads. I thought at the time that this might be ideal for the style of
lightweight threads used in GHC.

Those machines also had a non-standard memory system that had several
extra tag bits per memory word. I can't remember exactly what they got
used for, but I'm sure FP languages with GC could make good use of them.
>From the xmt description it sounds like they've dropped that feature
(since they're mixing in some off the shelf AMD cpus too)

As for porting GHC, the cpu arch will be totally proprietary (though no
doubt really fun). As a Cray customer you might be able to get specs
from Cray. It looks like these run Linux but only on the AMD64 service
nodes. The 'Threadstorm' cpus probably require the Cray C compiler so
that'd make porting with the via-C method hard as GHC relies on gcc -
Cray cc would not do. So you'd have a lot of work to do to go via C or
to build a asm native code generator.

I have some contacts in Cray still, I could try and find out more... :-)


More information about the Glasgow-haskell-users mailing list