Error in multifit_lmsder (?)
Brian Gough
bjg@network-theory.co.uk
Wed Dec 19 13:20:00 GMT 2001
Nicolai Hanssing writes:
> I still think that it's probably my own routine,
> but it follows the example ing gsl-ref closely...
>
> The "lmsder" converges correctly the firste time, but when the routine is
> called again [with the same parameters] it fails, and sends X= ['nan'
> 'nan' 'nan'] to the solverfunctions f and df.
I think there was a problem in your code,
bjg@hppav:~$ gcc -g -Wall main.c fit_Asterix.c -lgsl -lgslcblas -lm
fit_Asterix.c: In function `print_state':
fit_Asterix.c:187: warning: implicit declaration of function `gsl_blas_dnrm2'
fit_Asterix.c:187: warning: double format, different type arg (arg 6)
This seemed to cause some random corruption of the stack, depending on
how the program was compiled.
Adding the header file
#include <gsl/gsl_blas.h>
fixed the problem for me.
While looking for the problem I did find a floating point exception
that occurred for singular jacobian matrices, but this did not cause
the difference between the runs.
Regarding the GPL, as was previously said, there is information in the
new GPL FAQ linked off the front page at www.gnu.org. In particular
you will want to look at the questions,
"If a library is released under the GPL (not the LGPL), does that mean that
any program which uses it has to be under the GPL?"
and
"What if my school might want to make my program into its own proprietary
software product?"
The direct url is http://www.gnu.org/copyleft/gpl-faq.html
regards
Brian Gough
More information about the Gsl-discuss
mailing list