use openmp with StaticCellLocator

I’m trying to make routine to get cell index by point coordinates in unstructured 3D mesh to be used with OpenMP parallelized code. As far as I understand the documentation for vtkStaticCellLocator ( it is thread-safe and could be used to fulfill this task. Yet once I’m comparing locator outputs for test geometries in sequential and OpenMP parallelized mode I get discrepancy in results.

The mesh is read from .vtk file by vtkUnstructuredGridReader. VTK was build with VTK_SMP_IMPLEMENTATION_TYPE = OpenMP .

I’m using locator like this:

vtkSmartPointer cellLocator = vtkSmartPointer::New();

#pragma omp parallel for num_threads(2)
for (int pid = 0; pid < N_points; ++pid) {
locations_vtk[pid] = cellLocator->FindCell(test_points[pid]);

Is there some problem with my code or did I probably misinterpret the documentation? Unfortunately I’m unable to use TBB SMP backend as the main code part strongly relies on OpenMP.

Any help would be greatly appreciated. Thank you in advance!