Skip to content

Commit

Permalink
reduced default number of cpus to 3
Browse files Browse the repository at this point in the history
  • Loading branch information
fzeiser committed Jan 16, 2020
1 parent ba8971a commit e9f5895
Show file tree
Hide file tree
Showing 3 changed files with 362 additions and 362 deletions.
714 changes: 357 additions & 357 deletions notebooks/getting_started.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions ompy/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class Ensemble:
action_firstgen (Action[Matrix]): An arbitrary action to apply to each
generated firstgen matrix. Defaults to NOP.
nprocesses (int): Number of processes for multiprocessing.
Defaults to number of available cpus.
Defaults to number of available cpus-1 (with mimimum 1).
seed (int): Random seed for reproducibility of results
Expand Down Expand Up @@ -144,7 +144,7 @@ def __init__(self, raw: Optional[Matrix] = None,
self.firstgen_ensemble: Optional[Matrix] = None

self.seed: int = 987654
self.nprocesses: int = cpu_count()
self.nprocesses: int = cpu_count()-1 if cpu_count() > 1 else 1

if path is not None:
self.path = Path(path)
Expand Down
6 changes: 3 additions & 3 deletions ompy/ensembleNormalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class EnsembleNormalizer:
normalizer_gsf (NormalizerGSF): NormalizerGSF instance
normalizer_simultan (NormalizerSimultan): NormalizerSimultan instance
res (List[ResultsNormalized]): List of the results
nprocesses (int, optional): Number of processes for multiprocessing.
Defaults to number of available cpus.
nprocesses (int): Number of processes for multiprocessing.
Defaults to number of available cpus-1 (with mimimum 1).
"""

def __init__(self, *, extractor: Extractor,
Expand All @@ -79,7 +79,7 @@ def __init__(self, *, extractor: Extractor,

self.normalizer_simultan = normalizer_simultan

self.nprocesses: int = cpu_count()
self.nprocesses: int = cpu_count()-1 if cpu_count() > 1 else 1

self.res: Optional[List[ResultsNormalized]] = None

Expand Down

0 comments on commit e9f5895

Please sign in to comment.