[petsc-users] Integrating PETSc with existing software using CMake
Hadayat Seddiqi
hadsed at gmail.com
Fri Aug 3 15:44:31 CDT 2012
I found out that the permissions in my working directory were out of whack,
which wasn't allowing the script to be run. I've fixed this and everything
works flawlessly. Thanks Jed for the CMake scripts.
On Mon, Jul 30, 2012 at 7:46 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Mon, Jul 30, 2012 at 4:27 PM, Hadayat Seddiqi <hadsed at gmail.com> wrote:
>
>> Hi Jed,
>>
>> Apparently it's failing to run the test script (it says
>> PETSC_EXECUTABLE_RUNS was not set). If I'm correct, the output of the
>> failed test script should be in CMakeFiles/CMakeError.log . Looking at
>> this, it gives me the following:
>>
>> In file included from /home/h37/petsc-3.2-p7/include/petscis.h:7,
>> from /home/h37/petsc-3.2-p7/include/petscvec.h:9,
>> from /home/h37/petsc-3.2-p7/include/petscmat.h:6,
>> from /home/h37/petsc-3.2-p7/include/petscdm.h:6,
>> from /home/h37/petsc-3.2-p7/include/petscpc.h:6,
>> from /home/h37/petsc-3.2-p7/include/petscksp.h:6,
>> from /home/h37/petsc-3.2-p7/include/petscsnes.h:6,
>> from /home/h37/petsc-3.2-p7/include/petscts.h:7,
>> from
>> /home/h37/sapphiresimulator/FOP/build/CMakeFiles/CMakeTmp/src.c:3:
>> /home/h37/petsc-3.2-p7/include/petscsys.h:105:17: error: mpi.h: No such
>> file or director
>>
>
> You may need to set the correct MPI wrapper compiler. If that doesn't
> work, can you send the full Output and Error files to petsc-maint?
>
>
>>
>> And of course a lot more afterwards. How is it possible that it cannot
>> find MPI, even though all of the test cases and example/tutorial programs
>> worked with mpi?
>>
>> I realize it's probably bad practice, but I also thought I would try to
>> disable this flag by forcing PETSC_EXECUTABLE_RUNS to "YES", but it doesn't
>> seem to work. I tried commenting out if (${${run}}) and the corresponding
>> endif, as well as moving it outside the macro. I feel rather silly about
>> this, but I just cannot get it to work.
>>
>> Thanks,
>>
>> Had
>>
>> On Mon, Jul 30, 2012 at 5:36 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>>
>>> 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/20120803/04697c53/attachment.html>
More information about the petsc-users
mailing list