-
Notifications
You must be signed in to change notification settings - Fork 747
'MDAnalysis.analysis.diffusionmap' parallelization #4745
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
Conversation
|
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-12-19 01:33:22 UTC |
|
hey @talagayev the msd PR seems to pass all the tests (#4896) -- do you think it's something you could use here as well? I skimmed through the code and I think it overcomes your |
Hey @marinegor, Yes I think that could be a solution for that PR as well. I will try to implement it the coming days. Sadly I didn't have much time the last couple of months, so I didn't look into the PR. I would also have a draft for the #4659 that I would have locally currently, that would add parallelization for some part of |
|
Sure, no problem, ping me when you feel necessary!
|
ce62693 to
ab7769f
Compare
added client to conftest
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4745 +/- ##
========================================
Coverage 92.72% 92.72%
========================================
Files 180 180
Lines 22458 22472 +14
Branches 3186 3188 +2
========================================
+ Hits 20824 20837 +13
Misses 1177 1177
- Partials 457 458 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@marinegor I tried now in the last couple of days different approaches and that one is one of the ones that looks working on all pytests. In that option I have to move parts of the code from Also looked if #4892 would help with the global information, but from what I see it would still not have all the complete information, which was in the serial available with that being the reason why there it was used in |
marinegor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@talagayev I think it's ok, it's kinda understandable that anything that isn't trivially parallelizable, is harder to do in parallel😁
I've added a little change -- perhaps it'll be faster with larger cutoffs, since we won't be setting many elements of D. Or it won't, because most of the compute is happening elsewhere.
Anyway, apart from this, LGTM.
Co-authored-by: Egor Marin <[email protected]>
Added note about enabling parallelization for DistanceMatrix in the changelog.
Fixes #4679 attempt
Changes made in this Pull Request:
DistanceMatrixinanalysis.diffusionmapclient_DistanceMatrixinconftest.pyclient_DistanceMatrixinrun()intest_diffusionmap.pyHere 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_framesvalue gets divided, which leads with thendarray_sumandndarray_meanto:E AssertionError:E Arrays are not almost equal to 4 decimalsE (shapes (2,), (4,) mismatch)E ACTUAL: array([1., 1.])E DESIRED: array([1, 1, 1, 1])and with the use of
ndarray_vstackorndarray_hstackit leads to the following error:numpy.linalg.LinAlgError: Last 2 dimensions of the array must be squareso I am not sure if this can be somehow adjusted, I also encountered a similar case also while trying to parallelize
analysis.msdPR Checklist
Developers certificate of origin
📚 Documentation preview 📚: https://mdanalysis--4745.org.readthedocs.build/en/4745/