[Haskell-cafe] Data parallelism doesn't seem to work on windows...

Roman Leshchinskiy rl at cse.unsw.edu.au
Sat Nov 29 19:03:00 EST 2008


On 30/11/2008, at 10:43, Sebastian Sylvan wrote:

> This, on the other hand does not use more than one core:
>
> -- compiler command line (from shootout code): ghc --make -fcpr-off - 
> threaded -fdph-par -package dph-base -Odph -XPArr parr2.hs
> -- execution as before
> main = print $ [: True | n <- [: 1000 .. 5000 :], fac n == 0 :]

Unfortunately, that's not enough to get parallelism. You also need to - 
fvectorise the computation, i.e., everything that comes after $ (but  
not print because that can't be vectorised yet). At the moment, this  
means that you have to split your code in two modules because - 
fvectorise is a module-wide flag. Please take a look at dph/examples/ 
dotp to see how this is done. Sorry that this is so inconvenient at  
the moment but we're working on it!

Roman




More information about the Haskell-Cafe mailing list