# vtkProbeLineFilter do not draw some PointData when the dataset do not belong to proc id 0

**URL:** <https://discourse.vtk.org/t/vtkprobelinefilter-do-not-draw-some-pointdata-when-the-dataset-do-not-belong-to-proc-id-0/12947>\
**Category:** Development\
**Created:** [December 21, 2023, 7:54am UTC](https://discourse.vtk.org/t/vtkprobelinefilter-do-not-draw-some-pointdata-when-the-dataset-do-not-belong-to-proc-id-0/12947 "2023-12-21T07:54:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![guillaume\_Peillex](https://discourse.vtk.org/user_avatar/discourse.vtk.org/guillaume_peillex/32/8171_2.png) [@guillaume\_Peillex](https://discourse.vtk.org/u/guillaume_Peillex)\
**Post date:** [December 21, 2023, 7:54am UTC](https://discourse.vtk.org/t/vtkprobelinefilter-do-not-draw-some-pointdata-when-the-dataset-do-not-belong-to-proc-id-0/12947/1 "2023-12-21T07:54:05Z")

</div>

Hi all,

I am facing a strange situation and would appreciate any help.  
I’am working in parallel on two MPI threads. I have 4 datasets (each representing a material) that are spread over those two MPI threads.

At time 0:  
Thread 0 holds dataset A and dataset B while thread 1 holds dataset C and dataset D.  
With the custom reader i use i can load only one of the dataset. Let’s say i am loading the dataset C (thread 1).

When i try to use `vtkProbeLineFIlter` on this dataset ( `SAMPLE_LINE_UNIFORMLY`) Point Data are missing (for example the pressure in the material and all other Point or Cell data of the dataset C)  
**This is not the case if i use other sampling methods such as `SAMPLE_LINE_AT_SEGMENT_CENTERS` or `SAMPLE_LINE_AT_CELL_BOUNDARIES`**

At time 1:  
At this timestep the dataset C is now spread over thread 0 and thread 1. In this configuration the `vtkProbeLineFilter` works perfectly well for all sampling methods.

I think that this “problem” of time 0 is linked to the documentation warning of the `vtkProbeLineFilter`:

```auto
In case of a distributed pipeline, the dataset used to determine the lines to probe from (ie the dataset on port 1) will always be the one from rank 0, and will be broadcasted to all other ranks.

```

Can you confirm this please?

PS: I debugged a bit and found that the situation of time 0 is due to the fact that in `vtkPProbeFilter.cxx` line 105, there is a loop on the number of arrays of output point data of thread 0. At this time and for thread 0 the number of arrays in output point data is drastically different from the number of arrays in remote output (thread 1) which causes the trouble.

---

<div class="post-metadata">

**Author:** ![berk.geveci](https://discourse.vtk.org/user_avatar/discourse.vtk.org/berk.geveci/32/3146_2.png) [@berk.geveci](https://discourse.vtk.org/u/berk.geveci)\
**Post date:** [December 29, 2023, 3:02pm UTC](https://discourse.vtk.org/t/vtkprobelinefilter-do-not-draw-some-pointdata-when-the-dataset-do-not-belong-to-proc-id-0/12947/2 "2023-12-29T15:02:15Z")

</div>

I confirm that this is indeed a bug. And you are correct. If, in the first MPI rank, the dataset that you are probing with does not intersect the dataset, the filter does not work properly. I will work on a fix.

---

<div class="post-metadata">

**Author:** ![berk.geveci](https://discourse.vtk.org/user_avatar/discourse.vtk.org/berk.geveci/32/3146_2.png) [@berk.geveci](https://discourse.vtk.org/u/berk.geveci)\
**Post date:** [December 29, 2023, 3:55pm UTC](https://discourse.vtk.org/t/vtkprobelinefilter-do-not-draw-some-pointdata-when-the-dataset-do-not-belong-to-proc-id-0/12947/3 "2023-12-29T15:55:24Z")

</div>

[https://gitlab.kitware.com/paraview/paraview/-/issues/22431](https://gitlab.kitware.com/paraview/paraview/-/issues/22431)

---

<div class="post-metadata">

**Author:** ![guillaume\_Peillex](https://discourse.vtk.org/user_avatar/discourse.vtk.org/guillaume_peillex/32/8171_2.png) [@guillaume\_Peillex](https://discourse.vtk.org/u/guillaume_Peillex)\
**Post date:** [December 31, 2023, 9:42am UTC](https://discourse.vtk.org/t/vtkprobelinefilter-do-not-draw-some-pointdata-when-the-dataset-do-not-belong-to-proc-id-0/12947/4 "2023-12-31T09:42:12Z")

</div>

Ok. Thanks @berk.geveci !

---

<div class="post-metadata">

**Author:** ![berk.geveci](https://discourse.vtk.org/user_avatar/discourse.vtk.org/berk.geveci/32/3146_2.png) [@berk.geveci](https://discourse.vtk.org/u/berk.geveci)\
**Post date:** [January 12, 2024, 4:07pm UTC](https://discourse.vtk.org/t/vtkprobelinefilter-do-not-draw-some-pointdata-when-the-dataset-do-not-belong-to-proc-id-0/12947/5 "2024-01-12T16:07:55Z")

</div>

This is now fixed in master.

---

<div class="post-metadata">

**Author:** ![guillaume\_Peillex](https://discourse.vtk.org/user_avatar/discourse.vtk.org/guillaume_peillex/32/8171_2.png) [@guillaume\_Peillex](https://discourse.vtk.org/u/guillaume_Peillex)\
**Post date:** [January 12, 2024, 4:20pm UTC](https://discourse.vtk.org/t/vtkprobelinefilter-do-not-draw-some-pointdata-when-the-dataset-do-not-belong-to-proc-id-0/12947/6 "2024-01-12T16:20:26Z")

</div>

Nice! Thanks for this rapid development!
