Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A way I've kept track of progress on nodes during long operations is to create a progress bar using <code>tkProgressBar</code> from the <code>tcltk</code> package. It's not quite what you asked for, but it should let you see something from the nodes. At least it does when the cluster is a socket cluster running on the local host (which is a Windows machine). The potential problem is that the progress bar either remains and clutters your monitor or it gets <code>close</code>d and the printed info is gone. For me, that wasn't a problem, though, since I just wanted to know what the current status was.</p> <pre><code>library(parallel) library(doSNOW) cl&lt;-makeCluster(detectCores(),type="SOCK") registerDoSNOW(cl) </code></pre> <p>Using your code,</p> <pre><code>foreach(ntree=rep(25,2),.combine=combine,.packages=c('randomForest','tcltk'), .inorder=FALSE) %dopar% { mypb &lt;- tkProgressBar(title = "R progress bar", label = "", min = 0, max = 1, initial = 0, width = 300) setTkProgressBar(mypb, 1, title = "RANDOM FOREST", label = NULL) ans &lt;- randomForest(classForm,data=data,na.action=na.action,do.trace=do.trace,ntree=ntree,mtry=mtry) close(mypb) ans } </code></pre> <p><strong>Here's a more general use example:</strong></p> <pre><code>jSeq &lt;- seq_len(30) foreach(i = seq_len(2), .packages = c('tcltk', 'foreach')) %dopar% { mypb &lt;- tkProgressBar(title = "R progress bar", label = "", min = 0, max = max(jSeq), initial = 0, width = 300) foreach(j = jSeq) %do% { Sys.sleep(.1) setTkProgressBar(mypb, j, title = "RANDOM FOREST", label = NULL) } NULL } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload