Hi all,
I want to find eigenvalues and eigenvectors for real matrix and i am using DGEEV routine of LAPACK. I am using g95 compiler. While executing it gives error in routine DLACPY at the line where the elements of matrix A are copied to matrix B. The error it gives is "Exception:Access Violation". I am not able to understand this error . If anybody know about it please help me in removing the error.

your matrix A or your matrix B is certainly too small. So that dlcapy touches an unreferenced memory zone while doing the copy. Check again your argument list and your declaration, memory allocation. You certainly have messed up something.

Thank you Julien. Ofcourse the code DLACPY is very simple. Size of matrix A is (3x3). Now i am able to understand that the problem is it is referring to unreferenced memory zone. The problem is with matrix B. When i refer to B in the code , it gives error access violation. I have checked the arguments, and declaration but could not find any error. How to check the memory allocation?

you have a problem in DLACPY in DGEEV. No much surprise from the code you sent. If you set JOBVL='V' and JOBVR='V' for DGEEV, the left and right eigenvectors will be stored in VL and VR. I do not see any allocation for those two guys in your codes. DGEEV fails at some point in your current code. No surprise.

Either you want the right (resp.left) eigenvectors in which case you allocate VR (resp. VL), or you do not want them and you set JOBVR='N' (resp. JOBVL='N').

Hello,
Actually when DLACPY is called the output is VR or VL for which the dummy argument is B in the subroutine itself. The program is giving error at the point where A is to be copied into B. That's why no allocation to VR otherwise whatever be the value of B the same would be VR.

Hello,
I am facing another problem which i am not able to understand that why it is occuring. I am passing the value of LDVL to the subroutine DGEEV. Now in the DGEEV ,initially the value of LDVL is n but when another subroutine is called in which this value is neither passed nor used,after coming out from this routine it gives the value of LDVL as 0 and in the routine itself takes some negative and very large value. Can you tell me what could be wrong here?