Page 1 of 1

Slow speed to save sim results

Posted: Sat Apr 21, 2018 10:32 am
by bremen
Hi Salvador.

I'm saving the voltage traces of about 200 neurons, into a mat file, and the time to save them can be up to 3 time the total run time of the simulation. The file is saved at the same rate (about 2-3MB/s) on clusters and on workstations with SSD drives, and it is independent on the number of cores used to do the simulation. Is it normal?

I have seen on GitHub that you planned to implement a new parallel way to save the results. Is it something that will taken a lot of time to finish?
https://github.com/Neurosim-lab/netpyne/issues/291

Best
Stefano

Re: Slow speed to save sim results

Posted: Tue Apr 24, 2018 12:53 pm
by salvadord
Hi Stefano,

Sorry to hear the saving is taking so long. The independence of num of cores is normal, since data is gathered on the master node and then saved. The similar speed with SSD drives might indicate that what's taking longer could be the internal conversion to Matlab format (prior to saving to file).

Things you can try:
- saving to pkl or json and see if that's faster (cfg.savePickle and cfg.saveJson)
- if you only need the traces, you can reduce the save time by setting cfg.saveDataInclude = ['simData']
- reduce the gather time by setting self.gatherOnlySimData = True
- increase the cfg.recordStep value so less total data (depends on the resolution you need)

I'm hoping to get saving to HDF5 format (faster) and saving in parallel (distributed in each node) implemented soon, but will probably take a few months still.

Hope this helps, let me know if you have other questions.
Thanks
Salva

Re: Slow speed to save sim results

Posted: Sat Apr 28, 2018 3:15 pm
by bremen
Hi Salva.
- if you only need the traces, you can reduce the save time by setting cfg.saveDataInclude = ['simData']
With this option and saveMat, the saving time was reduced over 100 times. From minutes/hours to a few seconds.
It is great.

Thank you

Best
Stefano