[Paraview] Python Scripts and memory

Berk Geveci berk.geveci at kitware.com
Tue Mar 26 09:18:09 EDT 2013


> You do not possibly also have a clue how to get the size of the text
field right?

Sorry. I don't have an answer for this. Not sure that I understand the
question even :-) Hopefully, someone else that is more knowledgeable in
this will answer.


On Tue, Mar 26, 2013 at 8:44 AM, Dr. Olaf Ippisch <
olaf.ippisch at iwr.uni-heidelberg.de> wrote:

> Dear Berk,
>
> thank you for the fast response and for pointing me to the right point
> in the a bit scattered Paraview Python documentation. You do not
> possibly also have a clue how to get the size of the text field right?
>
> Best regards,
> Olaf
>
> Am 26.03.13 13:33, schrieb Berk Geveci:
> > Hi Olaf,
> >
> > Given that there is no memory management in your code, it is not
> > surprising that it leaks :-) One option is to use Delete() to get rid of
> > objects after using them. There is a short section talking about it
> > here: http://paraview.org/Wiki/ParaView/Python_Scripting
> >
> > The even better approach would be to create the pipeline and all the
> > views only once and then simply update the filename in the loop. That
> > would guarantee that all resources from a previous timestep are released
> > when the  next one executes.
> >
> > Best,
> > -berk
> >
> >
> > On Mon, Mar 25, 2013 at 10:38 AM, Dr. Olaf Ippisch
> > <olaf.ippisch at iwr.uni-heidelberg.de
> > <mailto:olaf.ippisch at iwr.uni-heidelberg.de>> wrote:
> >
> >     Dear Paraview developers and users,
> >
> >     I have some problems when using the python interface to paraview. I
> >     attached a small program I wrote to visualize data from several time
> >     steps of a simulation. Two things are unclear to me:
> >
> >     - The program contains a loop over several files to be read from disk
> >     and visualized. However, if I start the program, the memory
> consumption
> >     of the python interpreter is growing steadily with each iteration. It
> >     seems that the memory allocated for python objects storing data and
> >     results is never freed again. Is there some command to tell the
> >     interpreter to release the vtk/paraview data structures?
> >     - In line 9 I create a text label. I can set its content and also
> >     manipulate its position. However, I was not able to change the size
> of
> >     the text field. For large numbers the text is just cut. I tried to
> play
> >     with props.Position2, but I did not have any success. What is the
> trick?
> >
> >     Best regards,
> >     Olaf Ippisch
> >
> >
> >     --
> >     Dr. Olaf Ippisch
> >     Universität Heidelberg
> >     Interdisziplinäres Zentrum für Wissenschaftliches Rechnen
> >     Im Neuenheimer Feld 368, Raum 4.24
> >     Tel: 06221/548252   Fax: 06221/548884
> >     Mail: Im Neuenheimer Feld 368, 69120 Heidelberg
> >     e-mail: <olaf.ippisch at iwr.uni-heidelberg.de
> >     <mailto:olaf.ippisch at iwr.uni-heidelberg.de>>
> >
> >     _______________________________________________
> >     Powered by www.kitware.com <http://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
> >
> >     Follow this link to subscribe/unsubscribe:
> >     http://www.paraview.org/mailman/listinfo/paraview
> >
> >
>
> --
> Dr. Olaf Ippisch
> Universität Heidelberg
> Interdisziplinäres Zentrum für Wissenschaftliches Rechnen
> Im Neuenheimer Feld 368, Raum 4.24
> Tel: 06221/548252   Fax: 06221/548884
> Mail: Im Neuenheimer Feld 368, 69120 Heidelberg
> e-mail: <olaf.ippisch at iwr.uni-heidelberg.de>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130326/202195d3/attachment.htm>


More information about the ParaView mailing list