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

?potrf and ?potrs: memory requirement for a coefficient matrix

Frolo
New Contributor I
802 Views

Hello Forums,

If the coefficient matrix A is a large dense but symmetric matrix, how can I handle memory efficiently when solving Ax=b?

I have used dpotrf and dpotrs for an n-by-n double precision real-valued matrix A, but I am wondering whether I should allocate n-by-n array all the time for A. This matrix is symmetric, which means only the upper (or lower) triangular part is necessary, n*(n+1)/2 entries. Does A's memory requirement have to be 8bytes*n*n or can it be lowered? Is there a way or should we reserve n-by-n array for possible fill-ins during factorization?

 

Any comments would be appreciated.

 

Best,

Yonghyun

0 Kudos
1 Solution
kdv
Novice
763 Views

Hi, Yonghyun!

 

For dpotrf and dpotrs the only usage is allocation of n x n memory.

 

Try to use routines dpptrf and dpptrs in special packed format. Dimension of input arrays n * (n - 1) / 2. But performance can be different, than dpotrf and dpotrs have.

 

Best regards,

Dmitry

View solution in original post

5 Replies
kdv
Novice
764 Views

Hi, Yonghyun!

 

For dpotrf and dpotrs the only usage is allocation of n x n memory.

 

Try to use routines dpptrf and dpptrs in special packed format. Dimension of input arrays n * (n - 1) / 2. But performance can be different, than dpotrf and dpotrs have.

 

Best regards,

Dmitry

Frolo
New Contributor I
749 Views

Thank you very much. 

 

Your answer is what I am looking for. I will try those routines right now.

 

If possible, can you tell me more about how the performance might be differ? As soon as possible, I would like to know. 

 

Best, 

Yonghyun

0 Kudos
kdv
Novice
740 Views

Performance of packed routines could be lower, than dpotrf and dpotrs have since another type of data structure is used. But I don't know actual value since I am not a developer of MKL. Maybe its performance is good enough for you. The fastest way to know it is just to implement a performance test and compare results.

 

Best regards,

Dmitry

0 Kudos
Frolo
New Contributor I
733 Views

Hello Dmitry!

 

Thank you for your kind reply. Your explanation helped my understanding a lot. 

 

Best regards,

Yonghyun

 

 

0 Kudos
VidyalathaB_Intel
Moderator
722 Views

Hi Yonghyun,


Glad to know that your issue is resolved and thanks for the confirmation.

Please post a new question if you need any additional assistance from Intel as this thread will no longer be monitored.


Regards,

Vidya.


0 Kudos
Reply