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.
You're asking for wild guesses? Maybe you used 32-bit compilation and neglected to set /stack ?
Does your version of mkl not produce the following (not that it explains your problem)?
C:\Program Files (x86)\Intel\Composer XE 2013 SP1\mkl\include\mkl_vml.f90(179):
warning #6379: The structure contains one or more misaligned fields. [ERROR_ST
My remarks are not about the stack problem, but something else that I noticed.
There are two instances of [fortran]if(run_parallel .or. (lp2 .eq. 1))then[/fortran] in your program. Since run_parallel is of type INTEGER and not LOGICAL, you are using an extension of Fortran in applying the .OR. operator to an integer operand. Are you aware of the implications?
Thank you for your prompt response! Mecej4 is right. I had made a mistake in using the run_parallel. Thank you!
However, the problem still exists. As TimP asked. I run the program in the x64 platform. In my compilation no warning exists. The following is the compilation information. Is it possible that this is caused by the version of mkl? The version is mkl 11.0 update 1 for windos* Os. I also changed two parameters in project>property>linker>stack reserve size and stack commit size both to 1000000000. But the problem still exists.
----- Build started: Project: test_qr, Configuration: Debug|x64 ------
Compiling with Intel(R) Visual Fortran Compiler XE 13.0.0.089 [Intel(R) 64]... test_QR.f90
Build log written to "file://E:\wanghg\test_fortran\test_qr\test_qr\test_qr\x64\Debug\BuildLog.htm" test_qr - 0 error(s), 0 warning(s)
After changing the type of "run_parallel" to LOGICAL and replacing run_parallel = 1 by run_parallel = .TRUE., I compiled and ran your program using the 13.1.171 compiler on Windows. The 32 and the 64 bit versions of program ran to completion with no error messages. I think that we need more particulars about your software setup if we are to be able to reproduce the error.
Hi, Dear Mecej4:
Thank you! My compiler is Intel(R) Visual Fortran Compiler XE 13.0.0.089 [Intel(R) 64]. The version of mkl is mkl 11.0 update 1 for windos* Os. Does the versions not match or else? Need I update both the compiler and the mkl?
It would help if you listed the compiler options in effect (or attached the build-log file). Did you try more than one set of options yourself, and did the error occur in the same way then?
Hi, Dear all:
Thank you for your suggestions. I had update my mkl to mkl11.0 update 4. But the same problem still exists. I attached the buildlog here. Please help me see if the configuration is not correct. Thank you!
Build Log Build started: Project: test_qr, Configuration: Debug|x64 Output Compiling with Intel(R) Visual Fortran Compiler XE 13.0.0.089 [Intel(R) 64]... ifort /nologo /debug:full /Od /I"D:\ITProgram\Intel\Composer XE2013\mkl\include" /Qopenmp /warn:interfaces /module:"x64\Debug\\" /object:"x64\Debug\\" /Fd"x64\Debug\vc100.pdb" /traceback /check:all /libs:static /threads /dbglibs /Qmkl:parallel /c /Qvc10 /Qlocation,link,"D:\ITProgram\Microsoft Visual Studio 10.0\VC\\bin\amd64" "E:\wanghg\test_fortran\test_qr\test_qr\test_qr\test_QR.f90" Linking... Creating temporary file "RSP1.rsp" with contents [ /OUT:"x64\Debug\test_qr.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"D:\ITProgram\Intel\Composer XE2013\mkl\lib\intel64" /MANIFEST /MANIFESTFILE:"E:\wanghg\test_fortran\test_qr\test_qr\test_qr\x64\Debug\test_qr.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"E:\wanghg\test_fortran\test_qr\test_qr\test_qr\x64\Debug\test_qr.pdb" /SUBSYSTEM:CONSOLE /STACK:1000000000,1000000000 /IMPLIB:"E:\wanghg\test_fortran\test_qr\test_qr\test_qr\x64\Debug\test_qr.lib" mkl_blacs_ilp64_dll.lib mkl_blacs_intelmpi_ilp64.lib mkl_blacs_intelmpi_lp64.lib mkl_blacs_lp64_dll.lib mkl_blacs_mpich2_ilp64.lib mkl_blacs_mpich2_lp64.lib mkl_blacs_msmpi_ilp64.lib mkl_blacs_msmpi_lp64.lib mkl_blas95_ilp64.lib mkl_blas95_lp64.lib mkl_cdft_core.lib mkl_cdft_core_dll.lib mkl_core.lib mkl_core_dll.lib mkl_intel_ilp64.lib mkl_intel_ilp64_dll.lib mkl_intel_lp64.lib mkl_intel_lp64_dll.lib mkl_intel_sp2dp.lib mkl_intel_thread.lib mkl_intel_thread_dll.lib mkl_lapack95_ilp64.lib mkl_lapack95_lp64.lib mkl_pgi_thread.lib mkl_pgi_thread_dll.lib mkl_rt.lib mkl_scalapack_ilp64.lib mkl_scalapack_ilp64_dll.lib mkl_scalapack_lp64.lib mkl_scalapack_lp64_dll.lib mkl_sequential.lib mkl_sequential_dll.lib "x64\Debug\test_QR.obj" ] Creating command line "Link @"E:\wanghg\test_fortran\test_qr\test_qr\test_qr\x64\Debug\RSP1.rsp"" Link: executing 'link' Embedding manifest... mt.exe /nologo /outputresource:"E:\wanghg\test_fortran\test_qr\test_qr\test_qr\x64\Debug\test_qr.exe;#1" /manifest "E:\wanghg\test_fortran\test_qr\test_qr\test_qr\x64\Debug\test_qr.exe.intermediate.manifest" test_qr - 0 error(s), 0 warning(s)