I trying to learn a bit about data parallel haskell, and started from the wiki page here: <a href="http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell">http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell</a>. Two questions:<br>
<br>The examples express the dot product as: <meta charset="utf-8"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><pre class="haskell" style="margin-left: 2em;">
dotp_double xs ys = sumP <span style="color: black;">[</span>:x <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:."><span style="color: rgb(0, 102, 0);">*</span></a> y | x <span style="color: rgb(0, 0, 153);"><-</span> xs | y <span style="color: rgb(0, 0, 153);"><-</span> ys:<span style="color: black;">]</span></pre>
</span><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"></span>Unless I'm missing something, shouldn't this actually be:<meta charset="utf-8"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><pre class="haskell" style="margin-left: 2em;">
dotp_double xs ys = sumP <span style="color: black;">[</span>:x <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:."><span style="color: rgb(0, 102, 0);">*</span></a> y | x <span style="color: rgb(0, 0, 153);"><-</span> xs, y <span style="color: rgb(0, 0, 153);"><-</span> ys:<span style="color: black;">]</span></pre>
</span><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"></span>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,<br>
<br>Warren<br>