<div dir="ltr"><div class="gmail_default" style="font-size:small">Jed,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for your consistent help Bro. I wish I could help you or the community back in some way.</div><div class="gmail_default" style="font-size:small"> </div><div class="gmail_default" style="font-size:small">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. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default">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. <br></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.800000190734863px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.800000190734863px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.800000190734863px"><br></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.800000190734863px">Attached is my script to install PETSc. Maybe it helps to the others. </span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.800000190734863px"><br></span></div><div class="gmail_default"><div class="gmail_default">#!/bin/sh</div><div style="font-size:small"><br></div></div><div class="gmail_default"><div class="gmail_default">export PETSC_DIR=`pwd`</div><div class="gmail_default">export PETSC_ARCH=linux-gnu-intel</div><div class="gmail_default"><br></div><div class="gmail_default">MKLPATH=/share/cluster/RHEL6.2/x86_64/apps/intel/ict/composer_xe_2013.0.079/mkl/lib/intel64</div><div class="gmail_default">VALGRINDPATH=/share/cluster/RHEL6.2/x86_64/apps/valgrind/3.9.0</div><div class="gmail_default">HDF5PATH=/share/cluster/SLES9/x86_64/apps/hdf5/1.8.3</div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default">./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</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_default" style="font-size:small">Best,<br>Paul</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div style="color:rgb(0,0,0)"><font size="1">Huaibao (Paul) Zhang<br><b><i>Gas Surface Interactions Lab</i></b><br></font></div>
<div style="color:rgb(0,0,0)"><font size="1">Department of Mechanical Engineering</font></div>
<div style="color:rgb(0,0,0)"><font size="1">University of Kentucky,</font></div>
<div style="color:rgb(0,0,0)"><font size="1">Lexington,</font></div>
<div style="margin:0px;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;line-height:normal;font-size-adjust:none;font-stretch:normal"><font size="1">KY, 40506-0503<b><br>Office</b>: 216 Ralph G. Anderson Building<br><b>Web</b>:<a href="http://gsil.engineering.uky.edu" target="_blank"><span style="color:rgb(0,0,153)">gsil.engineering.uky.edu</span></a></font><span style="color:rgb(0,0,0)"><span style="color:rgb(0,0,153)"></span></span></div><div style="color:rgb(255,102,102)"><font size="1"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="font-family:Tahoma"><span style="font-family:Verdana"><font face="Helvetica"><span></span></font></span></span></span></span></span></span></span></font></div></div></div>
<br><div class="gmail_quote">On Fri, Dec 19, 2014 at 10:05 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">paul zhang <<a href="mailto:paulhuaizhang@gmail.com">paulhuaizhang@gmail.com</a>> writes:<br>
<br>
> Jed,<br>
><br>
> I want to use CMake for a package that dependents on PETSc. It seems work<br>
> this morning.<br>
<br>
</span>Sounds like you're set.  You can use my FindPETSc.cmake if you want.<br>
</blockquote></div><br></div>