Commit c3d6ce03 authored by Martin Larralde's avatar Martin Larralde
Browse files

Use `os.cpu_count` instead of `multiprocessing.cpu_count` in `pyhmmer.hmmer`

parent 2d60f6e6
......@@ -493,7 +493,7 @@ def hmmsearch(
"""
# count the number of CPUs to use
_cpus = cpus if cpus > 0 else psutil.cpu_count(logical=False) or multiprocessing.cpu_count()
_cpus = cpus if cpus > 0 else psutil.cpu_count(logical=False) or os.cpu_count()
runner: _ModelSearch[_M] = _ModelSearch(queries, sequences, _cpus, callback, **options) # type: ignore
return runner.run()
......@@ -541,7 +541,7 @@ def phmmer(
Allow using `DigitalMSA` queries.
"""
_cpus = cpus if cpus > 0 else psutil.cpu_count(logical=False) or multiprocessing.cpu_count()
_cpus = cpus if cpus > 0 else psutil.cpu_count(logical=False) or os.cpu_count()
_builder = Builder(Alphabet.amino()) if builder is None else builder
try:
......@@ -626,7 +626,7 @@ def nhmmer(
Allow using `Profile` and `OptimizedProfile` queries.
"""
_cpus = cpus if cpus > 0 else psutil.cpu_count(logical=False) or multiprocessing.cpu_count()
_cpus = cpus if cpus > 0 else psutil.cpu_count(logical=False) or os.cpu_count()
_builder = Builder(Alphabet.dna()) if builder is None else builder
try:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment