Step 1: Error 1#

Error Message#

Listing 170 Error message 1 when running Step 1.#
 1$ pylith step01_gravity.cfg
 2
 3Traceback (most recent call last):
 4  File "/software/baagaard/py38-venv/pylith-debug/bin/pylith", line 28, in <module>
 5    start(applicationClass=PyLithApp)
 6  File "/software/baagaard/py38-venv/pylith-debug/lib/python3.8/site-packages/pythia/pyre/applications/__init__.py", line 42, in start
 7    shell.run(**kwds)
 8
 9  # -- many line omitted --
10
11  File "/software/baagaard/py38-venv/pylith-debug/lib/python3.8/site-packages/pythia/pyre/inventory/ConfigContext.py", line 68, in configureComponent
12    component._validate(self)
13  File "/software/baagaard/py38-venv/pylith-debug/lib/python3.8/site-packages/pylith/bc/DirichletTimeDependent.py", line 120, in _validate
14    raise ValueError(f"No constrained degrees of freedom found for time-dependent Dirichlet boundary condition '{self.aliases[-1]}'. "
15ValueError: No constrained degrees of freedom found for time-dependent Dirichlet boundary condition 'bc_xpos'.
16'constrained_dof' must be a zero-based integer array (0=x, 1=y, 2=z).

Troubleshooting Strategy#

The full error message includes a Python Traceback followed by the actual error message (lines 15-16) generated by the ValueError exception. The error message indicates there is a problem with the parameters for pylithapp.problem.bc.bc_xpos. We look for this section in the parameter files and find it in pylithapp.cfg.

Resolution#

There is a typo in the section heading for pylithapp.problem.bc.bc_xpos. Because the section heading has the wrong name, PyLith uses the defaults (no constrained degrees of freedom) and complains that no degrees of freedom are constrained by the Dirichlet boundary condition.

Listing 171 Correct error in pylithapp.cfg.#
# Error
[pylithapp.timedependent.bc.xpos]

# Correct
[pylithapp.timedependent.bc.bc_xpos]