<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 1, 2015 at 8:05 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</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"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Sun, May 31, 2015 at 9:20 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">I have asked this question before but I still do not understand what git is doing here.<div><br></div><div>I pulled, made a fix, did a git status, and I see that I am 7 commits ahead of master. I commit and I am 8 commits ahead of master. What are these commits? I have not pulled </div></div></blockquote><div><br></div></span><div>Lets just start with this. If you branch from master, you will not be ANY commits ahead:</div><div><br></div><div> git checkout master</div><div> git pull</div><div> git checkout -b knepley/fix-shit</div><div><br></div><div>It sounds like you are creating the branch from a local master that is behind.</div><div><br></div></div></div></div></blockquote><div><br></div><div>I don't understand. I am _on_ master. I also did a fresh clone last week. I did a git log and I see normal stuff like Barry's fix for GetSubMatrix. I have been going back and forth to maint. Perhaps I pulled from maint into my master by mistake?</div><div><br></div><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 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>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 class="HOEnZb"><font color="#888888"><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>
</font></span></div></div>
</blockquote></div><br></div></div>