hnn icon indicating copy to clipboard operation
hnn copied to clipboard

simulation log output lags behind terminal output

Open jasmainak opened this issue 3 years ago • 4 comments

When I run the simulation, I see the following:

image

jasmainak avatar Apr 03 '21 13:04 jasmainak

see also #300 . I am wondering if it might be a simpler design choice to ask users to look at the terminal output ?

jasmainak avatar Apr 03 '21 14:04 jasmainak

This should only happen when falling back to JoblibBackend with 1 core because mpi4py can't be loaded. While it would be a useful feature to be able to run HNN GUI without MPI, I think this involves an enhancement, not a bug.

If you'd like to support this, two options are:

  1. Run Joblib backend in a separate process, like mpi_child.py
  2. Modify _simulate_single_trial to support a cell_parallel option. The _PC.psolve() function must be avoided because it will take over all threads in the python process (slows down GUI threads too). Note that other ParallelContext functions are not problematic, just psolve.
    if cell_parallel:
        _PC.psolve(h.tstop)
    else:
        # this needs more to work correctly, check out NEURON docs
        _CVODE.solve(h.tstop)
    

blakecaldwell avatar Apr 04 '21 14:04 blakecaldwell

Thanks for the suggestion. I'll look into the MPI installation and try it again soon.

jasmainak avatar Apr 05 '21 03:04 jasmainak

Can confirm that this doesn't occur with a functioning MPI install: image

ntolley avatar Apr 06 '21 15:04 ntolley