BlueBrain / neurodamus

A BBP Simulation Control application for NEURON
https://neurodamus.readthedocs.io
Apache License 2.0
8 stars 7 forks source link

Avoid calling cleanup from destructor #168

Closed ferdonline closed 4 months ago

ferdonline commented 4 months ago

Context

Neurodamus used to ensure cleanup was called by calling it from the destructor of the Neurodamus class.

However, depending on the python version, this could lead to crashes as some objects from Node eventually were already destroyed.

To workaround this problem, at some point we introduced the cleanup_atexit parameter which would skip over this procedure, and notably multiscale_run was using it. However this was not a solution as cleanup was not being called.

Scope

This PR fixes this long standing issue. Cleanup is now called directly from the top-level run() function. It can still be avoided if the user really wants to keep the data, with the parameter cleanup=False

Testing

CI is happy.

Review

bbpbuildbot commented 4 months ago

Logfiles from GitLab pipeline #210066 (:no_entry:) have been uploaded here!

Status and direct links:

bbpbuildbot commented 4 months ago

Logfiles from GitLab pipeline #210217 (:white_check_mark:) have been uploaded here!

Status and direct links:

WeinaJi commented 4 months ago

Shall we merge this PR ?

jorblancoa commented 4 months ago

Shall we merge this PR ?

Looks good to me!

bbpbuildbot commented 4 months ago

Logfiles from GitLab pipeline #210687 (:no_entry:) have been uploaded here!

Status and direct links:

bbpbuildbot commented 4 months ago

Logfiles from GitLab pipeline #211209 (:no_entry:) have been uploaded here!

Status and direct links:

ferdonline commented 4 months ago

Tests just failed because pytest-forked depends on py.process which went away. https://github.com/pytest-dev/pytest-forked/issues/88

bbpbuildbot commented 4 months ago

Logfiles from GitLab pipeline #211236 (:no_entry:) have been uploaded here!

Status and direct links:

bbpbuildbot commented 4 months ago

Logfiles from GitLab pipeline #211301 (:no_entry:) have been uploaded here!

Status and direct links:

bbpbuildbot commented 4 months ago

Logfiles from GitLab pipeline #211306 (:no_entry:) have been uploaded here!

Status and direct links:

bbpbuildbot commented 4 months ago

Logfiles from GitLab pipeline #211316 (:no_entry:) have been uploaded here!

Status and direct links:

bbpbuildbot commented 4 months ago

Logfiles from GitLab pipeline #211323 (:no_entry:) have been uploaded here!

Status and direct links:

bbpbuildbot commented 4 months ago

Logfiles from GitLab pipeline #211300 (:no_entry:) have been uploaded here!

Status and direct links:

bbpbuildbot commented 4 months ago

Logfiles from GitLab pipeline #211333 (:no_entry:) have been uploaded here!

Status and direct links:

bbpbuildbot commented 4 months ago

Logfiles from GitLab pipeline #211543 (:no_entry:) have been uploaded here!

Status and direct links: