when i try to execute helloworld.f90 code, i get following error.<br><br>../bin/mpif90 helloworld.f90 <br>/par1/mpich/install/lib/libmpich.a(farg.o): In function `mpir_iargc__&#39;:<br>farg.f:(.text+0x6): undefined reference to `f__xargc&#39;<br>
/par1/mpich/install/lib/libmpich.a(farg.o): In function `mpir_getarg__&#39;:<br>farg.f:(.text+0x38): undefined reference to `getarg_&#39;<br>collect2: ld returned 1 exit status<br>--------------------------------<br><div class="lines">
<div class="line alt1"><code class="number">01.</code><span class="content"><span class="block" style="margin-left: 0px ! important;"><code class="plain">program helloWorld</code></span></span></div><div class="line alt2">
<code class="number">02.</code><span class="content"><code class="spaces"> </code><span class="block" style="margin-left: 7px ! important;"><code class="plain">implicit none</code></span></span></div><div class="line alt1">
<code class="number">03.</code><span class="content"><code class="spaces"> </code><span class="block" style="margin-left: 7px ! important;"><code class="plain">include &quot;mpif.h&quot;</code></span></span></div><div class="line alt2">
<code class="number">04.</code><span class="content"><code class="spaces"> </code><span class="block" style="margin-left: 7px ! important;"><code class="plain">integer :: myPE, numProcs, ierr</code></span></span></div><div class="line alt1">
<code class="number">05.</code><span class="content"><code class="spaces"> </code><span class="block" style="margin-left: 7px ! important;"><code class="plain">call MPI_INIT(ierr)</code></span></span></div><div class="line alt2">
<code class="number">06.</code><span class="content"><code class="spaces"> </code><span class="block" style="margin-left: 7px ! important;"><code class="plain">call MPI_COMM_RANK(MPI_COMM_WORLD, myPE, ierr)</code></span></span></div>
<div class="line alt1"><code class="number">07.</code><span class="content"><code class="spaces"> </code><span class="block" style="margin-left: 7px ! important;"><code class="plain">call MPI_COMM_SIZE(MPI_COMM_WORLD, numProcs, ierr)</code></span></span></div>
<div class="line alt2"><code class="number">08.</code><span class="content"><code class="spaces"> </code><span class="block" style="margin-left: 7px ! important;"><code class="plain">print *, &quot;Hello World from &quot;, myPE </code></span></span></div>
<div class="line alt1"><code class="number">09.</code><span class="content"><code class="spaces"> </code><span class="block" style="margin-left: 7px ! important;"><code class="plain">call MPI_FINALIZE(ierr)</code></span></span></div>
<div class="line alt2"><code class="number">10.</code><span class="content"><span class="block" style="margin-left: 0px ! important;"><code class="plain">end program helloWorld<br>----------------------------------<br></code></span></span></div>
</div>I have some other programs to run . Can you suggest a way out ?<br><br>RIGVED<br><br><div class="gmail_quote">On Wed, Sep 21, 2011 at 9:53 PM, Anthony Chan <span dir="ltr">&lt;<a href="mailto:chan@mcs.anl.gov">chan@mcs.anl.gov</a>&gt;</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;"><div class="im"><br>
<br>
----- Original Message -----<br>
<br>
&gt; when i execute the command mpif90 -v, i get following error. Any solution<br>
&gt; for this linking issue sir<br>
&gt;<br>
&gt;<br>
&gt; /usr/lib/gcc/x86_64-redhat-linux/4.1.2/libgfortranbegin.a(fmain.o): In<br>
&gt; function `main&#39;:<br>
&gt; (.text+0xa): undefined reference to `MAIN__&#39;<br>
&gt; collect2: ld returned 1 exit status<br>
<br>
</div>Don&#39;t worry about that. MPICH-1&#39;s fortran compiler wrapper isn&#39;t careful about<br>
this case.  Try using mpif90 to compile a fortran MPI program and see if it runs.<br>
Again, we don&#39;t support it so you are on your own.<br>
<div><div></div><div class="h5"><br>
A.Chan<br>
_______________________________________________<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" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
</div></div></blockquote></div><br>