Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'MDAnalysis.analysis.diffusionmap' parallelization #4745

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

talagayev
Copy link
Member

@talagayev talagayev commented Oct 19, 2024

Fixes #4679 attempt

Changes made in this Pull Request:

  • added backends and aggregators to DistanceMatrix in analysis.diffusionmap
  • added the client_DistanceMatrix in conftest.py
  • added client_DistanceMatrix in run() in test_diffusionmap.py

Here is the Problem:

From what I see currently
self.results.dist_matrix = np.zeros((self.n_frames, self.n_frames))
has the problem, that when it uses parallelization the self.n_frames value gets divided, which leads with the ndarray_sum and ndarray_mean to:

E AssertionError:
E Arrays are not almost equal to 4 decimals
E (shapes (2,), (4,) mismatch)
E ACTUAL: array([1., 1.])
E DESIRED: array([1, 1, 1, 1])

and with the use of ndarray_vstack or ndarray_hstack it leads to the following error:
numpy.linalg.LinAlgError: Last 2 dimensions of the array must be square

so I am not sure if this can be somehow adjusted, I also encountered a similar case also while trying to parallelize analysis.msd

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

Developers certificate of origin


📚 Documentation preview 📚: https://mdanalysis--4745.org.readthedocs.build/en/4745/

added backends and aggregator for DistanceMatrix
added client_DistanceMatrix
added client_DistanceMatrix to tests
@pep8speaks
Copy link

pep8speaks commented Oct 19, 2024

Hello @talagayev! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2024-10-19 23:05:04 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MDAnalysis.analysis.diffusionmap: Implement parallelization or mark as unparallelizable
2 participants