Error when run Example3
nicklinyi opened this issue · comments
Hi, I follow the steps listed in Example3 but run into an error when typing beat sample Laquila
. Here is the full result of that command. Everything went just fine before that command. I don't know how to solve this problem. Please give me some suggestions
on how to solve this if you have time. Thanks very much.
config - INFO All hierarchicals ok!
config - INFO All hyperparameters ok!
config - INFO All priors ok!
models - INFO ... Initialising Geometry Optimizer ...
models - INFO Analysing problem ...
models - INFO ---------------------
geodetic - INFO Number of geodetic datasets: 2
geodetic - INFO Number of geodetic data points: 419
geodetic - WARNING Covariance estimation not implemented (yet)! Using imported covariances!
geodetic - INFO Initialising corrections ...
heart - INFO Setting up Ramps correction for Laquila_dscxn
heart - INFO Not correcting Laquila_dscxn for Euler Pole
heart - INFO Not correcting Laquila_dscxn for Strain Rate
heart - INFO Setting up Ramps correction for Laquila_ascxn
heart - INFO Not correcting Laquila_ascxn for Euler Pole
heart - INFO Not correcting Laquila_ascxn for Strain Rate
seismic - INFO Loading seismic data for event 0 from: /mnt/f/1.work/3.proj3/Laquila/seismic_data.pkl
heart - INFO Consistent number of datasets and targets in any_P_0 wavemap!
heart - INFO Number of seismic datasets for wavemap: any_P_0: 35
models - INFO ... Building model ...
models - INFO Initialised hyperparameter h_SAR with size 2
models - INFO Initialised hyperparameter h_any_P_0_Z with size 1
models - INFO Optimization for 3 hyperparameters in total!
geodetic - INFO Geodetic optimization on:
depth, dip, east_shift, length, north_shift, rake, slip, strike, width
geodetic - INFO Evaluating config for Ramps corrections for datasets...
geodetic - INFO Evaluating config for Euler Pole corrections for datasets...
geodetic - INFO No Euler Pole correction!
geodetic - INFO Evaluating config for Strain Rate corrections for datasets...
geodetic - INFO No Strain Rate correction!
geodetic - INFO Initialized 6 hierarchical parameters.
geodetic - INFO Applying corrections! ...
seismic - INFO Seismic optimization on:
depth, dip, east_shift, length, north_shift, nucleation_x, nucleation_y, rake, slip, strike, time, width
seismic - INFO Retrieving seismic data-covariances with structure "non-toeplitz" for any_P_0 ...
seismic - INFO Initialising weights ...
seismic - INFO Preparing data of "any_P_0" for optimization
seismic - INFO Initializing synthesizer for "any_P_0"
seismic - INFO Using all sources for wavemap any_P_0 !
models - INFO Model building was successful!
models - INFO Using "bin" backend to store samples!
models - INFO ... Initiate Sequential Monte Carlo ...
n_chains=500, tune_interval=10, n_jobs=1, proposal_distribution: MultivariateNormal,
metropolis - INFO Creating initial population for 500 chains ...
metropolis - INFO Time for proposal covariance init: 1.754151
models - INFO Compilation time: 152.584146
models.base - INFO ... Starting SMC ...
backend - INFO Removing previous sampling results ... /mnt/f/1.work/3.proj3/Laquila/geometry/stage_0
backend - INFO Found no sampling results under /mnt/f/1.work/3.proj3/Laquila/geometry/stage_0
backend - INFO Init new trace!
smc - INFO Sample initial stage: ...
smc - INFO Beta: 0.000000 Stage: 0
sampler - INFO Initialising 500 chain traces ...
sampler - INFO Serial time per sample: 0.118900
sampler - INFO Not using shared memory.
sampler - INFO Sampling ...
Traceback (most recent call last):
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/theano/compile/function_module.py", line 903, in __call__
self.fn() if output_subset is None else\
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/theano/gof/op.py", line 892, in rval
r = p(n, [x[0] for x in i], o)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/theanof.py", line 404, in perform
arrival_times=arrival_times)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/heart.py", line 3043, in seis_synthetics
targets=targets, nprocs=nprocs)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/pyrocko/gf/seismosizer.py", line 3681, in process
nthreads):
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/pyrocko/gf/seismosizer.py", line 3129, in process_dynamic_timeseries
raise e
pyrocko.gf.seismosizer.SeismosizerError: Seismosizer failed with return code 14
--- !pf.OutOfBoundsContext
source: !beat.sources.RectangularSource
lat: 42.29
lon: 13.35
north_shift: -7569.742623976619
east_shift: 19565.63117571738
depth: 1924.03203974972
name: 200904060132A
time: '2009-04-06 01:32:35.810380697'
stf: !pf.HalfSinusoidSTF
duration: 7.0
anchor: -1.0
exponent: 1
stf_mode: post
magnitude: 6.343080192483292
strike: 72.85150306310892
dip: 47.18963061475914
rake: -178.65158537578577
length: 23537.26621196636
width: 18917.377175243793
anchor: top
nucleation_x: 0.21540544176750442
nucleation_y: 0.37785101181828273
velocity: 3500.0
slip: 0.3516603054841301
opening_fraction: 0.0
target: !beat.heart.DynamicTarget
lat: 20.2263
lon: -88.2763
depth: 0.0
quantity: displacement
codes:
- IU
- TEIG
- '0'
- Z
elevation: 0.0
store_id: TEIG_ak135_0.500Hz_0
interpolation: multilinear
tmin: '2009-04-06 01:44:59'
tmax: '2009-04-06 01:46:29'
azimuth: 0.0
dip: -90.0
distance: 9452204.027740488
components:
- displacement.d
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/liny/anaconda3/envs/beat/bin/beat", line 33, in <module>
sys.exit(load_entry_point('beat==1.1.1', 'console_scripts', 'beat')())
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/apps/beat.py", line 2127, in main
globals()['command_' + command](args)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/apps/beat.py", line 929, in command_sample
sample(step, problem)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/models/base.py", line 236, in sample
rm_flag=pa.rm_flag)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/sampler/smc.py", line 457, in smc_sample
mtrace = iter_parallel_chains(**sample_args)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/sampler/base.py", line 518, in iter_parallel_chains
for res in p:
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/parallel.py", line 224, in paripool
yield [function(*work)]
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/sampler/base.py", line 282, in _sample
for strace in sampling:
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/sampler/base.py", line 338, in _iter_sample
point, out_list = step.step(point)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/backend.py", line 129, in step
apoint, alist = self.astep(self.bij.map(point))
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/sampler/metropolis.py", line 220, in astep
l_new = self.logp_forw(q0)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/theano/compile/function_module.py", line 917, in __call__
storage_map=getattr(self.fn, 'storage_map', None))
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/theano/gof/link.py", line 325, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/six.py", line 718, in reraise
raise value.with_traceback(tb)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/theano/compile/function_module.py", line 903, in __call__
self.fn() if output_subset is None else\
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/theano/gof/op.py", line 892, in rval
r = p(n, [x[0] for x in i], o)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/theanof.py", line 404, in perform
arrival_times=arrival_times)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/heart.py", line 3043, in seis_synthetics
targets=targets, nprocs=nprocs)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/pyrocko/gf/seismosizer.py", line 3681, in process
nthreads):
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/pyrocko/gf/seismosizer.py", line 3129, in process_dynamic_timeseries
raise e
pyrocko.gf.seismosizer.SeismosizerError: Seismosizer failed with return code 14
--- !pf.OutOfBoundsContext
source: !beat.sources.RectangularSource
lat: 42.29
lon: 13.35
north_shift: -7569.742623976619
east_shift: 19565.63117571738
depth: 1924.03203974972
name: 200904060132A
time: '2009-04-06 01:32:35.810380697'
stf: !pf.HalfSinusoidSTF
duration: 7.0
anchor: -1.0
exponent: 1
stf_mode: post
magnitude: 6.343080192483292
strike: 72.85150306310892
dip: 47.18963061475914
rake: -178.65158537578577
length: 23537.26621196636
width: 18917.377175243793
anchor: top
nucleation_x: 0.21540544176750442
nucleation_y: 0.37785101181828273
velocity: 3500.0
slip: 0.3516603054841301
opening_fraction: 0.0
target: !beat.heart.DynamicTarget
lat: 20.2263
lon: -88.2763
depth: 0.0
quantity: displacement
codes:
- IU
- TEIG
- '0'
- Z
elevation: 0.0
store_id: TEIG_ak135_0.500Hz_0
interpolation: multilinear
tmin: '2009-04-06 01:44:59'
tmax: '2009-04-06 01:46:29'
azimuth: 0.0
dip: -90.0
distance: 9452204.027740488
components:
- displacement.d
Apply node that caused the error: SeisSynthesizer{engine=<pyrocko.gf.seismosizer.LocalEngine object at 0x7f9c24ff21d0>, sources=(<pyrocko.gf.seismosizer.RectangularSource object at 0x7f9c25055a90>,), targets=(<beat.heart.DynamicTarget object at 0x7f9c24efeb38>, <beat.heart.DynamicTarget object at 0x7f9c24efeba8>, <beat.heart.DynamicTarget object at 0x7f9c24efec18>, <beat.heart.DynamicTarget object at 0x7f9c24efec88>, <beat.heart.DynamicTarget object at 0x7f9c24efecf8>, <beat.heart.DynamicTarget object at 0x7f9c24efed68>, <beat.heart.DynamicTarget object at 0x7f9c24efedd8>, <beat.heart.DynamicTarget object at 0x7f9c24efee48>, <beat.heart.DynamicTarget object at 0x7f9c24efeeb8>, <beat.heart.DynamicTarget object at 0x7f9c24efef28>, <beat.heart.DynamicTarget object at 0x7f9c24efef98>, <beat.heart.DynamicTarget object at 0x7f9c24f00048>, <beat.heart.DynamicTarget object at 0x7f9c24f000b8>, <beat.heart.DynamicTarget object at 0x7f9c24f00128>, <beat.heart.DynamicTarget object at 0x7f9c24f00198>, <beat.heart.DynamicTarget object at 0x7f9c24f00208>, <beat.heart.DynamicTarget object at 0x7f9c24f00278>, <beat.heart.DynamicTarget object at 0x7f9c24f002e8>, <beat.heart.DynamicTarget object at 0x7f9c24f00358>, <beat.heart.DynamicTarget object at 0x7f9c24f003c8>, <beat.heart.DynamicTarget object at 0x7f9c24f00438>, <beat.heart.DynamicTarget object at 0x7f9c24f004a8>, <beat.heart.DynamicTarget object at 0x7f9c24f00518>, <beat.heart.DynamicTarget object at 0x7f9c24f00588>, <beat.heart.DynamicTarget object at 0x7f9c24f005f8>, <beat.heart.DynamicTarget object at 0x7f9c24f00668>, <beat.heart.DynamicTarget object at 0x7f9c24f006d8>, <beat.heart.DynamicTarget object at 0x7f9c24f00748>, <beat.heart.DynamicTarget object at 0x7f9c24f007b8>, <beat.heart.DynamicTarget object at 0x7f9c24f00828>, <beat.heart.DynamicTarget object at 0x7f9c24f00908>, <beat.heart.DynamicTarget object at 0x7f9c24f00978>, <beat.heart.DynamicTarget object at 0x7f9c24f009e8>, <beat.heart.DynamicTarget object at 0x7f9c24f00a58>, <beat.heart.DynamicTarget object at 0x7f9c24f00ac8>), event=<pyrocko.model.event.Event object at 0x7f9c24fab908>, arrival_taper=<beat.heart.ArrivalTaper object at 0x7f9c24fbc0b8>, arrival_times=(1238982184.0, 1238982212.0, 1238982134.0, 1238982260.0, 1238982208.0, 1238982346.0, 1238982224.0, 1238982008.0, 1238982324.0, 1238982054.0, 1238982178.0, 1238982016.0, 1238982230.0, 1238982202.0, 1238982310.0, 1238981996.0, 1238982168.0, 1238982166.0, 1238982298.0, 1238982270.0, 1238982122.0, 1238982058.0, 1238982252.0, 1238982090.0, 1238982060.0, 1238981992.0, 1238982296.0, 1238981956.0, 1238982330.0, 1238982076.0, 1238981974.0, 1238981950.0, 1238982254.0, 1238982306.0, 1238982268.0), wavename='any_P', filterer=(<beat.heart.Filter object at 0x7f9c24fbc0f0>,), pre_stack_cut=True, station_corrections=False}(InplaceDimShuffle{x}.0, InplaceDimShuffle{x}.0, InplaceDimShuffle{x}.0, InplaceDimShuffle{x}.0, InplaceDimShuffle{x}.0, InplaceDimShuffle{x}.0, InplaceDimShuffle{x}.0, InplaceDimShuffle{x}.0, InplaceDimShuffle{x}.0, InplaceDimShuffle{x}.0, InplaceDimShuffle{x}.0, InplaceDimShuffle{x}.0)
Toposort index: 267
Inputs types: [TensorType(float64, (True,)), TensorType(float64, (True,)), TensorType(float64, (True,)), TensorType(float64, (True,)), TensorType(float64, (True,)), TensorType(float64, (True,)), TensorType(float64, (True,)), TensorType(float64, (True,)), TensorType(float64, (True,)), TensorType(float64, (True,)), TensorType(float64, (True,)), TensorType(float64, (True,))]
Inputs shapes: [(1,), (1,), (1,), (1,), (1,), (1,), (1,), (1,), (1,), (1,), (1,), (1,)]
Inputs strides: [(8,), (8,), (8,), (8,), (8,), (8,), (8,), (8,), (8,), (8,), (8,), (8,)]
Inputs values: [array([1.92403204]), array([47.18963061]), array([19.56563118]), array([23.53726621]), array([-7.56974262]), array([0.21540544]), array([0.37785101]), array([-178.65158538]), array([0.35166031]), array([72.85150306]), array([-13.37961928]), array([18.91737718])]
Outputs clients: [[Elemwise{Sub}[(0, 1)](any_P_data, SeisSynthesizer{engine=<pyrocko.gf.seismosizer.LocalEngine object at 0x7f9c24ff21d0>, sources=(<pyrocko.gf.seismosizer.RectangularSource object at 0x7f9c25055a90>,), targets=(<beat.heart.DynamicTarget object at 0x7f9c24efeb38>, <beat.heart.DynamicTarget object at 0x7f9c24efeba8>, <beat.heart.DynamicTarget object at 0x7f9c24efec18>, <beat.heart.DynamicTarget object at 0x7f9c24efec88>, <beat.heart.DynamicTarget object at 0x7f9c24efecf8>, <beat.heart.DynamicTarget object at 0x7f9c24efed68>, <beat.heart.DynamicTarget object at 0x7f9c24efedd8>, <beat.heart.DynamicTarget object at 0x7f9c24efee48>, <beat.heart.DynamicTarget object at 0x7f9c24efeeb8>, <beat.heart.DynamicTarget object at 0x7f9c24efef28>, <beat.heart.DynamicTarget object at 0x7f9c24efef98>, <beat.heart.DynamicTarget object at 0x7f9c24f00048>, <beat.heart.DynamicTarget object at 0x7f9c24f000b8>, <beat.heart.DynamicTarget object at 0x7f9c24f00128>, <beat.heart.DynamicTarget object at 0x7f9c24f00198>, <beat.heart.DynamicTarget object at 0x7f9c24f00208>, <beat.heart.DynamicTarget object at 0x7f9c24f00278>, <beat.heart.DynamicTarget object at 0x7f9c24f002e8>, <beat.heart.DynamicTarget object at 0x7f9c24f00358>, <beat.heart.DynamicTarget object at 0x7f9c24f003c8>, <beat.heart.DynamicTarget object at 0x7f9c24f00438>, <beat.heart.DynamicTarget object at 0x7f9c24f004a8>, <beat.heart.DynamicTarget object at 0x7f9c24f00518>, <beat.heart.DynamicTarget object at 0x7f9c24f00588>, <beat.heart.DynamicTarget object at 0x7f9c24f005f8>, <beat.heart.DynamicTarget object at 0x7f9c24f00668>, <beat.heart.DynamicTarget object at 0x7f9c24f006d8>, <beat.heart.DynamicTarget object at 0x7f9c24f00748>, <beat.heart.DynamicTarget object at 0x7f9c24f007b8>, <beat.heart.DynamicTarget object at 0x7f9c24f00828>, <beat.heart.DynamicTarget object at 0x7f9c24f00908>, <beat.heart.DynamicTarget object at 0x7f9c24f00978>, <beat.heart.DynamicTarget object at 0x7f9c24f009e8>, <beat.heart.DynamicTarget object at 0x7f9c24f00a58>, <beat.heart.DynamicTarget object at 0x7f9c24f00ac8>), event=<pyrocko.model.event.Event object at 0x7f9c24fab908>, arrival_taper=<beat.heart.ArrivalTaper object at 0x7f9c24fbc0b8>, arrival_times=(1238982184.0, 1238982212.0, 1238982134.0, 1238982260.0, 1238982208.0, 1238982346.0, 1238982224.0, 1238982008.0, 1238982324.0, 1238982054.0, 1238982178.0, 1238982016.0, 1238982230.0, 1238982202.0, 1238982310.0, 1238981996.0, 1238982168.0, 1238982166.0, 1238982298.0, 1238982270.0, 1238982122.0, 1238982058.0, 1238982252.0, 1238982090.0, 1238982060.0, 1238981992.0, 1238982296.0, 1238981956.0, 1238982330.0, 1238982076.0, 1238981974.0, 1238981950.0, 1238982254.0, 1238982306.0, 1238982268.0), wavename='any_P', filterer=(<beat.heart.Filter object at 0x7f9c24fbc0f0>,), pre_stack_cut=True, station_corrections=False}.0)], []]
Backtrace when the node is created(use Theano flag traceback.limit=N to make it longer):
File "/home/liny/anaconda3/envs/beat/bin/beat", line 33, in <module>
sys.exit(load_entry_point('beat==1.1.1', 'console_scripts', 'beat')())
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/apps/beat.py", line 2127, in main
globals()['command_' + command](args)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/apps/beat.py", line 922, in command_sample
project_dir, options.mode, options.hypers)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/models/problems.py", line 900, in load_model
problem.built_model()
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/models/problems.py", line 234, in built_model
input_rvs, fixed_rvs, self.hyperparams, pc)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/models/seismic.py", line 739, in get_formula
synths, _ = self.synthesizers[wmap._mapid](self.input_rvs)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/theano/gof/op.py", line 615, in __call__
node = self.make_node(*inputs, **kwargs)
File "/home/liny/anaconda3/envs/beat/lib/python3.6/site-packages/beat-1.1.1-py3.6-linux-x86_64.egg/beat/theanof.py", line 360, in make_node
outlist = [outm.type(), outv.type()]
HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.
Please see BEAT FAQ here: https://pyrocko.org/beat/docs/current/faq.html
Your point is listed under 6.
It works. Now I know why I ran into this problem. The gf_config
and beat.WaveformFitConfig
in the tutorial are not compatible. So I use the default parameters from the copied config_geometry.yaml
, which are
gf_config: !beat.SeismicGFConfig
store_superdir: /mnt/f/1.work/3.proj3/Laquila/GF
reference_model_idx: 0
n_variations:
- 0
- 1
earth_model_name: ak135-f-continental.m
nworkers: 12
use_crust2: false
replace_water: false
source_depth_min: 0.0
source_depth_max: 30.0
source_depth_spacing: 4.0
source_distance_radius: 50.0
source_distance_spacing: 4.0
error_depth: 0.1
error_velocities: 0.1
depth_limit_variation: 600.0
code: qssp
sample_rate: 0.5
rm_gfs: true
and
- !beat.WaveformFitConfig
include: true
preprocess_data: true
name: any_P
quantity: displacement
channels:
- Z
filterer:
- !beat.heart.Filter
lower_corner: 0.01
upper_corner: 0.1
order: 3
stepwise: true
distances:
- 30.0
- 90.0
interpolation: multilinear
arrival_taper: !beat.heart.ArrivalTaper
a: -15.0
b: -10.0
c: 40.0
d: 55.0
Maybe you can update the tutorial. Otherwise, it could be very misguiding. Thanks a lot!
Thanks a lot for making me aware of this- I am currently working on a new release and will be updating that!