[Haskell-cafe] dph question

Warren Harris warrensomebody at gmail.com
Fri Oct 15 08:59:18 EDT 2010

I trying to learn a bit about data parallel haskell, and started from the
wiki page here: http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell.
Two questions:

The examples express the dot product as:

dotp_double xs ys = sumP [:x *
y | x <- xs | y <- ys:]

Unless I'm missing something, shouldn't this actually be:

dotp_double xs ys = sumP [:x *
y | x <- xs, y <- ys:]

Second, when I run Main with the prescribed 10000 element array, everything
seems to work quite nicely. The task takes about 2 seconds on my 4 processor
x86_64, and threadscope shows all processors nicely utilized. However, when
bumping this to 100000 elements, rather than taking 10x longer as I
expected, the process never terminates. During one run I even lost control
of my machine and needed to do a hard reset. Are there known limits to the
array sizes that can be handled with dph, or can someone suggest what might
be going wrong here? Thanks,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20101015/870af30e/attachment.html

More information about the Haskell-Cafe mailing list