Skip to content
Snippets Groups Projects
Commit c2242850 authored by Kenny Sharma's avatar Kenny Sharma
Browse files

[NRRPLT-5489] Resolve performance issues by using correct timestep.

This patch resolves the distributed simulation performance issues by
ensuring all brain simulation processes are using the correct simulation/
integration timestep. Previously, the main CLE process would advance with
the correct timestep (default 20ms), but each distributed process was
advancing with the simulator timestep (default 0.1ms) - causing significant
overhead and 200x the calls on each remote process.

This patch improves performance to nearly realtime (small overhead for
multiple processes) rather than the prior hundreds of times slower. Further
optimizations can be made in the CLE as we add larger scale brains.

Change-Id: Id3974b31efc24508b3c48b9e7d1e250f44db8be8
parent 86686d41
No related branches found
No related tags found
No related merge requests found
......@@ -94,6 +94,9 @@ class MUSICBrainProcess(object):
self._proxies = xml_factory.create_proxies(music_xml)
# extract the simulation timestep from the BIBI or default to 20 ms
self._timestep = float(self._bibi.timestep) if self._bibi.timestep is not None else 20.0
def run(self):
"""
Blocking run loop for this brain process. First accept any transfer function configuration
......@@ -140,7 +143,7 @@ class MUSICBrainProcess(object):
# run until forcefully terminated
while True:
sim.run(sim.get_time_step())
self._brain_controller.run_step(self._timestep)
def _connect_tf(self, params):
"""
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment