[petsc-users] [SLEPc] Krylov Schur- saving krylov subspace

Jose E. Roman jroman at dsic.upv.es
Fri Aug 21 10:51:14 CDT 2020


I see. Doing the exponential with SLEPc itself might be faster, as in https://slepc.upv.es/documentation/current/src/eps/tutorials/ex36.c.html
but I cannot say if it will work for your problem. This approach was used in https://doi.org/10.1017/S0022377818001022

EPSGetBV() gives you a BV object that contains the Krylov subspace. But to use EPSSetInitialSpace() with Krylov-Schur you should compute a single vector, and the information for the unconverged Ritz vector cannot be easily recovered. It is easier if you use EPSSUBSPACE, where in that case you can pass the whole subspace to EPSSetInitialSpace(). The problem is that convergence of subspace iteration will likely be much slower than Krylov-Schur.

Jose

> El 21 ago 2020, a las 14:34, ROLANDI Laura victoria <Laura-victoria.ROLANDI at isae-supaero.fr> escribió:
> 
> Thank you for your quick response.
> 
> Yes, i'm running in parallel, I'm just asking for 2 eigenvalues and I'm not doing any factorization.
> 
> My problem is taking so long because I have implemented the time stepping-exponential transformation: my MatMult() function for computing vectors of the Krylov subspace calls the Direct Numerical Simulation code for compressible Navier-Stokes equations to which I'm linking the stability code.
> Therefore, each MatMult() call takes very long, and I cannot save the converged eigenvectors for the restart beacause there won't be any converged eigenvectors yet when the job is killed.
> That's why I thought that the only thing I could save was the computed krylov subspace.
> 
> Victoria
> 
> 
> 
> Il giorno Venerdi, Agosto 21, 2020 12:42 CEST, "Jose E. Roman" <jroman at dsic.upv.es> ha scritto:
>  
>> Why is your problem taking so long? Are you running in parallel? Is your computation doing a factorization of a matrix? Are you getting slow convergence? How many eigenvalues are you computing? Note that Krylov-Schur is not intended for computing a large percentage of eigenvalues, if you do so then you might get large overheads unless you tune the EPSSetDimensions() parameters (mpd).
>> 
>> EPSSetInitialSpace() is intended to provide an initial guess, which in Krylov-Schur is a single vector, so in this case you would not pass the Krylov subspace from a previous run.
>> 
>> A possible scheme for restarting is to save the eigenvectors computed so far, then pass them in the next run via EPSSetDeflationSpace() to avoid recomputing them. You can use a custom stopping criterion as in https://slepc.upv.es/documentation/current/src/eps/tutorials/ex29.c.html to stop before the job is killed, then save the converged eigenvectors (or EPSGetInvariantSubspace() if the problem is nonsymmetric).
>> 
>> Jose
>> 
>> 
>> > El 21 ago 2020, a las 11:56, ROLANDI Laura victoria <Laura-victoria.ROLANDI at isae-supaero.fr> escribió:
>> >
>> > Dear SLEPc developers,
>> >
>> > I'm using the Krylov Schur EPS and I have a question regarding a command.
>> >
>> > Is there a way for having access and saving the krylov subspace during the EPSSolve call?
>> >
>> > I inizialize the solver using the function EPSSetInitialSpace(eps,1, v0), where v0 is a specific vector, but after 24 hours of calculation my job has to end even if the EPSSolve hasn't finished yet.
>> > Which function should I use for saving the computed Krylov subspace and its dimention n during the process, in order to restart the calculation from it by using EPSsetInitialSpace(eps,n, Krylov-Subspace)?
>> >
>> > Thank you very much,
>> > Victoria
>>  
> 
> 
> 
> --
> ---
> Laura victoria ROLANDI
> Doctorant - Doctorat ISAE-SUPAERO Doctorat 1
> laura-victoria.rolandi at isae-supaero.fr
> https://www.isae-supaero.fr
> Institut Supérieur de l'Aéronautique et de l'Espace
> 10, avenue Edouard Belin - BP 54032
> 31055 Toulouse Cedex 4
> France
>  
>  	
> Suivez l'ISAE-SUPAERO sur les réseaux sociaux / Follow the ISAE-SUPAERO on the social media
> Facebook Twitter LinkedIn Youtube Instagram



More information about the petsc-users mailing list