[petsc-users] Integrating PETSc with existing software using CMake

Jed Brown jedbrown at mcs.anl.gov
Mon Jul 30 16:36:02 CDT 2012


On Mon, Jul 30, 2012 at 4:19 PM, Hadayat Seddiqi <hadsed at gmail.com> wrote:

> Hello,
>
> I'm working on a large numerical software project whose framework has
> largely been developed already. We're using CMake to generate makefiles.
> I'm also using SLEPc (for full disclosure). The examples given by PETSc and
> SLEPc documentation require me to include makefiles, but I don't know of
> any straightforward way to command CMake to do this for me.
>
> I have looked at the FAQ's link for the CMake question:
> https://github.com/jedbrown/dohp But this seems very old, and in any case
> it doesn't exactly work.
>

The CMake stuff is here.

https://github.com/jedbrown/cmake-modules/

I'm not an expert on CMake, so I couldn't say what was the causing the
> problem, but in the end it told me it could not find the PETSc libraries.
> It seemed to be rather complicated-- I know PETSc will be where I need it,
> so I don't need all the verification that it's there and everything works.
> I thought, with the benefit of more intimate knowledge of how PETSc runs,
> that someone could show a much simpler way (it seems to me that this ought
> to be the case).
>

The problem is that there are lots of ways that things can "not work", so
its important for the FindPETSc.cmake script to really try. Also, CMake
insists on taking parameters in a different way (e.g. converting
command-line flags to full paths).

Have you looked at the logs (CMakeFiles/CMake{Output,Error}.log

Here is more active package that uses the FindPETSc.cmake script

https://github.com/pism/pism
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120730/0d701e97/attachment.html>


More information about the petsc-users mailing list