<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 16, 2015 at 3:46 PM, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, 16 Feb 2015, Jed Brown wrote:<br>
<br>
> Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> writes:<br>
><br>
> > On Mon, Feb 16, 2015 at 3:13 PM, Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br>
> ><br>
> >> Matt,<br>
> >><br>
> >> There are some clang stuff here..<br>
> >><br>
> >><br>
> >> <a href="ftp://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2015/02/16/filtered-make_next_arch-linux-pkgs-dbg-ftn-interfaces_crank.log" target="_blank">ftp://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2015/02/16/filtered-make_next_arch-linux-pkgs-dbg-ftn-interfaces_crank.log</a><br>
> ><br>
> ><br>
> > That is not my fault. Jed needs to disable to test.<br>
><br>
> Just now back from Singapore...<br>
><br>
> This is tremendously frustrating because the warnings are useful (have<br>
> detected and continue to detect true bugs, especially with 64-bit<br>
> indices), but the crappy dependence on const needs to be fixed in Clang.<br>
<br>
The following worarround compiles without warnings.<br></blockquote><div><br></div><div>Of course, but that also destroys type checking, and I prefer disabling</div><div> the check in configure to cluttering up our source.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Satish<br>
<br>
diff --git a/src/dm/interface/dm.c b/src/dm/interface/dm.c<br>
index 5bfb42c..7c2985e 100644<br>
--- a/src/dm/interface/dm.c<br>
+++ b/src/dm/interface/dm.c<br>
@@ -1689,7 +1689,7 @@ PetscErrorCode DMGlobalToLocalBegin(DM dm,Vec g,InsertMode mode,Vec l)<br>
if (mode == ADD_VALUES) SETERRQ1(PetscObjectComm((PetscObject)dm), PETSC_ERR_ARG_OUTOFRANGE, "Invalid insertion mode %D", mode);<br>
ierr = VecGetArray(l, &lArray);CHKERRQ(ierr);<br>
ierr = VecGetArrayRead(g, &gArray);CHKERRQ(ierr);<br>
- ierr = PetscSFBcastBegin(sf, MPIU_SCALAR, gArray, lArray);CHKERRQ(ierr);<br>
+ ierr = PetscSFBcastBegin(sf, MPIU_SCALAR, (PetscScalar*) gArray, lArray);CHKERRQ(ierr);<br>
ierr = VecRestoreArray(l, &lArray);CHKERRQ(ierr);<br>
ierr = VecRestoreArrayRead(g, &gArray);CHKERRQ(ierr);<br>
} else {<br>
@@ -1733,7 +1733,7 @@ PetscErrorCode DMGlobalToLocalEnd(DM dm,Vec g,InsertMode mode,Vec l)<br>
<br>
ierr = VecGetArray(l, &lArray);CHKERRQ(ierr);<br>
ierr = VecGetArrayRead(g, &gArray);CHKERRQ(ierr);<br>
- ierr = PetscSFBcastEnd(sf, MPIU_SCALAR, gArray, lArray);CHKERRQ(ierr);<br>
+ ierr = PetscSFBcastEnd(sf, MPIU_SCALAR, (PetscScalar*) gArray, lArray);CHKERRQ(ierr);<br>
ierr = VecRestoreArray(l, &lArray);CHKERRQ(ierr);<br>
ierr = VecRestoreArrayRead(g, &gArray);CHKERRQ(ierr);<br>
} else {<br>
@@ -1890,7 +1890,7 @@ PetscErrorCode DMLocalToGlobalBegin(DM dm,Vec l,InsertMode mode,Vec g)<br>
if (sf && !isInsert) {<br>
ierr = VecGetArrayRead(l, &lArray);CHKERRQ(ierr);<br>
ierr = VecGetArray(g, &gArray);CHKERRQ(ierr);<br>
- ierr = PetscSFReduceBegin(sf, MPIU_SCALAR, lArray, gArray, MPI_SUM);CHKERRQ(ierr);<br>
+ ierr = PetscSFReduceBegin(sf, MPIU_SCALAR, (PetscScalar*)lArray, gArray, MPI_SUM);CHKERRQ(ierr);<br>
ierr = VecRestoreArrayRead(l, &lArray);CHKERRQ(ierr);<br>
ierr = VecRestoreArray(g, &gArray);CHKERRQ(ierr);<br>
} else if (s && isInsert) {<br>
@@ -1983,7 +1983,7 @@ PetscErrorCode DMLocalToGlobalEnd(DM dm,Vec l,InsertMode mode,Vec g)<br>
<br>
ierr = VecGetArrayRead(l, &lArray);CHKERRQ(ierr);<br>
ierr = VecGetArray(g, &gArray);CHKERRQ(ierr);<br>
- ierr = PetscSFReduceEnd(sf, MPIU_SCALAR, lArray, gArray, MPI_SUM);CHKERRQ(ierr);<br>
+ ierr = PetscSFReduceEnd(sf, MPIU_SCALAR, (PetscScalar*)lArray, gArray, MPI_SUM);CHKERRQ(ierr);<br>
ierr = VecRestoreArrayRead(l, &lArray);CHKERRQ(ierr);<br>
ierr = VecRestoreArray(g, &gArray);CHKERRQ(ierr);<br>
} else if (s && isInsert) {<br>
<br>
><br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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>