Hello All,

I wrote a python script using the Paraview ExodusIIReader to convert exodus
II files into csv's. The script usually runs successfully, but sometimes I
get a segfault. Am I missing something? How might I be able to better
handle memory in this code? I tried pasting the reset function I found on
the mailing list
<https://public.kitware.com/pipermail/paraview/2015-July/034588.html> to
the top of the code but it did not seem to help. I appreciate your time and
support.


from paraview.simple import *
from paraview.numpy_support import vtk_to_numpy
import vtk.numpy_interface.dataset_adapter as dsa
import sys
s = ExodusIIReader(FileName='./results/%s.e'%sys.argv[-1])
d = CreateWriter('./out.csv', s)
Delete(d)
d.FieldAssociation = "Points"
d.UpdatePipeline(time=s.TimestepValues[-1])
Delete(s)
Delete(d)
del d



$ pvpython mycode.py my_ecodus_file
$ pvpython mycode.py my_ecodus_file
Segmentation fault: 11


Thanks,
Julian
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to