<div dir="ltr">I just fixed a bunch of dangerous type mismatches. Presumably a number of things were broken with 64-bit integers, at least in cases with overflow.<br><br><a href="https://bitbucket.org/petsc/petsc-dev/commits/146d1df88e306d69e6ce797932b1c3352fd7851c">https://bitbucket.org/petsc/petsc-dev/commits/146d1df88e306d69e6ce797932b1c3352fd7851c</a><br>
<br>These were warnings with clang-3.2. A year ago when people were working on this feature, I downplayed its importance, claiming that it's just not a mistake that I tend to make. Based on the sheer number of these mistakes in PETSc, I now believe it's a fantastic feature.<div>
<br></div><div>There are still a lot of warnings, though I believe the remaining ones are benign. (The most common is sending PetscBool as MPI_INT.) Since people will use clang-3.2 and we want to see the real mistakes, we have to silence these benign warnings. I'm working through annotation of these.<br>
<br>Another problem case is using a Real reduction of twice the size to sum Complex, e.g., in vscat.c. I suspect this code predates definition of MPIU_SUM working with complex, and can thus be removed. Is that the case, or is there some reason we need to keep both around?</div>
<div><br></div><div><div>#if defined(PETSC_USE_COMPLEX)</div><div>        ierr = MPI_Reduce(xv,xvt,2*xx_n,MPIU_REAL,MPIU_SUM,0,((PetscObject)ctx)->comm);CHKERRQ(ierr);</div><div>#else</div><div>        ierr = MPI_Reduce(xv,xvt,xx_n,MPIU_SCALAR,MPI_SUM,0,((PetscObject)ctx)->comm);CHKERRQ(ierr);</div>
<div>#endif</div></div><div><br></div></div>