How to run the demos in pulse-adjoint?

5 months ago by
Hello Everybody,

I have downloaded and installed the pulse- adjoint from

When I run the demo in the demo directory, I get the following error message:

/usr/local/lib/python2.7/dist-packages/h5py-2.7.1-py2.7-linux-x86_64.egg/h5py/ FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
/usr/local/lib/python2.7/dist-packages/h5py-2.7.1-py2.7-linux-x86_64.egg/h5py/ UserWarning: h5py is running against HDF5 1.8.16 when it was built against 1.8.18, this may cause problems

Load mesh from h5
Traceback (most recent call last):
File "", line 23, in <module>
patient = LVTestPatient()
File "/usr/local/lib/python2.7/dist-packages/pulse_adjoint-1.0-py2.7.egg/pulse_adjoint/patient_data/", line 300, in __init__
TestPatient.__init__(self, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pulse_adjoint-1.0-py2.7.egg/pulse_adjoint/patient_data/", line 279, in __init__
File "/usr/local/lib/python2.7/dist-packages/pulse_adjoint-1.0-py2.7.egg/pulse_adjoint/patient_data/", line 236, in _load_geometry
File "/usr/local/lib/python2.7/dist-packages/pulse_adjoint-1.0-py2.7.egg/pulse_adjoint/patient_data/", line 104, in load_geometry
File "/usr/local/lib/python2.7/dist-packages/mesh_generation/", line 354, in load_geometry_from_h5, mgroup, True)
File "/usr/local/lib/python2.7/dist-packages/fenics_adjoint/types/", line 14, in HDF5File_read
AttributeError: 'Mesh' object has no attribute 'create_block_variable'
Aborted (core dumped)

I was wondering how this issue should be solved.
Can this be related to the version of Dolfin-adjoint and FEniCS installed on my computer? The FEniCS on my computer is 2017.2.0, and the dolfin-adjoint is installed from
which seems to be a 2017.2 version. If the version should be changed, please let me know how I can download and install other versions.

Community: FEniCS Project

2 Answers

7 weeks ago by
Hi Sara,
I am sorry for all the messy hdf5 dependencies.
I have now created a new repo called pulse (
which is a pure mechanics solver and which is probably more suited your needs.
This should also work with fenics 2017 version.
5 months ago by
I have faced similar issues when i tried to run cbc beat. Most issues are caused due to dolfin-adjoint version and fenics versions. You can try following version of dolfin adjoint:- (any one out of these should work for win 7 download through docker)

docker run -ti -v $(pwd):/home/fenics/shared stable
docker run -ti -v $(pwd):/home/fenics/shared

Pulse adjoint repo mentions fenics version 2016 and dolfin adjoint 2016. These demos are sensitive to versions of fenics and dolfin adjoint etc. You have to make sure that you install the correct version. If everything fails... mail the author at ...he is very helping and would definitely suggest a better way out.

Best regards
Hi Ovais,

Thank you very much for your reply. I am using these codes on a Linux system, and installed everything directly without using docker. I was wondering if you know how I can access and install the older versions of FEniCS and dolfin-adjoint without using the docker.

written 5 months ago by Sara  
this post may help you....
written 5 months ago by Ovais  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »