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
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.
My point is that I run into an issue with vtkioss when either using netcdf debian package or vtknetcdf:
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
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).
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…
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)