D3 filter generates wrong GlobalNodeIds / does not use or retain existing ones
We have a
.vtm MultiBlock dataset consisting of 4
.vtu files containing a conforming unstructured grid. The size of the grid is 4x4x2 cells, so 32 unique cells and 75 unique nodes. I have uploaded the zipped data set to https://bwsyncandshare.kit.edu/s/Lynq9tbYxzKoJqG.
If I open the dataset not containing GlobalNodeIds running
pvserver with 4 procs and apply the D3 filter, it will generate the wrong GlobalNodeIds and subsequently crash trying to access it with the error
VTK/Common/Core/vtkGenericDataArray.txx, line 573 vtkIdTypeArray (0x55d972079380): Source array too small, requested tuple at index 15, but there are only 10 tuples in the array.
Thus, I tried filling GlobalNodeIds and GlobalCellIds arrays with the corresponding ids. However, when running
pvserver with 4 procs the D3 filter will ignore the ids and generate its (wrong) own ones. The subsequent crash happens at the
D3->Update() step since it again arrives at the wrong global ids.
[...] vtkSmartPointer <vtkIntArray> gnodeids = vtkSmartPointer<vtkIntArray>::New(); gnodeids->SetNumberOfComponents(1); gnodeids->SetNumberOfTuples(nodeids->len); gnodeids->SetName("GlobalNodeIds"); [Fill gnodeids[Cube_mesh2x2.zip](/uploads/518a6d47fe3f486ae3c1d4a78f28d5f0/Cube_mesh2x2.zip)] grid->GetPointData()->SetGlobalIds(gnodeids); [...] vtkPDistributedDataFilter *d3 = vtkPDistributedDataFilter::New(); d3->SetInputData(grid); d3->SetMinimumGhostLevel(1); d3->SetBoundaryMode(1); d3->Update(); grid->ShallowCopy(d3->GetOutput())
Steps to reproduce:
- Start pvserver
v5.9.1with 4 processors
- Load data set
- Apply ReDistributeDataSet filter to distribute the data to all 4 procs (ParaView will only use 3 by default)
- Apply D3 filter with
- Boundary Mode=Duplicate Cells
- Minimum Number of Ghost Cells=1
- D3 filter will either generate its own GlobalNodeIds or will use and retain existing ones
- D3 filter crashes with the error above
Note that ReDistributeDataSet correctly picks up GlobalNodeIds if they exist and refuses to generate its own.
Somehow, code markdown will change
vtketArray. It is correct in the original code. Please let me know if you need any more information or the complete code of the plugin.