[Rd] gctorture and proc.time (PR#10600)
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Jan 23 23:17:06 CET 2008
Such things are normally easy to find with valgrind and an instrumented
build of R (see 'Writing R Extensions'), and so was this. Interestingly I
got a different error immediately:
> gctorture(TRUE)
> proc.time()
Error: REAL() can only be applied to a 'numeric', not a 'character'
and setting a breakpoint on that message traced it back.
It was a missing PROTECT, and has now been fixed.
On Wed, 23 Jan 2008, Hin-Tak Leung wrote:
> Peter Dalgaard wrote:
>> charlie at stat.umn.edu wrote:
>>> In R version 2.6.1 (2007-11-26)
>>> and R version 2.6.1 Patched (2008-01-19 r44061)
>>> on openSUSE 10.2 (X86-64)
>>>
>>>
>>>> gctorture()
>>>> proc.time()
>>>>
>>> Error: protect(): protection stack overflow
>>>
>>> The problem with this is that then
>>>
>>> R CMD check --use-gct foo
>>>
>>> ALWAYS FAILS with
>>>
>>>
>>>> cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
>>>>
>>> Error in proc.time() - get("ptime", pos = "CheckExEnv") :
>>> non-numeric argument to binary operator
>>>
>>> This does not happen in R version 2.4.1 (2006-12-18)
>>>
>>> I was going to have my computing class try out --use-gct.
>>> I guess not until this is fixed.
>>>
>>>
>> I can reproduce this on SUSE 10.2 64 bit and Fedora 7 64 bit, but not on
>> SUSE 10.3 32 bit and Fedora 8 32 bit. (The OS versions are likely not
>> relevant, I bet it is a 64 bit issue somewhere).
>
> I can be a bit more precise - I have both 32-bit R and 64-bit R built
> and installed on fedora 8 64-bit, just one and same box.
>
> 32-bit R finishes quite quickly with:
>
> > proc.time()
> user system elapsed
> 0.772 0.032 10.147
>
> 64-bit R takes up 49s CPU time (from ps). This is long compared to
> either 10s (elapse) or 1s (user+sys). And it ends with:
> Error: protect(): protection stack overflow
>
> So yes, it looks like a 64-bit R specific bug.
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
Brian D. Ripley, ripley at 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
More information about the R-devel
mailing list