Re: [petsc-users] Can we force SNES solver to do at least Newton step?

2023-09-03 Thread David Knezevic via petsc-users
teration, as suggested by Barry, since it looks like that takes care of my initial request (to always perform at least one iteration) without needing a custom convergence test. Thanks, David On Sat, Sep 2, 2023 at 5:54 PM Matthew Knepley wrote: >> >>> On Sat, Sep 2, 2023 at 5:45 P

Re: [petsc-users] Can we force SNES solver to do at least Newton step?

2023-09-03 Thread David Knezevic via petsc-users
> > > https://petsc.org/release/manualpages/SNES/SNESSetForceIteration/#snessetforceiteration Great, thanks!

Re: [petsc-users] Can we force SNES solver to do at least Newton step?

2023-09-02 Thread David Knezevic via petsc-users
y examples of doing that in the example suite?) Thanks, David On Sat, Sep 2, 2023 at 5:54 PM Matthew Knepley wrote: > On Sat, Sep 2, 2023 at 5:45 PM David Knezevic > wrote: > >> OK, thanks, I'll look into the custom convergence test. >> >> I do not understand th

Re: [petsc-users] Can we force SNES solver to do at least Newton step?

2023-09-02 Thread David Knezevic via petsc-users
ne iteration will help here, so that's what I wanted to try. Thanks again for your help. Best, David On Sat, Sep 2, 2023 at 3:23 PM Matthew Knepley wrote: > On Sat, Sep 2, 2023 at 3:05 PM David Knezevic via petsc-users < > petsc-users@mcs.anl.gov> wrote: > >> Hi all, >

[petsc-users] Can we force SNES solver to do at least Newton step?

2023-09-02 Thread David Knezevic via petsc-users
Hi all, I'm using the SNES solver for a plasticity model, and the issue I've run into is that in some time steps the solver terminates after "NL step 0" since the initial residual (based on the solution from the previous time step) is below the specified tolerance. I gather that "NL step 0" only

Re: [petsc-users] Configure error with PETSc 3.17.4 on Ubuntu 22.04

2022-08-12 Thread David Knezevic via petsc-users
nguage=cxx for complex. PETSc can be built > with c99 compilex - i.e "--with-clanguage=c --with-scalar-type=complex" > should work. > > Satish > > On Fri, 12 Aug 2022, David Knezevic via petsc-users wrote: > > > I get a configure error when building PETSc 3.17.4 on Ub

Re: [petsc-users] Configure error with PETSc 3.17.4 on Ubuntu 22.04

2022-08-12 Thread David Knezevic via petsc-users
en using --with-clanguage=cxx in PETSc with libMesh for years... On Fri, Aug 12, 2022 at 1:24 PM Matthew Knepley wrote: > On Fri, Aug 12, 2022 at 1:14 PM David Knezevic via petsc-users < > petsc-users@mcs.anl.gov> wrote: > >> I get a configure error when building PETSc 3.17.4 on U

Re: [petsc-users] Two questions regarding SNESLinesearchPrecheck

2022-03-08 Thread David Knezevic
n search direction Y, as it's using -lambda below. > > /* precheck */ > ierr = SNESLineSearchPreCheck(linesearch,X,Y,&changed_y);CHKERRQ(ierr); > > /* update */ > ierr = VecWAXPY(W,-lambda,Y,X);CHKERRQ(ierr); > [...] > ierr = VecCopy(W, X

[petsc-users] Two questions regarding SNESLinesearchPrecheck

2022-03-08 Thread David Knezevic
We're using SNESLinesearchPrecheck in order to implement some nonlinear continuation methods, and we had a couple of questions: 1. The "search direction" that is handed to the pre-check function is referred to as "y" in the documentation. We had assumed that we would have "y = delta_x_k", where de

Re: [petsc-users] Does MatCopy require Mats to have the same communicator?

2020-01-27 Thread David Knezevic
https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateRedundantMatrix.html It seems like MatCreateRedundantMatrix is what I want to use, so I'll try that out. Best, David > > > > On Mon, Jan 27, 2020 at 11:59 AM David Knezevic < > david.kneze...@akselos.com> wrote: > &

[petsc-users] Does MatCopy require Mats to have the same communicator?

2020-01-27 Thread David Knezevic
I have a case where I'd like to copy a Mat defined on COMM_WORLD to a new Mat defined on some sub-communicator. Does MatCopy support this, or would I have to write a custom copy operation? I see here that

Re: [petsc-users] Is it possible to update SNES tolerances?

2019-06-10 Thread David Knezevic via petsc-users
On Mon, Jun 10, 2019 at 2:25 PM Jed Brown wrote: > David Knezevic via petsc-users writes: > > > I'm doing load stepping with SNES, where I do a SNES solve for each load > > step. Ideally the convergence tolerances for each load step would be set > > based on the no

[petsc-users] Is it possible to update SNES tolerances?

