-
LAPACK linking...
I have Linear Algebra PACKage, (LAPACK) installed in my computer as I had opted for it during installationof Linux RH8.0. I need to use some of the routines in this package. These routines can be used along with fortran... I need to link the LAPACK when I compile the fortran program... It seems to be similar to linking the math.h files when I say
cc filename.c -lm
Can someone let me know how I can link the lapack routines to execute my fortran programs?
Thanks in Advance...
-
Hi Salem,
It was very urgent for me to know the answer and I couldn't think of a better place to post...
I read that I need to use g77 prog.f -ldxml,
but that wouldn't work...
Could u let me know of a forum like this one where fortran/numerical stuff are discussed?
Ashesh
-
Finally could compile my program that call LAPACK subroutines.
To compile a program that calls LAPACK subroutines use "-llapacl" ie.,
g77 filename.f -llapack
If "BLAS" subroutines are also called, then use:
g77 filename.f -llapack -lblas
One more problem I faced during compiling is as follows:
In "C" , we can include the files which contain the subroutines that we need by saying
#include "filename.h"
In fortran, I have not been able to use include statement. But we can compile by giving the path/file of all the files that have the subroutines.
g77 filename.f /home/ashesh/fortran/file1.f /home/ashesh/fortran/file2.f -llapack
is equivalent to including all the program which have the functions I need to call.