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

Eigan Value Solution (LAPACKE_sggev)

Hamza_K_
Beginner
663 Views

 

 LAPACKE_sggev gives the Eigan Value in my code

The function is not giving correct answer when used on multiple nodes. When nodes = 1 it gives a correct answer

Also, if LAPACKE_sggev is not compatible with opem mpi which function should I use to calculate eigan value in my code.

If any more details are required kindly let me know.

 

Thanks

 

 

 

0 Kudos
15 Replies
Zhen_Z_Intel
Employee
663 Views

Dear customer,

Could you please provide a test case that we will try to reproduce your problem. Thanks.

Best regards,
Fiona

0 Kudos
Hamza_K_
Beginner
663 Views
0 Kudos
Hamza_K_
Beginner
663 Views

Kindly run the Solution.cpp file

Solution configuration : Release

Platform : x86

 

 

 

0 Kudos
Hamza_K_
Beginner
663 Views

I run the exe file through cmd witht he following command :

mpiexec -n 2 Solution.exe "C:\kgg.op4" "C:\mgg.op4"

Find the two op4 files attached in the zipped folder and copy them in C and give the following path

 

KIndly ask anything else, if required

 

0 Kudos
Zhen_Z_Intel
Employee
663 Views

Dear customer,

I tried to run your program, and get error message -13 which represents wrong input value of leading dimension of vl.

I find the reason, I tried to print massNoOfRow and massNoOfCol before calling ggev, they do not get a return value from ReadOP4Data function at the first time. If I set them equals to 1200, there would be no error for mkl eigen value calculation function. Could you please have a check if you meet the same problem. Thanks.

Best regards,
Fiona

0 Kudos
Hamza_K_
Beginner
663 Views

It Worked!

Thanks :)

0 Kudos
Hamza_K_
Beginner
663 Views

Retval = 0 on nodes > 1 now 

0 Kudos
Hamza_K_
Beginner
663 Views

Working on a Project called DynaFlight the Eigen Value matrix is calculated using the function LAPACKE_sggev

 

Issue: Eigen Value Solution when separated from DynaFlight and executed on multiple threads doesn’t give the correct solution

The command used is

 mpiexec -n 2 Solution.exe "C:\kgg.op4" "C:\mgg.op4"

 

0 Kudos
Hamza_K_
Beginner
663 Views

Complete Matrix values when executed through the cmd are in the excel file “Omega_cmd”

Correct Matrix when executed in DynaFlight is in “Output_Omega”

0 Kudos
Hamza_K_
Beginner
663 Views

Output omega file

0 Kudos
Hamza_K_
Beginner
663 Views

Waiting for your response. Thankyou

0 Kudos
Zhen_Z_Intel
Employee
663 Views

Dear customer,

Are you sure you are using same input for DynaFlight? I check with output_omega.txt, the length of return eigen vector is not equals to 1200, but 1080... I could only get result same as Omega_cmd.txt. I also checked with your data input file, both a & b are 1200*1200. I could not make sure the correctness of output_omega.txt.

Best regards,
Fiona

0 Kudos
Zhen_Z_Intel
Employee
663 Views

Another point is, in you program you write like this:

for (int i = 0; i < massNoOfRow; i++)
{
	for (int j = 0; j < massNoOfCol; j++)
	{
		massData1D[i*massNoOfRow + j] = massData;
	}
}

While the size of 1200*1200, there's no problem. But if the matrix is not square matrix, it is wrong... you should write as:

massData1D[i*massNoOfCol + j] = massData;

I do not understand why you are using multi-node. The function is not going to use multi-node. It's actually could only calculate in one node. If you set node equals to 2, you will probably find that massNoOfRow & col are 0 in node 1. That is why the calculation in first node you get error -13. You need to initial massNoOfRow & col equals to 1200 before calculation. The error of -13 could be removed. But this problem nwould not affect the result. The eigen value & vector should be correct.

Best regards,
Fiona

0 Kudos
Hamza_K_
Beginner
663 Views

Hi. I'll check the results and see why they are not correct, thank you for input on that.

Responding to your second point where you said the function isn't going to use multi node.

Can the Lapacke_sggev function be used with multiple nodes or is it only for a single node. If it is for a single node only which routine should I use instead of it? 

 

0 Kudos
Zhen_Z_Intel
Employee
663 Views

Dear customer,

I am afraid lapack functions are not for cluster. You could use Scalapack, but there's no function of generalized non-symmetric eigenvalue driver routine, only symmetric for Scalack.

Best regards,
Fiona

0 Kudos
Reply