[R-sig-hpc] error response under interactive Rmpi

Martin Morgan mtmorgan at fhcrc.org
Sat May 16 17:25:02 CEST 2009


This is a follow-up to this thread

  https://stat.ethz.ch/pipermail/r-sig-hpc/2009-April/000174.html

Starting R and entering an error, one gets something like:

% orterun R --vanilla
> sdfsdf()
sdfsdf()
Error: could not find function "sdfsdf"
Execution halted
%

The 'Execution halted' bails one out to the shell. What happens is
that at startup R checks (with isatty(0), src/unix/system.c:391) to
see whether it's attached to a terminal, and if not sets
Rf_Interactive to FALSE. I guess orterun has only redirected I/O
without attaching a tty, hence R thinks of itself in non-interactive
mode.

Ross suggesting adding an error hook (options(error=function(){})
would do it) which stops error processing before R exits.

A second solution is to add --interactive to R

% orterun R --vanilla --interactive

This adds some flexibility back, e.g., to the interactive manager /
worker paradigm (although no readline support), e.g.,

% salloc -N4 orterun -n 1 R --vanilla --interactive
> library(Rmpi)
> mpi.universe.size()
[1] 4
> mpi.spawn.Rslaves(nsl=4)
4 slaves are spawned successfully. 0 failed.
master (rank 0, comm 1) of size 5 is running on: hyraxB74
slave1 (rank 1, comm 1) of size 5 is running on: hyraxB74
slave2 (rank 2, comm 1) of size 5 is running on: hyraxB75
slave3 (rank 3, comm 1) of size 5 is running on: hyraxB76
slave4 (rank 4, comm 1) of size 5 is running on: hyraxB77
         
Maybe though there is a better way, to connect the manager node to a
real tty?

Martin
-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the R-sig-hpc mailing list