On Tue, Dec 13, 2011 at 10:19 AM, Xiangdong Liang <span dir="ltr">&lt;<a href="mailto:xdliang@gmail.com">xdliang@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Dec 13, 2011 at 11:14 AM, Matthew Knepley &lt;<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>&gt; wrote:<br>
&gt; On Tue, Dec 13, 2011 at 10:13 AM, Xiangdong Liang &lt;<a href="mailto:xdliang@gmail.com">xdliang@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hello everyone,<br>
&gt;&gt;<br>
&gt;&gt; I am using PetscPrintf(PETSC_COMM_WORLD,.....) to print out some<br>
&gt;&gt; information. When I run the program on multiple processors, some of<br>
&gt;&gt; these calls are printed out multiple times, while other calls are<br>
&gt;&gt; printed out once. Should it be printed only once if I use<br>
&gt;&gt; PETSC_COMM_WORLD? Thanks.<br>
&gt;<br>
&gt;<br>
&gt; The print is executed only on rank 0 of the communicator provided.<br>
<br>
I agree. This implies that the message can be printed out at most<br>
once. Do you have any hints why I saw the message printed out multiple<br>
times? Thanks.<br></blockquote><div><br></div><div>Maybe</div><div><br></div><div>1) You have a bug in your code</div><div><br></div><div>2) You ran with the wrong mpiexec, so it just ran 2 copies</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">
Xiangdong<br>
<br>
<br>
&gt;<br>
&gt;    Matt<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Xiangdong<br>
&gt;&gt;<br>
&gt;&gt; PS. I am using petsc-dev. My code works fine on real petsc-3.1-p8. I<br>
&gt;&gt; just switched to complex petsc-dev and see this problem.<br>
&gt;<br>
&gt;<br>
&gt;<br>
<span class="HOEnZb"><font color="#888888">&gt;<br>
&gt; --<br>
&gt; What most experimenters take for granted before they begin their experiments<br>
&gt; is infinitely more interesting than any results to which their experiments<br>
&gt; lead.<br>
&gt; -- Norbert Wiener<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>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<br>