[Gsll-devel] nonlinear fit test

Liam Healy lhealy at common-lisp.net
Sat Dec 27 14:48:25 UTC 2008


No, other than it has nothing to do specifically with the nonlinear
least squares; I've seen that elsewhere with CLISP. It might be a CFFI
problem, a CLISP FFI problem, or it might be a misuse of CFFI in GSLL.
 It appears to me that the wrong type is being sent to a foreign
function (in your instance, 0 is a fixnum and is being sent as a
double-float).  Since we have the same code working in SBCL, perhaps
the SBCL FFI is more tolerant of the wrong type being sent.

Liam

On Fri, Dec 26, 2008 at 10:58 PM, Mirko Vukovic <mirko.vukovic at gmail.com> wrote:
> I am trying to run gsll on clisp which is running on cygwin & windows.
>  It compiles and loads OK.
>
> I am trying to run the nonlinear fit example, and following the
> instructions in the comments at the end of the file.
>> (nlls-setup) ;works OK
>
>> (solve-nonlinear-least-squares-example)
> gives an error:
> FFI::FOREIGN-CALL-OUT: 0 connot be converted to foreign type DOUBLE-FLOAT.
>
> By commenting out pieces of the code, it looks that the statement
> ...(fit (nonlinear-fdffit
>               *levenberg-marquardt*
>               *number-of-observations*
>               *number-of-parameters*
>               exponential-residual
>               init)) ...
> is the one that causes the error.  I was unable to dig deeper.
>
> Any thoughts where the problem may be?
>
> Thanks,
>
> Mirko




More information about the gsll-devel mailing list