[mpich-discuss] Newbie getting started question?

Evren Yurtesen IB eyurtese at abo.fi
Sat Sep 15 14:14:30 CDT 2012


apt-file was just an example from ubuntu which has .a static library 
files for mpich2... it searches files in all packages available, on 
fedora you should use 'yum whatprovides' (see the manual)

I dont have access to many fedora/centos/rhel boxes since converted many 
to ubuntu, but on one fedora 15 box (unless if you are not using fedora, 
of course it might be different situation for you and since I dont know 
what OS you are using, I might be giving wrong information):

$ module avail

------------------------ /usr/share/Modules/modulefiles ------------------------
dot         module-cvs  module-info modules     null        use.own

------------------------------- /etc/modulefiles -------------------------------
mpi/openmpi-x86_64 mpich2-x86_64      openmpi-x86_64
$

Your module name might be different. But I see the module in all fedora 
boxes where mpich2 was installed.

As you can see from the following, fedora does not have .a library files 
for mpich2

$ yum whatprovides '*libmpichf90*'
mpich2-1.4-0.1.rc1.fc15.i686 : A high-performance implementation of MPI
Repo        : fedora
Matched from:
Other       : libmpichf90.so.3
Filename    : /usr/lib/mpich2/lib/libmpichf90.so.3.0
Filename    : /usr/lib/mpich2/lib/libmpichf90.so.3



mpich2-devel-1.4-0.1.rc1.fc15.x86_64 : Development files for mpich2
Repo        : fedora
Matched from:
Filename    : /usr/lib64/mpich2/lib/libmpichf90.so



mpich2-1.4-0.1.rc1.fc15.x86_64 : A high-performance implementation of MPI
Repo        : fedora
Matched from:
Filename    : /usr/lib64/mpich2/lib/libmpichf90.so.3.0
Other       : libmpichf90.so.3()(64bit)
Filename    : /usr/lib64/mpich2/lib/libmpichf90.so.3



mpich2-devel-1.4-0.1.rc1.fc15.i686 : Development files for mpich2
Repo        : fedora
Matched from:
Filename    : /usr/lib/mpich2/lib/libmpichf90.so



mpich2-devel-1.4.1p1-4.fc15.x86_64 : Development files for mpich2
Repo        : updates
Matched from:
Filename    : /usr/lib64/mpich2/lib/libmpichf90.so



mpich2-1.4.1p1-4.fc15.i686 : A high-performance implementation of MPI
Repo        : updates
Matched from:
Other       : libmpichf90.so.3
Filename    : /usr/lib/mpich2/lib/libmpichf90.so.3.3
Filename    : /usr/lib/mpich2/lib/libmpichf90.so.3



mpich2-devel-1.4.1p1-4.fc15.i686 : Development files for mpich2
Repo        : updates
Matched from:
Filename    : /usr/lib/mpich2/lib/libmpichf90.so



mpich2-1.4.1p1-4.fc15.x86_64 : A high-performance implementation of MPI
Repo        : updates
Matched from:
Filename    : /usr/lib64/mpich2/lib/libmpichf90.so.3.3
Other       : libmpichf90.so.3()(64bit)
Filename    : /usr/lib64/mpich2/lib/libmpichf90.so.3



mpich2-1.4.1p1-4.fc15.x86_64 : A high-performance implementation of MPI
Repo        : installed
Matched from:
Filename    : /usr/lib64/mpich2/lib/libmpichf90.so.3.3
Other       : libmpichf90.so.3()(64bit)
Filename    : /usr/lib64/mpich2/lib/libmpichf90.so.3



mpich2-devel-1.4.1p1-4.fc15.x86_64 : Development files for mpich2
Repo        : installed
Matched from:
Filename    : /usr/lib64/mpich2/lib/libmpichf90.so
$

Your module name might be different.

Thanks,
Evren

On Sat, 15 Sep 2012, John Chludzinski wrote:

> Tried: "$ ldconfig -p | less" and did a search on "libmpichf90" - nothing.
> 
> "apt-file" is an unrecognized command.
> 
> $ module load mpich2-x86_64
> ModuleCmd_Load.c(204):ERROR:105: Unable to locate a modulefile for 'mpich2-x86_64'
> 
> 
> 
> On Sat, Sep 15, 2012 at 6:54 AM, Evren Yurtesen IB <eyurtese at abo.fi> wrote:
>       Check with ldconfig -p if you see libmpichf90 in the output.
>
>       The .a files are for static linking, .so files are for dynamic linking. If you dont see the .a files, this simply means that your package does not
>       include them. I have them on my Ubuntu box. (but I dont see them on a Fedora box)
>
>       $ apt-file search 'libmpichf90.a'
>       libmpich1.0-dev: /usr/lib/mpich/lib/libmpichf90.a
>       libmpich2-dev: /usr/lib/libmpichf90.a
>       $
>
>       If you are using fedora, try this before compiling, it should load all the necessary paths:
>
>       module load mpich2-x86_64
>
>       To be honest, I was using fedora until recently when I got fed up with it due to similar problems :)
>
>       Thanks,
>       Evren
>
>       On Fri, 14 Sep 2012, John Chludzinski wrote:
>
>             $ 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
> 
> 
> 
> 
> _______________________________________________
> 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
> 
> 
> 
>


More information about the mpich-discuss mailing list