Skip to content

future_lapply() is silent for the multisession plan #171

Closed

Description

@wlandau-lilly

I would like to see console output in the following, but it appears silent.

library(future)
plan(multisession)
tmp <- future_lapply(1:2, cat)

Drake tries to log to the console when it builds targets, so this affects user friendliness, and to some extent, usability.

Activity

  1. HenrikBengtsson commented on Oct 25, 2017

    @HenrikBengtsson
    Collaborator

    For why, see Issue #141. If it's enough with output after the future has resolved, then that might happen (Issue #67). See also #172.

    A hack that I don't really recommend is to use:

    cl <- makeClusterPSOCK(availableCores(), outfile = "")
    plan(cluster, workers = cl)

    which will have all the output of the workers to go the system's stdout/stderr. Note however that such output cannot be captured by the main/owner R session using e.g. capture.output() and sink(). That's why I call it a "hack".

  2. wlandau-lilly commented on Oct 25, 2017

    @wlandau-lilly
    Author

    I did not think about compatibility with capture.output(), but now that you mention it, it makes sense. I guess I should stop using that outfile hack for drake::make(..., parallelism = "parLapply").

  3. wlandau-lilly commented on Oct 25, 2017

    @wlandau-lilly
    Author

    From #141, I can see that this is not really future's problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions