[petsc-dev] petsc_gen_xdmf.py error

Mark Adams mfadams at lbl.gov
Fri Oct 21 09:10:21 CDT 2016


petsc_gen_xdmf.py works fine on my Mac but I get this error on a Cray. It
is looking for "file" but I give it a file name. On my Mac I have pything
v2.7.11 and on the Cray I have Python 3.4.3 :: Anaconda 2.2.0 (64-bit).

Any ideas?

-rw-r--r-- 1 madams madams    206176 Oct 21 07:03 ex3.h5
07:04 nid00039
 /global/u2/m/madams/petsc/src/dm/impls/picell/examples/tutorials$
${PETSC_DIR}/bin/petsc_gen_xdmf.py ex3.h5
Traceback (most recent call last):
  File "/global/homes/m/madams/petsc/bin/petsc_gen_xdmf.py", line 241, in
<module>
    generateXdmf(f)
  File "/global/homes/m/madams/petsc/bin/petsc_gen_xdmf.py", line 235, in
generateXdmf
    Xdmf(xdmfFilename).write(hdfFilename, topoPath, numCells, numCorners,
cellDim, geomPath, numVertices, spaceDim, time, vfields, cfields)
  File "/global/homes/m/madams/petsc/bin/petsc_gen_xdmf.py", line 187, in
write
    with file(self.filename, 'w') as fp:
NameError: name 'file' is not defined
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20161021/a3818611/attachment.html>


More information about the petsc-dev mailing list