s-news
[Top] [All Lists]

Re: Internal error (Splus 6.1 on Windows)

To: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Subject: Re: Internal error (Splus 6.1 on Windows)
From: Zhu Wang <zhuw@mail.smu.edu>
Date: Thu, 24 Jun 2004 08:56:40 +0000
Cc: zhuw@mail.smu.edu, s-news@lists.biostat.wustl.edu
In-reply-to: <Pine.LNX.4.44.0406220743200.27234-100000@gannet.stats>
References: <Pine.LNX.4.44.0406220743200.27234-100000@gannet.stats>
On Tue, 2004-06-22 at 06:49, Prof Brian Ripley wrote:
> This almost certainly indicates an error in your Fortran code (I assume 
> .Fortran is called by car()), most likely writing outside the allocated 
> storage.

The R package using the same Fortran files and R/S functions on a Linux
system works smoothly. That's why I was wondering if it is a bug in
Splus. Your assumption is exactly correct.

> 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.)
> 

I found removing two Fortran subroutines and changing my Splus function
could provide what I wanted. I will try to figure out the Fortran
problem if I have time later.

Thanks to Prof Brian Ripley.

> 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, 
> > 
> > 
-- 
Zhu Wang

Statistical Science Department
Southern Methodist University
Dallas, TX 75275-0332
Phone:(214)768-2453  Fax:(214)768-4035
zhuw@mail.smu.edu
http://people.smu.edu/zhuw


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