[petsc-users] PETSc and some external libraries configured with CMake?
Jed Brown
jed at jedbrown.org
Sat Dec 20 22:20:19 CST 2014
paul zhang <paulhuaizhang at gmail.com> writes:
> Jed,
>
> Thanks for your consistent help Bro. I wish I could help you or the
> community back in some way.
>
> I am developing a CFD code on the cluster of my university. My code calls
> for PETSc to solve the linear solver, and it uses ParMetis and CGNS
> libraries. I once configured the whole code (my source code, the needed
> libraries above, etc) with CMake, back then the PETSc version is 3.1-p8.
> After I updated the PETSc to the newest, it never worked with me. It got me
> a couple of weeks to figure out what is the real reason. One of the reason
> I guess is that I have to use the mpi compiler from the cluster.
If you have an MPI installation available, you should use that instead
of having PETSc download a new one (which may not use your network
optimally).
> There is nothing wrong with the installation guide on the PETSc
> website. The issue is it does not work with me (maybe only with
> me). The other is I have add the valgrind include dir and lib to my
> previous CMakeList, since it is necessary for the new PETSc.
Not necessary unless PETSc configure found it, but FindPETSc.cmake will
propagate that information.
> The FindPETSc.cmake you wrote works pretty good if I just want to use
> PETSc. Well, it is my problem (or maybe fault) again since I used
> old fashioned cmake and I have to call some other libraries besides PETSc.
The intent is to use FindPETSc.cmake to determine how to compile and
link with PETSc, but you would use other methods (typically
FindXXX.cmake or XXXConfig.cmake) to find other packages.
Personally, I think CMake is more hassle than its worth, but many
projects use it, so I maintain FindPETSc.cmake to make it easier for
them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141220/bb0e387e/attachment.pgp>
More information about the petsc-users
mailing list