Skip to content

Conversation

@drodarie
Copy link
Contributor

@drodarie drodarie commented Jan 14, 2026

Describe the work done

  • During boot, functions loading files may get stuck in parallel as one of the process is throwing an error but the others remain stuck at a MPI.Barrier(). Instead, this PR replaces the barrier with a status collector at the end of these functions to make sure each process is aware if one its fellow process is failing and raises an exception accordingly.
  • Morphologies collected from NeuroMorpho will now be removed from the Scaffold if the NeuroMorphoSelector node is unset (through the __unboot__ function)

List which issues this resolves:

Fix #211, #197, #187

Tasks

  • Added tests

📚 Documentation preview 📚: https://bsb-core--212.org.readthedocs.build/en/212/

@drodarie drodarie requested a review from Helveg January 14, 2026 16:20
@drodarie drodarie self-assigned this Jan 14, 2026
@github-actions github-actions bot added the fix label Jan 14, 2026
@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.57%. Comparing base (3a28863) to head (413a0b4).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #212      +/-   ##
==========================================
+ Coverage   78.67%   85.57%   +6.90%     
==========================================
  Files         196       86     -110     
  Lines       18146    11040    -7106     
  Branches     2138     1312     -826     
==========================================
- Hits        14277     9448    -4829     
+ Misses       3314     1300    -2014     
+ Partials      555      292     -263     

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@drodarie
Copy link
Contributor Author

@Helveg, I know you suggested me to create utility functions in mpi.py that would implement the collect error system but I do feel that it might be difficult to generalize to every use case.

@Helveg
Copy link
Contributor

Helveg commented Jan 14, 2026

ok is there nothing like:

with mpi.all_try():
  try:
    ..
  except Exception as e:
    errr.wrap(e, ...)

that could work in this case? If an error is raised the __exit__ call of the context manager receives the exception, and can allgather/broadcast it, and all nodes can raise it?

Maybe call them try_all and try_main?

Copy link
Contributor

@Helveg Helveg left a comment

Choose a reason for hiding this comment

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

Probably cleaner to use the stdlib decorators

@drodarie drodarie requested a review from Helveg January 15, 2026 11:49
Copy link
Contributor

@Helveg Helveg left a comment

Choose a reason for hiding this comment

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

LGTM, you choose what to do with the finally :)

@drodarie drodarie merged commit 0a46140 into main Jan 19, 2026
25 checks passed
@drodarie drodarie deleted the fix/mpi-barriers branch January 19, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reconstruction get stuck in parallel if file does not exist TestUriSchemes unittest failing randomly MPI Deadlock when removing a scaffold

3 participants