`import dolfinx` crashes after interrupting run

Hi everyone,

I have a problem with dolfinx on Ubuntu. I interrupted a python run while the script was using a matrix generated by dolfinx. Now if I try to run in python import dolfinx the code keeps running forever without importing the module. I had the same issue yesterday, and it got solved after a night (without me doing anything).

Do you have any guess of what could be the problem, and how I can solve it?

Best,
Ivan

It’s very hard for anyone to take a guess of what could be wrong. At the very least, can you post the stack trace you obtain when interrupting a python session with import dolfinx?

In addition to the suggestions in the previous post, have you ensured that the process has been properly killed after interuption?

@francesco-ballarin : Unfortunately, I am not even able to interrupt the session with import dolfinx, I need to manually kill it

@dokken : Thanks! Indeed, that was the problem: the process were not killed after interruption, even though I cannot understand why. Anyway, why does it create a problem when importing dolfinx?

That i am not sure of, could be some lingering MPI or PETSc initialization that hasnt been finalized I guess