Fande, Your sol.h5 is old and outdated. If you generate a more recent sol.h5 with the following SNES example inside your PETSC_DIR:
./src/snes/examples/tutorial/ex12 -run_type test -refinement_limit 0.0 -bc_type dirichlet -interpolate 1 -petscspace_order 1 -dm_view hdf5:sol.h5 -vec_view hdf5:sol.h5::append ./bin/petsc_gen_xdmf.py sol.h5 the resulting sol.xmf is compatible with Paraview Thanks, Justin On Tue, Aug 11, 2015 at 8:53 PM, Fande Kong <[email protected]> wrote: > Hi all, > > I tried to use petsc_gen_xdmf.py to generate a xml file for visulaztion > using paraview. I got the following errors: > > ./petsc_gen_xdmf.py sol.h5 > Traceback (most recent call last): > File "./petsc_gen_xdmf.py", line 236, in <module> > generateXdmf(sys.argv[1]) > File "./petsc_gen_xdmf.py", line 231, in generateXdmf > Xdmf(xdmfFilename).write(hdfFilename, topoPath, numCells, numCorners, > cellDim, geomPath, numVertices, spaceDim, time, vfields, cfields) > File "./petsc_gen_xdmf.py", line 190, in write > for vf in vfields: self.writeField(fp, len(time), t, cellDim, > spaceDim, '/vertex_fields/'+vf[0], vf, 'Node') > File "./petsc_gen_xdmf.py", line 164, in writeField > self.writeFieldComponents(fp, numSteps, timestep, spaceDim, name, f, > domain) > File "./petsc_gen_xdmf.py", line 120, in writeFieldComponents > dims = '1 %d 1' % (numSteps, dof, bs) > TypeError: not all arguments converted during string formatting > > > The hdf5 file is attached. Originally from Matthew. Configuration and make > log files are also attached. > > Fande Kong, > > Thanks, >
