# Run a simple 3D strike slip model using Pylith 5, met conversion problem

**URL:** <https://community.geodynamics.org/t/run-a-simple-3d-strike-slip-model-using-pylith-5-met-conversion-problem/4567>\
**Category:** PyLith\
**Created:** [June 22, 2026, 8:10pm UTC](https://community.geodynamics.org/t/run-a-simple-3d-strike-slip-model-using-pylith-5-met-conversion-problem/4567 "2026-06-22T20:10:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qingjun](https://avatars.discourse-cdn.com/v4/letter/q/f04885/32.png) [@Qingjun](https://community.geodynamics.org/u/Qingjun)\
**Post date:** [June 22, 2026, 8:10pm UTC](https://community.geodynamics.org/t/run-a-simple-3d-strike-slip-model-using-pylith-5-met-conversion-problem/4567/1 "2026-06-22T20:10:46Z")

</div>

Hi there,

I construct a strike slip 3D viscoelastic model (with elastic crust and viscoelastic model, relaxation time about 11 yr), with 30km thick crust and applied a uniform slip on the fault interface (only in the crust). I originally run it on Pylith 4 for 2000yr of simulation time and it runs well and I got ground surface displacement as expected. Later, I figured that Pylith 5 may perform better in parallelization computation and I tried to use Pylith 5 (binary code) to rerun this model to check if Pylith 5 works as expected. But I found the simulation stop at the 64 steps and shows errors like:  
**65 TS dt 0.15 time 9.25**

```
**0 SNES Function norm 5.302845345018e-04**

  **Linear solve converged due to CONVERGED_ATOL iterations 25**

**1 SNES Function norm 2.851916728773e-09**

  **Linear solve did not converge due to DIVERGED_DTOL iterations 0**

```

**[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------**

**[0]PETSC ERROR: KSPSolve() has not converged, reason DIVERGED\_DTOL**

**[0]PETSC ERROR: See [FAQ — PETSc 3.25.2 documentation](https://petsc.org/release/faq/) for trouble shooting.**

**[0]PETSC ERROR: PETSc Development Git Revision: v3.25.2-216-g1c60be80d13 Git Date: 2026-06-05 21:49:36 +0000**

**[0]PETSC ERROR: /Users/qingjun/Software/pylith-5.0.1-macOS-12.0-arm64/bin/mpinemesis with 1 MPI process(es) and PETSC\_ARCH on QingjundeMac-mini.local by qingjun Sat Jun 20 13:09:26 2026**

**[0]PETSC ERROR: Configure options: --prefix=/Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/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 --with-hdf5-include=/Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/dist/include --with-hdf5-lib=“-L/Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/dist/lib -lhdf5\_hl -lhdf5” --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=12.0 CXXFLAGS=“-mmacos-version-min=12.0 -DMPICH\_IGNORE\_CXX\_SEEK” FCFLAGS= CPPFLAGS=“-I/Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/dist/include " LDFLAGS=”-L/Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/dist/lib -mmacos-version-min=12.0" PETSC\_DIR=/Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/build/cig/petsc-pylith PETSC\_ARCH=arch-pylith**

**[0]PETSC ERROR: #1 KSPSolve\_Private() at /Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/build/cig/petsc-pylith/src/ksp/ksp/interface/itfunc.c:1001**

**[0]PETSC ERROR: #2 KSPSolve() at /Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/build/cig/petsc-pylith/src/ksp/ksp/interface/itfunc.c:1094**

**[0]PETSC ERROR: #3 SNESSolve\_NEWTONLS() at /Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/build/cig/petsc-pylith/src/snes/impls/ls/ls.c:220**

**[0]PETSC ERROR: #4 SNESSolve() at /Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/build/cig/petsc-pylith/src/snes/interface/snes.c:4892**

**[0]PETSC ERROR: #5 TSTheta\_SNESSolve() at /Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/build/cig/petsc-pylith/src/ts/impls/implicit/theta/theta.c:172**

**[0]PETSC ERROR: #6 TSStep\_Theta() at /Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/build/cig/petsc-pylith/src/ts/impls/implicit/theta/theta.c:223**

**[0]PETSC ERROR: #7 TSStep() at /Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/build/cig/petsc-pylith/src/ts/interface/ts.c:3599**

**[0]PETSC ERROR: #8 TSSolve() at /Users/baagaard/scratch/build/clang-17.0/cig/pylith-binary-arm64/build/cig/petsc-pylith/src/ts/interface/ts.c:4262**

**[0]PETSC ERROR: #9 void pylith::problems::TimeDependent::solve()() at ../../../pylith-5.0.1/libsrc/pylith/problems/TimeDependent.cc:476**

**Fatal error. Calling MPI\_Abort() to abort PyLith application.**

**Traceback (most recent call last):**

**File “/Users/qingjun/Software/pylith-5.0.1-macOS-12.0-arm64/lib/python3.12/site-packages/pylith/apps/PetscApplication.py”, line 55, in onComputeNodes**

```
**self.main(\*args, \*\*kwds)**

```

**File “/Users/qingjun/Software/pylith-5.0.1-macOS-12.0-arm64/lib/python3.12/site-packages/pylith/apps/PyLithApp.py”, line 95, in main**

```
**self.problem.run(self)**

```

**File “/Users/qingjun/Software/pylith-5.0.1-macOS-12.0-arm64/lib/python3.12/site-packages/pylith/problems/TimeDependent.py”, line 138, in run**

```
**ModuleTimeDependent.solve(self)**

```

**File “/Users/qingjun/Software/pylith-5.0.1-macOS-12.0-arm64/lib/python3.12/site-packages/pylith/problems/problems.py”, line 217, in solve**

```
**return \_problems.TimeDependent_solve(self)**

       **^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^**

```

**RuntimeError: Error detected while in PETSc function.**

**C++ traceback (5 frames):**

**[0] 3 libpylith.0.dylib 0x00000001067432dc \_ZN6pylith13ExternalErrorCI1NS\_5ErrorEERKNS\_12ErrorMessageE + 36**

**[1] 4 libpylith.0.dylib 0x00000001068a89bc \_ZN6pylith8problems13TimeDependent5solveEv + 528**

**[2] 5 \_problems.so 0x00000001063b86ac \_ZL25\_wrap\_TimeDependent\_solveP7\_objectS0\_ + 224**

**[3] 39 mpinemesis 0x000000010441cb84 main + 616**

**[4] 40 dyld 0x0000000193348274 start + 2840**

**Abort(-1) on node 0 (rank 0 in comm 0): application called MPI\_Abort(MPI\_COMM\_WORLD, -1) - process 0**

**/Users/qingjun/Software/pylith-5.0.1-macOS-12.0-arm64/bin/nemesis: mpiexec: exit 255**

**/Users/qingjun/Software/pylith-5.0.1-macOS-12.0-arm64/bin/pylith: /Users/qingjun/Software/pylith-5.0.1-macOS-12.0-arm64/bin/nemesis: exit 1**

The configure files used in Pylith 5 are slightly changed based on the Pylith 4 version, and the tolerance threshold both set as:  
**snes\_atol = 1.0e-9**

**snes\_rtol = 1.0e-12**

**ksp\_atol = 1.0e-12**

**ksp\_rtol = 1.0e-12**

And in Pylith 5 (similar in Pylith 4) I set  
**[pylithapp.timedependent]**

**initial\_dt = 3.0\*year**

**start\_time = -10.0\*year**

**end\_time = 2000.0\*year**

**scales.time\_scale = 20.0\*year**

**[pylithapp.problem.scales]**

**length\_scale = 10.0\*km**  
Could anybody help me about how to make Pylith 5 simulation converge smoothly?  
Thanks in advance!  
Qingjun Meng

---

<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:** [June 22, 2026, 9:06pm UTC](https://community.geodynamics.org/t/run-a-simple-3d-strike-slip-model-using-pylith-5-met-conversion-problem/4567/2 "2026-06-22T21:06:48Z")

</div>

Are you using a uniform time step or an adaptive time step? Please rerun the v5 simulation, adding the command-line argument `--petsc.ksp_monitor_true_residual`, capture all output to a log file, and post the log file.

---

<div class="post-metadata">

**Author:** ![Qingjun](https://avatars.discourse-cdn.com/v4/letter/q/f04885/32.png) [@Qingjun](https://community.geodynamics.org/u/Qingjun)\
**Post date:** [June 24, 2026, 5:04am UTC](https://community.geodynamics.org/t/run-a-simple-3d-strike-slip-model-using-pylith-5-met-conversion-problem/4567/3 "2026-06-24T05:04:19Z")

</div>

I used a uniform dt=3yr，please find the attached output.txt file. Later, I found when I give a proper length\_scale=10km in .cfg file, the simulation converges easily and does not claps again. If not setting the length\_scale, I suppose it will use a default value (1\*km?) and simulation stops at the 65th step, with the output as attached. It seems the code could be so sensitive to the scale value and I should make it as realistic as possible.

[output.txt](https://community.geodynamics.org/uploads/short-url/vNCIUjMD7BAuY3nEEh9Gy6DOgp4.txt) (362.0 KB)

Thanks,  
Qingjun

---

<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:** [June 24, 2026, 1:33pm UTC](https://community.geodynamics.org/t/run-a-simple-3d-strike-slip-model-using-pylith-5-met-conversion-problem/4567/4 "2026-06-24T13:33:56Z")

</div>

The default preconditioner for simulations with a fault (variable point-block Jacobi) introduces a relationship between the length scale and the discretization size. As a result, the solver is sensitive to the length scale used in the nondimensionalization. As noted in the PyLith manual on the [section of nondimensionalization for elasticity](https://pylith.readthedocs.io/en/latest/user/governingeqns/elasticity/nondimensionalization.html#quasistatic-elasticity), the length scale should be set to the nominal discretization size. In the examples, we use the discretization size on the fault.
