bsb-nest 4.2.0__py2.py3-none-any.whl → 4.2.1__py2.py3-none-any.whl

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.

bsb_nest/__init__.py CHANGED
@@ -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"
bsb_nest/connection.py CHANGED
@@ -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)
@@ -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
@@ -1,7 +1,7 @@
1
- bsb_nest/__init__.py,sha256=grUmjvzx_g4wMo7kIS9rlkroLTMN6hRuXm0u5QHs7B4,311
1
+ bsb_nest/__init__.py,sha256=IL-VNOohSjl__4e5bfduv46iMjfLhZqT6G9xJdsfTHA,311
2
2
  bsb_nest/adapter.py,sha256=uwFdicGOx7mRyYlfRY89zw7re0dnv9qumli1llJ0Rok,6668
3
3
  bsb_nest/cell.py,sha256=AauERRJd5OkKVSIxbx6LO2D9L7LDA6iMFfYjxu59e4c,960
4
- bsb_nest/connection.py,sha256=SkZQt3REBaiWjJf4eMo1bKVgrBs1eq1mfvaoid_PnjE,5425
4
+ bsb_nest/connection.py,sha256=KFMXRvSR-tN7E52Mpo7dgWjXVQQSOd1VdryRPx-NfHQ,5571
5
5
  bsb_nest/device.py,sha256=w6jeGSOzqd8iTtw6HxsWS0TuYTxf6iO9eqAseaFC3W8,2615
6
6
  bsb_nest/distributions.py,sha256=qAYaHJkMwaCfbTh_efoJT1hMoDHWsfQo_3SNLoD8WeA,1950
7
7
  bsb_nest/exceptions.py,sha256=NX4oiGWIshrLG1DCak_nTfI8cQI7GTdewR71qNzsXGM,264
@@ -11,8 +11,8 @@ bsb_nest/devices/dc_generator.py,sha256=g-jRZorCl2yYhr5bx2I00ZlxYrblDcqVbtk0XYZz
11
11
  bsb_nest/devices/multimeter.py,sha256=dLBDNCJuFIgxOZ0ssEoir7d65EW7ORS1jFNsvmU2wJ0,1811
12
12
  bsb_nest/devices/poisson_generator.py,sha256=SGo4jhq_rbIoB38OM5FTTYlyShxGAwWqCqAncWVB3qg,1465
13
13
  bsb_nest/devices/spike_recorder.py,sha256=vJ9FQqmrcF0HdLl5Jy_bt_ABCUIgF-PLVI23E76JkhY,894
14
- bsb_nest-4.2.0.dist-info/entry_points.txt,sha256=uJlX9h2VeYfAumav18IM2PTJ3FssfwDUnUmfSFdR2SA,41
15
- bsb_nest-4.2.0.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
16
- bsb_nest-4.2.0.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
17
- bsb_nest-4.2.0.dist-info/METADATA,sha256=O2RU36NPHHLWNNKLpDp3RE9u20MCd69qMlwZCoijkU4,1602
18
- bsb_nest-4.2.0.dist-info/RECORD,,
14
+ bsb_nest-4.2.1.dist-info/entry_points.txt,sha256=uJlX9h2VeYfAumav18IM2PTJ3FssfwDUnUmfSFdR2SA,41
15
+ bsb_nest-4.2.1.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
16
+ bsb_nest-4.2.1.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
17
+ bsb_nest-4.2.1.dist-info/METADATA,sha256=gm8BOcXCq1xdqi6oFDS3bUynPxa4BdvNaq_tiN0qnvk,1602
18
+ bsb_nest-4.2.1.dist-info/RECORD,,