On Thu, 3 Apr 2008, Riccardo (Jack) Lucchetti wrote:
Somehow, the problem lies with the fact that the return type is a
list. If
you modify the big file as per:
--- permaconfbackend.inp 2008-04-03 16:21:27.000000000 +0200
+++ permaconfbackend_2.inp 2008-04-03 16:23:35.000000000 +0200
@@ -725,5 +725,7 @@
list results = results GGlownaive GGupnaive SWPlownaive SWPupnaive
list results = results GGlowHall GGupHall SWPlowHall SWPupHall
end if
- return list results
+
+ matrix ret = { results }
+ return matrix ret
end function
and modify kpsw_testfrontend.inp accordingly, it runs fine.
More details: gretl gets stuck while trying to delete all the temporary
variables created inside the function. It looks like we run into an
infinite loop in this section of lib/src/gretl_func.c (line numbers added
for clarity):
3536: for (i=orig_v; i<pdinfo->v; i++) {
3537: fprintf(stderr, "i = %d\n", i);
3538: if (STACK_LEVEL(pdinfo, i) == d) {
3539: anyerr = dataset_drop_variable(i--, pZ, pdinfo);
3540: if (anyerr && !err) {
3541: err = anyerr;
3542: }
3543: }
3544: }
The "i--" operation smells bad, but I'm not familiar enough with this
region of the source to pin down what's wrong with it.
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti