[R] two instances of R

Peter Dalgaard p.dalgaard at biostat.ku.dk
Fri Mar 12 12:04:51 CET 2004


Albedo <albedo at pisem.net> writes:

> 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) ?

You have to worry about race conditions on file writes (e.g. running
the *same* script twice could be asking for trouble if both processes
want to write foo.Rout). Also watch out for seed issues when
simulating, if both processes restore the same seed from a saved
workspace, they'll be generating exactly the same sequence of random
numbers, which may or may not be what you want. Apart from that you
should be OK.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list