FindMPI.cmake on OpenSUSE overrides mpi-selector
I have been running into issues building PETSc
and some of its subpackages (specifically SuperLU) using cmake
and my system openmpi
. I think the problem is that cmake
is interweaving MPI implementations because it's overriding the system MPI based on mpi-selector
due to a hard-coded search path in FindMPI.cmake
- see lines 1251-1254.
On OpenSUSE (and probably SLES as well, but I don't have access to test), the default openmpi{,-devel}
package is openmpi 1.10.7 and puts its files in /usr/lib64/mpi/gcc/openmpi
. I also have a custom openmpi3
installed at /usr/local/lib/mpi/gcc/openmpi3
, with an associated mpi-selector
data file in /var/mpi-selector/data
- this file sets the appropriate paths.
The mpi-selector
tool places all required MPI paths into PATH
and LD_LIBRARY_PATH
, so I don't think that cmake
needs to override this search path with a hard-coded path.