[CIG-SHORT] 答复: question about coordinate transform

Brad Aagaard baagaard at usgs.gov
Wed Aug 23 11:55:23 PDT 2017


Tu Xiang,

Please send a log with everything written to stdout (i.e., pylith ARGS 
 >& log, and then send the log file), not just the portion with 
PETSC_ERROR. Often there is very useful debugging information BEFORE you 
see the PETSC_ERROR part.

Regards,
Brad


On 08/23/2017 10:17 AM, Matthew Knepley wrote:
> On Sat, Aug 19, 2017 at 6:47 AM, tu xiang <tuxiang2016 at outlook.com 
> <mailto:tuxiang2016 at outlook.com>> wrote:
> 
>     Thank you for your reply.
> 
>     Now, I have check the demo and found some errors. I corrected the
>     errors,
> 
> 
> Errors in your modified file, or errors in the original demo? I can run 
> the original.
> 
>     then, run the demo with Pylith 2.2.0 version. But it still report
>     some errors:
> 
> 
> You need to run in the debugger and get a stack trace. So run using
> 
>    --petsc.start_in_debugger
> 
> and get a stack trace using 'where'.
> 
>    Thanks,
> 
>      Matt
> 
>     [0]PETSC ERROR:
>     ------------------------------------------------------------------------
>     [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation
>     Violation, probably memory access out of range
>     [0]PETSC ERROR: Try option -start_in_debugger or
>     -on_error_attach_debugger
>     [0]PETSC ERROR: or see
>     http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
>     <http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind>
>     [0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple
>     Mac OS X to find memory corruption errors
>     [0]PETSC ERROR: configure using --with-debugging=yes, recompile,
>     link, and run
>     [0]PETSC ERROR: to get more information on the crash.
>     [0]PETSC ERROR: --------------------- Error Message
>     --------------------------------------------------------------
>     [0]PETSC ERROR: Signal received
>     [0]PETSC ERROR: See
>     http://www.mcs.anl.gov/petsc/documentation/faq.html
>     <http://www.mcs.anl.gov/petsc/documentation/faq.html> for trouble
>     shooting.
>     [0]PETSC ERROR: Petsc Development GIT revision: v3.7.5-3660-g9beae12
>       GIT Date: 2017-03-23 13:26:44 -0500
>     [0]PETSC ERROR:
>     /home/tx/pylith/pylith-2.2.0-linux-x86_64/bin/mpinemesis on a
>     arch-pylith named insar.geodyn by tx Sat Aug 19 07:25:43 2017
>     [0]PETSC ERROR: Configure options
>     --prefix=/home/brad/pylith-binary/dist --with-c2html=0 --with-x=0
>     --with-clanguage=C --with-mpicompilers=1 --with-debugging=0
>     --with-shared-libraries=1 --with-64-bit-points=1
>     --with-large-file-io=1 --download-chaco=1 --download-ml=1
>     --download-f2cblaslapack=1 --with-hwloc=0 --with-ssl=0 --with-x=0
>     --with-c2html=0 --with-lgrind=0 --with-hdf5=1
>     --with-hdf5-dir=/home/brad/pylith-binary/dist --with-zlib=1
>     --LIBS=-lz --with-fc=0
>     CPPFLAGS="-I/home/brad/pylith-binary/dist/include "
>     LDFLAGS="-L/home/brad/pylith-binary/dist/lib " CFLAGS="-g -O2"
>     CXXFLAGS="-g -O2 -DMPICH_IGNORE_CXX_SEEK" FCFLAGS=
>     PETSC_DIR=/home/brad/pylith-binary/build/petsc-pylith
>     PETSC_ARCH=arch-pylith
>     [0]PETSC ERROR: #1 User provided function() line 0 in  unknown file
>     application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0
>     /home/tx/pylith/pylith-2.2.0-linux-x86_64/bin/nemesis: mpirun: exit 59
>     /home/tx/pylith/pylith-2.2.0-linux-x86_64/bin/pylith:
>     /home/tx/pylith/pylith-2.2.0-linux-x86_64/bin/nemesis: exit 1
> 
> 
>     The configure files:
> 
> 
>     pylithapp.cfg
> 
>     # ----------------------------------------------------------------------
>     # journal
>     # ----------------------------------------------------------------------
>     # Turn on some journals to show progress.
>     [pylithapp.journal.info <http://pylithapp.journal.info>]
>     timedependent = 1
>     petsc = 1
>     solverlinear = 1
>     meshiocubit = 1
>     faultcohesivedyn = 1
>     fiatsimplex = 1
>     pylithapp = 1
>     materials = 1
> 
>     # ----------------------------------------------------------------------
>     # mesh_generator
>     # ----------------------------------------------------------------------
>     [pylithapp.mesh_generator]
>     # Change the default mesh reader to the CUBIT reader.
>     reader = pylith.meshio.MeshIOCubit
> 
>     [pylithapp.mesh_generator.reader]
>     filename = mesh/mesh.exo
>     coordsys.space_dim = 3
> 
>     # ----------------------------------------------------------------------
>     # problem
>     # ----------------------------------------------------------------------
>     [pylithapp.timedependent]
>     dimension = 3
> 
>     [pylithapp.problem.formulation.time_step]
>     total_time = 80*s
>     dt = 0.005*s
> 
>     [pylithapp.timedependent]
>     formulation = pylith.problems.Explicit
> 
>     normalizer = spatialdata.units.NondimElasticDynamic
>     [pylithapp.timedependent.normalizer]
>     shear_wave_speed = 3.0*km/s
>     mass_density = 3.0e+3*kg/m**3
>     wave_period = 0.3*s
> 
>     # ----------------------------------------------------------------------
>     # materials
>     # ----------------------------------------------------------------------
>     [pylithapp.timedependent]
>     materials = [crust_material]
> 
>     [pylithapp.timedependent.materials]
>     crust_material = pylith.materials.ElasticIsotropic3D
> 
>     [pylithapp.timedependent.materials.crust_material]
>     label = Elastic material
>     id = 20
>     #db_properties = spatialdata.spatialdb.SimpleDB
>     db_properties.label = Crust properties
>     db_properties.iohandler.filename = spatialdb/mat_crust.spatialdb
> 
>     quadrature.cell = pylith.feassemble.FIATSimplex
>     quadrature.cell.dimension = 3
> 
>     # ----------------------------------------------------------------------
>     # boundary conditions
>     # ----------------------------------------------------------------------
>     [pylithapp.problem]
>     bc = [front,back,left,right,bottem]
>     bc.front = pylith.bc.AbsorbingDampers
>     bc.back = pylith.bc.AbsorbingDampers
>     bc.left = pylith.bc.AbsorbingDampers
>     bc.right = pylith.bc.AbsorbingDampers
>     bc.bottem = pylith.bc.AbsorbingDampers
> 
>     [pylithapp.problem.bc.front]
>     label = front_bd
>     db.label = Absorbing BC +x
>     db.iohandler.filename = spatialdb/matprops.spatialdb
>     quadrature.cell = pylith.feassemble.FIATSimplex
>     quadrature.cell.dimension = 2
>     #quadrature.cell.quad_order = 2
> 
>     [pylithapp.problem.bc.back]
>     label = back_bd
>     db.label = Absorbing BC -x
>     db.iohandler.filename = spatialdb/matprops.spatialdb
>     quadrature.cell = pylith.feassemble.FIATSimplex
>     quadrature.cell.dimension = 2
>     #quadrature.cell.quad_order = 2
> 
>     [pylithapp.problem.bc.left]
>     label = left_bd
>     db.label = Absorbing BC -y
>     db.iohandler.filename = spatialdb/matprops.spatialdb
>     quadrature.cell = pylith.feassemble.FIATSimplex
>     quadrature.cell.dimension = 2
>     #quadrature.cell.quad_order = 2
> 
>     [pylithapp.problem.bc.right]
>     label = right_bd
>     db.label = Absorbing BC +y
>     db.iohandler.filename = spatialdb/matprops.spatialdb
>     quadrature.cell = pylith.feassemble.FIATSimplex
>     quadrature.cell.dimension = 2
>     #quadrature.cell.quad_order = 2
> 
>     [pylithapp.problem.bc.bottem]
>     label = bottem_bd
>     db.label = Absorbing BC -z
>     db.iohandler.filename = spatialdb/matprops.spatialdb
>     quadrature.cell = pylith.feassemble.FIATSimplex
>     quadrature.cell.dimension = 2
>     #quadrature.cell.quad_order = 2
> 
>     # End of file
> 
> 
>     demo.cfg
> 
>     [pylithapp]
>     # ----------------------------------------------------------------------
>     # ----------------------------------------------------------------------
>     # faults
>     # ----------------------------------------------------------------------
>     [pylithapp.problem]
>     interfaces = [fault]
> 
>     [pylithapp.problem.interfaces]
>     fault = pylith.faults.FaultCohesiveDyn
> 
>     [pylithapp.problem.interfaces.fault]
>     label = demo_fault
>     edge  = fault_edge
>     id    = 100
> 
>     quadrature.cell = pylith.feassemble.FIATSimplex
>     quadrature.cell.dimension = 2
> 
>     [pylithapp.problem.interfaces.fault]
>     # Specify zero tolerance for detecting slip. Must be larger than the
>     # KSP absolute tolerance.
>     open_free_surface = True
>     zero_tolerance = 1.0e-10
>     #friction.force_healing = True
> 
>     friction = pylith.friction.SlipWeakening
>     friction.label = Slip weakening
>     friction.db_properties = spatialdata.spatialdb.SimpleDB
>     friction.db_properties.label = Slip weakening
>     friction.db_properties.iohandler.filename =
>     spatialdb/fault_friction.spatialdb
>     friction.db_properties.query_type = linear
> 
>     traction_perturbation = pylith.faults.TractPerturbation
>     traction_perturbation.db_initial.label = Initial fault tractions
>     traction_perturbation.db_initial = spatialdata.spatialdb.SimpleDB
>     traction_perturbation.db_initial.iohandler.filename =
>     spatialdb/fault_traction.spatialdb
>     traction_perturbation.db_initial.query_type = linear
> 
>     # ----------------------------------------------------------------------
>     # output
>     # ----------------------------------------------------------------------
>     # Domain
>     #[pylithapp.problem.formulation]
>     #output = [domain]
> 
>     #[pylithapp.problem.formulation.output.domain]
>     #output_freq = time_step
>     #time_step = 0.9999999*s
>     #writer = pylith.meshio.DataWriterHDF5Mesh
> 
>     #[pylithapp.problem.formulation.output.domain]
>     #writer.filename = output/demo.h5
>     #vertex_data_fields = [displacement,velocity]
> 
>     # ----------------------------------------------------------------------
>     # PETSc
>     # ----------------------------------------------------------------------
>     # NOTE: There are additional settings specific to fault friction.
>     [pylithapp.petsc]
> 
>     # Friction sensitivity solve used to compute the increment in slip
>     # associated with changes in the Lagrange multiplier imposed by the
>     # fault constitutive model.
>     friction_pc_type = asm
>     friction_sub_pc_factor_shift_type = nonzero
>     friction_ksp_max_it = 25
>     friction_ksp_gmres_restart = 30
>     # Uncomment to view details of friction sensitivity solve.
>     friction_ksp_monitor = true
>     friction_ksp_view = true
>     friction_ksp_converged_reason = true
> 
>     # End of file
> 
> 
>     I cannot understand the output errors, thus I do not know how to
>     deal with this problem. Would you like to help me deal with this
>     problem or tell me how to find where the errors happened?
> 
> 
>     Best regards,
> 
>     Tu xiang
> 
> 
> 
> 
>     ------------------------------------------------------------------------
>     *发件人:* tu xiang
>     *发送时间:* 2017年8月19日 15:28:40
> 
>     *收件人:* cig-short at geodynamics.org <mailto:cig-short at geodynamics.org>
>     *主题:* 答复: question about coordinate transform
> 
>     Thank you for your reply.
> 
> 
>     Now, I have check the demo and found some errors. I corrected the
>     errors, then, run the demo with Pylith 2.2.0 version. But it still
>     report some errors:
> 
> 
>     [0]PETSC ERROR:
>     ------------------------------------------------------------------------
>     [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation
>     Violation, probably memory access out of range
>     [0]PETSC ERROR: Try option -start_in_debugger or
>     -on_error_attach_debugger
>     [0]PETSC ERROR: or see
>     http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
>     <http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind>
>     [0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple
>     Mac OS X to find memory corruption errors
>     [0]PETSC ERROR: configure using --with-debugging=yes, recompile,
>     link, and run
>     [0]PETSC ERROR: to get more information on the crash.
>     [0]PETSC ERROR: --------------------- Error Message
>     --------------------------------------------------------------
>     [0]PETSC ERROR: Signal received
>     [0]PETSC ERROR: See
>     http://www.mcs.anl.gov/petsc/documentation/faq.html
>     <http://www.mcs.anl.gov/petsc/documentation/faq.html> for trouble
>     shooting.
>     [0]PETSC ERROR: Petsc Development GIT revision: v3.7.5-3660-g9beae12
>       GIT Date: 2017-03-23 13:26:44 -0500
>     [0]PETSC ERROR:
>     /home/tx/pylith/pylith-2.2.0-linux-x86_64/bin/mpinemesis on a
>     arch-pylith named insar.geodyn by tx Sat Aug 19 07:25:43 2017
>     [0]PETSC ERROR: Configure options
>     --prefix=/home/brad/pylith-binary/dist --with-c2html=0 --with-x=0
>     --with-clanguage=C --with-mpicompilers=1 --with-debugging=0
>     --with-shared-libraries=1 --with-64-bit-points=1
>     --with-large-file-io=1 --download-chaco=1 --download-ml=1
>     --download-f2cblaslapack=1 --with-hwloc=0 --with-ssl=0 --with-x=0
>     --with-c2html=0 --with-lgrind=0 --with-hdf5=1
>     --with-hdf5-dir=/home/brad/pylith-binary/dist --with-zlib=1
>     --LIBS=-lz --with-fc=0
>     CPPFLAGS="-I/home/brad/pylith-binary/dist/include "
>     LDFLAGS="-L/home/brad/pylith-binary/dist/lib " CFLAGS="-g -O2"
>     CXXFLAGS="-g -O2 -DMPICH_IGNORE_CXX_SEEK" FCFLAGS=
>     PETSC_DIR=/home/brad/pylith-binary/build/petsc-pylith
>     PETSC_ARCH=arch-pylith
>     [0]PETSC ERROR: #1 User provided function() line 0 in  unknown file
>     application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0
>     /home/tx/pylith/pylith-2.2.0-linux-x86_64/bin/nemesis: mpirun: exit 59
>     /home/tx/pylith/pylith-2.2.0-linux-x86_64/bin/pylith:
>     /home/tx/pylith/pylith-2.2.0-linux-x86_64/bin/nemesis: exit 1
> 
> 
>     ------------------------------------------------------------------------
>     *发件人:* tu xiang
>     *发送时间:* 2017年8月18日 7:25:44
>     *收件人:* cig-short at geodynamics.org <mailto:cig-short at geodynamics.org>
>     *主题:* 答复: question about coordinate transform
> 
>     Thank you for your help about coordinate transform.
> 
>     But I have another two questions.
> 
>     question 1
> 
>     Yes, I am importing the coordsys.py from the example, the question
>     is z-coordinates are greater than zero. I want to bury the fault
>     into the mesh,  but z-coordinates of the mesh are smaller than zero.
>     What do I need to do?
> 
> 
>     change the cs.inventory.datumVert = "mean sea level" or the
>     cs.inventory.projector.inventory.projOptions = "+lat_0=45.5231
>     +lon_0=-122.6765 +k=0.9996"
> 
> 
>     and how to change?
> 
>     question2
>     I have construct a very simple 3D demo mesh, and I want to do
>     dynamic simulation with pylith 1.9.0 version, then I set all the
>     configure file. but it output errors. I attach the demo. Hope
>     someone would like to help me check the demo.
> 
>     output errors
>     Traceback (most recent call last):
>        File "/home/xzhou/pylith-1.9.0-linux-x86_64/bin/pylith", line 39,
>     in <module>
>          start(applicationClass=PyLithApp)
>        File
>     "/home/xzhou/pylith-1.9.0-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.14-py2.7.egg/pyre/applications/__init__.py",
>     line 41, in start
>          shell.run(**kwds)
>        File
>     "/home/xzhou/pylith-1.9.0-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.14-py2.7.egg/pyre/applications/Shell.py",
>     line 125, in run
>          app.applyConfiguration(context)
>        File
>     "/home/xzhou/pylith-1.9.0-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.14-py2.7.egg/pyre/inventory/Configurable.py",
>     line 84, in applyConfiguration
>          raise ValueError("%s\nBacktrace - Component %s" % (err.message,
>     aliases))
>     ValueError: Error while configuring spatial database reader
>     (simpleioascii, iohandler):
>     Filename for spatial database not specified.
>     Backtrace - Component simpleioascii, iohandler
>     Backtrace - Component simpledb, slip
>     Backtrace - Component stepslipfn, slip_function
>     Backtrace - Component eqkinsrc, rupture
>     Backtrace - Component singlerupture, eq_srcs
>     Backtrace - Component faultcohesivekin, demo_fault
>     Backtrace - Component interfaces
>     Backtrace - Component timedependent, problem
>     Backtrace - Component pylithapp
> 
> 
> 
> 
> 
> 
> 
> 
> 
>     ------------------------------------------------------------------------
>     *发件人:* tu xiang
>     *发送时间:* 2017年8月15日 10:59:45
>     *收件人:* cig-short at geodynamics.org <mailto:cig-short at geodynamics.org>
>     *主题:* question about coordinate transform
> 
>     Hello, everyone
> 
>     Does the geographical coordinates (+lat_0=45.5231 +lon_0=-122.6765
>     +k=0.9996) correspond to the origin of Cartesian coordinates for
>     mesh in the 3D subduction example?____
> 
> 
>     I want to try to transform some geographical coordinates, then, I
>     write next code:____
> 
>     #!/usr/bin/env nemesis____
> 
>     import coordsys____
> 
>     import numpy as np____
> 
>     point=np.array([[45.5231,-122.6765,0.9996],[46.0,-122.0,1.0],[45.0,-122.0,0.5]])____
> 
>     print point____
> 
>     print type(point)____
> 
>     coordsys.geoToMesh(point)____
> 
> 
>     But it output errors!____
> 
> 
>     Traceback (most recent call last):____
> 
>        File "demo.py", line 9, in <module>____
> 
>          coordsys.geoToMesh(point)____
> 
>        File "/home/bxu/covert/coordsys.py", line 54, in geoToMesh____
> 
>          convert(xyz, cs_mesh(), cs_geo3D())____
> 
>        File
>     "/home/bxu/pylith/pylith-2.2.1rc1-linux-x86_64/lib/python2.7/site-packages/spatialdata/geocoords/Converter.py",
>     line 33, in convert____
> 
>          geocoords.Converter.convert(coords, csDest, csSrc)____
> 
>     RuntimeError: Error while projecting location.____
> 
>        latitude or longitude exceeded limits____
> 
>        projection: tmerc____
> 
>        units: m____
> 
>        proj options: +lat_0=45.5231 +lon_0=-122.6765 +k=0.9996____
> 
>        lon: 0.794528____
> 
>        lat: -2.14111____
> 
>     It said the latitude or longitude exceeded limits, I do not know
>     what does it mean?____
> 
>     Looking forward to your reply.
>     Best regards,
>     Tu Xiang
> 
> 
> 
> 
>     _______________________________________________
>     CIG-SHORT mailing list
>     CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>     http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>     <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
> 
> 



More information about the CIG-SHORT mailing list