Hi All, This little utility (progress_display in progress.hpp) is so useful that I couldn't help but send out a feature request (hoping that this list is the right place to do that). For programs using multiple threads or multiple distributed processes (as in MPI) it is useful to output progress indication only from some root node. However, these programs are usually SPMD (single program multiple data) and it is not convenient/possible to simply not create a progress_display object. One solution would be: // create a progress_display that does nothing for non root nodes int total_run = 100; boost::progress_display pg( i_am_root ? total_run : pg::DUMMY_DISPLAY ); // Then operator++() will output only from some root process. for (int i=0; i!=total_run; pg++); So my feature request is, can we have some facilities for creating trivial and does-nothing-useful type of progress_displays? best regards, - Levent.
On Jun 21, 2006, at 1:58 PM, Levent Yilmaz wrote:
// create a progress_display that does nothing for non root nodes int total_run = 100; boost::progress_display pg( i_am_root ? total_run : pg::DUMMY_DISPLAY ); // Then operator++() will output only from some root process. for (int i=0; i!=total_run; pg++);
Yes, this would be useful. It should be relatively easy to implement: perhaps you'd like to work up a patch with code+documentation updates? Doug
participants (2)
-
Doug Gregor
-
Levent Yilmaz