Hello everyone,

Sorry for the long delay. As I explained in my first post, I does not have access directly to the code and I
need to ask help by email to have a way to reproduce the problem.

After applying your fix, ie,
replace "for (k=0; k<r-m; k++) {" by "for (k=0; k<r-m-1; k++) {", purify does not find anymore a memory corruption.

Nevertheless, there is a new problem at the line 377
"*err = gretl_invert_symmetric_matrix(H);" in gretl_bfgs.c

gretl_invert_symmetric_matrix:
dpotrf failed with info = 4 (n = 9)

To reproduce the problem, you can compile testarma.c and run with the following parameter
"a.out EntreesArmasJDD58_precision20.txt 21228"

We try this test on an old linux (not reproduce with 1.9.1
), sun Solaris ( reproduce with 1.9.1).


It is possible there is a bug inside gretl_invert_symmetric_matrix ?
It is possible the first fix is not correct ?
Is there any requirements on the arma input dataset to work correctly ?

Thanks for your help.

Best regards,

Olivier Gaça



2011/5/5 Olivier Ga <ogaca42@gmail.com>
Thank everyone for your answer. Your solution is under test.

I will give you a feedback as soon as possible.

Olivier



2011/5/5 Allin Cottrell <cottrell@wfu.edu>
On Thu, 5 May 2011, Riccardo (Jack) Lucchetti wrote:

> On Wed, 4 May 2011, Allin Cottrell wrote:
>
> > This is a cautionary tale: it can be more difficult that you'd
> > think, converting code from 1-based indexing to 0-based, when you
> > have nested loops to handle!
>
> As I said in my previous message, I find it quite odd that the problem
> hasn't surfaced in such a long time. Also mysterious is the failure by
> valgrind to detect it. Oh well.

It's odd, yes, but it's not something that valgrind is good at
catching: valgrind does a great job with memory allocated on the
"heap" (malloc) but doesn't help much with stack corruption.

Allin
_______________________________________________
Gretl-devel mailing list
Gretl-devel@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel