Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • ParaView ParaView
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,961
    • Issues 1,961
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 99
    • Merge requests 99
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ParaViewParaView
  • ParaViewParaView
  • Issues
  • #19921
Closed
Open
Issue created May 13, 2020 by Kenneth Moreland@kmorelDeveloper

Intermittent errors in Cell Centers

A thread on discourse has brought up a problem with the Cell Centers filter. The filter seems to be unstable in that it intermittently creates bad centers. Here is a video from some data provided by the user. The geometry of the source does not change, but you can see the centers "sparkling" as in each frame you see an error in the computation.

cell-centers-errors

I believe the issue is that this data stores its connectivity array as int32 values. In this condition, it causes the vtkCellCenters filter to get cell connections in a thread-unsafe way. That in turn causes threads to interfere with each other.

Diving in more deeply, I point to this code in vtkUnstructuredGrid.cxx, which is supposed to be thread safe.

void vtkUnstructuredGrid::GetCell(vtkIdType cellId, vtkGenericCell* cell)
{

  int cellType = static_cast<int>(this->Types->GetValue(cellId));
  cell->SetCellType(cellType);

  vtkIdType numPts;
  const vtkIdType* pts;
  this->Connectivity->GetCellAtId(cellId, numPts, pts);

The problem is with this last line. GetCellAtId is sometimes thread safe, but not always thread safe. It is thread safe if the connectivity array is a simple array of type vtkIdType. However, if the array is of a different type, the values get copied to an object-local space (which is shared among threads), and this becomes very thread unsafe.

Edited May 13, 2020 by Kenneth Moreland
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking