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

dss routines - sequence

Harald31415
Beginner
1,057 Views

Hi everyone,
I am testing the dss routines. Everything seems fine: I can call dss_create, dss_define_structure, dss_reorder, dss_factor_real and dss_slove_real in that sequence and get the expected result. I can also repeat the sequence.

However, if I again call define_structure after factor_real and before solve_real I get error -13 ( MKL_DSS_TERM_LVL_ERR )

Did I miss something ? Is this not allowed ? Is there a way to undo the results of dss_reorder and dss_factor_real ? 
Any help appreciated

Harald

0 Kudos
5 Replies
Harald31415
Beginner
1,006 Views

I solved it pragmatically: I start from scratch  before each define_structure. Yet I am interested in the concept.

 

 

0 Kudos
mecej4O
New Contributor I
907 Views

Please read the documentation, which lists the order in which the individual DSS routines should be called. Usually, the structure of the matrix does not change during a calculation. Often, even the matrix is constant but the right hand side vector changes. If so, the matrix may be factorized just once, and only the solution plase needs to be repeated for each right hand side. The factorization is the most time-consuming part, so it makes sense to do it as few times as possible -- just once if that is correct to do.

0 Kudos
Harald31415
Beginner
895 Views

thank you mecey40. I did read the documentation; my question was, if the same handle can be used for different matrices, even before finishing the cycle.

0 Kudos
Fengrui
Moderator
830 Views

No, it can not. Internal results are stored in the handle. Using it for different matrices before finishing the cycle leads to undefined behavior.

0 Kudos
Harald31415
Beginner
824 Views

Thank you. That is a clear answer. I thought, there is some clear or free or release command which I missed.

0 Kudos
Reply