Error with PETSC, stopping at reading finite element mesh - PyLith 3.0.3

Hi all, I am a new user and started by adapting the 2D subduction zone example with Slab 2.0 data and imposing an intraslab fault within my slab. As I’m running my simulation .cfg file to prescribe normal faulting (left-lateral slip on my intraslab fault) pylith is breaking when reading the finite element mesh (triangular mesh). I am prescribing Dirichlet boundary conditions on 3 of my 4 boundaries (x positive, x negative, and negative). I received this long error and am unsure how to fix this, any feedback and help is greatly appreciated. Thank you for your time.

“[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: No support for this operation for this object type
[0]PETSC ERROR: Could not determine Plex facet for Gmsh element 438 (Plex cell 109512)
[0]PETSC ERROR: See FAQ — PETSc 3.20.2 documentation for trouble shooting.
[0]PETSC ERROR: Petsc Development GIT revision: v3.18.0-56-g437e83fba6f GIT Date: 2022-10-12 17:01:26 -0400
[0]PETSC ERROR: /Users/IsisLemus/pylith/pylith-3.0.3-macOS-10.15-x86_64/bin/mpinemesis on a named Isis-MacBook-Pro.local by IsisLemus Wed Dec 6 10:58:35 2023
[0]PETSC ERROR: Configure options --prefix=/Users/baagaard/scratch/build/clang-13.0/cig/pylith-binary/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-chaco=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=”-g -O2" CXXFLAGS=“-g -O2 -DMPICH_IGNORE_CXX_SEEK” FCFLAGS= CPPFLAGS=“-I/Users/baagaard/scratch/build/clang-13.0/cig/pylith-binary/dist/include -I/Users/baagaard/scratch/build/clang-13.0/cig/pylith-binary/dist/include” LDFLAGS=“-L/Users/baagaard/scratch/build/clang-13.0/cig/pylith-binary/dist/lib -L/Users/baagaard/scratch/build/clang-13.0/cig/pylith-binary/dist/lib” PETSC_DIR=/Users/baagaard/scratch/build/clang-13.0/cig/pylith-binary/build/cig/petsc-pylith PETSC_ARCH=arch-pylith
[0]PETSC ERROR: #1 DMPlexCreateGmsh() at /Users/baagaard/scratch/build/clang-13.0/cig/pylith-binary/build/cig/petsc-pylith/src/dm/impls/plex/plexgmsh.c:1703
[0]PETSC ERROR: #2 DMPlexCreateGmshFromFile() at /Users/baagaard/scratch/build/clang-13.0/cig/pylith-binary/build/cig/petsc-pylith/src/dm/impls/plex/plexgmsh.c:1433
[0]PETSC ERROR: #3 DMPlexCreateFromFile() at /Users/baagaard/scratch/build/clang-13.0/cig/pylith-binary/build/cig/petsc-pylith/src/dm/impls/plex/plexcreate.c:5163Fatal error. Calling MPI_Abort() to abort PyLith application.
Traceback (most recent call last):
File “/Users/IsisLemus/pylith/pylith-3.0.3-macOS-10.15-x86_64/lib/python3.10/site-packages/pylith/apps/PetscApplication.py”, line 61, in onComputeNodes
self.main(*args, **kwds)
File “/Users/IsisLemus/pylith/pylith-3.0.3-macOS-10.15-x86_64/lib/python3.10/site-packages/pylith/apps/PyLithApp.py”, line 97, in main
mesh = self.mesher.create(self.problem, interfaces)
File “/Users/IsisLemus/pylith/pylith-3.0.3-macOS-10.15-x86_64/lib/python3.10/site-packages/pylith/topology/MeshImporter.py”, line 78, in create
mesh = self.reader.read(self.debug)
File “/Users/IsisLemus/pylith/pylith-3.0.3-macOS-10.15-x86_64/lib/python3.10/site-packages/pylith/meshio/MeshIOObj.py”, line 58, in read
ModuleMeshIO.read(self, mesh)
File “/Users/IsisLemus/pylith/pylith-3.0.3-macOS-10.15-x86_64/lib/python3.10/site-packages/pylith/meshio/meshio.py”, line 153, in read
return _meshio.MeshIO_read(self, mesh)
RuntimeError
[0]PETSC ERROR: #4 DMPlexCreateFromOptions_Internal() at /Users/baagaard/scratch/build/clang-13.0/cig/pylith-binary/build/cig/petsc-pylith/src/dm/impls/plex/plexcreate.c:3592
[0]PETSC ERROR: #5 DMSetFromOptions_Plex() at /Users/baagaard/scratch/build/clang-13.0/cig/pylith-binary/build/cig/petsc-pylith/src/dm/impls/plex/plexcreate.c:3863
[0]PETSC ERROR: #6 DMSetFromOptions() at /Users/baagaard/scratch/build/clang-13.0/cig/pylith-binary/build/cig/petsc-pylith/src/dm/interface/dm.c:915
[0]PETSC ERROR: #7 virtual void pylith::meshio::MeshIOPetsc::_read()() at …/…/…/pylith-3.0.3/libsrc/pylith/meshio/MeshIOPetsc.cc:123
Abort(-1) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0
: Error detected while in PETSc function.
/Users/IsisLemus/pylith/pylith-3.0.3-macOS-10.15-x86_64/bin/nemesis: mpiexec: exit 255
/Users/IsisLemus/pylith/pylith-3.0.3-macOS-10.15-x86_64/bin/pylith: /Users/IsisLemus/pylith/pylith-3.0.3-macOS-10.15-x86_64/bin/nemesis: exit 1"

From your output it looks like this error is generated when the Gmsh information is being used to populate the PETSc mesh data structures (DMPlex). The error is probably in how you are generating the mesh. Please provide a diagram of the boundary value problem you are trying to solve and the Python script used to generate the mesh.

Hi Brad,

I have attached the boundary value problem below and the generating mesh code. For context, I’m modeling potential precursory deformation occurring before the Tohoku earthquake. Here I’m modeling 52cm of normal offset at depth (240-340 km). I’m focusing on what displacements these mechanisms are producing but because this is still during the interseismic period before Tohoku, should I incorporate displacement rates into my slab boundary conditions like in the subduction zone 2D example step 2 (quasistatic interseismic deformation)? The upload function here doesn’t allow me to upload .py files, here is a link to the .py file.
Boundary_value_problem .pdf (615.3 KB)

I think I may have found the issue. If you look at a coarse mesh (minimum discretization size of 20 km), you will see the mesh does not honor the fault interface cutting the slab in two. That is, the slab is not subdivided by the fault that cuts through the slab. You need to create two separate curve loops and surfaces, one for each piece of the slab. You can still create a single material for the slab, but it needs to be composed of two surfaces.

Sorry for the delay. I have been very busy finishing a PyLith release (will come out in the next day or so).