Bug 16978 - Feature request: parallel::clusterApply: Add hook for tracking progress
Summary: Feature request: parallel::clusterApply: Add hook for tracking progress
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: Wishlist (show other bugs)
Version: R-devel (trunk)
Hardware: All All
: P5 enhancement
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2016-07-04 01:04 UTC by Michael J. Culbertson
Modified: 2016-07-06 03:52 UTC (History)
1 user (show)

See Also:


Attachments
Patch to src/library/parallel (6.69 KB, patch)
2016-07-04 01:04 UTC, Michael J. Culbertson
Details | Diff
Revised patch to src/library/parallel (6.80 KB, patch)
2016-07-04 03:31 UTC, Michael J. Culbertson
Details | Diff
mc version of patch to src/library/parallel (10.98 KB, patch)
2016-07-06 03:52 UTC, Michael J. Culbertson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael J. Culbertson 2016-07-04 01:04:13 UTC
Created attachment 2111 [details]
Patch to src/library/parallel

For processing in parallel a large amount of data or running parallel routines (such as simulations) that take a long time, it can be helpful to have a means of monitoring progress through the task. The attached patch to parallel::clusterApply, clusterApplyLB, and clusterMap adds a hook for an optional closure to enable external tracking of progress, such as with a txtProgressBar. The closure is called as the results from parallel workers are processed.
Comment 1 Michael J. Culbertson 2016-07-04 03:31:35 UTC
Created attachment 2112 [details]
Revised patch to src/library/parallel

This revised patch provides more timely progress updating when results to statistcClusterApply() come in at different times (even though users would likely be better served with the *LB versions). Also simplifies the .progress function specification (no arguments).
Comment 2 Michael J. Culbertson 2016-07-06 03:52:43 UTC
Created attachment 2114 [details]
mc version of patch to src/library/parallel

This second patch provides an analogous implementation for mclapply.