Parallel (MPI) point locator

Hi, I’ve made a lot of use of the vtk point locators before, I have a use case that requires me to build and perform nearest neighbour searches of point trees, distributed over MPI. Is that possible in VTK?



I do multithreaded spatial queries with Boost’s boost::geometry::index::rtree<> class without any issues. Why don’t you simply try it with VTK and see what happens? A query is supposed to be a read-only (const) operation. Unless VTK does some state keeping during a query, there is no reason for it to not work in parallel. Of course, you must populate the index in a single thread to be safe.

If you like, I can post some code snippets showing how to setup and query a spatial index with Boost.



Thanks for your comments. I was specifically asking whether there was an MPI based point locator within VTK?

Please, take a look at this: CMake error trying to build VTK 9.2.0.rc1 with MPI

To have MPI support in VTK you need to compile it with the proper configuration in CMake.

Just to follow up. Could any of the vtk or paraview devs confirm whether there is an MPI aware point locator in either vtk or paraview? If not is this something that is planned or under active development? Are there any work arounds with other filters that would provide this capability?

I am not aware of any point locators that explicitly use MPI.

Note, however, that you could use a locator on each rank and do the final reduction yourself with MPI calls.

Ok thank you. Do you know whether paraview does something like that? I’m looking for a worked example to learn from.

vtkPProbeFilter does something similar. It interpolates data at specified points in parallel.

Ok I’ll take a look thanks