[R] two instances of R

Barry Rowlingson B.Rowlingson at lancaster.ac.uk
Fri Mar 12 12:38:46 CET 2004


Albedo wrote:
> Hello.
> 
> Does anoby know if it's safe to run two instances of R
> (in R CMD BATCH mode) in the same directory ?
> 
> If so, is it safe to run them on different computers
> (with access to the same filesystem via NFS) ?
> 

  "Is it safe?". Heh. Marathon Man was on TV last night...

  Depends on your definition of 'safe'. The processes will run quite 
happily, they will read whichever .RData they find by the usual search 
methods.

  However, if they come to _write_ a .RData, you should make sure they 
dont try to write to the same file, since if they do that at the same 
time bad things could happen, and if they do it sequentially then the 
first one will get overwritten by the last one.

  If you do "R CMD BATCH --no-save" then R won't try and save the .RData 
at the end, so if all your results are going to the output file then you 
dont need to save .RData and can use this option.

Barry




More information about the R-help mailing list