solve ill-conditioned linear system

solve ill-conditioned linear system

Hello,

I would like to solve a linear system Ax = b with :

         int ia[10] = {1, 5, 9, 11, 15, 19, 21, 23, 25, 26};
         int ja[25] = {1, 2, 4, 5, 2, 3, 5, 6, 3, 6, 4, 5, 7, 8, 5, 6, 8, 9, 6, 9, 7, 8, 8, 9, 9};
         double a[25] = {
         40.2991,  2.5049,                0.929679,  2.44749,
                         40.2991, 2.5049,                   0.929679,  2.44749,
                                        40.2991,                                   0.929679,
                                                     40.2991,    2.5049,                       0.929679,   2.44749,
                                                                       40.2991,    2.5049,                        0.929679,  2.44749,
                                                                                         40.2991,                                        0.929679,
                                                                                                          40.2991,     2.5049,
                                                                                                                             40.2991,    2.5049,
                                                                                                                                               40.2991
                                                                                              };
 
         double rhs[9] = {3.40521, 3.55851, 30.0158, 39300.2, 41805.2, 2506.73, 930.681, 3378.17, 2448.49};

but it returns me a wrong result.

Is there an iparm for detecting ill-conditionned linear systems (to make me sure this is the problem), and in this case how can I solve this problem?

Thanks for any help you can give me.

6 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

By adapting the provided example dss_sym_c.c in the MKL examples/solverc directory to your example problem above, I found that the residuals never exceed 7e-12 in magnitude. Therefore, I cannot agree that the results are "wrong", nor do I think that ill-conditioning is much of a problem.

Perhaps, you have some errors in the arguments that you passed to the MKL solver routines.

You did not state how you solved the problem, which MKL routines you used, and what the results were. Please provide more details, and state the platform, compiler and MKL versions used.

I use MKL's Pardiso. The Package ID of mkl is : l_mkl_p_10.0.011.

My compiler is icc and my platform is Redhat.I use the solver's default parameters.

Pardiso returns me this vector :

  sol =
 -81.5585
 -27.2802
 -0.657835
 906.03
 1028.06
 60.8015
 18.1186
 80.0508
 60.7579

Hi Antonie,

Nice to see you here again :) As we can see your matrix has diagonal dominant, so, if you use symmetric type you matrix is positive define. Could provide your input parameters? 

With best regards,

Alexander Kalinkin

 Sorry for loosing your time, I made a mistake in checking my result

Sorry

with best regards,

Antoine

Hi Antoine,

No problem, feel free to ask any questions!

With best regards,

Alexander Kalinkin

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi