I finally have a parallel simulation running on our university's supercluster that is based on the example "ring network" code in Hines & Carnevale 2008 in J. Neurosci Methods. I've inserted my own cell type and I'm satisfied that the cells are doing what they should based on serial simulations.
However, when I want to write the voltage data to a file, I'm having significant problems. As a test run, I'm using 20 cells on 20 nodes. Here is the code I'm trying to run to save the data:
Code: Select all
objref voltage[NCELL],time
time = new Vector()
//In the for loop of the mkcells procedure, I'm executing these lines ("i" is the number of the cell just created):
voltage[i]=new Vector()
voltage[i].record(&cell.soma.v(0.5))
if(pc.id==0) {time.record(&t)}
//then once the simulation has run, I'm trying to save the data to a file in the following general way:
objref fobj
fobj = new File("data")
fobj.wopen()
if(pc.id==0) {time.printf(fobj)}
for (i=0; i < NCELL; i += 1) {
if(pc.id=i){
voltage[i].printf(fobj)
pc.barrier()
}
}
fobj.close()
Any help is of course very much appreciated.