Elastodynamics demo fails

Dear community,

trying to run demo_elastodynamics.py (which comes with the installation: /usr/share/dolfin/demo-python/documented/elastodynamics/) gives strange random results. Sometimes the kinetic and potential energies “explode” in the first time step (7.318699153413286e+234, 8.516601675325916e+236) and sometimes I obtain

*** Error:   Unable to solve linear system using PETSc Krylov solver.
*** Reason:  Solution failed to converge in 0 iterations (PETSc reason DIVERGED_PC_FAILED, residual norm ||r|| = 0.000000e+00).
*** Where:   This error was encountered inside PETScKrylovSolver.cpp.
*** Process: 0
*** 
*** DOLFIN version: 2019.2.0.dev0
*** Git changeset:  unknown

I use the latest fenics version (2019.2.0.5~ppa1~focal1) according to apt, and expected this demo to run “out of the box”. Do you have an idea where this problem comes from and how to fix it?

I tried to reproduce your issues using docker:

docker run -it  --rm  ubuntu:20.04
apt-get update
apt-get install  -y sudo
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get install fenics
cd /usr/share/dolfin/demo-python/documented/elastodynamics/
python3 demo_elastodynamics.py
python3 demo_elastodynamics.py
python3 demo_elastodynamics.py
python3 demo_elastodynamics.py
dpkg -s fenics:amd64 | grep Version

Returning

Version: 1:2019.2.0.5~ppa1~focal1

and no Errors.
Are there any of the operations above that differs from how you installed dolfin from apt?

1 Like

Thank you, using docker everythings seems to work well. I miss the plots (no problem), but the values of u_tip and energies are reasonable.
The last command differs slightly Version: 1:2019.1.0.3
Still, I wonder what goes wrong on my physical system (non-docker), likely there is mismatch with my libs/versions.

For information, the troublemaker seems to be intel-mkl.