From bfe89ab121fe6f50527ecd71337593b0dc57b30d Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Wed, 15 Nov 2023 17:16:28 -0500 Subject: [PATCH] set default nproc to the number of logical CPUs the current process can use --- mddatasetbuilder/datasetbuilder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mddatasetbuilder/datasetbuilder.py b/mddatasetbuilder/datasetbuilder.py index 65d7c57..5b504f8 100644 --- a/mddatasetbuilder/datasetbuilder.py +++ b/mddatasetbuilder/datasetbuilder.py @@ -125,7 +125,7 @@ def __init__( self.clusteratom = clusteratom if clusteratom else atomname self.atombondtype = [] self.stepinterval = stepinterval - self.nproc = nproc if nproc else cpu_count() + self.nproc = nproc if nproc else len(os.sched_getaffinity(0)) self.cutoff = cutoff self.n_clusters = n_clusters self.n_each = n_each