From 2225651f7e86e28ef93b3892e93eb3ab99c9c68c Mon Sep 17 00:00:00 2001 From: Lucas Date: Mon, 18 Jun 2018 10:12:27 +0100 Subject: [PATCH 1/2] Temporary fix for MPI bug in Projection.get This is a rather subtle bug. The problem is that if gather is not 'all', on line 352 the method tries to address the array which is empty on nodes with rank != 0. Another solution would be to put that statement inside the preceding if-block and merge that if block with the enclosing one, so an empty 'values' is returned on nodes with rank != 0. --- pyNN/common/projections.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyNN/common/projections.py b/pyNN/common/projections.py index d3f578882..6c04e7038 100644 --- a/pyNN/common/projections.py +++ b/pyNN/common/projections.py @@ -255,7 +255,7 @@ def randomizeSynapseDynamics(self, parameter_name, rand_distr): # --- Methods for writing/reading information to/from file. --------------- - def get(self, attribute_names, format, gather=True, with_address=True, + def get(self, attribute_names, format, gather='all', with_address=True, multiple_synapses='sum'): """ Get the values of a given attribute (weight or delay) for all From 8c979efe4885292b801d26095061a8712044a58c Mon Sep 17 00:00:00 2001 From: Lucas Koelman Date: Thu, 8 Nov 2018 11:17:47 +0000 Subject: [PATCH 2/2] Bugfix: past spikes were not cleared in NEURON VectorSpikeSource --- pyNN/neuron/cells.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyNN/neuron/cells.py b/pyNN/neuron/cells.py index cc2d55ed5..118fb92ed 100644 --- a/pyNN/neuron/cells.py +++ b/pyNN/neuron/cells.py @@ -607,5 +607,5 @@ def clear_past_spikes(self): end = self._spike_times.indwhere(">", h.t) if end > 0: self._spike_times.remove(0, end - 1) # range is inclusive - - + else: + self._spike_times.resize(0)