# ExtractSurface causes the whole pipeline to execute twice when using MPI

**URL:** https://discourse.paraview.org/t/extractsurface-causes-the-whole-pipeline-to-execute-twice-when-using-mpi/11539
**Category:** Development
**Tags:** mpi
**Created:** [March 1, 2023, 8:42am UTC](https://discourse.paraview.org/t/extractsurface-causes-the-whole-pipeline-to-execute-twice-when-using-mpi/11539 "2023-03-01T08:42:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![eve-le-guillou](https://discourse.paraview.org/user_avatar/discourse.paraview.org/eve-le-guillou/32/11047_2.png) [@eve-le-guillou](https://discourse.paraview.org/u/eve-le-guillou)
#### Post date: [March 1, 2023, 8:42am UTC](https://discourse.paraview.org/t/extractsurface-causes-the-whole-pipeline-to-execute-twice-when-using-mpi/11539/1 "2023-03-01T08:42:42Z")

</div>

Hi all,

I have noticed that sometimes Paraview executes twice some filters even when it is not needed when using MPI. I have noticed that this happens when the ExtractSurface filter is present in the Pipeline.

I use MPI 4.0.3 and Paraview 5.10.1 to which I added a line of code:

```
std::cout<< "In Here"<<std::endl;

```

The line is added at the beginning of the RequestData function of the file VTK/Filters/Core/vtkThreshold.cxx and is only here to show that Threshold executes twice.

Here is my pipeline (with the file [here](https://discourse.paraview.org/uploads/short-url/79i7Jl0tFWQDYJY0jm4tw14cWZ5.pvsm) (392.4 KB)):

```
Wavelet > Threshold > ExtractSurface

```

Both Threshold and ExtractSurface are visible. I then execute this on Paraview, using:

```
mpirun -n 2 pvserver

```

and

```
paraview

```

When this is executed, I can see that the message “In Here” appears 4 times, even though it is only supposed to be shown twice. Threshold is therefore executed twice. This also happens when the Pipeline is in Python code and executed with `pvbatch`. However, if executed on only one process, the bug doesn’t appear.

This is a problem for me as my Paraview plugin cashes information and the second execution can cause errors.

Thanks for any help.

---

<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: [March 1, 2023, 2:27pm UTC](https://discourse.paraview.org/t/extractsurface-causes-the-whole-pipeline-to-execute-twice-when-using-mpi/11539/2 "2023-03-01T14:27:40Z")

</div>

Confirmed, this is really strange.

Could you open an issue ?  
[https://gitlab.kitware.com/paraview/paraview/-/issues](https://gitlab.kitware.com/paraview/paraview/-/issues)

---

<div class="post-metadata">

### Author: ![eve-le-guillou](https://discourse.paraview.org/user_avatar/discourse.paraview.org/eve-le-guillou/32/11047_2.png) [@eve-le-guillou](https://discourse.paraview.org/u/eve-le-guillou)
#### Post date: [March 1, 2023, 2:33pm UTC](https://discourse.paraview.org/t/extractsurface-causes-the-whole-pipeline-to-execute-twice-when-using-mpi/11539/3 "2023-03-01T14:33:59Z")

</div>

Hi,

Thank you for your reply.  
I just created the issue here: [https://gitlab.kitware.com/paraview/paraview/-/issues/21795](https://gitlab.kitware.com/paraview/paraview/-/issues/21795)
