Search found 1467 matches

by hines
Wed Jan 17, 2018 5:34 pm
Forum: OS X
Topic: libnrnpython3 and libnrnpython2 on High Sierra
Replies: 3
Views: 725

Re: libnrnpython3 and libnrnpython2 on High Sierra

running into an issue with libnrnpython3 and libnrnpython2 This caused me to leap to the conclusion that you had installed a package. I.e very few people use options like --with-nrnpython=dynamic --with-pyexe=python3 --with-nrnpython-only which are useful for making a python independent distributio...
by hines
Mon Jan 15, 2018 9:39 am
Forum: Other questions
Topic: Off-by-a-bit timing problem with NetStim.noise = 0
Replies: 1
Views: 34

Re: Off-by-a-bit timing problem with NetStim.noise = 0

That was a bug. t was not being updated to correspond to the event time (ParallelContext.t(0) was updated). This is fixed by
https://github.com/nrnhines/nrn/commit/ ... 7ae3132c20
Now should also work with threads (but if cvode is active, do not change values, just record).
by hines
Wed Jan 10, 2018 11:32 am
Forum: OS X
Topic: libnrnpython3 and libnrnpython2 on High Sierra
Replies: 3
Views: 725

Re: libnrnpython3 and libnrnpython2 on High Sierra

I'm a little confused by NEURON -- VERSION 7.5 master (b14b5dd) 2017-12-21 because this change is later than the latest alpha distribution of https://neuron.yale.edu/ftp/neuron/versions/alpha/nrn-7.5.master-1670.x86_64-osx.pkg which is #define GIT_DATE "2017-12-07" #define GIT_BRANCH "master" #defin...
by hines
Thu Dec 28, 2017 9:45 am
Forum: Parallel NEURON
Topic: Passing parameters using pack/post, etc.
Replies: 18
Views: 11637

Re: Passing parameters using pack/post, etc.

Thanks, That suggested a fairly simple wrapper idiom so that the args can move into, rattle around, and move out of the HOC world without getting mangled. ie def wrapper(callable, args, kwargs): callable(*args, **kwargs) def pccontext(callable, *args, **kwargs): pc.context(wrapper, callable, args, k...
by hines
Sat Dec 23, 2017 9:16 am
Forum: Parallel NEURON
Topic: Passing parameters using pack/post, etc.
Replies: 18
Views: 11637

Re: Passing parameters using pack/post, etc.

Thanks for the suggestion about pc.ready(user_id) and pc.get(user_id). Let me think about that for a while. I'm leaning toward the position that your "hack" is in fact a petty good way to organize the return results for python since the key(result) is quite flexible and user_id as a key is one of ma...
by hines
Thu Dec 21, 2017 1:29 pm
Forum: Parallel NEURON
Topic: Passing parameters using pack/post, etc.
Replies: 18
Views: 11637

Re: Passing parameters using pack/post, etc.

Made a slight change to the github repository so that the pc.submit() return value is the same as the return value of pc.userid(). Note that the pc.working() return value is a unique system generated id (not pc.userid()). that value is passed to the job execution as h.hoc_ac_ As mentioned, none of t...
by hines
Thu Dec 21, 2017 8:50 am
Forum: Parallel NEURON
Topic: Passing parameters using pack/post, etc.
Replies: 18
Views: 11637

Re: Passing parameters using pack/post, etc.

I see that the explicit first arg to submit userid does work from neuron import h pc = h.ParallelContext() def func(*args): return pc.runworker() args=(1, 2, 3) submit_id = pc.submit(25, func, *args) while pc.working(): return_id = pc.userid() assert submit_id == return_id, 'submit_id: %i != return_...
by hines
Thu Dec 21, 2017 8:16 am
Forum: Parallel NEURON
Topic: Passing parameters using pack/post, etc.
Replies: 18
Views: 11637

Re: Passing parameters using pack/post, etc.

ParallelContext.context has been fixed to execute on all pc.id_world() > 0. The fix is pushed to github. The test is https://github.com/nrnhines/nrntest/blob/master/nrniv/Parallel/testcontext.py It is good to also manually run the test with pc.suboworld commented out and with arguments of 1 and pc.n...
by hines
Tue Dec 19, 2017 8:15 pm
Forum: Parallel NEURON
Topic: Passing parameters using pack/post, etc.
Replies: 18
Views: 11637

Re: Passing parameters using pack/post, etc.

It seemed to me most natural that the master context exists prior to the call to pc.context
by hines
Sun Dec 17, 2017 7:22 am
Forum: Parallel NEURON
Topic: Passing parameters using pack/post, etc.
Replies: 18
Views: 11637

Re: Passing parameters using pack/post, etc.

Is there a way to ensure that all subworlds execute a function after calling pc.runworker() ? Yes. Use the following module $ cat submit_impl_of_context.py ''' Usage: from submit_impl_of_context import pccontext def context(arg): ... # for any pc.subworld organization #after pc.runworker() #execute...
by hines
Sun Dec 17, 2017 4:42 am
Forum: Parallel NEURON
Topic: Passing parameters using pack/post, etc.
Replies: 18
Views: 11637

Re: Passing parameters using pack/post, etc.

Is there a way to ensure that all subworlds execute a function after calling pc.runworker() ? pc.context almost does that, I see the problem with it is that it only executes on all the ranks of the worker subworlds. And a direct call after runworker only executes on rank 0 of the master subworld. A...
by hines
Fri Dec 15, 2017 10:41 am
Forum: Other questions
Topic: na_ion mechanism not inserted in section axon
Replies: 15
Views: 4384

Re: na_ion mechanism not inserted in section axon

This means that it is not possible to have access to the icl produced by the point process in mA/cm2 in the nmodl code No. Only icl mus be nA. My change to i was just one of several ways to establish units consistency. It wold be ok to declare icl (mA/cm2) but then your original i=ica/(area*0,01) w...
by hines
Fri Dec 15, 2017 9:38 am
Forum: Other questions
Topic: na_ion mechanism not inserted in section axon
Replies: 15
Views: 4384

Re: na_ion mechanism not inserted in section axon

when I used modlunit on the fragment you sent (copied to temp.mod) I get $ modlunit temp.mod model 1.1.1.1 1994/10/12 17:22:51 Checking units of temp.mod Need declaration in UNITS block of the form: (mV) (units) Cannot recognize the units: mV at line 1 in file temp.mod NEURON<<ERROR>> { adding a uni...
by hines
Fri Dec 15, 2017 7:14 am
Forum: OS X
Topic: Install on Mac High Sierra
Replies: 4
Views: 4375

Re: Install on Mac High Sierra

The problem with NRN_PYLIB is fixed with a new version of nrnpyenv.sh. The difference between new and old is https://github.com/nrnhines/nrn/commit/c693a84702c2941f010a2c3fe02abbd678c72b4d You can get the new file from https://github.com/nrnhines/nrn/blob/master/bin/nrnpyenv.sh and use it to replace...
by hines
Wed Dec 13, 2017 1:46 pm
Forum: Other questions
Topic: na_ion mechanism not inserted in section axon
Replies: 15
Views: 4384

Re: na_ion mechanism not inserted in section axon

The conversion of a density current sec.icl(x) which has the units mA/cm2 to absolute current (nA) through the segment containing position x is
in the hoc interpreter
sec {
absolute_icl = icl(x)*area(x)*0.01
}

and in the python interpreter
absolute_icl = sec(x).icl*sec(x).area()*0.01