Closed pat-s closed 7 years ago
Error: length(results) == nbr_of_elements is not TRUE
only applies to plan(multiprocess)
i.e. multicore
-> macOS/Linux. multisession
works fine.
It seems that console output of the workers is only provided using plan(cluster)
with the following setup
cl <- makeCluster(availableCores(), outfile = out.progress)
plan(cluster, workers = cl)
where out.progress
has to be adjusted by OS (?makeCluster()
).
multiprocess
and multisession
both do not support console output of the workers. Is this correct?
On May 24, 2017 03:04, "Patrick Schratz" notifications@github.com wrote:
It seems that console output of the workers is only provided using plan(cluster) with the following setup
cl <- makeCluster(availableCores(), outfile = out.progress) plan(cluster, workers = cl)
where out.progress has to be adjusted by OS (?makeCluster()).
multiprocess and multisession both do not support console output of the workers. Is this correct?
Yes, this is correct. The approach above using outfile
will output to
the console, but note that it is not outputted via stdout/stderr of your
main process. This means that they cannot be captured, sinked, etc. The
user might not want that. It may also not be displayed in various R GUIs.
I've got an open issue in the https://github.com/HenrikBengtsson/future repository that discusses a wish of a generic standard way of capturing stdout/stderr from futures. I think (offline on a flight right now) there's also an issue about progress reporting/bars from active futures. Both these feature requests share the challenging question on how and when to communicate such information. I don't know of a simple solution for this.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/HenrikBengtsson/doFuture/issues/12#issuecomment-303677885, or mute the thread https://github.com/notifications/unsubscribe-auth/ABir0iAByjCjZpmJyFYAhl6lCHNo0lXlks5r9ABsgaJpZM4Ni6ar .
Okay, thanks for this summary! Curious about further development of future
:bowtie:
Hi Henrik,
I am about to replace my
foreach
implementation fordoFuture
. I want to use it as the default mode for sequential and parallel execution.In general it should be quite easy, only replacing the doParallel lines
with
However, I'm facing several problems and would need your help here again.
remotes:install_github("pat-s/sperrorest@doFuture")
Parallel modes
multisession
When using parallel mode
multisession
I am missing the console output (should there be one at all?)multiprocess
The following example throws an error which I assume is caused forking again (macOS)? It also doesn't work on Linux (Ubuntu 16.04).
sequential
andmultisession
work here.