This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Error in multifit_lmsder (?)
- To: Nicolai Hanssing <nuh at kampsax dot dtu dot dk>
- Subject: Re: Error in multifit_lmsder (?)
- From: Brian Gough <bjg at network-theory dot co dot uk>
- Date: Sun, 8 Jul 2001 20:08:59 +0100 (BST)
- Cc: gsl-discuss at sources dot redhat dot com
- References: <Pine.LNX.4.21.0107061941110.1107-100000@carlsberg.kampsax.dtu.dk>
- Reply-To: gsl-discuss at sources dot redhat dot com
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