VTK/Parallel/vtkPNetCDFPOPReader.cxx doesn't compile using a standard netcdf installation
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
I am running into the following compiler error if I use a system netcdf installation. Is this a bug in netcdf or vtk?
[ 72%] Building CXX object Parallel/CMakeFiles/vtkParallel.dir/vtkPNetCDFPOPReader.cxx.o /home/domibel/github/VTK/Parallel/vtkPNetCDFPOPReader.cxx:39:6: error: #error MPI_Comm is #define'd somewhere! That's BAD! (Try checking netcdf.h.) /home/domibel/github/VTK/Parallel/vtkPNetCDFPOPReader.cxx: In member function ‘virtual int vtkPNetCDFPOPReader::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*)’: /home/domibel/github/VTK/Parallel/vtkPNetCDFPOPReader.cxx:474:115: error: cannot convert ‘ompi_communicator_t**’ to ‘int*’ in initialization /home/domibel/github/VTK/Parallel/vtkPNetCDFPOPReader.cxx:476:100: error: invalid conversion from ‘int’ to ‘MPI_Comm {aka ompi_communicator_t*}’ [-fpermissive] /usr/lib/openmpi/include/mpi.h:1136:20: error: initializing argument 6 of ‘int MPI_Irecv(void*, int, MPI_Datatype, int, int, MPI_Comm, ompi_request_t**)’ [-fpermissive] /home/domibel/github/VTK/Parallel/vtkPNetCDFPOPReader.cxx: In member function ‘int vtkPNetCDFPOPReader::ReadAndSend(vtkInformation*, int)’: /home/domibel/github/VTK/Parallel/vtkPNetCDFPOPReader.cxx:636:115: error: cannot convert ‘ompi_communicator_t**’ to ‘int*’ in initialization /home/domibel/github/VTK/Parallel/vtkPNetCDFPOPReader.cxx:637:83: error: invalid conversion from ‘int’ to ‘MPI_Comm {aka ompi_communicator_t*}’ [-fpermissive] /usr/lib/openmpi/include/mpi.h:1140:20: error: initializing argument 6 of ‘int MPI_Isend(void*, int, MPI_Datatype, int, int, MPI_Comm, ompi_request_t**)’ [-fpermissive] make[2]: *** [Parallel/CMakeFiles/vtkParallel.dir/vtkPNetCDFPOPReader.cxx.o] Error 1 make[1]: *** [Parallel/CMakeFiles/vtkParallel.dir/all] Error 2 make: *** [all] Error 2