<div dir="ltr">Fande, <br><br>Your sol.h5 is old and outdated. If you generate a more recent sol.h5 with the following SNES example inside your PETSC_DIR:<div>
<p class="p1"><span class="s1">./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</span></p><div>./bin/petsc_gen_xdmf.py sol.h5</div><div><br></div><div>the resulting sol.xmf is compatible with Paraview<br><br>Thanks,<br>Justin<br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 11, 2015 at 8:53 PM, Fande Kong <span dir="ltr"><<a href="mailto:fdkong.jd@gmail.com" target="_blank">fdkong.jd@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I tried to use petsc_gen_xdmf.py to generate a xml file for visulaztion using paraview. I got the following errors:</div><div><br></div><div><div>./petsc_gen_xdmf.py sol.h5 </div><div>Traceback (most recent call last):</div><div> File "./petsc_gen_xdmf.py", line 236, in <module></div><div> generateXdmf(sys.argv[1])</div><div> File "./petsc_gen_xdmf.py", line 231, in generateXdmf</div><div> Xdmf(xdmfFilename).write(hdfFilename, topoPath, numCells, numCorners, cellDim, geomPath, numVertices, spaceDim, time, vfields, cfields)</div><div> File "./petsc_gen_xdmf.py", line 190, in write</div><div> for vf in vfields: self.writeField(fp, len(time), t, cellDim, spaceDim, '/vertex_fields/'+vf[0], vf, 'Node')</div><div> File "./petsc_gen_xdmf.py", line 164, in writeField</div><div> self.writeFieldComponents(fp, numSteps, timestep, spaceDim, name, f, domain)</div><div> File "./petsc_gen_xdmf.py", line 120, in writeFieldComponents</div><div> dims = '1 %d 1' % (numSteps, dof, bs)</div><div>TypeError: not all arguments converted during string formatting</div></div><div><br></div><div><br></div><div>The hdf5 file is attached. Originally from Matthew. Configuration and make log files are also attached.</div><div><br></div><div>Fande Kong,</div><div><br></div><div>Thanks,</div></div>
</blockquote></div><br></div>