hvasbath / beat

Bayesian Earthquake Analysis Tool
GNU General Public License v3.0
132 stars 42 forks source link

Error when running beat sample Laquila #64

Closed ranneylxr closed 3 years ago

ranneylxr commented 3 years ago

Hi, I meet this error when I running the Scnario 3: Rectangular source. Before I ran beat sample Laquila, I ran: beat update Laquila --parameters="hierarchicals" , beat update Laquila --parameters="hypers" and beat sample Laquila --hypers. And then I changed n_jobs in sampler_config to 50. The error message is: backend - INFO Loading multitrace from /data/lxrtest/insarlab/BEAT/Laquila/geometry/trans_stage_5 smc - INFO Beta: 0.015582 Stage: 6 backend - INFO Loading multitrace from /data/lxrtest/insarlab/BEAT/Laquila/geometry/stage_6 Traceback (most recent call last): File "/home/lxrtest/wclsolid/pyenv/versions/miniconda3-4.7.12/bin/beat", line 11, in load_entry_point('beat==1.0', 'console_scripts', 'beat')() File "/home/lxrtest/wclsolid/pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/beat-1.0-py3.7-linux-x8664.egg/beat/apps/beat.py", line 1688, in main globals()['command' + command](args) File "/home/lxrtest/wclsolid/pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/beat-1.0-py3.7-linux-x86_64.egg/beat/apps/beat.py", line 777, in command_sample sample(step, problem) File "/home/lxrtest/wclsolid/pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/beat-1.0-py3.7-linux-x86_64.egg/beat/models/base.py", line 176, in sample
rm_flag=pa.rm_flag) File "/home/lxrtest/wclsolid/pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/beat-1.0-py3.7-linux-x86_64.egg/beat/sampler/smc.py", line 460, in smc_sample step.select_end_points(mtrace) File "/home/lxrtest/wclsolid/pyenv/versions/miniconda3-4.7.12/lib/python3.7/site-packages/beat-1.0-py3.7-linux-x86_64.egg/beat/sampler/smc.py", line 210, in select_end_points array_population[:, slc] = slc_population0/1 [00:00<?, ?it/s] ValueError: could not broadcast input array from shape (902,1) into shape (1000,1)

And my config_geometry.yaml file is: name: /data/lxrtest/insarlab/BEAT/Laquila date: '2009-04-06' event: !pf.Event lat: 42.29 lon: 13.35 time: 2009-04-06 01:32:49.190000
depth: 12000.0 name: '200904060132A' magnitude: 6.343080192483292 region: 'CENTRAL ITALY' catalog: 'gCMT' moment_tensor: !pf.MomentTensor mnn: 1.43e+18 mee: 1.87e+18 mdd: -3.3e+18 mne: 1.77e+18 mnd: -1.43e+18 med: 2.6900000000000003e+17 strike1: 120.23408298515041 dip1: 54.240869089580485 rake1: -112.81739742081386 strike2: 335.98575923255856 dip2: 41.58440373860804 rake2: -61.69749587601104 moment: 3.6696131948749036e+18 magnitude: 6.343080192483292 duration: 7.0 project_dir: /data/lxrtest/insarlab/BEAT/Laquila problem_config: !beat.ProblemConfig mode: geometry source_type: RectangularSource stf_type: HalfSinusoid decimation_factors: geodetic: 4 seismic: 1 n_sources: 1 datatypes:

Could you please give me some suggestions? Thank you !

hvasbath commented 3 years ago

Hello! Thanks for giving BEAT a try! It does not make sence to select the update_covariances flag with your current settings. Please set it to false. For rerunning you can set the "stage" flag to 6 and restart the sampling. During restart it should resolve and detect unfinished sampled chains.

Please see also: https://hvasbath.github.io/beat/examples/Rectangular.html#restarting-sampling

In case the error persist, please let me know! Cheers!

ranneylxr commented 3 years ago

I can run it successfully based on your suggestion. Thank you!