|
1 | 1 | import itertools
|
2 | 2 | import os
|
3 | 3 | import sys
|
| 4 | +import time |
4 | 5 | import typing
|
5 | 6 |
|
6 | 7 | import numpy as np
|
@@ -201,8 +202,6 @@ def _bootstrap(self, config, storage, clear=False):
|
201 | 202 | # Then, `storage` is initialized for the scaffold, and `config` is stored (happens
|
202 | 203 | # inside the `storage` property).
|
203 | 204 | self.storage = storage
|
204 |
| - # Synchronize the JobPool static variable so that each core use the same ids. |
205 |
| - JobPool._next_pool_id = self._comm.bcast(JobPool._next_pool_id, root=0) |
206 | 205 |
|
207 | 206 | storage_cfg = _config_property("storage")
|
208 | 207 | for attr in _cfg_props:
|
@@ -388,8 +387,7 @@ def compile(
|
388 | 387 | report("Clearing data", level=2)
|
389 | 388 | # Clear the placement and connectivity data, but leave any cached files
|
390 | 389 | # and morphologies intact.
|
391 |
| - self.clear_placement() |
392 |
| - self.clear_connectivity() |
| 390 | + self.clear() |
393 | 391 | elif redo:
|
394 | 392 | # In order to properly redo things, we clear some placement and connection
|
395 | 393 | # data, but since multiple placement/connection strategies can contribute
|
@@ -791,8 +789,9 @@ def _load_cs_types(
|
791 | 789 | return cs
|
792 | 790 |
|
793 | 791 | def create_job_pool(self, fail_fast=None, quiet=False):
|
| 792 | + id_pool = self._comm.bcast(int(time.time()), root=0) |
794 | 793 | pool = JobPool(
|
795 |
| - self, fail_fast=fail_fast, workflow=getattr(self, "_workflow", None) |
| 794 | + id_pool, self, fail_fast=fail_fast, workflow=getattr(self, "_workflow", None) |
796 | 795 | )
|
797 | 796 | try:
|
798 | 797 | # Check whether stdout is a TTY, and that it is larger than 0x0
|
|
0 commit comments