<div class="gmail_quote">On Sun, Aug 26, 2012 at 8:42 PM, Colin McAuliffe <span dir="ltr"><<a href="mailto:cjm2176@columbia.edu" target="_blank">cjm2176@columbia.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":3q9">Im getting segmentation faults when I call PetscSectionSetChart, gdb is telling me this:<br>
<br>
Program received signal EXC_BAD_ACCESS, Could not access memory.<br>
Reason: 13 at address: 0x0000000000000000<br>
0x00000001005f9585 in PetscTrFreeDefault (aa=0x4008000000000000, line=296, function=0x1016bd470 "PetscSectionSetChart",<br>
    file=0x1016bcbb8 "/Users/christina/Desktop/<u></u>COLIN/Work/petsc-dev/src/vec/<u></u>vec/impls/seq/vsection.c", dir=0x1016bca50 "")<br>
    at /Users/christina/Desktop/<u></u>COLIN/Work/petsc-dev/src/sys/<u></u>memory/mtr.c:279<br>
279       if (head->classid != CLASSID_VALUE) {<br>
(gdb) ba<br>
#0  0x00000001005f9585 in PetscTrFreeDefault (aa=0x4008000000000000, line=296, function=0x1016bd470 "PetscSectionSetChart",<br>
    file=0x1016bcbb8 "/Users/christina/Desktop/<u></u>COLIN/Work/petsc-dev/src/vec/<u></u>vec/impls/seq/vsection.c", dir=0x1016bca50 "")<br>
    at /Users/christina/Desktop/<u></u>COLIN/Work/petsc-dev/src/sys/<u></u>memory/mtr.c:279<br>
#1  0x000000010075120b in PetscSectionSetChart (s=0x102e06910, pStart=1, pEnd=0)<br>
    at /Users/christina/Desktop/<u></u>COLIN/Work/petsc-dev/src/vec/<u></u>vec/impls/seq/vsection.c:296<br>
#2  0x00000001006e99f3 in petscsectionsetchart_ (s=0x7fff5fbfee38, pStart=0x10165bc1c, pEnd=0x10165bc18, __ierr=0x7fff5fbfee4c)<br>
    at /Users/christina/Desktop/<u></u>COLIN/Work/petsc-dev/src/vec/<u></u>vec/impls/seq/ftn-auto/<u></u>vsectionf.c:148<br>
#3  0x0000000100020c4c in setfs_ (fsind=<value temporarily unavailable, due to optimizations>,<br>
    numfields=<value temporarily unavailable, due to optimizations>) at umacr8.F:96<br></div></blockquote><div><br></div><div>It would help to have a non-optimized trace. Have you run this under valgrind?</div><div>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":3q9">
<br>
<br>
Also, calling:<br>
<br>
      call PetscSectionCreate(PETSC_COMM_<u></u>WORLD,sec,ierr)<br>
      call PetscSectionGetChart(sec,<u></u>pStart,pEnd,ierr)<br>
<br>
returns pStart = 1 and pEnd = 0. Shouldn't PetscSectionCreate set pStart and pEnd to -1 and -1?<br>
<br>
I am a bit stumped here, any idea what is going on?</div></blockquote></div><br>