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

Memory in PARDISO

programmer85
Beginner
365 Views

Hello,

I am brand new in MKL. I have two question:

1. is it possible to malloc dynamicly memory for doublecomplex structure ? I tried to use basic instructions like for double array (*double)malloc(N*sizeof(double)) or (double)malloc(N*sizeof(double)) and its few combinations but it does not work. I know that I can use doublecomplex, but what if N is not constant ?

2. How much data may be allocated for single matrix in PARDISO ? If I allocate small matrix everything is finem but if I allocate bigger matrix (such as 50 000 x50 000, with 2 000 000 of nonzeros) there is an alert :

STACK IS OVER FLOW, please help me !!!

Thank in advance,

0 Kudos
5 Replies
Gennady_F_Intel
Moderator
365 Views
programmer85,
1)please try to by such way:
typedef struct{
double re;
double i;
}doublecomplex;
N = 50 000;

doublecomplex* aa = new doublecomplex ;

2)STACK IS OVER FLOW happened because of static arrays ...Please use only dynamic allocation.

Please let us know - if anyfurtherproblem- i will provide thetest case for you.

--Gennady

0 Kudos
programmer85
Beginner
365 Views

Unfortunatelly,

using

N = 50 000;

doublecomplex* aa = new doublecomplex ;

An error ocurrs:

Error 1233 error: identifier "new" is undefined ...

0 Kudos
Gennady_F_Intel
Moderator
365 Views
may be renaming *.c to *.cpp will help you
0 Kudos
programmer85
Beginner
365 Views
...no it did not... any other ideas ?
0 Kudos
Konstantin_A_Intel
365 Views

1) "new" is C++, so "icpc" compiler should be used instead of "icc".

2) In order to make it with "icc", please make as follows:

doublecomplex* aa = (doublecomplex*)malloc(sizeof(doublecomplex*N);

Regards,

Konstantin

0 Kudos
Reply