Page 1 of 1

MPICH2 and cyglapack

PostPosted: Mon May 10, 2010 12:39 pm
by helvio
Hi,
I am new to this forum, and this is my first post.

I am developing a code in Fortran 90, and I use some basic MPI and LAPACK routines. I work in a Windows platform, but I use Cygwin for development. I use the LAPACK package that comes with the Cygwin installation, which works perfectly fine when I compile F90 codes with gfortran (with the usual -llapack -lblas flags). But this time I need to add MPI routines to my code. I installed MPICH2 from source, and use mpif90 to compile my parallel codes in Cygwin; it also works perfectly fine. However, I don't know how to compile my codes with both MPI and LAPACK!

My question is: is it possible to use the cyglapack libraries together with mpif90? If yes, how can I compile it? What flags should I use? And if not, what should I do to compile LAPACK code with MPICH2 (I need it to be MPICH2!). My code doesn't require parallelization of the linear algebra operations, so I'm happy with LAPACK (I don't need ScaLAPACK just yet).

Any help is appreciated. Thanks!

-- helvio

Re: MPICH2 and cyglapack

PostPosted: Tue May 11, 2010 9:19 am
by helvio
I have solved the problem. It was just a matter of passing to mpif90 the directory where the libraries are located. In a standard Cygwin installation, the command line is simply:

% mpif90 foo.f90 -L/lib/lapack -llapack -lblas

-- helvio