Quantcast
Channel: Intel® Software - Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 3005

problem about LAPACKE_dgetrf and LAPACKE_dgetri

$
0
0

Please see attachment  b.c.

if I comment out from//hmli begin to  //hmli end in the follow code of b.c, it works wrong, but if I do not comment out and use sprintf and atof to convert from double to string, then convert back to double, it work well. 

for (k = 0; k < 64; k++)a[j][i] +=(double) A1[j][k] * A1[i][k];
//hmli begin
sprintf(t,"%lf",a[j][i]);
a[j][i]=atof(t);
//hmli end
a[i][j] = (double)a[j][i];

Is it just because of the precision?

Can you help me? Thank you very much.

  • b.c: source code
  • body.log : input data file
  • ainv.log: result of matrix inversion.
  • compiling :icc -mkl b.c

 

 

AttachmentSize
Downloadapplication/octet-streambody.log1.16 KB
Downloadtext/x-csrcb.c1.68 KB
Downloadapplication/octet-streamainv.log39.27 KB

Viewing all articles
Browse latest Browse all 3005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>