Skip to content
Prev 1673 / 2152 Next

Unreproducable crashes of R-instances on cluster running Torque

On May 2, 2013, at 9:46 AM, Till Francke wrote:

            
No, the 300MB are *in addition* to all other memory allocated by R - probably very close to the 3Gb. Also note that mem is total memory over all, not per process, so some may get very little (I don't use Torque, though so this is just based on the docs).
R does gc automatically when it's running out of memory, so that makes no real difference. Sometimes it's useful to code in local scope so objects can be collected automatically, but that's all very application-specific.
It's very easy to run out of memory with parallel jobs. In particular if you don't share data across the jobs, you'll end up using a lot of memory. People underestimate that aspect even though the math is simple - if you have let's say 128GB of RAM which sounds like a lot, but run 40 jobs, you'll end up with only ~3Gb per job which is likely not enough (at least not the jobs I'm running ;)). Note that things like parsing an input file can use quite a bit of memory - it's usually a good idea to run a pre-processing step that parses random files into binary objects or RData files which can be loaded much more efficiently.

Anyway, first run just one job and watch its memory usage to see how it works. Linux typically cannot reclaim much memory back, so when it's done you should see roughly the physical memory footprint.
Geeez... I didn't know such ancient versions still existed in the wild =)

Cheers,
Simon