<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 16, 2018 at 10:45 AM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br>
<a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/filtered-make_next_arch-linux-pkgs-64idx_thrash.log" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/filtered-make_next_<wbr>arch-linux-pkgs-64idx_thrash.<wbr>log</a><br>
<br>
>>>><br>
/sandbox/petsc/petsc.next-3/<wbr>src/mat/impls/hypre/mhypre.c:<wbr>1089:9: warning: passing argument 3 of ‘HYPRE_IJMatrixAddToValuesâ€<wbr>™ from incompatible pointer type [enabled by default]<br>
/sandbox/petsc/petsc.next-3/<wbr>src/mat/impls/hypre/mhypre.c:<wbr>1089:9: warning: passing argument 5 of ‘HYPRE_IJMatrixAddToValuesâ€<wbr>™ from incompatible pointer type [enabled by default]<br>
<<<<<<br>
<br>
>>>>>><br>
<br>
- PetscScalar sscr[MATHYPRE_SCRATCH];<br>
- HYPRE_Int cscr[2][MATHYPRE_SCRATCH];<br>
- HYPRE_Int i,nzc;<br>
+ PetscScalar *sscr;<br>
+ PetscInt *cscr[2];<br>
+ PetscInt i,nzc;<br>
+ void *array;<br>
<br>
PetscStackCallStandard(HYPRE_<wbr>IJMatrixAddToValues,(hA->ij,1,<wbr>&nzc,(HYPRE_Int*)(rows+i),<wbr>cscr[0],sscr)); <br>
<<<<<<<<<br>
<br>
So 'nzc' and 'cscr' types got changed from HYPRE_Int to PetscInt - causing this problem.<br>
<br></blockquote><div><br></div><div>I fixed it in my branch, and I will push up soon.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
And this code is wierd..<br>
<br>
>>>>>>>><br>
+static PetscErrorCode MatRestoreArray_HYPRE(Mat A, PetscInt size, void **array)<br>
+{<br>
+ Mat_HYPRE *hA = (Mat_HYPRE*)A->data;<br>
+<br>
+ PetscFunctionBegin;<br>
+ *array = NULL;<br>
+ size = 0;<br>
+ hA->available = PETSC_TRUE;<br>
+ PetscFunctionReturn(0);<br>
+}<br>
+<br>
<<<<<<br>
<br>
Why does this routine need 'size' argument?<br>
<br>
+ size = 0;<br>
<br>
This is just a local variable - setting it to 0 does not do anything..<br>
<br></blockquote><div> </div><div>In order to have make MatRestoreArray_HYPRE and MatRestoreArray_HYPRE looks same. If did not do anything to size and array, and then we may have some warnings: unused parameters.</div><div><br></div><div>Should we do something like this?</div><div><br></div><div>+static PetscErrorCode MatRestoreArray_HYPRE(Mat A, PetscInt /*size*/, void **/*array*/)<br>+{<br>+ Mat_HYPRE *hA = (Mat_HYPRE*)A->data;<br>+<br>+ PetscFunctionBegin;<br>+ hA->available = PETSC_TRUE;<br>+ PetscFunctionReturn(0);<br>+}<br></div><div><br></div><div><br></div><div>Not sure C89 like this or not. If you have any idea, please let me know</div><div><br></div><div><br></div><div>Fande,</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
<br>
<a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/filtered-make_next_arch-freebsd-cxx-pkgs-opt_wii.log
/usr/home/balay/petsc.next-2/src/mat/impls/hypre/mhypre.c:1075:20" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/filtered-make_next_<wbr>arch-freebsd-cxx-pkgs-opt_wii.<wbr>log<br>
/usr/home/balay/petsc.next-2/<wbr>src/mat/impls/hypre/mhypre.c:<wbr>1075:20</a>: warning: 'array' may be used uninitialized in this function [-Wmaybe-uninitialized]<br>
<br>
<a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/filtered-make_next_arch-linux-opt-misc_el6.log
/home/sandbox/petsc/petsc.next/src/mat/impls/hypre/mhypre.c:1103:53" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/filtered-make_next_<wbr>arch-linux-opt-misc_el6.log<br>
/home/sandbox/petsc/petsc.<wbr>next/src/mat/impls/hypre/<wbr>mhypre.c:1103:53</a>: warning: ‘array’ may be used uninitialized in this function [-Wmaybe-uninitialized]<br>
<br>
This is a bit wierd. Different builds are giving warnings at different lines. And not all builds are warning about this.<br>
<a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/next.html" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/next.html</a><br>
<br>
So - it must be the compiler/os combination.. I'll have to take a closer look..<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
Satish<br>
</font></span><div class="gmail-HOEnZb"><div class="gmail-h5"> <br>
<br>
<br>
On Mon, 16 Jul 2018, Matthew Knepley wrote:<br>
<br>
> On Mon, Jul 16, 2018 at 11:38 AM Fande Kong <<a href="mailto:fdkong.jd@gmail.com">fdkong.jd@gmail.com</a>> wrote:<br>
> <br>
> > Hi Satish and Barry,<br>
> ><br>
> > Any way to reproduce these warnings? I just tried the same configure<br>
> > script on my desktop, and I did NOT see any warning.<br>
> ><br>
> <br>
> You would need the same compiler/options. Is it not clear why they happen?<br>
> <br>
> Matt<br>
> <br>
> <br>
> > Fande,<br>
> ><br>
> > On Mon, Jul 16, 2018 at 6:28 AM, PETSc checkBuilds <<br>
> > <a href="mailto:petsc-checkbuilds@mcs.anl.gov">petsc-checkbuilds@mcs.anl.gov</a>> wrote:<br>
> ><br>
> >><br>
> >><br>
> >> Dear PETSc developer,<br>
> >><br>
> >> This email contains listings of contributions attributed to you by<br>
> >> `git blame` that caused compiler errors or warnings in PETSc automated<br>
> >> testing. Follow the links to see the full log files. Please attempt to<br>
> >> fix<br>
> >> the issues promptly or let us know at <a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a> if you are<br>
> >> unable<br>
> >> to resolve the issues.<br>
> >><br>
> >> Thanks,<br>
> >> The PETSc development team<br>
> >><br>
> >> ----<br>
> >><br>
> >> warnings attributed to commit<br>
> >> <a href="https://bitbucket.org/petsc/petsc/commits/c69f721" rel="noreferrer" target="_blank">https://bitbucket.org/petsc/<wbr>petsc/commits/c69f721</a><br>
> >> Added MatZeroEntries_HYPRE<br>
> >><br>
> >> src/mat/impls/hypre/mhypre.c:<wbr>1103<br>
> >> [<br>
> >> <a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/build_next_arch-linux-opt-misc_el6.log" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/build_next_arch-<wbr>linux-opt-misc_el6.log</a><br>
> >> ]<br>
> >><br>
> >> /home/sandbox/petsc/petsc.<wbr>next/src/mat/impls/hypre/<wbr>mhypre.c:1103:53:<br>
> >> warning: 'array' may be used uninitialized in this function<br>
> >> [-Wmaybe-uninitialized]<br>
> >> [<br>
> >> <a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/build_next_arch-linux-pkgs-opt_crank.log" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/build_next_arch-<wbr>linux-pkgs-opt_crank.log</a><br>
> >> ]<br>
> >> /sandbox/petsc/petsc.next/src/<wbr>mat/impls/hypre/mhypre.c:1103:<wbr>53:<br>
> >> warning: 'array' may be used uninitialized in this function<br>
> >> [-Wmaybe-uninitialized]<br>
> >><br>
> >> src/mat/impls/hypre/mhypre.c:<wbr>1105<br>
> >> [<br>
> >> <a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/build_next_arch-linux-pkgs-64idx_thrash.log" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/build_next_arch-<wbr>linux-pkgs-64idx_thrash.log</a><br>
> >> ]<br>
> >> /sandbox/petsc/petsc.next-3/<wbr>src/mat/impls/hypre/mhypre.c:<wbr>1105:9:<br>
> >> warning: passing argument 3 of 'HYPRE_IJMatrixSetValues' from incompatible<br>
> >> pointer type [enabled by default]<br>
> >> [<br>
> >> <a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/build_next_arch-linux-pkgs-64idx_thrash.log" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/build_next_arch-<wbr>linux-pkgs-64idx_thrash.log</a><br>
> >> ]<br>
> >> /sandbox/petsc/petsc.next-3/<wbr>src/mat/impls/hypre/mhypre.c:<wbr>1105:9:<br>
> >> warning: passing argument 5 of 'HYPRE_IJMatrixSetValues' from incompatible<br>
> >> pointer type [enabled by default]<br>
> >><br>
> >> src/mat/impls/hypre/mhypre.c:<wbr>1524<br>
> >> [<br>
> >> <a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/build_next_arch-linux-pkgs-64idx_thrash.log" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/build_next_arch-<wbr>linux-pkgs-64idx_thrash.log</a><br>
> >> ]<br>
> >> /sandbox/petsc/petsc.next-3/<wbr>src/mat/impls/hypre/mhypre.c:<wbr>1524:5:<br>
> >> warning: assignment from incompatible pointer type [enabled by default]<br>
> >><br>
> >> src/mat/impls/hypre/mhypre.c:<wbr>1525<br>
> >> [<br>
> >> <a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/build_next_arch-linux-pkgs-64idx_thrash.log" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/build_next_arch-<wbr>linux-pkgs-64idx_thrash.log</a><br>
> >> ]<br>
> >> /sandbox/petsc/petsc.next-3/<wbr>src/mat/impls/hypre/mhypre.c:<wbr>1525:5:<br>
> >> warning: assignment from incompatible pointer type [enabled by default]<br>
> >><br>
> >> src/mat/impls/hypre/mhypre.c:<wbr>1582<br>
> >> [<br>
> >> <a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/build_next_arch-linux-pkgs-64idx_thrash.log" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/build_next_arch-<wbr>linux-pkgs-64idx_thrash.log</a><br>
> >> ]<br>
> >> /sandbox/petsc/petsc.next-3/<wbr>src/mat/impls/hypre/mhypre.c:<wbr>1582:3:<br>
> >> warning: passing argument 4 of 'HYPRE_ParCSRMatrixGetRow' from incompatible<br>
> >> pointer type [enabled by default]<br>
> >> [<br>
> >> <a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/build_next_arch-linux-pkgs-64idx_thrash.log" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/build_next_arch-<wbr>linux-pkgs-64idx_thrash.log</a><br>
> >> ]<br>
> >> /sandbox/petsc/petsc.next-3/<wbr>src/mat/impls/hypre/mhypre.c:<wbr>1582:3:<br>
> >> warning: passing argument 3 of 'HYPRE_ParCSRMatrixGetRow' from incompatible<br>
> >> pointer type [enabled by default]<br>
> >><br>
> >> src/mat/impls/hypre/mhypre.c:<wbr>1595<br>
> >> [<br>
> >> <a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/build_next_arch-linux-pkgs-64idx_thrash.log" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/build_next_arch-<wbr>linux-pkgs-64idx_thrash.log</a><br>
> >> ]<br>
> >> /sandbox/petsc/petsc.next-3/<wbr>src/mat/impls/hypre/mhypre.c:<wbr>1595:3:<br>
> >> warning: passing argument 4 of 'HYPRE_ParCSRMatrixRestoreRow' from<br>
> >> incompatible pointer type [enabled by default]<br>
> >> [<br>
> >> <a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/build_next_arch-linux-pkgs-64idx_thrash.log" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/build_next_arch-<wbr>linux-pkgs-64idx_thrash.log</a><br>
> >> ]<br>
> >> /sandbox/petsc/petsc.next-3/<wbr>src/mat/impls/hypre/mhypre.c:<wbr>1595:3:<br>
> >> warning: passing argument 3 of 'HYPRE_ParCSRMatrixRestoreRow' from<br>
> >> incompatible pointer type [enabled by default]<br>
> >><br>
> >> src/mat/impls/hypre/mhypre.c:<wbr>1613<br>
> >> [<br>
> >> <a href="http://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2018/07/16/build_next_arch-linux-pkgs-64idx_thrash.log" rel="noreferrer" target="_blank">http://ftp.mcs.anl.gov/pub/<wbr>petsc/nightlylogs/archive/<wbr>2018/07/16/build_next_arch-<wbr>linux-pkgs-64idx_thrash.log</a><br>
> >> ]<br>
> >> /sandbox/petsc/petsc.next-3/<wbr>src/mat/impls/hypre/mhypre.c:<wbr>1613:5:<br>
> >> warning: passing argument 3 of 'HYPRE_IJMatrixGetValues' from incompatible<br>
> >> pointer type [enabled by default]<br>
> >><br>
> >> ----<br>
> >> To opt-out from receiving these messages - send a request to<br>
> >> <a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>.<br>
> >><br>
> ><br>
> ><br>
> <br>
> </div></div></blockquote></div><br></div></div>