I am running on linux Ubuntu 22.04.4 LTS
I installed firedrake successfully using the install script here https://www.firedrakeproject.org/download.html
I activated the firedrake virtualenv and tried importing it into a python terminal but got an h5py import error
So I uninstalled it and reinstalled the latest version and import error went away
I installed the latest echemfem code and tried this example but got another error possibly related to H5py
(firedrake) tom@tom:~/code/echemfem/examples$ python simple_flow_battery.py firedrake:WARNING OMP_NUM_THREADS is not set or is set to a value greater than 1, we suggest setting OMP_NUM_THREADS=1 to improve performance Using dimensional Navier-Stokes-Brinkman 0 SNES Function norm 3.719318934070e-09 1 SNES Function norm 2.221647403080e-23 /home/tom/code/firedrake/src/firedrake/firedrake/_deprecation.py:65: UserWarning: The use of
Filefor output is deprecated, please update your code to use
VTKFilefrom
firedrake.output. warn( Traceback (most recent call last): File "simple_flow_battery.py", line 109, in <module> solver = FlowBatterySolver() File "simple_flow_battery.py", line 75, in __init__ super().__init__( File "/home/tom/code/echemfem/echemfem/solver.py", line 383, in __init__ self.set_velocity() File "simple_flow_battery.py", line 105, in set_velocity NSB_solver.solve() File "/home/tom/code/echemfem/echemfem/flow_solver.py", line 109, in solve with CheckpointFile('Velocity_field'+'.h5', 'w') as afile: File "/home/tom/code/firedrake/src/firedrake/firedrake/checkpointing.py", line 538, in __init__ self.set_attr_byte_string("/", "dmplex_storage_version", version) File "/home/tom/code/firedrake/src/firedrake/firedrake/checkpointing.py", line 1692, in set_attr_byte_string grp = self.require_group(path) File "/home/tom/code/firedrake/src/firedrake/firedrake/checkpointing.py", line 1772, in require_group _self = self.h5pyfile File "/home/tom/code/firedrake/src/firedrake/firedrake/checkpointing.py", line 1645, in h5pyfile self._h5pyfile = h5i.get_h5py_file(self.viewer) File "firedrake/cython/hdf5interface.pyx", line 35, in firedrake.cython.hdf5interface.get_h5py_file File "h5py/h5i.pyx", line 33, in h5py.h5i.wrap_identifier File "h5py/h5i.pyx", line 38, in h5py.h5i.wrap_identifier File "h5py/defs.pyx", line 1240, in h5py.defs.H5Iget_type RuntimeError: Unspecified error in H5Iget_type (return value <0)
running another example gives slightly different errors
(firedrake) tom@tom:~/code/echemfem/examples$ python paper_test.py
firedrake:WARNING OMP_NUM_THREADS is not set or is set to a value greater than 1, we suggest setting OMP_NUM_THREADS=1 to improve performance
Eliminating species: C2
Creating function spaces for an extruded mesh
*** WARNING: Using custom solver options
*** ECHEM
Activated flow components
advection order = 1
diffusion order = 1
migration order = 1
electroneutrality order = 1
Species information
> C1
z = 2.0
> C2
z = -2.0
Solver information
variable #dofs
C1 512
C2 512
Potential 512
Total 1536
#ranks 1
#dofs/rank 1536
Writing solutions. This may take a while...
/home/tom/code/firedrake/src/firedrake/firedrake/_deprecation.py:65: UserWarning: The use of `File` for output is deprecated, please update your code to use `VTKFile` from `firedrake.output`.
warn(
/home/tom/code/firedrake/src/FInAT/finat/ufl/elementlist.py:441: UserWarning: Discontinuous Lagrange element requested on quadrilateral * interval, creating DQ element.
warnings.warn("Discontinuous Lagrange element requested on %s, creating DQ element." % cell.cellname())
tsfc:WARNING Estimated quadrature degree 11 more than tenfold greater than any argument/coefficient degree (max (1, 1))
tsfc:WARNING Estimated quadrature degree 11 more than tenfold greater than any argument/coefficient degree (max (1, 1))
cells = 16 L2err = 6.08029E-03 C1err = 3.43798E-03 Uerr = 2.64230E-03
Eliminating species: C2
Creating function spaces for an extruded mesh
*** WARNING: Using custom solver options
*** ECHEM
Activated flow components
advection order = 1
diffusion order = 1
migration order = 1
electroneutrality order = 1
Species information
> C1
z = 2.0
> C2
z = -2.0
Solver information
variable #dofs
C1 4096
C2 4096
Potential 4096
Total 12288
#ranks 1
#dofs/rank 12288
Writing solutions. This may take a while...
/home/tom/code/firedrake/src/firedrake/firedrake/_deprecation.py:65: UserWarning: The use of `File` for output is deprecated, please update your code to use `VTKFile` from `firedrake.output`.
warn(
/home/tom/code/firedrake/src/FInAT/finat/ufl/elementlist.py:441: UserWarning: Discontinuous Lagrange element requested on quadrilateral * interval, creating DQ element.
warnings.warn("Discontinuous Lagrange element requested on %s, creating DQ element." % cell.cellname())
cells = 64 L2err = 1.49294E-03 C1err = 8.63412E-04 Uerr = 6.29528E-04
Eliminating species: C2
Creating function spaces for an extruded mesh
*** WARNING: Using custom solver options
*** ECHEM
Activated flow components
advection order = 1
diffusion order = 1
migration order = 1
electroneutrality order = 1
Species information
> C1
z = 2.0
> C2
z = -2.0
Solver information
variable #dofs
C1 32768
C2 32768
Potential 32768
Total 98304
#ranks 1
#dofs/rank 98304
Writing solutions. This may take a while...
/home/tom/code/firedrake/src/firedrake/firedrake/_deprecation.py:65: UserWarning: The use of `File` for output is deprecated, please update your code to use `VTKFile` from `firedrake.output`.
warn(
/home/tom/code/firedrake/src/FInAT/finat/ufl/elementlist.py:441: UserWarning: Discontinuous Lagrange element requested on quadrilateral * interval, creating DQ element.
warnings.warn("Discontinuous Lagrange element requested on %s, creating DQ element." % cell.cellname())
cells = 256 L2err = 3.79596E-04 C1err = 2.27132E-04 Uerr = 1.52464E-04
Eliminating species: C2
Creating function spaces for an extruded mesh
*** WARNING: Using custom solver options
*** ECHEM
Activated flow components
advection order = 1
diffusion order = 1
migration order = 1
electroneutrality order = 1
Species information
> C1
z = 2.0
> C2
z = -2.0
Solver information
variable #dofs
C1 262144
C2 262144
Potential 262144
Total 786432
#ranks 1
#dofs/rank 786432
Writing solutions. This may take a while...
/home/tom/code/firedrake/src/firedrake/firedrake/_deprecation.py:65: UserWarning: The use of `File` for output is deprecated, please update your code to use `VTKFile` from `firedrake.output`.
warn(
/home/tom/code/firedrake/src/FInAT/finat/ufl/elementlist.py:441: UserWarning: Discontinuous Lagrange element requested on quadrilateral * interval, creating DQ element.
warnings.warn("Discontinuous Lagrange element requested on %s, creating DQ element." % cell.cellname())
cells = 1024 L2err = 1.11179E-04 C1err = 7.37598E-05 Uerr = 3.74192E-05
Eliminating species: C2
Creating function spaces for an extruded mesh
*** WARNING: Using custom solver options
*** ECHEM
Activated flow components
advection order = 1
diffusion order = 1
migration order = 1
electroneutrality order = 1
Species information
> C1
z = 2.0
> C2
z = -2.0
Solver information
variable #dofs
C1 2097152
C2 2097152
Potential 2097152
Total 6291456
#ranks 1
#dofs/rank 6291456
Killed