<div dir="ltr"><div class="gmail_extra"><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"><div class="gmail_extra"><div class="gmail_quote"><span class=""><br><div><br></div></span><div>Right before you make the branch from master, you should pull. If you pull, you will be 0 commits ahead.</div><div><br></div></div></div></div></blockquote><div><br></div><div>Matt, I am not branching from master.  I have checked out maint in the past week, but don't even think I have do that this clone.</div><div><br></div><div>Anyway, I've blown it away and am starting with a fresh clone.</div><div><br></div><div>Thanks again,</div><div><br></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 class="gmail_extra"><div class="gmail_quote"><div></div><div>   Matt</div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Thanks,</div><div>Mark</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 class="gmail_extra"><div class="gmail_quote"><div></div><div>   Matt</div><div><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>from another branch, at least I did not knowingly.  I am tempted to just start with a fresh clone and redo this whole thing.</div><div><br></div><div>What is going on here?  Did I sleep walk last night and pull from next?</div><div><br></div><div>Can I just push this to master (I tested it and it is a trivial change) or should I reclone. etc.?<br><div><br></div><div>Mark</div><div><br></div><div><div>19:10 edison03 master ~/petsc$ git status</div><div># On branch master</div><div># Your branch is ahead of 'origin/master' by 7 commits.</div><div>#</div><div># Changes not staged for commit:</div><div>#   (use "git add <file>..." to update what will be committed)</div><div>#   (use "git checkout -- <file>..." to discard changes in working directory)</div><div>#</div><div>#       modified:   src/ksp/pc/impls/fieldsplit/ftn-custom/zfieldsplitf.c</div><div>#</div><div>no changes added to commit (use "git add" and/or "git commit -a")</div><div>19:10 edison03 master ~/petsc$ git commit src/ksp/pc/impls/fieldsplit/ftn-custom/zfieldsplitf.c -m"fixed memory leak"</div><div>[master d4dcd7b] fixed memory leak</div><div> 1 file changed, 1 insertion(+)</div><div>19:10 edison03 master ~/petsc$ git pull origin master</div><div>From <a href="https://bitbucket.org/petsc/petsc" target="_blank">https://bitbucket.org/petsc/petsc</a></div><div> * branch            master     -> FETCH_HEAD</div><div>Already up-to-date.</div><div>19:11 edison03 master ~/petsc$ git status</div><div># On branch master</div><div># Your branch is ahead of 'origin/master' by 8 commits.</div><div>#</div><div>nothing to commit (working directory clean)</div><div>19:11 edison03 master ~/petsc$</div></div><div><br></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 31, 2015 at 10:02 PM, Mark Adams <span dir="ltr"><<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This is coming from this line (last):<div><br></div><div><div>#undef __FUNCT__</div><div>#define __FUNCT__ "PCFieldSplitGetSubKSP_FieldSplit_Schur"</div><div>static PetscErrorCode  PCFieldSplitGetSubKSP_FieldSplit_Schur(PC pc,PetscInt *n,KSP **subksp)</div><div>{</div><div>  PC_FieldSplit  *jac = (PC_FieldSplit*)pc->data;</div><div>  PetscErrorCode ierr;</div><div><br></div><div>  PetscFunctionBegin;</div><div>  ierr = PetscMalloc1(jac->nsplits,subksp);CHKERRQ(ierr);</div></div><div><br></div><div>I call it with:</div><div><br></div><div><div>  KSP::subksp(2)</div><div> ....</div><div>  call PCFieldSplitGetSubKSP(solver%pc,PETSC_NULL_INTEGER,subksp,ierr)</div></div><div><br></div><div>The Fortran wrapper is: </div><div><br></div><div><div>PETSC_EXTERN void PETSC_STDCALL pcfieldsplitgetsubksp_(PC *pc,PetscInt *n_local,KSP *ksp,PetscErrorCode *ierr)</div><div>{</div><div>  KSP      *tksp;</div><div>  PetscInt i,nloc;</div><div>  CHKFORTRANNULLINTEGER(n_local);</div><div>  *ierr = PCFieldSplitGetSubKSP(*pc,&nloc,&tksp); if (*ierr) return;</div><div>  if (n_local) *n_local = nloc;</div><div>  CHKFORTRANNULLOBJECT(ksp);</div><div>  if (ksp) {</div><div>    for (i=0; i<nloc; i++) ksp[i] = tksp[i];</div><div>  }</div><div>}</div></div><div><br></div><div>Should I just add a PetscFree(&tksp) here?</div><div><br></div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 31, 2015 at 7:24 PM, Mark Adams <span dir="ltr"><<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Sat, May 30, 2015 at 10:51 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
 Need more details. How can we reproduce this?<br></blockquote><div><br></div></span><div>I was hoping this would be obvious. a missed free.</div><div><br></div><div>What tests use Schur solvers?  I could see if they have the same problem.</div><div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span><font color="#888888"><br>
  Barry<br>
</font></span><div><div><br>
> On May 30, 2015, at 7:10 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:<br>
><br>
> This look like there might be a memory leak in PETSc.  Let me know if this is not obvious and get more detail.<br>
> Mark<br>
><br>
> [0]Total space allocated 16 bytes<br>
> [ 0]16 bytes PCFieldSplitGetSubKSP_FieldSplit_Schur() line 1263 in /global/u2/m/madams/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c<br>
>       [0]  PCFieldSplitGetSubKSP_FieldSplit_Schur() line 1263 in /global/u2/m/madams/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c<br>
>       [0]  PCFieldSplitGetSubKSP() line 1665 in /global/u2/m/madams/petsc/src/ksp/pc/impls/fieldsplit/fieldsplit.c<br>
>       [0]  KSPSetUp() line 247 in /global/u2/m/madams/petsc/src/ksp/ksp/interface/itfunc.c<br>
><br>
<br>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div></div></div><span><font color="#888888"><br><br clear="all"><span><font color="#888888"><div><br></div>-- <br><div>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</div>
</font></span></font></span></div></div>
</blockquote></div><br></div></div>
</blockquote></div></div></div><div><div class="h5"><br><br clear="all"><div><br></div>-- <br><div>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</div>
</div></div></div></div>
</blockquote></div><br></div></div>