<div class="gmail_quote">On Tue, Jan 17, 2012 at 16:02, Reuti <span dir="ltr">&lt;<a href="mailto:reuti@staff.uni-marburg.de">reuti@staff.uni-marburg.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":1mf">main(int argc, char **argv)<br>
{<br>
   int node;<br>
<br>
   int i,j;<br>
   float f;<br>
<br>
   MPI_Init(NULL,NULL);<br>
   MPI_Comm_rank(MPI_COMM_WORLD, &amp;node);<br>
<br>
   printf(&quot;Hello World from Node %d.\n&quot;, node);<br>
       for(j=0; j &lt;= 100000; j++)<br>
           for(i=0;i &lt;= 100000; i++)<br>
               f=i*2.718281828*i+i+i*3.141592654;</div></blockquote></div><br><div>Well this is an odd spin loop because the compiler will happily remove it for you (note that MPICH2&#39;s mpicc wrapper very frequently has optimization flags in it). I would suggest sleep(3) instead, or, if you must, force the loop to actually be executed (e.g. seed the loop with the rank and use the result).</div>