<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; ">
I think I have more basic problems than what you are referring to:
<div><br>
</div>
<div>I copy-pasted Reuti's code into a file named mpitest.c and tried to compile with </div>
<div><br>
</div>
<div>gcc -Wall mpitest.c</div>
<div><br>
</div>
<div>It failed to compile and issued following error(s):</div>
<div>=================================</div>
<div>
<div>Undefined symbols:</div>
<div> "_ompi_mpi_comm_world", referenced from:</div>
<div> _main in cc8tNiKW.o</div>
<div> "_MPI_Comm_rank", referenced from:</div>
<div> _main in cc8tNiKW.o</div>
<div> "_MPI_Finalize", referenced from:</div>
<div> _main in cc8tNiKW.o</div>
<div> "_MPI_Init", referenced from:</div>
<div> _main in cc8tNiKW.o</div>
<div>ld: symbol(s) not found</div>
<div>collect2: ld returned 1 exit status</div>
</div>
<div>==================================</div>
<div><br>
</div>
<div><br>
</div>
<div>Rohan</div>
<div><br>
</div>
<div>
<div>
<div>On Jan 17, 2012, at 3:09 PM, Jed Brown wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div class="gmail_quote">On Tue, Jan 17, 2012 at 16:02, Reuti <span dir="ltr"><<a href="mailto:reuti@staff.uni-marburg.de">reuti@staff.uni-marburg.de</a>></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, &node);<br>
<br>
printf("Hello World from Node %d.\n", node);<br>
for(j=0; j <= 100000; j++)<br>
for(i=0;i <= 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'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>
_______________________________________________<br>
mpich-discuss mailing list <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
To manage subscription options or unsubscribe:<br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
</blockquote>
</div>
<br>
</div>
</body>
</html>