Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7062 Discussions

Unhandled exception stack overflow -Basic question

pretorianos
Beginner
1,893 Views

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.

 

 

Labels (1)
0 Kudos
1 Solution
mecej4
Honored Contributor III
1,822 Views

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.

View solution in original post

3 Replies
mecej4
Honored Contributor III
1,823 Views

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
Moderator
1,792 Views

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 Kudos
ShanmukhS_Intel
Moderator
1,706 Views

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 Kudos
Reply