bsb-nest 4.2.0__tar.gz → 4.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of bsb-nest might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bsb-nest
3
- Version: 4.2.0
3
+ Version: 4.2.1
4
4
  Summary: NEST simulation adapter for the BSB framework.
5
5
  Author-email: Robin De Schepper <robingilbert.deschepper@unipv.it>
6
6
  Description-Content-Type: text/markdown
@@ -9,4 +9,4 @@ from .adapter import NestAdapter
9
9
  from .simulation import NestSimulation
10
10
 
11
11
  __plugin__ = SimulationBackendPlugin(Simulation=NestSimulation, Adapter=NestAdapter)
12
- __version__ = "4.2.0"
12
+ __version__ = "4.2.1"
@@ -69,6 +69,8 @@ class NestConnection(compose_nodes(NestConnectionSettings, ConnectionModel)):
69
69
  pre_nodes, post_nodes, cs
70
70
  ):
71
71
  MPI.barrier()
72
+ if len(pre_locs) == 0 or len(post_locs) == 0:
73
+ continue
72
74
  cell_pairs, multiplicity = np.unique(
73
75
  np.column_stack((pre_locs[:, 0], post_locs[:, 0])),
74
76
  return_counts=True,
@@ -95,7 +97,8 @@ class NestConnection(compose_nodes(NestConnectionSettings, ConnectionModel)):
95
97
  predicted_all_mem = (
96
98
  len(pre_nodes) * 8 * 2 + len(post_nodes) * 8 * 2 + len(cs) * 6 * 8 * (16 + 2)
97
99
  ) * MPI.get_size()
98
- predicted_local_mem = predicted_all_mem / len(cs.get_local_chunks("out"))
100
+ n_chunks = len(cs.get_local_chunks("out"))
101
+ predicted_local_mem = (predicted_all_mem / n_chunks) if n_chunks > 0 else 0.0
99
102
  if predicted_local_mem > avmem / 2:
100
103
  # Iterate block-by-block
101
104
  return self.block_iterator(cs)
@@ -46,7 +46,7 @@ profile = "black"
46
46
  known_third_party = ["nest"]
47
47
 
48
48
  [tool.bumpversion]
49
- current_version = "4.2.0"
49
+ current_version = "4.2.1"
50
50
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
51
51
  serialize = ["{major}.{minor}.{patch}"]
52
52
  search = "{current_version}"
File without changes
File without changes
File without changes
File without changes
File without changes