You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, if you try and restart the code within matlab - for example running run_model twice, matlab will segfault.
The segfault is caused by an issue with the arguments to the first call but this isn't the real problem - we need a way to call the init functions again.
The problem is that we only have a single entry point from matlab which does make things a little more difficult.
detail
the code in the run_model script
does something like:
[V,outputs]=conductance('dummy',output);
this is because we don't know how big the voltage array needs to be
(on the matlab side).
So then in the C code, since the setup has been called, it tries to
use dummy as an input voltage matrix which obviously fails.
My suggestion: in mexfunction in src/conductance.c add some check on
the input arguments and then use that to set setup_done to 0 -
basically you want to do:
if input[0]=='dummy' then setup_done=0
obviously, not quite this simple, but that is the rough idea
Brandon is currently working on this
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Summary
At the moment, if you try and restart the code within matlab - for example running
run_model
twice, matlab will segfault.The segfault is caused by an issue with the arguments to the first call but this isn't the real problem - we need a way to call the init functions again.
The problem is that we only have a single entry point from matlab which does make things a little more difficult.
detail
the code in the run_model script
does something like:
[V,outputs]=conductance('dummy',output);
this is because we don't know how big the voltage array needs to be
(on the matlab side).
So then in the C code, since the setup has been called, it tries to
use
dummy
as an input voltage matrix which obviously fails.My suggestion: in mexfunction in src/conductance.c add some check on
the input arguments and then use that to set
setup_done
to 0 -basically you want to do:
if input[0]=='dummy' then setup_done=0
obviously, not quite this simple, but that is the rough idea
Brandon is currently working on this
The text was updated successfully, but these errors were encountered: