[Paraview] storing output calculated by python running in parallel - write to a file? (UNCLASSIFIED)

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Jul 7 11:36:14 EDT 2014


Simon,

If you're saving out data generated by a pipeline (which can include
Programmable filter or Python calculator), then you should use
CreateWriter(http://www.paraview.org/ParaView3/Doc/Nightly/www/py-doc/paraview.simple.html#paraview.simple.CreateWriter)
to create a writer and then write the data out -- akin to "Save Data"
in ParaView.

Utkarsh

On Mon, Jul 7, 2014 at 11:30 AM, Su, Simon M CTR USARMY ARL (US)
<simon.m.su.ctr at mail.mil> wrote:
> Classification: UNCLASSIFIED
> Caveats: NONE
>
> Hello,
>
> In my python script (ran using pvbatch mypythonscript.py in parallel
> environment), how do I save out the data I calculated to a file? How will be
> parallel execution affect the writing of the output to a file (which process
> will be doing the writing)?
>
> In a none parallel mode, this is what I want to do which write the output to
> out.txt file.
>
> f = open('out.txt', 'w')
> print >> f, 'Filename:', filename  # or f.write('...\n')
> f.close()
>
> what is the parallel equivalent of that?
>
> Any help is much appreciated.
>
> Thanks
> -simon
>
>
>
>
> Classification: UNCLASSIFIED
> Caveats: NONE
>
>
>
> _______________________________________________
> 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://public.kitware.com/mailman/listinfo/paraview
>


More information about the ParaView mailing list