I tried to develop a code and use LAPACK subroutines to calculate Eigen value and Eigenvector in the code and was succesful. The code runs without any errors.
Since my main goal was to solve a large matrix and there are memory limitations in Windows, I tried to allocate and deallocate the arrays in the code. Before stopping the code, a pop-window shows and reports that the ***.exe has stopped working.
I have attached part of the code where allocation and deallocation was done for perusal.
IMPLICIT REAL*8(A-H, O-Z)
real*8, allocatable :: A(:,:),U(:,:),VT(:,:),SH(:,:)
real*8, allocatable :: UH(:,:),AN(:,:),AN1(:,:),AN2(:,:),EV(:,:)
real*8, allocatable :: UHM(:,:),UH1(:,:),B(:,:),V(:,:)
real*8, allocatable :: S(:),WORK(:),EVL(:)allocate (A(M,N),U(M,M),V(N,N),VT(N,N),SH(N,N),STAT = iERROR)
allocate (UH(M,M),AN(M,N),AN1(M,N),AN2(M,N),STAT = iERROR)
allocate (S(N),WORK(LWMAX),EVL(M),UHM(M,N),STAT = iERROR)
allocate (UH1(M,M),B(M,N),EV(N,N),STAT = iERROR)deallocate(A,U,V,VT,SH,UH,AN,AN1,AN2,UHM,UH1,B,EV, STAT = iERROR)
deallocate(S,WORK,EVL,STAT = IERR7)
Problem arises in deallocation. Can someone help me how to debug this error?
Thanks in advance.
Regards
-P.Pradeep Kumar