2019-06-10 Thread David Knezevic via petsc-users
I'm doing load stepping with SNES, where I do a SNES solve for each load step. Ideally the convergence tolerances for each load step would be set based on the norm of the load in the current step. As a result I would like to be able to update the absolute and relative tolerances on a SNES. I tried

Re: [petsc-users] Failure of MUMPS

2018-10-05 Thread David Knezevic
On Fri, Oct 5, 2018 at 9:16 PM Mike Wick wrote: > Hi Hong: > > There is no explicit error message actually. The solver converge in 0 > iteration and returns an nan number. Looks like a zero pivoting problem. > > Mike > I use MatMumpsGetInfo

Re: [petsc-users] Changing the jacobian matrix during SNES iterations

2018-07-18 Thread David Knezevic
On Wed, Jul 18, 2018 at 3:34 PM, Matthew Knepley wrote: > On Wed, Jul 18, 2018 at 3:25 PM David Knezevic > wrote: > >> On Wed, Jul 18, 2018 at 1:59 PM, Matthew Knepley >> wrote: >> >>> On Wed, Jul 18, 2018 at 1:31 PM David Knezevic < >>> david

Re: [petsc-users] Changing the jacobian matrix during SNES iterations

2018-07-18 Thread David Knezevic
On Wed, Jul 18, 2018 at 1:59 PM, Matthew Knepley wrote: > On Wed, Jul 18, 2018 at 1:31 PM David Knezevic > wrote: > >> I'm using SNES for a finite element contact solve, in which the sparsity >> pattern of the jacobian can change from one Newton iteration to the next

[petsc-users] Changing the jacobian matrix during SNES iterations

2018-07-18 Thread David Knezevic
I'm using SNES for a finite element contact solve, in which the sparsity pattern of the jacobian can change from one Newton iteration to the next (since the nodes on the contact surface move). In order to handle this I figured the best way would be to destroy the jacobian matrix and re-allocate it

Re: [petsc-users] Replicating a hang with MUMPS

2018-06-27 Thread David Knezevic
Barry > Thanks Barry and Stefano, the approach you both suggested (calling MatSetSizes and VecSetSizes before reading in) was what I was looking for. Best, David > On Jun 27, 2018, at 1:36 PM, David Knezevic > wrote: > > > > I ran into a case

[petsc-users] Replicating a hang with MUMPS

2018-06-27 Thread David Knezevic
I ran into a case where using MUMPS (called via "-ksp_type preonly -pc_type lu -pc_factor_mat_solver_package mumps") for a particular solve hangs indefinitely with 24 MPI processes (but it works fine with other numbers of processes). The stack trace when killing the job is below, in case that gives

Re: [petsc-users] DIVERGED_DTOL with SNES after switching to 3.8

2017-10-28 Thread David Knezevic
That works, thanks! David On Sat, Oct 28, 2017 at 10:44 AM, Smith, Barry F. wrote: > > Run with something like -snes_divergence_tolerance 1e20 > > Barry > > > > > > > > > On Oct 28, 2017, at 9:31 AM, David Knezevic > wrote: > > > &

[petsc-users] DIVERGED_DTOL with SNES after switching to 3.8

2017-10-28 Thread David Knezevic
Hi all, I updated to the head of the maint branch (b5b0337). Previously (with version 3.7), I had a SNES test case that converged like this: NL step 0, |residual|_2 = 9.074962e-03 NL step 1, |residual|_2 = 5.516783e+03 NL step 2, |residual|_2 = 1.370884e-12 Number of nonlinear iterations

Re: [petsc-users] Understanding inner vs outer fieldsplit convergence

2017-01-26 Thread David Knezevic
imit used is 5 > > > > > On Jan 26, 2017, at 1:26 PM, David Knezevic > wrote: > > > > I'm exploring fieldsplit with Schur (this continues from some emails I > sent a few weeks ago about this topic), and I had a quick question about

[petsc-users] Understanding inner vs outer fieldsplit convergence

2017-01-26 Thread David Knezevic
I'm exploring fieldsplit with Schur (this continues from some emails I sent a few weeks ago about this topic), and I had a quick question about the inner vs outer convergence. I've pasted the output below from "-ksp_monitor -fieldsplit_FE_split_ksp_monitor", and I'm just wondering about why the se

[petsc-users] Using PCFIELDSPLIT with -pc_fieldsplit_type schur

2017-01-11 Thread David Knezevic
I have a definite block 2x2 system and I figured it'd be good to apply the PCFIELDSPLIT functionality with Schur complement, as described in Section 4.5 of the manual. The A00 block of my matrix is very small so I figured I'd specify a direct solver (i.e. MUMPS) for that block. So I did the follo

Re: [petsc-users] Leveraging IIoT & Moving to Zero Unplanned Downtime

2017-01-04 Thread David Knezevic
Apologies, the email below was not meant to be sent to this list. David On Wed, Jan 4, 2017 at 7:39 AM, Thomas Leurent wrote: > Akselos News > View this email in your browser > > > Dear All, > > I invite

Re: [petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-21 Thread David Knezevic
On Tue, Sep 20, 2016 at 2:24 PM, Hong wrote: > David: > I'll patch petsc-maint (v3.7), then merge it to petsc-master. > It might take 1-2 days for regression tests. > > I pulled the patched version and it works well for me now, thanks! David > On Tue, Sep 20, 2016 at 2:01 PM, Hong wrote: >>

Re: [petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-20 Thread David Knezevic
On Tue, Sep 20, 2016 at 2:01 PM, Hong wrote: > David : > This is a bug in PETSc. A change > $ git diff ../../../pc/impls/factor/cholesky/cholesky.c > diff --git a/src/ksp/pc/impls/factor/cholesky/cholesky.c > b/src/ksp/pc/impls/factor/cholesky/cholesky.c > index 953d551..cc28369 100644 > --- a/sr

Re: [petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-20 Thread David Knezevic
On Mon, Sep 19, 2016 at 11:04 PM, Hong wrote: > David : > I did following: > > PC pc; > Mat F; > ierr = KSPGetPC(ksp,&pc);CHKERRQ(ierr); > ierr = PCReset(pc);CHKERRQ(ierr); > ierr = KSPSetOperators(ksp,A,A);CHKERRQ(ierr); > ierr = PCSetType(pc,PCCH

Re: [petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-19 Thread David Knezevic
cond >> KSPSolve(ksp,b,x);. >> >> Murat Keceli >> > Thanks for the suggestions. I just tried these, and they didn't work either unfortunately. David > ​ >> >> On Mon, Sep 19, 2016 at 8:33 PM, David Knezevic < >> david.kneze...@akselos.com> wrote: &g

Re: [petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-19 Thread David Knezevic
On Mon, Sep 19, 2016 at 7:26 PM, Dave May wrote: > > > On 19 September 2016 at 21:05, David Knezevic > wrote: > >> When I use MUMPS via PETSc, one issue is that it can sometimes fail with >> MUMPS error -9, which means that MUMPS didn't allocate a big enough >

[petsc-users] Issue updating MUMPS ictnl after failed solve

2016-09-19 Thread David Knezevic
When I use MUMPS via PETSc, one issue is that it can sometimes fail with MUMPS error -9, which means that MUMPS didn't allocate a big enough workspace. This can typically be fixed by increasing MUMPS icntl 14, e.g. via the command line option -mat_mumps_icntl_14. However, instead of having to run

Re: [petsc-users] MUMPS error reporting in PETSc-3.7

2016-06-06 Thread David Knezevic
t; > Please let us know if this does not work > Thanks! That looks good. I've changed my code to use this, and I'll let you know if I have any issues with it. Thanks, David > On Jun 5, 2016, at 12:45 PM, David Knezevic > wrote: > > > > On Sun, Jun 5, 2016

Re: [petsc-users] MUMPS error reporting in PETSc-3.7

2016-06-05 Thread David Knezevic
On Sun, Jun 5, 2016 at 1:42 PM, Barry Smith wrote: > > > On Jun 5, 2016, at 12:12 PM, David Knezevic > wrote: > > > > In PETSc-3.6, when I hit an error using the MUMPS solver, I would get an > error like this: > > > > [0]PETSC ERR

[petsc-users] MUMPS error reporting in PETSc-3.7

2016-06-05 Thread David Knezevic
In PETSc-3.6, when I hit an error using the MUMPS solver, I would get an error like this: [0]PETSC ERROR: - Error Message -- [0]PETSC ERROR: Error in external library [0]PETSC ERROR: Error reported by MUMPS in numerica

Re: [petsc-users] eigensolution error with slepc

2016-04-04 Thread David Knezevic
On Mon, Apr 4, 2016 at 1:27 PM, Jose E. Roman wrote: > > > El 4 abr 2016, a las 19:13, David Knezevic > escribió: > > > > OK, thanks, I'll have a look at that paper. > > > > And just to confirm that I've understood properly: You're saying th

Re: [petsc-users] eigensolution error with slepc

2016-04-04 Thread David Knezevic
On Mon, Apr 4, 2016 at 12:47 PM, Jose E. Roman wrote: > > > El 4 abr 2016, a las 18:32, David Knezevic > escribió: > > > > Hi Jose, > > > > I'm interested to know more about this comment from your email below: > > "You can also try the symmet

Re: [petsc-users] eigensolution error with slepc

2016-04-04 Thread David Knezevic
Hi Jose, I'm interested to know more about this comment from your email below: "You can also try the symmetric-indefinite solver, but this is not recommended since it is not numerically stable." I frequently use SLEPc's symmetric-indefinite solver for buckling eigenvalue problems (which are natur

Re: [petsc-users] PCFactorSetUpMatSolverPackage with SNES

2016-03-01 Thread David Knezevic
code I suggest below might work > OK, makes sense. Unfortunately the change below didn't help, I still get the same segfault. But it's not a big deal, since I went with Matt's suggestion which seems to be working well. Thanks, David > > On Mar 1, 2016, at 12:52

Re: [petsc-users] PCFactorSetUpMatSolverPackage with SNES

2016-03-01 Thread David Knezevic
On Tue, Mar 1, 2016 at 1:56 PM, Matthew Knepley wrote: > On Tue, Mar 1, 2016 at 12:52 PM, David Knezevic < > david.kneze...@akselos.com> wrote: > >> Based on KSP ex52, I use PCFactorSetUpMatSolverPackage in the process of >> setting various MUMPS ictnl options. This

[petsc-users] PCFactorSetUpMatSolverPackage with SNES

2016-03-01 Thread David Knezevic
Based on KSP ex52, I use PCFactorSetUpMatSolverPackage in the process of setting various MUMPS ictnl options. This works fine for me when I'm solving linear problems. I then wanted to use PCFactorSetUpMatSolverPackage with the PC from a SNES object. I tried to do this with the following code (afte

Re: [petsc-users] MatPtAP

2016-02-23 Thread David Knezevic
On Wed, Feb 24, 2016 at 1:06 AM, Barry Smith wrote: > > Yes, could definitely be faster with a custom code but a bit of a pain > to write. > OK, thanks for your input! David > > > On Feb 23, 2016, at 10:08 PM, David Knezevic > wrote: > > > > On

Re: [petsc-users] MatPtAP

2016-02-23 Thread David Knezevic
exact > structure of P? > I've attached a picture of the sparsity pattern of P. There are 0s and 1s on the diagonal, and some dense columns in the first few columns. David > > > On Feb 23, 2016, at 9:35 PM, David Knezevic > wrote: > > > > I'm using

[petsc-users] MatPtAP

2016-02-23 Thread David Knezevic
I'm using MatPtAP, which works well for me, but in some examples I've tested the PtAP calculation dominates the overall solve time (e.g. see attached -log_summary output). In my case, A is a stiffness matrix, and P is the identity matrix except for a small number of columns (e.g. about 10 or so) w

Re: [petsc-users] Convergence trouble with SNES and CG

2016-02-22 Thread David Knezevic
On Mon, Feb 22, 2016 at 7:10 PM, Matthew Knepley wrote: > On Mon, Feb 22, 2016 at 6:02 PM, David Knezevic < > david.kneze...@akselos.com> wrote: > >> On Mon, Feb 22, 2016 at 6:57 PM, Barry Smith wrote: >> >>> >>> Add -ksp_converged_reason >>

Re: [petsc-users] Convergence trouble with SNES and CG

2016-02-22 Thread David Knezevic
On Mon, Feb 22, 2016 at 6:57 PM, Barry Smith wrote: > > Add -ksp_converged_reason > That gives "DIVERGED_INDEFINITE_PC". The full output is below: 105 KSP Residual norm 7.099534889984e-05 106 KSP Residual norm 6.615351528474e-05 107 KSP Residual norm 6.303646443688e-05 Linear solve

[petsc-users] Convergence trouble with SNES and CG

2016-02-22 Thread David Knezevic
I'm solving a "linear elasticity with contact" problem using SNES. The matrix is symmetric, and it corresponds to the standard linear elasticity matrix, plus some extra nonlinear "penalty spring" terms due to the contact conditions. The solve works fine if I use a direct solver (e.g. MUMPS). I've

Re: [petsc-users] SNES NEWTONLS serial vs. parallel

2016-01-13 Thread David Knezevic
fferent approaches to see what is going on. > >Barry > > > On Jan 13, 2016, at 2:51 PM, David Knezevic > wrote: > > > > Oops! I pasted the wrong text for the serial case. The correct text is > below: > > > > Serial case: > > NL step 0, |re

Re: [petsc-users] SNES NEWTONLS serial vs. parallel

2016-01-13 Thread David Knezevic
iterations: 28 On Wed, Jan 13, 2016 at 3:48 PM, David Knezevic wrote: > I'm using NEWTONLS (with mumps for the linear solves) to do a nonlinear > PDE solve. It converges well when I use 1 core. When I use 2 or more cores, > the line search stagnates. I've p

[petsc-users] SNES NEWTONLS serial vs. parallel

2016-01-13 Thread David Knezevic
I'm using NEWTONLS (with mumps for the linear solves) to do a nonlinear PDE solve. It converges well when I use 1 core. When I use 2 or more cores, the line search stagnates. I've pasted the output of -snes_linesearch_monitor below in these two cases. I was wondering if this implies that I must ha

Re: [petsc-users] GAMG and zero pivots follow up

2015-11-13 Thread David Knezevic
To follow up on this, I have run some tests on a smaller test case (same model, coarser mesh). The options I tried are: 8 MPI processes with: "-ksp_type gmres -pc_type gamg" "-ksp_type fgmres -pc_type gamg" "-ksp_type cg -pc_type gamg" "-ksp_type cg -pc_type gamg -ksp_norm_type natural" "-ksp_type

Re: [petsc-users] GAMG and zero pivots follow up

2015-11-13 Thread David Knezevic
On Fri, Nov 13, 2015 at 9:45 AM, Matthew Knepley wrote: > On Thu, Nov 12, 2015 at 10:02 PM, David Knezevic < > david.kneze...@akselos.com> wrote: > >> On Thu, Nov 12, 2015 at 9:58 AM, David Knezevic < >> david.kneze...@akselos.com> wrote: >> >>> On

Re: [petsc-users] GAMG and zero pivots follow up

2015-11-12 Thread David Knezevic
On Thu, Nov 12, 2015 at 9:58 AM, David Knezevic wrote: > On Thu, Nov 12, 2015 at 9:50 AM, Mark Adams wrote: > >> Note, I suspect the zero pivot is coming from a coarse grid. I don't >> know why no-inode fixed it. N.B., this might not be deterministic. >> >>

Re: [petsc-users] GAMG and zero pivots follow up

2015-11-12 Thread David Knezevic
der of function calls from the PETSc GAMG examples. The libMesh code I was using was doing things somewhat out of order, apparently. David On Wed, Nov 11, 2015 at 1:36 PM, David Knezevic wrote: > On Wed, Nov 11, 2015 at 12:57 PM, David Knezevic < > david.kneze...@akselos.com>

Re: [petsc-users] GAMG and zero pivots follow up

2015-11-11 Thread David Knezevic
On Wed, Nov 11, 2015 at 12:57 PM, David Knezevic wrote: > On Wed, Nov 11, 2015 at 12:24 PM, David Knezevic < > david.kneze...@akselos.com> wrote: > >> On Tue, Nov 10, 2015 at 10:28 PM, David Knezevic < >> david.kneze...@akselos.com> wrote: >> >>> O

Re: [petsc-users] GAMG and zero pivots follow up

2015-11-11 Thread David Knezevic
On Wed, Nov 11, 2015 at 12:24 PM, David Knezevic wrote: > On Tue, Nov 10, 2015 at 10:28 PM, David Knezevic < > david.kneze...@akselos.com> wrote: > >> On Tue, Nov 10, 2015 at 10:24 PM, Matthew Knepley >> wrote: >> >>> On Tue, Nov 10, 2015 at

Re: [petsc-users] GAMG and zero pivots follow up

2015-11-11 Thread David Knezevic
On Tue, Nov 10, 2015 at 10:28 PM, David Knezevic wrote: > On Tue, Nov 10, 2015 at 10:24 PM, Matthew Knepley > wrote: > >> On Tue, Nov 10, 2015 at 9:21 PM, David Knezevic < >> david.kneze...@akselos.com> wrote: >> >>> On Tue, Nov 10, 2015 at 10:00 PM, M

Re: [petsc-users] GAMG and zero pivots follow up

2015-11-10 Thread David Knezevic
On Tue, Nov 10, 2015 at 10:24 PM, Matthew Knepley wrote: > On Tue, Nov 10, 2015 at 9:21 PM, David Knezevic < > david.kneze...@akselos.com> wrote: > >> On Tue, Nov 10, 2015 at 10:00 PM, Matthew Knepley >> wrote: >> >>> On Tue, Nov 10, 2015 at

Re: [petsc-users] GAMG and zero pivots follow up

2015-11-10 Thread David Knezevic
On Tue, Nov 10, 2015 at 10:00 PM, Matthew Knepley wrote: > On Tue, Nov 10, 2015 at 8:39 PM, David Knezevic < > david.kneze...@akselos.com> wrote: > >> I'm looking into using GAMG, so I wanted to start with a simple 3D >> elasticity problem. When I first tried

[petsc-users] GAMG and zero pivots follow up

2015-11-10 Thread David Knezevic
I'm looking into using GAMG, so I wanted to start with a simple 3D elasticity problem. When I first tried this, I got the following "zero pivot" error: --- [0]PETSC ERROR: Zero pivot in LU factorization: http://www.mcs.anl.gov/pe

Re: [petsc-users] Automatically re-solving after MUMPS error

2015-09-15 Thread David Knezevic
On Tue, Sep 15, 2015 at 7:29 PM, Matthew Knepley wrote: > On Tue, Sep 15, 2015 at 4:30 AM, David Knezevic < > david.kneze...@akselos.com> wrote: > >> In some cases, I get MUMPS error -9, i.e.: >> [2]PETSC ERROR: Error reported by MUMPS in numerical factorization p

[petsc-users] Automatically re-solving after MUMPS error

2015-09-15 Thread David Knezevic
In some cases, I get MUMPS error -9, i.e.: [2]PETSC ERROR: Error reported by MUMPS in numerical factorization phase: INFO(1)=-9, INFO(2)=98927 This is easily fixed by re-running the executable with -mat_mumps_icntl_14 on the commandline. However, I would like to update my code in order to do this

Re: [petsc-users] Adding rows and columns to a matrix

2015-09-03 Thread David Knezevic
Best regards, David > > > On Sep 3, 2015, at 6:52 PM, David Knezevic > wrote: > > > > I need to add Lagrange multipliers to an existing system of equations, > which requires me to expand the matrix. > > > > I figured I would allocate a new larger matrix with the

[petsc-users] Adding rows and columns to a matrix

2015-09-03 Thread David Knezevic
I need to add Lagrange multipliers to an existing system of equations, which requires me to expand the matrix. I figured I would allocate a new larger matrix with the appropriate non-zero structure, and then copy the entries from the smaller matrix over to it. But I was wondering if there might be

Re: [petsc-users] Variatonal inequalities

2015-08-23 Thread David Knezevic
On Sat, Aug 22, 2015 at 10:29 PM, Barry Smith wrote: > > David, > >Currently the only way to do this without adding a lot of additional > PETSc code is to add additional variables such that only box constraints > appear in the final problem. For example say you have constraints c <= Ax >

[petsc-users] Variatonal inequalities

2015-08-22 Thread David Knezevic
Hi all, I see from Section 5.7 of the manual that SNES supports box constraints on variables, which is great. However, I was also hoping to also be able to consider general linear inequality constraints, so I was wondering if anyone has any suggestions on how (or if) that could be done with PETSc?

Re: [petsc-users] MUMPS error

2015-05-16 Thread David Knezevic
On Sat, May 16, 2015 at 8:08 AM, venkatesh g wrote: > Hi, > I am trying to solving AX=lambda BX eigenvalue problem. > > A and B are of sizes 3600x3600 > > I run with this command : > > 'mpiexec -np 4 ./ex7 -f1 a2 -f2 b2 -eps_nev 1 -st_type sinvert -eps_max_it > 5000 -st_ksp_type preonly -st_pc_ty

Re: [petsc-users] TAO IPM

2015-04-24 Thread David Knezevic
On Thu, Apr 23, 2015 at 2:57 PM, Jason Sarich wrote: > Hi David, > > The IPM code is a naive implementation and not very battle-tested. There > is nothing specifically broken, but the linear solve operator becomes very > ill-conditioned and for most cases will require a direct solver (e.g. > supe

Re: [petsc-users] TAO IPM

2015-04-23 Thread David Knezevic
On Thu, Apr 23, 2015 at 2:57 PM, Jason Sarich wrote: > Hi David, > > The IPM code is a naive implementation and not very battle-tested. There > is nothing specifically broken, but the linear solve operator becomes very > ill-conditioned and for most cases will require a direct solver (e.g. > supe

[petsc-users] TAO IPM

2015-04-22 Thread David Knezevic
I'm interested in trying out TAO IPM for constrained optimization with inequality, equality and bound constraints. I implemented a test case based on the "toy example" and it works well. But I noticed th

Re: [petsc-users] Exploiting symmetry with direct solvers

2015-04-08 Thread David Knezevic
On Wed, Apr 8, 2015 at 11:06 PM, Hong wrote: > David: > >> Mumps supports Cholesky factorization for symmetric, and symmetric+spd >>> matrices. You may consult mumps user manual. >>> >> >> >> OK, thanks. But I was also wondering about the PETSc interface to MUMPS. >> >> I consulted the MUMP

Re: [petsc-users] Exploiting symmetry with direct solvers

2015-04-08 Thread David Knezevic
On Wed, Apr 8, 2015 at 9:28 PM, Hong wrote: > David , > >> I'm curious about how to do a symmetric LDL^T factorization (instead of >> LU) with MUMPS and SuperLU. Based on this example: >> >> >> http://www.mcs.anl.gov/petsc/petsc-3.4/src/ksp/ksp/examples/tutorials/ex52.c.html >> >> my understandin

[petsc-users] Exploiting symmetry with direct solvers

2015-04-08 Thread David Knezevic
I'm curious about how to do a symmetric LDL^T factorization (instead of LU) with MUMPS and SuperLU. Based on this example: http://www.mcs.anl.gov/petsc/petsc-3.4/src/ksp/ksp/examples/tutorials/ex52.c.html my understanding is as follows: - With MUMPS I gather that we need to specify: MatSetOptio

Re: [petsc-users] Status of mkl_cpardiso configuration option?

2015-04-06 Thread David Knezevic
On Mon, Apr 6, 2015 at 12:19 PM, Satish Balay wrote: > If you use petsc development branch 'master' from git - you should be > able to use mkl cPardiso. > > > https://bitbucket.org/petsc/petsc/commits/d305a81be0fbb2fe8c02e3da7510a1143eafa263 > > Satish > OK, thanks! David

[petsc-users] Status of mkl_cpardiso configuration option?

2015-04-06 Thread David Knezevic
Hi all, I'm interested in trying out mkl_cpardiso with PETSc (since I gather that mkl_pardiso doesn't work with MPI, and mkl_cpardiso is included in MKL). I saw a thread on the petsc-users list about this from 2013 (subject: "mkl-cpardiso configuration"), so I was wondering what the status of this

Re: [petsc-users] Error configuring with --download-ml and Intel MKL

2015-04-02 Thread David Knezevic
On Thu, Apr 2, 2015 at 11:58 AM, Satish Balay wrote: > On Thu, 2 Apr 2015, David Knezevic wrote: > > > On Thu, Apr 2, 2015 at 1:52 AM, Satish Balay wrote: > > > > > And to get g++ to behave similar to gcc on 14.04 - you can add an > > > extra configure opti

Re: [petsc-users] Error configuring with --download-ml and Intel MKL

2015-04-02 Thread David Knezevic
On Thu, Apr 2, 2015 at 1:52 AM, Satish Balay wrote: > And to get g++ to behave similar to gcc on 14.04 - you can add an > extra configure option LIBS="-Wl,--no-as-needed -lc" [so > --with-clanguage=cxx should work with it] > > ./configure --with-scalar-type=complex --with-clanguage=cxx > --downlo

Re: [petsc-users] Error configuring with --download-ml and Intel MKL

2015-04-01 Thread David Knezevic
On Thu, Mar 26, 2015 at 6:23 PM, Matthew Knepley wrote: > On Thu, Mar 26, 2015 at 5:10 PM, David Knezevic < > david.kneze...@akselos.com> wrote: > >> On Thu, Mar 26, 2015 at 4:21 PM, Matthew Knepley >> wrote: >> >>> On Thu, Mar 26, 2015 at

Re: [petsc-users] Error configuring with --download-ml and Intel MKL

2015-03-26 Thread David Knezevic
On Thu, Mar 26, 2015 at 4:21 PM, Matthew Knepley wrote: > On Thu, Mar 26, 2015 at 1:48 PM, David Knezevic < > david.kneze...@akselos.com> wrote: > >> Hi all, >> >> I'm trying to configure PETSc using Intel's MKL and with --download-ml. >> Here

Re: [petsc-users] Near nullspace for preconditioners other than GAMG?

2015-03-10 Thread David Knezevic
coarse grid and get it working. Then add more levels and see if it > breaks. > OK, thanks for the help, much appreciated. I'll look into this. Best regards, David > > On Sun, Mar 8, 2015 at 11:38 AM, David Knezevic < > david.kneze...@akselos.com> wrote: > >&

Re: [petsc-users] Near nullspace for preconditioners other than GAMG?

2015-03-08 Thread David Knezevic
rticulated his >> code for elasticity more than Hypre as I understand it. Hypre can work OK >> for elasticity in my experience. Its worth a try. >> >> Mark >> >> On Thu, Mar 5, 2015 at 5:27 PM, David Knezevic < >> david.kneze...@akselos.com> wrot

Re: [petsc-users] Near nullspace for preconditioners other than GAMG?

2015-03-07 Thread David Knezevic
but he has articulated his > code for elasticity more than Hypre as I understand it. Hypre can work OK > for elasticity in my experience. Its worth a try. > > Mark > > On Thu, Mar 5, 2015 at 5:27 PM, David Knezevic > wrote: > >> OK, got it, thanks! >> >&

Re: [petsc-users] Near nullspace for preconditioners other than GAMG?

2015-03-05 Thread David Knezevic
OK, got it, thanks! David On Thu, Mar 5, 2015 at 5:08 PM, Jed Brown wrote: > David Knezevic writes: > > I was just wondering if its possible to achieve the same sort of thing > with > > other AMG solvers (e.g. BoomerAMG)? I assume that MatSetNearNullSpace > does >

[petsc-users] Near nullspace for preconditioners other than GAMG?

2015-03-05 Thread David Knezevic
Hi all, I found that using MatNullSpaceCreateRigidBody as per example 49 works well with GAMG for a standard elasticity problem, so that's great. I was just wondering if its possible to achieve the same sort o

Re: [petsc-users] MatMPIAIJSetPreallocation: "nnz cannot be greater than row length"

2015-02-25 Thread David Knezevic
the next release > as well as, hopefully, an overhauled VI solver that should be able to > handle these contact problems. > > Dmitry. > > On Mon Feb 23 2015 at 10:17:19 AM David Knezevic < > david.kneze...@akselos.com> wrote: > >> OK, sounds good. Let me know if I can

Re: [petsc-users] MatMPIAIJSetPreallocation: "nnz cannot be greater than row length"

2015-02-23 Thread David Knezevic
t occurs > on the second nonlinear iteration. I'll have to dig a bit deeper to > see what's going on. > > Dmitry. > > > On Mon Feb 23 2015 at 10:03:33 AM David Knezevic < > david.kneze...@akselos.com> wrote: > >> Hi Dmitry, >> >>

Re: [petsc-users] MatMPIAIJSetPreallocation: "nnz cannot be greater than row length"

2015-02-23 Thread David Knezevic
etsc/master so that we can try your PETSc pull request that implements MatReset() to see if that gets this example working? David > On Mon Feb 23 2015 at 9:15:44 AM David Knezevic < > david.kneze...@akselos.com> wrote: > >> Hi Dmitry, >> >> Thanks very much for te

Re: [petsc-users] MatMPIAIJSetPreallocation: "nnz cannot be greater than row length"

2015-02-23 Thread David Knezevic
passes > a small PETSc test, > but libMesh needs some work to be able to build against petsc/master > because of some recent > changes to PETSc. > > Dmitry. > > On Mon Feb 23 2015 at 7:17:06 AM David Knezevic < > david.kneze...@akselos.com> wrote: > >> Hi Barry, h

Re: [petsc-users] MatMPIAIJSetPreallocation: "nnz cannot be greater than row length"

2015-02-23 Thread David Knezevic
- This occurs when I try to set some entries of the matrix. Do you have any suggestions on how I can resolve this? Thanks! David On Sun, Feb 22, 2015 at 10:22 PM, Dmitry Karpeyev wrote: > > > On Sun Feb 22 2015 at 9:15:22 PM Barry Smith wrote: > >> >> > O

Re: [petsc-users] MatMPIAIJSetPreallocation: "nnz cannot be greater than row length"

2015-02-22 Thread David Knezevic
y Smith wrote: > >> >> Do not call for SeqAIJ matrix. Do not call before the first time you >> have preallocated and put entries in the matrix and done the >> MatAssemblyBegin/End() >> >> If it still crashes you'll need to try the debugger >>

Re: [petsc-users] MatMPIAIJSetPreallocation: "nnz cannot be greater than row length"

2015-02-22 Thread David Knezevic
> > > On Feb 22, 2015, at 4:09 PM, David Knezevic > wrote: > > > > Hi Barry, > > > > Thanks for your help, much appreciated. > > > > I added a prototype for MatDisAssemble_MPIAIJ: > > PETSC_INTERN PetscErrorCode MatDisAssemble_MPIAIJ(Mat)

Re: [petsc-users] MatMPIAIJSetPreallocation: "nnz cannot be greater than row length"

2015-02-22 Thread David Knezevic
P.S. Typo correction: I meant to say "I'm using a non-debug build". David On Sun, Feb 22, 2015 at 5:09 PM, David Knezevic wrote: > Hi Barry, > > Thanks for your help, much appreciated. > > I added a prototype for MatDisAssemble_MPIAIJ: > PETSC_INTERN PetscEr

Re: [petsc-users] MatMPIAIJSetPreallocation: "nnz cannot be greater than row length"

2015-02-22 Thread David Knezevic
e your own prototype for it above the > function you use it in. > > Let us know if this resolves the problem. > >Barry > > We never really intended that people would call > MatMPIAIJSetPreallocation() AFTER they had already used the matrix. > > > >

[petsc-users] MatMPIAIJSetPreallocation: "nnz cannot be greater than row length"

2015-02-22 Thread David Knezevic
Hi all, I've implemented a solver for a contact problem using SNES. The sparsity pattern of the jacobian matrix needs to change at each nonlinear iteration (because the elements which are in contact can change), so I tried to deal with this by calling MatSeqAIJSetPreallocation and MatMPIAIJSetPrea

Stalling once linear system becomes a certain size

2008-04-07 Thread David Knezevic
Hello, I am trying to run a PETSc code on a parallel machine (it may be relevant that each node contains four AMD Opteron Quad-Core 64-bit processors (16 cores in all) as an SMP unit with 32GB of memory) and I'm observing some behaviour I don't understand. I'm using PETSC_COMM_SELF in order to

Using SUBSET_NONZERO_PATTERN with MatAXPY

2008-03-21 Thread David Knezevic
Hello, I've got a SeqBAIJ matrix A which I am reassembling at each time-step in order to solve a time-dependent PDE. I initially set up the sparsity pattern of A, and then assemble A at each time step by doing operations like the following: ierr = MatZeroEntries(A);CHKERRQ(ierr); ierr = MatAXP

Implementing an ADI method in parallel

2007-08-24 Thread David Knezevic
> > Or for uniproc solves - you can create as many solver objects > as you need with MPI_COMM_SELF or PETSC_COMM_SELF, on each proc > Yep, I realised that after I sent the original email. It's working great so far! Thanks! Cheers, David >> On 8/24/07

Implementing an ADI method in parallel

2007-08-24 Thread David Knezevic
rrent solves with MPI? I'd prefer to stick to PETSc if possible, since it has so much nice functionality bundled in it, and has a lot of the MPI stuff already taken care of... Thanks very much for the help. Regards, David Knezevic