hnn-core icon indicating copy to clipboard operation
hnn-core copied to clipboard

MPIBackend silently works even if MPI is not available

Open jasmainak opened this issue 4 years ago • 3 comments

Not exactly sure if it's intended behavior. If you do:

with MPIBackend(n_procs=3):
    dpls = simulate_dipole(net, n_trials=1)

and mpi4py is not installed, it should throw an ImportError rather than resorting to joblibs backend

jasmainak avatar Feb 05 '21 05:02 jasmainak

Seems a good idea to throw an exception. Also a UserWarning if only 1 processor is given to MPIBackend (which will run simulation using joblibs). I think this might catch an issue on CI where the cloud server only has 1 processor, so run_hnn_core_fixture may actually not run MPIBackend when the test inteded to.

I think HNN GUI could be adapted to catch the ImportError and run the simulation with the joblibs backend. Just need changes on that side too...

blakecaldwell avatar Mar 30 '21 13:03 blakecaldwell

Is this issue currently open?

simar5244 avatar Mar 31 '23 15:03 simar5244

@simar5244 yes it is!

rythorpe avatar Mar 31 '23 20:03 rythorpe