Hi,there I'm doing some R batch jobs in Unix. Something like R <prog1> output1 --save & R <prog2> output2 --save & prog1 and prog2 are running at the same time and they are essentially same except it contains different parameter values. I was wondering if two processes will affect each other? Hopefully they are two independent jobs. It's a beginner's question and thanks for your help. Chao [[alternative HTML version deleted]]
> I'm doing some R batch jobs in Unix. > Something like > R <prog1> output1 --save & > R <prog2> output2 --save & > > prog1 and prog2 are running at the same time and they are essentially > same except it contains different parameter values. I was wondering > if two processes will affect each other? Hopefully they are two > independent jobs.If you are running these jobs in the same directory, then whichever one finishes ***last*** will overwrite the workspace saved by the one that finished first. E.g. if there was nothing in .RData to start with and prog1 creates an object `X'' and prog2 creates an object ``Y'', and prog2 finishes last, then .RData will have Y in it when all is done, and will NOT have X in it. You could either run the jobs in separate directories, or use save() explicitly --- with separate filenames --- in the code in prog1 and prog2 (rather than using the --save flag). cheers, Rolf Turner rolf at math.unb.ca
On Tue, 8 Feb 2005, Chao Zhu wrote:> I'm doing some R batch jobs in Unix. > Something like > R <prog1> output1 --save & > R <prog2> output2 --save &Consider R CMD BATCH instead: it redirects the error/warnings too, which I expect you would want to do.> prog1 and prog2 are running at the same time and they are essentially > same except it contains different parameter values. I was wondering if > two processes will affect each other? Hopefully they are two independent > jobs.They will save in the same file unless you run them from separate directories. -- 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