Code: Select all
h.load_file("parcom.hoc")
p = h.ParallelComputeTool()
p.change_nthread(16,1)
p.multisplit(1)
Code: Select all
class Section():
def __init__(self):
self.soma = h.Section("name=soma")
self.soma.nseg = 1
self.soma.diam = 4
self.soma.L = 10
self.soma.Ra = 120
self.soma.cm = 1
self.soma.insert("na18a")
self.soma.gbar_na18a = 0.1
self.soma.ena = 60
def initialize():
h.finitialize()
h.run()
cell = Section()
def voltage_clamp_activation(voltage):
h.dt = 0.025
h.celsius = 32
h.tstop = 210
h.v_init = -70
ina = h.Vector()
ina.record(cell.soma(0.5)._ref_ina_na18a)
v = h.Vector()
v.record(cell.soma(0.5)._ref_v)
time = h.Vector()
time.record(h._ref_t)
clamp = h.SEClamp(cell.soma(0.5))
clamp.rs /= 100
clamp.dur1 = 100
clamp.amp1 = -70
clamp.dur2 = 100
clamp.amp2 = voltage
clamp.dur3 = 10
clamp.amp3 = -70
initialize()
return list(ina), v, time
a, b, c = voltage_clamp_activation(10)
Without the code for the multisplit it works, but with that bit implemented I get the neuron message that's the title of this post, followed by an error message:
RuntimeError: hocobj_call error: hoc_execerror
pointing at h.finitialize()