Skip to content

Does R ever stop responding without a message?

7 messages · L S, David Winsemius, jim holtman +1 more

#
On Jul 14, 2013, at 2:40 PM, L S wrote:

            
Well, this answer only addresses whether the R program is "active": Use the Activity Monitor.app looking at teh CPU panel. The process name is R and, this being a Mac, you even get a micro-R-logo. At "idling speed" it will only display 1% or so. When it is active the cpu-%-age will "bounce around" near 100%.
If you have pushed your process over the bounds of available RAM and it is now using "virtual memory", there is really no way to estimate the complettion time. I generally give up after about 15 or 20 minutes. 

This does mean that the best practice will have been to make sure you have saved you work before terminating the session. The R GUI is helpful in this regard because it automatically backs up open source documents at intervals. Unfortunately that is not also true for the history session, which is only updated at a normal termination of a session.
This is not the correct mailing list for this question, and you should also read what the Posting Guide says about not using HTML format.

--  

David Winsemius
Alameda, CA, USA
#
On Jul 14, 2013, at 8:24 PM, L S wrote:

            
I thought I mentioned that these questions are off-topic on Rhelp. They should be directed to a different mailing list, either the Mac-SIG-mailing list or the RStudio list.
No. In fact the opposite, but you obviously have a great deal more patience than I do. I would long ago have shutdown R (using the force-quit functions from the "Apple menu" and then restarted.) I generally notice around 100%  in the % "CPU column" in the table whin R is active, although the scrolling "CPU Usage" graphic at teh bottom of thepage will max out at 25% because the R process is not distributed across all 4 cores.
If you do not tell us exactly what the command was _and_ the size and structure of the data involved, it is unlikely that we can tell you much of anything.
One of the columns in the CPU activity monitor is labeled "Virtual Mem". If it is being used the number will change.
David Winsemius
Alameda, CA, USA
#
It is a (very) large marked point process object that is being split (see
original post), and that is some other kind of structure. So I think all
bets are off, in terms of what kind of duration to expect.

The folks on r-sig-geo might be able to help with suggestions for faster
approaches.

In terms of monitoring the process, I have a couple of suggestions.

The first is to turn on profiling (see ?Rprof). Unless things changed in R
3.x.x, Rprof writes to a file as it profiles, and one could watch the file
grow to determine that processing is still taking place. Admittedly, it's
a cheap trick, and runs the risk of slowing the process, especially if the
profile file gets big.

The other is to do the split manually with a loop. This way, one could
insert cat() statements to track the progress. This is probably what I
would do first. Indeed, one could also write timestamps and track the rate
at which splitting is taking place (i.e., is it getting slower and slower).

-Don