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

pardiso insufficient memory

insar-dev
Beginner
882 Views

hello,

       i meet a problem in using pardiso. i tested the example:pardiso_sym.c.

1. if i test  it alone, it run successfully.

2. if i copy it to my project and  test as a function, it failed.

 

error msg:

*** Error in PARDISO ( insufficient_memory) error_num= 3
*** Error in PARDISO memory allocation: BEFORE_SYMBOLIC_FACTORIZATION, allocation of -3734628 bytes failed
total memory wanted here: -3734487 kbyte

 

environment:

1. ubuntu20.04

2. mkl version: 2022.0.2

3. set(MKL_INTERFACE lp64)

4. my app link with openblas

5. gcc 11

 

thank you for your suggestions.

0 Kudos
13 Replies
mecej4
Black Belt
867 Views

Something went wrong in the course of converting the code in the stand-alone version of the Pardiso-sym example into a function that is a part of some larger code. It is next to impossible to tell what the error was without seeing the code after conversion.

A symptom of what went wrong is that the reported sizes of arrays that failed allocation are negative. Check whether there is inconsistent usage of 32-bit and 64-bit integers among the arguments to Pardiso, and check the argument lists.

Gennady_F_Intel
Moderator
835 Views

Could you show how do you compile and link this case, please?

Gennady_F_Intel
Moderator
810 Views

 I took your example and added only main() to define the entry point.

Linking explicitly against the mkl's static libs like as follow ( see MKL_Linker Adviser) :

icl MKLROOT\include MKLROOT\mkl_intel_lp64.lib  ..\intel64\mkl_intel_sequential.lib ..\intel64\mkl_core.lib 

I see everything works as expected: 

=== PARDISO: solving a symmetric indefinite system ===
1-based array indexing is turned ON
PARDISO double precision computation is turned ON
METIS algorithm at reorder step is turned ON
Scaling is turned ON

....................................................

....................................................
Summary: ( reordering phase )
================

Solve completed ...
The solution of the system is:
x [0] = -0.041860
x [1] = -0.003413
x [2] = 0.117250
x [3] = -0.112640
x [4] = 0.024172
x [5] = -0.107633
x [6] = 0.198720
x [7] = 0.190383

 

insar-dev
Beginner
803 Views

all codes  are same except the function name.

insar-dev
Beginner
803 Views

My project has other codes which use pardiso. it works well in windows,  but reported the error in linux.

Then i tested pardiso_sym. it run successfully alone, but failed in my project.

 

insar-dev
Beginner
803 Views

Thank you for your reply.

I did not convert code. All of them have same code except function name;

In my project, i invoke PardisoTest as following code:

 

void LargeAreaAnalyzer::benchmark()
{
     PardisoTest();
}

 

i have other codes using pardiso, it works well in windows, but failed in linux;

Then i test pardiso_sym, it also failed in my project, but worked well  in alone mode.

 

Gennady_F_Intel
Moderator
781 Views

if the standalone case works as expected, then you have to check how you pass all parameters to the mkl pardiso into your project.


Kirill_V_Intel
Employee
774 Views

I strongly suspect that the issue is in the interface being linked and compilation line.

 

Can you provide full compilation and link line in case you're running the code in your project? 

 

Just making something reasonable up: CMake might link ilp64 by default and hence add smth like -DMKL_ILP64, while then when you set interface to lp64, it only corrects the interface library being linked but keeps the compilation flag which leads to integer size mismatch between the code in the project and the interface layer.

 

Best,
Kirill

insar-dev
Beginner
759 Views

I think i set the correct interface:

set(MKL_INTERFACE lp64)

find_package(MKL REQUIRED)

insardev_0-1644628741051.png

 

if i use static mkl library, it run successfully.

set(MKL_INTERFACE lp64)

set(MKL_LINK static)

find_package(MKL REQUIRED)

 

if i design as following, it can also run suceefully:

insardev_1-1644629094829.pngMy program struction:

insardev_3-1644629938048.png

I suspect that it could be effected by other library, maybe openblas?

 

 

 

 

 

 

 

 

 

 

insar-dev
Beginner
736 Views
Gennady_F_Intel
Moderator
712 Views

The " Error in PARDISO ( reordering_phase) error_num= -180" problem indicates

wrongly using the CSR format by applying column indexes not in increasing order per row.

We recommend enabling the matrix checker (iparm[27]=1) which is disabled by default and always checking the error status returned by MKL Pardiso. In such cases, MKL Pardiso has to return -3 error.

The -180 problem is not documented and we will add it into one of the future releases.



insar-dev
Beginner
693 Views

if i both link gomp and iomp, it will produce the error.

Gennady_F_Intel
Moderator
581 Views

The issue has not been reproduced on our end and it is closing. We will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.



Reply