<div dir="ltr"><div dir="ltr">On Thu, Sep 19, 2019 at 6:39 AM Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com">stefano.zampini@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><br><div><br><blockquote type="cite"><div>On Sep 19, 2019, at 1:23 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr">On Thu, Sep 19, 2019 at 6:21 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Thu, Sep 19, 2019 at 6:20 AM Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" target="_blank">stefano.zampini@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">So why it is in the vec package?</div></blockquote><div><br></div><div>Its in IS, so if anything it should go in petscis.h. I will move it there.</div></div></div></blockquote><div><br></div><div>Now that we are doing this. I think petscsf.h belongs there too, not just the types.</div><div><br></div></div></div></div></blockquote><div><br></div><div>Why? In order to use petscis.h You just need to forward declare PetscSF, which is what petscfstypes.h is supposed to do.</div><div>Our public header should just pass the test of preprocessing </div><div><br></div><div>#include <petscxxx.h></div><div><br></div><div>Without warning or errors. We should add this to the makefile rules </div></div></div></blockquote><div><br></div><div>You just advocated including Section in petscvec.h, which has EXACTLY the same rationale.</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div class="gmail_quote"><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il Gio 19 Set 2019, 13:17 Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I made a new MR. DMLabel uses Section, whereas nothing else in Vec does.<div><br></div><div>   Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 19, 2019 at 6:03 AM Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" rel="noreferrer" target="_blank">stefano.zampini@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Petscsection is part of the vec package. It belongs to petscvec.h</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il Gio 19 Set 2019, 12:50 Hapla Vaclav <<a href="mailto:vaclav.hapla@erdw.ethz.ch" rel="noreferrer" target="_blank">vaclav.hapla@erdw.ethz.ch</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><br><div><br><blockquote type="cite"><div>On 19 Sep 2019, at 11:25, Matthew Knepley via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" rel="noreferrer noreferrer" target="_blank">petsc-dev@mcs.anl.gov</a>> wrote:</div><br><div><div dir="ltr">I pushed the fix to the branch. Can we remerge it?</div></div></blockquote><div><br></div><div>I think best way would be to create another MR.</div><div><br></div><div>You should also add</div><div> <span> </span>#include <petscsection.h></div><div>to petscdmlabel.h.</div><div>This which will also satisfy Lisandro's point.</div><div><br></div><div>Vaclav</div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>Also, I do not understand why tests did not catch this. Its obvious what happened. I added that header</div><div>to convert.c instead of convest.c.</div><div><br></div><div>   Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 19, 2019 at 5:19 AM Stefano Zampini via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" rel="noreferrer noreferrer" target="_blank">petsc-dev@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">How come this was not caught by the tests? I think we have tests with -Werror </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il Gio 19 Set 2019, 12:15 Lisandro Dalcin via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" rel="noreferrer noreferrer" target="_blank">petsc-dev@mcs.anl.gov</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>The warnings below are from a C build. A C++ build fails right away.</div><div><br></div><div>We need to `#include <petscsection.h>` somewhere in the public headers, at least such that  `#include <petsc.h>` in user code works.</div><div><br></div><div>$ git grep petscsection include/<br>include/petsc/private/sectionimpl.h:#include <petscsection.h><br>include/petscis.h:#include <petscsectiontypes.h><br>include/petscsection.h:#include <petscsectiontypes.h><br></div><div><br></div><div><br></div>/home/devel/petsc/dev/src/snes/utils/convest.c: In function ‘PetscConvEstGetConvRate’:<br>/home/devel/petsc/dev/src/snes/utils/convest.c:293:14: warning: implicit declaration of function ‘PetscSectionGetField’; did you mean ‘PetscSectionVecView’? [-Wimplicit-function-declaration]<br> <span> </span>293 |       ierr = PetscSectionGetField(s, f, &fs);CHKERRQ(ierr);<br>     <span> </span>|              ^~~~~~~~~~~~~~~~~~~~<br>     <span> </span>|              PetscSectionVecView<br>/home/devel/petsc/dev/src/snes/utils/convest.c:294:14: warning: implicit declaration of function ‘PetscSectionGetConstrainedStorageSize’ [-Wimplicit-function-declaration]<br> <span> </span>294 |       ierr = PetscSectionGetConstrainedStorageSize(fs, &lsize);CHKERRQ(ierr);<br>     <span> </span>|              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br><div><br></div>--<span> </span><br><div dir="ltr"><div dir="ltr"><div>Lisandro Dalcin<br>============<br>Research Scientist<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" rel="noreferrer noreferrer noreferrer" target="_blank">http://ecrc.kaust.edu.sa/</a><br></div></div></div></div></blockquote></div></blockquote></div><br clear="all"><div><br></div>--<span> </span><br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" rel="noreferrer noreferrer" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div></blockquote></div><br></div></blockquote></div></blockquote></div><br clear="all"><div><br></div>--<span> </span><br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" rel="noreferrer" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></blockquote></div></blockquote></div><br clear="all"><div><br></div>--<span> </span><br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div></blockquote></div><br clear="all"><div><br></div>--<span> </span><br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a></div></div></div></div></div></div></div></div></div></blockquote></div><br></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>