[petsc-dev] CMake: make, install, find_package ?
Satish Balay
balay at mcs.anl.gov
Sun Nov 5 10:13:25 CST 2017
On Sun, 5 Nov 2017, Jed Brown wrote:
> Franck Houssen <franck.houssen at inria.fr> writes:
>
> > Here is a bundle you can pull for you to have a look (franck/cmake branch - push KO to the bitbucket as I don't know which loggin/password to use): take it or leave it ! :D
> >
> > On debian, I have a "real" cmake build (not the configure traces) in a dedicated BUILD directory (make things cleaner).
>
> PETSC_ARCH is a dedicated build directory.
>
> Porting a configuration from our Python (BuildSystem) to CMake for
> cross-compilation and all the optional dependencies would be monumental
> task and would result in a portability regression for systems where
> platform files are not yet available.
>
> > More important: getting find_package to work will be much more reliable than resorting to FindPETSc.cmake (often KO as architecture/OS specific...).
>
> Please use the pkg-config file that PETSc generates.
>
> > I would understand you give up with CMake for reason of your own reason (!)...
> > But if so, the simple presence of CMakeLists.txt may be misleading (personal opinion: people can go "let's try to use it".).
> >
> > Hope this helps !...
> >
> > Franck
> >
> > /petsc> ./configure; mkdir BUILD; cd BUILD; cmake -DPETSc_CMAKE_ARCH=arch-linux2-c-opt -DCMAKE_INSTALL_PREFIX=/tmp/local ..; make; make install
And we never supported this build mode - or documented it - or recommended it.
Configure used cmake to generate gnumakefiles [so presumably this step is already done]. So the next step would be 'make all-cmake'
This basically did:
cd arch-linux2-c-opt && make -j ${MAKE_NP}
Check 'ccmake:' target in lib/petsc/conf/rules
Satish
> > ...
> > -- Configuring done
> > -- Generating done
> > -- Build files have been written to: /home/fghoussen/Documents/INRIA/petsc/BUILD
> > Scanning dependencies of target petsc
> > [ 0%] Building Fortran object CMakeFiles/petsc.dir/src/sys/f90-mod/petscsysmod.F.o
> > [ 0%] Building Fortran object CMakeFiles/petsc.dir/src/vec/f90-mod/petscvecmod.F.o
> > ...
> >
> > ----- Mail original -----
> >> De: "Satish Balay" <balay at mcs.anl.gov>
> >> À: "Franck Houssen" <franck.houssen at inria.fr>
> >> Cc: "petsc-dev" <petsc-dev at mcs.anl.gov>, "Jed Brown" <jed at jedbrown.org>
> >> Envoyé: Dimanche 5 Novembre 2017 15:52:44
> >> Objet: Re: [petsc-dev] CMake: make, install, find_package ?
> >>
> >> On Sun, 5 Nov 2017, Franck Houssen wrote:
> >>
> >> > > Or are you having trouble with
> >> > > https://github.com/jedbrown/cmake-modules/blob/master/FindPETSc.cmake ?
> >> > > [and not with PETSc build?]
> >> >
> >> > At first, I was trying to understand why find_package(petsc) was not
> >> > working.
> >> > So then, I looked at the way the make/install was done: that lead me to
> >> > look at the CMakeLists.txt and test it.
> >> >
> >>
> >> > > > What did not work for you? Please send relavent logs.
> >> >
> >> > Didn't find mpi.mod.
> >> > find_package(MPI) was missing: I just added it.
> >> > Still can push if you want to have a look (?).
> >>
> >> So your primary issue is with FindPETSc.cmake - and the fix you have is for
> >> petsc?
> >>
> >> Sure post the patch or push [where?] and Jed might review..
> >>
> >> Instructions to reproduce the problem will help.
> >>
> >> Satish
> >>
>
More information about the petsc-dev
mailing list