On Fri, Sep 4, 2009 at 10:35 AM, Klaij, Christiaan <span dir="ltr"><<a href="mailto:C.Klaij@marin.nl">C.Klaij@marin.nl</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<font size="2" face="Arial">
<p><font size="2" face="Arial">
<p><font size="2">Hello,<br>
<br>
With the new version 3.0.0-p8, if I assign a value to the dummy in MyKSPConverged at the end of src/ksp/ksp/examples/tutorials/ex2f.F, I get a segmentation fault (this didn't happen with version 2.3.3-p13). Any idea why?<br>
</font></p></font></p></font></div></blockquote><div><br>1) I do not get a SEGV<br><br>2) You should not be setting this at all. You pass in PETSC_NULL_OBJECT, which means you are changing the definition of that<br> basic thing in PETSc. This can produce undefined results.<br>
<br> Matt<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><font size="2" face="Arial"><p><font size="2" face="Arial"><p><font size="2">
$ tail ex2f.F<br>
else<br>
flag = 0<br>
endif<br>
ierr = 0<br>
dummy = 0<br>
<br>
end<br>
$ ./ex2f -my_ksp_convergence<br>
[0]PETSC ERROR: ------------------------------------------------------------------------<br>
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range<br>
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br>
[0]PETSC ERROR: or see <a href="http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal" target="_blank">http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal</a>[0]PETSC ERROR: or try <a href="http://valgrind.org" target="_blank">http://valgrind.org</a> on linux or man libgmalloc on Apple to find memory corruption errors<br>
[0]PETSC ERROR: likely location of problem given in stack below<br>
[0]PETSC ERROR: --------------------- Stack Frames ------------------------------------<br>
[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,<br>
[0]PETSC ERROR: INSTEAD the line number of the start of the function<br>
[0]PETSC ERROR: is given.<br>
[0]PETSC ERROR: [0] GMREScycle line 133 src/ksp/ksp/impls/gmres/gmres.c<br>
[0]PETSC ERROR: [0] KSPSolve_GMRES line 228 src/ksp/ksp/impls/gmres/gmres.c<br>
[0]PETSC ERROR: [0] KSPSolve line 308 src/ksp/ksp/interface/itfunc.c<br>
[0]PETSC ERROR: --------------------- Error Message ------------------------------------<br>
[0]PETSC ERROR: Signal received!<br>
[0]PETSC ERROR: ------------------------------------------------------------------------<br>
[0]PETSC ERROR: Petsc Release Version 3.0.0, Patch 8, Fri Aug 21 14:02:12 CDT 2009<br>
[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
[0]PETSC ERROR: See docs/index.html for manual pages.<br>
[0]PETSC ERROR: ------------------------------------------------------------------------</font>
</p>
</font></p><font size="2" face="Arial">
<table style="width: 475px; height: 180px;" border="0" cellpadding="0" cellspacing="1" width="471">
<tbody>
<tr>
<td colspan="3"><img alt="" src="cid:imagea89271.jpg@a6640fe9.31804870" style="vertical-align: bottom;" align="left" border="0" hspace="0"><img alt="" src="cid:image93e8e3.jpg@1f08b737.86ba406a" style="vertical-align: top; width: 410px; height: 26px;" align="center" border="0" width="404" height="26" hspace="0"></td>
</tr>
<tr>
<td colspan="3"><font color="#828282" size="2" face="Arial">dr. ir. Christiaan Klaij</font></td></tr>
<tr>
<td colspan="3"><font color="#828282" size="2" face="Arial">CFD Researcher</font></td></tr>
<tr>
<td colspan="3"><font color="#828282" size="2" face="Arial">Research & Development</font></td></tr>
<tr>
<td></td>
<td><font color="#828282" size="2" face="Arial"><b>MARIN</b></font></td></tr>
<tr>
<td width="45%"></td>
<td width="30%"><font color="#828282" size="2" face="Arial">2, Haagsteeg</font></td>
<td></td></tr>
<tr>
<td width="45%"><font style="text-transform: lowercase;" size="2" face="Arial"><a href="mailto:C.Klaij@marin.nl" target="_blank">C.Klaij@marin.nl</a></font></td>
<td width="30%"><font color="#828282" size="2" face="Arial">P.O. Box 28</font></td>
<td width="25%"><font color="#828282" size="2" face="Arial"><font color="#828282">T </font>+31 317 49 39 11</font></td>
</tr><tr>
<td width="45%"><font color="#828282" size="2" face="Arial"></font></td>
<td width="30%"><font color="#828282" size="2" face="Arial">6700 AA Wageningen</font></td>
<td width="25%"><font color="#828282" size="2" face="Arial">F +31 317 49 32 45</font></td></tr>
<tr>
<td width="45%"><font color="#828282" size="2" face="Arial">T <font color="#828282" size="2" face="Arial">+31 317 49 33 44</font></font></td>
<td width="30%"><font color="#828282" size="2" face="Arial">The Netherlands</font></td>
<td width="25%"><font color="#828282" size="2" face="Arial"><font color="#828282">I </font><a href="http://www.marin.nl/" target="_blank"><font color="blue">www.marin.nl</font></a></font></td></tr></tbody></table>
<p></p></font><font size="2" face="Arial"><font size="2" face="Arial"></font></font>
<p></p>
<p><font color="#828282" size="2" face="Arial"><a href="http://www.marin.nl/web/News/News-items/RD-seminar-on-September-22-few-places-left.htm" target="_blank"><font size="2" face="Arial">MARIN webnews:</font></a><font size="2" face="Arial"> <span style="font-size: 10pt; font-family: Arial;" lang="NL">R&D seminar on September 22: few places left</span> <br>
</font></font><br></p></font><span style="font-size: 10pt; font-style: italic; font-family: Arial;"><font color="#828282" size="1"><font color="gray" size="1" face="Arial"><span style="font-size: 8pt; color: gray; font-family: Arial;" lang="EN-GB">This e-mail may be confidential, privileged and/or protected by copyright. If you are not the intended recipient, you should return it to the sender immediately and delete your copy from your system.<br>
</span></font></font></span><br></div>
</blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>