<b>$ mpif90 -o ex1 ex1.f95</b><br>/usr/bin/ld: cannot find -lmpichf90<br>/usr/bin/ld: cannot find -lmpichf90<br>/usr/bin/ld: cannot find -lmpich<br>collect2: ld returned 1 exit status<br><br>No go!<br><br>I used "yum install mpich2", should this bring the compiler wrapper? <br>
<br>Why does the PETSc MPICH2 lib directory have *.a files while the newly installed MPICH2 have *.so files?<br><br>---John<br><br><div class="gmail_quote">On Fri, Sep 14, 2012 at 5:54 PM, Anthony Chan <span dir="ltr"><<a href="mailto:chan@mcs.anl.gov" target="_blank">chan@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If the mpich2 installation you are using has Fortran 90 binding<br>
correctly, you don't need -L<MPICH2_LIBDIR> when using mpif90.<br>
The compiler wrapper should have taken care of setting all -L<br>
flags to mpich2 libraries, try<br>
<br>
mpif90 -o ex1 ex1.f95<br>
<br>
A.Chan<br>
<div><div class="h5">----- Original Message -----<br>
> I have a small example program I've built and tested before using<br>
> MPICH2<br>
> that come with the PETSc installation.<br>
><br>
> I just installed MPICH2 on a new machine (without PETSc) using: yum<br>
> install<br>
> mpich2.<br>
><br>
> I added /usr/lib/mpich2/bin/ to my PATH env. variable and tried:<br>
> mpif90<br>
> ex1.f95 -L/usr/lib/mpich2/lib/. This resulted in:<br>
><br>
> /usr/bin/ld: cannot find -lmpichf90<br>
> /usr/bin/ld: cannot find -lmpichf90<br>
> /usr/bin/ld: cannot find -lmpich<br>
><br>
> I checked and the PETSc installation has *.a files in the lib<br>
> directory,<br>
> whereas my new installation of MPICH2 has *.so files. What do I need<br>
> to do<br>
> to get this to compile?<br>
><br>
> ---John<br>
><br>
</div></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" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><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>
</blockquote></div><br>