<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 27/09/2010, at 10:06 , Joćo Paulo Pizani Flor wrote:</div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font></div><div>The code I've written (two files) for this example is in the following pastebins:</div><div><br></div><div>DPHVecMul.hs: &nbsp;<a href="http://paste.org/pastebin/view/22899">http://paste.org/pastebin/view/22899</a></div>

<div>Main.hs: &nbsp;<a href="http://paste.org/pastebin/view/22900">http://paste.org/pastebin/view/22900</a></div><div><br></div><div>I've compiled successfully both files and linked them, exactly as described in the Wiki. But when I run the resulting executable, the following error shows up:</div>

<div><br></div><div>"dotp: Prelude.undefined"</div><div><br></div><div>It's seems (from the tests I've done) that the call to the function <b>fromPArrayP </b>of the module <b>Data.Parallel.Array.Prelude </b>results always in undefined. In fact, I've taken a look at the function definition in the docs, and in fact it always returns undefined. It doesn't make ANY SENSE to me :P</div>

<div><br></div><div>Has someone been able to successfully compile and run this example code?? If so, what am I doing wrong? Is there some obvious error I'm incurring in? :D</div></blockquote><br></div><div>It's because you didn't add {-# OPTIONS -fvectorise #-} when compiling the DPHVectMul.hs module. The GHC vectoriser rewrites calls to fromPArrayP to the real implementations in its back-end library, but if the vectoriser doesn't run you get the default implementation which is just "undefined".&nbsp;I agree its an atrocious error message. It should have a real one in the head / GHC 7.0</div><div><br></div><div>Ben.</div><div><br></div></body></html>