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

Need help on zhetrd function

Zhu_W_Intel
Employee
695 Views

I have the following code:

double* work = new double [2*lwork];

double* d_matrix = new double [vlength];

double* e_matrix = new double [(vlength-1)];

double* tau_matrix = new double [2*(vlength-1)];

char* cflag = "U";

int info =0;

zhetrd(cflag,&vlength,

matrix,&vlength, d_matrix, e_matrix, tau_matrix, work, &lwork, &info);

Here , matrix is a double array (double *), 1 dimension.

I would like to know what is the size of matrix. It seems when the size of matrix varies, the result will be different.

Thanks.

0 Kudos
5 Replies
Michael_C_Intel4
Employee
695 Views

Hello,

matrix should be vlength by vlength, that is, in your program:


double *matrix = new double[2*vlength*vlength];

Also, try to allocate one element more for tau array - current impementation is using n elements of tau:

double *tau_matrix = new double[2*vlength];

0 Kudos
Zhu_W_Intel
Employee
695 Views

How much differences should I expect from the output matrix? I see quite big differences from a 32 build and a 64 build.

I mailed the program and test data through email. Thanks.

0 Kudos
TimP
Honored Contributor III
695 Views

How much differences should I expect from the output matrix? I see quite big differences from a 32 build and a 64 build.

I mailed the program and test data through email. Thanks.

Do you mean that your own source code produces different results for 32-bit x87 code and 64-bit SSE code?

0 Kudos
Zhu_W_Intel
Employee
695 Views
I have some data, I feed in zhetrd function call, look at the output. I got different results from 32 build and 64 build.
Not sure what you meant SSE. I didn't use SSE here.
It is my example program. The differences are much bigger than I would expected.
Thanks.

0 Kudos
Gennady_F_Intel
Moderator
695 Views

Laura,

it seems, this is the error in this routine. We will work on this problem asap and inform you if any updates.

--Gennady
0 Kudos
Reply