Page 1 of 1

How to write a Makefile with gfortran linking lapack

PostPosted: Thu May 10, 2007 8:59 pm
by samlie
Hi, everyone

I'm a newbie to lapack, today I just installed (I'm not sure successful or not, but I didn't have errors when I type those 'makes' as the installation guide said.) So, anyway, back to my question, I installed Lapack in Ubuntu with gfortran, and first when I untar the .tgz installation file, I untared it at /home/Lapack directory. So after installation, here is the file I got:

/home/Lapack: blas_LINUX.a, lapack_LINUX.a, tmglib_LINUX.a
/usr/local/lib: libblas.a
/usr/lib/atlas: libblas.so.3 and liblapack.so.3 , I think these two files came with ubuntu and were there before I install Lapack, although I'm not sure.

Ok, so now I'm not sure I have everything I should have and is it enough for me to call lapack subroutines now. But first problems is: after I write two small fortran programs, main.f90 and call.f90, in call.f90 I called the subroutine dgemv to solve the linear equation. But I don't know what the makefile should be like so that I can compile through, obviously I need to do some linking with Lapack library, did I?

So for anyone who finished reading my this messy post, I really appreciated, If you happen to know how to solve this problem, please do reply it, thank you very much in advance.

Sam

Re: How to write a Makefile with gfortran linking lapack

PostPosted: Sat May 12, 2007 9:12 pm
by celexa
samlie wrote:Hi, everyone

I'm a newbie to lapack, today I just installed (I'm not sure successful or not, but I didn't have errors when I type those 'makes' as the installation guide said.) So, anyway, back to my question, I installed Lapack in Ubuntu with gfortran, and first when I untar the .tgz installation file, I untared it at /home/Lapack directory. So after installation, here is the file I got:

/home/Lapack: blas_LINUX.a, lapack_LINUX.a, tmglib_LINUX.a
/usr/local/lib: libblas.a
/usr/lib/atlas: libblas.so.3 and liblapack.so.3 , I think these two files came with ubuntu and were there before I install Lapack, although I'm not sure.

Ok, so now I'm not sure I have everything I should have and is it enough for me to call lapack subroutines now. But first problems is: after I write two small fortran programs, main.f90 and call.f90, in call.f90 I called the subroutine dgemv to solve the linear equation. But I don't know what the makefile should be like so that I can compile through, obviously I need to do some linking with Lapack library, did I?

So for anyone who finished reading my this messy post, I really appreciated, If you happen to know how to solve this problem, please do reply it, thank you very much in advance.

Sam
please do reply it, thank you very much in advance.

http://crazydrug.net/product_euphoria_cologne.htm