I want to determine the number of physical CPU cores to size the number of nodes
for a ProcessPool
accordingly.
from pathos.pools import ProcessPool
process_pool = ProcessPool(nodes=?)
I know that psutil
provides this number as described below.
import psutil
process_pool = ProcessPool(nodes=psutil.cpu_count(logical=False))
However, is there a canonical pathos
-specific way of adjusting the node
parameter?
The usage in pathos
is very similar to psutil
>>> import pathos as pa
>>> pa.helpers.cpu_count()
8
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.