<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">What should I make of the following warning, where I have used an MPI_Allreduce on a quantity computed on each processor.<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-family: Menlo;" class="">include -I/opt/local/include -I/opt/local/include/mpich-gcc48 -I/opt/local/include `pwd`/petsc_trapz1.c</div><div style="margin: 0px; font-family: Menlo;" class="">In file included from /opt/local/lib/petsc/include/petscsys.h:1794:0,</div><div style="margin: 0px; font-family: Menlo;" class=""> from /opt/local/lib/petsc/include/petscis.h:7,</div><div style="margin: 0px; font-family: Menlo;" class=""> from /opt/local/lib/petsc/include/petscvec.h:9,</div><div style="margin: 0px; font-family: Menlo;" class=""> from /Users/gideon/code/trapz/petsc_trapz1.c:3:</div><div style="margin: 0px; font-family: Menlo;" class="">/Users/gideon/code/trapz/petsc_trapz1.c: In function 'main':</div><div style="margin: 0px; font-family: Menlo;" class="">/opt/local/lib/petsc/include/petsclog.h:370:57: warning: value computed is not used [-Wunused-value]</div><div style="margin: 0px; font-family: Menlo;" class=""> ((petsc_allreduce_ct += PetscMPIParallelComm(comm),0) || MPI_Allreduce(sendbuf,recvbuf,count,datatype,op,comm))</div><div style="margin: 0px; font-family: Menlo;" class=""> ^</div><div style="margin: 0px; font-family: Menlo;" class="">/Users/gideon/code/trapz/petsc_trapz1.c:110:3: note: in expansion of macro 'MPI_Allreduce'</div><div style="margin: 0px; font-family: Menlo;" class=""> MPI_Allreduce(&local_trapz, &global_trapz, 1, MPI_DOUBLE, MPI_SUM, PETSC_COMM_WORLD);</div></div><div class=""><br class=""></div><div class=""><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;">-gideon</span>
</div>
<br class=""></div></body></html>