tardis-sn / tardis

TARDIS - Temperature And Radiative Diffusion In Supernovae
https://tardis-sn.github.io/tardis
202 stars 405 forks source link

Progress Bars have glitchy display when run with multiple threads #1945

Open Rodot- opened 2 years ago

Rodot- commented 2 years ago

Describe the bug

To Reproduce Run tardis with more than 1 thread and enable progress bars

Screenshots

System

Additional context

jayantbhakar commented 2 years ago

I have tried running tardis with multiple threads. I found that the number of progress bar pairs ( i.e. one for the number of packets and another one for the number of iterations) depends on the threads. If threads are set to 3, there are 3 pairs of bars. Also, what I have found after seeing the code(montecarlo_numba/base.py) is that due to the number of threads, it runs the iterations(montecarlo_main_loop function) in parallel, thus showing the bars multiple times.