[firedrake] Dumbcheckpointing

Floriane Gidel [RPG] mmfg at leeds.ac.uk
Fri Nov 10 19:04:12 GMT 2017


Dear all,

I saved a function h using DumbCheckpoint through:
res = 0.1

Nx = int(Lx/res) + 1

Ny = int(Ly/res) + 1


hor_mesh = RectangleMesh(Nx,Ny,Lx,Ly,quadrilateral=True)

V = FunctionSpace(hor_mesh, "CG", 1)

h_n0 = Function(V)


...

[assign value to h_n0]

...


h_data = DumbCheckpoint("h", mode=FILE_CREATE)

h_data.store(h_n0)


 When trying to load it in another code, with:

res = 0.1

Nx = int(Lx/res) + 1

Ny = int(Ly/res) + 1


hor_mesh = RectangleMesh(Nx,Ny,Lx,Ly,quadrilateral=True)

V = FunctionSpace(hor_mesh, "CG", 1)

h_n1 = Function(V)


dumb_file = DumbCheckpoint("h", mode=FILE_READ)

dumb_file.load(h_n1)


I get the following error:

  File "TOC.py", line 130, in <module>

    dumb_file.load(h_n1)

  File "/Users/mmfg/firedrake/src/firedrake/firedrake/checkpointing.py", line 237, in load

    v.load(self.vwr)

  File "PETSc/Vec.pyx", line 447, in petsc4py.PETSc.Vec.load (src/petsc4py.PETSc.c:95805)

petsc4py.PETSc.Error: error code 76

[0] VecLoad() line 925 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/vec/vec/interface/vector.c

[0] VecLoad_Default() line 397 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/vec/vec/utils/vecio.c

[0] VecLoad_HDF5() line 257 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/vec/vec/utils/vecio.c

[0] Error in external library

[0] Error in HDF5 call H5Dopen2() Status -1

Exception RuntimeError: RuntimeError("Can't decrement id ref count (Can't close file, there are objects still open)",) in 'h5py._objects.ObjectID.__dealloc__' ignored



Do you know what this error mean ?


Thank you,

Floriane


-------------- next part --------------
HTML attachment scrubbed and removed


More information about the firedrake mailing list