inv_ge_LAPACK.F90
Go to the documentation of this file.00001 subroutine inv_ge_lapack(L,NBh,mat)
00002 implicit none
00003 integer,intent(in)::L
00004 integer,intent(in)::NBh
00005 real(8),intent(inout)::mat(L,L)
00006 integer,allocatable::ipiv(:)
00007 real(8),allocatable::work(:)
00008 integer::Lwork,info,m,n,lda
00009 m=NBh
00010 n=L
00011 lda=L
00012 Lwork=10*m
00013 allocate(ipiv(NBh));ipiv=0
00014 allocate(work(Lwork));work=0.0d0
00015 info=0
00016 call dgetrf(n,m,mat,lda,ipiv,info)
00017 if(info/=0)then
00018 write(6,*)'info(subrouitine dgetrf):',info
00019
00020 endif
00021 call dgetri(m,mat,lda,ipiv,work,Lwork,info)
00022 if(info/=0)then
00023 write(6,*)'info(subrouitine dgetri):',info
00024
00025 endif
00026 deallocate(work)
00027
00028 return
00029 end subroutine