# BUG Live visualization of VTKRectilinearGrid doesn't work

**URL:** https://discourse.paraview.org/t/bug-live-visualization-of-vtkrectilineargrid-doesnt-work/5140
**Category:** In Situ Support
**Tags:** vtk
**Created:** [August 19, 2020, 6:09pm UTC](https://discourse.paraview.org/t/bug-live-visualization-of-vtkrectilineargrid-doesnt-work/5140 "2020-08-19T18:09:52Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![amemmolo](https://discourse.paraview.org/user_avatar/discourse.paraview.org/amemmolo/32/4742_2.png) [@amemmolo](https://discourse.paraview.org/u/amemmolo)
#### Post date: [August 19, 2020, 6:09pm UTC](https://discourse.paraview.org/t/bug-live-visualization-of-vtkrectilineargrid-doesnt-work/5140/1 "2020-08-19T18:09:52Z")

</div>

Hello to the ParaView crew,

We faced a bug with Paraview 5.8.0 in the live visualization of VTKRectilinearGrid. A minimal driver example can be found here

[driver-bug-report.tar.gz](https://discourse.paraview.org/uploads/short-url/Gl5p1Sx12jQd3Tk55VYCTJRufR.gz) (6.4 KB)

To run the example, create a build directory, cd inside it and run:

1. cmake -DUSE\_CATALYST=ON -DCMAKE\_BUILD\_TYPE=Release -DParaView\_VERSION=5.8 ..
2. cmake --build .
3. mpirun -np 2 ./CxxRectilinearGridExample \<yourpath\>/driver-bug-report/SampleScripts/feslicescript.py

The example correctly writes the pvtr files, but it makes paraview crash when trying to visualize them live. The slices are correctly visualized also live.

The error on crash is:

1. from pvbatch side:

```auto
( 26.192s) [pvbatch.0]vtkMultiProcessControll:175 WARN| vtkRectilinearGrid cannot be merged
( 29.532s) [pvbatch.0]vtkSocketCommunicator.c:786 ERR| vtkSocketCommunicator (0x4fd7d50): Could not receive tag. 1
( 29.532s) [pvbatch.0]vtkMultiProcessControll:640 ERR| vtkSocketController (0x5137940): Could not receive RMI trigger message.

```

1. from paraview GUI:

```auto
Loguru caught a signal: SIGSEGV
Stack trace:
26 0x40c2ca paraview() [0x40c2ca]
25 0x7f17426cac05 __libc_start_main + 245
24 0x40bf8a paraview() [0x40bf8a]
23 0x7f173679da40 QCoreApplication::exec() + 128
22 0x7f17367948fa QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 298
21 0x7f17367f4e9c QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 92
20 0x7f172756567c g_main_context_iteration + 44
19 0x7f17275654a0 /gpfs/work/cin_staff/amemmol1/spack/install/linux-centos7-broadwell/gcc-7.3.0/glib-2.64.3-k2kdvetrok6m2sitzabkk43q44acilpx/lib/libglib-2.0.so.0(+0x5c4a0) [0x7f17275654a0]
18 0x7f17275651c2 g_main_context_dispatch + 1362
17 0x7f17367f4b7c /gpfs/work/cin_staff/amemmol1/spack/install/linux-centos7-broadwell/gcc-7.3.0/qt-5.14.2-zzcqf63o4xs4prosv7a6w3gdvxbu2y4c/lib/libQt5Core.so.5(+0x2f3b7c) [0x7f17367f4b7c]
16 0x7f17367f4146 QTimerInfoList::activateTimers() + 1622
15 0x7f1736795f08 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 280
14 0x7f1738ecc6ff QApplication::notify(QObject*, QEvent*) + 703
13 0x7f1738ec59dc QApplicationPrivate::notify_helper(QObject*, QEvent*) + 156
12 0x7f17367c7feb QObject::event(QEvent*) + 139
11 0x7f17367d3cc8 QTimer::timerEvent(QTimerEvent*) + 40
10 0x7f17367d3997 QTimer::timeout(QTimer::QPrivateSignal) + 39
9 0x7f17367cfda3 /gpfs/work/cin_staff/amemmol1/spack/install/linux-centos7-broadwell/gcc-7.3.0/qt-5.14.2-zzcqf63o4xs4prosv7a6w3gdvxbu2y4c/lib/libQt5Core.so.5(+0x2ceda3) [0x7f17367cfda3]
8 0x7f1741366c7d /gpfs/work/cin_staff/amemmol1/spack/install/linux-centos7-broadwell/gcc-7.3.0/paraview-5.8.0-mb6kqq7wn5eysif3hhs4btlcgwhv3xin/lib64/libpqCore-pv5.8.so.1(+0x131c7d) [0x7f1741366c7d]
7 0x7f1741333029 pqServer::processServerNotification() + 169
6 0x7f173b916362 vtkTCPNetworkAccessManager::ProcessEventsInternal(unsigned long, bool) + 690
5 0x7f173c4339de vtkMultiProcessController::ProcessRMIs(int, int) + 334
4 0x7f173c43338b vtkMultiProcessController::ProcessRMI(int, void*, int, int) + 299
3 0x7f1736e8ac1c /gpfs/work/cin_staff/amemmol1/spack/install/linux-centos7-broadwell/gcc-7.3.0/paraview-5.8.0-mb6kqq7wn5eysif3hhs4btlcgwhv3xin/lib64/libvtkPVServerManagerKit-pv5.8.so.1(+0x211c1c) [0x7f1736e8ac1c]
2 0x7f1736e89ef7 vtkLiveInsituLink::OnInsituPostProcess(double, long long) + 199
1 0x7f1736e8199b vtkExtractsDeliveryHelper::Update() + 907
0 0x7f17426de270 /lib64/libc.so.6(+0x35270) [0x7f17426de270]
( 356.906s) [paraview] :0 FATL| Signal: SIGSEGV
Segmentation fault (core dumped)

```

Thanks to anybody (and perhaps we can add our example to the Catalyst example list, which lacks the VTKRectilinearGrid).

Cheers  
Antonio

---

<div class="post-metadata">

### Author: ![bastian](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bastian/32/7513_2.png) [@bastian](https://discourse.paraview.org/u/bastian)
#### Post date: [August 22, 2020, 8:26am UTC](https://discourse.paraview.org/t/bug-live-visualization-of-vtkrectilineargrid-doesnt-work/5140/2 "2020-08-22T08:26:28Z")

</div>

I have spent quite some time trying to figure out live visualization with rectilinear grids over a year ago until I finally gave up running out of time.

These are my related topics which may be relevant here:

> [@Strange values when adding cell data to grid](https://discourse.paraview.org/t/strange-values-when-adding-cell-data-to-grid/1464):
>
> I’m trying to add cell data to a grid. This is what my FECxx.cxx looks like: // Adaptor for getting Fortran simulation code into ParaView CoProcessor. // CoProcessor specific headers #include "vtkCPDataDescription.h" #include "vtkCPInputDataDescription.h" #include "vtkCPProcessor.h" #include "vtkCPPythonScriptPipeline.h" #include "vtkDoubleArray.h" #include "vtkCellData.h" #include "vtkSmartPointer.h" #include "vtkRectilinearGrid.h" // Fortran speci…

> [@Declaration of ghost cells for rectilinear grid](https://discourse.paraview.org/t/declaration-of-ghost-cells-for-rectilinear-grid/1585/8):
>
> Hi Bastian. Sorry it took me so long to look into this. This is caused by a [bug](https://gitlab.kitware.com/vtk/vtk/issues/17601) in the vtkXMLRectilinearGridReader. The reader actually repartition your data and do not keep the data the way it was partitioned. However it keep the vtkGhostType array the way it was, resulting in the issue. This bug should be fixed, but, you actually do not need to provide the ghost cells, as they are computed on the fly when ParaView need them ! So my advice would be to just not generate GhostCells at all !

and then there is this issue:  
[https://gitlab.kitware.com/paraview/paraview/-/issues/18911](https://gitlab.kitware.com/paraview/paraview/-/issues/18911)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 31, 2020, 9:19am UTC](https://discourse.paraview.org/t/bug-live-visualization-of-vtkrectilineargrid-doesnt-work/5140/3 "2020-08-31T09:19:34Z")

</div>

@bastian: this issue seems different and unrelated to ghost cells.

@amemmolo: could you share the dataset crashing ParaView ?

---

<div class="post-metadata">

### Author: ![bastian](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bastian/32/7513_2.png) [@bastian](https://discourse.paraview.org/u/bastian)
#### Post date: [August 31, 2020, 9:57am UTC](https://discourse.paraview.org/t/bug-live-visualization-of-vtkrectilineargrid-doesnt-work/5140/4 "2020-08-31T09:57:27Z")

</div>

If Antonio’s code does not use ghost cells this is probably right.  
It’s just that I also received the message `vtkRectilinearGrid cannot be merged` and in my case it was due to the ghost cells. Just saying.

---

<div class="post-metadata">

### Author: ![amemmolo](https://discourse.paraview.org/user_avatar/discourse.paraview.org/amemmolo/32/4742_2.png) [@amemmolo](https://discourse.paraview.org/u/amemmolo)
#### Post date: [September 1, 2020, 1:58pm UTC](https://discourse.paraview.org/t/bug-live-visualization-of-vtkrectilineargrid-doesnt-work/5140/5 "2020-09-01T13:58:25Z")

</div>

Hi Mathieu,

The tar.gz that I attached in the issue opening contains already a minimal example that makes Paraview crash. To be more precise, the dataset is correctly written as pvtr output, and if I open the produced dataset (offline), everything goes smoothly, and no error arises. The error arises only during the Live visualization.

You should be able to replicate the issue by recompiling the minimal example and trying the Live visualization.

Thanks for your effort  
Antonio

---

<div class="post-metadata">

### Author: ![amemmolo](https://discourse.paraview.org/user_avatar/discourse.paraview.org/amemmolo/32/4742_2.png) [@amemmolo](https://discourse.paraview.org/u/amemmolo)
#### Post date: [September 1, 2020, 2:07pm UTC](https://discourse.paraview.org/t/bug-live-visualization-of-vtkrectilineargrid-doesnt-work/5140/6 "2020-09-01T14:07:22Z")

</div>

Hi Bastian,

We have the error even without ghosts. The attached minimal example should also not use them.

Thanks  
Antonio

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [September 2, 2020, 7:53am UTC](https://discourse.paraview.org/t/bug-live-visualization-of-vtkrectilineargrid-doesnt-work/5140/7 "2020-09-02T07:53:11Z")

</div>

I missed the part where you said ParaView crashes when visualizing live.  
So I assume that analysing the data offline does not cause any issues ?

This would require much deeper analysis.

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [September 2, 2020, 8:11am UTC](https://discourse.paraview.org/t/bug-live-visualization-of-vtkrectilineargrid-doesnt-work/5140/8 "2020-09-02T08:11:56Z")

</div>

The answer is in the first warning

```auto
( 26.192s) [pvbatch.0]vtkMultiProcessControll:175 WARN| vtkRectilinearGrid cannot be merged

```

To perform live visu, all nodes should send data to rank 0. This rank should aggregate data and render it. Problem, the code that should handle the aggregation ([https://gitlab.kitware.com/paraview/paraview/-/blob/master/VTKExtensions/Core/vtkMultiProcessControllerHelper.cxx#L115](https://gitlab.kitware.com/paraview/paraview/-/blob/master/VTKExtensions/Core/vtkMultiProcessControllerHelper.cxx#L115)) does not support `vtkRectilinearGrid` … This may be improved using the `vtkAppendRectilinearGridFilter`

@amemmolo, can you open an issue [https://gitlab.kitware.com/paraview/paraview/-/issues](https://gitlab.kitware.com/paraview/paraview/-/issues) ? (we also accept MR if you want to)

---

<div class="post-metadata">

### Author: ![amemmolo](https://discourse.paraview.org/user_avatar/discourse.paraview.org/amemmolo/32/4742_2.png) [@amemmolo](https://discourse.paraview.org/u/amemmolo)
#### Post date: [September 2, 2020, 10:09am UTC](https://discourse.paraview.org/t/bug-live-visualization-of-vtkrectilineargrid-doesnt-work/5140/9 "2020-09-02T10:09:54Z")

</div>

Opened issue [https://gitlab.kitware.com/paraview/paraview/-/issues/20176](https://gitlab.kitware.com/paraview/paraview/-/issues/20176)

Thanks  
Antonio

---

<div class="post-metadata">

### Author: ![amemmolo](https://discourse.paraview.org/user_avatar/discourse.paraview.org/amemmolo/32/4742_2.png) [@amemmolo](https://discourse.paraview.org/u/amemmolo)
#### Post date: [September 2, 2020, 10:26am UTC](https://discourse.paraview.org/t/bug-live-visualization-of-vtkrectilineargrid-doesnt-work/5140/10 "2020-09-02T10:26:52Z")

</div>

Analysing the data offline everything works smoothly. Actually, if I’m not wrong, when I don’t directly visualize the rectilinear grid everything works even live (i.e., taking a contour out of the rectilinear grid without visualizing the rectilinear grid, and then visualizing only the contour (which is now unstructured), it works), but it is not easy for me to test it right now because of my current connection
