<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="">Yup, that cleared it. Thanks.<br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  ">-gideon</span>

</div>
<br class=""><div style=""><blockquote type="cite" class=""><div class="">On Feb 8, 2015, at 12:51 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Sun, Feb 8, 2015 at 11:43 AM, Gideon Simpson <span dir="ltr" class=""><<a href="mailto:gideon.simpson@gmail.com" target="_blank" class="">gideon.simpson@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word" 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></blockquote><div class=""><br class=""></div><div class="">It looks like you are not checking the return code:</div><div class=""><br class=""></div><div class="">ierr = <span style="font-family:Menlo" class="">MPI_Allreduce(&local_trapz, &global_trapz, 1, MPI_DOUBLE, MPI_SUM, PETSC_COMM_WORLD);CHKERRQ(ierr);</span></div><div class=""><span style="font-family:Menlo" class=""><br class=""></span></div><div class=""><span style="font-family:Menlo" class="">   Matt</span></div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><br class=""><div class="">
<span style="border-collapse:separate;border-spacing:0px" class="">-gideon</span>

</div>
<br class=""></div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><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 class="">-- Norbert Wiener</div>
</div></div>
</div></blockquote></div><br class=""></body></html>