Skip to content

Fix: #5494: Incorrect reduction in multiprocessing eigenvectors - #5495

Merged
BradyAJohnston merged 8 commits into
MDAnalysis:developfrom
BradyAJohnston:fix-gnm-parallel-eigenvectors
Oct 17, 2026
Merged

BradyAJohnston merged 8 commits into
MDAnalysis:developfrom
BradyAJohnston:fix-gnm-parallel-eigenvectors

Conversation

@BradyAJohnston

Copy link
Copy Markdown
Member

Fixes #5494

Previously the results.eigenvectors were being reduced from multiple workers with np.hstack. This meant that the results from multiple time frames were being incorrectly reduced horizontally instead of stacked verically for multiple frames per worker. This was silently happening if the number of frames was evenly split between workers, but failed if the split was uneven and the frames were unable to be horizontally aggregated because of the different number of rows in their returned results.

Changes made in this Pull Request:
Change the aggregator to properly use np.vstack instead of np.hstack.

LLM / AI generated code disclosure

LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: no

PR Checklist

  • Issue raised/referenced?
  • Tests updated/added?
  • Documentation updated/added?
  • package/CHANGELOG file updated?
  • Is your name in package/AUTHORS? (If it is not, add it!)
  • I have read and understand the current AI Policy
  • LLM/AI disclosure was updated.

Developers Certificate of Origin

I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.

@BradyAJohnston BradyAJohnston changed the title Fix gnm parallel eigenvectors Fix: #5494: Incorrect reduction in multiprocessing eigenvectors Oct 16, 2026
@BradyAJohnston BradyAJohnston added this to the 2.11 milestone Oct 16, 2026
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.88%. Comparing base (4f6d54a) to head (79fd39d).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5495      +/-   ##
===========================================
+ Coverage    93.87%   93.88%   +0.01%     
===========================================
  Files          184      184              
  Lines        22645    22640       -5     
  Branches      3220     3217       -3     
===========================================
- Hits         21257    21256       -1     
+ Misses         923      920       -3     
+ Partials       465      464       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@orbeckst orbeckst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a CHANGELOG entry for a fix, please. Note that this produced wrong output silently.

Comment thread package/MDAnalysis/analysis/gnm.py Outdated
@BradyAJohnston
BradyAJohnston merged commit 94b4461 into MDAnalysis:develop Oct 17, 2026
25 checks passed
@BradyAJohnston
BradyAJohnston deleted the fix-gnm-parallel-eigenvectors branch October 17, 2026 07:36
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.

GNMAnalysis aggregator using wrong numpy stacking

2 participants