[Rd] windows/g95 peculiarity

Duncan Murdoch murdoch at stats.uwo.ca
Sun Oct 9 01:46:04 CEST 2005



On Sat, 8 Oct 2005, Joel Bremson wrote:

> I'm not looking for an answer here, this is just a report of a
> peculiar event I've observed
> and can reproduce.
>
> I'm developing a g95 (20050129) compiled package on windows xp pro
> using R-2.1.1, and gcc-3.4.2 (mingw special). An older version of the
> F95 package compiled and ran without problems. The new version of the
> package includes extensive changes in the code.
>
> The package has a test function, rtest(), which sets up a testing
> scenario and runs it.
>
> If I try to immediately load the library after starting up R and
> running rtest(), the following
> occurs:
>
>> library("bpkg")
> .onLoad: running R_g95_init
>> o = rtest()
> Testing cm.estimate...
> Using short data set (testing)...
> 25500.0000000000 2499.00000000000 11.0000000000000 300.000000000000
> ...
> 5 0.000000000000000
> 6 0.000000000000000
> Operating system error: Not enough space
> Memory allocation failed
>
> (R exits in terminal, or freezes as GUI)
>
> However, if I import a data element the rtest runs fine. I know
> rtest() doesn't need the extra data import because it runs without
> problems on our OS X version.

I would guess your package (or something it is calling) is corrupting the 
heap, or has another error in it.  I'd suggest running under gdb and 
identifying where the error message is coming from, and seeing at that 
point what is causing it.

I have some instructions for debugging R packages in Windows on
http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/.

Duncan Murdoch

>
>> library("bpkg")
> .onLoad: running R_g95_init
>> data(yij)
>> o = rtest()
> Testing cm.estimate...
> Using short data set (testing)...
> 25500.0000000000 2499.00000000000 11.0000000000000 300.000000000000
> ...
> 6 0.000000000000000
> Done
>
>>
> (R continues to run without problems)
>
> The default rtest runs a short data set because the full test data set
> takes about
> 30 seconds to compute. When I start off by running the full rtest data
> set I also
> don't have any problems with R.
>
> This package runs without problems on a G4/Tiger OS X mac with R-2.1.1, although
> we do compile it with gfortran on that platform.
>
> This is just a report. If anyone has any questions let me know.
>
> Best,
>
> Joel
>
> --
> Joel Bremson
> Graduate Student
> Institute for Transportation Studies - UC Davis
> http://etrans.blogspot.com
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list