Dear Rajeev<br><br>Hi<br>Many thanks for your help.<br>Ive added these line. And compiled with this:<br><span style="font-family: comic sans ms,sans-serif;">amin@linux-usdz:~/Desktop/AminLinx> mpicc monte.c</span><br style="font-family: comic sans ms,sans-serif;">
<br>and the result was as this:<br><span style="font-family: comic sans ms,sans-serif;">monte.c:11:19: error: sprng.h: No such file or directory</span><br style="font-family: comic sans ms,sans-serif;"><span style="font-family: comic sans ms,sans-serif;">monte.c: In function ‘main’:</span><br style="font-family: comic sans ms,sans-serif;">
<span style="font-family: comic sans ms,sans-serif;">monte.c:42: error: ‘SPRNG_DEFAULT’ undeclared (first use in this function)</span><br style="font-family: comic sans ms,sans-serif;"><span style="font-family: comic sans ms,sans-serif;">monte.c:42: error: (Each undeclared identifier is reported only once</span><br style="font-family: comic sans ms,sans-serif;">
<span style="font-family: comic sans ms,sans-serif;">monte.c:42: error: for each function it appears in.)</span><br style="font-family: comic sans ms,sans-serif;"><span style="font-family: comic sans ms,sans-serif;">monte.c:42: warning: assignment makes pointer from integer without a cast</span><br style="font-family: comic sans ms,sans-serif;">
<br>I do not know, but maybe it is due to bad installation of MPICH2 or OPENMPI, how can I assure that they`ve installed correctly?<br><br>Best Regards<br>Amin<br><br><br><div class="gmail_quote">On Sat, Feb 20, 2010 at 12:49 AM, Rajeev Thakur <span dir="ltr"><<a href="mailto:thakur@mcs.anl.gov">thakur@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Try adding a #define SIMPLE_SPRNG before #include <sprng.h>. Also move<br>
the #define USE_MPI to before #include <sprng.h><br>
<br>
Rajeev<br>
<br>
<br>
________________________________<br>
<div class="im"><br>
From: <a href="mailto:mpich-discuss-bounces@mcs.anl.gov">mpich-discuss-bounces@mcs.anl.gov</a><br>
</div>[mailto:<a href="mailto:mpich-discuss-bounces@mcs.anl.gov">mpich-discuss-bounces@mcs.anl.gov</a>] On Behalf Of ESMAEILI AMIN<br>
Sent: Friday, February 19, 2010 7:34 AM<br>
To: <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
Subject: [mpich-discuss] Error relating compiling a program<br>
(sprng.h)?<br>
<div><div></div><div class="h5"><br>
<br>
Dear Sir<br>
<br>
Hi<br>
Many thanks for your MPI package.<br>
I`ve installed the MPICH2 on my pc and made mpd.conf at HOME<br>
directory<br>
<br>
But when I compile the program:<br>
amin@linux-usdz:~/Desktop/AminLinx> mpicc monte.c<br>
<br>
I will get this error:<br>
monte.c:9:19: error: sprng.h:<br>
monte.c: In function 'main':<br>
<br>
monte.c:40: error: 'SPRNG_DEFAULT' undeclared (first use in this<br>
function)<br>
monte.c:40: error: (Each undeclared identifier is reported only<br>
once<br>
monte.c:40: error: for each function it appears in.)<br>
monte.c:40: warning: assignment makes pointer from integer<br>
without a cast<br>
amin@linux-usdz:~/Desktop/AminLinx> ..<br>
amin@linux-usdz:~/Desktop> ..<br>
amin@linux-usdz:~> cd Desktop/AminLinx/<br>
amin@linux-usdz:~/Desktop/AminLinx> mpirun monte.c<br>
problem with execution of monte.c on linux-usdz: [Errno 2] No<br>
such file or directory<br>
<br>
<br>
Plz help me to compile and run the program correctly.<br>
<br>
I`ve attched the program for your inform.<br>
<br>
Best Regards<br>
Sincerely<br>
Amin<br>
<br>
<br>
<br>
<br>
<br>
</div></div><div><div></div><div class="h5">_______________________________________________<br>
mpich-discuss mailing list<br>
<a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
</div></div></blockquote></div><br>