Excitable Cell Simulation In StarP Danilo epanovi Aims
Excitable Cell Simulation In Star-P Danilo Šćepanović
Aims • Do everything in Star-P so that coding time is low. This is important in experimental work because results often point to changes that have to be made in the code, so coding should be quick • Specific Aims 1. 2. 3. 4. Implement an excitable cell model in Matlab Evaluate serial performance on my laptop Evaluate parallel performance for speed and accuracy Summarize recommendations for future May 13, 2009 2
The Model • The model was implemented. It is a system of 29 coupled ordinary differential equations. • Serial simulations show that it is a stiff system. Ode 45 is about 200 times slower than ode 15 s in Matlab, with negligible difference in the solution May 13, 2009 3
Parallel Simulations • I want to run multiple simulations with different initial conditions. • The initial conditions are points from the solution over one period – This gives time-shifted simulations – Allows for high-resolution computation of instantaneous heart rate • Stepwise external current was used to drive the heart rate May 13, 2009 4
Speed • Parallel – Each processor (1, 2, 4, 8 processors) runs 10 simulations • Serial – The processor runs 10, 20, 40, or 80 simulations Serial time increases linearly with # of simulations Parallel time stays constant! May 13, 2009 5
Accuracy • Relative Error: abs(parallel-serial)/mean(abs(serial)): – Mean relative error ~2% – Minimum relative error 0 – Maximum relative error ~100% May 13, 2009 6 Why such a large maximum error?
Accuracy At start of simulation, solutions are identical At end of simulation, solutions have drifted! Solutions are identical for first 700 ms, then they go out of synch. Must be due to processor differences May 13, 2009 7
Summary • Star-P did not have a stiff solver implemented when I began the project, so one was quickly put together for me on the ISC parallel machine Godzuki (thanks to Viral Shah at ISC!) • Long simulations, or large numbers of simulations would crash on the parallel computer – My laptop ran arbitrarily long simulations without a problem. The code is error-free; problem seems to be with ode solver on Godzuki • Coding/debugging in Matlab is easy; debugging errors that occur on the server when running in parallel is hard • This problem distributes nicely, N processors cause N-fold speedup • Different processors yield slightly different solutions; beware of distributed problems on clusters with dissimilar processors • Taking all factors into consideration, the recommendations are: – Jobs taking ~8 hours to run should be done in serial – Jobs taking days should go to a parallel machine to decrease runtime to ~8 hours. Save results often due to possibility of crashes! May 13, 2009 8
- Slides: 8