phoebe2 icon indicating copy to clipboard operation
phoebe2 copied to clipboard

No progress bar while MPI is on

Open ayushmoharana opened this issue 4 years ago • 1 comments

The progress bar during run_compute and run_solver doesn't show up when I activate the MPI as phoebe.mpi_on(). Running on a Linux system.

ayushmoharana avatar Jun 28 '21 12:06 ayushmoharana

Hi Ayush - when you call phoebe.mpi_on within a single thread, it handles that by exporting run_compute/run_solver within mpirun in a separate thread. Because of this, I'm not sure it will be possible to "fix" this and show a progressbar... so I will add a note in the API docs for mpi_on stating that.

However, if you call export_compute (or export_solver) and manually run that within mpirun, you should see the progressbar. Once its complete you'll then manually call import_model or import_solution in your main thread. This is often how I handle things when wanting to use MPI from within a notebook (its just three lines instead of one).

In the next release (2.4), the underlying implementation for this threading has been completely rewritten in a way that might allow accessing the progress and exposing a progressbar, at least at intermediate steps. I've made a note of this and will try to get it working, but unfortunately I don't think its fixable within 2.3.

Thanks!

kecnry avatar Jun 28 '21 15:06 kecnry