[Paraview] pvserver disconnecting...

2011-02-10 Thread Karl Battams
I'm pretty new to paraview so could be doing fundamentally wrong here, but here's my issue... I have paraview 3.10 compiled/installed from source on Ubuntu 10. I'm using a python script to connect to pvserver, iterate over a bunch of vtk files, do some stuff, and saving the output as a png. I'm ru

Re: [Paraview] pvserver disconnecting...

2011-02-10 Thread pat marion
Hi Karl, It sounds like a memory leak problem. Have you tried opening the System Monitor in ubuntu and watching the memory usage of pvserver as you run your script? Can you post your script so we can take a look at it, maybe you aren't cleaning up after you process each file? You can pass --csl

Re: [Paraview] pvserver disconnecting...

2011-02-11 Thread Karl Battams
Hi Pat, Yes -- I should have gone with my first suspicion. It is indeed a memory leak. I'm obviously not cleaning stuff up properly... which doesn't surprise me because my script really is kind of a hack... I have attached it. Basically it reads a directory of vtk files, loops over each, volume-re

Re: [Paraview] pvserver disconnecting...

2011-02-11 Thread pat marion
Hi, Your loop is leaking readers. At the end of your loop, call Delete(reader). The Delete() function is analogous to selecting an object in the paraview gui and pressing the delete key. You'll still leak some objects, there are more thorough ways you cleanup, but deleting the reader make take

Re: [Paraview] pvserver disconnecting...

2011-02-11 Thread Karl Battams
Pat, Ah! That makes sense now I think about it. So I put the call at the end of my routine, and it pukes after the first file: Traceback (most recent call last): File "script.py", line 52, in Delete(reader) File "/usr/local/lib/paraview-3.11/paraview/simple.py", line 367, in Delete

Re: [Paraview] pvserver disconnecting...

2011-02-11 Thread Berk Geveci
Actually, it may be leaking display properties. Try: Delete(dp) The best thing to do in scripts is to be consistent in whether you use the simple or the servermanager to create objects. If you use the simple module, make sure you call Delete(). If you are using servermanager, you don't have to ca

Re: [Paraview] pvserver disconnecting...

2011-02-14 Thread Karl Battams
Yes, this seems to work very well! Thank you so much for the help! Cheers, Karl On Fri, Feb 11, 2011 at 12:55 PM, Berk Geveci wrote: > Actually, it may be leaking display properties. Try: > > Delete(dp) > > The best thing to do in scripts is to be consistent in whether you use > the simple or th