Skip to content

Commit

Permalink
bug in pool.map
Browse files Browse the repository at this point in the history
Change-Id: Iac637395ea72e4296e1ee5d34256ca9988799180
  • Loading branch information
arnaudon committed Feb 18, 2020
1 parent ba116dd commit ba99578
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diameter_synthesis/build_diameters.py
Expand Up @@ -85,10 +85,10 @@ def build_diameters(morphologies_dict, models_params, config):

# generate diameters in parallel
worker = Worker(model, models_params, config)
pool = multiprocessing.Pool(config["n_cpu"])
if config["n_cpu"]:
if config["n_cpu"] == 1:
mapping = map
else:
pool = multiprocessing.Pool(config["n_cpu"])
mapping = pool.map

list(mapping(worker, neurons))
Expand Down

0 comments on commit ba99578

Please sign in to comment.