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

Sebastian Sylvan sebastian.sylvan at gmail.com
Sat Nov 29 18:43:59 EST 2008


Hi,I can't seem to get DPH to work on 6.10.1 on Vista-64.

I run the executables with +RTS -N2, and to verify that I'm doing it
correctly I checked with a simple benchmark using forkIO and that does
indeed use both my cores:

-- compiler command line: ghc --make -O2 -threaded parr.hs
-- execution command line: parr.exe +RTS -N2
main = do
forkIO $ print [ True | n <- [ 1000 .. 3000], fac n == 0 ]
forkIO $ print [ True | n <- [ 1000 .. 3000], fac n == 0 ]
getLine
return ()

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 :]

That's 4000 items of work there, so surely it should kick off plenty of
sparks to overcome the "sparks bug"?

-- 
Sebastian Sylvan
+44(0)7857-300802
UIN: 44640862
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20081129/8ebce78a/attachment.htm


More information about the Haskell-Cafe mailing list