Dear Lawrence,


When I run the attached file TOC2.py on a remote machine with a firedrake version updated from one week ago, I get the error that I sent to you in my previous email. When I run it on my laptop with an old version of Firedrake, it runs for a while and then stops with the error:


...

230

231

232

[math-mc1096:02125] mca_sharedfp_sm_file_open: Error, unable to open file for mmap: /tmp/OMPIO_h_232.h5_-43450367_.sm

Exception petsc4py.PETSc.Error: 76 in 'petsc4py.PETSc.Object.__dealloc__' ignored

Traceback (most recent call last):

  File "TOC2.py", line 84, in <module>

    dumb_file_medium = DumbCheckpoint(save_path+"medium/h_"+str(i_dt), mode=FILE_READ)

  File "/Users/mmfg/firedrake/src/firedrake/firedrake/checkpointing.py", line 65, in __init__

    self.new_file()

  File "/Users/mmfg/firedrake/src/firedrake/firedrake/checkpointing.py", line 144, in new_file

    comm=self.comm)

  File "PETSc/Viewer.pyx", line 365, in petsc4py.PETSc.ViewerHDF5.create (src/petsc4py.PETSc.c:76259)

petsc4py.PETSc.Error: error code 76

[0] PetscObjectDestroy() line 69 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/sys/objects/destroy.c

[0] PetscViewerDestroy() line 100 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/sys/classes/viewer/interface/view.c

[0] PetscViewerDestroy_HDF5() line 49 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/sys/classes/viewer/impls/hdf5/hdf5v.c

[0] PetscViewerFileClose_HDF5() line 39 in /private/var/folders/7h/wbj8xp7n3g5cfbr32ctcmwzcy3jf53/T/pip-yGXqPh-build/src/sys/classes/viewer/impls/hdf5/hdf5v.c

[0] Error in external library

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





De : firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> de la part de Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk>
Envoyé : jeudi 8 février 2018 10:06
À : firedrake@imperial.ac.uk
Objet : Re: [firedrake] .at() PETSC error
 
Dear Floriane,

On 08/02/18 10:03, Floriane Gidel [RPG] wrote:
> Dear all,
>
>
> I try to extract the values of a function h, at some specific
> positions with the function .at() .
>
>
> I define a coarse mesh with
>
> Nx_fine = int(Lx/0.4) + 1               
>
> Ny_fine = int(Ly/0.4) + 1            
>
> coarse_mesh = RectangleMesh(Nx_coarse,Ny_coarse,Lx,Ly,quadrilateral=True)
>
> coarse_V = FunctionSpace(coarse_mesh, "CG", 1)
>
> coarse_h = Function(coarse_V, name="h")
>
> V_vec_c = VectorFunctionSpace(coarse_mesh, "CG", 1)
>
> coarse_points = Function(V_vec_c , name="coarse_points")
>
> coarse_points.interpolate(SpatialCoordinate(coarse_mesh))
>
>
> Then I define a finer mesh with
>
> Nx_fine = int(Lx/0.1) + 1              
>
> Ny_fine = int(Ly/0.1) + 1            
>
> fine_mesh = RectangleMesh(Nx_fine,Ny_fine,Lx,Ly,quadrilateral=True)
>
> fine_V = FunctionSpace(fine_mesh, "CG", 1)
>
> fine_h = Function(fine_V, name="h")
>
>
> Then I load an h5 function into fine_h (defined on the same function
> space) with
>
> dumb_file_fine = DumbCheckpoint(save_path+"fine/h_0", mode=FILE_READ)
>
> dumb_file_fine.load(fine_h)
>
> dumb_file_fine.close()
>
>
> But then, when I try to extract the values of fine_h at the
> coordinates of coarse_mesh with
>
> coarse_data_fine = fine_h.at(coarse_points.dat.data_ro)
>
>
> I get this error:
>
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
>
> [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
> probably memory access out of range

This says that somewhere (presumably in the interpolation code), there
was an out of bounds memory access (reading off the end of an array or
similar).

I tried to reproduce this, by didn't manage to.  Can you post a
complete code that fails?

Thanks,

Lawrence

_______________________________________________
firedrake mailing list
firedrake@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/firedrake