Skip to content

Commit

Permalink
Merge pull request prody#1750 from jyaacoub/patch-1
Browse files Browse the repository at this point in the history
fix: calcCrossCorr multiprocessing issue prody#1749
  • Loading branch information
jamesmkrieger authored Sep 7, 2023
2 parents dbc712a + c928478 commit 7306070
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prody/dynamics/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,12 @@ def calcCrossCorr(modes, n_cpu=1, norm=True):
import multiprocessing
n_cpu = min(multiprocessing.cpu_count(), n_cpu)
queue = multiprocessing.Queue()
size = n_modes / n_cpu
size = n_modes // n_cpu
for i in range(n_cpu):
if n_cpu - i == 1:
indices = modes.indices[i*size:]
indices = modes.getIndices()[i*size:]
else:
indices = modes.indices[i*size:(i+1)*size]
indices = modes.getIndices()[i*size:(i+1)*size]
process = multiprocessing.Process(
target=_crossCorrelations,
args=(queue, n_atoms, array, variances, indices))
Expand Down

0 comments on commit 7306070

Please sign in to comment.