[petsc-users] PETSc and some external libraries configured with CMake?
paul zhang
paulhuaizhang at gmail.com
Sat Dec 20 13:16:32 CST 2014
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. 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.
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.
Attached is my script to install PETSc. Maybe it helps to the others.
#!/bin/sh
export PETSC_DIR=`pwd`
export PETSC_ARCH=linux-gnu-intel
MKLPATH=/share/cluster/RHEL6.2/x86_64/apps/intel/ict/composer_xe_2013.0.079/mkl/lib/intel64
VALGRINDPATH=/share/cluster/RHEL6.2/x86_64/apps/valgrind/3.9.0
HDF5PATH=/share/cluster/SLES9/x86_64/apps/hdf5/1.8.3
./configure --configModules=PETSc.Configure
--optionsModule=PETSc.compilerOptions --with-blas-lapack-dir=$MKLPATH
-lf2clapack -lf2cblas --COPTFLAGS=-O3 --CXXOPTFLAGS=-O3 --with-debugging=1
--with-precision=double --with-shared-libraries --with-x=no --with-x11=no
--with-mpi=1
--with-mpi-dir="/share/cluster/RHEL6.2/x86_64/apps/openmpi/1.6.2"
--with-valgrind-dir=$VALGRINDPATH --download-metis --download-parmetis
--with-hdf5-dir=$HDF5PATH
Best,
Paul
Huaibao (Paul) Zhang
*Gas Surface Interactions Lab*
Department of Mechanical Engineering
University of Kentucky,
Lexington,
KY, 40506-0503
*Office*: 216 Ralph G. Anderson Building
*Web*:gsil.engineering.uky.edu
On Fri, Dec 19, 2014 at 10:05 PM, Jed Brown <jed at jedbrown.org> wrote:
> paul zhang <paulhuaizhang at gmail.com> writes:
>
> > Jed,
> >
> > I want to use CMake for a package that dependents on PETSc. It seems work
> > this morning.
>
> Sounds like you're set. You can use my FindPETSc.cmake if you want.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141220/90980010/attachment.html>
More information about the petsc-users
mailing list