s-news
[Top] [All Lists]

Re: Internal error (Splus 6.1 on Windows)

To: Zhu Wang <zhuw@mail.smu.edu>
Subject: Re: Internal error (Splus 6.1 on Windows)
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Date: Tue, 22 Jun 2004 07:49:20 +0100 (BST)
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <1087857493.2709.32.camel@zwang.stat.smu.edu>
This almost certainly indicates an error in your Fortran code (I assume 
.Fortran is called by car()), most likely writing outside the allocated 
storage.

One way to test this is to write a Fortran main program passing the same 
data to your subroutines and compile and run with bounds checking on.
(g77 --help -v will list the options, -ffortran-bounds-check is I think 
what you need.)

On Mon, 21 Jun 2004, Zhu Wang wrote:

> Dear S+ers,
> 
> I hope someone can help me with an frustrating problem I have. I am
> trying to develop a Splus function, which itself uses Fortran code. The
> Fortran code was compiled with GNU compiler on "mingw":
> 
> g77 -O2 -c file1.f file2.f ... file20.f
> dllwrap -o S.dll --export-all-symbols file1.o file2.o ... file20.o -lg2c

g77 -O2 -shared file1.f file2.f ... file20.f -lg2c

would be simpler.

> Then in Splus,
> 
> dyn.open("C:\\directory\\S.dll")
> 
> I then use my Splus function "car", which is a continuous time series
> model fitting. For the same data, I then tried different order model,
> and compared them with my results implemented on R. The problem is that
> after I successfully applied the function to several orders, as example,
> 3, 4, 5, 6, then I got error message for order 7:
> 
> > fit <- car(data=sim, order=7)
> > fit 
> 
> Nothing!
> 
> then type
> >2+2
> Nothing!
> then type
> >2+2
> Engine connection failure - shutting down S-PLUS recommended
> 
> >q()
> 
> Problem: internal error: trying to set internal exit action in frame 0,
> must be between 1 and 4
> 
> Error during wrapup: internal error: trying to set internal exit action
> in frame 0, must be between 1 and 4
> Engine connection failure - shutting down S-PLUS recommended
> 
> > traceback()
>  Engine connection failure - shutting down S-PLUS recommended
> 
> However, if I restart Splus and run order 7 to the data, I had no
> problem. But continuing several different order model fitting eventually
> resulted the same problem.
> 
> #####
> I searched the S-plus mailing list, and found that Robert Burbidge had
> similar problem when using Finmetric. But I did not find any answer for
> the inquiry. Is this my problem or Splus bug?
> 
> Thanks, 
> 
> 

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


<Prev in Thread] Current Thread [Next in Thread>