[Paraview] memory leak in writer
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Sat Jul 18 14:51:20 EDT 2009
When you are saving the data, once you have chosen the filename a
dialog should popup which allows you to check the "Write all
Timesteps" checkbox.
On Jul 18, 2009, at 2:47 PM, Natalie Happenhofer <nataliehapp at hotmail.com
> wrote:
> Ok, checked it out and build it, but how do I tell ParaView that I
> want it to write the whole time series?
>
> thx,
> Natalie
>
> > Date: Fri, 17 Jul 2009 13:44:39 -0400
> > Subject: Re: [Paraview] memory leak in writer
> > From: utkarsh.ayachit at kitware.com
> > To: nataliehapp at hotmail.com
> > CC: paraview at paraview.org
> >
> > Try the following:
> >
> > cvs -d :pserver:anoncvs at www.paraview.org:/cvsroot/ParaView3 co -r
> > ParaView-3-6-1 ParaView3
> >
> >
> >
> >
> > On Fri, Jul 17, 2009 at 1:41 PM, Natalie
> > Happenhofer<nataliehapp at hotmail.com> wrote:
> > > ok, I tried cvs -d :pserver:anoncvs at www.paraview.org:/cvsroot/
> ParaView-3-6-1
> > > , but it says there is no such repository.
> > >
> > > N
> > >
> > >> Date: Fri, 17 Jul 2009 13:34:34 -0400
> > >> Subject: Re: [Paraview] memory leak in writer
> > >> From: utkarsh.ayachit at kitware.com
> > >> To: nataliehapp at hotmail.com
> > >>
> > >> You can check out the CVS tag: ParaView-3-6 for the 3.6 branch or
> > >> ParaView-3-6-1 for the release tag.
> > >>
> > >> Utkarsh
> > >>
> > >> On Fri, Jul 17, 2009 at 1:31 PM, Natalie
> > >> Happenhofer<nataliehapp at hotmail.com> wrote:
> > >> > But the source code is also not available yet, is it?
> > >> >
> > >> > Natalie
> > >> >
> > >> >> Date: Fri, 17 Jul 2009 13:22:20 -0400
> > >> >> Subject: Re: [Paraview] memory leak in writer
> > >> >> From: utkarsh.ayachit at kitware.com
> > >> >> To: nataliehapp at hotmail.com
> > >> >> CC: paraview at paraview.org
> > >> >>
> > >> >> You can't download 3.6 binaries yet. We should have them
> posted by
> > >> >> early next week.
> > >> >>
> > >> >> Utkarsh
> > >> >>
> > >> >> On Fri, Jul 17, 2009 at 1:13 PM, Natalie
> > >> >> Happenhofer<nataliehapp at hotmail.com> wrote:
> > >> >> > I have written it months ago and it worked well for small
> files and
> > >> >> > timeseries for about 30 files - I have just come across it
> trying to
> > >> >> > write a
> > >> >> > time series of 200 files.
> > >> >> >
> > >> >> > I can already download ParaView 3.6? Great, I did not know
> this!
> > >> >> >
> > >> >> > thx,
> > >> >> > Natalie
> > >> >> >
> > >> >> >> Date: Fri, 17 Jul 2009 08:47:37 -0400
> > >> >> >> Subject: Re: [Paraview] memory leak in writer
> > >> >> >> From: utkarsh.ayachit at kitware.com
> > >> >> >> To: nataliehapp at hotmail.com
> > >> >> >> CC: paraview at paraview.org
> > >> >> >>
> > >> >> >> Out of curiosity, why are you writing your own wrapper?
> ParaView 3.6
> > >> >> >> onwards supports writing time series for legacy vtk files.
> > >> >> >>
> > >> >> >> Utkarsh
> > >> >> >>
> > >> >> >> On Fri, Jul 17, 2009 at 7:53 AM, Natalie
> > >> >> >> Happenhofer<nataliehapp at hotmail.com> wrote:
> > >> >> >> > Hi!
> > >> >> >> > I´ve written a Wrapper for the Legacy VTK files writer,
> so that it
> > >> >> >> > writes a
> > >> >> >> > whole timeseries if I want it to. Lamentably, applying
> it, it
> > >> >> >> > needs
> > >> >> >> > more
> > >> >> >> > and
> > >> >> >> > more memory, so I am looking for a memory leak.
> > >> >> >> >
> > >> >> >> > Here is the bit of code I suspect:
> > >> >> >> >
> > >> >> >> > vtkInformation* inInfo = inputVector[0]-
> >GetInformationObject(0);
> > >> >> >> > vtkDataObject* input =
> > >> >> >> > inInfo->Get(vtkDataObject::DATA_OBJECT());
> > >> >> >> >
> > >> >> >> > vtkSmartPointer<vtkDataObject> inputCopy;
> > >> >> >> > inputCopy.TakeReference(input->NewInstance());
> > >> >> >> > inputCopy->ShallowCopy(input);
> > >> >> >> >
> > >> >> >> > vtksys_ios::ostringstream fname;
> > >> >> >> > if (this->WriteAllTimeSteps)
> > >> >> >> > {
> > >> >> >> > vtkstd::string path =
> > >> >> >> > vtksys::SystemTools::GetFilenamePath(this-
> >FileName);
> > >> >> >> > vtkstd::string fnamenoext =
> > >> >> >> >
> > >> >> >> >
> > >> >> >> > vtksys::SystemTools::GetFilenameWithoutLastExtension
> (this->FileName);
> > >> >> >> > vtkstd::string ext =
> > >> >> >> >
> > >> >> >> > vtksys::SystemTools::GetFilenameLastExtension(this-
> >FileName);
> > >> >> >> > if((this -> CurrentTimeIndex) < 10) fname << path
> << "/" <<
> > >> >> >> > fnamenoext
> > >> >> >> > << ".000" <<this->CurrentTimeIndex << ext;
> > >> >> >> > else if((this -> CurrentTimeIndex) < 100) fname <<
> path << "/"
> > >> >> >> > <<
> > >> >> >> > fnamenoext << ".00" << this -> CurrentTimeIndex << ext;
> > >> >> >> > else if((this -> CurrentTimeIndex) < 1000) fname <<
> path <<
> > >> >> >> > "/"
> > >> >> >> > <<
> > >> >> >> > fnamenoext << ".0" << this -> CurrentTimeIndex << ext;
> > >> >> >> > else fname << path << "/" << fnamenoext << this ->
> > >> >> >> > CurrentTimeIndex
> > >> >> >> > <<
> > >> >> >> > ext;
> > >> >> >> > }
> > >> >> >> > else
> > >> >> >> > {
> > >> >> >> > fname << this->FileName;
> > >> >> >> > }
> > >> >> >> >
> > >> >> >> > //Here I call the usual VTK Writer and set the input
> > >> >> >> >
> > >> >> >> > vtkGenericDataObjectWriter* Writer =
> > >> >> >> > vtkGenericDataObjectWriter::New();
> > >> >> >> > Writer -> SetInput(inputCopy);
> > >> >> >> > Writer -> SetFileName(fname.str().c_str());
> > >> >> >> > if((this -> FileType) == 1) Writer ->
> SetFileTypeToASCII();
> > >> >> >> > else Writer -> SetFileTypeToBinary();
> > >> >> >> >
> > >> >> >> > Writer -> Update();
> > >> >> >> >
> > >> >> >> > if (this->WriteAllTimeSteps)
> > >> >> >> > {
> > >> >> >> > this->CurrentTimeIndex++;
> > >> >> >> > if (this->CurrentTimeIndex == this-
> >NumberOfTimeSteps)
> > >> >> >> > {
> > >> >> >> > // Tell the pipeline to stop looping.
> > >> >> >> >
> > >> >> >> >
> > >> >> >> >
> > >> >> >> > request->Remove
> (vtkStreamingDemandDrivenPipeline::CONTINUE_EXECUTING());
> > >> >> >> > this->CurrentTimeIndex = 0;
> > >> >> >> > }
> > >> >> >> > }
> > >> >> >> >
> > >> >> >> > Writer -> Delete();
> > >> >> >> > return 1;
> > >> >> >> >
> > >> >> >> > Is there anything I forget to delete?
> > >> >> >> >
> > >> >> >> >
> > >> >> >> > thx for answers
> > >> >> >> > Natalie
> > >> >> >> >
> > >> >> >> >
> > >> >> >> >
> > >> >> >> > ________________________________
> > >> >> >> > Nuevo Internet Explorer 8 ¡Es Gratis y optimizado para
> MSN!
> > >> >> >> > _______________________________________________
> > >> >> >> > 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
> > >> >> >> >
> > >> >> >> > Follow this link to subscribe/unsubscribe:
> > >> >> >> > http://www.paraview.org/mailman/listinfo/paraview
> > >> >> >> >
> > >> >> >> >
> > >> >> >
> > >> >> > ________________________________
> > >> >> > ¿Quieres conocerte mejor? ¡Conoce lo que Windows Live tie
> ne
> > >> >> > especialmente
> > >> >> > para ti!
> > >> >> > _______________________________________________
> > >> >> > 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
> > >> >> >
> > >> >> > Follow this link to subscribe/unsubscribe:
> > >> >> > http://www.paraview.org/mailman/listinfo/paraview
> > >> >> >
> > >> >> >
> > >> >
> > >> > ________________________________
> > >> > ¿Quieres conocerte mejor? ¡Conoce lo que Windows Live tiene
> > >> > especialmente
> > >> > para ti!
> > >
> > > ________________________________
> > > ¿Cuál de estas 16 personalidades es la tuya? ¡Descubre quién
> eres realmente!
> > > _______________________________________________
> > > 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
> > >
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.paraview.org/mailman/listinfo/paraview
> > >
> > >
>
> ¿Cuál de estas 16 personalidades es la tuya? ¡Descubre quién eres
> realmente!
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090718/ce9feab4/attachment-0001.htm>
More information about the ParaView
mailing list