MPI_INCLUDE_PATH with too many paths, mpi.h not found
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
I'm building PV 3.8.1 and PV 3.10.1 on exactly the same Debian 6.0 system (64-bit) system using the exact same CMAKE configuration lines:
#!/bin/sh
cmake
-DCMAKE_BUILD_TYPE=Release
-DMANTA_BUILD=$HOME/c/manta-2439-build
-DMANTA_SOURCE=$HOME/c/manta-2439
-DPARAVIEW_BUILD_PLUGIN_Manta=ON
-DPARAVIEW_ENABLE_PYTHON=ON
-DPARAVIEW_USE_MPI=ON
The 3.8.1 build succeeds, but the 3.10.1 buid fails because mpi.h is not being found:
[ 4%] Built target ProcessShader [ 4%] Built target vtkMaterialLibraryConfiguredFiles [ 5%] Built target vtkproj4 [ 5%] Built target lproj [ 5%] Building CXX object VTK/Utilities/mrmpi/src/CMakeFiles/MapReduceMPI.dir/mapreduce.cpp.o /home/opti/c/ParaView-3.10.1/VTK/Utilities/mrmpi/src/mapreduce.cpp:14:17: error: mpi.h: No such file or directory In file included from /home/opti/c/ParaView-3.10.1/VTK/Utilities/mrmpi/src/mapreduce.cpp:22: /home/opti/c/ParaView-3.10.1/VTK/Utilities/mrmpi/src/mapreduce.h:38: error: field 'MPI_Comm' has incomplete type /home/opti/c/ParaView-3.10.1/VTK/Utilities/mrmpi/src/mapreduce.h:81: error: 'MPI_Comm' does not name a type /home/opti/c/ParaView-3.10.1/VTK/Utilities/mrmpi/src/mapreduce.h:93: error: 'MPI_Comm' does not name a type In file included from /home/opti/c/ParaView-3.10.1/VTK/Utilities/mrmpi/src/mapreduce.cpp:23: /home/opti/c/ParaView-3.10.1/VTK/Utilities/mrmpi/src/keyvalue.h:36: error: field 'MPI_Comm' has incomplete type [...]
After the CMake (2.8.5) configuration phase MPI_INCLUDE_PATH is set to "/usr/lib/openmpi/include;/usr/lib/openmpi/include/openmpi". mpi.h is actually only located in /usr/lib/openmpi/include on my system, removing the second path from MPI_INCLUDE_PATH makes the build succeed.