Skip to content

Commit 79dfda7

Browse files
committed
perf(maxBoxLenCPU): modified formula for nested parallelisation
1 parent a3cfcf2 commit 79dfda7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/sphractal/surfExact.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,13 @@ def exactBoxCnts(atomsEle, atomsRad, atomsSurfIdxs, atomsXYZ, atomsNeighIdxs,
243243
numCPUs = len(sched_getaffinity(0))
244244
# Resource allocations for parallelisation (current settings are based on empirical experiments -- optimised for the default minMaxBoxLens range), rooms available for further optimisation
245245
minAtomCPUperLen = max(1, len(atomsIdxs) // 25)
246-
maxBoxLenCPU = ceil(numBoxLen / 2)
246+
maxBoxLenCPU = ceil(numBoxLen / numBoxLen) # ceil(numBoxLen / 2)
247247
if numCPUs > maxBoxLenCPU * minAtomCPUperLen:
248248
atomConcMaxCPU = numCPUs // maxBoxLenCPU
249249
boxLenConcMaxCPU = maxBoxLenCPU
250-
elif numCPUs > minAtomCPUperLen:
251-
atomConcMaxCPU = minAtomCPUperLen
252-
boxLenConcMaxCPU = numCPUs // minAtomCPUperLen
250+
# elif numCPUs > minAtomCPUperLen:
251+
# atomConcMaxCPU = minAtomCPUperLen
252+
# boxLenConcMaxCPU = numCPUs // minAtomCPUperLen
253253
else:
254254
atomConcMaxCPU, boxLenConcMaxCPU = numCPUs, 1
255255

0 commit comments

Comments
 (0)