Skip to content

Commit

Permalink
Merge 2567632 into 7b47de2
Browse files Browse the repository at this point in the history
  • Loading branch information
appukuttan-shailesh committed May 30, 2017
2 parents 7b47de2 + 2567632 commit f497b7a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions pyNN/neuron/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ def __set_min_delay(self, val): # can interact with the GUI

def __get_min_delay(self):
if h.min_delay < 0:
return 'auto'
local_minimum_delay = self.parallel_context.set_maxstep(self.default_maxstep)
self.min_delay = local_minimum_delay
return self.min_delay
else:
return h.min_delay
min_delay = property(fset=__set_min_delay, fget=__get_min_delay)
Expand Down Expand Up @@ -240,12 +242,9 @@ def _pre_run(self):
self.tstop = 0
logger.debug("default_maxstep on host #%d = %g" % (self.mpi_rank, self.default_maxstep))
logger.debug("local_minimum_delay on host #%d = %g" % (self.mpi_rank, local_minimum_delay))
if self.min_delay == 'auto':
self.min_delay = local_minimum_delay
else:
if self.num_processes > 1:
assert local_minimum_delay >= self.min_delay, \
"There are connections with delays (%g) shorter than the minimum delay (%g)" % (local_minimum_delay, self.min_delay)
if self.num_processes > 1:
assert local_minimum_delay >= self.min_delay, \
"There are connections with delays (%g) shorter than the minimum delay (%g)" % (local_minimum_delay, self.min_delay)

def _update_current_sources(self):
for source in self.current_sources:
Expand Down

0 comments on commit f497b7a

Please sign in to comment.