2

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?

p4dn24x
  • 445
  • 4
  • 14

1 Answers1

2

The usage in pathos is very similar to psutil

>>> import pathos as pa             
>>> pa.helpers.cpu_count()
8
Mike McKerns
  • 33,715
  • 8
  • 119
  • 139