Error in Paraview 5.8.1 - Could not find the MPI external dependency.

Hello,

I am trying to build paraview 5.8.1 from the source code, and I am enabling MPI. However I am getting the error:

 CMake Error at VTK/CMake/vtkModule.cmake:4112 (message):
   Could not find the MPI external dependency.
 Call Stack (most recent call first):
 VTK/CMake/vtkModule.cmake:4635 (vtk_module_find_package)
 VTK/Utilities/MPI/CMakeLists.txt:1 (vtk_module_third_party_external)
  1. It does build without MPI
  2. I am using openmpi_4.0.5_intel_2020.2
  3. when I compile with openmpi_4.0.1 it does build, compile and install.

Any thoughts ?
I appreciate the help in advance.

What version of CMake are you using. Does 5.9/master work at all (trying to figure out whether FindMPI is at fault or not)? We might need to update FindMPI for this release/build of OpenMPI.

Cc: @chuckatkins

I am using cmake 3.15.4.
I can’t tests paraview 5.9 because it requires qt.12 which is not installed in the system.

Any suggestions ?

Hello again,

I managed to install qt 5.12 and paraview 5.9 using openmpi_4.0.5_intel_2020.2. In the cmake configuration I used :

-DCMAKE_C_COMPILER=/gpfs/runtime/opt/mpi/openmpi_4.0.5_intel_2020.2/bin/mpicc -DCMAKE_CXX_COMPILER=/gpfs/runtime/opt/mpi/openmpi_4.0.5_intel_2020.2/bin/mpicx

Seems that 5.8.1’s FindMPI that it ships with is insufficient for that OpenMPI. I suspect using a newer CMake might also help, but I can’t guarantee anything.

Not related to this message that I always keep seeing?
It looks like the regular find mpi tries various C, CXX etc languages and then the next package warns about the syntax.

CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
  The package name passed to `find_package_handle_standard_args` (MPI_C) does
  not match the name of the calling package (MPI).  This can lead to problems
  in calling code that expects `find_package` result variables (e.g.,
  `_FOUND`) to follow a certain pattern.

I have mpich, openmpi and openmpi2 installed on my suse system:

  • /usr/lib64/mpi/gcc/mpich
  • /usr/lib64/mpi/gcc/openmpi
  • /usr/lib64/mpi/gcc/openmpi2

Currently active is openmpi2 (mpicc is /usr/lib64/mpi/gcc/openmpi2/bin/mpicc)
but it finds mpich instead.

That warning can be ignored; newer FindMPI versions have fixed the problem; it’s just a warning that something might be wrong (FindMPI is doing that part right at least).

As for OpenSuse things…FindMPI is really complicated. You can try setting some of the cache variables that are mpich-y to being the openmpi ones.

Setting MPI_HOME as a hint seems to help guide things.