# Running subduction-2D model with backslilp, receive error when I change solution to \[pylith.problems.SolnDispVelLagrange\]

**URL:** <https://community.geodynamics.org/t/running-subduction-2d-model-with-backslilp-receive-error-when-i-change-solution-to-pylith-problems-solndispvellagrange/3618>\
**Category:** PyLith\
**Created:** [August 28, 2024, 5:19pm UTC](https://community.geodynamics.org/t/running-subduction-2d-model-with-backslilp-receive-error-when-i-change-solution-to-pylith-problems-solndispvellagrange/3618 "2024-08-28T17:19:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iclemus](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/iclemus/32/1752_2.png) [@iclemus](https://community.geodynamics.org/u/iclemus)\
**Post date:** [August 28, 2024, 5:19pm UTC](https://community.geodynamics.org/t/running-subduction-2d-model-with-backslilp-receive-error-when-i-change-solution-to-pylith-problems-solndispvellagrange/3618/1 "2024-08-28T17:19:07Z")

</div>

Hi PyLith community,

I’ve built my simple backslip model based on the subduction-2d example (I am using PyLith version 4.1.1). I have attached a drawing labeling curves, and points in my geometry. Essentially, I am prescribing shallow backflip between 0-50km depth at a constant creeping rate and everywhere else in the slab (top and bottom interface) is locked. The model runs when I have the solution = pylith.problems.SolnDispLagrange and receive a “0]PETSC ERROR: Zero pivot in LU factorization” error when I change the solution to pylith.problems.SolnDispVelLagrange. I saw a similar previous discussion post but I haven’t changed any default setting so I’m not sure what could be the issue. Below is a picture of what I’m trying to model and the long error message I receive:

[Boundary\_value\_problem .pdf](https://community.geodynamics.org/uploads/short-url/isYnFpW4sPZw2f30VlZVJRzENqN.pdf) (1.8 MB)

> > /Users/IsisLemus/Programs/pylith/pylith-4.1.1-macOS-10.15-x86\_64/lib/python3.10/site-packages/pylith/problems/TimeDependent.py:132:run  
> > – timedependent(info)  
> > – Solving problem.  
> > 0 TS dt 0.000109514 time -0.000109514  
> > 0 SNES Function norm 0.000000000000e+00  
> > Nonlinear solve converged due to CONVERGED\_FNORM\_ABS iterations 0  
> > 1 TS dt 0.000109514 time 0.  
> > 0 SNES Function norm 1.246626218106e-04  
> > [0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------  
> > [0]PETSC ERROR: Zero pivot in LU factorization:  
> > [0]PETSC ERROR: Zero pivot, row 2  
> > [0]PETSC ERROR: WARNING! There are unused option(s) set! Could be the program crashed before usage or a spelling mistake, etc!  
> > [0]PETSC ERROR: Option left: name:-ksp\_converged\_reason (no value) source: code  
> > [0]PETSC ERROR: Petsc Development GIT revision: v3.21.2-232-g848bb224a82 GIT Date: 2024-06-07 01:30:37 +0000  
> > [0]PETSC ERROR: /Users/IsisLemus/Programs/pylith/pylith-4.1.1-macOS-10.15-x86\_64/bin/mpinemesis on a named wifi-10-41-213-156.wifi.berkeley.edu by IsisLemus Fri Aug 9 16:19:56 2024  
> > [0]PETSC ERROR: Configure options --prefix=/Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/dist --with-c2html=0 --with-x=0 --with-clanguage=C --with-mpicompilers=1 --with-shared-libraries=1 --with-64-bit-points=1 --with-large-file-io=1 --download-parmetis=1 --download-metis=1 --download-f2cblaslapack=1 --download-ml --with-fc=0 --with-hwloc=0 --with-ssl=0 --with-x=0 --with-c2html=0 --with-lgrind=0 --with-hdf5=1 --with-zlib=1 --LIBS=-lz --with-debugging=0 --with-fc=0 CFLAGS=-mmacos-version-min=10.15 CXXFLAGS=“-mmacos-version-min=10.15 -DMPICH\_IGNORE\_CXX\_SEEK” FCFLAGS= CPPFLAGS=“-I/Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/dist/include -I/Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/dist/include” LDFLAGS=“-L/Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/dist/lib -mmacos-version-min=10.15 -L/Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/dist/lib” PETSC\_DIR=/Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith PETSC\_ARCH=arch-pylith  
> > [0]PETSC ERROR: #1 PetscLINPACKgefa() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/mat/impls/baij/seq/dgefa.c:55  
> > [0]PETSC ERROR: #2 MatInvertVariableBlockDiagonal\_SeqAIJ() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/mat/impls/aij/seq/aij.c:1869  
> > [0]PETSC ERROR: #3 MatInvertVariableBlockDiagonal() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/mat/interface/matrix.c:10839  
> > [0]PETSC ERROR: #4 PCSetUp\_VPBJacobi\_Host() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/pc/impls/vpbjacobi/vpbjacobi.c:232  
> > [0]PETSC ERROR: #5 PCSetUp\_VPBJacobi() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/pc/impls/vpbjacobi/vpbjacobi.c:263  
> > [0]PETSC ERROR: #6 PCSetUp() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/pc/interface/precon.c:1079  
> > [0]PETSC ERROR: #7 KSPSetUp() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/ksp/interface/itfunc.c:415  
> > [0]PETSC ERROR: #8 KSPSolve\_Private() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/ksp/interface/itfunc.c:831  
> > [0]PETSC ERROR: #9 KSPSolve() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/ksp/interface/itfunc.c:1078  
> > [0]PETSC ERROR: #10 KSPSetUp\_Chebyshev() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/ksp/impls/cheby/cheby.c:823  
> > [0]PETSC ERROR: #11 KSPSetUp() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/ksp/interface/itfunc.c:377  
> > [0]PETSC ERROR: #12 PCSetUp\_MG() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/pc/impls/mg/mg.c:1151  
> > [0]PETSC ERROR: #13 PCSetUp\_GAMG() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/pc/impls/gamg/gamg.c:908  
> > [0]PETSC ERROR: #14 PCSetUp() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/pc/interface/precon.c:1079  
> > [0]PETSC ERROR: #15 KSPSetUp() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/ksp/interface/itfunc.c:415  
> > [0]PETSC ERROR: #16 KSPSolve\_Private() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/ksp/interface/itfunc.c:831  
> > [0]PETSC ERROR: #17 KSPSolve() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ksp/ksp/interface/itfunc.c:1078  
> > [0]PETSC ERROR: #18 SNESSolve\_NEWTONLS() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/snes/impls/ls/ls.c:220  
> > [0]PETSC ERROR: #19 SNESSolve() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/snes/interface/snes.c:4755  
> > [0]PETSC ERROR: #20 TSTheta\_SNESSolve() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ts/impls/implicit/theta/theta.c:174  
> > [0]PETSC ERROR: #21 TSStep\_Theta() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ts/impls/implicit/theta/theta.c:225  
> > [0]PETSC ERROR: #22 TSStep() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ts/interface/ts.c:3391  
> > [0]PETSC ERROR: #23 TSSolve() at /Users/baagaard/scratch/build/clang-15.0/cig/pylith-binary-x86\_64/build/cig/petsc-pylith/src/ts/interface/ts.c:4037  
> > [0]PETSC ERROR: #24 void pylith::problems::TimeDependent::solve()() at …/…/…/pylith-4.1.1/libsrc/pylith/problems/TimeDependent.cc:487  
> > Fatal error. Calling MPI\_Abort() to abort PyLith application.  
> > Traceback (most recent call last):  
> > File “/Users/IsisLemus/Programs/pylith/pylith-4.1.1-macOS-10.15-x86\_64/lib/python3.10/site-packages/pylith/apps/PetscApplication.py”, line 55, in onComputeNodes  
> > self.main(\*args, \*\*kwds)  
> > File “/Users/IsisLemus/Programs/pylith/pylith-4.1.1-macOS-10.15-x86\_64/lib/python3.10/site-packages/pylith/apps/PyLithApp.py”, line 114, in main  
> > self.problem.run(self)  
> > File “/Users/IsisLemus/Programs/pylith/pylith-4.1.1-macOS-10.15-x86\_64/lib/python3.10/site-packages/pylith/problems/TimeDependent.py”, line 134, in run  
> > ModuleTimeDependent.solve(self)  
> > File “/Users/IsisLemus/Programs/pylith/pylith-4.1.1-macOS-10.15-x86\_64/lib/python3.10/site-packages/pylith/problems/problems.py”, line 217, in solve  
> > return \_problems.TimeDependent\_solve(self)  
> > RuntimeError: Error detected while in PETSc function.  
> > Abort(-1) on node 0 (rank 0 in comm 0): application called MPI\_Abort(MPI\_COMM\_WORLD, -1) - process 0  
> > /Users/IsisLemus/Programs/pylith/pylith-4.1.1-macOS-10.15-x86\_64/bin/nemesis: mpiexec: exit 255  
> > /Users/IsisLemus/Programs/pylith/pylith-4.1.1-macOS-10.15-x86\_64/bin/pylith: /Users/IsisLemus/Programs/pylith/pylith-4.1.1-macOS-10.15-x86\_64/bin/nemesis: exit 1

---

<div class="post-metadata">

**Author:** ![baagaard](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/baagaard/32/615_2.png) [@baagaard](https://community.geodynamics.org/u/baagaard)\
**Post date:** [August 28, 2024, 6:24pm UTC](https://community.geodynamics.org/t/running-subduction-2d-model-with-backslilp-receive-error-when-i-change-solution-to-pylith-problems-solndispvellagrange/3618/2 "2024-08-28T18:24:05Z")

</div>

Including velocity as a solution field is not currently supported for quasi-static boundary value problems. The quasi-static governing equations do not include the term in the velocity field, so you will get zeros in those rows and a zero pivot in the LU factorization.

The current workaround is to use the SolnDispLagrange solution and compute velocity in post-processing if you want velocity.

---

<div class="post-metadata">

**Author:** ![iclemus](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/iclemus/32/1752_2.png) [@iclemus](https://community.geodynamics.org/u/iclemus)\
**Post date:** [August 30, 2024, 5:39pm UTC](https://community.geodynamics.org/t/running-subduction-2d-model-with-backslilp-receive-error-when-i-change-solution-to-pylith-problems-solndispvellagrange/3618/3 "2024-08-30T17:39:40Z")

</div>

Thank you Brad for clarifying and for the quick response!
