<br><br>On 7 November 2010 15:19, Vivian McPhail <span dir="ltr">&lt;<a href="mailto:haskell.vivian.mcphail@gmail.com">haskell.vivian.mcphail@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Message: 29<br>
Date: Sat, 6 Nov 2010 13:22:10 +0100<br>
From: Roel van Dijk &lt;<a href="mailto:vandijk.roel@gmail.com" target="_blank">vandijk.roel@gmail.com</a>&gt;<br>
Subject: [Haskell-cafe] hmatrix&#39;s fitModel function crashes ghc(i)<br>
To: Haskell Caf? &lt;<a href="mailto:haskell-cafe@haskell.org" target="_blank">haskell-cafe@haskell.org</a>&gt;<br>
Message-ID:<br>
        &lt;AANLkTim5eGSL_BZ+RUv-=d-Z3DB65Sc8o=<a href="mailto:cKQLTcyKT4@mail.gmail.com" target="_blank">cKQLTcyKT4@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
Hello,<br>
<br>
I would like to use hmatrix to do some function fitting with the<br>
Levenberg Marquardt algorithm. As an example I would like to fit the<br>
very simple function &quot;f x = a*x + b&quot; on some data points. The problem<br>
is that executing the &#39;fitModel&#39; function crashes GHC(i) with a<br>
segmentation fault. This makes debugging difficult. Can anyone spot<br>
what I am doing wrong? Given all the lists of Double&#39;s it seems very<br>
easy to make an error regarding the number of arguments with the model<br>
function or the derivative.<br>
</blockquote><div><br>I think the problem is with linking static data in GHCi on x86_64.<br>
<br>Hope this helps.  I seem to recall there might be a ghc trac ticket related to this but a quick search turned up nothing.<br><br></div></div></blockquote><div>Here&#39;s the ticket:<br>
<br>
<a href="http://hackage.haskell.org/trac/ghc/ticket/781">http://hackage.haskell.org/trac/ghc/ticket/781</a><br><br>They aim to fix the problem (with fPIC) by ghc 7.2.<br></div><br>
Cheers,<br>
<br>Vivian<br>