Step 1: Error 5#
Error Message#
1$ pylith step01a_gravity.cfg
2
3 >> /software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/apps/PyLithApp.py:77:main
4 -- pylithapp(info)
5 -- Running on 1 process(es).
6 >> /software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/meshio/MeshIOObj.py:38:read
7 -- meshiopetsc(info)
8 -- Reading finite-element mesh
9 >> /src/cig/pylith/libsrc/pylith/meshio/MeshIO.cc:85:void pylith::meshio::MeshIO::read(pylith::topology::Mesh *, const bool)
10 -- meshiopetsc(info)
11 -- Component 'reader': Domain bounding box:
12 (-100000, 100000)
13 (-100000, 0)
14 >> /software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/problems/Problem.py:116:preinitialize
15 -- timedependent(info)
16 -- Performing minimal initialization before verifying configuration.
17 >> /software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/problems/Solution.py:39:preinitialize
18 -- solution(info)
19 -- Performing minimal initialization of solution.
20 >> /software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/materials/RheologyElasticity.py:35:preinitialize
21 -- isotropiclinearelasticity(info)
22 -- Performing minimal initialization of elasticity rheology 'bulk_rheology'.
23 >> /software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/materials/RheologyElasticity.py:35:preinitialize
24 -- isotropiclinearelasticity(info)
25 -- Performing minimal initialization of elasticity rheology 'bulk_rheology'.
26 >> /software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/materials/RheologyElasticity.py:35:preinitialize
27 -- isotropiclinearelasticity(info)
28 -- Performing minimal initialization of elasticity rheology 'bulk_rheology'.
29 >> /software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/bc/DirichletTimeDependent.py:86:preinitialize
30 -- dirichlettimedependent(info)
31 -- Performing minimal initialization of time-dependent Dirichlet boundary condition 'bc_xneg'.
32 >> /software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/bc/DirichletTimeDependent.py:86:preinitialize
33 -- dirichlettimedependent(info)
34 -- Performing minimal initialization of time-dependent Dirichlet boundary condition 'bc_xpos'.
35 >> /software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/bc/DirichletTimeDependent.py:86:preinitialize
36 -- dirichlettimedependent(info)
37 -- Performing minimal initialization of time-dependent Dirichlet boundary condition 'bc_yneg'.
38 >> /software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/problems/Problem.py:174:verifyConfiguration
39 -- timedependent(info)
40 -- Verifying compatibility of problem configuration.
41 >> /software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/problems/Problem.py:219:_printInfo
42 -- timedependent(info)
43 -- Scales for nondimensionalization:
44 Length scale: 1000*m
45 Time scale: 3.15576e+09*s
46 Pressure scale: 3e+10*m**-1*kg*s**-2
47 Density scale: 2.98765e+23*m**-3*kg
48 Temperature scale: 1*K
49 >> /software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/problems/Problem.py:185:initialize
50 -- timedependent(info)
51 -- Initializing timedependent problem with quasistatic formulation.
52 >> /src/cig/pylith/libsrc/pylith/utils/PetscOptions.cc:239:static void pylith::utils::_PetscOptions::write(pythia::journal::info_t &, const char *, const PetscOptions &)
53 -- petscoptions(info)
54 -- Setting PETSc options:
55ksp_atol = 1.0e-12
56ksp_converged_reason = true
57ksp_error_if_not_converged = true
58ksp_guess_pod_size = 8
59ksp_guess_type = pod
60ksp_rtol = 1.0e-12
61pc_type = lu
62snes_atol = 1.0e-9
63snes_converged_reason = true
64snes_error_if_not_converged = true
65snes_monitor = true
66snes_rtol = 1.0e-12
67ts_error_if_step_fails = true
68ts_monitor = true
69ts_type = beuler
70
71[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
72[0]PETSC ERROR: Error in external library
73[0]PETSC ERROR: Error converting spatial database values for gravitational_acceleration at ( -92285.3 -72772.7) in spatial database 'Gravity field'. Found near zero magnitude (0) for gravity field vector ( 0 0).
74[0]PETSC ERROR: WARNING! There are unused option(s) set! Could be the program crashed before usage or a spelling mistake, etc!
75[0]PETSC ERROR: Option left: name:-ksp_atol value: 1.0e-12 source: code
76[0]PETSC ERROR: Option left: name:-ksp_converged_reason (no value) source: code
77[0]PETSC ERROR: Option left: name:-ksp_error_if_not_converged (no value) source: code
78[0]PETSC ERROR: Option left: name:-ksp_guess_pod_size value: 8 source: code
79[0]PETSC ERROR: Option left: name:-ksp_guess_type value: pod source: code
80[0]PETSC ERROR: Option left: name:-ksp_rtol value: 1.0e-12 source: code
81[0]PETSC ERROR: Option left: name:-pc_type value: lu source: code
82[0]PETSC ERROR: Option left: name:-snes_atol value: 1.0e-9 source: code
83[0]PETSC ERROR: Option left: name:-snes_converged_reason (no value) source: code
84[0]PETSC ERROR: Option left: name:-snes_error_if_not_converged (no value) source: code
85[0]PETSC ERROR: Option left: name:-snes_monitor (no value) source: code
86[0]PETSC ERROR: Option left: name:-snes_rtol value: 1.0e-12 source: code
87[0]PETSC ERROR: Option left: name:-ts_error_if_step_fails (no value) source: code
88[0]PETSC ERROR: Option left: name:-ts_monitor (no value) source: code
89[0]PETSC ERROR: Option left: name:-ts_type value: beuler source: code
90[0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
91[0]PETSC ERROR: Petsc Development GIT revision: v3.21.2-167-g4fed2113cae GIT Date: 2024-05-31 10:11:14 -0400
92[0]PETSC ERROR: /software/unix/py3.12-venv/pylith-debug/bin/mpinemesis on a arch-clang-15.0_debug named IGSKCI164LM006 by baagaard Wed Jun 5 13:18:39 2024
93[0]PETSC ERROR: Configure options --PETSC_ARCH=arch-clang-15.0_debug --with-debugging=1 --with-clanguage=c --with-mpi-compilers=1 --with-shared-libraries=1 --with-64-bit-points=1 --with-large-file-io=1 --with-lgrind=0 --download-chaco=1 --download-parmetis=1 --download-metis=1 --download-triangle --download-ml=1 --download-superlu=1 --with-fc=0 --download-f2cblaslapack --with-hdf5=1 --with-hdf5-include=/software/unix/hdf5-1.14/clang-15.0/include --with-hdf5-lib=/software/unix/hdf5-1.14/clang-15.0/lib/libhdf5.dylib --with-zlib=1
94[0]PETSC ERROR: #1 static PetscErrorCode pylith::topology::FieldQuery::queryDBPointFn(PylithInt, PylithReal, const PylithReal *, PylithInt, PylithScalar *, void *)() at /src/cig/pylith/libsrc/pylith/topology/FieldQuery.cc:330
95[0]PETSC ERROR: #2 DMProjectPoint_Func_Private() at /software/unix/petsc-dev/src/dm/impls/plex/plexproject.c:128
96[0]PETSC ERROR: #3 DMProjectPoint_Private() at /software/unix/petsc-dev/src/dm/impls/plex/plexproject.c:483
97[0]PETSC ERROR: #4 DMProjectLocal_Generic_Plex() at /software/unix/petsc-dev/src/dm/impls/plex/plexproject.c:1003
98[0]PETSC ERROR: #5 DMProjectFunctionLocal_Plex() at /software/unix/petsc-dev/src/dm/impls/plex/plexproject.c:1034
99[0]PETSC ERROR: #6 DMProjectFunctionLocal() at /software/unix/petsc-dev/src/dm/interface/dm.c:8183
100[0]PETSC ERROR: #7 void pylith::topology::FieldQuery::queryDB()() at /src/cig/pylith/libsrc/pylith/topology/FieldQuery.cc:223
101Fatal error. Calling MPI_Abort() to abort PyLith application.
102Traceback (most recent call last):
103 File "/software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/apps/PetscApplication.py", line 55, in onComputeNodes
104 self.main(*args, **kwds)
105 File "/software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/apps/PyLithApp.py", line 103, in main
106 self.problem.initialize()
107 File "/software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/problems/Problem.py", line 187, in initialize
108 ModuleProblem.initialize(self)
109 File "/software/unix/py3.12-venv/pylith-debug/lib/python3.12/site-packages/pylith/problems/problems.py", line 165, in initialize
110 return _problems.Problem_initialize(self)
111 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112RuntimeError: Error detected while in PETSc function.
113Abort(-1) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0
114/software/unix/py3.12-venv/pylith-debug/bin/nemesis: mpiexec: exit 255
115/software/unix/py3.12-venv/pylith-debug/bin/pylith: /software/unix/py3.12-venv/pylith-debug/bin/nemesis: exit 1
Troubleshooting Strategy#
During initialization of the time-dependent problem, PyLith encountered an error while calling PETSc functions. When an error occurs within a PETSc routine, PETSc dumps a lot of information to the screen. First, it display the error message; second, it displays configuration information; third, it displays the stacktrace. PyLith traps the PETSc error and displays the Python Traceback. In this case, the error message on lines 8-9 indicate that the gravity field vector has a magnitude of zero. We notice that it shows only the first two components because this is a 2D problem, whereas the default is (0, 0, -1) and intended for 3D problems.
Resolution#
[pylithapp.problem]
gravity_field = spatialdata.spatialdb.GravityField
gravity_field.gravity_dir = [0.0, -1.0, 0.0]
Our simulation now runs without errors and the output looks correct.