I have read through all the documentation for parallel context and read a few of Michael Hines' papers from 2008 and 2009. I've also watched a nice youtube video from Michael Hines from a few years ago (HBP education). The code is almost there, but I'm struggling with a few aspects that seem simple, but perhaps I am not understanding it well.
My first question is about set_gid2node(). I believe have enough processors to have one gid per processor so a "round-robin" style of assignment is not necessary. All of my gids in the network are unique (0 through 9). Could I simply create the assigments in this fashion:
self is the python class object: subnetwork1 or subnetwork2
Code: Select all
self.gidlist = list(range(pc.id()+self.offset, (pc.nhost()/2)+self.offset))
for gid in self.gidlist:
pc.set_gid2node(gid+self.offset, pc.id())
pc.cell(self.celltype_1._gid, self.celltype_1._spike_detector)
pc.cell(self.celltype_1._gid2, self.celltype_1._release_detector)
pc.cell(self.celltype_1._gid3, self.celltype_1._release_detector2)
for cell in self.celltype2cells:
pc.cell(cell._gid, cell._spike_detector)
My next question is regarding multiple spike detectors in one cell and multisplit. I am having trouble understanding why multisplit is necessary when I have created unique gids for each spike detector and placed these gids on different processors (assuming I can get my issue above to work). It seems to me that it is a method to create another id (sid) for a split node location, but why must this split node location be created? If it is necessary to include pc.multisplit() in my code, I am unsure where to place it in my code.
Any help is much appreciated. Thanks a lot and thank you to the moderators for creating these tools for scientists.