bug on sgetrs

Open discussion regarding features, bugs, issues, vendors, etc.

bug on sgetrs

Postby mathtao » Thu Nov 05, 2015 9:30 am

Hi,

I tried to solve the linear equation Ax=b, where A is a 9*9 array listed below and b is 9*1 array filled with zero elements. I have tried two methods.

Method 1:
call sgesv(9,1,a,9,ipiv,b,9,info)

Method 2:
call sgetrf(9,9,a,9,ipiv,info)
call sgetrs('N',9,1,a,9,ipiv,b,9,info)

In my test, method 1 worked but method 2 didn't. Anybody knows why? Method 2 is actually what I need. Thanks.

DATA A/
& 0.2500000,7.2429009E-04, 1.0723306E-02, 4.7634955E-02, 0.1250000,
& 0.2389767, 0.3642767, 0.4626641, 0.2500000, 0.5000000,
&-1.4485803E-03,-2.1446612E-02 ,-9.5269904E-02 ,-0.2500000,
& -0.4779534,
&-0.7285534, -0.9253282, 0.5000000, 0.5000000, 1.4485803E-03,
& 2.1446612E-02, 9.5269904E-02, 0.2499999, 0.4779531, 0.7285531,
& 0.9253327, 0.5000000, 0.5000000,-1.4460249E-03,-1.9291120E-02,
&-5.6222156E-03, 0.7499998, 4.575798, 13.76929, 25.43128,
& 0.5000000, 0.5000000, 1.4293027E-03, 7.9906452E-03,-0.2898659,
& -1.750000, 1.974375 , 33.24201 , 94.31410, 0.5000000,
& 0.5000000, -1.3704496E-03, 2.0553773E-02 , 0.5418495, -1.249999,
& -10.97703, 35.72947 , 220.4367 , 0.5000000, 0.5000000,
& 1.2212018E-03, -6.4339831E-02, -0.1665607 ,4.249999, -15.38186,
& -2.185663, 397.0475 ,0.5000000, 0.5000000,-9.1620837E-04,
& 0.1016594, -0.8309855,1.749996, 6.661992, -74.85165,
& 591.6705, 0.5000000 ,0.2500000,1.9274710E-04 ,4.8151217E-02,
& 0.6329165,-3.874999 ,16.88956, -67.57687,373.7280,
& 0.2500000
& /
mathtao
 
Posts: 2
Joined: Thu Nov 05, 2015 9:11 am

Return to User Discussion

Who is online

Users browsing this forum: No registered users and 5 guests