Hao:

Thanks, this helped a lot. It's not an problem with Rmpi specifically, but
with all errors in the poe environment. But, I wasn't aware of
options(error= <>) to configure the error handlers, and this seems to be
the path to the solution.

When I start the R session, I run:
   options(error=expression(NULL))
I get error messages, but no longer do errors crash the R environment.
However it seems a heavy-handed override of the error handler and I don't
understand the implications; what side effects should I be aware of?

    thanks,
       jim

PS I worked on the Rprofile alternative before, but it seems MPI cannot
work outside of POE in this environment. POE seems to be the only glue that
assembles the MPI comm; without it the assigned PEs all think they are
singletons and they each get the interactive input.


On Thu, Aug 8, 2013 at 3:19 PM, Hao Yu <hyu@stats.uwo.ca> wrote:

> Jim,
>
> Try to alter the behave of error in R. Run at the beginning
>
> options(error=quote(assign(".mpi.err", FALSE, envir = .GlobalEnv)))
>
> Check Rmpi's Rprofile usage.
>
> Hao
>
>
> Jim Gattiker wrote:
> > I'm having trouble with running R under "poe" on an iDataPlex (NCAR's
> > yellowstone). The purpose of running this way is to enable an interactive
> > master instance of R that uses mpi_spawn to launch slaves, in Rmpi. In
> > this
> > environment it seems I must use PE_MPI and POE.
> >
> > The problem is, it seems poe catches even warning messages from R (e.g.,
> a
> > simple syntax error), and the entire environment crashes out. This
> happens
> > in base R, it's not an issue of parallel resources. This is very
> > inconvenient for EDA, when a typo causes hard exit.
> >
> > My launch looks like:
> >
> > bsub -Is -q xxx -n 4 -W 1:00 -P yyy tcsh
> >
> > and then
> >
> > poe R --no-save -procs 4 -world_sizes 1
> >
> > It runs, and is fully functional. But, I don't have to do anything exotic
> > to get a hard error:
> >
> >> m
> > m
> > Error: object 'm' not found
> > Execution halted
> >
> >
> > ...and that's it. My interpretation is POE catches the error and doesn't
> > know how to handle it.
> >
> > If anyone has any ideas ... I see two directions for solutions:
> > 1) avoid POE, which means get an interactive master set up with a slave
> > pool up without spawn(), which means launching them at startup. I've
> > tried;
> > it doesn't seem to be possible to both launch jobs on all PEs and have
> > (just) one remain interactive.
> > 2) figure out how to get poe to not trap R's own errors. Maybe this isn't
> > an HPC specific problem, if the issue is getting R to not throw its
> errors
> > outside its environment. Not sure how to proceed with that either.
> >
> > If a specific question will help: why does this error get outside of R,
> > and
> > why is this normally OK?
> >
> >      chrs,
> >        --jim
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-hpc mailing list
> > R-sig-hpc@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
> >
>
>
> --
> Department of Statistics & Actuarial Sciences
> Office Phone#:(519)-661-3622
> Fax Phone#:(519)-661-3813
> The University of Western Ontario
> London, Ontario N6A 5B7
> http://www.stats.uwo.ca/yu
>

	[[alternative HTML version deleted]]

