[vtkusers] vtk.vtkDistributedDataFilter() not works
Magician
f_magician at mac.com
Sat Dec 3 20:57:23 EST 2016
Hi Cory,
Thanks for your advice.
Hmmm...I already run the script with MPI.
The attached script is a minimal sample.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pvpython_dd.py
Type: text/x-python-script
Size: 717 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161204/af39e191/attachment.bin>
-------------- next part --------------
If I execute it, pvtu file is exported.
But the all piece sources are exactly same, and not partitioned.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dd.pvtu
Type: application/octet-stream
Size: 387 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161204/af39e191/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dd_0.vtu
Type: application/octet-stream
Size: 3095 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161204/af39e191/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dd_1.vtu
Type: application/octet-stream
Size: 3383 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161204/af39e191/attachment-0002.obj>
-------------- next part --------------
Magician
> On Nov 28, 2016, at 06:19, Cory Quammen <cory.quammen at kitware.com> wrote:
>
> I think you need to run your script in parallel with MPI for the
> partitioning to work. See [1] for an example of how to use this
> filter.
>
> Hope that helps,
> Cory
>
> [1] http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Filters/Parallel/Testing/Cxx/DistributedData.cxx
>
> On Sun, Nov 27, 2016 at 10:39 AM, Magician <f_magician at mac.com> wrote:
>> Does anyone use the vtkDistributedDataFilter?
>>
>>
>> On Nov 19, 2016, at 18:16, Magician <f_magician at mac.com> wrote:
>>
>> Hi all,
>>
>>
>> I posted the message about partitioning datasets.
>> <http://public.kitware.com/pipermail/vtkusers/2016-November/097123.html>
>>
>> I still trying vtk.vtkDistributedDataFilter(), but the exported data aren?t
>> partitioned.
>> My VTK version is 7.1.0 (pvpython with ParaView 5.2.0 RC3) and executing on
>> 2 CPUs.
>>
>> Here is the sample code:
>>
>> import vtk
>>
>> source = vtk.vtkPointSource()
>> source.SetCenter((0.0, 0.0, 0.0))
>> source.SetNumberOfPoints(1000000)
>> source.SetRadius(1.0)
>> source.Update()
>>
>> d3 = vtk.vtkDistributedDataFilter()
>> d3.SetInputData(source.GetOutput())
>> d3.SetBoundaryMode(0)
>> d3.Update()
>>
>> writer = vtk.vtkXMLPUnstructuredGridWriter()
>> writer.SetInputData(d3.GetOutput())
>> writer.SetFileName(?test.pvtu?)
>> writer.SetNumberOfPieces(2)
>> writer.WriteSummaryFileOn()
>> writer.SetStartPiece(0)
>> writer.SetEndPiece(1)
>> writer.Write()
>>
>> How to partition data?
>>
>>
>> Magician
>>
>>
>>
>> _______________________________________________
>> 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 VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>>
>
>
>
> --
> Cory Quammen
> Staff R&D Engineer
> Kitware, Inc.
More information about the vtkusers
mailing list