hbp_nrp_distributed_nest.cle.DistributedPyNNControlAdapter module

This module defined a CLE control adapter that notifies all remote brain processes when they should step the simulation.

class DistributedPyNNControlAdapter(sim)[source]

Bases: hbp_nrp_cle.brainsim.pynn.PyNNControlAdapter.PyNNControlAdapter

This class is required as multi-threading the brain process to receive MPI messages while blocking to step the brain causes segmentation faults in the CLE. The overhead is minimal here and allows us to have dynamic behavior in the brain processes between simulation steps.

load_brain(network_file, populations)[source]

Notify all remote brain processes to load the brain with population definitions specified.

TODO: the network_file will have to be accessed from common storage between

processes for any configuration other than local installataions

Parameters
  • network_file – The path to the python file containing the network

  • populations – A named list of populations to create

run_step(dt)[source]

Notify all remote brain processes to run a simulation step, then run the step in this process.