Using PyLith to calculate the subduction zone Green's functions

Hello, Sir,

I am currently using PyLith for calculating subduction zone Green’s functions, but I keep encountering the following error: ValueError: Could not find fault interface with id '40' for Green's function impulses. application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0. I have checked and found that the interface name I provided matches my model, so I am not sure where the issue might be.

Dear Xiaoyang,
It is difficult to diagnose this without more information. Could you please provide the .cfg files you are using, as well as the full output from when you run your simulation? Also, are you providing both the label and label_value for your fault?
Cheers,
Charles

This error suggests that your parameter file is using a label value of 40 for the fault with Green’s functions, but it can’t find one in the mesh. Both the label name and label value in the mesh file need to match what you use in your parameter files.

Thank you very much for your reply. However, I am now encountering a new issue. During the inversion process of the backslip in a 3D subduction zone model, when using step06 in the subduction, I encountered the following error:

Fatal error. Calling MPI_Abort() to abort PyLith application.

arduino

复制代码

Traceback (most recent call last):
  File "/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/apps/PetscApplication.py", line 74, in onComputeNodes
    self.main(*args, **kwds)
  File "/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/apps/PyLithApp.py", line 128, in main
    self.problem.initialize()
  File "/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/problems/TimeDependent.py", line 120, in initialize
    self.formulation.initialize(self.dimension, self.normalizer)
  File "/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/problems/Implicit.py", line 121, in initialize
    self._initialize(dimension, normalizer)
  File "/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/problems/Formulation.py", line 470, in _initialize
    integrator.initialize(totalTime, numTimeSteps, normalizer)
  File "/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/feassemble/ElasticityImplicit.py", line 56, in initialize
    ModuleElasticityImplicit.initialize(self, self.mesh())
  File "/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/feassemble/feassemble.py", line 359, in initialize
    def initialize(self, *args): return _feassemble.IntegratorElasticity_initialize(self, *args)
RuntimeError: Error while projecting location.
  latitude or longitude exceeded limits
  projection: tmerc
  units: m
  proj options: +lon_0=-122.6765 +lat_0=45.5231 +k=0.9996
  lon: 1.41515
  lat: 0.629

bash

复制代码

application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0
/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/bin/nemesis: mpirun: exit 255
/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/bin/pylith: /home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/bin/nemesis: exit 1

No matter how I modify the latitude and longitude in pylith.app, I still get the error latitude or longitude exceeded limits with the following projection parameters:

yaml

复制代码

projection: tmerc
units: m
proj options: +lon_0=-122.6765 +lat_0=45.5231 +k=0.9996
lon: 1.41515
lat: 0.629

I have attached the relevant files. Could you please take a look? Additionally, due to the limitations of my computing equipment, I am only able to use PyLith version 2.2.2.
file.zip (36.3 KB)

Thank you very much for your help. However, I have encountered a new problem. If you have time, could you please take a look at it? I have described the specific issue in the comment below. Thank you!

You do not appear to be using a consistent coordinate systems and a location for your domain.

The pylithapp.cfg file indicates the finite-element mesh in in a transverse Mercator projection with the origin at 85E 28N:

coordsys = spatialdata.geocoords.CSGeoProj
coordsys.space_dim = 3
coordsys.datum_horiz = WGS84
coordsys.datum_vert = mean sea level
coordsys.projector.projection = tmerc
coordsys.projector.proj_options = +lon_0=85 +lat_0=28 +k=0.9996

The material spatial database files are in another transverse projection that has an origin at 122.67665W 45.5231N:

    projector = projector {
      projection = tmerc
      units = m
      proj-options = +lon_0=-122.6765 +lat_0=45.5231 +k=0.9996
    }

It looks like you are using only 1 point in your spatial database files, so this may not matter, but I recommend correcting the coordinate system so that they are at least a consistent location.

In the step06.cfg file no projection is specified for the stations file:

coordsys = spatialdata.geocoords.CSGeoProj
coordsys.space_dim = 3
coordsys.datum_horiz = WGS84
coordsys.datum_vert = mean sea level

I suspect this is the cause of the error you are getting.

Dear Sir,

With your help, I have resolved all the previous issues, and I am truly grateful for your assistance. However, I am embarrassed to say that I have encountered the same problem as before. Specifically, during step07a and step07b, I receive the following Fatal error message:

vbnet

复制代码

Fatal error. Calling MPI_Abort() to abort PyLith application.
Traceback (most recent call last):
  File "/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/apps/PetscApplication.py", line 74, in onComputeNodes
    self.main(*args, **kwds)
  File "/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/apps/PyLithApp.py", line 123, in main
    self.problem.preinitialize(mesh)
  File "/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/problems/GreensFns.py", line 111, in preinitialize
    "Green's function impulses." % self.faultId)
ValueError: Could not find fault interface with id '10' for Green's function impulses.
application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0

However, when I computed step06, the interface could be read successfully, so I am unsure where the problem lies. Here are the related commands I used:
greensfns.cfg (2.4 KB)
step06.cfg (6.6 KB)
step07a.cfg (4.8 KB)
step07b.cfg (4.8 KB)

It appears that you are specifying the wrong ID for your fault in greensfns.cfg. Instead of ID 10, I believe the ID number should be 40.

Cheers,
Charles

Sir, I have replaced the corresponding ID with 40 and made the change consistently in other files, but the issue still persists.Fatal error. Calling MPI_Abort() to abort PyLith application.
Traceback (most recent call last):
File “/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/lib/python2./site-packages/pylith/apps/PetscApplication.py”, line 74, in onComputeNodes
self.main(*args, **kwds)
File “/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/lib/python2./site-packages/pylith/apps/PyLithApp.py”, line 123, in main
self.problem.preinitialize(mesh)
File “/home/zhengyong/users/xiaoyang/xiaoy/xiaoy/Pylith/pylith-2.2.2-linux-x86_64/lib/python2./site-packages/pylith/problems/GreensFns.py”, line 111, in preinitialize
“Green’s function impulses.” % self.faultId)
ValueError: Could not find fault interface with id ‘40’ for Green’s function impulses.
application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0
Below is my attachment.
greensfns.cfg (2.4 KB)
step06.cfg (6.6 KB)
step07a.cfg (4.8 KB)
step07b.cfg (4.8 KB)

In generating Green’s functions with PyLith v2.2.x, there are two places where the fault id is used.

  1. Setting the fault id for each interface. For example:
[pylithapp.problem]
interfaces = [fault]

[pylithapp.problem.interfaces.fault]
id = 100
  1. Setting the fault used to generate Green’s functions. For example,
[greensfns]
fault_id = 100

These two ids must match. Both of these have default values of 100, so in most cases you can use the default values. You can look at your pylith_parameters.json file (and PyLith parameter viewer) to track down what the current values are and where they are being set.

Dear Baagaard,
Thank you very much for your reply. Your response was spot on, and I have resolved the issue. Thanks again, and I wish you all the best!