Unable to call ufile = File("u.xdmf") -- xdmf files

192 views
Skip to first unread message

Miguel Angel Salazar de Troya

unread,
Jul 14, 2016, 12:12:52 PM7/14/16
to fenics-support
I obtain this error:
*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
***     fenics-...@googlegroups.com
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error:   Unable to open file.
*** Reason:  Unknown file type (".xdmf") for file "u.xdmf".
*** Where:   This error was encountered inside File.cpp.
*** Process: 0
***
*** DOLFIN version: 1.7.0dev
*** Git changeset:  79dbadfbb2b71c8ca114764c6172dcf0813c2658
*** -------------------------------------------------------------------------

running this simple example

from dolfin import *
mesh = UnitSquareMesh(4,4)
V = FunctionSpace(mesh, "DG", 2)
ufile = File("u.xdmf")
ufile << (Function(V), 0.0)
ufile << (Function(V), 0.1)
ufile << (Function(V), 0.2)

I have read that this could be an issue with HDF5. I compiled DOLFIN with a parallel HDF5. I can pass the HDF5 tests in test/unit/python/io. In fact, I can even call the function

vfile = XDMFFile(mpi_comm_world(),"v.xdmf")

with no problems, like in this example http://www.dolfin-adjoint.org/en/latest/documentation/klein/klein.html. It might be related with writing the output instead of reading? It might be related, but when trying to compile mshr, I got this error:

/Users/salazardetro1/scicomp_libraries/dolfin-install/include/dolfin/io/HDF5Interface.h:303:16: error: use of undeclared identifier 'H5Pset_dxpl_mpio'

Thanks
Miguel

Thanks



Garth N. Wells

unread,
Jul 14, 2016, 12:24:44 PM7/14/16
to Miguel Angel Salazar de Troya, fenics-support
You need to use XDMFFile. XDMF is no longer supported via File.

Garth

On 14 July 2016 at 17:12, Miguel Angel Salazar de Troya
> --
> You received this message because you are subscribed to the Google Groups
> "fenics-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to fenics-suppor...@googlegroups.com.
> To post to this group, send email to fenics-...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/fenics-support/378c6e4c-420b-4d59-9bd3-3a3820336dfc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages