It should be: smoother=pc. getMGSmoother(0) The general rule is to drop the class name and move "Get" or "Set" to the front (in small letters). But sometimes this does not hold. It is better that you check the source code, for instance do "git
ZjQcmQRYFpfptBannerStart
Please respond to the list. The mpd parameter means "maximum projected dimension". You can think of the projected problem as the "sequential" part of the computation, that is not parallelized ("small" dense eigenproblem). When you run with
ZjQcmQRYFpfptBannerStart
This
Computing the full spectrum is always an unpleasant task. But if you cannot avoid it, I would suggest that you compute the eigenvalues in two runs: n/2 largest real eigenvalues and n/2 smallest real. If your matrix-vector product is cheap,
ZjQcmQRYFpfptBannerStart
This
7360,
> 3769.78800, 3771.15894
>
>
> So is it intended to write these 2 warnings?
> Anyway thanks a lot! :)
> Eric
>
> On 2024-03-07 02:24, Jose E. Roman wrote:
>> Pierre's diagnostic is right, but the suggested option is wrong: it should be -eps_target
>
Pierre's diagnostic is right, but the suggested option is wrong: it should be -eps_target Also, I would suggest using a larger value, such as -eps_target 0. 1, otherwise the tolerance 1e-14 might not be attained. Jose > El 7 mar 2024, a las
ZjQcmQRYFpfptBannerStart
> Sendt: 18. januar 2024 21:06
> Til: Jose E. Roman
> Cc: petsc-users@mcs.anl.gov
> Emne: Sv: [petsc-users] ScaLAPACK EPS error
> I set up the matrix using MatCreateDense(), passing PETSC_DECIDE for the
> local dimensions.
>
> The same error appears with 8, 12, and 1
How are you setting up your input matrix? Are you giving the local sizes or
setting them to PETSC_DECIDE?
Do you get the same error for different number of MPI processes?
Can you send a small code reproducing the error?
Jose
> El 18 ene 2024, a las 18:59, Peder Jørgensgaard Olesen via
The errors are strange. The traceback points to harmless operations. Likely
memory corruption, as the message says.
Those tests are included in SLEPc pipelines, they are run with serveral Linux
distributions, with several compilers. Also, on my macOS it runs cleanly,
although my configuration
The exception has been caught and the execution reaches the print() statement.
I think you just need to disable the PETSc error handler, try with this:
PETSc.Sys.pushErrorHandler("ignore")
Jose
> El 27 nov 2023, a las 16:41, Barry Smith escribió:
>
>
> I see
>
> cdef extern from *
Currently MATSCALAPACK does not support MatCreateSubMatrix(). I guess it would
not be difficult to implement.
Jose
> El 27 oct 2023, a las 21:53, Damyn Chipman
> escribió:
>
> Yeah, I’ll make an issue and use a modified version of this test routine.
>
> Does anything change if I will be
; Thanks very much for this. I will give it a try and let you know how it works.
>
> Best regards,
> Kenneth
>
> From: Jose E. Roman
> Date: Thursday, October 12, 2023 at 2:12 PM
> To: Kenneth C Hall
> Cc: petsc-users@mcs.anl.gov
> Subject: Re: [petsc-users] SLEPc/NEP
I am attaching your example modified with the context stuff.
With the PETSc branch that I indicated, now it works with NLEIGS, for instance:
$ ./test_nep -nep_nleigs_ksp_type gmres -nep_nleigs_pc_type none
-rg_interval_endpoints 0.2,1.1 -nep_target 0.8 -nep_nev 5 -n 400 -nep_monitor
-nep_view
gt; FORTRAN_MATOP_CREATE_VECS= 14,
> FORTRAN_MATOP_GET_DIAGONAL_BLOCK = 15,
> FORTRAN_MATOP_COPY = 16,
> FORTRAN_MATOP_SCALE = 17,
> FORTRAN_MATOP_SET_RANDOM = 18,
> FORTRAN_MATOP_ASSEMBLY_BEGIN = 19,
> FORTRAN_MATO
I am getting an error in a different place than you. I started to debug, but
don't have much time at the moment.
Can you try something? Comparing to ex21.c, I see that a difference that may be
relevant is the MATOP_DUPLICATE operation. Can you try defining it for your A
matrix?
Note: If you
should now be able to do
bv = SLEPc.BV().createFromMat(A))
instead of
bv = SLEPc.BV().createFromMat(A.convert('dense'))
without error or cost penalty.
Thanks.
Jose
> El 30 ago 2023, a las 9:17, Jose E. Roman escribió:
>
> The conversion from MATAIJ to MATDENSE should be very c
This works indeed. However, I was under the impression that this conversion
> might be very costly for big matrices with low sparsity and it would scale
> with the number of non-zero values.
>
> Do you have any idea of the efficiency of this operation?
>
> Thanks
>
>> O
The result of bv.orthogonalize() is most probably a dense matrix, and the
result replaces the input matrix, that's why the input matrix is required to be
dense.
You can simply do this:
bv = SLEPc.BV().createFromMat(A.convert('dense'))
Jose
> El 29 ago 2023, a las 18:50, Thanasis
;
>
>
>
>
>
>
> On Mon, Aug 14, 2023 at 1:20 PM maitri ksh wrote:
> got it, thanks Pierre & Jose.
>
> On Mon, Aug 14, 2023 at 12:50 PM Jose E. Roman wrote:
> See for instance ex3.c and ex9.c
> https://slepc.upv.es/documentation/current/src/eps/tutor
See for instance ex3.c and ex9.c
https://slepc.upv.es/documentation/current/src/eps/tutorials/index.html
Jose
> El 14 ago 2023, a las 10:45, Pierre Jolivet escribió:
>
>
>
>> On 14 Aug 2023, at 10:39 AM, maitri ksh wrote:
>>
>>
>> Hi,
>> I need to solve an eigenvalue problem
You are mixing up KSPSetType() and KSPCGSetType(). KSPTCQMR can be passed as an
argument of KSPSetType(), not KSPCGSetType(). The former has an argument of
type KSPType, which is a string, while the latter has an argument of type
KSPCGType, which is an enumerate.
Jose
> El 20 jul 2023, a las
oid computing (or writing a shell
> matrix about it) B^-1... But you seem to stress that there's no way
> around it.
>
> Quentin
>
>
>
> On Mon, 17 Jul 2023 at 11:56, Jose E. Roman wrote:
>>
>> The B-inner product is independent of the ST operator. See T
it up, but I'm
> unsure which one allows for shell matrices.
>
> Thank you for your time,
>
> Quentin
>
>
> On Wed, 12 Jul 2023 at 19:24, Jose E. Roman wrote:
> >
> > By default, it is solving the problem as B^{-1}*A*x=lambda*x (see chapter
> > on Sp
By default, it is solving the problem as B^{-1}*A*x=lambda*x (see chapter on
Spectral Transformation). That is why A can be a shell matrix without problem.
But B needs to be an explicit matrix in order to compute an LU factorization.
If B is also a shell matrix then you should set an iterative
The computed eigenvalue has 7 matching digits, which agrees with the used
tolerance. If you want more matching digits you have to reduce the tolerance.
The performance seems reasonable for up to 64 processes, so yes the problem may
be too small for more processes. But performance depends also a
Fixed in https://gitlab.com/petsc/petsc/-/merge_requests/6423
Jose
> El 6 may 2023, a las 9:16, gaochenyi14 escribió:
>
> Hi,
>
> By `find` and `grep`, I find that in many PETSc examples `MatAssembly*()` are
> called after `MatSetValue()`. But in the C/Fortran API manual, the man page
> of
I have fixed this a few minutes ago. Try again using the reload button of your
browser.
Jose
> El 11 abr 2023, a las 15:49, 张治愚 escribió:
>
> Dear SLEPc support team,
>
>
> I am a new user of SLEPc and I am having trouble accessing the online
> documentation. When I try to access the link
I don't know enough about dlopen to answer you question. Maybe other people can
comment. My suggestion is that you do everything in complex scalars and avoid
complications trying to mix real and complex.
Regarding the second question, if I am not wrong PetscInitialize/PetscFinalize
can be
> El 29 mar 2023, a las 9:58, LUTSKO James escribió:
>
> I withdraw my question. In trying to put together an example to illustrate
> the problem, I found thatEPSSetInitialSubspace() does indeed "work" - in the
> sense that the eigenvalue, which decreases monotonically during the
>
What do you mean that EPSSetInitialSubspace() does not work? Doesn't it improve
convergence with respect to not using it?
Is your smallest eigenvalue positive? And do you have many eigenvalues close to
the smallest one?
Jose
> El 28 mar 2023, a las 17:32, LUTSKO James via petsc-users
>
When using an aijcusparse matrix by default it will select the cusparse solver,
i.e., as if you have added the option -st_pc_factor_mat_solver_type cusparse
The problem is that CUSPARSE does not have functionality for computing the LU
factorization on the GPU, as far as I know. So what PETSc
reply.
>>
>> Eric
>>
>>> On Mar 13, 2023, at 08:10, Jose E. Roman wrote:
>>>
>>> Both ode/vanderpol.py and poisson2d/poisson2d.py use shell matrices via a
>>> mult(self,mat,X,Y) function defined in the python side. Another example is
>&g
Both ode/vanderpol.py and poisson2d/poisson2d.py use shell matrices via a
mult(self,mat,X,Y) function defined in the python side. Another example is
ex3.py in slepc4py.
Jose
> El 13 mar 2023, a las 15:58, Eric Hester via petsc-users
> escribió:
>
> Hello everyone,
>
> Does petsc4py
The matrix can be a shell matrix, only the matrix-vector product operation is
required.
Jose
> El 30 ene 2023, a las 22:23, Guglielmo, Tyler Hardy via petsc-users
> escribió:
>
> I have an implementation of the slepc MFN matrix exponential which is
> implicitly using ExpoKit. You have to
tin Chevalier
> escribió:
>
> Many thanks Jose, it works beautifully !
>
> I'm at a loss as to why, but thanks for the quick fix !
>
> Quentin
>
>
>
> Quentin CHEVALIER – IA parcours recherche
>
> LadHyX - Ecole polytechnique
>
> __
>
You have to call ST.getOperator() as is done in this C example:
https://slepc.upv.es/documentation/current/src/eps/tutorials/ex43.c.html
Jose
> El 22 ene 2023, a las 10:40, Quentin Chevalier
> escribió:
>
> Hello PETSc users,
>
> I'm getting an INFOG(1)=-9 and INFO(2)=27 error on an
This happens because you have typed 'make -j128'. If you just do 'make', PETSc
will choose a reasonable value (-j59 in your case).
Satish: do we want to support this use case? Then a possible fix is:
diff --git a/config/BuildSystem/config/packages/slepc.py
You don't need to destroy the solver object, it should be sufficient to just
call MFNSetOperator() with the new matrix.
Jose
> El 15 dic 2022, a las 21:56, Guglielmo, Tyler Hardy via petsc-users
> escribió:
>
> Not sure if there are many slepc users here, but I have a question regarding
>
gt;
> Doing this trick gives for the above example:
> tilde f(y) := f(L^-T y) = 1/2 y^T L^{-1} (M + S) L^{-T} y = 1/2 y^T y
> and gradient descent in y with step size 1 yields y_1 = y_0 - y_0 = 0.
> Therefore, also x_1 = L^{-T} y_1 = 0 (i.e., convergence in 1 iteration).
>
> Johannes
&
As far as I know, the solveForward/Backward operations are not implemented for
external packages.
What are you trying to do? One may be tempted to use the Cholesky decomposition
to transform a symmetric-definite generalized eigenvalue problem into a
standard eigenvalue problem, as is done e.g.
You have to call PCFactorGetMatrix() first. See any of the examples that use
MatMumpsSetIcntl(), for instance
https://petsc.org/release/src/ksp/ksp/tutorials/ex52.c.html
Jose
> El 30 nov 2022, a las 6:52, 김성익 escribió:
>
> Hello,
>
>
> I tried to adopt METIS option in MUMPS by using
> '
r an 8x8 matrix on 3 cpu
> X * *
> * X *
> * * X
>
> On Mon, Oct 17, 2022 at 9:02 AM Jose E. Roman wrote:
> You have to preallocate, see
> https://petsc.org/release/docs/manual/mat/#sec-matsparse
>
> > El 17 oct 2022, a las 8:37, fujisan escribió:
> >
> &
You have to preallocate, see
https://petsc.org/release/docs/manual/mat/#sec-matsparse
> El 17 oct 2022, a las 8:37, fujisan escribió:
>
> Hi everyone,
>
> I initialize a large sparse matrix (5x2) using MatCreate() and then
> filling it with MatSetValues() line by line
> but it takes
mal. If you want to get the same convergence
history, use a constant initial vector set via EPSSetInitialSpace(), or
alternatively use the undocumented option -bv_reproducible_random
Jose
>
> Thanks,
> Feng
> From: Matthew Knepley
> Sent: 09 October 2022 12:11
> To: feng wan
'main' is the development version, 'release' is the latest release version.
You can select the branch when cloning or later with git checkout.
See https://petsc.org/release/install/download/#recommended-download
Jose
> El 3 oct 2022, a las 11:08, fujisan escribió:
>
> Hi everyone,
> What are
he option --download-suitesparse.
>
> The error is more like this:
> PETSC ERROR: Could not locate a solver type for factorization type QR and
> matrix type mpiaij.
>
> Fuji
>
> On Mon, Sep 26, 2022 at 10:25 AM Jose E. Roman wrote:
> If the error messag
If the error message is "Could not locate a solver type for factorization type
QR" then you should configure PETSc with --download-suitesparse
Jose
> El 26 sept 2022, a las 9:06, fujisan escribió:
>
> Thank you Pierre,
>
> I used PCNONE along with KSPLSQR and it worked.
> But as for PCQR,
rwards?
Eigenvectors are stored in parallel vectors, which are used in subsequent
parallel computation in most applications. If for some reason you need to
gather them in a single MPI process you can use e.g. VecScatterCreateToZero()
>
> Thanks,
> Feng
>
> From: Jose E. Ro
rwards?
Eigenvectors are stored in parallel vectors, which are used in subsequent
parallel computation in most applications. If for some reason you need to
gather them in a single MPI process you can use e.g. VecScatterCreateToZero()
>
> Thanks,
> Feng
>
> From: Jose E. Ro
If you define the MATOP_CREATE_VECS operation in your shell matrix so that it
creates a ghost vector, then all vectors within EPS will be ghost vectors,
including those that are received as arguments of MatMult(). Not sure if this
will work.
A simpler solution is that you store a ghost vector
nd the eigenvector values are all
> between about -0.01 and +0.01. On this system, the petsc/slepc 'make check'
> tests pass.
>
> At first I thought it was a compiler bug in the old GCC 7.5 version, but 10.2
> also seems to have the same problem. I need to do more testing with 11.2.
> El 7 sept 2022, a las 6:18, Patrick Alken
> escribió:
>
> I sometimes get Nan output values in computed eigenvectors for the
> generalized symmetric eigenvalue problem produced by slepc. Is this a known
> issue, and is it related to the conditioning of the matrix pair (A,B)? Is
> there
Set this in your environment:
export MACOSX_DEPLOYMENT_TARGET=11.6
Jose
> El 2 sept 2022, a las 7:50, Yuyun Yang escribió:
>
> Hello team,
>
> I recently reconfigured PETSc on my Mac terminal, and running makefile gives
> me the following warnings. Will these affect running the code, and how
e in the shell matrix. It simply computes the
> non-linear residuals twice with perturbed flow variables. I have attached my
> code. Any suggestions are welcome.
>
> Thanks,
> Feng
> From: Jose E. Roman
> Sent: 25 August 2022 9:45
> To: feng wang
> Cc: petsc-users
&g
||Ax-kx||/||kx||
> --
>0.03+0.02i 7.90447e-09
>0.03-0.02i 7.90447e-09
> --
>
> If I use the shell matrix directly, the relative norm is still large. This
> really
vert(slepc_A_mf,MATDENSE,MAT_INITIAL_MATRIX,)); and
> If I do MatView(Adense,viewer), All I see was NAN. Have I missed anything
> here?
>
> Thanks,
> Feng
>
> From: Jose E. Roman
> Sent: 24 August 2022 16:23
> To: feng wang
> Cc: petsc-users
> Subject: Re: [petsc-users]
of slepc. I can set -eps_tol
> to a low value, but the final relative residual norm is still high , what
> does this tell me?
I don't know. It should not happen.
Jose
>
> Best regards,
> Feng
>
> From: Jose E. Roman
> Sent: 23 August 2022 11:06
> To: feng wa
with finite volume method and
> trying to do a global stability analysis by looking at the Jacobian matrix.
>
> Thanks,
> Feng
>
> From: Jose E. Roman
> Sent: 23 August 2022 10:32
> To: feng wang
> Cc: petsc-users
> Subject: Re: [petsc-users] Slepc Question, shell-m
00161+0.22i 0.0773339
> -0.000161-0.22i 0.0774536
> --
>
> The values in the brackets are the absolute error (I believe) and they seem
> very low. The relative error seems quite large. Could you please comment on
> this?
>
>
> B
Which version of SLEPc are you using?
You should get an error unless you have configure PETSc with a parallel direct
linear solver. Which option did you use to configure PETSc?
Send the output when using the option -eps_view_pre
Jose
> El 23 ago 2022, a las 2:11, Patrick Alken
> escribió:
of code to compute the right hand side. so it produces a NAN when it
> tries to compute the matrix-vector product.
>
> Many thanks for your help!
>
> Best regards,
> Feng
> From: Jose E. Roman
> Sent: 22 August 2022 19:32
> To: feng wang
> Cc: petsc-users@mcs.anl.
This is very strange. This error appears when the solver employs the B-inner
product, but in your case you don't have a B matrix, so you should never see
that error. Try running under valgrind to see if it gives more hints.
Jose
> El 22 ago 2022, a las 20:45, feng wang escribió:
>
> Hello,
You are setting the matrix values in the lower triangular part only. You are
assuming that SLEPc uses the same storage as LAPACK, but this is not true.
EPSSolve() does not work correctly because you are specifying a symmetric
problem EPS_GHEP but your matrices are not symmetric. You should set
I guess you could try LSQR on the matrix M=[ sqrt(D); sqrt(R)*J ], given that
M'*M=D+J'*R*J. This will attempt to solve a least squares system with
coefficient matrix M, without forming the ill-conditioned M'*M. But the
question is how to update your right-hand-side vector so that it solves the
round a target
> About this, I want to compute only three smallest real eigenvalues, should
> this be the situation suitable for GD and JD?
No, try Krylov-Schur or LOBPCG.
>
> Runfeng
>
> Jose E. Roman 于2022年7月13日周三 12:36写道:
> Does it work with -eps_gd_blocksize 1 ?
>
Does it work with -eps_gd_blocksize 1 ?
Why do you want to use GD? JD and GD are best when you need to compute
eigenvalues around a target. For your case, I would try with the default solver
(Krylov-Schur) or with LOBPCG.
Jose
> El 13 jul 2022, a las 4:59, Runfeng Jin escribió:
>
> Hi!
> I
The interface functions are
https://petsc.org/release/docs/manualpages/PC/PCFactorSetShiftType.html
https://petsc.org/release/docs/manualpages/PC/PCFactorSetShiftAmount.html
To check for success you can use
https://petsc.org/release/docs/manualpages/KSP/KSPGetConvergedReason.html
You can also
This file is generated by configure and placed in $PETSC_DIR/$PETSC_ARCH/include
Jose
> El 8 jul 2022, a las 15:21, Altaf Ahmed escribió:
>
> Hi,
> "petscmacros.h" header file uses "petscconf_poison.h" file but I am
> unable to locate this file. Any help would be appreciated.
> Thank you.
ario Rossi ha
> scritto:
> Thanks a lot, Jose!
> I looked at the eps folder (where I found the test8.c that has been my
> starting point) but I did not look at the nep folder (my fault!)
> Thanks again,
> Mario
>
> Il giorno ven 17 giu 2022 alle ore 17:34 Jose E. Roma
You can use VecGetOwnershipRange() to determine the range of global indices
corresponding to the local portion of a vector, and VecGetArray() to access the
values. In SLEPc, you can assume that X and Y will have the same parallel
distribution.
For an example of a shell matrix that implements
n can cost more epssolve time? Is this due to the structure
> of matrix? IF so, is there any ways to increase the solve speed?
>
> Or this is weired and should be fixed by some ways?
> Thank you!
>
> Runfeng Jin
>
>
>
t much time. Is
> there anything else I can do? Attachment is log when use PETSC_DEFAULT for
> eps_ncv.
>
> Thank you !
>
> Runfeng Jin
>
> Jose E. Roman 于2022年6月10日周五 20:50写道:
> The value -eps_ncv 5000 is huge.
> Better let SLEPc use the default value.
>
> Jo
time. But I can not see why
> it cost so much time. Can you see something from it?
>
> Thank you !
>
> Runfeng Jin
>
> On 6月 4 2022, at 1:37 凌晨, Jose E. Roman wrote:
> Convergence depends on distribution of eigenvalues you want to compute. On
> the other hand, the cost
0.8702293.19166e-13
--
> El 31 may 2022, a las 22:28, Jose E. Roman escribió:
>
> Probably MUMPS is taking most of the time...
>
> If the matrices are not too large, send them to my personal email and I will
> have
Convergence depends on distribution of eigenvalues you want to compute. On the
other hand, the cost also depends on the time it takes to build the
preconditioner. Use -log_view to see the cost of the different steps of the
computation.
Jose
> El 3 jun 2022, a las 18:50, jsfaraway escribió:
erval region to exclude the unneeded
> eigenvalues will still be faster than forming a larger constrained system.
> Specifying an interval appears to run in a similar amount of time.
>
> Lucas
> From: Jose E. Roman
> Sent: Tuesday, May 31, 2022 2:08 PM
> To: Lucas Banting
&
input?
>
> Lucas
> From: Jose E. Roman
> Sent: Tuesday, May 31, 2022 1:11 PM
> To: Lucas Banting
> Cc: petsc-users@mcs.anl.gov
> Subject: Re: [petsc-users] Accelerating eigenvalue computation / removing
> portion of spectrum
>
> Caution: This message was sent from o
If you know how to cheaply compute a basis of the nullspace of S, then you can
try passing it to the solver via EPSSetDeflationSpace()
https://slepc.upv.es/documentation/current/docs/manualpages/EPS/EPSSetDeflationSpace.html
Jose
> El 31 may 2022, a las 19:28, Lucas Banting escribió:
>
>
The matrix inv(A)*B can be represented with a shell matrix that calls MatMult()
followed by KSPSolve(), if you only need to apply this operator to a vector. It
depends on what you are trying to do.
Jose
> El 21 may 2022, a las 18:41, Mateo José Moinelo
> escribió:
>
> Hi. I am working on a
g eigenvalue iterations of Ax = k Bx is
> trying to calculate the inverse of B or y = Bx. So the question is don't you
> know maybe there exist methods or ways for generalized eigenproblems without
> inverting of B? Again thanks a lot for the answer
>
> вс, 15 мая 2022 г. в 1
You cannot compute the LU factorization of a shell matrix. You will have to use
a preconditioned iterative linear solver, see section 3.4.1 of the SLEPc users
guide.
Jose
> El 15 may 2022, a las 14:39, Миша Сальников escribió:
>
> Hi, I am developing a program for solving generalized
t;> LHS.setSizes([[n_local,n],[n_local,n]])
>>> LHS.setType(pet.Mat.Type.PYTHON)
>>> LHS.setPythonContext(LHS_class())
>>> LHS.setUp()
>>>
>>> x, y = LHS.createVecs()
>>> x.set(1)
>>> LHS.mult(x,y)
>>> print(y.norm())
>>>
>
al transform
> ST = EPS.getST(); ST.setType('sinvert')
> # Krylov subspace
> KSP = ST.getKSP(); KSP.setType('preonly')
> # Preconditioner
> PC = KSP.getPC(); PC.setType('lu')
> PC.setFactorSolverType('mumps')
> EPS.setDimensions(1,5)
> EPS.setFromOptions()
> EPS.solve()
> print(EPS.g
Type.GHEP) # Specify that A is hermitian
> (by construction), but M is semi-positive
> EPS.setWhichEigenpairs(EPS.Which.LARGEST_MAGNITUDE) # Find largest eigenvalues
> EPS.setFromOptions()
> EPS.solve()
>
>
> Quentin CHEVALIER – IA parcours recherche
> LadHyX - Ecole polytechnique
> __
Your operator is not well formed. If you do this:
x, y = LHS.createVecs()
x.set(1)
LHS.mult(x,y)
y.view()
you will see that the output is all zeros. That is why SLEPc complains that
"Initial vector is zero or belongs to the deflation space".
Jose
> El 5 may 2022, a las 10:46, Quentin
ably slow down convergence.
Jose
>
> Many thanks for your help.
>
> Thanks,
> Varun
>
> On Fri, Mar 4, 2022 at 11:36 AM Jose E. Roman <mailto:jro...@dsic.upv.es>> wrote:
> Yes, assuming that the eigensolver is calling KSPSolve(), you can set a
Yes, assuming that the eigensolver is calling KSPSolve(), you can set a monitor
with KSPMonitorSet(). This will be called more often than the callback for
EPSSetStoppingTestFunction().
Jose
> El 4 mar 2022, a las 20:16, Matthew Knepley escribió:
>
>
> On Fri, Mar 4, 2022 at 2:07 PM Varun
s more convenient.
Jose
>
> Pierre,
> I can reuse A for many iterations, but I cannot do a matmatsolve as I need
> the resulting solution to produce the next right hand side vector.
>
> Thanks again,
> Lucas
> From: Jose E. Roman
> Sent: Tuesday, March 1, 2022 4:49 AM
>
To use SLEPc's TSQR one would do something like this:
ierr = BVCreateFromMat(A,);CHKERRQ(ierr);
ierr = BVSetFromOptions(X);CHKERRQ(ierr);
ierr =
BVSetOrthogonalization(X,BV_ORTHOG_CGS,BV_ORTHOG_REFINE_IFNEEDED,PETSC_DEFAULT,BV_ORTHOG_BLOCK_TSQR);CHKERRQ(ierr);
ierr =
A correction: it is B=A+sigma*I when you *add* 1e-6 to the diagonal entries.
but if you "multiply each diagonal of the system matrix with (1.0 + 1.0e-6)"
you are doing a different thing.
> El 27 feb 2022, a las 9:21, Jose E. Roman escribió:
>
> In both cases, it is l
In both cases, it is like you are solving a nonsingular system with a matrix B.
With MatNullSpace, B=A-e*e' where e=ones(n,1) normalized, and with your
approach it is B=A+sigma*I with sigma=1e-6. The first approach shifts the zero
eigenvalue, while in the second approach all eigenvalues are
PCSetType(pc, PCLU);
> PCFactorSetMatSolverType(pc, MATSOLVERMUMPS);
> PCFactorSetUpMatSolverType(pc);
> PCFactorGetMatrix(pc, );
> MatMumpsSetIcntl(F, 7, 5); // configure mumps.
> ---
> Does this introduce unnecessary big computation overhead?
> Can the code further
Since version 3.5, KSPSetOperators() will check if the passed matrix has the
same sparse pattern as the previously set one, so you don't have to do anything.
The list of changes in version 3.5 has this note:
"KSPSetOperators() no longer has the MatStructure argument. The Mat objects now
track
In a basic Arnoldi implementation, it would be possible to do what you suggest:
run Arnoldi once and compute the three approximations from it. But SLEPc's
implementation is a restarted method, where the computed Krylov basis is
discarded when the maximum dimension is reached. Not sure how this
Probably someone else can give a better answer, but if I remember correctly
ParMetis relies on certain random number generator that makes it produce
different partitions for different runs. I think this was fixed in the ParMetis
that --download-parmetis installs, but if I am not wrong you are
Hong may give a better answer, but if you look at PCSetUp_LU()
https://petsc.org/main/src/ksp/pc/impls/factor/lu/lu.c.html#PCSetUp_LU you will
see that MatLUFactorSymbolic() is called unconditionally during the first
PCSetUp(). Currently there is no way to check if the user has already called
case a ?
>
> Best,
> Kuang
>
>
> From: Zhang, Hong
> Sent: Thursday, December 2, 2021 2:18 PM
> To: Wang, Kuang-chung ; Jose E. Roman
>
> Cc: petsc-users@mcs.anl.gov; Obradovic, Borna ;
> Cea, Stephen M
> Subject: Re: [petsc-users] Orthogonality o
In Hermitian eigenproblems orthogonality of eigenvectors is
guaranteed/enforced. But you are solving the problem as non-Hermitian.
If your matrix is Hermitian, make sure you solve it as a HEP, and make sure
that your matrix is numerically Hermitian.
If your matrix is non-Hermitian, then you
t;> matching restore, and the new object created will be leaked.
>> What do you think?
>>
>>
>>> On Nov 19, 2021, at 12:41 PM, Jose E. Roman wrote:
>>>
>>> It is trying to call PCFactorGetMatrix() on your PC, but this operation is
>>
It is trying to call PCFactorGetMatrix() on your PC, but this operation is not
supported by PCSHELL and it is not possible to set it via
PetscObjectComposeFunction(). PCSHELL uses the PCShellSet* interface, that is
restricted to a limited number of operations.
Jose
> El 19 nov 2021, a las
>
> mpirun -np 2 ./ex45 -start_in_debugger -debug_terminal "screen -X -S debug
> screen"
>
> but the problem still persists. Now, I get a different message
>
> No screen session found.
>
>
> On 15/11/2021, 09:04, "Jose E. Roman" wrote:
&
1 - 100 of 603 matches
Mail list logo