[R] R BATCH job

Douglas Bates bates at stat.wisc.edu
Thu Nov 18 23:27:22 CET 1999


I'm glad that the misunderstanding about whether the response to the
question on R BATCH was critical or not has been cleared up.
Generally exchanges on the R mailing lists are pretty friendly and we
want to keep them that way.

To follow up on this a bit, there is a reason why R BATCH behaves
differently from Splus BATCH.  The Splus BATCH script starts another
process to actually run Splus, then the script returns.  With R BATCH
you have to explicitly indicate that the process should become a
"background process" if this is what you want.

This choice for R was made intentionally.  Many of us have experienced
the result of a person inadvertently writing a script that looks like

 Splus BATCH input1 output1
 Splus BATCH input2 output2
 ...
 Splus BATCH inputN outputN

thinking that the BATCH jobs would be executed sequentially.  They are
not.  They end up being executed in parallel, usually with the result 
that they bring your computer to its knees.  This is unpleasant if you
are sharing that computer.

Thus, the R BATCH script was designed so it waits until the R job has
finished before it returns.  As Armin indicated, you can allow it to
return immediately by appending an "&" to the line with R BATCH.  In
fact, may want to consider using 
 nohup R BATCH inputFile outputFile &
if your shell supports nohup.

-- 
Douglas Bates                            bates at stat.wisc.edu
Statistics Department                    608/262-2598
University of Wisconsin - Madison        http://www.stat.wisc.edu/~bates/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list