How to run specific modules in LAPACK in a Fortran code?
With the title "Using LAPACK library in fortran codes" in this forum, it is clearly explained.
Use call option to find the solution for the A*X = B lenear equations using the routine DGESV
call DGESV()
Compile the code by
gfortran -o output codeName -L. -lliblapack
From LAPACK page,
"DGESV computes the solution to a real system of linear equations
A * X = B,
where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
The LU decomposition with partial pivoting and row interchanges is
used to factor A as
A = P * L * U,
where P is a permutation matrix, L is unit lower triangular, and U is
upper triangular. The factored form of A is then used to solve the
system of equations A * X = B. "
No comments:
Post a Comment