Progressbar for ncore > 1

Issue #202 resolved
Lars Skjærven created an issue

avoid jumping behavior of the progressbar for various functions (e.g. pdbsplit) when ncore > 1

Comments (6)

  1. Xinqiu Yao

    This was indeed added to the ToDo long time ago (See "Tidy up codes related to parallelization"). Currently I use the solution from "StackOverflow", i.e. creating a child process watching a temp file that is shared by all cores. Some examples can be found in dccm.pca() and the cnapath(). The disadvantage is the run-time writing to HD, which may not be so satisfying (although it works fine in those examples). Let me know what you think, or if you have any other solutions.

  2. Xinqiu Yao

    Hi,

    I've fixed the problem with the recently added internal functions for progress bar printing. (See this commit).

    The "three-step method" could also be implemented in many other functions that support ncore>1:

    pb <- .init.pb(ncore, min=0, max=XX)
    
    ...
    
    # Within loop: 
    #    here step can be any positive number to allow finer control of printing.
     .update.pb(pb, step=1)
    
    ...
    
    .close.pb(pb)
    
  3. Log in to comment