Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7286 讨论

Unhandled exception stack overflow -Basic question

pretorianos
初学者
5,329 次查看

Hi there,

I am playing around/benchmarking different symmetric sparse solvers and I am having some trouble with the pardiso direct solver available in mkl.

Specifically I have only performed some minor adjustments to the pardiso_sym.c example file where instead of using the predefined A  matrix I just read the matrix from a text file. The problem is that while the script works perfectly fine for smaller matrices, when I am trying to define the ja vector as ( MKL_INT ja[nnz]; )  with nnz larger than 80000 i get the following error:

 

Unhandled exception at 0x00007FF61D47DCB7 in pardisoSolver.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x00000052F80D3000).

 

I am using Visual studio 2022 with the following settings:

pretorianos_0-1690096877531.png

 

I have attached the single main.cpp file plus the txt files from which i read the matrix A.

 

 

标签 (1)
0 项奖励
1 解答
mecej4
名誉分销商 III
5,258 次查看

I changed the directory of the data files from "c:/Users/print/Documents/" to "", and used the linker option /stack:10000000. The resulting EXE ran normally and output reasonable results.

在原帖中查看解决方案

3 回复数
mecej4
名誉分销商 III
5,259 次查看

I changed the directory of the data files from "c:/Users/print/Documents/" to "", and used the linker option /stack:10000000. The resulting EXE ran normally and output reasonable results.

ShanmukhS_Intel
主持人
5,228 次查看

Hi Nick,

 

Thanks for posting in Intel communities.

 

Based on the sample reproducer shared by you, it is expected to change the directory of the data files from (std::string directory = "c:/Users/print/Documents/");  to an empty string (std::string directory = "";)  in your code which means that the input data files are located in the same directory as the executable file or the working directory when running the Visual Studio project as mecej4 mentioned.

 

In addition, update the stack size to 10000000 which is used to specify the amount of memory to reserve for the stack space of each thread in your program at compile time. It is available under the project properties page as below.

Configuration properties -> Linker -> Stack reserve size. Make sure the settings changed are reflected in your current project/file by using the appropriate configuration and platform. Attached are the screenshots for your reference.

 

ShanmukhS_Intel_0-1690285444613.png

 

 

Best Regards,

Shanmukh.SS

 

0 项奖励
ShanmukhS_Intel
主持人
5,142 次查看

Hi Nick Les,


It’s great to know that the issue has been resolved, in case you run into any other issues please feel free to create a new thread.


Best Regards,

Shanmukh.SS


0 项奖励
回复