From: Hugo C. <hug...@gm...> - 2014-05-01 09:14:27
|
Hi Dave, Upi and others, As Dave says, using hsolve comes with a significant performance improvement for event processing. I analysed the performance of event processing in Genesis-2 in depth a long time ago, but, really, cannot remember all the details. There are two elements that may be important: If I remember well the speedup of event processing with hsolve comes mostly from avoiding pointer indirections of the Genesis-2 action handling system in the Genesis-2 core. The implementation of Genesis-2 actions is similar to the implementation of C++ method invocation. So my guess is that Moose may benefit from similar optimizations. Although I want to be careful with such statements, because I don't know that much about Moose internals, and, also, CPUs use speculative execution techniques to optimize for C++ method invocation. The second element is the choice of data structure for event queuing. The event queue can either be centralized, which is the approach taken by most of the papers in discrete event simulation, or it can be distributed, which is what Genesis-2 does. >From memory of an in-depth analysis and benchmarking at the time, I can say, without remembering the details, that none of these two alternatives had significant advantages over the other. Even given that the literature of discrete event simulation mentions splay trees and calendar queues as optimal, I believe, this is not what I found for neural simulations. This may be due to the highly dynamical temporal structure of the event queue during a simulation. I hope this helps. Hugo On Thu, May 1, 2014 at 1:25 AM, Dave Beeman <db...@co...> wrote: > Hi Upi and other MOOSE developers, > > I will do my best to answer your questio of how GENESIS 2 hsolve > deals with spike delivery, but you will get a better answer from Hugo > Cornelis, who I have copied on this email.the > > Hugo wrote a detailed tutorial document on hsolve back in 2002 for the GUM > meeting. > > http://genesis-sim.org/GENESIS/UGTD/Tutorials/advanced-tutorials/hsolve- > cornelis/index.html > > The section on Synchan - hsolve coordination tells something of how it > works. It was only about two years ago that I got around to reading > the section on networks of cells that I tried using hsolve on my network > models. None of all the large GENESIS network models that I have seen use > hsolve, except in chanmode 0 or 1. > > I did not expect a significant speed improvement when I used hsolve > chanmode 4 with my cortical model of 9-compartment cells. The speedup > for the Purkinje cell model is only a factor of 4. I was amazed when > my simulations ran 10 to 12 times faster. Recently I reimplemented > the network benchmark that was used in the Brette et al 2007 paper > using hsolve. The cells are single compartment with only Na and K > channels, and the simulation ran 20 times faster. > > You can see an example of how hsolve is used in my auditory cortex model at > http://genesis-sim.org/GENESIS/ACnet2-GENESIS/ > > Evidently, when hsolve deals with the interactions between spiegens and > synchans it bypasses the overhead of the messaging, and that this overhead > is very large. I think it is important that MOOSE implement communication > in an efficient way to avoid this kind of speed penalty, whether it is done > within the hsolve implementation or with a separate solver. > > From my point of view as a modeler, the biggest limitation of GENESIS 2, > other than its lack of a Python interface, is the difficulty of using > hsolve for the non-expert, and the limitation on which objects can > be used with hsolve. If MOOSE can overcome these problems and give > speed equivalent to GENESIS 2, I would be happy to try my models > on MOOSE when it is ready enough to make the conversion simple. > > Dave > > > > On Wed, 30 Apr 2014, U.S.Bhalla wrote: > > Dear Dave, >> Perhaps you could remind me what the optimizations were that the >> Hsolve did for spike delivery in GENESIS. Was it simply that when the >> spike event occurred, it directly went and called the spike delivery >> methods of the target synapses, which were themselves under Hsolve? >> >> In any event, the current MOOSE implementation uses regular messaging to >> handle spike events. There is some optimization of messaging for >> multinode models, but we haven't yet looked at putting the entire >> network under a solver. First step would be to ask how much time is >> actually spent delivering the spikes. Then it would be interesting to >> compare with an equivalent model. Any suggestions? >> >> Best, >> Upi >> >> On Wednesday 30 April 2014 01:34 AM, Dave Beeman wrote: >> >>> I will be very interested in trying out the MOOSE Python implemention >>> of hsolved when it is fully ready. >>> >>> In GENESIS 2, hsolve performs both the functions of a Hines method >>> compartmental solver, and of a Discrete Event Solver for the efficient >>> delivery of spike messages. Ideally, these should be in separate >>> solvers, >>> as they are in GENESIS 3 (unfortunately still under development). >>> >>> How is this being handled in MOOSE? Can networks of hsolved cells >>> in MOOSE benefit from equivalent optimizations in spike delivery that >>> GENESIS hsolve gives? Or is a separate mechanism used for spike >>> delivery? >>> >>> On Tue, 29 Apr 2014, Dilawar Singh wrote: >>> >>> Hi Saeed, >>>> >>>> We are in process of integrating 'hsolve' into async13 branch. >>>> Only today, I >>>> got some sanity check of hsolve working. I am not sure how long it >>>> will take >>>> to get hsolve properly integrated with python. >>>> >>>> For time being -- if you want to use async13 branch -- you can >>>> change the >>>> solver to 'ee' from 'hsolve'. >>>> >>>> I'll let you know as soon as hsolve is ready. >>>> >>>> Dilawar >>>> >>> ------------------------------------------------------------ >>> ------------------ >>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >>> Instantly run your Selenium tests across 300+ browser/OS combos. Get >>> unparalleled scalability from the best Selenium testing platform >>> available. >>> Simple to use. Nothing to install. Get started now for free." >>> http://p.sf.net/sfu/SauceLabs >>> _______________________________________________ >>> moose-devel mailing list >>> moo...@li... >>> https://lists.sourceforge.net/lists/listinfo/moose-devel >>> >> >> >> ------------------------------------------------------------ >> ------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. Get >> unparalleled scalability from the best Selenium testing platform >> available. >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> _______________________________________________ >> moose-devel mailing list >> moo...@li... >> https://lists.sourceforge.net/lists/listinfo/moose-devel >> >> -- Hugo -- Hugo Cornelis Ph.D. GENESIS-3 -- lead architect http://www.genesis-sim.org/ Neurospaces Project Architect http://www.neurospaces.org/ |