[mpich-discuss] Newbie getting started question?

John Chludzinski john.chludzinski at gmail.com
Fri Sep 14 18:04:01 CDT 2012


*$ mpif90 -o ex1 ex1.f95*
/usr/bin/ld: cannot find -lmpichf90
/usr/bin/ld: cannot find -lmpichf90
/usr/bin/ld: cannot find -lmpich
collect2: ld returned 1 exit status

No go!

I used "yum install mpich2", should this bring the compiler wrapper?

Why does the PETSc MPICH2 lib directory have *.a files while the newly
installed MPICH2 have *.so files?

---John

On Fri, Sep 14, 2012 at 5:54 PM, Anthony Chan <chan at mcs.anl.gov> wrote:

> If the mpich2 installation you are using has Fortran 90 binding
> correctly, you don't need -L<MPICH2_LIBDIR> when using mpif90.
> The compiler wrapper should have taken care of setting all -L
> flags to mpich2 libraries, try
>
> mpif90 -o ex1 ex1.f95
>
> A.Chan
> ----- Original Message -----
> > I have a small example program I've built and tested before using
> > MPICH2
> > that come with the PETSc installation.
> >
> > I just installed MPICH2 on a new machine (without PETSc) using: yum
> > install
> > mpich2.
> >
> > I added /usr/lib/mpich2/bin/ to my PATH env. variable and tried:
> > mpif90
> > ex1.f95 -L/usr/lib/mpich2/lib/. This resulted in:
> >
> > /usr/bin/ld: cannot find -lmpichf90
> > /usr/bin/ld: cannot find -lmpichf90
> > /usr/bin/ld: cannot find -lmpich
> >
> > I checked and the PETSc installation has *.a files in the lib
> > directory,
> > whereas my new installation of MPICH2 has *.so files. What do I need
> > to do
> > to get this to compile?
> >
> > ---John
> >
> > _______________________________________________
> > mpich-discuss mailing list mpich-discuss at mcs.anl.gov
> > To manage subscription options or unsubscribe:
> > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20120914/48e7e5b8/attachment.html>


More information about the mpich-discuss mailing list