<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 01/02/13 17:41, Jed Brown wrote:<br>
</div>
<blockquote
cite="mid:CAM9tzS=G4zKsuuYMSTDFkMGPRy342njmDsYrwd1q8+rincY_iw@mail.gmail.com"
type="cite">
<div dir="ltr">On Wed, Jan 2, 2013 at 8:09 AM, Hoang Giang Bui <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:hgbk2008@gmail.com" target="_blank">hgbk2008@gmail.com</a>></span>
wrote:<br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
Hi<br>
<br>
When I ran the standard example of petsc4py, I got the
error below<br>
<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 moz-do-not-send="true"
href="http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind[0]PETSC"
target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind[0]PETSC</a>
ERROR: or try <a moz-do-not-send="true"
href="http://valgrind.org" target="_blank">http://valgrind.org</a>
on GNU/linux and Apple Mac OS X to find memory corruption
errors<br>
[0]PETSC ERROR: configure using --with-debugging=yes,
recompile, link, and run<br>
[0]PETSC ERROR: to get more information on the crash.<br>
</blockquote>
<div><br>
</div>
<div style="">If you followed these directions, you'd have
gotten this error message:<br>
<br>
<div>Traceback (most recent call last):</div>
<div> File "/home/jed/dl/ex1.py", line 27, in
<module></div>
<div> Istart, Iend = A.getOwnershipRange()</div>
<div> File "Mat.pyx", line 453, in
petsc4py.PETSc.Mat.getOwnershipRange
(src/petsc4py.PETSc.c:83937)</div>
<div>petsc4py.PETSc.Error: error code 73</div>
<div>[0] MatGetOwnershipRange() line 6025 in
/home/jed/petsc/src/mat/interface/matrix.c</div>
<div>[0] Object is in wrong state</div>
<div>[0] Must call MatXXXSetPreallocation() or MatSetUp()
on argument 1 "mat" before MatGetOwnershipRange()<br>
<br>
If you add A.setUp() or use a preallocation routine,
you'll get the picture you wanted.</div>
</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">--------------------------------------------------------------------------<br>
MPI_ABORT was invoked on rank 0 in communicator
MPI_COMM_WORLD<br>
with errorcode 59.<br>
<br>
NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI
processes.<br>
You may or may not see output from other processes,
depending on<br>
exactly when Open MPI kills them.<br>
<br>
Moreover, printing out the value of Istart and Iend
returns 0 (at A.getOwnershipRange())<br>
<br>
Please advise the root cause of this problem. I compiled
petsc4py-dev against petsc-3.3-p5 in debug mode.<br>
<br>
BR<span class=""><font color="#888888"><br>
Giang Bui<br>
<br>
</font></span></blockquote>
</div>
<br>
</div>
</div>
</blockquote>
That's great. Thank you very much.<br>
<br>
Anyway. How do you have the Traceback functionality? I already
compiled petsc --with-debugging=1 but the error still shown as I
haven't set it.<br>
<br>
BR<br>
Giang Bui<br>
<br>
</body>
</html>