Sk for advice on implementing a progress bar while running an MPI (Message Passing Interface)

Rank 0 Progress: [==> ] 20%
Rank 1 Progress: [=====> ] 45%
Rank 2 Progress: [==========> ] 60%

Rank 19 Progress: [=====================> ] 95%

I want to implement a progress bar in an MPI program where each rank updates its own progress bar in a separate line, so that 20 ranks, for example, would each have their own progress bar updating in place. How can I efficiently manage this kind of output without interference between ranks?

Funnily enough I have some thoughts for a generic status package that would encapsulate this sort of functionality.

While that remains a collection of ideas in my mind, I’d recommend making a state struct that is shared across the tasks and can be atomically updated, and implementing methods to (1) print the entire status, and (2) clear a just-printed status.

You can also take a look at what Pkg does for package installing/precompiling.

I’ve been wanting of doing the same but for threaded code. Haven’t gotten around to it yet though.
Instead of rolling your own, you could try improving on ProgressMeter.jl which is already very good and does a lot of the heavy lifting already.

That’s interesting I’ll implement it simply thanks :slight_smile:

If you’re interested in collaborating at all, do let me know :slight_smile:

1 Like