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

Need Extended Eigensolver RCI example

Nikita_S_1
Beginner
2,081 Views

Hi,

I want to use Extended Eigensolver RCI routines, but documentation is not enought detailed.

In particular, I don't understand what I need to do, when ijob = 10. Where do I need to put the (ZeB-A) result?

And what I need to put in Aq and As arrays ("Specifically, they contain the matrices for the reduced eigenvalue problem." - what does it mean?).

I want to change only method for solving linear system, but don't want to change something else (matrix format, factorization the Green's function and etc.). And all others I want to use predefined.

May be smb can give me example for RCI Interface, where used standart procedures from MKL?

Thanks in advance.

0 Kudos
16 Replies
Noah_C_Intel
Employee
2,081 Views

Hi, thanks for your interest in the new Extended Eigensolver Package! Let me do some research and I will get back to you in a day with some comprehensive information to help you out.

0 Kudos
Sergey_K_Intel1
Employee
2,081 Views

Dear Nikita,

Let us assume we want to solve a real generalized eigenvalue problem.

In the case of ijob=10 we need to compute  a double complex precision matrix  Ze*B-A and the representation  of the output matrix Ze*B-A  depends on the solver you are going to use.  For example, if we going to use the MKL PARDISO, we have to compute Ze*B-A in the compressed sparse row format. If you are using a sparse direct solver,  we need to factorize  Ze*B-A with the help of this direct solver.  In the case of a preconditioned iterative solver, you might compute a preconditioner for the linear system (Ze*A-B) X= Y.    Of course, you can compute a preconditioner or performs the matrix factorization later when FEAST ask you to solve the system.

Here is a pseudocode for a real symmetric problem:

ijob=-1 ! initialization

do while (ijob/=0) 

    call dfeast_srci(ijob, N, Ze, work, workc, Aq, Sq, fpm,  epsout,loop, Emin, Emax, M0,  E, X, mode,res,info)    

    select case(ijob)

    case(10) !! Form (ZeB-A)  and Factorize the complex matrix (ZeB-A)

                   !!  Let (ssa,sisa,sjsa) be the CSR representation  of the input matrix A, 

                   !!   (ssb,sisb,sjsb) be the CSR representation  of the input matrix B

                   !!   and let (saz,isaz,jsaz) be the  CSR representation of (Ze*A-B) 

                   call <compute the resolvent matrix > (N, ssa,sisa,sjsa,Ze,ssb,sisb,sjsb,saz,isaz,jsaz) !! get saz

                  !!  factorize the matrix Ze*B-A or

                  !!   compute a preconditioner for (Ze*A-B) if a preconditioned iterative solver is used

                  PHASE=22

                  call  pardiso(….,saz,isaz,jsaz,….)         

    case(11) !! Solve the complex linear system (ZeB-A)workc(1:N,1:M0) = workc(1:N,1:M0) result in workc

                  PHASE=33

                  call  pardiso(…, saz,isaz,jsaz, … ,workc(:,1:M0), …)         

     case(30) !! Perform multiplication A*X(1:N,i:j) result in work(1:N,i:j)

                     !! where i=fpm(24) and j=fpm(24)+fpm(25)−1

                    call  <sparse matrix-matrix multiply>   (…, ssa, sjsa, sisa, …  , X(1,fpm(24)), ..,  work(1,fpm(24)))

     case(40) !! Perform multiplication B*X(1:N,i:j) result in work(1:N,i:j)

                     !! where i=fpm(24) and j=fpm(24)+fpm(25)−1

                    call  <sparse matrix-matrix multiply>   (…, ssb, sjsb, sisb, …  , X(1,fpm(24)), ..,  work(1,fpm(24))) 

      end select

end do

Hope it helps

All the best

Sergey

0 Kudos
Nikita_S_1
Beginner
2,081 Views

When I call dfeast_srci first time, it work normally. Then nothing to change and nothing to do on (ijob=10). And then I call dfeast_srci second time and my programm crash with message:

Extended Eigensolvers: PROBLEM with input parameters
==>INFO code =: 1816549376

What does it mean? Why does the first call not generate an error?

0 Kudos
Nikita_S_1
Beginner
2,081 Views

After first calling of dfeast_srci the value of variable mode changing to negative, why can it be? And it's the reason why on the second call of dfeast_srcithe program is crashing with error

Extended Eigensolvers: PROBLEM with input parameters

==>INFO code =: 1816549376

But I think real reason somewhere else. Why can it be? Nothing happened after first call of this function...

0 Kudos
Sergey_K_Intel1
Employee
2,081 Views

Hi Nikita,

I'd assume that  it is not enough memory for one or more input arrays.  I'd recommend to check the type and size of each input array. If it doesn't help,  please provide a reproducer.

All the best

Sergey

 

0 Kudos
Nikita_S_1
Beginner
2,081 Views

