# How to force netcdf parallel build in Paraview 5.10.0

**URL:** https://discourse.paraview.org/t/how-to-force-netcdf-parallel-build-in-paraview-5-10-0/8786
**Category:** Development
**Created:** [January 17, 2022, 9:46am UTC](https://discourse.paraview.org/t/how-to-force-netcdf-parallel-build-in-paraview-5-10-0/8786 "2022-01-17T09:46:05Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Trophime](https://discourse.paraview.org/user_avatar/discourse.paraview.org/trophime/32/966_2.png) [@Trophime](https://discourse.paraview.org/u/Trophime)
#### Post date: [January 17, 2022, 9:46am UTC](https://discourse.paraview.org/t/how-to-force-netcdf-parallel-build-in-paraview-5-10-0/8786/1 "2022-01-17T09:46:06Z")

</div>

Hi,  
I’m trying to rebuild paraview 5.10.0 as a debian package for Debian/Testing  
I would like to make a clean build using hdf5 mpi version.

This is why I have to rebuild netcdf requirement instead of using netcdf packages.  
But it seems that necdf (from VTK Thirdparty) is not build with mpi support  
vtk\_netcdf\_has\_parallel is equal to FALSE which iduces errors when building vtkioss.

How can I force the netcdf to be build with mpi support?  
Thanks for your help

Best

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 17, 2022, 12:30pm UTC](https://discourse.paraview.org/t/how-to-force-netcdf-parallel-build-in-paraview-5-10-0/8786/2 "2022-01-17T12:30:18Z")

</div>

The embedded copies are generally as simple as they come. NetCDF needs to be provided from externally if it is to be MPI-aware. There is logic to forward MPI if the HDF5 is parallel, but that doesn’t make NetCDF itself parallel.

---

<div class="post-metadata">

### Author: ![Trophime](https://discourse.paraview.org/user_avatar/discourse.paraview.org/trophime/32/966_2.png) [@Trophime](https://discourse.paraview.org/u/Trophime)
#### Post date: [January 17, 2022, 1:02pm UTC](https://discourse.paraview.org/t/how-to-force-netcdf-parallel-build-in-paraview-5-10-0/8786/3 "2022-01-17T13:02:46Z")

</div>

My point is that I run into an issue with vtkioss when either using netcdf debian package or vtknetcdf:

```auto
In file included from /build/paraview-5.10.0~rc2/VTK/Utilities/MPI/vtk_mpi.h:26,
                 from /build/paraview-5.10.0~rc2/build.python3.9/VTK/ThirdParty/hdf5/vtk_hdf5.h:26,
                 from /build/paraview-5.10.0~rc2/VTK/ThirdParty/ioss/vtkioss/cgns/Iocgns_Utils.C:58:
/usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h:419:37: error: conflicting declaration 'typedef struct ompi_communicator_t* MPI_Comm'
  419 | typedef struct ompi_communicator_t *MPI_Comm;
      | ^ ~~~~~~~
In file included from /build/paraview-5.10.0~rc2/VTK/ThirdParty/ioss/vtkioss/Ioss_GroupingEntity.h:12,
                 from /build/paraview-5.10.0~rc2/VTK/ThirdParty/ioss/vtkioss/Ioss_Assembly.h:14,
                 from /build/paraview-5.10.0~rc2/VTK/ThirdParty/ioss/vtkioss/cgns/Iocgns_Utils.C:7:
/build/paraview-5.10.0~rc2/VTK/ThirdParty/ioss/vtkioss/Ioss_CodeTypes.h:76:7: note: previous declaration as 'using MPI_Comm = int'
   76 | using MPI_Comm = int;
      | ^ ~~~~~~~

```

This problem arises from not having SEACAS\_HAVE\_MPI ON, right?  
It seems that vtk\_netcfd\_has\_parallel is required to have SEACAS\_HAVE\_MPI ON  
That’s why I was trying to build vtknetcdf with mpi support

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 17, 2022, 3:05pm UTC](https://discourse.paraview.org/t/how-to-force-netcdf-parallel-build-in-paraview-5-10-0/8786/4 "2022-01-17T15:05:18Z")

</div>

Yes, IOSS was set up that “I’m not using MPI, so _no one_ must be using it”. This has been fixed upstream to instead use an `Ioss_MPI_Comm` name instead of squatting on the `MPI_Comm` name. It will be fixed in 5.10.1 (due in February).

---

<div class="post-metadata">

### Author: ![Trophime](https://discourse.paraview.org/user_avatar/discourse.paraview.org/trophime/32/966_2.png) [@Trophime](https://discourse.paraview.org/u/Trophime)
#### Post date: [January 17, 2022, 3:10pm UTC](https://discourse.paraview.org/t/how-to-force-netcdf-parallel-build-in-paraview-5-10-0/8786/5 "2022-01-17T15:10:28Z")

</div>

Ok thanks.  
Just a last question  
If I want to explicitly disable ioss in paraview build I have to use  
-DVTK\_ENABLE\_IOSS=OFF ?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 17, 2022, 5:12pm UTC](https://discourse.paraview.org/t/how-to-force-netcdf-parallel-build-in-paraview-5-10-0/8786/6 "2022-01-17T17:12:31Z")

</div>

I don’t see any record of that variable, so I don’t think that’d do anything.

You can pass `VTK_MODULE_ENABLE_VTK_ioss=NO`, but looking, I think this may end up conflicting with `VTK::IOIOSS` being required in “standard” ParaView builds. You may need to choose a different `PARAVIEW_BUILD_EDITION` setting.

Looking deeper, it looks like `netcdf` also has `MPI_Comm` conflicting decisions that need to be resolved…

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [January 17, 2022, 5:29pm UTC](https://discourse.paraview.org/t/how-to-force-netcdf-parallel-build-in-paraview-5-10-0/8786/7 "2022-01-17T17:29:34Z")

</div>

Actually, IOSS hasn’t fixed it either. I confused it with a similar change. I’ll work on that upstream.

---

<div class="post-metadata">

### Author: ![Trophime](https://discourse.paraview.org/user_avatar/discourse.paraview.org/trophime/32/966_2.png) [@Trophime](https://discourse.paraview.org/u/Trophime)
#### Post date: [January 17, 2022, 6:18pm UTC](https://discourse.paraview.org/t/how-to-force-netcdf-parallel-build-in-paraview-5-10-0/8786/8 "2022-01-17T18:18:02Z")

</div>

[FindNetCDF.cmake](https://discourse.paraview.org/uploads/short-url/wVbmQwSrbazUSzjoEcmBZvQtC5s.cmake) (5.4 KB)

I’ve tried to use the above `FindNetCDF.cmake` alongside with `libnetcdf-mpi-dev`  
It seems to compile smoothly provided you add tihs option to cmake:  
` -DCMAKE_PREFIX_PATH="/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/netCDF_mpi"`

with `DEB_HOST_MULTIARCH=x86_64-linux-gnu` in my case (Debian/Testing)
