<div class="gmail_quote">On Sun, May 8, 2011 at 18:54, Bartłomiej W <span dir="ltr"><<a href="mailto:bartlomiej.wach@yahoo.pl">bartlomiej.wach@yahoo.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit">Hello,<br><br>In my application, process of rank 0 reads an integer from a file, can I broadcast it without using a Vec?<br>
</td></tr></tbody></table></blockquote><div><br></div><div>Sure,</div></div><div><br></div><div>int myint;</div><div>if (!rank) {</div><div> myint = from_file(...);</div><div>}</div><div>MPI_Bcast(&myint,1,MPI_INT,0,PETSC_COMM_WORLD);</div>