Closed wthun closed 1 year ago
Hello @wthun ,
Thank you for opening this issue.
The error is expected in this case. It happens because you ask both for cvode=True and a specific time step dt of 0.1. These two requirements are incompatible since cvode means varying time step. Therefore if you wish to use cvode you shouldn't pass a dt when initializing the simulator object.
The error message is not very explicit. We will work on it.
Hello,
I seem to get the same error when disabling cvode. There is an example attached in the original post, where passing
nrn = ephys.simulators.NrnSimulator(dt=dt, cvode_active=False)
and then passing that simulator to the evaluator object results in the same error.
Indeed. I am sorry I misunderstood your example. We will fix that.
No worries and thanks for the help!
Hi! I can run your example without any error in linux, but the error shows up when I run under macos. Do you confirm @wthun that you also encountered this error on macos?
It looks like this is out of the scope of BluePyOpt, and should be solved at the NEURON level. I'll open an issue there first, and see if we have to change BluePyOpt once they have acted on it.
Thanks for raising this issue @wthun
Yes, but I originally encountered this on Linux. I receive the same error If I run the same example using Ipyparallel and passing lview.map_sync to the optimiser ((like this). In that case, isolate_protocols doesn't seem to help.
Alright, the latest version of BluePyOpt should work fine with custom dt
, both when isolate_protocols=True
on macos, and when using ipyparallel.
I'll close this issue. If you still have problems @wthun do not hesitate to re-open it.
When passing a simulator with a fixed, non-standard time step to ephys.evaluators.CellEvaluator, I receive:
This only happens when setting isolate_protocols to True, so I guess this happens due to the dt value not persisting when NEURON is imported onto new threads (i.e. around line 252 in protocols.py)?
I see the same behaviour in a minimal example.