- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a problem concerning the use of the subroutine LIN_SOL_GEN to compute a matrix inversion.
The following error appears:error #6285: There is no matching specific subroutine for this generic subroutine call.
I show my code below.
PROGRAM INVM
!==============================================================================!
! PROGRAM INVM VS. 1.0 19-OCT-2010 !
!==============================================================================!
! MATRIX INVERSION
!==============================================================================
! LIBRERIA IMSL
INCLUDE 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'
!==============================================================================
USE LIN_SOL_GEN_INT
IMPLICIT REAL(8) (A-H,O-Z)
REAL(8),ALLOCATABLE :: A(:,:),B(:,:),INV(:,:),X(:,:),RES(:,:)
REAL(8),DIMENSION(2) :: DETR,DETR_INV
WRITE(*,*) 'Matrix dimension:'
READ(*,*) N
ALLOCATE(A(N,N),B(N,0),INV(N,N),X(N,0),RES(N,N),STAT=IK)
IF(IK/=0) THEN
WRITE(*,*) 'Error: no allocation!'
STOP
ENDIF
! Compute the matrix inverse and its determinant.
DO I=1,N
B(I,0)=1.D0
ENDDO
CALL LIN_SOL_GEN(A,B,X,NHRS=0,AINV=INV,DET=DETR)
! Compute the determinant for the inverse matrix.
CALL LIN_SOL_GEN(INV,B,X,NHRS=0,DET=DETR_INV)
! Check residuals, A times inverse = Identity.
RES=MATMUL(A,INV)
DO I=1,N
RES(I,I)=RES(I,I)-1.D0
ENDDO
WRITE(*,*) INV
STOP
END
Thank you very much,
AM
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You misspelled the keyword argument NRHS.
You will encounter run-time errors since you are not properly allocating and initializing the input arrays to the IMSL routine. It would be useful to compile with checks turned on until you correct these errors.
You will encounter run-time errors since you are not properly allocating and initializing the input arrays to the IMSL routine. It would be useful to compile with checks turned on until you correct these errors.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page