Multiple run, avoiding multiple compiling

26 views
Skip to first unread message

Abolfazl Ziaeemehr

unread,
Jan 5, 2021, 4:18:27 AM1/5/21
to ANNarchy

I am new to ANNarchy but I already worked with Brian 2,
I am curious how do you handle multiple run of a code when one want to run the same code many times and change a few parameter for each run. It it possible to avoid compiling the code again?
something like producing a dynamic library .so file from the compiled code and used it many times during the running.
I searched the documentation but could not find the relevant part.
Is it possible in ANNarchy?

Update
I can find a .so file in compiled files, what should I look for in the documentation for the using guide?

best,
Abolfazl

julien...@gmail.com

unread,
Jan 5, 2021, 4:47:29 AM1/5/21
to ANNarchy
Hi,

if you run a model multiple times when only changing parameter values, it will not recompile and will reuse the .so generated last time. If you make structural changes to the network (different equations, new populations/projections), then there must be a new compilation. 

There is no easy way to directly access the .so, because we transfer a lot of info from Python to the C++ kernel during compile(), in particular parameter values. 

So try to keep the structure of your network as fixed as possible to avoid recompilations. For example, do not hard-code parameter values in the neuron definition (that could induce recompilations), but set them as population attributes.

Best
Julien

Reply all
Reply to author
Forward
0 new messages