Dear Maintainer,
* What led up to the situation?
Building a CMake based code using FindPETSc.cmake (which is made by a petsc
dev), it refused to use the petsc3.9 installation, as it failed to build a
small test code.
After some digging, I found that it was only missing the include path to the
mpi headers.
petsc-dev-3.7.5 included the path -I/usr/lib/x86_64-linux-gnu/openmpi/include,
which is gone from the 3.8 and 3.9 packages.
It's missing from petscvariables, but it's also missing from the pkgconfig
file.
* What exactly did you do (or not do) that was effective (or
ineffective)?
Hacking in -I/usr/lib/x86_64-linux-gnu/openmpi/include into PETSC_CC_INCLUDES
resolved the issues with FindPETSc.cmake.
Best regards, Mikael
On Mon, 23 Jul 2018 02:16:13 +0200 =?utf-8?q?Mikael_=C3=96hman?= <micke teer@gmail.com> wrote: ... petsc build a to the gnu/openmpi/include, pkgconfig Thanks for the report Mikael. Hopefully won't be too hard to find why the path disappeared in 3.8. Drew
Upstream suggested that the --with-mpi-dir configuration options does not need to be (and should not be) invoked if compilation is done with mpicc and friends. And use of mpicc is recommended to get the flags right. The short workaround for you is to set mpicc as your CC. mpicc sets the include dirs that you're missing. Let me know if that fits in with the intentions of the PETSc developer who made the FindPETSc.cmake that you're using. If not, we can discuss it further with them and the other PETSc developers. Drew