bluecellulab 2.6.12__py3-none-any.whl → 2.6.13__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 bluecellulab might be problematic. Click here for more details.
- bluecellulab/simulation/parallel.py +5 -1
- {bluecellulab-2.6.12.dist-info → bluecellulab-2.6.13.dist-info}/METADATA +1 -1
- {bluecellulab-2.6.12.dist-info → bluecellulab-2.6.13.dist-info}/RECORD +7 -7
- {bluecellulab-2.6.12.dist-info → bluecellulab-2.6.13.dist-info}/AUTHORS.txt +0 -0
- {bluecellulab-2.6.12.dist-info → bluecellulab-2.6.13.dist-info}/LICENSE +0 -0
- {bluecellulab-2.6.12.dist-info → bluecellulab-2.6.13.dist-info}/WHEEL +0 -0
- {bluecellulab-2.6.12.dist-info → bluecellulab-2.6.13.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Controlled simulations in parallel."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
+
import multiprocessing
|
|
4
5
|
from multiprocessing.pool import Pool
|
|
5
6
|
from bluecellulab.simulation.neuron_globals import NeuronGlobals
|
|
6
7
|
|
|
@@ -11,7 +12,8 @@ class IsolatedProcess(Pool):
|
|
|
11
12
|
Use this when running isolated NEURON simulations. Running 2 NEURON
|
|
12
13
|
simulations on a single process is to be avoided. Required global
|
|
13
14
|
NEURON simulation parameters will automatically be passed to each
|
|
14
|
-
worker.
|
|
15
|
+
worker. `fork` mode of multiprocessing is used to pass any other
|
|
16
|
+
global NEURON parameters to each worker.
|
|
15
17
|
"""
|
|
16
18
|
|
|
17
19
|
def __init__(self, processes: int | None = 1):
|
|
@@ -21,12 +23,14 @@ class IsolatedProcess(Pool):
|
|
|
21
23
|
processes: The number of processes to use for running the simulations.
|
|
22
24
|
If set to None, then the number returned by os.cpu_count() is used.
|
|
23
25
|
"""
|
|
26
|
+
ctx = multiprocessing.get_context("fork")
|
|
24
27
|
neuron_global_params = NeuronGlobals.get_instance().export_params()
|
|
25
28
|
super().__init__(
|
|
26
29
|
processes=processes,
|
|
27
30
|
initializer=self.init_worker,
|
|
28
31
|
initargs=(neuron_global_params,),
|
|
29
32
|
maxtasksperchild=1,
|
|
33
|
+
context=ctx,
|
|
30
34
|
)
|
|
31
35
|
|
|
32
36
|
@staticmethod
|
|
@@ -54,7 +54,7 @@ bluecellulab/hoc/TStim.hoc,sha256=noBJbM_ZqF6T6MEgBeowNzz21I9QeYZ5brGgUvCSm4k,84
|
|
|
54
54
|
bluecellulab/hoc/fileUtils.hoc,sha256=LSM7BgyjYVqo2DGSOKvg4W8IIusbsL45JVYK0vgwitU,2539
|
|
55
55
|
bluecellulab/simulation/__init__.py,sha256=P2ebt0SFw-08J3ihN-LeRn95HeF79tzA-Q0ReLm32dM,214
|
|
56
56
|
bluecellulab/simulation/neuron_globals.py,sha256=_8xmJPQMfCyhVn6KppK7i3jaUZaALMLgyxyHMKi02yo,4508
|
|
57
|
-
bluecellulab/simulation/parallel.py,sha256=
|
|
57
|
+
bluecellulab/simulation/parallel.py,sha256=oQ_oV2EKr8gP4yF2Dq8q9MiblDyi89_wBgLzQkLV_U0,1514
|
|
58
58
|
bluecellulab/simulation/simulation.py,sha256=I__cZwV_A8I7XSefn6aJDBA_jXCI3E35-pCNCLUsnvo,6206
|
|
59
59
|
bluecellulab/stimulus/__init__.py,sha256=DgIgVaSyR-URf3JZzvO6j-tjCerzvktuK-ep8pjMRPQ,37
|
|
60
60
|
bluecellulab/stimulus/circuit_stimulus_definitions.py,sha256=uij_s44uNdmMwMLGmTHSRgmp9K9B_vvHHshX6YPJNJU,15686
|
|
@@ -62,9 +62,9 @@ bluecellulab/stimulus/factory.py,sha256=hoq5JA69eX4bAdtOJNErhBn_p0uQh8QPoFvCqqeG
|
|
|
62
62
|
bluecellulab/synapse/__init__.py,sha256=RW8XoAMXOvK7OG1nHl_q8jSEKLj9ZN4oWf2nY9HAwuk,192
|
|
63
63
|
bluecellulab/synapse/synapse_factory.py,sha256=MjUorWoMl4lFSBgQw4QS09Dzh0-LYWlCHJKYy8N-d3w,6847
|
|
64
64
|
bluecellulab/synapse/synapse_types.py,sha256=4gne-hve2vq1Lau-LAVPsfLjffVYqAYBW3kCfC7_600,16871
|
|
65
|
-
bluecellulab-2.6.
|
|
66
|
-
bluecellulab-2.6.
|
|
67
|
-
bluecellulab-2.6.
|
|
68
|
-
bluecellulab-2.6.
|
|
69
|
-
bluecellulab-2.6.
|
|
70
|
-
bluecellulab-2.6.
|
|
65
|
+
bluecellulab-2.6.13.dist-info/AUTHORS.txt,sha256=EDs3H-2HXBojbma10psixk3C2rFiOCTIREi2ZAbXYNQ,179
|
|
66
|
+
bluecellulab-2.6.13.dist-info/LICENSE,sha256=xOouu1gC1GGklDxkITlaVl60I9Ab860O-nZsFbWydvU,11749
|
|
67
|
+
bluecellulab-2.6.13.dist-info/METADATA,sha256=pMdxyVSGeRMoo0di8GdJVhrkW_1kd6OTxNOJCbSa8cI,7054
|
|
68
|
+
bluecellulab-2.6.13.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
69
|
+
bluecellulab-2.6.13.dist-info/top_level.txt,sha256=VSyEP8w9l3pXdRkyP_goeMwiNA8KWwitfAqUkveJkdQ,13
|
|
70
|
+
bluecellulab-2.6.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|