When I use the fortran 77 subroutine cgelsy in my program. A MKL Error is encountered. Microsoft visual studio also shows the message "Run-time Check Failure #2- Stack around variable "UV_F77$INFO' was corrupted.
I checked the parameters. It seems that they are correct.
Please help me check what is the problem in my program? Thank you very much!
The program is uploaded.
Brief introduction of my program is list below.
In this program, I use the open-MP to calculate the 300 least square solutions. I defined a type named QR_pair_test. In this type two matrices QLE and RLE are stored. In each time of calculation, the entries of RLE is set to 100 and QLE is calculated using a subroutine named calculate_interaction. Subsequently I calculate QLE*X=RLE using cgelsy that will store the solution X in RLE.