Skip to content
Back to formatted view

Raw Message

Message-ID: <CAPr7RtXxbWs68PY2YWO0f=WVFSvcU1ztgx1aVtpOk3kdmRS=tQ@mail.gmail.com>
Date: 2012-12-29T00:34:03Z
From: ivo welch
Subject: parallel error message extraction (in mclapply)?

dear R experts---I am looking at a fairly uninformative error in my program:

Error in mclapply(1:nrow(opts), solveme) :
  (converted from warning) all scheduled cores encountered errors in user code

the doc on ?mclapply tells me that

  In addition, each process is running the job inside try(...,
silent=TRUE) so if error occur they will be stored as try-error
objects in the list.

I looked up "try", but this manpage creates as many new riddles as it
solves.  so, it isn't obvious to me how I get to the try-error object
list, or how to find out what triggered the abort.  of course, I can
use lapply to debug this, but this could be slow for some programs.
(I know the answer for my problem is that a uniroot deep inside my
code complained that my endpoints were not opposite.)

in general, is there a way to get some more information from mclapply
failures?  could this be added to the docs for mclapply?

/iaw


----
Ivo Welch (ivo.welch at gmail.com)
http://www.ivo-welch.info/