<div dir="ltr"><div class="gmail_default" style="font-size:small">Thanks for explanation. Let me see if I can find some samples.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Best,</div><div class="gmail_default" style="font-size:small">Paul</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 Mon, Dec 1, 2014 at 4:49 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>
> Hi Jed,<br>
><br>
</span><span class="">> Now I see PETSc is compiled correctly. However, when I attempted to call<br>
> "petscksp.h" in my own program (quite simple one), it failed for some<br>
> reason. Attached you can see two cases. The first is just the test of MPI,<br>
> which is fine. The second is one added PETSc, which has segment fault as it<br>
> went to<br>
><br>
> MPI_Comm_rank (MPI_COMM_WORLD, &rank); /* get current<br>
> process id */<br>
<br>
</span>I don't see anything obviously wrong, though cout is probably buffered<br>
so execution might have gotten further. As I said earlier, you should<br>
run in a debugger. I'm sorry, but we don't have time to debug your<br>
configuration over email---it takes away from time we would otherwise<br>
spend improving the library.<br>
<br>
I recommend starting with a working example from the PETSc tree and<br>
incrementally change it to do what you want. Make sure your hand-rolled<br>
CMake is linking exactly the same as PETSc. Or use FindPETSc.cmake.<br>
<span class=""><br>
> Can you shed some light? The MPI version is 1.8.3.<br>
<br>
</span>"MPI" is a standard, "Open MPI" is the implementation you are using.<br>
</blockquote></div><br></div>