[vtkusers] read XDMF in parallel

Nico Schlömer nico.schloemer at gmail.com
Thu Jun 18 14:37:41 EDT 2015


It's quite the same: All nodes are on all processes. (Or so it seems:
`m->GetNumberOfPoints()` returns the number of all points on all nodes.)

--Nico

On Wed, Jun 17, 2015 at 6:00 PM Berk Geveci <berk.geveci at kitware.com> wrote:

> Hi Nico,
>
> What happens if you call
>
> xreader->UpdateInformation();
>
> before you call SetUpdateExtent() ?
>
> Best,
> -berk
>
> On Tue, Jun 16, 2015 at 9:06 AM, Nico Schlömer <nico.schloemer at gmail.com>
> wrote:
>
>> From [1], I find that parallel reading of XDMF files is as simple as
>> ```
>>   vtkMPIController *contr = vtkMPIController::New();
>>   contr->Initialize();
>>   int proc = contr->GetLocalProcessId();
>>   int numprocs = contr->GetNumberOfProcesses();
>>   contr->Barrier();
>>   vtkXdmf3Reader *xreader = vtkXdmf3Reader::New();
>>   xreader->SetFileName("data/pacman.xmf");
>>   contr->Barrier();
>>   xreader->SetUpdateExtent(proc, numprocs, 0);
>>   xreader->Update();
>> ```
>> How can I check if this really worked?
>> After retrieving the output
>> ```
>>   vtkDataObject *rOutput = xreader->GetOutputDataObject(0);
>>   TEUCHOS_ASSERT(rOutput != nullptr);
>>   vtkUnstructuredGrid * m = dynamic_cast<vtkUnstructuredGrid*>(rOutput);
>>   TEUCHOS_ASSERT(m != nullptr);
>>
>>   std::cout << m->GetNumberOfCells() << " " << m->GetNumberOfPoints()
>> << std::endl;
>> ```
>> it seems that the all procs have all points and cells.
>>
>> Is there a way to only retrieve the locally owned cells/points?
>>
>> Cheers,
>> Nico
>>
> _______________________________________________
>> 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150618/ab63c60f/attachment.html>


More information about the vtkusers mailing list