I try to calculate for problem with very small matrix, only 8 rows. And it's correctly work with predefined eigen solver. That cann't be memory problems with this size, I think...

I check all massives, but I didn't find an error. Here is my function code in attachment.

And it returns this in console:

---> phase -1 <---
Extended Eigensolvers: double precision driver
Extended Eigensolvers: List of input parameters fpm(1:64)-- if different from default
Extended Eigensolvers: fpm(1)=1
Search interval [1.000000000000000e+004;2.000000000000000e+006]
Extended Eigensolvers: Size subspace 8
#Loop | #Eig | Trace | Error-Trace | Max-Residual

---> phase 10 <---
Extended Eigensolvers: PROBLEM with input parameters
==>INFO code =: 1816549376

0 Kudos
Nikita_S_1
Beginner
2,081 Views

I checked all arrays and found nothing wrong with it's values or size.

There is my function code in attachment. It returns the next:

---> phase -1 <---
Extended Eigensolvers: double precision driver
Extended Eigensolvers: List of input parameters fpm(1:64)-- if different from default
Extended Eigensolvers: fpm(1)=1
Search interval [1.000000000000000e+004;2.000000000000000e+006]
Extended Eigensolvers: Size subspace 8
#Loop | #Eig | Trace | Error-Trace | Max-Residual

---> phase 10 <---
Extended Eigensolvers: PROBLEM with input parameters
==>INFO code =: 1816549376

0 Kudos
Nikita_S_1
Beginner
2,081 Views

And another question is the next:

On phase (ijob=11) I need to solve complex linear system and want to use iterative solver for it (that the reason why I don't use predefined eigen solver, I have very big matrices), but I can't find iterative complex RSI solver in MKL.

Maybe I can bad looking? Maybe there is exist iterative predefined eigen solver or iterative complex RSI linear solver?

0 Kudos
Sergey_K_Intel1
Employee
2,081 Views

Dear Nikita,

I investigated the issue and the problem appears because of a bug in  RCI  Extended Eigensolver  interfaces from the MKL LP64 binaries. Everything should work well if you link with MKL ILP64 binaries like this

icc -I$MKL_ROOT/__release_lnx/mkl/include -DMKL_INT="long long" code.cpp $MKL_ROOT/__release_lnx/mkl/lib/intel64/libmkl_intel_ilp64.a -Wl,--start-group $MKL_ROOT/__release_lnx/mkl/lib/intel64/lib/libmkl_intel_thread.a $MKL_ROOT/__release_lnx/mkl/lib/intel64/libmkl_core.a -Wl,--end-group   $MKL_ROOT/__release_lnx/compiler/lib/intel64/libiomp5.so -lpthread

Besides  ILP64 RCI interfaces work a bit faster since the computational kernels are ILP64 and  additional wrappers are not needed.

Unfortunately the Intel MKL doesn’t contain any iterative solver for complex linear systems. Feel free to submit a feature request. But you can try the MKL Out-of-Core PARDISO  with MKL Extended Eigensolver in the case of large sparse matrices.

Thanks for catching this issue.

All the best

Sergey

 

0 Kudos
Nikita_S_1
Beginner
2,081 Views

Sergey Kuznetsov (Intel) wrote:
I investigated the issue and the problem appears because of a bug in  RCI  Extended Eigensolver  interfaces from the MKL LP64 binaries. Everything should work well if you link with MKL ILP64 binaries like this
Does you plan to fix this bug in MKL LP64 ? I don't want to use ILP because it causes many problems in my code in other places... =(

Sergey Kuznetsov (Intel) wrote:
Unfortunately the Intel MKL doesn’t contain any iterative solver for complex linear systems. Feel free to submit a feature request
Where I need to submit future request? I think this problem was actual 2 years ago: http://software.intel.com/en-us/forums/topic/284068 - but nothing changed to this moment?

0 Kudos
Gennady_F_Intel
Moderator
2,081 Views

the issue is escalated - here is the issue number for you reference : DPD200329829

0 Kudos
Nikita_S_1
Beginner
2,081 Views

where can I monitor the issue evolution ?

0 Kudos
Gennady_F_Intel
Moderator
2,081 Views

1. we will let you know here into this thread when the fix of the issue would be available.

2 - you can also find this info into Release Note.

0 Kudos
kumar__aman
Beginner
2,081 Views

Dear Gennady

Did intel fixed this request of iterative sparse solver for complex matrix in any release note.

0 Kudos
Gennady_F_Intel
Moderator
2,081 Views

yes, you may try to check the latest 2019 u5 version of MKL and sorry if we missed to update this forum thread.

0 Kudos
kumar__aman
Beginner
2,081 Views

Can intel provide me an example code for solving complex linear sparse solver using conjugate gradient.

0 Kudos
Reply