Parameter sweep with distributed parallel network
Posted: Tue Jul 25, 2017 4:20 pm
I have written some fairly complex distributed network code in which different groups of cells are hosted on different processors (i.e. NOT bulletin board style parallelization). My current simulations are not large enough to require parallel code (I currently run them with just one processor), but I wrote it in parallel anyway so I can scale up in the future.
I would like to take my current code and run a parameter sweep, stepping up the current injected into all cells with each new simulation. I tried to use a simple for loop like so
but when I do this I get the error: gid=0 already exists on this process as an output port , which is associated with the method pc.set_gid2node.
So I figured I just needed to get a new ParallelContext object for each new simulation run. I tried:
but this gives the same error as before.
Looking through the documentation, I see that I can use subworlds if I want to combine bulletin board parallelization with distributed parallelization, but I don't even need to get that complicated. I just want to run my distributed parallel code several times within a for loop. What is the simplest way to do this? Thanks for the help.
I would like to take my current code and run a parameter sweep, stepping up the current injected into all cells with each new simulation. I tried to use a simple for loop like so
Code: Select all
pc=h.ParallelContext()
for istim in istim_vals:
[[parallel simulation code with all cells receiving istim]]
pc.done()
So I figured I just needed to get a new ParallelContext object for each new simulation run. I tried:
Code: Select all
for istim in istim_vals:
pc=h.ParallelContext()
[[parallel simulation code with all cells receiving istim]]
del pc
Looking through the documentation, I see that I can use subworlds if I want to combine bulletin board parallelization with distributed parallelization, but I don't even need to get that complicated. I just want to run my distributed parallel code several times within a for loop. What is the simplest way to do this? Thanks for the help.