On Sat, May 12, 2012 at 4:33 AM, Mohammad Mirzadeh <span dir="ltr"><<a href="mailto:mirzadeh@gmail.com" target="_blank">mirzadeh@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi guys,<div><br></div><div>I'm having a really weird issue here! My code seg faults for certain problem size and after using gdb I have been able to pinpoint the problem to a VecGetArray call. Here's a series of things I have tried so far</div>
<div><br></div><div>1) -on_error_attach_debugger -----> unsuccessful; does not launch debugger </div><div>2) -start_in_debugger -------> unsuccessful; does not start debugger</div></div></blockquote><div><br></div>
<div>Run with -log_summary. It will tell you what options the program got. Also, are there errors relating to X? Send</div><div>all output to <a href="mailto:petsc-maint@mcs.anl.gov">petsc-maint@mcs.anl.gov</a></div><div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>3) attaching debugger myself -----> code runs in debugger and seg faults when calling VecGetArray</div>
</div></blockquote><div><br></div><div>Is this a debug build? What dereference is causing the SEGV? Is the Vec a valid object? It sounds like</div><div>it has been corrupted.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>4) using ierr=VecGetArray;CHKERRQ(ierr) ------> PETSc does not produce error messages; the code simply seg faults and terminates</div><div>5) checking the values of ierr inside the debugger ---------> They are all 0 up untill the code terminates; I think this means petsc does not generate error?</div>
<div>6) checking for memory leak with valgrind -----------> All I get are leaks from OpenMPI and PetscInitialize and PetscFinalize; I think these are just routine and safe?</div></div></blockquote><div><br></div><div>
How can we say anything without the valgrind output?</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<div><br></div><div>What else can I try to find the problem? Any recommendation is really appreciated!</div>
<div><br></div><div>Thanks,</div><div>Mohammad</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <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>